@chankov/agent-fleet 0.0.2 → 0.0.4
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/doctor-agent-fleet.md +1 -1
- package/.claude/commands/setup-agent-fleet.md +5 -5
- package/.opencode/commands/af-doctor-agent-fleet.md +2 -0
- package/.opencode/commands/af-setup-agent-fleet.md +1 -1
- package/.pi/agents/peers.yaml +4 -0
- package/.pi/agents/teams.yaml +2 -2
- package/.pi/harnesses/agent-hub/README.md +254 -18
- package/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.pi/harnesses/agent-hub/delegate.ts +32 -9
- package/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
- package/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.pi/harnesses/agent-hub/helpers.ts +49 -0
- package/.pi/harnesses/agent-hub/index.ts +1269 -322
- package/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
- package/.pi/harnesses/agent-hub/package.json +5 -4
- package/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.pi/harnesses/agent-hub/run-budget.js +155 -0
- package/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.pi/harnesses/agent-hub/spawn.ts +161 -94
- package/.pi/harnesses/agent-hub/version.ts +18 -0
- package/.pi/harnesses/ask-user-remote/README.md +2 -0
- package/.pi/harnesses/coms/README.md +21 -0
- package/.pi/harnesses/coms/index.ts +2 -0
- package/.pi/harnesses/coms/package.json +5 -4
- package/.pi/harnesses/coms/version.ts +18 -0
- package/.pi/harnesses/damage-control-continue/README.md +32 -31
- package/.pi/harnesses/damage-control-continue/index.ts +23 -9
- package/.pi/harnesses/damage-control-continue/package.json +5 -4
- package/.pi/harnesses/damage-control-continue/version.ts +18 -0
- package/.pi/harnesses/{damage-control/shared.ts → lib/damage-control-shared.ts} +20 -6
- package/.pi/prompts/doctor-agent-fleet.md +1 -1
- package/.pi/prompts/setup-agent-fleet.md +5 -5
- package/.versions/0.0.4/.claude/commands/build.md +44 -0
- package/.versions/0.0.4/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.0.4/.claude/commands/design-agent.md +14 -0
- package/.versions/0.0.4/.claude/commands/doctor-agent-fleet.md +17 -0
- package/.versions/0.0.4/.claude/commands/orchestrate.md +112 -0
- package/.versions/0.0.4/.claude/commands/plan.md +16 -0
- package/.versions/0.0.4/.claude/commands/prime.md +22 -0
- package/.versions/0.0.4/.claude/commands/review.md +16 -0
- package/.versions/0.0.4/.claude/commands/setup-agent-fleet.md +25 -0
- package/.versions/0.0.4/.claude/commands/ship.md +72 -0
- package/.versions/0.0.4/.claude/commands/spec.md +15 -0
- package/.versions/0.0.4/.claude/commands/test.md +19 -0
- package/.versions/0.0.4/.claude/commands/webperf.md +32 -0
- package/.versions/0.0.4/.claude/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.4/.opencode/commands/af-build.md +17 -0
- package/.versions/0.0.4/.opencode/commands/af-code-simplify.md +16 -0
- package/.versions/0.0.4/.opencode/commands/af-compound.md +16 -0
- package/.versions/0.0.4/.opencode/commands/af-design-agent.md +15 -0
- package/.versions/0.0.4/.opencode/commands/af-doctor-agent-fleet.md +17 -0
- package/.versions/0.0.4/.opencode/commands/af-orchestrate.md +112 -0
- package/.versions/0.0.4/.opencode/commands/af-plan.md +16 -0
- package/.versions/0.0.4/.opencode/commands/af-prime.md +22 -0
- package/.versions/0.0.4/.opencode/commands/af-review.md +15 -0
- package/.versions/0.0.4/.opencode/commands/af-setup-agent-fleet.md +15 -0
- package/.versions/0.0.4/.opencode/commands/af-ship.md +16 -0
- package/.versions/0.0.4/.opencode/commands/af-spec.md +16 -0
- package/.versions/0.0.4/.opencode/commands/af-test.md +21 -0
- package/.versions/0.0.4/.opencode/commands/af-webperf.md +32 -0
- package/.versions/0.0.4/.opencode/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.4/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/0.0.4/.pi/agents/model-profiles.yaml +20 -0
- package/.versions/0.0.4/.pi/agents/peers.yaml +146 -0
- package/.versions/0.0.4/.pi/agents/teams.yaml +39 -0
- package/.versions/0.0.4/.pi/damage-control-rules.yaml +297 -0
- package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/README.md +58 -0
- package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/{.pi/harnesses/damage-control → .versions/0.0.4/.pi/extensions/agent-fleet-update-check}/package.json +1 -1
- package/.versions/0.0.4/.pi/extensions/btw/README.md +118 -0
- package/.versions/0.0.4/.pi/extensions/btw/index.ts +917 -0
- package/.versions/0.0.4/.pi/extensions/btw/package.json +6 -0
- package/.versions/0.0.4/.pi/extensions/btw/state.js +179 -0
- package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
- package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
- package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.0.4/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.0.4/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.0.4/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.0.4/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.0.4/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.0.4/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.0.4/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.0.4/.pi/extensions/package.json +9 -0
- package/.versions/0.0.4/.pi/extensions/pi-voice-stt/README.md +201 -0
- package/.versions/0.0.4/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/0.0.4/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/0.0.4/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/0.0.4/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/0.0.4/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/0.0.4/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/README.md +798 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/artifacts.js +92 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/backend-policy.js +153 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/delegate.ts +386 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/helpers.ts +214 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/index.ts +8045 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/return-contract.js +215 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/run-budget.js +155 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/spawn.ts +246 -0
- package/.versions/0.0.4/.pi/harnesses/agent-hub/version.ts +18 -0
- package/.versions/0.0.4/.pi/harnesses/ask-user-remote/README.md +18 -0
- package/.versions/0.0.4/.pi/harnesses/ask-user-remote/index.ts +293 -0
- package/.versions/0.0.4/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/0.0.4/.pi/harnesses/coms/README.md +92 -0
- package/.versions/0.0.4/.pi/harnesses/coms/index.ts +1745 -0
- package/.versions/0.0.4/.pi/harnesses/coms/package.json +7 -0
- package/.versions/0.0.4/.pi/harnesses/coms/version.ts +18 -0
- package/.versions/0.0.4/.pi/harnesses/damage-control-continue/README.md +117 -0
- package/.versions/0.0.4/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/0.0.4/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/0.0.4/.pi/harnesses/damage-control-continue/version.ts +18 -0
- package/.versions/0.0.4/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/0.0.4/.pi/harnesses/lib/herdr-client.ts +458 -0
- package/.versions/0.0.4/.pi/harnesses/lib/herdr-presence.ts +288 -0
- package/.versions/0.0.4/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.0.4/.pi/harnesses/package.json +9 -0
- package/.versions/0.0.4/.pi/prompts/build.md +24 -0
- package/.versions/0.0.4/.pi/prompts/code-simplify.md +22 -0
- package/.versions/0.0.4/.pi/prompts/doctor-agent-fleet.md +15 -0
- package/.versions/0.0.4/.pi/prompts/plan.md +16 -0
- package/.versions/0.0.4/.pi/prompts/review.md +16 -0
- package/.versions/0.0.4/.pi/prompts/setup-agent-fleet.md +27 -0
- package/.versions/0.0.4/.pi/prompts/ship.md +17 -0
- package/.versions/0.0.4/.pi/prompts/spec.md +15 -0
- package/.versions/0.0.4/.pi/prompts/test.md +19 -0
- package/.versions/0.0.4/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/0.0.4/.version +1 -0
- package/.versions/0.0.4/agents/architect.md +23 -0
- package/.versions/0.0.4/agents/bowser.md +26 -0
- package/.versions/0.0.4/agents/builder.md +53 -0
- package/.versions/0.0.4/agents/code-reviewer.md +205 -0
- package/.versions/0.0.4/agents/deep-researcher.md +31 -0
- package/.versions/0.0.4/agents/documenter.md +18 -0
- package/.versions/0.0.4/agents/orchestrator.md +54 -0
- package/.versions/0.0.4/agents/plan-reviewer.md +60 -0
- package/.versions/0.0.4/agents/planner.md +69 -0
- package/.versions/0.0.4/agents/releaser.md +24 -0
- package/.versions/0.0.4/agents/researcher.md +28 -0
- package/.versions/0.0.4/agents/security-auditor.md +166 -0
- package/.versions/0.0.4/agents/test-engineer.md +151 -0
- package/.versions/0.0.4/agents/web-debugger.md +42 -0
- package/.versions/0.0.4/agents/web-performance-auditor.md +192 -0
- package/.versions/0.0.4/codex/CONDUCTOR.md +148 -0
- package/.versions/0.0.4/docs/ARCHITECTURE.md +210 -0
- package/.versions/0.0.4/docs/agent-fleet-setup.md +366 -0
- package/.versions/0.0.4/docs/claude-code-coms-bridge.md +103 -0
- package/.versions/0.0.4/docs/codex-remote-conductor.md +170 -0
- package/.versions/0.0.4/docs/coms-hermes-bridge.md +121 -0
- package/.versions/0.0.4/docs/getting-started.md +183 -0
- package/.versions/0.0.4/docs/npm-install.md +337 -0
- package/.versions/0.0.4/docs/opencode-setup.md +248 -0
- package/.versions/0.0.4/docs/pi-extensions.md +288 -0
- package/.versions/0.0.4/docs/pi-setup.md +463 -0
- package/.versions/0.0.4/docs/skill-anatomy.md +150 -0
- package/.versions/0.0.4/hermes/README.md +228 -0
- package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
- package/.versions/0.0.4/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/0.0.4/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/0.0.4/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.0.4/hooks/coms-stop-hook.mjs +73 -0
- package/.versions/0.0.4/hooks/hooks.json +14 -0
- package/.versions/0.0.4/hooks/session-start.sh +74 -0
- package/.versions/0.0.4/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.0.4/justfile +256 -0
- package/.versions/0.0.4/references/accessibility-checklist.md +160 -0
- package/.versions/0.0.4/references/definition-of-done.md +67 -0
- package/.versions/0.0.4/references/fleet-coordination-patterns.md +151 -0
- package/.versions/0.0.4/references/observability-checklist.md +91 -0
- package/.versions/0.0.4/references/orchestration-patterns.md +370 -0
- package/.versions/0.0.4/references/performance-checklist.md +153 -0
- package/.versions/0.0.4/references/prompting-patterns.md +380 -0
- package/.versions/0.0.4/references/security-checklist.md +179 -0
- package/.versions/0.0.4/references/testing-patterns.md +236 -0
- package/.versions/0.0.4/scripts/codex-conductor.ts +41 -0
- package/.versions/0.0.4/scripts/codex-remote-control.ts +167 -0
- package/.versions/0.0.4/scripts/coms-claude-bridge.ts +286 -0
- package/.versions/0.0.4/scripts/coms-cli.ts +484 -0
- package/.versions/0.0.4/scripts/coms-hermes-bridge.ts +403 -0
- package/.versions/0.0.4/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/0.0.4/scripts/hermes-monitor-scenario.ts +7 -0
- package/.versions/0.0.4/scripts/lib/claude-bridge-core.ts +100 -0
- package/.versions/0.0.4/scripts/lib/codex-conductor.ts +88 -0
- package/.versions/0.0.4/scripts/lib/codex-remote-control.ts +480 -0
- package/.versions/0.0.4/scripts/lib/coms-envelope.ts +539 -0
- package/.versions/0.0.4/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/0.0.4/scripts/lib/herdr-layout.ts +263 -0
- package/.versions/0.0.4/scripts/lib/hermes-bridge-core.ts +238 -0
- package/.versions/0.0.4/scripts/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/0.0.4/scripts/lib/hermes-monitor-model.ts +9 -0
- package/.versions/0.0.4/scripts/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/0.0.4/scripts/lib/hermes-monitor-socket.ts +118 -0
- package/.versions/0.0.4/scripts/lib/hermes-monitor-store.ts +31 -0
- package/.versions/0.0.4/scripts/lib/persona-banner.ts +62 -0
- package/.versions/0.0.4/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/0.0.4/scripts/lib/team-project.ts +184 -0
- package/.versions/0.0.4/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/0.0.4/scripts/peer-banner.ts +40 -0
- package/.versions/0.0.4/scripts/team-snapshot.ts +238 -0
- package/.versions/0.0.4/scripts/team-up.ts +333 -0
- package/.versions/0.0.4/skills/_internal/grilling.md +11 -0
- package/.versions/0.0.4/skills/browser-testing-with-devtools/SKILL.md +352 -0
- package/.versions/0.0.4/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/0.0.4/skills/compound-learning/SKILL.md +137 -0
- package/.versions/0.0.4/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.0.4/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.0.4/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.0.4/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/0.0.4/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.4/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.0.4/skills/guided-workspace-setup/SKILL.md +535 -0
- package/.versions/0.0.4/skills/guided-workspace-setup/companion-manifest.json +33 -0
- package/.versions/0.0.4/skills/idea-refine/SKILL.md +182 -0
- package/.versions/0.0.4/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.4/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.4/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.4/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.4/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/0.0.4/skills/interview-me/SKILL.md +226 -0
- package/.versions/0.0.4/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/0.0.4/skills/peer-coms/SKILL.md +90 -0
- package/.versions/0.0.4/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.4/skills/planning-and-task-breakdown/SKILL.md +236 -0
- package/.versions/0.0.4/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/0.0.4/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/0.0.4/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/0.0.4/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/0.0.4/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +53 -0
- package/README.md +103 -541
- package/agents/architect.md +1 -1
- package/agents/builder.md +1 -1
- package/agents/code-reviewer.md +1 -1
- package/agents/deep-researcher.md +3 -3
- package/agents/orchestrator.md +20 -11
- package/agents/plan-reviewer.md +3 -3
- package/agents/planner.md +1 -1
- package/agents/security-auditor.md +1 -1
- package/agents/test-engineer.md +11 -4
- package/bin/lib/validate-overrides.js +19 -0
- package/bin/snapshot-version.js +17 -1
- package/bin/sync-harness-versions.js +94 -0
- package/codex/CONDUCTOR.md +148 -0
- package/docs/ARCHITECTURE.md +210 -0
- package/docs/agent-fleet-setup.md +11 -0
- package/docs/claude-code-coms-bridge.md +10 -0
- package/docs/codex-remote-conductor.md +170 -0
- package/docs/coms-hermes-bridge.md +121 -0
- package/docs/getting-started.md +14 -0
- package/docs/npm-install.md +2 -0
- package/docs/pi-extensions.md +49 -14
- package/docs/pi-setup.md +12 -4
- package/hermes/README.md +228 -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-monitor/dashboard/adapter-cap.test.py +15 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -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-validation.test.py +12 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
- package/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/justfile +106 -23
- package/package.json +17 -5
- package/scripts/codex-conductor.ts +41 -0
- package/scripts/codex-remote-control.ts +167 -0
- package/scripts/coms-cli.ts +311 -199
- package/scripts/coms-hermes-bridge.ts +2 -2
- package/scripts/lib/codex-conductor.ts +88 -0
- package/scripts/lib/codex-remote-control.ts +480 -0
- package/scripts/lib/coms-envelope.ts +51 -6
- package/scripts/lib/fake-herdr-server.ts +88 -0
- package/scripts/lib/herdr-layout.ts +18 -3
- package/scripts/lib/hermes-bridge-core.ts +4 -4
- package/scripts/lib/hermes-monitor-herdr.ts +28 -0
- package/scripts/lib/hermes-monitor-model.ts +9 -0
- package/scripts/lib/hermes-monitor-registry.ts +6 -0
- package/scripts/lib/hermes-monitor-socket.ts +118 -0
- package/scripts/lib/hermes-monitor-store.ts +31 -0
- package/scripts/lib/team-project.ts +85 -1
- package/scripts/team-up.ts +77 -18
- package/skills/designing-agents/SKILL.md +2 -2
- package/skills/designing-agents/pi-harness-authoring.md +26 -13
- package/skills/guided-workspace-setup/SKILL.md +131 -102
- package/skills/guided-workspace-setup/companion-manifest.json +33 -0
- package/skills/peer-coms/SKILL.md +9 -0
- package/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.pi/harnesses/damage-control/README.md +0 -65
- package/.pi/harnesses/damage-control/index.ts +0 -250
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"""Agent Fleet-owned, local-only monitor transport boundary.
|
|
2
|
+
|
|
3
|
+
Hermes supplies the FastAPI router; this adapter speaks only the source-owned
|
|
4
|
+
monitor UDS protocol and never controls Hermes, Pi, or Herdr lifecycle.
|
|
5
|
+
"""
|
|
6
|
+
import hashlib
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
9
|
+
import re
|
|
10
|
+
import socket
|
|
11
|
+
import stat
|
|
12
|
+
from datetime import datetime, timezone
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
MAX_SNAPSHOT_RESPONSE_BYTES = 256 * 1024
|
|
16
|
+
MAX_CANCEL_RESPONSE_BYTES = 16 * 1024
|
|
17
|
+
MAX_OUTPUT_RESPONSE_BYTES = 2 * 1024 * 1024
|
|
18
|
+
|
|
19
|
+
class MonitorUnavailable(RuntimeError): pass
|
|
20
|
+
|
|
21
|
+
class MonitorAdapter:
|
|
22
|
+
def __init__(self, socket_path: str, token: str) -> None:
|
|
23
|
+
if not socket_path or not token or not os.path.isabs(socket_path):
|
|
24
|
+
raise MonitorUnavailable("local monitor configuration is unavailable")
|
|
25
|
+
self._socket_path, self._token = socket_path, token
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def from_environment(cls, env: dict[str, str] | None = None) -> "MonitorAdapter":
|
|
29
|
+
values = os.environ if env is None else env
|
|
30
|
+
return cls(values.get("AGENT_FLEET_MONITOR_SOCKET", ""), values.get("AGENT_FLEET_MONITOR_TOKEN", ""))
|
|
31
|
+
|
|
32
|
+
@staticmethod
|
|
33
|
+
def canonical_profile_id(profile_id: str) -> str:
|
|
34
|
+
# Matches Node's conservative human profile-ID validation and namespace hash.
|
|
35
|
+
if not isinstance(profile_id, str) or not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]{0,127}", profile_id) or ".." in profile_id:
|
|
36
|
+
raise MonitorUnavailable("monitor profile discovery is unavailable")
|
|
37
|
+
return hashlib.sha256(profile_id.encode()).hexdigest()
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_profile_environment(cls, env: dict[str, str] | None = None) -> "MonitorAdapter":
|
|
41
|
+
values = os.environ if env is None else env
|
|
42
|
+
profile_id, runtime = values.get("AGENT_FLEET_PROFILE_ID", ""), values.get("AGENT_FLEET_MONITOR_RUNTIME_DIR", "")
|
|
43
|
+
if not os.path.isabs(runtime):
|
|
44
|
+
raise MonitorUnavailable("monitor profile discovery is unavailable")
|
|
45
|
+
profile_id = cls.canonical_profile_id(profile_id)
|
|
46
|
+
try:
|
|
47
|
+
root = Path(runtime)
|
|
48
|
+
if root.is_symlink() or not root.is_dir() or stat.S_IMODE(root.stat().st_mode) != 0o700: raise ValueError()
|
|
49
|
+
candidates = []
|
|
50
|
+
for candidate in (root / profile_id).glob("*/discovery-*.json"):
|
|
51
|
+
try:
|
|
52
|
+
candidate_stat = candidate.lstat()
|
|
53
|
+
if candidate.is_symlink() or not stat.S_ISREG(candidate_stat.st_mode) or stat.S_IMODE(candidate_stat.st_mode) != 0o600: raise ValueError()
|
|
54
|
+
item = json.loads(candidate.read_text())
|
|
55
|
+
lease = item["lease"]
|
|
56
|
+
if not isinstance(lease, dict) or not isinstance(item.get("owner"), str) or not re.fullmatch(r"[0-9a-f-]{36}", item["owner"], re.I) or not isinstance(item.get("token"), str) or not re.fullmatch(r"token-[0-9a-f-]{36}", item["token"], re.I) or not isinstance(item.get("socket"), str) or not re.fullmatch(r"@runtime/s/[0-9a-f]+/s", item["socket"]) or not isinstance(lease.get("hub"), str) or not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]{0,127}", lease["hub"]) or type(lease.get("pid")) is not int or lease["pid"] < 1 or not isinstance(lease.get("startedAt"), str) or not isinstance(lease.get("expiresAt"), str): raise ValueError()
|
|
57
|
+
expected_token = f"token-{item['owner']}"
|
|
58
|
+
hub_hash = hashlib.sha256(lease['hub'].encode()).hexdigest()
|
|
59
|
+
expected_socket = "@runtime/s/" + hashlib.sha256(f"{profile_id}:{hub_hash}:{item['owner']}".encode()).hexdigest()[:32] + "/s"
|
|
60
|
+
if item['token'] != expected_token or item['socket'] != expected_socket: raise ValueError()
|
|
61
|
+
if datetime.fromisoformat(lease["expiresAt"].replace("Z", "+00:00")) <= datetime.now(timezone.utc):
|
|
62
|
+
token = item.get("token", "")
|
|
63
|
+
if isinstance(token, str) and token.startswith("token-") and "/" not in token: (candidate.parent / token).unlink(missing_ok=True)
|
|
64
|
+
candidate.unlink(missing_ok=True)
|
|
65
|
+
continue
|
|
66
|
+
candidates.append(candidate)
|
|
67
|
+
except (OSError, ValueError, KeyError, TypeError, json.JSONDecodeError) as error:
|
|
68
|
+
raise ValueError("monitor discovery metadata is malformed") from error
|
|
69
|
+
if not candidates: raise ValueError()
|
|
70
|
+
adapters = []
|
|
71
|
+
for discovery_path in candidates:
|
|
72
|
+
discovery = json.loads(discovery_path.read_text())
|
|
73
|
+
lease = discovery["lease"]
|
|
74
|
+
socket_ref, token_ref = discovery["socket"], discovery["token"]
|
|
75
|
+
if not isinstance(socket_ref, str) or not socket_ref.startswith("@runtime/") or ".." in Path(socket_ref).parts: raise ValueError()
|
|
76
|
+
if not isinstance(token_ref, str) or not token_ref.startswith("token-") or "/" in token_ref or ".." in token_ref: raise ValueError()
|
|
77
|
+
token_path = discovery_path.parent / token_ref
|
|
78
|
+
if token_path.is_symlink() or stat.S_IMODE(token_path.stat().st_mode) != 0o600: raise ValueError()
|
|
79
|
+
adapters.append((lease["hub"], cls(str(root / socket_ref.removeprefix("@runtime/")), token_path.read_text().strip())))
|
|
80
|
+
return FleetMonitorAdapter(adapters)
|
|
81
|
+
discovery_path = candidates[0]
|
|
82
|
+
if discovery_path.is_symlink() or stat.S_IMODE(discovery_path.stat().st_mode) != 0o600: raise ValueError()
|
|
83
|
+
discovery = json.loads(discovery_path.read_text())
|
|
84
|
+
lease = discovery["lease"]
|
|
85
|
+
if not isinstance(lease, dict) or datetime.fromisoformat(lease["expiresAt"].replace("Z", "+00:00")) <= datetime.now(timezone.utc): raise ValueError()
|
|
86
|
+
socket_ref, token_ref = discovery["socket"], discovery["token"]
|
|
87
|
+
if not isinstance(socket_ref, str) or not socket_ref.startswith("@runtime/") or ".." in Path(socket_ref).parts: raise ValueError()
|
|
88
|
+
if not isinstance(token_ref, str) or not token_ref.startswith("token-") or "/" in token_ref or ".." in token_ref: raise ValueError()
|
|
89
|
+
socket_path = root / socket_ref.removeprefix("@runtime/")
|
|
90
|
+
token_path = discovery_path.parent / token_ref
|
|
91
|
+
if token_path.is_symlink() or stat.S_IMODE(token_path.stat().st_mode) != 0o600: raise ValueError()
|
|
92
|
+
return cls(str(socket_path), token_path.read_text().strip())
|
|
93
|
+
except (OSError, ValueError, KeyError, TypeError, json.JSONDecodeError) as error:
|
|
94
|
+
raise MonitorUnavailable("monitor profile discovery is unavailable") from error
|
|
95
|
+
|
|
96
|
+
def _request(self, request: dict, max_response_bytes: int = MAX_SNAPSHOT_RESPONSE_BYTES) -> dict:
|
|
97
|
+
try:
|
|
98
|
+
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as client:
|
|
99
|
+
client.settimeout(2); client.connect(self._socket_path)
|
|
100
|
+
client.sendall((json.dumps({**request, "token": self._token})+"\n").encode())
|
|
101
|
+
data = b""
|
|
102
|
+
while b"\n" not in data:
|
|
103
|
+
chunk = client.recv(min(8192, max_response_bytes + 1 - len(data)))
|
|
104
|
+
if not chunk: raise MonitorUnavailable("local monitor closed the response")
|
|
105
|
+
data += chunk
|
|
106
|
+
if len(data) > max_response_bytes + 1: raise MonitorUnavailable("local monitor response is too large")
|
|
107
|
+
frame = data.split(b"\n", 1)[0]
|
|
108
|
+
if len(frame) > max_response_bytes: raise MonitorUnavailable("local monitor response is too large")
|
|
109
|
+
response = json.loads(frame)
|
|
110
|
+
if not isinstance(response, dict): raise MonitorUnavailable("local monitor response is invalid")
|
|
111
|
+
return response
|
|
112
|
+
except (OSError, ValueError) as error:
|
|
113
|
+
raise MonitorUnavailable("local monitor is unavailable") from error
|
|
114
|
+
|
|
115
|
+
def snapshot(self) -> dict:
|
|
116
|
+
response = self._request({"type": "snapshot"})
|
|
117
|
+
if response.get("ok") is not True or not isinstance(response.get("snapshot"), dict):
|
|
118
|
+
raise MonitorUnavailable("local monitor rejected the snapshot request")
|
|
119
|
+
return response["snapshot"]
|
|
120
|
+
|
|
121
|
+
def output(self, task_id: str, generation: int, after_sequence: int) -> dict:
|
|
122
|
+
response = self._request({"type": "output", "taskId": task_id, "generation": generation, "afterSequence": after_sequence}, MAX_OUTPUT_RESPONSE_BYTES)
|
|
123
|
+
if response.get("ok") is not True or not isinstance(response.get("output"), dict): raise MonitorUnavailable("local monitor rejected output")
|
|
124
|
+
return response["output"]
|
|
125
|
+
|
|
126
|
+
def cancel(self, task_id: str, generation: int) -> dict:
|
|
127
|
+
if not task_id or not isinstance(generation, int):
|
|
128
|
+
raise MonitorUnavailable("local monitor cancellation is invalid")
|
|
129
|
+
response = self._request({"type": "cancel", "taskId": task_id, "generation": generation}, MAX_CANCEL_RESPONSE_BYTES)
|
|
130
|
+
if response.get("ok") is not True or not isinstance(response.get("result"), dict):
|
|
131
|
+
raise MonitorUnavailable("local monitor rejected cancellation")
|
|
132
|
+
return response["result"]
|
|
133
|
+
|
|
134
|
+
class FleetMonitorAdapter:
|
|
135
|
+
def __init__(self, hubs):
|
|
136
|
+
self._hubs = dict(hubs)
|
|
137
|
+
if len(self._hubs) == 1:
|
|
138
|
+
only = next(iter(self._hubs.values()))
|
|
139
|
+
self._socket_path, self._token = only._socket_path, only._token
|
|
140
|
+
def snapshot(self):
|
|
141
|
+
tasks, errors = [], []
|
|
142
|
+
for hub_id, adapter in self._hubs.items():
|
|
143
|
+
try:
|
|
144
|
+
for task in adapter.snapshot().get("tasks", []): tasks.append({**task, "hubInstanceId": hub_id})
|
|
145
|
+
except MonitorUnavailable: errors.append({"hubInstanceId": hub_id, "state": "orphaned", "error": "unavailable"})
|
|
146
|
+
return {"tasks": tasks, "hubs": errors}
|
|
147
|
+
def _hub(self, hub_instance_id):
|
|
148
|
+
if not isinstance(hub_instance_id, str) or hub_instance_id not in self._hubs: raise MonitorUnavailable("local monitor hub is unavailable")
|
|
149
|
+
return self._hubs[hub_instance_id]
|
|
150
|
+
def output(self, task_id, generation, after_sequence, hub_instance_id): return self._hub(hub_instance_id).output(task_id, generation, after_sequence)
|
|
151
|
+
def cancel(self, task_id, generation, hub_instance_id): return self._hub(hub_instance_id).cancel(task_id, generation)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import socket
|
|
3
|
+
import tempfile
|
|
4
|
+
import threading
|
|
5
|
+
import unittest
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from adapter import MonitorAdapter, MonitorUnavailable
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AdapterTest(unittest.TestCase):
|
|
12
|
+
def test_hex_looking_profile_id_is_still_hashed(self):
|
|
13
|
+
value = "a" * 64
|
|
14
|
+
self.assertNotEqual(MonitorAdapter.canonical_profile_id(value), value)
|
|
15
|
+
def test_reads_only_authenticated_snapshot_from_unix_socket(self):
|
|
16
|
+
with tempfile.TemporaryDirectory() as directory:
|
|
17
|
+
socket_path = str(Path(directory) / "monitor.sock")
|
|
18
|
+
server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
19
|
+
server.bind(socket_path)
|
|
20
|
+
server.listen(1)
|
|
21
|
+
def serve():
|
|
22
|
+
client, _ = server.accept()
|
|
23
|
+
request = json.loads(client.recv(4096).decode())
|
|
24
|
+
self.assertEqual(request, {"type": "snapshot", "token": "secret"})
|
|
25
|
+
client.sendall(b'{"ok":true,"snapshot":{"tasks":[]}}\n')
|
|
26
|
+
client.close()
|
|
27
|
+
server.close()
|
|
28
|
+
thread = threading.Thread(target=serve)
|
|
29
|
+
thread.start()
|
|
30
|
+
self.assertEqual(MonitorAdapter(socket_path, "secret").snapshot(), {"tasks": []})
|
|
31
|
+
thread.join()
|
|
32
|
+
|
|
33
|
+
def test_refuses_missing_local_configuration(self):
|
|
34
|
+
with self.assertRaises(MonitorUnavailable):
|
|
35
|
+
MonitorAdapter.from_environment({})
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
if __name__ == "__main__":
|
|
39
|
+
unittest.main()
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
"use strict";
|
|
3
|
+
window.__HERMES_PLUGINS__.register("agent-fleet-monitor", function AgentFleetMonitorBridge() {
|
|
4
|
+
const root = document.createElement("section");
|
|
5
|
+
root.setAttribute("role", "status");
|
|
6
|
+
root.setAttribute("aria-label", "Agent Fleet Monitor capability");
|
|
7
|
+
root.textContent = "Agent Fleet Monitor backend registered. The Desktop pane is provided separately; this hidden bundle does not create a duplicate pane under the current SDK.";
|
|
8
|
+
return root;
|
|
9
|
+
});
|
|
10
|
+
})();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from fastapi import HTTPException
|
|
3
|
+
from plugin_api import validate_task_request
|
|
4
|
+
|
|
5
|
+
class PluginApiValidationTest(unittest.TestCase):
|
|
6
|
+
def test_accepts_identical_bounded_task_contract(self):
|
|
7
|
+
validate_task_request("task-1:gen.2", 1, 0)
|
|
8
|
+
validate_task_request("x" * 128, 2, 1_000_000_000)
|
|
9
|
+
def test_rejects_invalid_task_generation_and_cursor(self):
|
|
10
|
+
for args in [("",1,0),("bad/path",1,0),("x"*129,1,0),("task",0,0),("task",True,0),("task",1,True),("task",1,-1),("task",1,1_000_000_001)]:
|
|
11
|
+
with self.assertRaises(HTTPException): validate_task_request(*args)
|
|
12
|
+
if __name__ == "__main__": unittest.main()
|
|
@@ -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
|
|
@@ -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.
|