@chankov/agent-fleet 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/extensions/agent-fleet-update-check/README.md +4 -4
- package/.pi/extensions/btw/README.md +10 -10
- package/.pi/extensions/btw/index.ts +11 -11
- package/.pi/extensions/chrome-devtools-mcp/README.md +2 -2
- package/.pi/extensions/chrome-devtools-mcp/index.ts +1 -0
- package/.pi/extensions/compact-and-continue/README.md +2 -2
- package/.pi/extensions/pi-voice-stt/README.md +7 -7
- package/.pi/extensions/pi-voice-stt/index.ts +4 -4
- package/.pi/harnesses/agent-hub/README.md +58 -58
- package/.pi/harnesses/agent-hub/backend-policy.js +1 -1
- package/.pi/harnesses/agent-hub/delegate.ts +3 -3
- package/.pi/harnesses/agent-hub/drift-watchdog.js +1 -1
- package/.pi/harnesses/agent-hub/index.ts +248 -248
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/run-budget.js +1 -1
- package/.pi/harnesses/coms/README.md +2 -2
- package/.pi/harnesses/coms/index.ts +13 -13
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/README.md +9 -9
- package/.pi/harnesses/damage-control-continue/index.ts +11 -11
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/prompts/{doctor-agent-fleet.md → af-doctor-agent-fleet.md} +1 -1
- package/.pi/prompts/{setup-agent-fleet.md → af-setup-agent-fleet.md} +1 -1
- package/.versions/0.0.6/.claude/commands/build.md +44 -0
- package/.versions/0.0.6/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.0.6/.claude/commands/design-agent.md +14 -0
- package/.versions/0.0.6/.claude/commands/doctor-agent-fleet.md +17 -0
- package/.versions/0.0.6/.claude/commands/orchestrate.md +112 -0
- package/.versions/0.0.6/.claude/commands/plan.md +16 -0
- package/.versions/0.0.6/.claude/commands/prime.md +22 -0
- package/.versions/0.0.6/.claude/commands/review.md +16 -0
- package/.versions/0.0.6/.claude/commands/set-hermes-telegram.md +15 -0
- package/.versions/0.0.6/.claude/commands/setup-agent-fleet.md +25 -0
- package/.versions/0.0.6/.claude/commands/ship.md +72 -0
- package/.versions/0.0.6/.claude/commands/spec.md +15 -0
- package/.versions/0.0.6/.claude/commands/test.md +19 -0
- package/.versions/0.0.6/.claude/commands/webperf.md +32 -0
- package/.versions/0.0.6/.claude/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.6/.opencode/commands/af-build.md +17 -0
- package/.versions/0.0.6/.opencode/commands/af-code-simplify.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-compound.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-design-agent.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-doctor-agent-fleet.md +17 -0
- package/.versions/0.0.6/.opencode/commands/af-orchestrate.md +112 -0
- package/.versions/0.0.6/.opencode/commands/af-plan.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-prime.md +22 -0
- package/.versions/0.0.6/.opencode/commands/af-review.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-set-hermes-telegram.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-setup-agent-fleet.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-ship.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-spec.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-test.md +21 -0
- package/.versions/0.0.6/.opencode/commands/af-webperf.md +32 -0
- package/.versions/0.0.6/.opencode/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.6/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/0.0.6/.pi/agents/model-profiles.yaml +20 -0
- package/.versions/0.0.6/.pi/agents/peers.yaml +146 -0
- package/.versions/0.0.6/.pi/agents/teams.yaml +39 -0
- package/.versions/0.0.6/.pi/damage-control-rules.yaml +297 -0
- package/.versions/0.0.6/.pi/extensions/agent-fleet-update-check/README.md +58 -0
- package/.versions/0.0.6/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.versions/0.0.6/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/btw/README.md +118 -0
- package/.versions/0.0.6/.pi/extensions/btw/index.ts +917 -0
- package/.versions/0.0.6/.pi/extensions/btw/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/btw/state.js +179 -0
- package/.versions/0.0.6/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
- package/.versions/0.0.6/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/0.0.6/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.0.6/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.0.6/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.0.6/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.0.6/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.0.6/.pi/extensions/package.json +9 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/README.md +201 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/README.md +798 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/artifacts.js +92 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/backend-policy.js +153 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/delegate.ts +386 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/helpers.ts +214 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/index.ts +8045 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/return-contract.js +215 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/run-budget.js +155 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/spawn.ts +246 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/version.ts +18 -0
- package/.versions/0.0.6/.pi/harnesses/ask-user-remote/README.md +19 -0
- package/.versions/0.0.6/.pi/harnesses/ask-user-remote/index.ts +321 -0
- package/.versions/0.0.6/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/0.0.6/.pi/harnesses/coms/README.md +92 -0
- package/.versions/0.0.6/.pi/harnesses/coms/index.ts +1745 -0
- package/.versions/0.0.6/.pi/harnesses/coms/package.json +7 -0
- package/.versions/0.0.6/.pi/harnesses/coms/version.ts +18 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/README.md +117 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/version.ts +18 -0
- package/.versions/0.0.6/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/0.0.6/.pi/harnesses/lib/herdr-client.ts +458 -0
- package/.versions/0.0.6/.pi/harnesses/lib/herdr-presence.ts +288 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-socket.ts +118 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/0.0.6/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.0.6/.pi/harnesses/package.json +9 -0
- package/.versions/0.0.6/.pi/prompts/af-build.md +24 -0
- package/.versions/0.0.6/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/0.0.6/.pi/prompts/af-doctor-agent-fleet.md +15 -0
- package/.versions/0.0.6/.pi/prompts/af-plan.md +16 -0
- package/.versions/0.0.6/.pi/prompts/af-review.md +16 -0
- package/.versions/0.0.6/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/0.0.6/.pi/prompts/af-setup-agent-fleet.md +27 -0
- package/.versions/0.0.6/.pi/prompts/af-ship.md +17 -0
- package/.versions/0.0.6/.pi/prompts/af-spec.md +15 -0
- package/.versions/0.0.6/.pi/prompts/af-test.md +19 -0
- package/.versions/0.0.6/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/0.0.6/.version +1 -0
- package/.versions/0.0.6/agents/architect.md +23 -0
- package/.versions/0.0.6/agents/bowser.md +26 -0
- package/.versions/0.0.6/agents/builder.md +53 -0
- package/.versions/0.0.6/agents/code-reviewer.md +205 -0
- package/.versions/0.0.6/agents/deep-researcher.md +31 -0
- package/.versions/0.0.6/agents/documenter.md +18 -0
- package/.versions/0.0.6/agents/orchestrator.md +54 -0
- package/.versions/0.0.6/agents/plan-reviewer.md +60 -0
- package/.versions/0.0.6/agents/planner.md +69 -0
- package/.versions/0.0.6/agents/releaser.md +24 -0
- package/.versions/0.0.6/agents/researcher.md +28 -0
- package/.versions/0.0.6/agents/security-auditor.md +166 -0
- package/.versions/0.0.6/agents/test-engineer.md +151 -0
- package/.versions/0.0.6/agents/web-debugger.md +42 -0
- package/.versions/0.0.6/agents/web-performance-auditor.md +192 -0
- package/.versions/0.0.6/codex/CONDUCTOR.md +148 -0
- package/.versions/0.0.6/docs/ARCHITECTURE.md +210 -0
- package/.versions/0.0.6/docs/agent-fleet-setup.md +366 -0
- package/.versions/0.0.6/docs/claude-code-coms-bridge.md +103 -0
- package/.versions/0.0.6/docs/codex-remote-conductor.md +170 -0
- package/.versions/0.0.6/docs/coms-hermes-bridge.md +179 -0
- package/.versions/0.0.6/docs/getting-started.md +183 -0
- package/.versions/0.0.6/docs/npm-install.md +337 -0
- package/.versions/0.0.6/docs/opencode-setup.md +249 -0
- package/.versions/0.0.6/docs/pi-extensions.md +293 -0
- package/.versions/0.0.6/docs/pi-setup.md +476 -0
- package/.versions/0.0.6/docs/skill-anatomy.md +150 -0
- package/.versions/0.0.6/hermes/README.md +231 -0
- package/.versions/0.0.6/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/0.0.6/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
- package/.versions/0.0.6/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/0.0.6/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/0.0.6/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.0.6/hooks/coms-stop-hook.mjs +73 -0
- package/.versions/0.0.6/hooks/hooks.json +14 -0
- package/.versions/0.0.6/hooks/session-start.sh +74 -0
- package/.versions/0.0.6/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.0.6/justfile +245 -0
- package/.versions/0.0.6/references/accessibility-checklist.md +160 -0
- package/.versions/0.0.6/references/definition-of-done.md +67 -0
- package/.versions/0.0.6/references/fleet-coordination-patterns.md +151 -0
- package/.versions/0.0.6/references/observability-checklist.md +91 -0
- package/.versions/0.0.6/references/orchestration-patterns.md +370 -0
- package/.versions/0.0.6/references/performance-checklist.md +153 -0
- package/.versions/0.0.6/references/prompting-patterns.md +380 -0
- package/.versions/0.0.6/references/security-checklist.md +179 -0
- package/.versions/0.0.6/references/testing-patterns.md +236 -0
- package/.versions/0.0.6/scripts/codex-conductor.ts +41 -0
- package/.versions/0.0.6/scripts/codex-remote-control.ts +167 -0
- package/.versions/0.0.6/scripts/coms-claude-bridge.ts +286 -0
- package/.versions/0.0.6/scripts/coms-cli.ts +484 -0
- package/.versions/0.0.6/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/0.0.6/scripts/fleet.ts +141 -0
- package/.versions/0.0.6/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/0.0.6/scripts/hermes-monitor-scenario.ts +7 -0
- package/.versions/0.0.6/scripts/lib/claude-bridge-core.ts +100 -0
- package/.versions/0.0.6/scripts/lib/codex-conductor.ts +88 -0
- package/.versions/0.0.6/scripts/lib/codex-remote-control.ts +480 -0
- package/.versions/0.0.6/scripts/lib/coms-envelope.ts +539 -0
- package/.versions/0.0.6/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/0.0.6/scripts/lib/fleet-command.ts +109 -0
- package/.versions/0.0.6/scripts/lib/herdr-layout.ts +263 -0
- package/.versions/0.0.6/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/0.0.6/scripts/lib/persona-banner.ts +62 -0
- package/.versions/0.0.6/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/0.0.6/scripts/lib/team-project.ts +191 -0
- package/.versions/0.0.6/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/0.0.6/scripts/peer-banner.ts +40 -0
- package/.versions/0.0.6/scripts/team-snapshot.ts +237 -0
- package/.versions/0.0.6/scripts/team-up.ts +351 -0
- package/.versions/0.0.6/skills/_internal/grilling.md +11 -0
- package/.versions/0.0.6/skills/browser-testing-with-devtools/SKILL.md +352 -0
- package/.versions/0.0.6/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/0.0.6/skills/compound-learning/SKILL.md +137 -0
- package/.versions/0.0.6/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.0.6/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.0.6/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.0.6/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/0.0.6/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.6/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.0.6/skills/guided-workspace-setup/SKILL.md +544 -0
- package/.versions/0.0.6/skills/guided-workspace-setup/companion-manifest.json +35 -0
- package/.versions/0.0.6/skills/idea-refine/SKILL.md +182 -0
- package/.versions/0.0.6/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.6/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.6/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.6/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.6/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/0.0.6/skills/interview-me/SKILL.md +226 -0
- package/.versions/0.0.6/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/0.0.6/skills/peer-coms/SKILL.md +90 -0
- package/.versions/0.0.6/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.6/skills/planning-and-task-breakdown/SKILL.md +236 -0
- package/.versions/0.0.6/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/0.0.6/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/0.0.6/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/0.0.6/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +6 -0
- package/README.md +24 -23
- package/agents/documenter.md +1 -1
- package/agents/releaser.md +1 -1
- package/bin/cli.js +20 -20
- package/bin/lib/bootstrap.js +16 -16
- package/bin/lib/doctor.js +1 -1
- package/docs/ARCHITECTURE.md +4 -4
- package/docs/agent-fleet-setup.md +11 -11
- package/docs/coms-hermes-bridge.md +8 -8
- package/docs/npm-install.md +21 -21
- package/docs/pi-extensions.md +7 -7
- package/docs/pi-setup.md +51 -47
- package/hermes/README.md +1 -1
- package/package.json +1 -1
- package/references/fleet-coordination-patterns.md +2 -2
- package/skills/browser-testing-with-devtools/SKILL.md +1 -1
- package/skills/compound-learning/SKILL.md +3 -3
- package/skills/guided-workspace-setup/SKILL.md +16 -14
- /package/.pi/prompts/{build.md → af-build.md} +0 -0
- /package/.pi/prompts/{code-simplify.md → af-code-simplify.md} +0 -0
- /package/.pi/prompts/{plan.md → af-plan.md} +0 -0
- /package/.pi/prompts/{review.md → af-review.md} +0 -0
- /package/.pi/prompts/{set-hermes-telegram.md → af-set-hermes-telegram.md} +0 -0
- /package/.pi/prompts/{ship.md → af-ship.md} +0 -0
- /package/.pi/prompts/{spec.md → af-spec.md} +0 -0
- /package/.pi/prompts/{test.md → af-test.md} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Manifest-mounted, fail-closed local Agent Fleet monitor boundary."""
|
|
2
|
+
|
|
3
|
+
from fastapi import APIRouter, HTTPException
|
|
4
|
+
|
|
5
|
+
from adapter import MonitorAdapter, MonitorUnavailable
|
|
6
|
+
|
|
7
|
+
router = APIRouter()
|
|
8
|
+
MAX_TASK_ID_LENGTH = 128
|
|
9
|
+
MAX_AFTER_SEQUENCE = 1_000_000_000
|
|
10
|
+
|
|
11
|
+
def validate_task_request(task_id: str, generation: int, after_sequence: int | None = None) -> None:
|
|
12
|
+
if not isinstance(task_id, str) or not 1 <= len(task_id) <= MAX_TASK_ID_LENGTH or not __import__("re").fullmatch(r"[A-Za-z0-9][A-Za-z0-9._:-]*", task_id):
|
|
13
|
+
raise HTTPException(status_code=422, detail="invalid task_id")
|
|
14
|
+
if type(generation) is not int or generation < 1:
|
|
15
|
+
raise HTTPException(status_code=422, detail="invalid generation")
|
|
16
|
+
if after_sequence is not None and (type(after_sequence) is not int or not 0 <= after_sequence <= MAX_AFTER_SEQUENCE):
|
|
17
|
+
raise HTTPException(status_code=422, detail="invalid after_sequence")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@router.get("/capabilities")
|
|
21
|
+
def capabilities() -> dict[str, bool]:
|
|
22
|
+
return {"monitor_adapter": True}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@router.get("/snapshot")
|
|
26
|
+
def snapshot() -> dict:
|
|
27
|
+
try:
|
|
28
|
+
return MonitorAdapter.from_profile_environment().snapshot()
|
|
29
|
+
except MonitorUnavailable as error:
|
|
30
|
+
raise HTTPException(status_code=503, detail="local Agent Fleet monitor unavailable") from error
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@router.get("/output")
|
|
34
|
+
def output(task_id: str, generation: int, after_sequence: int, hub_instance_id: str) -> dict:
|
|
35
|
+
validate_task_request(task_id, generation, after_sequence)
|
|
36
|
+
if not isinstance(hub_instance_id, str) or not hub_instance_id: raise HTTPException(status_code=422, detail="invalid hub_instance_id")
|
|
37
|
+
try:
|
|
38
|
+
return MonitorAdapter.from_profile_environment().output(task_id, generation, after_sequence, hub_instance_id)
|
|
39
|
+
except MonitorUnavailable as error:
|
|
40
|
+
raise HTTPException(status_code=503, detail="local Agent Fleet monitor unavailable") from error
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@router.post("/cancel")
|
|
44
|
+
def cancel(task_id: str, generation: int, hub_instance_id: str) -> dict:
|
|
45
|
+
validate_task_request(task_id, generation)
|
|
46
|
+
if not isinstance(hub_instance_id, str) or not hub_instance_id: raise HTTPException(status_code=422, detail="invalid hub_instance_id")
|
|
47
|
+
try:
|
|
48
|
+
return MonitorAdapter.from_profile_environment().cancel(task_id, generation, hub_instance_id)
|
|
49
|
+
except MonitorUnavailable as error:
|
|
50
|
+
raise HTTPException(status_code=503, detail="local Agent Fleet monitor unavailable") from error
|
package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import pathlib
|
|
2
|
+
import unittest
|
|
3
|
+
from adapter import MonitorAdapter, MonitorUnavailable
|
|
4
|
+
|
|
5
|
+
ROOT = pathlib.Path(__file__).resolve().parents[4]
|
|
6
|
+
|
|
7
|
+
class ReviewLiveWiringRedTest(unittest.TestCase):
|
|
8
|
+
def test_explicit_human_profile_id_has_the_shared_canonical_namespace_contract(self):
|
|
9
|
+
# lifecycle accepts this documented human id; adapter must canonicalize it identically.
|
|
10
|
+
self.assertEqual(MonitorAdapter.canonical_profile_id("profile-a"), "104c4491498717b382d124bbe81ae4e87648fbab08ecba7e24135ead5fc97554")
|
|
11
|
+
|
|
12
|
+
def test_plugin_uses_fastapi_query_parameter_names_end_to_end(self):
|
|
13
|
+
source=(ROOT/"hermes/desktop-plugins/agent-fleet-monitor/plugin.js").read_text()
|
|
14
|
+
self.assertIn("task_id", source)
|
|
15
|
+
self.assertIn("after_sequence", source)
|
|
16
|
+
self.assertNotIn("afterSequence", source)
|
|
17
|
+
|
|
18
|
+
def test_cancel_response_has_an_explicit_bounded_wire_contract(self):
|
|
19
|
+
source=(ROOT/"scripts/lib/hermes-monitor-socket.ts").read_text()
|
|
20
|
+
self.assertRegex(source, r"MAX_CANCEL_RESPONSE_BYTES|cap.*cancel|cancel.*MAX_", "cancel response must be capped")
|
|
21
|
+
|
|
22
|
+
if __name__ == "__main__": unittest.main()
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hub-conductor
|
|
3
|
+
description: Conducts local pi hub-team peers from Hermes through coms-cli list/send --await, while preserving no-herdr and pool-scope damage-control boundaries.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hub Conductor
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
You are the human-facing conductor for a local pi coms pool. Your job is to decompose the human's request, discover live hub-team peers, delegate bounded tasks through `scripts/coms-cli.ts`, wait for results, and synthesize a final answer.
|
|
11
|
+
|
|
12
|
+
This is conductor-side orchestration only: the existing coms CLI is the bridge. You do not need a daemon or standing Hermes peer to ask pi peers for work.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
Use this skill when:
|
|
17
|
+
|
|
18
|
+
- the human asks Hermes to coordinate pi hub-team peers;
|
|
19
|
+
- a task benefits from parallel specialist work such as research, implementation, docs, review, or testing;
|
|
20
|
+
- you need to inspect which local peers are alive before deciding who should do what;
|
|
21
|
+
- a previous peer response needs follow-up, retry, or synthesis.
|
|
22
|
+
|
|
23
|
+
Do not use it for single-step work Hermes can safely complete alone without peer help.
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
|
|
27
|
+
1. Identify the repository root and set a shell variable for it when useful:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
REPO=/home/nchankov/repos/agent-fleet
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. Discover live peers in the current coms project:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
node --experimental-strip-types "$REPO/scripts/coms-cli.ts" list
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Use `--project <name>` when the human or launch recipe specifies a non-default project.
|
|
40
|
+
|
|
41
|
+
3. Choose peers by their listed name and purpose. Send bounded, self-contained prompts that include the expected deliverable and any acceptance assertions the peer must prove.
|
|
42
|
+
|
|
43
|
+
4. Delegate with an explicit timeout and wait for the response:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
node --experimental-strip-types "$REPO/scripts/coms-cli.ts" send <peer-name> \
|
|
47
|
+
"<bounded task; include required output and evidence>" \
|
|
48
|
+
--await --timeout 300000
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use a longer timeout for build/test/review tasks when needed. Every `send --await` must include `--timeout <ms>`.
|
|
52
|
+
|
|
53
|
+
5. If a peer times out or is missing, retry at most once when the task still matters. Otherwise report that peer as unavailable and continue with the best available evidence.
|
|
54
|
+
|
|
55
|
+
6. Synthesize peer outputs for the human. Name which peers were asked, what each returned, what evidence supports the result, and what remains unproven.
|
|
56
|
+
|
|
57
|
+
7. For inbound conversational requests, answer directly in chat after any peer delegation; keep the final response self-contained because the human sees your synthesis, not the peer transcript.
|
|
58
|
+
|
|
59
|
+
## Hard Boundaries
|
|
60
|
+
|
|
61
|
+
- **Advisory contract only.** This skill runs in an external Hermes process. Pi damage-control wraps Pi tool calls, not Hermes; this contract and any human confirmation reduce risk but do not provide an OS command allowlist or technical enforcement.
|
|
62
|
+
- **No herdr driving.** Do not run `herdr pane`, `herdr workspace`, pane lifecycle commands, workspace lifecycle commands, or any command that creates, closes, restarts, or drives panes. Rationale: fleet lifecycle belongs to the human/orchestrator so the `.pi/damage-control-rules.yaml` model remains intact and Hermes cannot accidentally destroy or commandeer active work.
|
|
63
|
+
- **Pool scope only.** Operate only through peers visible in the current project coms pool (`coms-cli list`, then `coms-cli send ... --await`). Do not widen to unrelated projects, global registries, hidden explicit peers, or external agent pools unless the human explicitly starts that topology and names the target project. Rationale: coms pool boundaries keep delegation auditable and prevent cross-project leakage.
|
|
64
|
+
- **No secret or bulk-data relay.** Send bounded prompts and path references, not secrets or whole-file dumps. Rationale: peers need task context, not uncontrolled data replication.
|
|
65
|
+
|
|
66
|
+
## Red Flags
|
|
67
|
+
|
|
68
|
+
- Running or proposing `herdr` pane/workspace commands yourself.
|
|
69
|
+
- Sending to a peer that was not shown by `coms-cli list` for the intended project.
|
|
70
|
+
- Omitting `--await` or `--timeout` for delegated work that the human expects you to synthesize.
|
|
71
|
+
- Retrying repeatedly after a timeout instead of one retry then reporting the gap.
|
|
72
|
+
- Treating a peer's prose success claim as proof when it lacks named evidence.
|
|
73
|
+
- Expanding beyond the repository/project pool without explicit human direction.
|
|
74
|
+
|
|
75
|
+
## Verification
|
|
76
|
+
|
|
77
|
+
Before reporting done, check:
|
|
78
|
+
|
|
79
|
+
- [ ] `coms-cli list` was run for the intended project and the selected peers were visible.
|
|
80
|
+
- [ ] Every delegated task used `coms-cli send <peer> ... --await --timeout <ms>`.
|
|
81
|
+
- [ ] Peer responses were synthesized with named evidence and unresolved gaps.
|
|
82
|
+
- [ ] At most one retry was used for any timeout or missing peer.
|
|
83
|
+
- [ ] No `herdr` command was run or requested by Hermes.
|
|
84
|
+
- [ ] No delegation crossed outside the intended project coms pool.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hub-liaison
|
|
3
|
+
description: On any Telegram HUB-Q reply ALWAYS write the pi hub bridge answer file — even when the thread shows cancel/closed/timeout notes; the bridge classifies late answers itself. Use when a Telegram message replies to or contains a [HUB-Q:<qid>] marker.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hub Liaison
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
You are the gateway-side liaison between a human Telegram reply and the pi `user-remote` coms peer. When a Telegram message correlates to a hub question marker, write one answer file for the bridge. Do not answer by paraphrasing in chat only; the bridge only consumes the file.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Use this skill when an incoming Telegram message either:
|
|
15
|
+
|
|
16
|
+
- replies to a message that contains `[HUB-Q:<qid>]`, or
|
|
17
|
+
- contains the explicit prefix `HUB-Q:<qid>:`.
|
|
18
|
+
|
|
19
|
+
`<qid>` must be a 26-character Crockford ULID matching:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
^[0-9A-HJKMNP-TV-Z]{26}$
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Ignore non-matching messages. If a message is ambiguous and there is more than one plausible question marker, ask the human to reply to the original question or use `HUB-Q:<qid>: <answer>`.
|
|
26
|
+
|
|
27
|
+
## Correlation Rules
|
|
28
|
+
|
|
29
|
+
1. Prefer the qid from the replied-to message marker: `[HUB-Q:<qid>]`.
|
|
30
|
+
2. If there is no replied-to marker, accept a message prefix exactly shaped as `HUB-Q:<qid>: <answer>`.
|
|
31
|
+
3. The answer text is the Telegram reply body, except for prefix-form messages where the answer text is everything after `HUB-Q:<qid>:`.
|
|
32
|
+
4. Preserve the human's answer text exactly except for trimming leading/trailing whitespace around the extracted answer.
|
|
33
|
+
5. Never invent or alter the qid. If the qid does not match the regex above, do not write a file.
|
|
34
|
+
6. If a human message contains or replies to a `[HUB-Q:<qid>]` question, write the answer file even when the thread also contains a cancel/closed note or the user appears to be answering after cancellation. Do not decide whether the question is still open; the bridge validates pending vs. late and sends the appropriate polite closed note.
|
|
35
|
+
|
|
36
|
+
## Process
|
|
37
|
+
|
|
38
|
+
1. Extract `<qid>` and `<answer>` using the correlation rules.
|
|
39
|
+
2. Confirm `<answer>` is non-empty. If it is empty, ask the human for the answer text.
|
|
40
|
+
3. Do not suppress the write because the question appears canceled, closed, timed out, or answered locally. That state belongs to the bridge, not this skill.
|
|
41
|
+
4. Write exactly this file path, replacing `<qid>` with the extracted qid:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
~/.pi/coms/hermes-bridge/questions/<qid>.answer.json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
5. The JSON content must use exactly these fields:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"qid": "<qid>",
|
|
52
|
+
"answer": "<answer>",
|
|
53
|
+
"answered_by": "telegram:<user>",
|
|
54
|
+
"at": "<ISO timestamp>"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- `qid`: the extracted 26-character qid.
|
|
59
|
+
- `answer`: the extracted answer text.
|
|
60
|
+
- `answered_by`: `telegram:<user>`, using the Telegram username/handle when available; otherwise use a stable Telegram sender identifier.
|
|
61
|
+
- `at`: the current ISO-8601 timestamp.
|
|
62
|
+
|
|
63
|
+
6. After writing the file, briefly confirm to the human that the answer was delivered for `HUB-Q:<qid>`; if it was late, the bridge will handle the closed-question response.
|
|
64
|
+
|
|
65
|
+
## Write Boundary
|
|
66
|
+
|
|
67
|
+
Hard rule: never write outside `~/.pi/coms/hermes-bridge/questions/` for this skill. Do not create, edit, or delete files elsewhere. The bridge validates and consumes only `~/.pi/coms/hermes-bridge/questions/<qid>.answer.json`; any other path is outside the private wire contract.
|
|
68
|
+
|
|
69
|
+
## Red Flags
|
|
70
|
+
|
|
71
|
+
- A message has no `[HUB-Q:<qid>]` marker and no `HUB-Q:<qid>:` prefix.
|
|
72
|
+
- The qid fails `^[0-9A-HJKMNP-TV-Z]{26}$`.
|
|
73
|
+
- The answer text is empty after extraction.
|
|
74
|
+
- The requested write path is not under `~/.pi/coms/hermes-bridge/questions/`.
|
|
75
|
+
- The human asks you to modify bridge logs, registry files, or any unrelated project files.
|
|
76
|
+
- Suppressing an otherwise correlated answer because a cancel/closed note is visible in the thread.
|
|
77
|
+
|
|
78
|
+
## Verification
|
|
79
|
+
|
|
80
|
+
- [ ] The qid came from `[HUB-Q:<qid>]` or `HUB-Q:<qid>:` and matches the regex.
|
|
81
|
+
- [ ] The answer file path is exactly `~/.pi/coms/hermes-bridge/questions/<qid>.answer.json`.
|
|
82
|
+
- [ ] The JSON has exactly `qid`, `answer`, `answered_by`, and `at` with an ISO timestamp.
|
|
83
|
+
- [ ] No file outside `~/.pi/coms/hermes-bridge/questions/` was written.
|
|
84
|
+
- [ ] Correlated late/canceled answers were still written for the bridge to classify.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# simplify-ignore hook
|
|
2
|
+
|
|
3
|
+
Block-level protection for `/code-simplify`. Mark code that should never be simplified — the model won't see it.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
1. Annotate blocks you want to protect:
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
/* simplify-ignore-start: perf-critical */
|
|
11
|
+
// manually unrolled XOR — 3x faster than a loop
|
|
12
|
+
result[0] = buf[0] ^ key[0];
|
|
13
|
+
result[1] = buf[1] ^ key[1];
|
|
14
|
+
result[2] = buf[2] ^ key[2];
|
|
15
|
+
result[3] = buf[3] ^ key[3];
|
|
16
|
+
/* simplify-ignore-end */
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. Add hooks to `.claude/settings.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"hooks": {
|
|
24
|
+
"PreToolUse": [
|
|
25
|
+
{
|
|
26
|
+
"matcher": "Read",
|
|
27
|
+
"hooks": [{ "type": "command", "command": "bash ${CLAUDE_PROJECT_DIR}/hooks/simplify-ignore.sh" }]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"PostToolUse": [
|
|
31
|
+
{
|
|
32
|
+
"matcher": "Edit|Write",
|
|
33
|
+
"hooks": [{ "type": "command", "command": "bash ${CLAUDE_PROJECT_DIR}/hooks/simplify-ignore.sh" }]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"Stop": [
|
|
37
|
+
{
|
|
38
|
+
"hooks": [{ "type": "command", "command": "bash ${CLAUDE_PROJECT_DIR}/hooks/simplify-ignore.sh" }]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
3. Run `/code-simplify` — protected blocks become `/* BLOCK_de115a1d: perf-critical */` placeholders. The model reasons about surrounding code without seeing the protected implementation.
|
|
46
|
+
|
|
47
|
+
> **Note:** The hook stores temporary backups in `.claude/.simplify-ignore-cache/`. Make sure this path is in your `.gitignore`.
|
|
48
|
+
|
|
49
|
+
## How it works
|
|
50
|
+
|
|
51
|
+
One script, three hook events:
|
|
52
|
+
|
|
53
|
+
| Event | Action |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `PreToolUse Read` | Backs up file, replaces blocks with `BLOCK_<hash>` placeholders in-place |
|
|
56
|
+
| `PostToolUse Edit\|Write` | Expands placeholders back to real code, saves model's changes, re-filters |
|
|
57
|
+
| `Stop` | Restores all files from backup when session ends |
|
|
58
|
+
|
|
59
|
+
Each block is content-hashed (8 hex chars via `shasum`/`sha1sum`) so the round-trip is unambiguous even if the model duplicates or reorders placeholders. Cache is project-scoped to prevent cross-session interference.
|
|
60
|
+
|
|
61
|
+
## Annotation syntax
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
/* simplify-ignore-start */ // basic — hides the block
|
|
65
|
+
/* simplify-ignore-start: reason */ // with reason — appears in placeholder
|
|
66
|
+
/* simplify-ignore-end */
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Any comment style works (`//`, `/*`, `#`, `<!--`). Multiple blocks per file and single-line blocks supported. Placeholders preserve the original comment syntax (e.g. `# BLOCK_xxx` for Python, `<!-- BLOCK_xxx -->` for HTML).
|
|
70
|
+
|
|
71
|
+
## Crash recovery
|
|
72
|
+
|
|
73
|
+
If Claude Code crashes without triggering the Stop hook, files on disk may still have `BLOCK_<hash>` placeholders. To restore manually:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
echo '{}' | bash hooks/simplify-ignore.sh
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Backups are stored in `.claude/.simplify-ignore-cache/` within your project directory.
|
|
80
|
+
|
|
81
|
+
## Known limitations
|
|
82
|
+
|
|
83
|
+
- **Single-line blocks hide the entire line.** If `simplify-ignore-start` and `simplify-ignore-end` appear on the same line as other code, the whole line is hidden from the model, not just the annotated portion. Use dedicated lines for annotations.
|
|
84
|
+
- **Comment suffix detection covers `*/` and `-->` only.** Template engines with non-standard comment closers (ERB `%>`, Blade `--}}`) may produce unbalanced placeholders. Use `#` or `//` style comments instead.
|
|
85
|
+
- **Fallback expansion is progressive, not exact.** If the model alters a placeholder's formatting (e.g. changes the reason text), the hook tries progressively simpler matches: full placeholder → prefix+hash+suffix → hash-only. The hash-only fallback may leave cosmetic debris (e.g. stray `:` or reason text). A warning is printed to stderr when this happens.
|
|
86
|
+
- **File renaming leaves placeholders.** If the model renames or moves a file via a shell command, the new file will retain `BLOCK_<hash>` placeholders. The original code is saved as `<old-filename>.recovered` when the session stops. You must manually restore the recovered code into the new file.
|
|
87
|
+
|
|
88
|
+
## Requirements
|
|
89
|
+
|
|
90
|
+
- `jq`, `shasum` or `sha1sum` (auto-detected), Bash 3.2+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// hooks/coms-stop-hook.mjs — Claude Code Stop hook for the coms bridge.
|
|
3
|
+
//
|
|
4
|
+
// Writes the final assistant message of each turn to the file the
|
|
5
|
+
// coms-claude-bridge watches (~/.pi/coms/claude-bridge/<pane>/last-message.json,
|
|
6
|
+
// keyed by HERDR_PANE_ID), making the hook the bridge's PRIMARY completion
|
|
7
|
+
// path (exact text, no pane scraping). Outside a herdr pane it does nothing.
|
|
8
|
+
//
|
|
9
|
+
// Install (project or user settings.json):
|
|
10
|
+
// {
|
|
11
|
+
// "hooks": {
|
|
12
|
+
// "Stop": [{ "hooks": [{ "type": "command",
|
|
13
|
+
// "command": "node /path/to/agent-fleet/hooks/coms-stop-hook.mjs" }] }]
|
|
14
|
+
// }
|
|
15
|
+
// }
|
|
16
|
+
//
|
|
17
|
+
// The hook receives {session_id, transcript_path, …} as JSON on stdin and
|
|
18
|
+
// must never fail the turn: every error path exits 0.
|
|
19
|
+
|
|
20
|
+
import * as fs from "node:fs";
|
|
21
|
+
import * as os from "node:os";
|
|
22
|
+
import * as path from "node:path";
|
|
23
|
+
|
|
24
|
+
function lastAssistantText(transcriptPath) {
|
|
25
|
+
const raw = fs.readFileSync(transcriptPath, "utf-8");
|
|
26
|
+
let text = null;
|
|
27
|
+
for (const line of raw.split("\n")) {
|
|
28
|
+
if (!line.trim()) continue;
|
|
29
|
+
let entry;
|
|
30
|
+
try {
|
|
31
|
+
entry = JSON.parse(line);
|
|
32
|
+
} catch {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (entry?.type !== "assistant") continue;
|
|
36
|
+
const content = entry?.message?.content;
|
|
37
|
+
if (!Array.isArray(content)) continue;
|
|
38
|
+
const parts = content.filter((c) => c?.type === "text" && typeof c.text === "string").map((c) => c.text);
|
|
39
|
+
if (parts.length > 0) text = parts.join("\n");
|
|
40
|
+
}
|
|
41
|
+
return text;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
const paneId = process.env.HERDR_PANE_ID;
|
|
46
|
+
if (!paneId) process.exit(0); // not in a herdr pane — nothing to bridge
|
|
47
|
+
|
|
48
|
+
const input = JSON.parse(fs.readFileSync(0, "utf-8"));
|
|
49
|
+
const transcriptPath = input?.transcript_path;
|
|
50
|
+
if (!transcriptPath || !fs.existsSync(transcriptPath)) process.exit(0);
|
|
51
|
+
|
|
52
|
+
const text = lastAssistantText(transcriptPath);
|
|
53
|
+
if (text == null) process.exit(0);
|
|
54
|
+
|
|
55
|
+
const dir = path.join(
|
|
56
|
+
os.homedir(),
|
|
57
|
+
".pi",
|
|
58
|
+
"coms",
|
|
59
|
+
"claude-bridge",
|
|
60
|
+
paneId.replace(/[^A-Za-z0-9_-]/g, "_"),
|
|
61
|
+
);
|
|
62
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
63
|
+
const file = path.join(dir, "last-message.json");
|
|
64
|
+
const tmp = `${file}.tmp-${process.pid}`;
|
|
65
|
+
fs.writeFileSync(
|
|
66
|
+
tmp,
|
|
67
|
+
JSON.stringify({ text, session_id: input.session_id ?? null, written_at: new Date().toISOString() }),
|
|
68
|
+
);
|
|
69
|
+
fs.renameSync(tmp, file);
|
|
70
|
+
} catch {
|
|
71
|
+
// never fail the turn
|
|
72
|
+
}
|
|
73
|
+
process.exit(0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "SCRIPT=\"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\"; [ -f \"$SCRIPT\" ] || SCRIPT=\"${CLAUDE_PROJECT_DIR}/.claude/hooks/session-start.sh\"; [ -f \"$SCRIPT\" ]&& bash \"$SCRIPT\" || true"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# agent-fleet session start hook (Claude Code).
|
|
3
|
+
#
|
|
4
|
+
# Two responsibilities:
|
|
5
|
+
# 1. Inject the using-agent-skills meta-skill into the session context so
|
|
6
|
+
# Claude can route tasks to the right skill.
|
|
7
|
+
# 2. Surface a one-line "update available" banner when the installed
|
|
8
|
+
# package is behind the published version on npm.
|
|
9
|
+
#
|
|
10
|
+
# Both are best-effort. Network errors, missing files, and missing tools
|
|
11
|
+
# never block session start — the hook always exits 0 and prints a valid
|
|
12
|
+
# JSON object on stdout.
|
|
13
|
+
|
|
14
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
15
|
+
PACKAGE_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
16
|
+
SKILLS_DIR="$PACKAGE_ROOT/skills"
|
|
17
|
+
META_SKILL="$SKILLS_DIR/using-agent-skills/SKILL.md"
|
|
18
|
+
CHECK_SCRIPT="$PACKAGE_ROOT/bin/cli.js"
|
|
19
|
+
|
|
20
|
+
# ── 1. Meta-skill content ────────────────────────────────────────────────
|
|
21
|
+
if [ -f "$META_SKILL" ]; then
|
|
22
|
+
META_CONTENT=$(cat "$META_SKILL")
|
|
23
|
+
PRIORITY="IMPORTANT"
|
|
24
|
+
BASE_MESSAGE="agent-fleet loaded. Use the skill discovery flowchart to find the right skill for your task."
|
|
25
|
+
else
|
|
26
|
+
META_CONTENT=""
|
|
27
|
+
PRIORITY="INFO"
|
|
28
|
+
BASE_MESSAGE="agent-fleet: using-agent-skills meta-skill not found. Skills may still be available individually."
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# ── 2. Update banner (silent on any error) ───────────────────────────────
|
|
32
|
+
UPDATE_BANNER=""
|
|
33
|
+
if [ "$AGENT_SKILLS_NO_UPDATE_CHECK" != "1" ] \
|
|
34
|
+
&& [ "$NO_UPDATE_NOTIFIER" != "1" ] \
|
|
35
|
+
&& [ "$CI" != "true" ] \
|
|
36
|
+
&& command -v node >/dev/null 2>&1 \
|
|
37
|
+
&& [ -f "$CHECK_SCRIPT" ]; then
|
|
38
|
+
# Run with a 3-second wall-clock cap so a hung registry never stalls the
|
|
39
|
+
# session. The check-update subcommand emits the banner on stdout when an
|
|
40
|
+
# upgrade is available, nothing otherwise. Errors go to /dev/null.
|
|
41
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
42
|
+
UPDATE_BANNER=$(timeout 3 node "$CHECK_SCRIPT" check-update 2>/dev/null || true)
|
|
43
|
+
else
|
|
44
|
+
UPDATE_BANNER=$(node "$CHECK_SCRIPT" check-update 2>/dev/null || true)
|
|
45
|
+
fi
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# ── Compose the message ──────────────────────────────────────────────────
|
|
49
|
+
FULL_MESSAGE="$BASE_MESSAGE"
|
|
50
|
+
if [ -n "$UPDATE_BANNER" ]; then
|
|
51
|
+
FULL_MESSAGE=$(printf '%s\n\n%s' "$FULL_MESSAGE" "$UPDATE_BANNER")
|
|
52
|
+
fi
|
|
53
|
+
if [ -n "$META_CONTENT" ]; then
|
|
54
|
+
FULL_MESSAGE=$(printf '%s\n\n%s' "$FULL_MESSAGE" "$META_CONTENT")
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# ── Emit JSON (node handles escaping correctly) ──────────────────────────
|
|
58
|
+
if command -v node >/dev/null 2>&1; then
|
|
59
|
+
printf '%s' "$FULL_MESSAGE" | node -e '
|
|
60
|
+
let msg = "";
|
|
61
|
+
process.stdin.setEncoding("utf8");
|
|
62
|
+
process.stdin.on("data", c => { msg += c; });
|
|
63
|
+
process.stdin.on("end", () => {
|
|
64
|
+
process.stdout.write(JSON.stringify({
|
|
65
|
+
priority: process.env.PRIORITY || "INFO",
|
|
66
|
+
message: msg,
|
|
67
|
+
}) + "\n");
|
|
68
|
+
});
|
|
69
|
+
'
|
|
70
|
+
else
|
|
71
|
+
# Fallback: ship just the base message with minimal escaping.
|
|
72
|
+
SAFE_MSG=$(printf '%s' "$BASE_MESSAGE" | sed 's/\\/\\\\/g; s/"/\\"/g')
|
|
73
|
+
printf '{"priority": "%s", "message": "%s"}\n' "$PRIORITY" "$SAFE_MSG"
|
|
74
|
+
fi
|