@chankov/agent-fleet 0.0.6 → 0.0.7
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/.claude/commands/set-hermes-watchdog.md +6 -0
- package/.opencode/commands/af-set-hermes-watchdog.md +6 -0
- package/.pi/harnesses/agent-hub/README.md +75 -16
- package/.pi/harnesses/agent-hub/artifacts.js +56 -2
- package/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.pi/harnesses/agent-hub/delegate.ts +58 -9
- package/.pi/harnesses/agent-hub/drift-watchdog.js +54 -8
- package/.pi/harnesses/agent-hub/helpers.ts +34 -0
- package/.pi/harnesses/agent-hub/index.ts +723 -159
- package/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +2 -2
- package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +257 -11
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.pi/harnesses/agent-hub/return-contract.js +78 -0
- package/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.pi/harnesses/agent-hub/run-budget.js +29 -3
- package/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.pi/harnesses/agent-hub/spawn.ts +109 -1
- package/.pi/harnesses/agent-hub/spawned-peers.js +74 -0
- package/.pi/harnesses/coms/README.md +4 -3
- package/.pi/harnesses/coms/index.ts +80 -58
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.pi/harnesses/lib/herdr-client.ts +7 -2
- package/.pi/harnesses/lib/herdr-presence.ts +141 -30
- package/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
- package/.pi/harnesses/lib/hermes-monitor-registry.ts +1 -1
- package/.pi/harnesses/lib/hermes-monitor-socket.ts +47 -2
- package/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/0.0.7/.claude/commands/build.md +44 -0
- package/.versions/0.0.7/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.0.7/.claude/commands/design-agent.md +14 -0
- package/.versions/0.0.7/.claude/commands/doctor-agent-fleet.md +17 -0
- package/.versions/0.0.7/.claude/commands/orchestrate.md +112 -0
- package/.versions/0.0.7/.claude/commands/plan.md +16 -0
- package/.versions/0.0.7/.claude/commands/prime.md +22 -0
- package/.versions/0.0.7/.claude/commands/review.md +16 -0
- package/.versions/0.0.7/.claude/commands/set-hermes-telegram.md +15 -0
- package/.versions/0.0.7/.claude/commands/set-hermes-watchdog.md +6 -0
- package/.versions/0.0.7/.claude/commands/setup-agent-fleet.md +25 -0
- package/.versions/0.0.7/.claude/commands/ship.md +72 -0
- package/.versions/0.0.7/.claude/commands/spec.md +15 -0
- package/.versions/0.0.7/.claude/commands/test.md +19 -0
- package/.versions/0.0.7/.claude/commands/webperf.md +32 -0
- package/.versions/0.0.7/.claude/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.7/.opencode/commands/af-build.md +17 -0
- package/.versions/0.0.7/.opencode/commands/af-code-simplify.md +16 -0
- package/.versions/0.0.7/.opencode/commands/af-compound.md +16 -0
- package/.versions/0.0.7/.opencode/commands/af-design-agent.md +15 -0
- package/.versions/0.0.7/.opencode/commands/af-doctor-agent-fleet.md +17 -0
- package/.versions/0.0.7/.opencode/commands/af-orchestrate.md +112 -0
- package/.versions/0.0.7/.opencode/commands/af-plan.md +16 -0
- package/.versions/0.0.7/.opencode/commands/af-prime.md +22 -0
- package/.versions/0.0.7/.opencode/commands/af-review.md +15 -0
- package/.versions/0.0.7/.opencode/commands/af-set-hermes-telegram.md +15 -0
- package/.versions/0.0.7/.opencode/commands/af-set-hermes-watchdog.md +6 -0
- package/.versions/0.0.7/.opencode/commands/af-setup-agent-fleet.md +15 -0
- package/.versions/0.0.7/.opencode/commands/af-ship.md +16 -0
- package/.versions/0.0.7/.opencode/commands/af-spec.md +16 -0
- package/.versions/0.0.7/.opencode/commands/af-test.md +21 -0
- package/.versions/0.0.7/.opencode/commands/af-webperf.md +32 -0
- package/.versions/0.0.7/.opencode/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.7/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/0.0.7/.pi/agents/model-profiles.yaml +20 -0
- package/.versions/0.0.7/.pi/agents/peers.yaml +146 -0
- package/.versions/0.0.7/.pi/agents/teams.yaml +39 -0
- package/.versions/0.0.7/.pi/damage-control-rules.yaml +297 -0
- package/.versions/0.0.7/.pi/extensions/agent-fleet-update-check/README.md +58 -0
- package/.versions/0.0.7/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.versions/0.0.7/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.versions/0.0.7/.pi/extensions/btw/README.md +118 -0
- package/.versions/0.0.7/.pi/extensions/btw/index.ts +917 -0
- package/.versions/0.0.7/.pi/extensions/btw/package.json +6 -0
- package/.versions/0.0.7/.pi/extensions/btw/state.js +179 -0
- package/.versions/0.0.7/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
- package/.versions/0.0.7/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/0.0.7/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.0.7/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.0.7/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.0.7/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.0.7/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.0.7/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.0.7/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.0.7/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.0.7/.pi/extensions/package.json +9 -0
- package/.versions/0.0.7/.pi/extensions/pi-voice-stt/README.md +201 -0
- package/.versions/0.0.7/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/0.0.7/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/0.0.7/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/0.0.7/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/0.0.7/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/0.0.7/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/README.md +857 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/backend-policy.js +153 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/delegate.ts +435 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/helpers.ts +248 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/index.ts +8609 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-session-bridge.ts +257 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/return-contract.js +293 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/run-budget.js +181 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/spawn.ts +354 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/spawned-peers.js +74 -0
- package/.versions/0.0.7/.pi/harnesses/agent-hub/version.ts +18 -0
- package/.versions/0.0.7/.pi/harnesses/ask-user-remote/README.md +19 -0
- package/.versions/0.0.7/.pi/harnesses/ask-user-remote/index.ts +321 -0
- package/.versions/0.0.7/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/0.0.7/.pi/harnesses/coms/README.md +93 -0
- package/.versions/0.0.7/.pi/harnesses/coms/index.ts +1767 -0
- package/.versions/0.0.7/.pi/harnesses/coms/package.json +7 -0
- package/.versions/0.0.7/.pi/harnesses/coms/version.ts +18 -0
- package/.versions/0.0.7/.pi/harnesses/damage-control-continue/README.md +117 -0
- package/.versions/0.0.7/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/0.0.7/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/0.0.7/.pi/harnesses/damage-control-continue/version.ts +18 -0
- package/.versions/0.0.7/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/0.0.7/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/0.0.7/.pi/harnesses/lib/herdr-client.ts +463 -0
- package/.versions/0.0.7/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/0.0.7/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.0.7/.pi/harnesses/package.json +9 -0
- package/.versions/0.0.7/.pi/prompts/af-build.md +24 -0
- package/.versions/0.0.7/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/0.0.7/.pi/prompts/af-doctor-agent-fleet.md +15 -0
- package/.versions/0.0.7/.pi/prompts/af-plan.md +16 -0
- package/.versions/0.0.7/.pi/prompts/af-review.md +16 -0
- package/.versions/0.0.7/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/0.0.7/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/0.0.7/.pi/prompts/af-setup-agent-fleet.md +27 -0
- package/.versions/0.0.7/.pi/prompts/af-ship.md +17 -0
- package/.versions/0.0.7/.pi/prompts/af-spec.md +15 -0
- package/.versions/0.0.7/.pi/prompts/af-test.md +19 -0
- package/.versions/0.0.7/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/0.0.7/.version +1 -0
- package/.versions/0.0.7/agents/architect.md +23 -0
- package/.versions/0.0.7/agents/bowser.md +26 -0
- package/.versions/0.0.7/agents/builder.md +53 -0
- package/.versions/0.0.7/agents/code-reviewer.md +205 -0
- package/.versions/0.0.7/agents/deep-researcher.md +31 -0
- package/.versions/0.0.7/agents/documenter.md +18 -0
- package/.versions/0.0.7/agents/orchestrator.md +65 -0
- package/.versions/0.0.7/agents/plan-reviewer.md +60 -0
- package/.versions/0.0.7/agents/planner.md +69 -0
- package/.versions/0.0.7/agents/releaser.md +24 -0
- package/.versions/0.0.7/agents/researcher.md +28 -0
- package/.versions/0.0.7/agents/security-auditor.md +166 -0
- package/.versions/0.0.7/agents/test-engineer.md +151 -0
- package/.versions/0.0.7/agents/web-debugger.md +42 -0
- package/.versions/0.0.7/agents/web-performance-auditor.md +192 -0
- package/.versions/0.0.7/codex/CONDUCTOR.md +148 -0
- package/.versions/0.0.7/docs/ARCHITECTURE.md +262 -0
- package/.versions/0.0.7/docs/agent-fleet-setup.md +366 -0
- package/.versions/0.0.7/docs/claude-code-coms-bridge.md +109 -0
- package/.versions/0.0.7/docs/codex-remote-conductor.md +170 -0
- package/.versions/0.0.7/docs/coms-hermes-bridge.md +189 -0
- package/.versions/0.0.7/docs/getting-started.md +231 -0
- package/.versions/0.0.7/docs/npm-install.md +337 -0
- package/.versions/0.0.7/docs/opencode-setup.md +249 -0
- package/.versions/0.0.7/docs/pi-extensions.md +293 -0
- package/.versions/0.0.7/docs/pi-setup.md +476 -0
- package/.versions/0.0.7/docs/skill-anatomy.md +150 -0
- package/.versions/0.0.7/hermes/README.md +347 -0
- package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/0.0.7/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/0.0.7/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/0.0.7/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/0.0.7/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/0.0.7/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/0.0.7/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/0.0.7/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.0.7/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/0.0.7/hooks/hooks.json +14 -0
- package/.versions/0.0.7/hooks/session-start.sh +74 -0
- package/.versions/0.0.7/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.0.7/justfile +245 -0
- package/.versions/0.0.7/references/accessibility-checklist.md +160 -0
- package/.versions/0.0.7/references/definition-of-done.md +67 -0
- package/.versions/0.0.7/references/fleet-coordination-patterns.md +151 -0
- package/.versions/0.0.7/references/observability-checklist.md +91 -0
- package/.versions/0.0.7/references/orchestration-patterns.md +370 -0
- package/.versions/0.0.7/references/performance-checklist.md +153 -0
- package/.versions/0.0.7/references/prompting-patterns.md +380 -0
- package/.versions/0.0.7/references/security-checklist.md +179 -0
- package/.versions/0.0.7/references/testing-patterns.md +236 -0
- package/.versions/0.0.7/scripts/codex-conductor.ts +41 -0
- package/.versions/0.0.7/scripts/codex-remote-control.ts +167 -0
- package/.versions/0.0.7/scripts/coms-claude-bridge.ts +401 -0
- package/.versions/0.0.7/scripts/coms-cli.ts +484 -0
- package/.versions/0.0.7/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/0.0.7/scripts/fleet.ts +149 -0
- package/.versions/0.0.7/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/0.0.7/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/0.0.7/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/0.0.7/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/0.0.7/scripts/lib/claude-bridge-core.ts +165 -0
- package/.versions/0.0.7/scripts/lib/codex-conductor.ts +88 -0
- package/.versions/0.0.7/scripts/lib/codex-remote-control.ts +480 -0
- package/.versions/0.0.7/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/0.0.7/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/0.0.7/scripts/lib/fleet-command.ts +109 -0
- package/.versions/0.0.7/scripts/lib/herdr-layout.ts +263 -0
- package/.versions/0.0.7/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/0.0.7/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/0.0.7/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/0.0.7/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/0.0.7/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/0.0.7/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/0.0.7/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/0.0.7/scripts/lib/monitor-env.ts +120 -0
- package/.versions/0.0.7/scripts/lib/persona-banner.ts +62 -0
- package/.versions/0.0.7/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/0.0.7/scripts/lib/team-project.ts +191 -0
- package/.versions/0.0.7/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/0.0.7/scripts/peer-banner.ts +40 -0
- package/.versions/0.0.7/scripts/team-snapshot.ts +237 -0
- package/.versions/0.0.7/scripts/team-up.ts +360 -0
- package/.versions/0.0.7/skills/_internal/grilling.md +11 -0
- package/.versions/0.0.7/skills/browser-testing-with-devtools/SKILL.md +352 -0
- package/.versions/0.0.7/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/0.0.7/skills/compound-learning/SKILL.md +137 -0
- package/.versions/0.0.7/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.0.7/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.0.7/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.0.7/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/0.0.7/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.7/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.0.7/skills/guided-workspace-setup/SKILL.md +544 -0
- package/.versions/0.0.7/skills/guided-workspace-setup/companion-manifest.json +35 -0
- package/.versions/0.0.7/skills/idea-refine/SKILL.md +182 -0
- package/.versions/0.0.7/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.7/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.7/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.7/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.7/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/0.0.7/skills/interview-me/SKILL.md +226 -0
- package/.versions/0.0.7/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/0.0.7/skills/peer-coms/SKILL.md +90 -0
- package/.versions/0.0.7/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.7/skills/planning-and-task-breakdown/SKILL.md +236 -0
- package/.versions/0.0.7/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/0.0.7/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/0.0.7/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/0.0.7/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/0.0.7/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +134 -0
- package/README.md +175 -18
- package/agents/code-reviewer.md +2 -2
- package/agents/orchestrator.md +11 -0
- package/agents/plan-reviewer.md +1 -1
- package/agents/planner.md +1 -1
- package/agents/security-auditor.md +1 -1
- package/bin/cli.js +40 -1
- package/bin/lib/hermes-profile-artifact.js +144 -0
- package/bin/lib/set-hermes-watchdog.js +173 -0
- package/bin/set-hermes-watchdog.js +26 -0
- package/docs/ARCHITECTURE.md +64 -12
- package/docs/agent-fleet-setup.md +2 -2
- package/docs/claude-code-coms-bridge.md +7 -1
- package/docs/coms-hermes-bridge.md +10 -0
- package/docs/getting-started.md +48 -0
- package/docs/hermes-watchdog-supervisor.md +140 -0
- package/hermes/README.md +135 -19
- package/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/dist/index.js +10 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/hooks/coms-stop-hook.mjs +12 -1
- package/package.json +11 -2
- package/scripts/coms-claude-bridge.ts +154 -39
- package/scripts/fleet.ts +9 -1
- package/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/scripts/lib/claude-bridge-core.ts +65 -0
- package/scripts/lib/coms-envelope.ts +44 -1
- package/scripts/lib/hermes-monitor-events.ts +1 -0
- package/scripts/lib/monitor-env.ts +120 -0
- package/scripts/team-snapshot.ts +1 -1
- package/scripts/team-up.ts +10 -1
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +0 -15
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +0 -19
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +0 -13
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +0 -11
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +0 -9
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +0 -17
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +0 -34
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +0 -39
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +0 -12
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +0 -22
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +0 -15
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +0 -19
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +0 -13
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +0 -11
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +0 -9
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +0 -17
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +0 -34
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +0 -39
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +0 -12
- package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +0 -22
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +0 -15
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +0 -19
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +0 -13
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +0 -11
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +0 -9
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +0 -17
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +0 -34
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +0 -39
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +0 -12
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +0 -22
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import * as crypto from "node:crypto";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as net from "node:net";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
|
|
6
|
+
import type { MonitorRegistration } from "./hermes-monitor-registry.ts";
|
|
7
|
+
|
|
8
|
+
export const MAX_SOCKET_FRAME_BYTES = 64 * 1024;
|
|
9
|
+
export const MAX_SNAPSHOT_BYTES = 256 * 1024;
|
|
10
|
+
export const MAX_CANCEL_RESPONSE_BYTES = 16 * 1024;
|
|
11
|
+
export const PARTIAL_FRAME_TIMEOUT_MS = 1000;
|
|
12
|
+
export const MAX_SOCKET_CONNECTIONS = 32;
|
|
13
|
+
export const MAX_TASK_ID_LENGTH = 128;
|
|
14
|
+
export const MAX_AFTER_SEQUENCE = 1_000_000_000;
|
|
15
|
+
/** 2 MiB covers the 256 KiB retained UTF-8 output after worst-case JSON escaping plus its envelope. */
|
|
16
|
+
export const MAX_OUTPUT_RESPONSE_BYTES = 2 * 1024 * 1024;
|
|
17
|
+
export const MAX_EVENT_WAITERS = 8;
|
|
18
|
+
export const MAX_EVENT_WAIT_MS = 25_000;
|
|
19
|
+
|
|
20
|
+
interface SnapshotRequest {
|
|
21
|
+
type: "snapshot";
|
|
22
|
+
token: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function authorized(actual: string, expected: string): boolean {
|
|
26
|
+
const actualBytes = Buffer.from(actual);
|
|
27
|
+
const expectedBytes = Buffer.from(expected);
|
|
28
|
+
return actualBytes.length === expectedBytes.length && crypto.timingSafeEqual(actualBytes, expectedBytes);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function validTaskRequest(taskId: unknown, generation: unknown, afterSequence?: unknown): boolean { return typeof taskId === "string" && /^[A-Za-z0-9][A-Za-z0-9._:-]*$/.test(taskId) && taskId.length <= MAX_TASK_ID_LENGTH && Number.isInteger(generation) && (generation as number) >= 1 && (afterSequence === undefined || (Number.isInteger(afterSequence) && (afterSequence as number) >= 0 && (afterSequence as number) <= MAX_AFTER_SEQUENCE)); }
|
|
32
|
+
|
|
33
|
+
function parseRequest(frame: string): SnapshotRequest | null {
|
|
34
|
+
try {
|
|
35
|
+
const value = JSON.parse(frame) as Partial<SnapshotRequest>;
|
|
36
|
+
if (value.type !== "snapshot" || typeof value.token !== "string") return null;
|
|
37
|
+
return { type: "snapshot", token: value.token };
|
|
38
|
+
} catch {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class MonitorSocketServer {
|
|
44
|
+
private readonly registration: MonitorRegistration;
|
|
45
|
+
private readonly server: net.Server;
|
|
46
|
+
private connections = 0;
|
|
47
|
+
private eventWaiters = 0;
|
|
48
|
+
private readonly sockets = new Set<net.Socket>();
|
|
49
|
+
|
|
50
|
+
constructor(registration: MonitorRegistration) {
|
|
51
|
+
this.registration = registration;
|
|
52
|
+
// Consumers are documented to half-close after writing their single frame.
|
|
53
|
+
// Without allowHalfOpen the runtime would end our writable side on that FIN,
|
|
54
|
+
// silently dropping any response that settles later than the current turn —
|
|
55
|
+
// every long-poll `events` reply, and any cancel that waits on a real exit.
|
|
56
|
+
this.server = net.createServer({ allowHalfOpen: true }, (socket) => {
|
|
57
|
+
if (this.connections >= MAX_SOCKET_CONNECTIONS) { socket.destroy(); return; }
|
|
58
|
+
this.connections += 1;
|
|
59
|
+
this.sockets.add(socket);
|
|
60
|
+
socket.once("close", () => { this.connections -= 1; this.sockets.delete(socket); });
|
|
61
|
+
this.handle(socket);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private assertOwnedSocketPath(): void {
|
|
66
|
+
if (!this.registration.socketDir || path.resolve(this.registration.socketPath) !== path.join(path.resolve(this.registration.socketDir), "s")) throw new Error("monitor socket path is not registry-owned");
|
|
67
|
+
if (fs.lstatSync(this.registration.socketDir).isSymbolicLink() || (fs.statSync(this.registration.socketDir).mode & 0o777) !== 0o700) throw new Error("monitor socket directory is unsafe");
|
|
68
|
+
}
|
|
69
|
+
private async removeVerifiedStaleSocket(): Promise<void> {
|
|
70
|
+
this.assertOwnedSocketPath(); if (!fs.existsSync(this.registration.socketPath)) return;
|
|
71
|
+
const active=await new Promise<boolean>(resolve=>{const probe=net.createConnection(this.registration.socketPath);probe.once("connect",()=>{probe.destroy();resolve(true);});probe.once("error",()=>resolve(false));});
|
|
72
|
+
if (active) throw new Error("monitor socket is already active");
|
|
73
|
+
if (fs.lstatSync(this.registration.socketPath).isSymbolicLink()) throw new Error("monitor socket must not be a symlink"); fs.unlinkSync(this.registration.socketPath);
|
|
74
|
+
}
|
|
75
|
+
async listen(): Promise<void> {
|
|
76
|
+
await this.removeVerifiedStaleSocket(); return new Promise((resolve, reject) => { this.server.once("error", reject); this.server.listen(this.registration.socketPath, () => { this.server.off("error", reject); fs.chmodSync(this.registration.socketPath, 0o600); resolve(); }); });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async close(): Promise<void> {
|
|
80
|
+
for (const socket of this.sockets) socket.destroy();
|
|
81
|
+
await new Promise<void>((resolve, reject) => this.server.close((error) => error ? reject(error) : resolve()));
|
|
82
|
+
this.assertOwnedSocketPath(); try { fs.unlinkSync(this.registration.socketPath); } catch (error: any) { if (error?.code !== "ENOENT") throw error; }
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
mode(): number {
|
|
86
|
+
return fs.statSync(this.registration.socketPath).mode & 0o777;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private handle(socket: net.Socket): void {
|
|
90
|
+
// A long-poll callback may settle after its peer disconnects. Keep that
|
|
91
|
+
// late write local to this connection instead of emitting an unhandled error.
|
|
92
|
+
socket.on("error", () => {});
|
|
93
|
+
let buffer = "";
|
|
94
|
+
let handled = false;
|
|
95
|
+
const deadline = setTimeout(() => { if (!handled) socket.destroy(); }, PARTIAL_FRAME_TIMEOUT_MS);
|
|
96
|
+
socket.on("data", (chunk) => {
|
|
97
|
+
if (handled) return;
|
|
98
|
+
buffer += chunk.toString("utf8");
|
|
99
|
+
if (Buffer.byteLength(buffer, "utf8") > MAX_SOCKET_FRAME_BYTES) {
|
|
100
|
+
socket.destroy();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const newline = buffer.indexOf("\n");
|
|
104
|
+
if (newline < 0) return;
|
|
105
|
+
handled = true;
|
|
106
|
+
const request = parseRequest(buffer.slice(0, newline));
|
|
107
|
+
clearTimeout(deadline);
|
|
108
|
+
let value: { type?: string; token?: string; taskId?: string; generation?: number };
|
|
109
|
+
try { value = JSON.parse(buffer.slice(0, newline)) as typeof value; } catch { socket.destroy(); return; }
|
|
110
|
+
if (value.type === "events") {
|
|
111
|
+
if (!authorized(String(value.token ?? ""), this.registration.token)) { socket.end(JSON.stringify({ ok: false, error: "unauthorized" }) + "\n"); return; }
|
|
112
|
+
const afterSequence=(value as any).afterSequence, limit=(value as any).limit, waitMs=(value as any).waitMs;
|
|
113
|
+
if (!this.registration.events || !Number.isInteger(afterSequence) || afterSequence < 0 || afterSequence > MAX_AFTER_SEQUENCE || !Number.isInteger(limit) || limit < 1 || limit > 100 || !Number.isInteger(waitMs) || waitMs < 0 || waitMs > MAX_EVENT_WAIT_MS) { socket.destroy(); return; }
|
|
114
|
+
if (waitMs > 0 && this.eventWaiters >= MAX_EVENT_WAITERS) { socket.end(JSON.stringify({ ok: false, error: "too_many_waiters" }) + "\n"); return; }
|
|
115
|
+
let waiterReleased = false;
|
|
116
|
+
const releaseWaiter = () => {
|
|
117
|
+
if (waitMs > 0 && !waiterReleased) { waiterReleased = true; this.eventWaiters--; }
|
|
118
|
+
};
|
|
119
|
+
const abort = new AbortController();
|
|
120
|
+
if (waitMs > 0) {
|
|
121
|
+
this.eventWaiters++;
|
|
122
|
+
// Release on FIN as well as close: with allowHalfOpen a gone peer is
|
|
123
|
+
// otherwise indistinguishable from a live one, and a parked waiter
|
|
124
|
+
// would hold a slot for the full wait window. A client that wants to
|
|
125
|
+
// park on a long poll keeps its write side open (as the watcher does);
|
|
126
|
+
// one that half-closes gets an immediate bounded reply instead.
|
|
127
|
+
const release = () => { abort.abort(); releaseWaiter(); };
|
|
128
|
+
socket.once("close", release);
|
|
129
|
+
socket.once("end", release);
|
|
130
|
+
}
|
|
131
|
+
Promise.resolve().then(()=>this.registration.events!({afterSequence,limit,waitMs,signal:abort.signal})).then((events:any)=>{
|
|
132
|
+
if (events?.error === "cursor_too_old") socket.end(JSON.stringify({ ok: false, error: "cursor_too_old", snapshotRequired: true, firstAvailableSequence: events.firstAvailableSequence, latestSequence: events.latestSequence }) + "\n");
|
|
133
|
+
else socket.end(JSON.stringify({ok:true,events})+"\n");
|
|
134
|
+
}).catch(()=>socket.end(JSON.stringify({ok:false,error:"monitor_unavailable"})+"\n")).finally(releaseWaiter); return;
|
|
135
|
+
}
|
|
136
|
+
if (value.type === "invoke") {
|
|
137
|
+
if (!authorized(String(value.token ?? ""), this.registration.token)) { socket.end(JSON.stringify({ ok: false, error: "unauthorized" }) + "\n"); return; }
|
|
138
|
+
if (!this.registration.invoke) { socket.end(JSON.stringify({ ok: false, error: "unsupported" }) + "\n"); return; }
|
|
139
|
+
const request={...(value as any)}; delete (request as any).token; delete (request as any).type;
|
|
140
|
+
Promise.resolve().then(()=>this.registration.invoke!(request)).then(result=>socket.end(JSON.stringify({ok:true,result})+"\n")).catch(()=>socket.end(JSON.stringify({ok:false,error:"monitor_unavailable"})+"\n")); return;
|
|
141
|
+
}
|
|
142
|
+
if (value.type === "output") {
|
|
143
|
+
if (!authorized(String(value.token ?? ""), this.registration.token)) { socket.end(JSON.stringify({ ok: false, error: "unauthorized" }) + "\n"); return; }
|
|
144
|
+
if (!this.registration.output || (value as any).afterSequence === undefined || !validTaskRequest(value.taskId, value.generation, (value as any).afterSequence)) { socket.destroy(); return; }
|
|
145
|
+
Promise.resolve().then(()=>this.registration.output!({ taskId: value.taskId!, generation: value.generation!, afterSequence: (value as any).afterSequence })).then((output) => { const body=JSON.stringify({ ok:true, output }); if(Buffer.byteLength(body)>MAX_OUTPUT_RESPONSE_BYTES) socket.end(JSON.stringify({ok:false,error:"response_too_large"})+"\n"); else socket.end(body+"\n"); }).catch(()=>socket.end(JSON.stringify({ok:false,error:"monitor_unavailable"})+"\n")); return;
|
|
146
|
+
}
|
|
147
|
+
if (value.type === "cancel") {
|
|
148
|
+
if (!authorized(String(value.token ?? ""), this.registration.token)) { socket.end(JSON.stringify({ ok: false, error: "unauthorized" }) + "\n"); return; }
|
|
149
|
+
if (!this.registration.cancel || !validTaskRequest(value.taskId, value.generation)) { socket.destroy(); return; }
|
|
150
|
+
Promise.resolve().then(()=>this.registration.cancel!({ taskId: value.taskId!, generation: value.generation! })).then((result) => { const body=JSON.stringify({ ok: true, result }); if (Buffer.byteLength(body, "utf8") > MAX_CANCEL_RESPONSE_BYTES) socket.end(JSON.stringify({ok:false,error:"response_too_large"})+"\n"); else socket.end(body + "\n"); }).catch(()=>socket.end(JSON.stringify({ok:false,error:"monitor_unavailable"})+"\n")); return;
|
|
151
|
+
}
|
|
152
|
+
if (!request || !authorized(request.token, this.registration.token)) {
|
|
153
|
+
if (request) socket.end(JSON.stringify({ ok: false, error: "unauthorized" }) + "\n");
|
|
154
|
+
else socket.destroy();
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
try { const response = JSON.stringify({ ok: true, snapshot: this.registration.snapshot() }); if (Buffer.byteLength(response, "utf8") > MAX_SNAPSHOT_BYTES) socket.end(JSON.stringify({ok:false,error:"response_too_large"})+"\n"); else socket.end(response + "\n"); } catch { socket.end(JSON.stringify({ok:false,error:"monitor_unavailable"})+"\n"); }
|
|
158
|
+
});
|
|
159
|
+
socket.on("end", () => {
|
|
160
|
+
if (!handled) socket.destroy();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createChildTask, createParentTask, type CreateChildTaskInput, type CreateParentTaskInput, type MonitorTask } from "./hermes-monitor-model.ts";
|
|
2
|
+
export const MAX_OUTPUT_BYTES=256*1024;
|
|
3
|
+
export const MONITOR_RETENTION_MS=7*24*60*60*1000;
|
|
4
|
+
export const MONITOR_RETENTION_MAX=200;
|
|
5
|
+
const terminal=new Set(["completed","blocked","failed","cancelled","orphaned","done"]);
|
|
6
|
+
const active=(state:string)=>state==="starting"||state==="running"||state==="cancelling"||state==="recovering";
|
|
7
|
+
export function pruneMonitorTasks<T extends {state:string;updatedAt?:string}>(options:{now:Date;tasks:T[]}):T[]{const cutoff=options.now.getTime()-MONITOR_RETENTION_MS;const running=options.tasks.filter(t=>active(t.state));const terminalTasks=options.tasks.filter(t=>!active(t.state)&&(!t.updatedAt||new Date(t.updatedAt).getTime()>=cutoff)).sort((a,b)=>new Date(a.updatedAt??0).getTime()-new Date(b.updatedAt??0).getTime()).slice(-MONITOR_RETENTION_MAX);return [...running,...terminalTasks];}
|
|
8
|
+
export interface MonitorOutput{text:string;sequence:number;firstSequence:number;truncated:boolean}
|
|
9
|
+
interface StoredOutput{chunks:{sequence:number;text:string}[];sequence:number;truncated:boolean}
|
|
10
|
+
interface StoredTask{task:MonitorTask;output:StoredOutput;createdAt:string;updatedAt:string}
|
|
11
|
+
function suffix(text:string,limit:number){let bytes=0;const chars:string[]=[];for(const char of Array.from(text).reverse()){const size=Buffer.byteLength(char);if(bytes+size>limit)break;chars.push(char);bytes+=size;}return chars.reverse().join("");}
|
|
12
|
+
|
|
13
|
+
export class MonitorStore {
|
|
14
|
+
private readonly tasks=new Map<string,StoredTask>(); private readonly now:()=>Date;
|
|
15
|
+
constructor(options:{now?:()=>Date}={}){this.now=options.now??(()=>new Date());}
|
|
16
|
+
private key(id:string,generation:number){return `${id}:${generation}`;} private stamp(){return this.now().toISOString();}
|
|
17
|
+
createParent(input:CreateParentTaskInput){return this.add(createParentTask(input));}
|
|
18
|
+
createChild(input:CreateChildTaskInput){if(![...this.tasks.values()].some(s=>s.task.id===input.parentId&&s.task.generation===input.parentGeneration&&s.task.kind==="parent"))throw new Error(`parent task ${input.parentId} was not found`);return this.add(createChildTask(input));}
|
|
19
|
+
patch(id:string,generation:number,values:any){const stored=this.require(id,generation);Object.assign(stored.task,values);stored.updatedAt=this.stamp();return stored.task;}
|
|
20
|
+
transition(id:string,generation:number,state:any){const stored=this.require(id,generation);if(terminal.has(stored.task.state))throw new Error("terminal transition");stored.task.state=state;stored.updatedAt=this.stamp();return stored.task;}
|
|
21
|
+
get(id:string,generation?:number){return generation===undefined?[...this.tasks.values()].find(s=>s.task.id===id)?.task:this.tasks.get(this.key(id,generation))?.task;}
|
|
22
|
+
appendPublicOutput(id:string,generation:number,text:string){const stored=this.require(id,generation);if(terminal.has(stored.task.state))throw new Error("terminal output");const sequence=stored.output.sequence+1, chunk=suffix(text,MAX_OUTPUT_BYTES),chunks=[...stored.output.chunks,{sequence,text:chunk}];let bytes=chunks.reduce((n,c)=>n+Buffer.byteLength(c.text),0),truncated=stored.output.truncated||bytes<Buffer.byteLength(text);while(bytes>MAX_OUTPUT_BYTES&&chunks.length>1){bytes-=Buffer.byteLength(chunks.shift()!.text);truncated=true;}stored.output={chunks,sequence,truncated};stored.updatedAt=this.stamp();return this.outputAfter(stored.output,0);}
|
|
23
|
+
readOutput(id:string,generation:number,afterSequence:number){return this.outputAfter(this.require(id,generation).output,afterSequence);}
|
|
24
|
+
snapshot(){return {tasks:[...this.tasks.values()].map(s=>this.publicTask(s))};} durableSnapshot(){return{tasks:[...this.tasks.values()].map(s=>({...this.publicTask(s),outputChunks:s.output.chunks.map(c=>({...c}),),outputLatestSequence:s.output.sequence,outputFirstSequence:s.output.chunks[0]?.sequence??0,outputTruncated:s.output.truncated}))};} restore(rows:any[]){for(const row of rows){const key=this.key(row.id,row.generation);if(this.tasks.has(key))continue;const output=row.output??"";this.tasks.set(key,{task:{...row},output:{chunks:Array.isArray(row.outputChunks)?row.outputChunks.map((c:any)=>({sequence:c.sequence,text:c.text})):output?[{sequence:row.outputSequence??1,text:output}]:[],sequence:row.outputLatestSequence??row.outputSequence??0,truncated:row.outputTruncated??!!row.truncated},createdAt:row.createdAt??this.stamp(),updatedAt:row.updatedAt??this.stamp()});}}
|
|
25
|
+
prune(now=this.now()){const cutoff=now.getTime()-MONITOR_RETENTION_MS;const values=[...this.tasks.values()];const protectedIds=new Set<string>();for(const s of values)if(active(s.task.state)){protectedIds.add(this.key(s.task.id,s.task.generation));if(s.task.parentId)for(const p of values)if(p.task.id===s.task.parentId)protectedIds.add(this.key(p.task.id,p.task.generation));for(const c of values)if(c.task.parentId===s.task.id)protectedIds.add(this.key(c.task.id,c.task.generation));}const candidates=values.filter(s=>!active(s.task.state)&&!protectedIds.has(this.key(s.task.id,s.task.generation))).sort((a,b)=>Date.parse(a.updatedAt)-Date.parse(b.updatedAt));const expired=candidates.filter(s=>Date.parse(s.updatedAt)<cutoff);for(const s of expired)this.tasks.delete(this.key(s.task.id,s.task.generation));const remaining=[...this.tasks.values()].filter(s=>!active(s.task.state)&&!protectedIds.has(this.key(s.task.id,s.task.generation))).sort((a,b)=>Date.parse(a.updatedAt)-Date.parse(b.updatedAt));while(remaining.length>MONITOR_RETENTION_MAX){const oldest=remaining.shift()!;this.tasks.delete(this.key(oldest.task.id,oldest.task.generation));}return this.snapshot();}
|
|
26
|
+
private add(task:MonitorTask){const key=this.key(task.id,task.generation);if(this.tasks.has(key))throw new Error(`task ${task.id} generation ${task.generation} already exists`);const stamp=this.stamp();this.tasks.set(key,{task,output:{chunks:[],sequence:0,truncated:false},createdAt:stamp,updatedAt:stamp});return task;}
|
|
27
|
+
private publicTask(s:StoredTask){const output=this.outputAfter(s.output,0);return {...s.task,createdAt:s.createdAt,updatedAt:s.updatedAt,outputSequence:output.sequence,firstSequence:output.firstSequence,truncated:output.truncated};}
|
|
28
|
+
private outputAfter(output:StoredOutput,after:number):MonitorOutput{return{text:output.chunks.filter(c=>c.sequence>after).map(c=>c.text).join(""),sequence:output.sequence,firstSequence:output.chunks[0]?.sequence??0,truncated:output.truncated};}
|
|
29
|
+
private require(id:string,generation:number){const stored=this.tasks.get(this.key(id,generation));if(!stored)throw new Error(`task ${id} generation ${generation} was not found`);return stored;}
|
|
30
|
+
}
|
|
31
|
+
export function createMonitorStore(options:{now:()=>Date}){const store=new MonitorStore(options);const baseSnapshot=store.snapshot.bind(store);return Object.assign(store,{snapshot(){const all=(baseSnapshot() as any).tasks;return{tasks:all.filter((t:any)=>t.kind==='parent').map((parent:any)=>({id:parent.id,generation:parent.generation,children:all.filter((child:any)=>child.parentId===parent.id).map((child:any)=>({id:child.id,generation:child.generation,state:child.state,workspaceId:child.workspaceId,hubPaneId:child.hubPaneId,outputSequence:child.outputSequence,updatedAt:child.updatedAt}))}))};}});}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-fleet-pi-harnesses-runtime-deps",
|
|
3
|
+
"lockfileVersion": 3,
|
|
4
|
+
"requires": true,
|
|
5
|
+
"packages": {
|
|
6
|
+
"": {
|
|
7
|
+
"name": "agent-fleet-pi-harnesses-runtime-deps",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@sinclair/typebox": "^0.34.0",
|
|
10
|
+
"yaml": "^2.8.0"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"node_modules/@sinclair/typebox": {
|
|
14
|
+
"version": "0.34.49",
|
|
15
|
+
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.49.tgz",
|
|
16
|
+
"integrity": "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==",
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
},
|
|
19
|
+
"node_modules/yaml": {
|
|
20
|
+
"version": "2.9.0",
|
|
21
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz",
|
|
22
|
+
"integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"bin": {
|
|
25
|
+
"yaml": "bin.mjs"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">= 14.6"
|
|
29
|
+
},
|
|
30
|
+
"funding": {
|
|
31
|
+
"url": "https://github.com/sponsors/eemeli"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Implement the next task incrementally — build, test, verify, request review
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `incremental-implementation` and `test-driven-development` skills before proceeding.
|
|
6
|
+
|
|
7
|
+
Pick the next pending task from the plan. For each task:
|
|
8
|
+
|
|
9
|
+
1. Read the task's acceptance criteria
|
|
10
|
+
2. Load relevant context (existing code, patterns, types)
|
|
11
|
+
3. Write a failing test for the expected behavior (RED)
|
|
12
|
+
4. Implement the minimum code to pass the test (GREEN)
|
|
13
|
+
5. Run the full test suite to check for regressions
|
|
14
|
+
6. Run the build to verify compilation
|
|
15
|
+
7. Present the Standard Slice Summary and ask the user to choose between:
|
|
16
|
+
- **Approve & continue** — proceed to the next slice
|
|
17
|
+
- **Request changes** — revise within the same slice, then re-summarize and re-ask
|
|
18
|
+
- **Compact & continue** — call `request_compaction` (from the `compact-and-continue` extension) with a self-contained `continuationPrompt` describing the remaining slices and the next concrete action, then end the turn so compaction runs; pi will auto-resume from the continuation prompt
|
|
19
|
+
- **Stop here** — leave changes unstaged and end the session
|
|
20
|
+
Use the `ask_user` tool (from `pi-ask-user`) when available; otherwise ask in chat. Wait for an explicit choice — do not proceed on silence. If the `request_compaction` tool is not registered (extension not installed), omit the "Compact & continue" option.
|
|
21
|
+
8. Leave changes unstaged; the user handles staging and commits manually
|
|
22
|
+
9. Mark the task complete and move to the next one only after approval
|
|
23
|
+
|
|
24
|
+
If any step fails, load and follow the `debugging-and-error-recovery` skill.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Simplify code for clarity and maintainability — reduce complexity without changing behavior
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `code-simplification` skill before proceeding.
|
|
6
|
+
|
|
7
|
+
Simplify recently changed code (or the specified scope) while preserving exact behavior:
|
|
8
|
+
|
|
9
|
+
1. Read the repository agent guide and study project conventions
|
|
10
|
+
2. Identify the target code — recent changes unless a broader scope is specified
|
|
11
|
+
3. Understand the code's purpose, callers, edge cases, and test coverage before touching it
|
|
12
|
+
4. Scan for simplification opportunities:
|
|
13
|
+
- Deep nesting → guard clauses or extracted helpers
|
|
14
|
+
- Long functions → split by responsibility
|
|
15
|
+
- Nested ternaries → if/else or switch
|
|
16
|
+
- Generic names → descriptive names
|
|
17
|
+
- Duplicated logic → shared functions
|
|
18
|
+
- Dead code → remove after confirming
|
|
19
|
+
5. Apply each simplification incrementally — run tests after each change
|
|
20
|
+
6. Verify all tests pass, the build succeeds, and the diff is clean
|
|
21
|
+
|
|
22
|
+
If tests fail after a simplification, revert that change and reconsider. Load and follow `code-review-and-quality` to review the result.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Scan agent-fleet install targets for broken symlinks, stale persona references, and overrides-file problems, then offer repairs
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow Step 5 (Doctor preflight) of the `guided-workspace-setup` skill — without running the rest of the install flow. Use this when the user wants the repair pass on its own; the full `/af-setup-agent-fleet` flow runs the same scan automatically as soon as it detects prior install state.
|
|
6
|
+
|
|
7
|
+
Walk every install-target directory the chosen coding agent uses (`agents/`, `.claude/agents/`, `.opencode/agent/` (+ legacy `.opencode/agents/`), `.pi/agents/`, `.claude/skills/`, `.opencode/skills/`, `.pi/skills/`, `.agents/skills`, `.claude/commands/`, `.opencode/commands/`, `.pi/prompts/`, `.claude/references/`, `.claude/hooks/`). For each broken symlink, resolve where it pointed, look for a canonical replacement in the source `agents/` and `skills/` trees, and offer to repair or delete (persona links under `.claude/agents/` and `.opencode/agent(s)/` are repaired by regenerating a transformed copy via `transform-persona`, not by re-symlinking the raw source). Common stale names from the pre-merge persona layout: `reviewer` → `code-reviewer`, `red-team` → `security-auditor`.
|
|
8
|
+
|
|
9
|
+
Also flag and offer to rewrite any remaining YAML configs (`teams.yaml`, `peers.yaml`, etc.) that still reference removed persona names.
|
|
10
|
+
|
|
11
|
+
Also validate `.ai/agent-fleet-overrides.md` when it exists, against the schema in `docs/agent-fleet-setup.md`: unknown sections, unknown keys in known sections, invalid values for the mechanically parsed `agent-hub` keys, missing `rules:` folders, and `## env` `required:` names that are neither set nor declared in the root `.env`. These findings are advisory only — report them with fix "edit by hand", never edit the overrides file.
|
|
12
|
+
|
|
13
|
+
Present the findings per the skill's Step 1 interaction contract: print a short text summary (counts per kind, advisory findings as report-only text), then ask one `ask_user` multi-select — *"Which fixes should I apply now?"* — each option titled `<path> — <issue>` with the proposed fix as its description, chunked at ≤ 9 options; empty selection or cancel applies nothing. Without the widget, print a `# | Path | Issue | Suggested fix` table instead and take the picks as text.
|
|
14
|
+
|
|
15
|
+
Never overwrite a regular file — only act on symlinks whose target is missing. Report `repaired`, `deleted`, and `skipped` counts, and append a `## doctor-runs` line to `.ai/agent-fleet-setup.md` with the date, agent, phase (`standalone`), and counts.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Break work into small verifiable tasks with acceptance criteria and dependency ordering
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `planning-and-task-breakdown` skill before proceeding.
|
|
6
|
+
|
|
7
|
+
Read the existing spec (SPEC.md or equivalent) and the relevant codebase sections. Then:
|
|
8
|
+
|
|
9
|
+
1. Enter plan mode — read only, no code changes
|
|
10
|
+
2. Identify the dependency graph between components
|
|
11
|
+
3. Slice work vertically (one complete path per task, not horizontal layers)
|
|
12
|
+
4. Write tasks with acceptance criteria and verification steps
|
|
13
|
+
5. Add checkpoints between phases
|
|
14
|
+
6. Present the plan for human review
|
|
15
|
+
|
|
16
|
+
Save the plan to the location the `planning-and-task-breakdown` skill defines (default `docs/plans/{area}/PLAN-{prd-name}-{phase}.md`, with the task list embedded — no separate todo file; overridable per project via `.ai/agent-fleet-overrides.md`). Match the project's existing `docs`/`Docs` capitalization.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Conduct a five-axis code review — correctness, readability, architecture, security, performance
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `code-review-and-quality` skill before proceeding.
|
|
6
|
+
|
|
7
|
+
Review the current changes (staged or recent commits) across all five axes:
|
|
8
|
+
|
|
9
|
+
1. **Correctness** — Does it match the spec? Edge cases handled? Tests adequate?
|
|
10
|
+
2. **Readability** — Clear names? Straightforward logic? Well-organized?
|
|
11
|
+
3. **Architecture** — Follows existing patterns? Clean boundaries? Right abstraction level?
|
|
12
|
+
4. **Security** — Input validated? Secrets safe? Auth checked? Load and follow the `security-and-hardening` skill where relevant.
|
|
13
|
+
5. **Performance** — No N+1 queries? No unbounded ops? Load and follow the `performance-optimization` skill where relevant.
|
|
14
|
+
|
|
15
|
+
Categorize findings as Critical, Important, or Suggestion.
|
|
16
|
+
Output a structured review with specific file:line references and fix recommendations.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Install/status the Hermes liaison or turn its Telegram ask_user bridge on/off
|
|
3
|
+
argument-hint: "<install|status|on|off> [telegram-id] [--profile NAME] [--force] [--restart]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run the deterministic Agent Fleet controller with the arguments from `$ARGUMENTS`. Supported forms are:
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
set-hermes-telegram install [--profile NAME] [--force] [--restart]
|
|
10
|
+
set-hermes-telegram status [--profile NAME]
|
|
11
|
+
set-hermes-telegram on <telegram-id[:topic-id]> [--profile NAME]
|
|
12
|
+
set-hermes-telegram off <telegram-id[:topic-id]> [--profile NAME]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Use `node bin/cli.js set-hermes-telegram ...` when the checkout-local CLI exists; otherwise use `npx --no-install agent-fleet set-hermes-telegram ...`. Pass parsed values as separately quoted shell arguments. If neither CLI exists, report that Agent Fleet must be installed or updated. Do not reproduce installation or Herdr lifecycle with ad-hoc commands, do not bypass a `--force` refusal, and do not send a test Telegram message. Return the controller output verbatim.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Inspect or safely install the fail-closed Hermes watchdog
|
|
3
|
+
argument-hint: "<status|install|update|uninstall> [--profile NAME] [--force] [--dry-run]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Before any non-`status` write, ask the user to confirm the exact profile and whether `--force` is intended. Run only the packaged deterministic controller. It never starts, stops, restarts, or kills Hermes or a watcher; it preserves watchdog config and journals. Gate O has no genuine reviewed live proof of origin routing, so do not initiate a watch or claim delivery, out-of-turn updates, steering, or surgical recovery.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Guided setup — install agent-fleet artifacts into a workspace for a chosen coding agent
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `guided-workspace-setup` skill before proceeding.
|
|
6
|
+
|
|
7
|
+
Run the guided install for a target workspace. If the user passed a workspace path, use it; otherwise ask for it. Detect the running coding agent and confirm it with the user.
|
|
8
|
+
|
|
9
|
+
Analyse the workspace. If prior install state is found (`.ai/agent-fleet-setup.md` or a populated agent directory), run the **Doctor preflight** first (Step 5) — scan for broken symlinks and stale persona references, present findings as a table, and apply the fixes the user picks before continuing.
|
|
10
|
+
|
|
11
|
+
**Bootstrap `pi-ask-user` first (Step 5b).** Before the install menu, check whether the `pi-ask-user` interaction package is available (bundled by `@chankov/agent-fleet`, recorded as a project package, or global). If it is missing, offer to install it project-scoped (`pi install -l npm:pi-ask-user`), record it as an external/project pi package, then **stop the pass** and ask the user to reload pi and re-run `/af-setup-agent-fleet`. The tool only becomes callable after reload, and on the re-run the menu uses its native multi-select widget. Only fall back to a text menu in this pass if the user *declines* the bootstrap.
|
|
12
|
+
|
|
13
|
+
The Skills group draws from **two roots**: fleet-native `skills/` and the vendored upstream import `vendor/agent-skills-upstream/skills/` (see `docs/UPSTREAM-SKILLS.md`). On a name collision the native copy wins — never offer the vendored duplicate as a separate row.
|
|
14
|
+
|
|
15
|
+
Then present the install menu per the skill's Step 1 interaction contract — drive every decision through the `ask_user` widget, never a printed table awaiting a free-text reply (the table format is reserved for the no-widget fallback when the user declined the bootstrap). Open with the **Express question** (fresh workspace: `Recommended ★` / `Everything` / `Custom — group by group` / `Nothing`; existing: `Keep as-is` / `Apply updates` / `Keep + add recommended ★` / `Custom`) — any answer but `Custom` skips all group screens. On `Custom`, run the **7 groups** (4 shared: Skills, Agent personas, Commands/prompts, References & Hooks; 3 pi-only: pi extensions & runtime skills, pi harnesses, External pi packages): each opens as a single-select quick screen (`Recommended ★ (n)` / `Everything (m)` / `Customise` / `Skip group`, or the installed-state variants with `Remove some…`), and multi-select drill-ins appear only behind `Customise`, chunked by sub-category (lifecycle phase for Skills, `rw`/`ro`/`pi-only` for personas, harness category, …) at ≤ 9 options per call, ≤ 8 `context` lines. Option titles carry `name ★ [st]` (`ok`/`upd`/`mod`/`cflt`/`gone`/`new`/`pkg`/`—`/`brk`); descriptions carry the purpose plus the state in plain words (`mod` → warn that refreshing overwrites local edits). There is **no pre-checking** (`ask_user` has no preselect) — installed state shows as counts on quick screens and words in descriptions; leaving an installed item unselected in a drill-in keeps it as-is. Freeform stays on so `all` / `recommended` (adds `★` on top — never removes) / `none` / `keep` still work; cancel = keep-as-is/skip. `cflt` rows are resolved only by printing the three-way diff and asking per row with `displayMode: "inline"` — never by Express or `Apply updates`. The External pi packages group lists `pi-ask-user` and the optional suggested `pi-codex-image-gen`. After Step 5b, `pi-ask-user` normally counts toward `Keep as-is` (`pkg`, scope `project` / `bundled by @chankov/agent-fleet` / `global` — state it in the restate line, no duplicate entries). `pi-codex-image-gen` is not bundled or bootstrapped; offer `pi install -l npm:pi-codex-image-gen` only when the user selects it. Never offer `setup`, `doctor`, or `guided-workspace-setup` — those are installer-only and live in the source agent-fleet repo.
|
|
16
|
+
|
|
17
|
+
Removal happens **only** on an explicit `Remove some…` multi-select (empty selection = remove nothing), and it is scoped: the screen lists only items whose name is in the agent-fleet inventory **and** that are recorded in `## install-status` (or are symlinks resolving into the source repo). User-authored skills, custom commands, third-party plugins, external pi packages not recorded by this setup, and unrelated settings/env keys are left untouched and logged as "Skipped — not owned by agent-fleet".
|
|
18
|
+
|
|
19
|
+
**No cross-tool substitution.** Each row is offered only when the source file the chosen agent needs already exists — for `pi`, that means `.pi/prompts/<name>.md`, `.pi/extensions/<name>/`, etc. Never fall back to `.claude/commands/` (or another agent's tree) to satisfy a pi prompt request; items missing their per-agent source are filtered out of the menu entirely.
|
|
20
|
+
|
|
21
|
+
**Personas are generated for non-pi targets.** The personas group lists the full availability roster from `node <source-root>/bin/cli.js transform-persona --list --agent <agent>`. For `pi` the canonical `agents/<name>.md` installs as-is (copy or symlink). For `claude-code`/`opencode` the apply step runs `transform-persona --agent <agent> --workspace <workspace> <name…>` instead — always a generated copy, even in symlink mode — and records the rows with `transformed: true`; status checks diff against the generated output, not the raw source.
|
|
22
|
+
|
|
23
|
+
**pi harness companions.** Installing, refreshing, or removing any pi harness also refreshes its companions in the same pass — the `justfile` launch recipes, `scripts/team-up.ts`, the peer/team YAML and personas, `.pi/damage-control-rules.yaml`, and `.pi/harnesses/package.json`. When `agent-hub` is installed or kept, keep its required launch companions together: `damage-control-continue` and `ask-user-remote`; the managed `just hub` / `hub-solo` recipes load both before `agent-hub`, and every native child inherits continue. Treat the retired `damage-control` hard-stop directory as `gone`: remove it only when recorded and unchanged against the recorded snapshot, or when it is a symlink into the source root (including a broken retirement link); preserve every user-modified or unowned copy. Refresh the `justfile` from the **current** source so retired-harness recipes are pruned and new ones added, rewriting only the managed region between the `agent-fleet:harnesses` sentinels so any user recipes survive.
|
|
24
|
+
|
|
25
|
+
**No mid-apply overwrite prompts.** The `mod` description already warns that refreshing overwrites local edits. The user's selection is the consent; the Step 9 confirmation is the single gate. During apply, refresh selected items unconditionally — never pause to ask "should I overwrite this file?". Genuine errors (permission denied, missing source) still stop and report.
|
|
26
|
+
|
|
27
|
+
Offer override sections for the workspace's `.ai/agent-fleet-overrides.md` based on the analysis (print each draft, then `Accept` / `Edit` / `Skip` per section via `ask_user`), and record what was installed in `.ai/agent-fleet-setup.md`. Print the plan as compact action-grouped lines (Add / Refresh / Remove / Keep-count / Records / Method), then confirm with one `ask_user` single-select asked with `displayMode: "inline"` — `Apply — and remove the installer commands` (default) / `Apply — keep the installer commands` / `Adjust picks` / `Cancel` — and write nothing until an Apply is chosen. Then perform the setup, re-scan for any new breakage, and report what changed.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the pre-launch checklist and prepare for production deployment
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `shipping-and-launch` skill before proceeding.
|
|
6
|
+
|
|
7
|
+
Run through the complete pre-launch checklist:
|
|
8
|
+
|
|
9
|
+
1. **Code Quality** — Tests pass, build clean, lint clean, no TODOs, no console.logs
|
|
10
|
+
2. **Security** — npm audit clean, no secrets in code, auth in place, headers configured
|
|
11
|
+
3. **Performance** — Core Web Vitals good, no N+1 queries, images optimized, bundle sized
|
|
12
|
+
4. **Accessibility** — Keyboard nav works, screen reader compatible, contrast adequate
|
|
13
|
+
5. **Infrastructure** — Env vars set, migrations ready, monitoring configured
|
|
14
|
+
6. **Documentation** — README current, ADRs written, changelog updated
|
|
15
|
+
|
|
16
|
+
Report any failing checks and help resolve them before deployment.
|
|
17
|
+
Define the rollback plan before proceeding.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start spec-driven development — write a structured specification before writing code
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `spec-driven-development` skill before proceeding.
|
|
6
|
+
|
|
7
|
+
Begin by understanding what the user wants to build. Ask clarifying questions about:
|
|
8
|
+
1. The objective and target users
|
|
9
|
+
2. Core features and acceptance criteria
|
|
10
|
+
3. Tech stack preferences and constraints
|
|
11
|
+
4. Known boundaries (what to always do, ask first about, and never do)
|
|
12
|
+
|
|
13
|
+
Then generate a structured spec covering all six core areas: objective, commands, project structure, code style, testing strategy, and boundaries.
|
|
14
|
+
|
|
15
|
+
Save the spec to the location the `spec-driven-development` skill defines (default `docs/prds/{area}/PRD{n}-{topic}.md`; overridable per project via `.ai/agent-fleet-overrides.md`). Confirm with the user before proceeding.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run TDD workflow — write failing tests, implement, verify. For bugs, use the Prove-It pattern.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load and follow the `test-driven-development` skill before proceeding.
|
|
6
|
+
|
|
7
|
+
For new features:
|
|
8
|
+
1. Write tests that describe the expected behavior (they should FAIL)
|
|
9
|
+
2. Implement the code to make them pass
|
|
10
|
+
3. Refactor while keeping tests green
|
|
11
|
+
|
|
12
|
+
For bug fixes (Prove-It pattern):
|
|
13
|
+
1. Write a test that reproduces the bug (must FAIL)
|
|
14
|
+
2. Confirm the test fails
|
|
15
|
+
3. Implement the fix
|
|
16
|
+
4. Confirm the test passes
|
|
17
|
+
5. Run the full test suite for regressions
|
|
18
|
+
|
|
19
|
+
For browser-related issues, also load and follow the `browser-testing-with-devtools` skill and verify with Chrome DevTools MCP.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bowser
|
|
3
|
+
description: Headless browser automation using Playwright CLI. Use when you need headless browsing, parallel browser sessions, UI testing, screenshots, web scraping, or browser automation that can run in the background. Keywords - playwright, headless, browser, test, screenshot, scrape, parallel.
|
|
4
|
+
allowed-tools: Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Playwright Bowser
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Automate browsers using `playwright-cli` — a token-efficient CLI for Playwright. Runs headless by default, supports parallel sessions via named sessions (`-s=`), and doesn't load tool schemas into context.
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
This skill drives the external **Playwright Agent CLI** (`playwright-cli`). It is **not** bundled with agent-fleet — install it once before using this skill (the guided setup checks for it when `bowser` is selected).
|
|
16
|
+
|
|
17
|
+
- **Node.js 20+**
|
|
18
|
+
- **`playwright-cli`** — install globally:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g @playwright/cli@latest
|
|
22
|
+
playwright-cli --help # verify it responds
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Or run ad-hoc without a global install via `npx playwright-cli <command>`.
|
|
26
|
+
|
|
27
|
+
Browsers are downloaded automatically on first use; to pre-install explicitly:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
playwright-cli install-browser # default (chromium)
|
|
31
|
+
playwright-cli install-browser firefox # a specific browser
|
|
32
|
+
playwright-cli install-browser --with-deps # include system dependencies
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Full install docs: <https://playwright.dev/agent-cli/installation>
|
|
36
|
+
|
|
37
|
+
## When to use this vs Chrome DevTools MCP
|
|
38
|
+
|
|
39
|
+
This skill (`playwright-cli`) and the `chrome-devtools-mcp` pi extension are **complementary**, not redundant — they differ by tool model, not just headless-vs-headful (both can do either):
|
|
40
|
+
|
|
41
|
+
- **`bowser` / `playwright-cli` (this skill)** — CLI-driven, headless-first, parallel named sessions, token-efficient (no tool schemas in context). It needs only Bash, so it works as a **dispatched subagent** under `--no-extensions`. Use it for automated, parallel, or background runtime-UI evidence and scraping.
|
|
42
|
+
- **`web-debugger` / `chrome-devtools-mcp`** — live `chrome_devtools__*` tools (DOM/console/network/performance traces) for **interactive headful** debugging with a human in the loop. Those tools come from an always-on extension, so they are reachable in the main session or a **coms peer**, not a `--no-extensions` subagent. Use it to *understand* a failure in a running dev app.
|
|
43
|
+
|
|
44
|
+
## Key Details
|
|
45
|
+
|
|
46
|
+
- **Headless by default** — pass `--headed` to `open` to see the browser
|
|
47
|
+
- **Parallel sessions** — use `-s=<name>` to run multiple independent browser instances
|
|
48
|
+
- **Persistent profiles** — cookies and storage state preserved between calls
|
|
49
|
+
- **Token-efficient** — CLI-based, no accessibility trees or tool schemas in context
|
|
50
|
+
- **Vision mode** (opt-in) — set `PLAYWRIGHT_MCP_CAPS=vision` to receive screenshots as image responses in context instead of just saving to disk
|
|
51
|
+
|
|
52
|
+
## Sessions
|
|
53
|
+
|
|
54
|
+
**Always use a named session.** Derive a short, descriptive kebab-case name from the user's prompt. This gives each task a persistent browser profile (cookies, localStorage, history) that accumulates across calls.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Derive session name from prompt context:
|
|
58
|
+
# "test the checkout flow on mystore.com" → -s=mystore-checkout
|
|
59
|
+
# "scrape pricing from competitor.com" → -s=competitor-pricing
|
|
60
|
+
# "UI test the login page" → -s=login-ui-test
|
|
61
|
+
|
|
62
|
+
playwright-cli -s=mystore-checkout open https://mystore.com --persistent
|
|
63
|
+
playwright-cli -s=mystore-checkout snapshot
|
|
64
|
+
playwright-cli -s=mystore-checkout click e12
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Managing sessions:
|
|
68
|
+
```bash
|
|
69
|
+
playwright-cli list # list all sessions
|
|
70
|
+
playwright-cli close-all # close all sessions
|
|
71
|
+
playwright-cli -s=<name> close # close specific session
|
|
72
|
+
playwright-cli -s=<name> delete-data # wipe session profile
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick Reference
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Core: open [url], goto <url>, click <ref>, fill <ref> <text>, type <text>, snapshot, screenshot [ref], close
|
|
79
|
+
Navigate: go-back, go-forward, reload
|
|
80
|
+
Keyboard: press <key>, keydown <key>, keyup <key>
|
|
81
|
+
Mouse: mousemove <x> <y>, mousedown, mouseup, mousewheel <dx> <dy>
|
|
82
|
+
Tabs: tab-list, tab-new [url], tab-close [index], tab-select <index>
|
|
83
|
+
Save: screenshot [ref], pdf, screenshot --filename=f
|
|
84
|
+
Storage: state-save, state-load, cookie-*, localstorage-*, sessionstorage-*
|
|
85
|
+
Network: route <pattern>, route-list, unroute, network
|
|
86
|
+
DevTools: console, run-code <code>, tracing-start/stop, video-start/stop
|
|
87
|
+
Sessions: -s=<name> <cmd>, list, close-all, kill-all
|
|
88
|
+
Config: open --headed, open --browser=chrome, resize <w> <h>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Workflow
|
|
92
|
+
|
|
93
|
+
1. Derive a session name from the user's prompt and open with `--persistent` to preserve cookies/state. Always set the viewport via env var at launch:
|
|
94
|
+
```bash
|
|
95
|
+
PLAYWRIGHT_MCP_VIEWPORT_SIZE=1440x900 playwright-cli -s=<session-name> open <url> --persistent
|
|
96
|
+
# or headed:
|
|
97
|
+
PLAYWRIGHT_MCP_VIEWPORT_SIZE=1440x900 playwright-cli -s=<session-name> open <url> --persistent --headed
|
|
98
|
+
# or with vision (screenshots returned as image responses in context):
|
|
99
|
+
PLAYWRIGHT_MCP_VIEWPORT_SIZE=1440x900 PLAYWRIGHT_MCP_CAPS=vision playwright-cli -s=<session-name> open <url> --persistent
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
2. Get element references via snapshot:
|
|
103
|
+
```bash
|
|
104
|
+
playwright-cli snapshot
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
3. Interact using refs from snapshot:
|
|
108
|
+
```bash
|
|
109
|
+
playwright-cli click <ref>
|
|
110
|
+
playwright-cli fill <ref> "text"
|
|
111
|
+
playwright-cli type "text"
|
|
112
|
+
playwright-cli press Enter
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
4. Capture results:
|
|
116
|
+
```bash
|
|
117
|
+
playwright-cli screenshot
|
|
118
|
+
playwright-cli screenshot --filename=output.png
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
5. **Always close the session when done.** This is not optional — close the named session after finishing your task:
|
|
122
|
+
```bash
|
|
123
|
+
playwright-cli -s=<session-name> close
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Configuration
|
|
127
|
+
|
|
128
|
+
If a `playwright-cli.json` exists in the working directory, use it automatically. If the user provides a path to a config file, use `--config path/to/config.json`. Otherwise, skip configuration — the env var and CLI defaults are sufficient.
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"browser": {
|
|
133
|
+
"browserName": "chromium",
|
|
134
|
+
"launchOptions": { "headless": true },
|
|
135
|
+
"contextOptions": { "viewport": { "width": 1440, "height": 900 } }
|
|
136
|
+
},
|
|
137
|
+
"outputDir": "./screenshots"
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Full Help
|
|
142
|
+
|
|
143
|
+
Run `playwright-cli --help` or `playwright-cli --help <command>` for detailed command usage.
|
|
144
|
+
|
|
145
|
+
See the [Playwright Agent CLI docs](https://playwright.dev/agent-cli/installation) for full documentation.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.7
|