Merge pull request #437 from AIOSAI/system/devpulse-fix-pip-install-hook-shipping-readme-need-help-lin

feat(system): fix: pip install hook shipping + README Need Help line — bootstrap falls back to wheel-bundled _hooks when AIPASS_HOME hooks dir missing
This commit is contained in:
AIPass
2026-04-25 20:51:04 -07:00
committed by GitHub
2 changed files with 15 additions and 6 deletions
+2
View File
@@ -97,6 +97,8 @@ claude # Or: codex, gemini — your agent reads i
That's it. Your agent has identity, memory, a mailbox, and knows what AIPass is. Say "hi" — it picks up where it left off. Come back tomorrow, it remembers.
> **Need help?** [Ask in Discussions](https://github.com/AIOSAI/AIPass/discussions) or [file feedback](https://github.com/AIOSAI/AIPass/issues/new?template=feedback.yml) — both take 30 seconds.
Your project automatically gets access to every AIPass service — dispatch work to specialists, create plans, run quality audits, send feedback to devpulse. Agents within your project can email each other. All through `drone @branch command`.
### Explore the full framework
+13 -6
View File
@@ -74,16 +74,23 @@ HOOK_EVENTS: dict[str, str] = {
def _ship_hooks(aipass_home: str, target: Path) -> list[str]:
"""Copy enforcement + injector hooks from AIPass install to target project.
Copies each hook file from {aipass_home}/.claude/hooks/ to
{target}/.claude/hooks/. Skips audio hooks. Overwrites existing files
only if source content differs (idempotent re-sync).
Copies each hook file to {target}/.claude/hooks/. Looks for hooks in two
locations (first match wins):
1. {aipass_home}/.claude/hooks/ — dev install (git clone)
2. aipass/_hooks/ — pip install (wheel-bundled)
Returns list of files written.
Skips audio hooks. Overwrites existing files only if source content
differs (idempotent re-sync). Returns list of files written.
"""
source_dir = Path(aipass_home) / ".claude" / "hooks"
if not source_dir.is_dir():
logger.info("No hooks directory at %s — skipping hook shipping", source_dir)
return []
# Fallback: pip install bundles hooks at aipass/_hooks/ inside the package
package_hooks = Path(__file__).resolve().parents[4] / "_hooks"
if package_hooks.is_dir():
source_dir = package_hooks
else:
logger.info("No hooks directory at %s or %s — skipping", source_dir, package_hooks)
return []
dest_dir = target / ".claude" / "hooks"
dest_dir.mkdir(parents=True, exist_ok=True)