@chankov/agent-fleet 0.0.11 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/extensions/agent-fleet-update-check/README.md +4 -4
- package/.pi/extensions/btw/README.md +26 -25
- package/.pi/extensions/btw/index.ts +80 -83
- package/.pi/extensions/pi-voice-stt/README.md +4 -3
- package/.pi/extensions/pi-voice-stt/config.ts +1 -1
- package/.pi/harnesses/agent-hub/README.md +106 -54
- package/.pi/harnesses/agent-hub/backend-policy.js +25 -4
- package/.pi/harnesses/agent-hub/footer.ts +4 -0
- package/.pi/harnesses/agent-hub/helpers.ts +18 -0
- package/.pi/harnesses/agent-hub/index.ts +537 -369
- package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +10 -1
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.pi/harnesses/agent-hub/posture.ts +103 -0
- package/.pi/harnesses/ask-user-remote/README.md +37 -3
- package/.pi/harnesses/ask-user-remote/index.ts +173 -17
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/fleet-dashboard-ops.ts +118 -0
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +140 -0
- package/.pi/harnesses/lib/fleet-detail-view.ts +43 -0
- package/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.pi/harnesses/lib/fleet-read-model.ts +131 -0
- package/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.pi/harnesses/package-lock.json +2011 -0
- package/.pi/harnesses/package.json +1 -0
- package/.versions/0.0.11/.pi/extensions/agent-fleet-update-check/README.md +4 -4
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/README.md +4 -3
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/config.ts +1 -1
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-session-bridge.ts +10 -1
- package/.versions/0.0.11/.pi/harnesses/ask-user-remote/README.md +37 -3
- package/.versions/0.0.11/.pi/harnesses/ask-user-remote/index.ts +173 -17
- package/.versions/0.0.11/.pi/harnesses/package-lock.json +2011 -0
- package/.versions/0.0.11/.pi/harnesses/package.json +1 -0
- package/.versions/0.0.11/docs/ARCHITECTURE.md +6 -8
- package/.versions/0.0.11/docs/agent-fleet-setup.md +17 -43
- package/.versions/0.0.11/docs/claude-code-coms-bridge.md +20 -2
- package/.versions/0.0.11/docs/coms-hermes-bridge.md +1 -1
- package/.versions/0.0.11/docs/getting-started.md +26 -237
- package/.versions/0.0.11/docs/npm-install.md +60 -478
- package/.versions/0.0.11/docs/pi-extensions.md +4 -4
- package/.versions/0.0.11/docs/pi-setup.md +37 -551
- package/.versions/0.0.11/hermes/README.md +1 -1
- package/.versions/0.0.11/install-manifest.json +375 -1247
- package/.versions/0.0.11/justfile +13 -6
- package/.versions/0.0.11/manifest-meta.json +543 -134
- package/.versions/0.0.11/scripts/lib/fleet-command.ts +8 -0
- package/.versions/0.0.11/scripts/lib/monitor-env.ts +18 -6
- package/.versions/0.0.11/skills/designing-agents/SKILL.md +1 -1
- package/.versions/0.0.11/skills/designing-agents/pi-harness-authoring.md +1 -1
- package/.versions/1.0.0/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/1.0.0/.pi/agents/model-profiles.yaml +27 -0
- package/.versions/1.0.0/.pi/agents/peers.yaml +142 -0
- package/.versions/1.0.0/.pi/agents/teams.yaml +41 -0
- package/.versions/1.0.0/.pi/damage-control-rules.yaml +297 -0
- package/.versions/1.0.0/.pi/extensions/agent-fleet-update-check/README.md +57 -0
- package/.versions/1.0.0/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.versions/1.0.0/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.versions/1.0.0/.pi/extensions/btw/README.md +120 -0
- package/.versions/1.0.0/.pi/extensions/btw/index.ts +914 -0
- package/.versions/1.0.0/.pi/extensions/btw/package.json +6 -0
- package/.versions/1.0.0/.pi/extensions/btw/state.js +179 -0
- package/.versions/1.0.0/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/1.0.0/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/1.0.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/1.0.0/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/1.0.0/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/1.0.0/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/1.0.0/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/1.0.0/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/1.0.0/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/1.0.0/.pi/extensions/package-lock.json +1143 -0
- package/.versions/1.0.0/.pi/extensions/package.json +9 -0
- package/.versions/1.0.0/.pi/extensions/pi-voice-stt/README.md +205 -0
- package/.versions/1.0.0/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/1.0.0/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/1.0.0/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/1.0.0/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/1.0.0/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/1.0.0/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/README.md +1056 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/delegate.ts +435 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/footer.ts +35 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/helpers.ts +266 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/index.ts +9279 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/posture.ts +103 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/return-contract.js +293 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/run-budget.js +479 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/spawn.ts +354 -0
- package/.versions/1.0.0/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/1.0.0/.pi/harnesses/ask-user-remote/README.md +53 -0
- package/.versions/1.0.0/.pi/harnesses/ask-user-remote/index.ts +477 -0
- package/.versions/1.0.0/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/1.0.0/.pi/harnesses/coms/README.md +100 -0
- package/.versions/1.0.0/.pi/harnesses/coms/index.ts +1767 -0
- package/.versions/1.0.0/.pi/harnesses/coms/package.json +7 -0
- package/.versions/1.0.0/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/1.0.0/.pi/harnesses/damage-control-continue/README.md +124 -0
- package/.versions/1.0.0/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/1.0.0/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/1.0.0/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/1.0.0/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/1.0.0/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/1.0.0/.pi/harnesses/lib/fleet-dashboard-ops.ts +118 -0
- package/.versions/1.0.0/.pi/harnesses/lib/fleet-dashboard-view.ts +140 -0
- package/.versions/1.0.0/.pi/harnesses/lib/fleet-detail-view.ts +43 -0
- package/.versions/1.0.0/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/1.0.0/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/1.0.0/.pi/harnesses/lib/fleet-read-model.ts +131 -0
- package/.versions/1.0.0/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/1.0.0/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/1.0.0/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/1.0.0/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/1.0.0/.pi/harnesses/package-lock.json +2046 -0
- package/.versions/1.0.0/.pi/harnesses/package.json +10 -0
- package/.versions/1.0.0/.pi/prompts/af-build.md +24 -0
- package/{.claude/commands/code-simplify.md → .versions/1.0.0/.pi/prompts/af-code-simplify.md} +3 -3
- package/{.claude/commands/plan.md → .versions/1.0.0/.pi/prompts/af-plan.md} +1 -1
- package/.versions/{0.0.11/.claude/commands/review.md → 1.0.0/.pi/prompts/af-review.md} +3 -3
- package/.versions/1.0.0/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/1.0.0/.pi/prompts/af-ship.md +17 -0
- package/.versions/{0.0.11/.claude/commands/spec.md → 1.0.0/.pi/prompts/af-spec.md} +1 -1
- package/.versions/{0.0.11/.claude/commands/test.md → 1.0.0/.pi/prompts/af-test.md} +2 -2
- package/.versions/1.0.0/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/1.0.0/.version +1 -0
- package/.versions/1.0.0/agents/architect.md +24 -0
- package/.versions/1.0.0/agents/bowser.md +27 -0
- package/.versions/1.0.0/agents/builder.md +54 -0
- package/.versions/1.0.0/agents/code-reviewer.md +208 -0
- package/.versions/1.0.0/agents/deep-researcher.md +32 -0
- package/.versions/1.0.0/agents/documenter.md +18 -0
- package/.versions/1.0.0/agents/orchestrator.md +72 -0
- package/.versions/1.0.0/agents/plan-reviewer.md +83 -0
- package/.versions/1.0.0/agents/planner.md +70 -0
- package/.versions/1.0.0/agents/releaser.md +24 -0
- package/.versions/1.0.0/agents/researcher.md +28 -0
- package/.versions/1.0.0/agents/security-auditor.md +167 -0
- package/.versions/1.0.0/agents/test-engineer.md +153 -0
- package/.versions/1.0.0/agents/web-debugger.md +43 -0
- package/.versions/1.0.0/agents/web-performance-auditor.md +193 -0
- package/.versions/1.0.0/codex/CONDUCTOR.md +148 -0
- package/.versions/1.0.0/docs/ARCHITECTURE.md +337 -0
- package/.versions/1.0.0/docs/agent-fleet-setup.md +437 -0
- package/.versions/1.0.0/docs/claude-code-coms-bridge.md +128 -0
- package/.versions/1.0.0/docs/codex-remote-conductor.md +170 -0
- package/.versions/1.0.0/docs/coms-hermes-bridge.md +189 -0
- package/.versions/1.0.0/docs/getting-started.md +98 -0
- package/.versions/1.0.0/docs/npm-install.md +292 -0
- package/.versions/1.0.0/docs/pi-extensions.md +412 -0
- package/.versions/1.0.0/docs/pi-setup.md +74 -0
- package/.versions/1.0.0/docs/skill-anatomy.md +150 -0
- package/.versions/1.0.0/hermes/README.md +347 -0
- package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/1.0.0/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/1.0.0/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/1.0.0/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/1.0.0/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/1.0.0/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/1.0.0/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/1.0.0/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/1.0.0/install-manifest.json +2745 -0
- package/.versions/1.0.0/justfile +272 -0
- package/.versions/1.0.0/manifest-meta.json +882 -0
- package/.versions/1.0.0/references/accessibility-checklist.md +160 -0
- package/.versions/1.0.0/references/definition-of-done.md +67 -0
- package/.versions/1.0.0/references/fleet-coordination-patterns.md +151 -0
- package/.versions/1.0.0/references/observability-checklist.md +91 -0
- package/.versions/1.0.0/references/orchestration-patterns.md +370 -0
- package/.versions/1.0.0/references/performance-checklist.md +153 -0
- package/.versions/1.0.0/references/prompting-patterns.md +380 -0
- package/.versions/1.0.0/references/security-checklist.md +179 -0
- package/.versions/1.0.0/references/testing-patterns.md +236 -0
- package/.versions/1.0.0/scripts/codex-conductor.ts +41 -0
- package/.versions/1.0.0/scripts/codex-remote-control.ts +167 -0
- package/.versions/1.0.0/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/1.0.0/scripts/coms-cli.ts +484 -0
- package/.versions/1.0.0/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/1.0.0/scripts/fleet.ts +185 -0
- package/.versions/1.0.0/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/1.0.0/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/1.0.0/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/1.0.0/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/1.0.0/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/1.0.0/scripts/lib/codex-conductor.ts +88 -0
- package/.versions/1.0.0/scripts/lib/codex-remote-control.ts +480 -0
- package/.versions/1.0.0/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/1.0.0/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/1.0.0/scripts/lib/fleet-command.ts +266 -0
- package/.versions/1.0.0/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/1.0.0/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/1.0.0/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/1.0.0/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/1.0.0/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/1.0.0/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/1.0.0/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/1.0.0/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/1.0.0/scripts/lib/monitor-env.ts +146 -0
- package/.versions/1.0.0/scripts/lib/peer-launch.ts +318 -0
- package/.versions/1.0.0/scripts/lib/persona-banner.ts +62 -0
- package/.versions/1.0.0/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/1.0.0/scripts/lib/team-project.ts +213 -0
- package/.versions/1.0.0/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/1.0.0/scripts/peer-banner.ts +40 -0
- package/.versions/1.0.0/scripts/peer-launch.ts +259 -0
- package/.versions/1.0.0/scripts/team-snapshot.ts +237 -0
- package/.versions/1.0.0/scripts/team-up.ts +406 -0
- package/.versions/1.0.0/skills/_internal/grilling.md +11 -0
- package/.versions/1.0.0/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/1.0.0/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/1.0.0/skills/compound-learning/SKILL.md +137 -0
- package/.versions/1.0.0/skills/context-engineering/SKILL.md +291 -0
- package/.versions/1.0.0/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/1.0.0/skills/designing-agents/SKILL.md +394 -0
- package/.versions/1.0.0/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/1.0.0/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/1.0.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/1.0.0/skills/idea-refine/SKILL.md +182 -0
- package/.versions/1.0.0/skills/idea-refine/examples.md +238 -0
- package/.versions/1.0.0/skills/idea-refine/frameworks.md +99 -0
- package/.versions/1.0.0/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/1.0.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/1.0.0/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/1.0.0/skills/interview-me/SKILL.md +226 -0
- package/.versions/1.0.0/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/1.0.0/skills/peer-coms/SKILL.md +90 -0
- package/.versions/1.0.0/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/1.0.0/skills/planning-and-task-breakdown/SKILL.md +254 -0
- package/.versions/1.0.0/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/1.0.0/skills/spec-driven-development/SKILL.md +257 -0
- package/.versions/1.0.0/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/1.0.0/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/1.0.0/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +142 -0
- package/README.md +117 -79
- package/agents/orchestrator.md +1 -1
- package/bin/cli.js +289 -359
- package/bin/force-patch-changesets.js +18 -2
- package/bin/lib/apply.js +86 -32
- package/bin/lib/desired.js +87 -0
- package/bin/lib/detect-agent.js +22 -38
- package/bin/lib/doctor.js +283 -33
- package/bin/lib/features.js +78 -0
- package/bin/lib/manifest.js +127 -48
- package/bin/lib/overrides.js +35 -0
- package/bin/lib/personas.js +37 -0
- package/bin/lib/plan.js +18 -9
- package/bin/lib/purge.js +11 -0
- package/bin/lib/reconcile.js +68 -0
- package/bin/lib/scan.js +24 -0
- package/bin/lib/state.js +25 -1
- package/bin/lib/stt-wizard.js +33 -0
- package/bin/lib/transaction.js +149 -0
- package/bin/lib/tui.js +71 -0
- package/bin/lib/verify.js +9 -26
- package/bin/snapshot-version.js +3 -6
- package/docs/ARCHITECTURE.md +55 -21
- package/docs/MIGRATION-agent-fleet.md +222 -0
- package/docs/agent-fleet-setup.md +124 -64
- package/docs/claude-code-coms-bridge.md +21 -2
- package/docs/coms-hermes-bridge.md +1 -1
- package/docs/getting-started.md +61 -217
- package/docs/npm-install.md +207 -429
- package/docs/pi-extensions.md +85 -41
- package/docs/pi-setup.md +48 -545
- package/hermes/README.md +1 -1
- package/install-manifest.json +385 -1255
- package/justfile +45 -27
- package/manifest-meta.json +544 -134
- package/node_modules/pi-ask-user/README.md +43 -5
- package/node_modules/pi-ask-user/index.ts +630 -75
- package/node_modules/pi-ask-user/package.json +1 -1
- package/package.json +5 -11
- package/scripts/coms-claude-bridge.ts +10 -0
- package/scripts/fleet.ts +107 -90
- package/scripts/lib/claude-bridge-core.ts +45 -0
- package/scripts/lib/fleet-command.ts +170 -15
- package/scripts/lib/monitor-env.ts +18 -6
- package/scripts/lib/peer-launch.ts +6 -2
- package/scripts/lib/team-project.ts +24 -4
- package/scripts/team-up.ts +57 -11
- package/skills/designing-agents/SKILL.md +1 -1
- package/skills/designing-agents/pi-harness-authoring.md +3 -3
- package/.claude/commands/build.md +0 -44
- package/.claude/commands/design-agent.md +0 -14
- package/.claude/commands/doctor-agent-fleet.md +0 -22
- package/.claude/commands/orchestrate.md +0 -112
- package/.claude/commands/prime.md +0 -22
- package/.claude/commands/review.md +0 -16
- package/.claude/commands/set-hermes-telegram.md +0 -15
- package/.claude/commands/set-hermes-watchdog.md +0 -6
- package/.claude/commands/setup-agent-fleet.md +0 -17
- package/.claude/commands/ship.md +0 -72
- package/.claude/commands/spec.md +0 -15
- package/.claude/commands/test.md +0 -19
- package/.claude/commands/webperf.md +0 -32
- package/.claude/orchestrate-teams.yaml +0 -24
- package/.opencode/commands/af-build.md +0 -17
- package/.opencode/commands/af-code-simplify.md +0 -16
- package/.opencode/commands/af-compound.md +0 -16
- package/.opencode/commands/af-design-agent.md +0 -15
- package/.opencode/commands/af-doctor-agent-fleet.md +0 -22
- package/.opencode/commands/af-orchestrate.md +0 -112
- package/.opencode/commands/af-plan.md +0 -16
- package/.opencode/commands/af-prime.md +0 -22
- package/.opencode/commands/af-review.md +0 -15
- package/.opencode/commands/af-set-hermes-watchdog.md +0 -6
- package/.opencode/commands/af-setup-agent-fleet.md +0 -17
- package/.opencode/commands/af-ship.md +0 -16
- package/.opencode/commands/af-spec.md +0 -16
- package/.opencode/commands/af-test.md +0 -21
- package/.opencode/commands/af-webperf.md +0 -32
- package/.opencode/orchestrate-teams.yaml +0 -24
- package/.pi/prompts/af-doctor-agent-fleet.md +0 -22
- package/.pi/prompts/af-setup-agent-fleet.md +0 -19
- package/.versions/0.0.1/.opencode/commands/af-doctor-agent-fleet.md +0 -15
- package/.versions/0.0.1/.opencode/commands/af-setup-agent-fleet.md +0 -15
- package/.versions/0.0.1/skills/guided-workspace-setup/SKILL.md +0 -506
- package/.versions/0.0.10/.opencode/commands/af-doctor-agent-fleet.md +0 -22
- package/.versions/0.0.10/.opencode/commands/af-setup-agent-fleet.md +0 -17
- package/.versions/0.0.10/.pi/prompts/af-doctor-agent-fleet.md +0 -22
- package/.versions/0.0.10/.pi/prompts/af-setup-agent-fleet.md +0 -19
- package/.versions/0.0.10/skills/guided-workspace-setup/SKILL.md +0 -226
- package/.versions/0.0.11/.claude/commands/build.md +0 -44
- package/.versions/0.0.11/.claude/commands/code-simplify.md +0 -22
- package/.versions/0.0.11/.claude/commands/design-agent.md +0 -14
- package/.versions/0.0.11/.claude/commands/doctor-agent-fleet.md +0 -22
- package/.versions/0.0.11/.claude/commands/orchestrate.md +0 -112
- package/.versions/0.0.11/.claude/commands/plan.md +0 -16
- package/.versions/0.0.11/.claude/commands/prime.md +0 -22
- package/.versions/0.0.11/.claude/commands/set-hermes-telegram.md +0 -15
- package/.versions/0.0.11/.claude/commands/set-hermes-watchdog.md +0 -6
- package/.versions/0.0.11/.claude/commands/setup-agent-fleet.md +0 -17
- package/.versions/0.0.11/.claude/commands/ship.md +0 -72
- package/.versions/0.0.11/.claude/commands/webperf.md +0 -32
- package/.versions/0.0.11/.claude/orchestrate-teams.yaml +0 -24
- package/.versions/0.0.11/.opencode/commands/af-build.md +0 -17
- package/.versions/0.0.11/.opencode/commands/af-code-simplify.md +0 -16
- package/.versions/0.0.11/.opencode/commands/af-compound.md +0 -16
- package/.versions/0.0.11/.opencode/commands/af-design-agent.md +0 -15
- package/.versions/0.0.11/.opencode/commands/af-doctor-agent-fleet.md +0 -22
- package/.versions/0.0.11/.opencode/commands/af-orchestrate.md +0 -112
- package/.versions/0.0.11/.opencode/commands/af-plan.md +0 -16
- package/.versions/0.0.11/.opencode/commands/af-prime.md +0 -22
- package/.versions/0.0.11/.opencode/commands/af-review.md +0 -15
- package/.versions/0.0.11/.opencode/commands/af-set-hermes-telegram.md +0 -15
- package/.versions/0.0.11/.opencode/commands/af-set-hermes-watchdog.md +0 -6
- package/.versions/0.0.11/.opencode/commands/af-setup-agent-fleet.md +0 -17
- package/.versions/0.0.11/.opencode/commands/af-ship.md +0 -16
- package/.versions/0.0.11/.opencode/commands/af-spec.md +0 -16
- package/.versions/0.0.11/.opencode/commands/af-test.md +0 -21
- package/.versions/0.0.11/.opencode/commands/af-webperf.md +0 -32
- package/.versions/0.0.11/.opencode/orchestrate-teams.yaml +0 -24
- package/.versions/0.0.11/.pi/prompts/af-doctor-agent-fleet.md +0 -22
- package/.versions/0.0.11/.pi/prompts/af-setup-agent-fleet.md +0 -19
- package/.versions/0.0.11/docs/opencode-setup.md +0 -281
- package/.versions/0.0.11/hooks/SIMPLIFY-IGNORE.md +0 -90
- package/.versions/0.0.11/hooks/hooks.json +0 -14
- package/.versions/0.0.11/hooks/session-start.sh +0 -74
- package/.versions/0.0.11/hooks/simplify-ignore.sh +0 -302
- package/.versions/0.0.11/skills/guided-workspace-setup/SKILL.md +0 -226
- package/.versions/0.0.4/.opencode/commands/af-doctor-agent-fleet.md +0 -17
- package/.versions/0.0.4/.opencode/commands/af-setup-agent-fleet.md +0 -15
- package/.versions/0.0.4/skills/guided-workspace-setup/SKILL.md +0 -535
- package/.versions/0.0.4/skills/guided-workspace-setup/companion-manifest.json +0 -33
- package/.versions/0.0.5/.opencode/commands/af-doctor-agent-fleet.md +0 -17
- package/.versions/0.0.5/.opencode/commands/af-setup-agent-fleet.md +0 -15
- package/.versions/0.0.5/skills/guided-workspace-setup/SKILL.md +0 -542
- package/.versions/0.0.5/skills/guided-workspace-setup/companion-manifest.json +0 -35
- package/.versions/0.0.6/.opencode/commands/af-doctor-agent-fleet.md +0 -17
- package/.versions/0.0.6/.opencode/commands/af-setup-agent-fleet.md +0 -15
- package/.versions/0.0.6/.pi/prompts/af-doctor-agent-fleet.md +0 -15
- package/.versions/0.0.6/.pi/prompts/af-setup-agent-fleet.md +0 -27
- package/.versions/0.0.6/skills/guided-workspace-setup/SKILL.md +0 -544
- package/.versions/0.0.6/skills/guided-workspace-setup/companion-manifest.json +0 -35
- package/.versions/0.0.7/.opencode/commands/af-doctor-agent-fleet.md +0 -17
- package/.versions/0.0.7/.opencode/commands/af-setup-agent-fleet.md +0 -15
- package/.versions/0.0.7/.pi/prompts/af-doctor-agent-fleet.md +0 -15
- package/.versions/0.0.7/.pi/prompts/af-setup-agent-fleet.md +0 -27
- package/.versions/0.0.7/skills/guided-workspace-setup/SKILL.md +0 -544
- package/.versions/0.0.7/skills/guided-workspace-setup/companion-manifest.json +0 -35
- package/.versions/0.0.8/.opencode/commands/af-doctor-agent-fleet.md +0 -17
- package/.versions/0.0.8/.opencode/commands/af-setup-agent-fleet.md +0 -15
- package/.versions/0.0.8/.pi/prompts/af-doctor-agent-fleet.md +0 -15
- package/.versions/0.0.8/.pi/prompts/af-setup-agent-fleet.md +0 -27
- package/.versions/0.0.8/skills/guided-workspace-setup/SKILL.md +0 -544
- package/.versions/0.0.8/skills/guided-workspace-setup/companion-manifest.json +0 -36
- package/.versions/0.0.9/.opencode/commands/af-doctor-agent-fleet.md +0 -17
- package/.versions/0.0.9/.opencode/commands/af-setup-agent-fleet.md +0 -15
- package/.versions/0.0.9/.pi/prompts/af-doctor-agent-fleet.md +0 -15
- package/.versions/0.0.9/.pi/prompts/af-setup-agent-fleet.md +0 -27
- package/.versions/0.0.9/skills/guided-workspace-setup/SKILL.md +0 -544
- package/bin/lib/bootstrap.js +0 -323
- package/bin/lib/transform-persona.js +0 -180
- package/docs/opencode-setup.md +0 -281
- package/hooks/SIMPLIFY-IGNORE.md +0 -90
- package/hooks/hooks.json +0 -14
- package/hooks/session-start.sh +0 -74
- package/hooks/simplify-ignore.sh +0 -302
- package/skills/guided-workspace-setup/SKILL.md +0 -226
- /package/.versions/0.0.10/{skills/guided-workspace-setup/companion-manifest.json → bin/catalog/harness-runtime-closure.json} +0 -0
- /package/.versions/0.0.11/{skills/guided-workspace-setup/companion-manifest.json → bin/catalog/harness-runtime-closure.json} +0 -0
- /package/{.opencode/commands → .versions/1.0.0/.pi/prompts}/af-set-hermes-telegram.md +0 -0
- /package/.versions/{0.0.9/skills/guided-workspace-setup/companion-manifest.json → 1.0.0/bin/catalog/harness-runtime-closure.json} +0 -0
- /package/{skills/guided-workspace-setup/companion-manifest.json → bin/catalog/harness-runtime-closure.json} +0 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
// scripts/team-up.ts
|
|
2
|
+
//
|
|
3
|
+
// Spawn a team of reusable coms peers (from .pi/agents/peers.yaml) into a
|
|
4
|
+
// herdr workspace — one pane per peer in a tiled BSP layout, each running the
|
|
5
|
+
// hidden `just _peer …` helper. Public use is through `just fleet team` and
|
|
6
|
+
// `just fleet conductor`; all backing recipes remain private. Herdr is a hard
|
|
7
|
+
// dependency for fleet spawning: without a running server the recipes refuse
|
|
8
|
+
// with an actionable message.
|
|
9
|
+
//
|
|
10
|
+
// Hard rules:
|
|
11
|
+
// - Entrypoint guard: launching lives inside main(); importing the module must
|
|
12
|
+
// NOT spawn anything.
|
|
13
|
+
// - peers.yaml + the repo root are resolved relative to THIS file, so the script
|
|
14
|
+
// works regardless of the caller's cwd.
|
|
15
|
+
// - Manifest values are validated against a safe charset before being placed in
|
|
16
|
+
// a pane command (the file is user-edited) — reject anything else. The pure
|
|
17
|
+
// parsing/validation/layout logic lives in scripts/lib/herdr-layout.ts.
|
|
18
|
+
// - --dry-run prints the resolved layout JSON and exits WITHOUT touching herdr
|
|
19
|
+
// (must work with no herdr installed), so command construction is testable
|
|
20
|
+
// without launching pi. env_file VALUES never appear in dry-run output —
|
|
21
|
+
// only the path (secrets stay out of terminals and logs).
|
|
22
|
+
// - Never clobber an existing workspace of the same label; refuse and explain.
|
|
23
|
+
|
|
24
|
+
import * as fs from "node:fs";
|
|
25
|
+
import * as os from "node:os";
|
|
26
|
+
import * as path from "node:path";
|
|
27
|
+
import { fileURLToPath } from "node:url";
|
|
28
|
+
|
|
29
|
+
import { parseTeamsYaml } from "../.pi/harnesses/agent-hub/helpers.ts";
|
|
30
|
+
import {
|
|
31
|
+
buildTeamLayout,
|
|
32
|
+
parseEnvFile,
|
|
33
|
+
parsePeersYaml,
|
|
34
|
+
resolveEnvFilePath,
|
|
35
|
+
type LayoutNode,
|
|
36
|
+
type Peer,
|
|
37
|
+
} from "./lib/herdr-layout.ts";
|
|
38
|
+
import { resolveMonitorEnv } from "./lib/monitor-env.ts";
|
|
39
|
+
import { planSpawnDelays } from "./lib/spawn-stagger.ts";
|
|
40
|
+
import {
|
|
41
|
+
DEFAULT_PROJECT,
|
|
42
|
+
conductorSpec,
|
|
43
|
+
hubCommand,
|
|
44
|
+
parseProjectFlag,
|
|
45
|
+
resolveLegacyAgentRoster,
|
|
46
|
+
teamWorkspaceLabel,
|
|
47
|
+
validateTeamName,
|
|
48
|
+
worktreeTag,
|
|
49
|
+
type ConductorBackend,
|
|
50
|
+
type ConductorSpec,
|
|
51
|
+
} from "./lib/team-project.ts";
|
|
52
|
+
|
|
53
|
+
const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
54
|
+
const REPO_ROOT = fs.realpathSync(path.resolve(SCRIPT_DIR, ".."));
|
|
55
|
+
// Scopes the workspace label to this checkout so the same team from another
|
|
56
|
+
// repo/worktree gets its own workspace instead of colliding (see worktreeTag).
|
|
57
|
+
const WORKTREE_TAG = worktreeTag(REPO_ROOT);
|
|
58
|
+
const DEFAULT_PEERS_YAML = path.join(REPO_ROOT, ".pi", "agents", "peers.yaml");
|
|
59
|
+
const DEFAULT_TEAMS_YAML = path.join(REPO_ROOT, ".pi", "agents", "teams.yaml");
|
|
60
|
+
|
|
61
|
+
// The guarded hub or Hermes conductor occupies this share of the workspace in
|
|
62
|
+
// --hub/--conductor mode; the team tiles in the rest.
|
|
63
|
+
const HUB_RATIO = 0.4;
|
|
64
|
+
|
|
65
|
+
function flagValue(argv: string[], flag: string): string | null {
|
|
66
|
+
const indexes = argv.flatMap((value, index) => value === flag ? [index] : []);
|
|
67
|
+
if (indexes.length > 1) throw new Error(`${flag} may only be provided once`);
|
|
68
|
+
if (indexes.length === 0) return null;
|
|
69
|
+
const value = argv[indexes[0] + 1];
|
|
70
|
+
if (!value || value.startsWith("--")) throw new Error(`${flag} requires a value`);
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function booleanFlag(argv: string[], flag: string): boolean {
|
|
75
|
+
const count = argv.filter(value => value === flag).length;
|
|
76
|
+
if (count > 1) throw new Error(`${flag} may only be provided once`);
|
|
77
|
+
return count === 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function die(msg: string): never {
|
|
81
|
+
console.error(msg);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function parseConductorBackend(argv: string[]): ConductorBackend | null {
|
|
86
|
+
const indexes = argv.flatMap((value, index) => value === "--conductor" ? [index] : []);
|
|
87
|
+
if (indexes.length > 1) throw new Error("--conductor may only be provided once");
|
|
88
|
+
if (indexes.length === 0) return null;
|
|
89
|
+
const value = argv[indexes[0] + 1];
|
|
90
|
+
if (!value || value.startsWith("--")) return "hermes"; // legacy bare --conductor
|
|
91
|
+
if (value === "hermes" || value === "codex") return value;
|
|
92
|
+
throw new Error(`Unknown conductor backend: ${JSON.stringify(value)} (expected hermes or codex)`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function loadTeam(team: string, peersYaml: string): Peer[] {
|
|
96
|
+
if (!fs.existsSync(peersYaml)) die(`peers.yaml not found at ${peersYaml}`);
|
|
97
|
+
const teams = parsePeersYaml(fs.readFileSync(peersYaml, "utf-8"));
|
|
98
|
+
const peers = teams[team];
|
|
99
|
+
if (!peers) {
|
|
100
|
+
const names = Object.keys(teams).join(", ") || "(none)";
|
|
101
|
+
die(`Unknown team "${team}". Available teams: ${names}`);
|
|
102
|
+
}
|
|
103
|
+
return peers;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// B3: resolve + validate every peer's env_file BEFORE any spawning, so a bad
|
|
107
|
+
// manifest refuses up front, never mid-boot. Returns a loader for the layout
|
|
108
|
+
// builder; when `redact` is set (dry-run) values are never read at all.
|
|
109
|
+
function makeEnvLoader(
|
|
110
|
+
peers: Peer[],
|
|
111
|
+
redact: boolean,
|
|
112
|
+
): (peer: Peer) => Record<string, string> | undefined {
|
|
113
|
+
const resolved = new Map<Peer, string>();
|
|
114
|
+
for (const p of peers) {
|
|
115
|
+
if (!p.env_file) continue;
|
|
116
|
+
let abs: string;
|
|
117
|
+
try {
|
|
118
|
+
abs = resolveEnvFilePath(p.env_file, REPO_ROOT);
|
|
119
|
+
} catch (err) {
|
|
120
|
+
die(err instanceof Error ? err.message : String(err));
|
|
121
|
+
}
|
|
122
|
+
if (!redact && !fs.existsSync(abs)) {
|
|
123
|
+
die(`Peer "${p.name}": env_file not found: ${p.env_file} (resolved: ${abs})`);
|
|
124
|
+
}
|
|
125
|
+
resolved.set(p, abs);
|
|
126
|
+
}
|
|
127
|
+
return (peer) => {
|
|
128
|
+
const abs = resolved.get(peer);
|
|
129
|
+
if (!abs || redact) return undefined;
|
|
130
|
+
try {
|
|
131
|
+
return parseEnvFile(fs.readFileSync(abs, "utf-8"), peer.env_file);
|
|
132
|
+
} catch (err) {
|
|
133
|
+
die(err instanceof Error ? err.message : String(err));
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Pre-warm/stagger (see scripts/lib/spawn-stagger.ts): when auth.json holds a
|
|
139
|
+
// stale OAuth token, simultaneous pi boots race on its file lock and the
|
|
140
|
+
// losers come up with every provider "unconfigured". One pi pane (the hub
|
|
141
|
+
// when present, else the first pi peer) starts immediately and refreshes the
|
|
142
|
+
// token; the others get a small AGENT_FLEET_SPAWN_DELAY via pane env. The
|
|
143
|
+
// auth file is only read for `type`/`expires` — values never leave this
|
|
144
|
+
// process. Dry-run never reaches this (no live-state reads on that path).
|
|
145
|
+
function makeDelayLoader(peers: Peer[], mode: "peers" | "hub" | "conductor"): (peer: Peer) => number | undefined {
|
|
146
|
+
let raw: string | undefined;
|
|
147
|
+
try {
|
|
148
|
+
raw = fs.readFileSync(path.join(os.homedir(), ".pi", "agent", "auth.json"), "utf-8");
|
|
149
|
+
} catch {
|
|
150
|
+
raw = undefined;
|
|
151
|
+
}
|
|
152
|
+
// The conductor root is Hermes, not pi — the first pi peer warms instead.
|
|
153
|
+
const { needed, delayForPeer } = planSpawnDelays(peers, mode === "hub", raw);
|
|
154
|
+
if (needed) {
|
|
155
|
+
console.log("Stale pi OAuth token detected — staggering pane starts so one pane can refresh it first.");
|
|
156
|
+
}
|
|
157
|
+
return delayForPeer;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async function validateCodexLaunchOrDie(spec: ConductorSpec, project: string): Promise<void> {
|
|
161
|
+
try {
|
|
162
|
+
const { assertConductorContext, lifecyclePaths, loadOwnedConfig, preflight, requestedState } = await import("./lib/codex-remote-control.ts");
|
|
163
|
+
const config = loadOwnedConfig(lifecyclePaths().configPath);
|
|
164
|
+
assertConductorContext(config, {
|
|
165
|
+
repoRoot: REPO_ROOT,
|
|
166
|
+
project,
|
|
167
|
+
team: spec.team,
|
|
168
|
+
name: spec.conductorName,
|
|
169
|
+
timeoutMs: Number(spec.env.COMS_CLI_TIMEOUT_MS),
|
|
170
|
+
contractPath: String(spec.env.AGENT_FLEET_CODEX_CONTRACT_PATH),
|
|
171
|
+
contractIdentity: String(spec.env.AGENT_FLEET_CODEX_CONTRACT_IDENTITY),
|
|
172
|
+
});
|
|
173
|
+
preflight(config);
|
|
174
|
+
const state = requestedState();
|
|
175
|
+
if (state.active !== "active" || state.sub !== "exited") {
|
|
176
|
+
throw new Error(`Codex user service is not in requested active (exited) state: ${state.active} (${state.sub})`);
|
|
177
|
+
}
|
|
178
|
+
} catch (err) {
|
|
179
|
+
die(`Codex launch refused before Herdr: ${err instanceof Error ? err.message : String(err)}`);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function buildLayoutOrDie(
|
|
184
|
+
team: string,
|
|
185
|
+
peers: Peer[],
|
|
186
|
+
envForPeer: (p: Peer) => Record<string, string> | undefined,
|
|
187
|
+
project: string,
|
|
188
|
+
rootPane?: { command: string[]; label: string; ratio: number; cwd?: string; env?: Record<string, string> },
|
|
189
|
+
delayForPeer?: (p: Peer) => number | undefined,
|
|
190
|
+
): LayoutNode {
|
|
191
|
+
try {
|
|
192
|
+
return buildTeamLayout({
|
|
193
|
+
team,
|
|
194
|
+
peers,
|
|
195
|
+
repoRoot: REPO_ROOT,
|
|
196
|
+
envForPeer,
|
|
197
|
+
project,
|
|
198
|
+
...(delayForPeer ? { delayForPeer } : {}),
|
|
199
|
+
...(rootPane ? { hub: rootPane } : {}),
|
|
200
|
+
});
|
|
201
|
+
} catch (err) {
|
|
202
|
+
die(err instanceof Error ? err.message : String(err));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
async function main(): Promise<void> {
|
|
207
|
+
const argv = process.argv.slice(2);
|
|
208
|
+
let team: string | null = null;
|
|
209
|
+
let peersYaml = DEFAULT_PEERS_YAML;
|
|
210
|
+
let project = DEFAULT_PROJECT;
|
|
211
|
+
try {
|
|
212
|
+
team = flagValue(argv, "--team");
|
|
213
|
+
project = parseProjectFlag(argv);
|
|
214
|
+
// --peers: alternate manifest path (tests use it; defaults to the repo's).
|
|
215
|
+
peersYaml = flagValue(argv, "--peers") ?? DEFAULT_PEERS_YAML;
|
|
216
|
+
} catch (err) {
|
|
217
|
+
die(err instanceof Error ? err.message : String(err));
|
|
218
|
+
}
|
|
219
|
+
let dryRun: boolean;
|
|
220
|
+
let hub: boolean;
|
|
221
|
+
let hubBrowser: boolean;
|
|
222
|
+
let hubAllExtensions: boolean;
|
|
223
|
+
let hubNoComs: boolean;
|
|
224
|
+
let hubPosture: "operator" | "orchestrator" | undefined;
|
|
225
|
+
let hubAgentTeam: string | undefined;
|
|
226
|
+
try {
|
|
227
|
+
dryRun = booleanFlag(argv, "--dry-run");
|
|
228
|
+
hub = booleanFlag(argv, "--hub");
|
|
229
|
+
hubBrowser = booleanFlag(argv, "--browser");
|
|
230
|
+
hubAllExtensions = booleanFlag(argv, "--all-extensions");
|
|
231
|
+
hubNoComs = booleanFlag(argv, "--no-coms");
|
|
232
|
+
const posture = flagValue(argv, "--posture");
|
|
233
|
+
if (posture && posture !== "operator" && posture !== "orchestrator") {
|
|
234
|
+
throw new Error("--posture requires operator or orchestrator");
|
|
235
|
+
}
|
|
236
|
+
hubPosture = posture ?? undefined;
|
|
237
|
+
const canonicalAgents = flagValue(argv, "--agents");
|
|
238
|
+
const legacyAgents = flagValue(argv, "--legacy-agents");
|
|
239
|
+
if (canonicalAgents && legacyAgents) throw new Error("--agents and --legacy-agents are mutually exclusive");
|
|
240
|
+
if (legacyAgents) {
|
|
241
|
+
const nativeTeams = parseTeamsYaml(fs.readFileSync(DEFAULT_TEAMS_YAML, "utf-8"));
|
|
242
|
+
hubAgentTeam = resolveLegacyAgentRoster(nativeTeams, legacyAgents);
|
|
243
|
+
} else {
|
|
244
|
+
hubAgentTeam = canonicalAgents ?? undefined;
|
|
245
|
+
}
|
|
246
|
+
} catch (err) {
|
|
247
|
+
die(err instanceof Error ? err.message : String(err));
|
|
248
|
+
}
|
|
249
|
+
if (!hub && (hubBrowser || hubAllExtensions || hubNoComs || hubPosture || hubAgentTeam)) {
|
|
250
|
+
die("--posture/--agents/--no-coms/--browser/--all-extensions apply to the hub pane and therefore require --hub");
|
|
251
|
+
}
|
|
252
|
+
if (hubPosture === "orchestrator" && !hubAgentTeam) {
|
|
253
|
+
die("--posture orchestrator requires --agents <roster>");
|
|
254
|
+
}
|
|
255
|
+
let conductor: ConductorBackend | null;
|
|
256
|
+
try {
|
|
257
|
+
conductor = parseConductorBackend(argv);
|
|
258
|
+
} catch (err) {
|
|
259
|
+
die(err instanceof Error ? err.message : String(err));
|
|
260
|
+
}
|
|
261
|
+
if (hub && conductor) die("--hub and --conductor are mutually exclusive");
|
|
262
|
+
const mode: "peers" | "hub" | "conductor" = hub ? "hub" : conductor ? "conductor" : "peers";
|
|
263
|
+
|
|
264
|
+
if (!team) {
|
|
265
|
+
console.error("usage: team-up.ts --team <name> [--hub|--conductor] [--dry-run] [--peers <peers.yaml>] [--project <name>]");
|
|
266
|
+
process.exit(2);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
try {
|
|
270
|
+
validateTeamName(team);
|
|
271
|
+
} catch (err) {
|
|
272
|
+
die(err instanceof Error ? err.message : String(err));
|
|
273
|
+
}
|
|
274
|
+
const peers = loadTeam(team, peersYaml);
|
|
275
|
+
if (peers.length === 0 && mode === "peers") {
|
|
276
|
+
die(`Team "${team}" has no peers. Empty teams require --hub or --conductor.`);
|
|
277
|
+
}
|
|
278
|
+
let spec: ConductorSpec | undefined;
|
|
279
|
+
let label: string;
|
|
280
|
+
try {
|
|
281
|
+
spec = conductor ? conductorSpec(conductor, {
|
|
282
|
+
repoRoot: REPO_ROOT,
|
|
283
|
+
runtimeDir: path.join(os.homedir(), ".local", "state", "agent-fleet", "codex-conductor"),
|
|
284
|
+
team,
|
|
285
|
+
project,
|
|
286
|
+
nodeBin: process.execPath,
|
|
287
|
+
}) : undefined;
|
|
288
|
+
label = teamWorkspaceLabel(spec?.workspaceMode ?? (hub ? "hub" : "peers"), team, project, WORKTREE_TAG);
|
|
289
|
+
} catch (err) {
|
|
290
|
+
die(err instanceof Error ? err.message : String(err));
|
|
291
|
+
}
|
|
292
|
+
// The hub pane is spawned BY herdr, whose daemon was started at some other
|
|
293
|
+
// time from some other shell — so unlike `just fleet hub`, it inherits
|
|
294
|
+
// nothing from this process. The monitor variables have to travel as pane
|
|
295
|
+
// env or the one launcher most likely to want a task tree is the one that
|
|
296
|
+
// never gets one. Peers deliberately do not receive them: only agent-hub
|
|
297
|
+
// reads them, and a peer is not a hub.
|
|
298
|
+
const monitorEnv = dryRun ? null : resolveMonitorEnv();
|
|
299
|
+
const hubOptions = {
|
|
300
|
+
posture: hubPosture,
|
|
301
|
+
agentTeam: hubAgentTeam,
|
|
302
|
+
noComs: hubNoComs,
|
|
303
|
+
browser: hubBrowser,
|
|
304
|
+
allExtensions: hubAllExtensions,
|
|
305
|
+
};
|
|
306
|
+
const rootPane = hub
|
|
307
|
+
? {
|
|
308
|
+
command: hubCommand(project, hubOptions),
|
|
309
|
+
label: "hub",
|
|
310
|
+
ratio: HUB_RATIO,
|
|
311
|
+
...(monitorEnv ? { env: monitorEnv } : {}),
|
|
312
|
+
}
|
|
313
|
+
: spec
|
|
314
|
+
? { command: spec.command, label: spec.paneLabel, ratio: spec.ratio, cwd: spec.cwd, env: { ...spec.env, ...(monitorEnv ?? {}) } }
|
|
315
|
+
: undefined;
|
|
316
|
+
|
|
317
|
+
if (dryRun) {
|
|
318
|
+
// No herdr calls and no env_file reads on this path — must work with no
|
|
319
|
+
// herdr installed, and secrets never reach the output.
|
|
320
|
+
const layout = buildLayoutOrDie(team, peers, makeEnvLoader(peers, true), project, rootPane);
|
|
321
|
+
const projectNote = project === DEFAULT_PROJECT ? "" : `, project "${project}"`;
|
|
322
|
+
const extra = mode === "hub" ? " + hub" : spec ? ` + ${spec.backend === "codex" ? "Codex conductor" : "Hermes conductor"}` : "";
|
|
323
|
+
console.log(
|
|
324
|
+
`# team-up (dry run) — team "${team}"${projectNote}, ${peers.length} peer(s)${extra}, herdr workspace "${label}"`,
|
|
325
|
+
);
|
|
326
|
+
for (const p of peers) {
|
|
327
|
+
const cmd = layoutCommands(layout, p.name as string) ?? [];
|
|
328
|
+
const envNote = p.env_file ? ` [env_file: ${p.env_file} — values redacted]` : "";
|
|
329
|
+
console.log(`${p.name}\t${cmd.join(" ")}${envNote}`);
|
|
330
|
+
}
|
|
331
|
+
console.log(JSON.stringify({ label, layout }, null, 2));
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (spec?.backend === "codex") await validateCodexLaunchOrDie(spec, project);
|
|
336
|
+
const layout = buildLayoutOrDie(team, peers, makeEnvLoader(peers, false), project, rootPane, makeDelayLoader(peers, mode));
|
|
337
|
+
|
|
338
|
+
// Import lazily so --dry-run never touches the client (or the socket).
|
|
339
|
+
const { herdr, requireHerdr, HerdrUnavailableError } = await import(
|
|
340
|
+
"../.pi/harnesses/lib/herdr-client.ts"
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
try {
|
|
344
|
+
await requireHerdr();
|
|
345
|
+
} catch (err) {
|
|
346
|
+
if (err instanceof HerdrUnavailableError) {
|
|
347
|
+
console.error(err.message);
|
|
348
|
+
const projectArgs = project === DEFAULT_PROJECT ? "" : ` --project ${project}`;
|
|
349
|
+
const dryCommand = mode === "hub"
|
|
350
|
+
? `just fleet team ${team} --dry-run${projectArgs}`
|
|
351
|
+
: spec?.backend === "codex"
|
|
352
|
+
? `just fleet conductor codex ${team} --dry-run${projectArgs}`
|
|
353
|
+
: mode === "conductor"
|
|
354
|
+
? `just fleet conductor hermes ${team} --dry-run${projectArgs}`
|
|
355
|
+
: `just fleet team ${team} --no-hub --dry-run${projectArgs}`;
|
|
356
|
+
console.error(`(dry run still works: ${dryCommand})`);
|
|
357
|
+
process.exit(1);
|
|
358
|
+
}
|
|
359
|
+
throw err;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const { workspaces } = await herdr.workspaceList();
|
|
363
|
+
const existing = workspaces.find((w) => w.label === label);
|
|
364
|
+
if (existing) {
|
|
365
|
+
console.error(`herdr workspace "${label}" already exists (${existing.workspace_id}).`);
|
|
366
|
+
console.error(` focus: herdr workspace focus ${existing.workspace_id}`);
|
|
367
|
+
console.error(` close: herdr workspace close ${existing.workspace_id}`);
|
|
368
|
+
process.exit(1);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const created = await herdr.workspaceCreate({ label, cwd: REPO_ROOT, focus: false });
|
|
372
|
+
const wsId = created.workspace.workspace_id;
|
|
373
|
+
const initialTab = created.workspace.active_tab_id ?? created.tab?.tab_id;
|
|
374
|
+
await herdr.layoutApply({ workspace_id: wsId, root: layout });
|
|
375
|
+
// layout.apply lands in a fresh tab; drop the empty shell tab
|
|
376
|
+
// workspace.create made so the team tab is the only one.
|
|
377
|
+
if (initialTab) {
|
|
378
|
+
try {
|
|
379
|
+
await herdr.tabClose(initialTab);
|
|
380
|
+
} catch {
|
|
381
|
+
// non-fatal: an extra empty tab is cosmetic
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const launchedPrefix = mode === "hub" ? "hub + " : spec ? `${spec.backend} conductor + ` : "";
|
|
386
|
+
console.log(
|
|
387
|
+
`Launched ${launchedPrefix}${peers.length} peer(s) for team "${team}" in herdr workspace "${label}" (${wsId}):`,
|
|
388
|
+
);
|
|
389
|
+
if (mode === "hub") {
|
|
390
|
+
console.log(` • hub (${hubCommand(project, hubOptions).join(" ")} — guarded dispatcher)`);
|
|
391
|
+
}
|
|
392
|
+
if (spec) console.log(` • ${spec.paneLabel} (${spec.command.join(" ")} — ${spec.displayText})`);
|
|
393
|
+
if (spec?.backend === "codex") console.log(" • Closing this workspace does not stop the enabled Codex user service; stop it explicitly.");
|
|
394
|
+
for (const p of peers) console.log(` • ${p.name}`);
|
|
395
|
+
console.log(`Focus: herdr workspace focus ${wsId}`);
|
|
396
|
+
console.log(`Close: herdr workspace close ${wsId}`);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// Dry-run helper: find the command argv for the pane labeled `name`.
|
|
400
|
+
function layoutCommands(node: LayoutNode, name: string): string[] | undefined {
|
|
401
|
+
if (node.type === "pane") return node.label === name ? node.command : undefined;
|
|
402
|
+
return layoutCommands(node.first, name) ?? layoutCommands(node.second, name);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const isEntry = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
406
|
+
if (isEntry) void main();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Grilling (Internal Helper)
|
|
2
|
+
|
|
3
|
+
Use this helper from a parent skill when the user asks to grill or stress-test a plan, spec, or design, or when an important design choice is being silently assumed.
|
|
4
|
+
|
|
5
|
+
Interview the user relentlessly until the important decisions are explicitly accepted, rejected, or deferred. Walk the design tree one dependency at a time: choose the next question based on prior answers, and skip questions made irrelevant by earlier decisions.
|
|
6
|
+
|
|
7
|
+
Ask one focused question at a time. Offer 2-4 concrete options plus your recommended answer and a brief reason, then wait for the user's decision before continuing. This should feel like guided architectural interrogation, not a questionnaire dump.
|
|
8
|
+
|
|
9
|
+
If a question can be answered by reading the codebase, docs, tests, or runtime evidence, investigate first and ask only about the remaining decision.
|
|
10
|
+
|
|
11
|
+
Keep grilling until shared understanding is strong enough to write or revise the downstream artifact. When review exposes gaps later, convert each gap into one targeted follow-up question.
|