CRITICAL: This makes the dashboard work by auto-updating metadata when agents run git/gh commands. Without this, PRs created by agents never appear on the dashboard. Changes: - packages/core/src/claude-hooks.ts: Setup Claude hooks (settings.json + metadata-updater.sh) - ao start: Automatically configures Claude hooks in project directory - ao spawn: Sets AO_SESSION and AO_DATA_DIR env vars for hook script - metadata-updater.sh: Detects gh pr create, git checkout -b, gh pr merge How it works: 1. PostToolUse hook fires after every Bash command 2. metadata-updater.sh receives JSON with command and output 3. Pattern matches git/gh commands and updates flat metadata files 4. Dashboard reads metadata files to show PR/branch/status The .claude directory is symlinked from main repo to worktrees so all sessions share the same hook config. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| claude-hooks.ts | ||
| config.ts | ||
| index.ts | ||
| lifecycle-manager.ts | ||
| metadata.ts | ||
| orchestrator-prompt.ts | ||
| plugin-registry.ts | ||
| prompt-builder.ts | ||
| session-manager.ts | ||
| tmux.ts | ||
| types.ts | ||
| utils.ts | ||