@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
package/bin/lib/bootstrap.js
DELETED
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
// bootstrap.js — drop the minimum installer artifacts a coding agent needs
|
|
2
|
-
// to recognize Agent Fleet's setup and doctor slash commands.
|
|
3
|
-
//
|
|
4
|
-
// The CLI's `init` calls this before the handoff message. Without it, a
|
|
5
|
-
// fresh workspace has no `.claude/commands/setup-agent-fleet.md`,
|
|
6
|
-
// `.pi/prompts/af-setup-agent-fleet.md`, etc., so the agent has no setup
|
|
7
|
-
// entrypoint and the whole hand-off breaks silently.
|
|
8
|
-
//
|
|
9
|
-
// What we bootstrap (per agent):
|
|
10
|
-
// - The `setup` slash command (so the user can invoke it)
|
|
11
|
-
// - The `doctor` slash command (same)
|
|
12
|
-
// - The `guided-workspace-setup` skill body (the slash command says
|
|
13
|
-
// "load this skill" — the skill must be present somewhere the agent
|
|
14
|
-
// auto-discovers)
|
|
15
|
-
//
|
|
16
|
-
// What we do NOT bootstrap:
|
|
17
|
-
// - Any of the user-facing skills (spec-driven-development,
|
|
18
|
-
// test-driven-development, …). Those are picked by the user inside
|
|
19
|
-
// through the runtime's setup command, by design. The CLI never decides the workspace's catalogue
|
|
20
|
-
// for the user.
|
|
21
|
-
//
|
|
22
|
-
// Method:
|
|
23
|
-
// `copy` — safe default; works for npx caches that may be cleaned
|
|
24
|
-
// `symlink` — leaner; only safe when the source root is stable
|
|
25
|
-
// (global install / git clone). Warning printed if the
|
|
26
|
-
// source path looks like an npx cache.
|
|
27
|
-
|
|
28
|
-
import { existsSync, mkdirSync, copyFileSync, symlinkSync, unlinkSync, lstatSync, rmSync, readdirSync, rmdirSync, writeFileSync, readFileSync } from "node:fs";
|
|
29
|
-
import { dirname, join, relative } from "node:path";
|
|
30
|
-
|
|
31
|
-
// Marker file the skill reads to find the authoritative source root. Written
|
|
32
|
-
// by bootstrap, deleted by cleanupInstaller. Without this, the skill would
|
|
33
|
-
// have to guess the source root from its own SKILL.md location — but bootstrap
|
|
34
|
-
// copies SKILL.md into the workspace, so that heuristic always lies.
|
|
35
|
-
const BOOTSTRAP_MARKER = join(".ai", ".agent-fleet-bootstrap.json");
|
|
36
|
-
|
|
37
|
-
function writeMarker({ workspace, sourceRoot, agent, method }) {
|
|
38
|
-
const path = join(workspace, BOOTSTRAP_MARKER);
|
|
39
|
-
const version = readPackageVersion(sourceRoot);
|
|
40
|
-
const payload = {
|
|
41
|
-
sourceRoot,
|
|
42
|
-
version,
|
|
43
|
-
agent,
|
|
44
|
-
method,
|
|
45
|
-
bootstrappedAt: new Date().toISOString(),
|
|
46
|
-
_comment: "Written by `npx @chankov/agent-fleet init`. Read by the guided-workspace-setup skill to locate the source package. Safe to delete; will be regenerated on next init.",
|
|
47
|
-
};
|
|
48
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
49
|
-
writeFileSync(path, JSON.stringify(payload, null, 2) + "\n", "utf8");
|
|
50
|
-
return path;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function readPackageVersion(sourceRoot) {
|
|
54
|
-
try {
|
|
55
|
-
const pkg = JSON.parse(readFileSync(join(sourceRoot, "package.json"), "utf8"));
|
|
56
|
-
return pkg.version;
|
|
57
|
-
} catch { return null; }
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Read the bootstrap marker if present. Lets `update` recover the agent and
|
|
62
|
-
* method chosen at init time. Returns null when the marker is absent (e.g.
|
|
63
|
-
* after guided-workspace-setup removed it in its end-of-run cleanup).
|
|
64
|
-
*
|
|
65
|
-
* @param {string} workspace
|
|
66
|
-
* @returns {{sourceRoot?:string, version?:string, agent?:string, method?:string}|null}
|
|
67
|
-
*/
|
|
68
|
-
export function readBootstrapMarker(workspace) {
|
|
69
|
-
try {
|
|
70
|
-
return JSON.parse(readFileSync(join(workspace, BOOTSTRAP_MARKER), "utf8"));
|
|
71
|
-
} catch { return null; }
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// (agent → list of {kind, src, dest}) — kind is just for the report.
|
|
75
|
-
//
|
|
76
|
-
// All installer slash commands are namespaced with `-agent-fleet` so they
|
|
77
|
-
// don't collide with workspace-defined or other-tool slash commands. The
|
|
78
|
-
// short names (setup, doctor, as-setup, as-doctor) were used in 0.2.0 and
|
|
79
|
-
// earlier — cleanupLegacyNames() removes those if found.
|
|
80
|
-
function plan({ agent, sourceRoot, workspace }) {
|
|
81
|
-
const skillSrc = join(sourceRoot, "skills", "guided-workspace-setup", "SKILL.md");
|
|
82
|
-
|
|
83
|
-
switch (agent) {
|
|
84
|
-
case "claude-code":
|
|
85
|
-
return [
|
|
86
|
-
{ kind: "command", src: join(sourceRoot, ".claude/commands/setup-agent-fleet.md"),
|
|
87
|
-
dest: join(workspace, ".claude/commands/setup-agent-fleet.md") },
|
|
88
|
-
{ kind: "command", src: join(sourceRoot, ".claude/commands/doctor-agent-fleet.md"),
|
|
89
|
-
dest: join(workspace, ".claude/commands/doctor-agent-fleet.md") },
|
|
90
|
-
{ kind: "skill", src: skillSrc,
|
|
91
|
-
dest: join(workspace, ".claude/skills/guided-workspace-setup/SKILL.md") },
|
|
92
|
-
];
|
|
93
|
-
|
|
94
|
-
case "pi":
|
|
95
|
-
return [
|
|
96
|
-
{ kind: "prompt", src: join(sourceRoot, ".pi/prompts/af-setup-agent-fleet.md"),
|
|
97
|
-
dest: join(workspace, ".pi/prompts/af-setup-agent-fleet.md") },
|
|
98
|
-
{ kind: "prompt", src: join(sourceRoot, ".pi/prompts/af-doctor-agent-fleet.md"),
|
|
99
|
-
dest: join(workspace, ".pi/prompts/af-doctor-agent-fleet.md") },
|
|
100
|
-
// pi auto-discovers skills from .pi/skills/ and .agents/skills/ —
|
|
101
|
-
// we use .pi/skills/ to avoid polluting a shared .agents/ dir if
|
|
102
|
-
// the user has other tools there.
|
|
103
|
-
{ kind: "skill", src: skillSrc,
|
|
104
|
-
dest: join(workspace, ".pi/skills/guided-workspace-setup/SKILL.md") },
|
|
105
|
-
];
|
|
106
|
-
|
|
107
|
-
case "opencode":
|
|
108
|
-
// OpenCode discovers skills + commands from ~/.config/opencode/ (global)
|
|
109
|
-
// and references AGENTS.md. A project-local bootstrap is awkward — we
|
|
110
|
-
// drop the command file into .opencode/commands/ (which OpenCode does
|
|
111
|
-
// load from the project) and the skill alongside it, then flag the
|
|
112
|
-
// AGENTS.md gap for the user.
|
|
113
|
-
return [
|
|
114
|
-
{ kind: "command", src: join(sourceRoot, ".opencode/commands/af-setup-agent-fleet.md"),
|
|
115
|
-
dest: join(workspace, ".opencode/commands/af-setup-agent-fleet.md") },
|
|
116
|
-
{ kind: "command", src: join(sourceRoot, ".opencode/commands/af-doctor-agent-fleet.md"),
|
|
117
|
-
dest: join(workspace, ".opencode/commands/af-doctor-agent-fleet.md") },
|
|
118
|
-
{ kind: "skill", src: skillSrc,
|
|
119
|
-
dest: join(workspace, ".opencode/skills/guided-workspace-setup/SKILL.md") },
|
|
120
|
-
];
|
|
121
|
-
|
|
122
|
-
default:
|
|
123
|
-
throw new Error(`bootstrap: unknown agent "${agent}"`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Previous bootstrap targets. Removed during bootstrap so upgrades do not
|
|
128
|
-
// leave both unprefixed and current slash commands in the workspace.
|
|
129
|
-
function legacyPaths({ agent, workspace }) {
|
|
130
|
-
switch (agent) {
|
|
131
|
-
case "claude-code":
|
|
132
|
-
return [
|
|
133
|
-
join(workspace, ".claude/commands/setup.md"),
|
|
134
|
-
join(workspace, ".claude/commands/doctor.md"),
|
|
135
|
-
];
|
|
136
|
-
case "pi":
|
|
137
|
-
return [
|
|
138
|
-
join(workspace, ".pi/prompts/setup.md"),
|
|
139
|
-
join(workspace, ".pi/prompts/doctor.md"),
|
|
140
|
-
join(workspace, ".pi/prompts/setup-agent-fleet.md"),
|
|
141
|
-
join(workspace, ".pi/prompts/doctor-agent-fleet.md"),
|
|
142
|
-
];
|
|
143
|
-
case "opencode":
|
|
144
|
-
return [
|
|
145
|
-
join(workspace, ".opencode/commands/as-setup.md"),
|
|
146
|
-
join(workspace, ".opencode/commands/as-doctor.md"),
|
|
147
|
-
];
|
|
148
|
-
default:
|
|
149
|
-
return [];
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Run the bootstrap.
|
|
155
|
-
*
|
|
156
|
-
* @param {object} opts
|
|
157
|
-
* @param {string} opts.agent claude-code | opencode | pi
|
|
158
|
-
* @param {string} opts.sourceRoot Absolute path to the installed package
|
|
159
|
-
* @param {string} opts.workspace Absolute path to the target workspace
|
|
160
|
-
* @param {"copy"|"symlink"} opts.method
|
|
161
|
-
* @param {boolean} [opts.dryRun]
|
|
162
|
-
* @returns {{written:Array, skipped:Array, warnings:Array}}
|
|
163
|
-
*/
|
|
164
|
-
export function bootstrap({ agent, sourceRoot, workspace, method, dryRun = false }) {
|
|
165
|
-
const items = plan({ agent, sourceRoot, workspace });
|
|
166
|
-
const written = [], skipped = [], removed = [], warnings = [];
|
|
167
|
-
|
|
168
|
-
// Warn if the user asked for symlink against an unstable source.
|
|
169
|
-
if (method === "symlink" && /\/\.npm\/_npx\//.test(sourceRoot)) {
|
|
170
|
-
warnings.push(
|
|
171
|
-
"--method symlink against an npx cache path: links will break when " +
|
|
172
|
-
"the cache is cleaned. Consider --method copy or install globally " +
|
|
173
|
-
"with `npm install -g @chankov/agent-fleet`.",
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// Clean up superseded file names so old and current commands never coexist.
|
|
178
|
-
for (const oldPath of legacyPaths({ agent, workspace })) {
|
|
179
|
-
if (!existsSync(oldPath) && !isSymlink(oldPath)) continue;
|
|
180
|
-
if (dryRun) {
|
|
181
|
-
removed.push(oldPath);
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
try {
|
|
185
|
-
unlinkSync(oldPath);
|
|
186
|
-
removed.push(oldPath);
|
|
187
|
-
} catch (err) {
|
|
188
|
-
warnings.push(`could not remove legacy file ${relative(workspace, oldPath)}: ${err.message}`);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
for (const item of items) {
|
|
193
|
-
if (!existsSync(item.src)) {
|
|
194
|
-
warnings.push(`missing source: ${relative(sourceRoot, item.src)} (skipping ${item.kind})`);
|
|
195
|
-
continue;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (dryRun) {
|
|
199
|
-
written.push({ ...item, method });
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
try {
|
|
204
|
-
mkdirSync(dirname(item.dest), { recursive: true });
|
|
205
|
-
|
|
206
|
-
// Always replace — the bootstrap is installer scaffolding, not user
|
|
207
|
-
// data. If we left it stale, an upgraded package would still hand off
|
|
208
|
-
// to an old setup command. Step 6 of guided-workspace-setup explicitly
|
|
209
|
-
// never offers these files in the install menu, so we are the only
|
|
210
|
-
// mechanism that refreshes them.
|
|
211
|
-
if (existsSync(item.dest) || isSymlink(item.dest)) {
|
|
212
|
-
unlinkSync(item.dest);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
if (method === "symlink") {
|
|
216
|
-
symlinkSync(item.src, item.dest);
|
|
217
|
-
} else {
|
|
218
|
-
// copyFileSync handles plain files; for the SKILL.md case the source
|
|
219
|
-
// may have sibling support files in some skills — but
|
|
220
|
-
// guided-workspace-setup is a single-file skill, so copyFileSync is
|
|
221
|
-
// fine. Switch to cpSync if that ever changes.
|
|
222
|
-
copyFileSync(item.src, item.dest);
|
|
223
|
-
}
|
|
224
|
-
written.push({ ...item, method });
|
|
225
|
-
} catch (err) {
|
|
226
|
-
skipped.push({ ...item, error: err.message });
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Write the marker file as the LAST step — only after all the bootstrap
|
|
231
|
-
// files landed successfully. If the marker exists, the skill trusts it
|
|
232
|
-
// absolutely; if it does not, the skill falls back to safer paths.
|
|
233
|
-
if (!dryRun && written.length > 0) {
|
|
234
|
-
try {
|
|
235
|
-
const markerPath = writeMarker({ workspace, sourceRoot, agent, method });
|
|
236
|
-
written.push({ kind: "marker", dest: markerPath, method: "write" });
|
|
237
|
-
} catch (err) {
|
|
238
|
-
warnings.push(`could not write bootstrap marker: ${err.message}`);
|
|
239
|
-
}
|
|
240
|
-
} else if (dryRun) {
|
|
241
|
-
written.push({ kind: "marker", dest: join(workspace, BOOTSTRAP_MARKER), method: "write" });
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return { written, skipped, removed, warnings };
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Remove every bootstrap artifact this module knows how to write. Called
|
|
249
|
-
* by guided-workspace-setup at the end of Step 10 unless the user chose
|
|
250
|
-
* to keep the installer commands. After cleanup, the only way back to
|
|
251
|
-
* the setup command is to re-run `npx @chankov/agent-fleet init`.
|
|
252
|
-
*
|
|
253
|
-
* The same `agent` value must be supplied that was used at bootstrap time —
|
|
254
|
-
* we don't have a tracking file, so we delete based on the plan map.
|
|
255
|
-
*
|
|
256
|
-
* @param {object} opts
|
|
257
|
-
* @param {string} opts.agent
|
|
258
|
-
* @param {string} opts.workspace
|
|
259
|
-
* @param {boolean} [opts.dryRun]
|
|
260
|
-
* @returns {{removed:string[], kept:string[], warnings:string[]}}
|
|
261
|
-
*/
|
|
262
|
-
export function cleanupInstaller({ agent, workspace, dryRun = false }) {
|
|
263
|
-
const planned = plan({ agent, sourceRoot: workspace, workspace });
|
|
264
|
-
const removed = [], kept = [], warnings = [];
|
|
265
|
-
|
|
266
|
-
// Marker file goes too — it pointed at a source root that no longer
|
|
267
|
-
// matters once the install is done.
|
|
268
|
-
const markerPath = join(workspace, BOOTSTRAP_MARKER);
|
|
269
|
-
if (existsSync(markerPath)) {
|
|
270
|
-
if (dryRun) {
|
|
271
|
-
removed.push(markerPath);
|
|
272
|
-
} else {
|
|
273
|
-
try { unlinkSync(markerPath); removed.push(markerPath); }
|
|
274
|
-
catch (err) { warnings.push(`could not remove ${relative(workspace, markerPath)}: ${err.message}`); }
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
for (const item of planned) {
|
|
279
|
-
if (!existsSync(item.dest) && !isSymlink(item.dest)) {
|
|
280
|
-
kept.push(item.dest); // already gone — count it as a no-op, not an error
|
|
281
|
-
continue;
|
|
282
|
-
}
|
|
283
|
-
if (dryRun) {
|
|
284
|
-
removed.push(item.dest);
|
|
285
|
-
continue;
|
|
286
|
-
}
|
|
287
|
-
try {
|
|
288
|
-
const lst = lstatSync(item.dest);
|
|
289
|
-
if (lst.isDirectory() && !lst.isSymbolicLink()) {
|
|
290
|
-
rmSync(item.dest, { recursive: true });
|
|
291
|
-
} else {
|
|
292
|
-
unlinkSync(item.dest);
|
|
293
|
-
}
|
|
294
|
-
removed.push(item.dest);
|
|
295
|
-
|
|
296
|
-
// If we removed the only file in a parent directory we created
|
|
297
|
-
// (.claude/skills/guided-workspace-setup/), prune the directory too.
|
|
298
|
-
pruneEmptyDirsUpTo(dirname(item.dest), workspace);
|
|
299
|
-
} catch (err) {
|
|
300
|
-
warnings.push(`could not remove ${relative(workspace, item.dest)}: ${err.message}`);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
return { removed, kept, warnings };
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
function pruneEmptyDirsUpTo(dir, workspace) {
|
|
308
|
-
// Walk upward removing empty parent dirs until we hit a non-empty one or
|
|
309
|
-
// the workspace root. Never delete the workspace itself.
|
|
310
|
-
try {
|
|
311
|
-
while (dir !== workspace && dir.startsWith(workspace)) {
|
|
312
|
-
const entries = readdirSync(dir);
|
|
313
|
-
if (entries.length > 0) return;
|
|
314
|
-
rmdirSync(dir);
|
|
315
|
-
dir = dirname(dir);
|
|
316
|
-
}
|
|
317
|
-
} catch { /* prune is best-effort */ }
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
function isSymlink(path) {
|
|
321
|
-
try { return lstatSync(path).isSymbolicLink(); }
|
|
322
|
-
catch { return false; }
|
|
323
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
// Persona transformer — generates per-agent subagent definitions from the
|
|
2
|
-
// canonical pi-flavored personas in `agents/*.md`.
|
|
3
|
-
//
|
|
4
|
-
// The canonical frontmatter carries agent-hub-only keys (`models`, `thinking`,
|
|
5
|
-
// `delegate_depth`, `subagents`, `kind`, `skills`). Other coding agents get a
|
|
6
|
-
// *generated* artifact: same name/description/body, with `tools`/`model`
|
|
7
|
-
// translated to the target's vocabulary and the pi-only keys dropped.
|
|
8
|
-
//
|
|
9
|
-
// Targets:
|
|
10
|
-
// claude-code → .claude/agents/<name>.md (tools renamed, model mapped)
|
|
11
|
-
// opencode → .opencode/agent/<name>.md (mode: subagent + tool denials)
|
|
12
|
-
// pi → agents/<name>.md (byte-identical passthrough)
|
|
13
|
-
//
|
|
14
|
-
// Used by the `agent-fleet transform-persona` CLI subcommand, which the
|
|
15
|
-
// guided-workspace-setup skill calls during apply. Deterministic on purpose:
|
|
16
|
-
// the mapping lives here, in one place, under test — never in skill prose.
|
|
17
|
-
|
|
18
|
-
import { readdirSync, readFileSync, existsSync } from "node:fs";
|
|
19
|
-
import { join } from "node:path";
|
|
20
|
-
|
|
21
|
-
export const TRANSFORM_AGENTS = ["claude-code", "opencode", "pi"];
|
|
22
|
-
|
|
23
|
-
// Personas coupled to the pi runtime: `bowser` depends on the pi runtime
|
|
24
|
-
// skill `bowser` (which drives the external `playwright-cli` tool);
|
|
25
|
-
// `web-debugger` depends on the always-on `chrome-devtools-mcp` extension's
|
|
26
|
-
// `chrome_devtools__*` tools (loaded into its coms-peer process); the
|
|
27
|
-
// `orchestrator` is the flavor-only agent-hub
|
|
28
|
-
// dispatcher persona — agent-hub builds the orchestration prompt itself,
|
|
29
|
-
// so standalone it is an empty shell.
|
|
30
|
-
export const PI_ONLY_PERSONAS = ["bowser", "web-debugger", "orchestrator"];
|
|
31
|
-
|
|
32
|
-
// pi tool name → Claude Code tool name. `find`/`ls` both collapse into Glob.
|
|
33
|
-
const CLAUDE_TOOL_MAP = {
|
|
34
|
-
read: "Read",
|
|
35
|
-
write: "Write",
|
|
36
|
-
edit: "Edit",
|
|
37
|
-
bash: "Bash",
|
|
38
|
-
grep: "Grep",
|
|
39
|
-
find: "Glob",
|
|
40
|
-
ls: "Glob",
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// OpenCode write-capable tools we deny when the persona does not grant the
|
|
44
|
-
// matching pi tool. `patch` has no pi equivalent, so it follows `write`.
|
|
45
|
-
const OPENCODE_DENIABLE = ["write", "edit", "bash", "patch"];
|
|
46
|
-
|
|
47
|
-
export function targetRelPath(agent, name) {
|
|
48
|
-
switch (agent) {
|
|
49
|
-
case "claude-code": return join(".claude", "agents", `${name}.md`);
|
|
50
|
-
case "opencode": return join(".opencode", "agent", `${name}.md`);
|
|
51
|
-
case "pi": return join("agents", `${name}.md`);
|
|
52
|
-
default: throw new Error(`unknown agent "${agent}" (allowed: ${TRANSFORM_AGENTS.join(", ")})`);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* List the personas available for a target agent (availability matrix).
|
|
58
|
-
*
|
|
59
|
-
* @param {string} sourceRoot agent-fleet source root (absolute path)
|
|
60
|
-
* @param {object} opts
|
|
61
|
-
* @param {string} opts.agent one of TRANSFORM_AGENTS
|
|
62
|
-
* @returns {Array<{name: string, sourcePath: string, targetRelPath: string}>}
|
|
63
|
-
*/
|
|
64
|
-
export function listPersonas(sourceRoot, { agent }) {
|
|
65
|
-
if (!TRANSFORM_AGENTS.includes(agent)) {
|
|
66
|
-
throw new Error(`unknown agent "${agent}" (allowed: ${TRANSFORM_AGENTS.join(", ")})`);
|
|
67
|
-
}
|
|
68
|
-
const dir = join(sourceRoot, "agents");
|
|
69
|
-
if (!existsSync(dir)) return [];
|
|
70
|
-
return readdirSync(dir)
|
|
71
|
-
.filter((f) => f.endsWith(".md"))
|
|
72
|
-
.map((f) => f.replace(/\.md$/, ""))
|
|
73
|
-
.filter((name) => agent === "pi" || !PI_ONLY_PERSONAS.includes(name))
|
|
74
|
-
.sort()
|
|
75
|
-
.map((name) => ({
|
|
76
|
-
name,
|
|
77
|
-
sourcePath: join(dir, `${name}.md`),
|
|
78
|
-
targetRelPath: targetRelPath(agent, name),
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Transform one canonical persona for a target agent.
|
|
84
|
-
*
|
|
85
|
-
* @param {string} sourceText full text of the canonical agents/<name>.md
|
|
86
|
-
* @param {object} opts
|
|
87
|
-
* @param {string} opts.agent one of TRANSFORM_AGENTS
|
|
88
|
-
* @returns {{name: string, content: string, targetRelPath: string}}
|
|
89
|
-
*/
|
|
90
|
-
export function transformPersona(sourceText, { agent }) {
|
|
91
|
-
if (!TRANSFORM_AGENTS.includes(agent)) {
|
|
92
|
-
throw new Error(`unknown agent "${agent}" (allowed: ${TRANSFORM_AGENTS.join(", ")})`);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const { fields, body } = splitPersona(sourceText);
|
|
96
|
-
const name = fields.name;
|
|
97
|
-
if (!name) throw new Error("persona has no `name:` in its frontmatter");
|
|
98
|
-
|
|
99
|
-
if (agent !== "pi" && PI_ONLY_PERSONAS.includes(name)) {
|
|
100
|
-
throw new Error(
|
|
101
|
-
`persona "${name}" is pi-only (depends on the pi runtime / agent-hub) — not installable for ${agent}`,
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (agent === "pi") {
|
|
106
|
-
// Canonical format IS the pi format.
|
|
107
|
-
return { name, content: sourceText, targetRelPath: targetRelPath("pi", name) };
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const lines = [];
|
|
111
|
-
if (agent === "claude-code") {
|
|
112
|
-
lines.push(`name: ${name}`);
|
|
113
|
-
lines.push(`description: ${fields.description ?? ""}`);
|
|
114
|
-
const tools = mapClaudeTools(fields.tools);
|
|
115
|
-
if (tools) lines.push(`tools: ${tools}`);
|
|
116
|
-
const model = mapClaudeModel(fields.model);
|
|
117
|
-
if (model) lines.push(`model: ${model}`);
|
|
118
|
-
// Keep bare color names; drop hex values Claude Code does not accept.
|
|
119
|
-
if (fields.color && /^[a-z]+$/.test(fields.color)) lines.push(`color: ${fields.color}`);
|
|
120
|
-
} else {
|
|
121
|
-
// opencode — invoked as a subagent; model inherited from the session
|
|
122
|
-
// (pi provider ids do not map 1:1 onto OpenCode provider ids).
|
|
123
|
-
lines.push(`description: ${fields.description ?? ""}`);
|
|
124
|
-
lines.push("mode: subagent");
|
|
125
|
-
const denials = opencodeDenials(fields.tools);
|
|
126
|
-
if (denials.length > 0) {
|
|
127
|
-
lines.push("tools:");
|
|
128
|
-
for (const t of denials) lines.push(` ${t}: false`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const content = `---\n${lines.join("\n")}\n---\n${body}`;
|
|
133
|
-
return { name, content, targetRelPath: targetRelPath(agent, name) };
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// ── mapping helpers ─────────────────────────────────────────────────────────
|
|
137
|
-
|
|
138
|
-
function mapClaudeTools(toolsValue) {
|
|
139
|
-
if (!toolsValue) return null; // no tools key → inherit all
|
|
140
|
-
const out = [];
|
|
141
|
-
for (const raw of toolsValue.split(",")) {
|
|
142
|
-
const mapped = CLAUDE_TOOL_MAP[raw.trim()];
|
|
143
|
-
if (mapped && !out.includes(mapped)) out.push(mapped);
|
|
144
|
-
}
|
|
145
|
-
return out.length > 0 ? out.join(", ") : null;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function mapClaudeModel(modelValue) {
|
|
149
|
-
if (!modelValue) return null;
|
|
150
|
-
if (modelValue.includes("claude-opus")) return "opus";
|
|
151
|
-
if (modelValue.includes("claude-sonnet")) return "sonnet";
|
|
152
|
-
if (modelValue.includes("claude-haiku")) return "haiku";
|
|
153
|
-
return null; // non-Anthropic pi route → inherit the session model
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function opencodeDenials(toolsValue) {
|
|
157
|
-
if (!toolsValue) return []; // no tools key → inherit (no denials)
|
|
158
|
-
const granted = new Set(toolsValue.split(",").map((t) => t.trim()));
|
|
159
|
-
if (granted.has("write")) granted.add("patch"); // patch follows write
|
|
160
|
-
return OPENCODE_DENIABLE.filter((t) => !granted.has(t));
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// ── parsing ────────────────────────────────────────────────────────────────
|
|
164
|
-
//
|
|
165
|
-
// Deliberately minimal: the canonical personas use single-line scalar values
|
|
166
|
-
// for every key we keep (name, description, tools, model, color). Nested
|
|
167
|
-
// blocks (models, subagents, skills) belong to keys we drop wholesale, so we
|
|
168
|
-
// only read unindented `key: value` lines and ignore everything else.
|
|
169
|
-
|
|
170
|
-
function splitPersona(text) {
|
|
171
|
-
const m = text.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);
|
|
172
|
-
if (!m) throw new Error("persona has no YAML frontmatter (--- … ---)");
|
|
173
|
-
const fields = {};
|
|
174
|
-
for (const line of m[1].split(/\r?\n/)) {
|
|
175
|
-
if (/^[ \t]/.test(line)) continue; // nested content of a dropped key
|
|
176
|
-
const kv = line.match(/^([A-Za-z_][\w-]*):\s*(.*)$/);
|
|
177
|
-
if (kv) fields[kv[1]] = kv[2].trim();
|
|
178
|
-
}
|
|
179
|
-
return { fields, body: text.slice(m[0].length) };
|
|
180
|
-
}
|