@chankov/agent-fleet 0.0.10 → 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 +29 -27
- package/.pi/extensions/btw/index.ts +80 -83
- package/.pi/extensions/pi-voice-stt/README.md +7 -3
- package/.pi/extensions/pi-voice-stt/config.ts +1 -1
- package/.pi/harnesses/agent-hub/README.md +109 -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/agents/dispatch-policy.yaml +32 -0
- package/.versions/0.0.11/.pi/agents/model-profiles.yaml +27 -0
- package/.versions/0.0.11/.pi/agents/peers.yaml +142 -0
- package/.versions/0.0.11/.pi/agents/teams.yaml +41 -0
- package/.versions/0.0.11/.pi/damage-control-rules.yaml +297 -0
- package/.versions/0.0.11/.pi/extensions/agent-fleet-update-check/README.md +57 -0
- package/.versions/0.0.11/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.versions/0.0.11/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.versions/0.0.11/.pi/extensions/btw/README.md +119 -0
- package/.versions/0.0.11/.pi/extensions/btw/index.ts +917 -0
- package/.versions/0.0.11/.pi/extensions/btw/package.json +6 -0
- package/.versions/0.0.11/.pi/extensions/btw/state.js +179 -0
- package/.versions/0.0.11/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/0.0.11/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/0.0.11/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.0.11/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.0.11/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.0.11/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.0.11/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.0.11/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.0.11/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.0.11/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.0.11/.pi/extensions/package.json +9 -0
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/README.md +205 -0
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/0.0.11/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/README.md +1004 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/backend-policy.js +153 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/delegate.ts +435 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/footer.ts +31 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/helpers.ts +248 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/index.ts +9111 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/return-contract.js +293 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/run-budget.js +479 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/spawn.ts +354 -0
- package/.versions/0.0.11/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/0.0.11/.pi/harnesses/ask-user-remote/README.md +53 -0
- package/.versions/0.0.11/.pi/harnesses/ask-user-remote/index.ts +477 -0
- package/.versions/0.0.11/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/0.0.11/.pi/harnesses/coms/README.md +100 -0
- package/.versions/0.0.11/.pi/harnesses/coms/index.ts +1767 -0
- package/.versions/0.0.11/.pi/harnesses/coms/package.json +7 -0
- package/.versions/0.0.11/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/0.0.11/.pi/harnesses/damage-control-continue/README.md +124 -0
- package/.versions/0.0.11/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/0.0.11/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/0.0.11/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/0.0.11/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/0.0.11/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/0.0.11/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/0.0.11/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/0.0.11/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/0.0.11/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/0.0.11/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/0.0.11/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/0.0.11/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/0.0.11/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/0.0.11/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/0.0.11/.pi/harnesses/package-lock.json +2046 -0
- package/.versions/0.0.11/.pi/harnesses/package.json +10 -0
- package/.versions/0.0.11/.pi/prompts/af-build.md +24 -0
- package/{.claude/commands/code-simplify.md → .versions/0.0.11/.pi/prompts/af-code-simplify.md} +3 -3
- package/{.claude/commands/plan.md → .versions/0.0.11/.pi/prompts/af-plan.md} +1 -1
- package/{.claude/commands/review.md → .versions/0.0.11/.pi/prompts/af-review.md} +3 -3
- package/.versions/0.0.11/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/0.0.11/.pi/prompts/af-ship.md +17 -0
- package/{.claude/commands/spec.md → .versions/0.0.11/.pi/prompts/af-spec.md} +1 -1
- package/{.claude/commands/test.md → .versions/0.0.11/.pi/prompts/af-test.md} +2 -2
- package/.versions/0.0.11/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/0.0.11/.version +1 -0
- package/.versions/0.0.11/agents/architect.md +24 -0
- package/.versions/0.0.11/agents/bowser.md +27 -0
- package/.versions/0.0.11/agents/builder.md +54 -0
- package/.versions/0.0.11/agents/code-reviewer.md +208 -0
- package/.versions/0.0.11/agents/deep-researcher.md +32 -0
- package/.versions/0.0.11/agents/documenter.md +18 -0
- package/.versions/0.0.11/agents/orchestrator.md +72 -0
- package/.versions/0.0.11/agents/plan-reviewer.md +83 -0
- package/.versions/0.0.11/agents/planner.md +70 -0
- package/.versions/0.0.11/agents/releaser.md +24 -0
- package/.versions/0.0.11/agents/researcher.md +28 -0
- package/.versions/0.0.11/agents/security-auditor.md +167 -0
- package/.versions/0.0.11/agents/test-engineer.md +153 -0
- package/.versions/0.0.11/agents/web-debugger.md +43 -0
- package/.versions/0.0.11/agents/web-performance-auditor.md +193 -0
- package/.versions/0.0.11/codex/CONDUCTOR.md +148 -0
- package/.versions/0.0.11/docs/ARCHITECTURE.md +301 -0
- package/.versions/0.0.11/docs/agent-fleet-setup.md +351 -0
- package/.versions/0.0.11/docs/claude-code-coms-bridge.md +127 -0
- package/.versions/0.0.11/docs/codex-remote-conductor.md +170 -0
- package/.versions/0.0.11/docs/coms-hermes-bridge.md +189 -0
- package/.versions/0.0.11/docs/getting-started.md +43 -0
- package/.versions/0.0.11/docs/npm-install.md +96 -0
- package/.versions/0.0.11/docs/pi-extensions.md +368 -0
- package/.versions/0.0.11/docs/pi-setup.md +57 -0
- package/.versions/0.0.11/docs/skill-anatomy.md +150 -0
- package/.versions/0.0.11/hermes/README.md +347 -0
- package/.versions/0.0.11/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/0.0.11/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/0.0.11/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/0.0.11/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/0.0.11/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/0.0.11/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/0.0.11/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/0.0.11/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/0.0.11/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/0.0.11/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/0.0.11/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/0.0.11/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/0.0.11/install-manifest.json +2743 -0
- package/.versions/0.0.11/justfile +261 -0
- package/.versions/0.0.11/manifest-meta.json +881 -0
- package/.versions/0.0.11/references/accessibility-checklist.md +160 -0
- package/.versions/0.0.11/references/definition-of-done.md +67 -0
- package/.versions/0.0.11/references/fleet-coordination-patterns.md +151 -0
- package/.versions/0.0.11/references/observability-checklist.md +91 -0
- package/.versions/0.0.11/references/orchestration-patterns.md +370 -0
- package/.versions/0.0.11/references/performance-checklist.md +153 -0
- package/.versions/0.0.11/references/prompting-patterns.md +380 -0
- package/.versions/0.0.11/references/security-checklist.md +179 -0
- package/.versions/0.0.11/references/testing-patterns.md +236 -0
- package/.versions/0.0.11/scripts/codex-conductor.ts +41 -0
- package/.versions/0.0.11/scripts/codex-remote-control.ts +167 -0
- package/.versions/0.0.11/scripts/coms-claude-bridge.ts +401 -0
- package/.versions/0.0.11/scripts/coms-cli.ts +484 -0
- package/.versions/0.0.11/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/0.0.11/scripts/fleet.ts +168 -0
- package/.versions/0.0.11/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/0.0.11/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/0.0.11/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/0.0.11/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/0.0.11/scripts/lib/claude-bridge-core.ts +165 -0
- package/.versions/0.0.11/scripts/lib/codex-conductor.ts +88 -0
- package/.versions/0.0.11/scripts/lib/codex-remote-control.ts +480 -0
- package/.versions/0.0.11/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/0.0.11/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/0.0.11/scripts/lib/fleet-command.ts +119 -0
- package/.versions/0.0.11/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/0.0.11/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/0.0.11/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/0.0.11/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/0.0.11/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/0.0.11/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/0.0.11/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/0.0.11/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/0.0.11/scripts/lib/monitor-env.ts +146 -0
- package/.versions/0.0.11/scripts/lib/peer-launch.ts +314 -0
- package/.versions/0.0.11/scripts/lib/persona-banner.ts +62 -0
- package/.versions/0.0.11/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/0.0.11/scripts/lib/team-project.ts +193 -0
- package/.versions/0.0.11/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/0.0.11/scripts/peer-banner.ts +40 -0
- package/.versions/0.0.11/scripts/peer-launch.ts +259 -0
- package/.versions/0.0.11/scripts/team-snapshot.ts +237 -0
- package/.versions/0.0.11/scripts/team-up.ts +360 -0
- package/.versions/0.0.11/skills/_internal/grilling.md +11 -0
- package/.versions/0.0.11/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/0.0.11/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/0.0.11/skills/compound-learning/SKILL.md +137 -0
- package/.versions/0.0.11/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.0.11/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.0.11/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.0.11/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/0.0.11/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.11/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.0.11/skills/idea-refine/SKILL.md +182 -0
- package/.versions/0.0.11/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.11/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.11/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.11/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.11/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/0.0.11/skills/interview-me/SKILL.md +226 -0
- package/.versions/0.0.11/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/0.0.11/skills/peer-coms/SKILL.md +90 -0
- package/.versions/0.0.11/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.11/skills/planning-and-task-breakdown/SKILL.md +254 -0
- package/.versions/0.0.11/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/0.0.11/skills/spec-driven-development/SKILL.md +257 -0
- package/.versions/0.0.11/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/0.0.11/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/0.0.11/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- 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/.versions/1.0.0/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/1.0.0/.pi/prompts/af-plan.md +16 -0
- package/.versions/1.0.0/.pi/prompts/af-review.md +16 -0
- 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/1.0.0/.pi/prompts/af-spec.md +15 -0
- package/.versions/1.0.0/.pi/prompts/af-test.md +19 -0
- 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 +149 -0
- package/README.md +117 -79
- package/agents/orchestrator.md +1 -1
- package/{.versions/0.0.8/skills/guided-workspace-setup/companion-manifest.json → bin/catalog/harness-runtime-closure.json} +2 -0
- 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 +90 -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 +27 -1
- 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/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/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.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.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/{.opencode/commands → .versions/0.0.11/.pi/prompts}/af-set-hermes-telegram.md +0 -0
- /package/.versions/{0.0.9/skills/guided-workspace-setup/companion-manifest.json → 0.0.11/bin/catalog/harness-runtime-closure.json} +0 -0
- /package/{.claude/commands/set-hermes-telegram.md → .versions/1.0.0/.pi/prompts/af-set-hermes-telegram.md} +0 -0
- /package/{skills/guided-workspace-setup/companion-manifest.json → .versions/1.0.0/bin/catalog/harness-runtime-closure.json} +0 -0
package/bin/lib/manifest.js
CHANGED
|
@@ -17,12 +17,14 @@
|
|
|
17
17
|
import { readdirSync, existsSync, readFileSync } from "node:fs";
|
|
18
18
|
import { join } from "node:path";
|
|
19
19
|
|
|
20
|
-
import { listPersonas, targetRelPath } from "./
|
|
20
|
+
import { listPersonas, targetRelPath } from "./personas.js";
|
|
21
21
|
|
|
22
|
-
export const MANIFEST_SCHEMA_VERSION =
|
|
22
|
+
export const MANIFEST_SCHEMA_VERSION = 2;
|
|
23
|
+
export const SNAPSHOT_SCHEMA_VERSIONS = new Set([1, 2]);
|
|
24
|
+
export const STABILITY = ["stable", "experimental", "retired"];
|
|
23
25
|
|
|
24
26
|
// Fixed order everywhere the manifest emits per-agent data, so output is stable.
|
|
25
|
-
export const MANIFEST_AGENTS = ["
|
|
27
|
+
export const MANIFEST_AGENTS = ["pi"];
|
|
26
28
|
|
|
27
29
|
export const MANIFEST_FILE = "install-manifest.json";
|
|
28
30
|
export const MANIFEST_META_FILE = "manifest-meta.json";
|
|
@@ -30,7 +32,6 @@ export const MANIFEST_META_FILE = "manifest-meta.json";
|
|
|
30
32
|
const STRATEGIES = [
|
|
31
33
|
"copy-file",
|
|
32
34
|
"copy-tree",
|
|
33
|
-
"transform-persona",
|
|
34
35
|
"managed-region",
|
|
35
36
|
"json-merge",
|
|
36
37
|
"exec",
|
|
@@ -47,15 +48,11 @@ const ID_RE = /^[a-z][a-z-]*:[a-z0-9][a-z0-9._-]*$/;
|
|
|
47
48
|
const SKILL_ROOTS = ["skills", join("vendor", "agent-skills-upstream", "skills")];
|
|
48
49
|
|
|
49
50
|
const SKILL_TARGET_DIR = {
|
|
50
|
-
"
|
|
51
|
-
"opencode": ".opencode/skills",
|
|
52
|
-
"pi": ".pi/skills",
|
|
51
|
+
"pi": ".pi/skills",
|
|
53
52
|
};
|
|
54
53
|
|
|
55
54
|
const COMMAND_SOURCE = {
|
|
56
|
-
"
|
|
57
|
-
"opencode": { dir: ".opencode/commands", prefix: "af-" },
|
|
58
|
-
"pi": { dir: ".pi/prompts", prefix: "af-" },
|
|
55
|
+
"pi": { dir: ".pi/prompts", prefix: "af-" },
|
|
59
56
|
};
|
|
60
57
|
|
|
61
58
|
// ── build ───────────────────────────────────────────────────────────────────
|
|
@@ -98,6 +95,8 @@ export function buildManifest({ sourceRoot, packageVersion, meta = null }) {
|
|
|
98
95
|
schemaVersion: MANIFEST_SCHEMA_VERSION,
|
|
99
96
|
packageVersion,
|
|
100
97
|
groups: m.groups,
|
|
98
|
+
presets: m.presets ?? {},
|
|
99
|
+
features: m.features ?? {},
|
|
101
100
|
profiles: m.profiles,
|
|
102
101
|
items: items.sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)),
|
|
103
102
|
});
|
|
@@ -112,14 +111,45 @@ export function loadMeta(sourceRoot) {
|
|
|
112
111
|
return JSON.parse(readFileSync(join(sourceRoot, MANIFEST_META_FILE), "utf8"));
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
export function
|
|
114
|
+
export function loadCurrentManifest(sourceRoot) {
|
|
116
115
|
const path = join(sourceRoot, MANIFEST_FILE);
|
|
117
116
|
if (!existsSync(path)) {
|
|
118
|
-
throw new Error(
|
|
119
|
-
`${MANIFEST_FILE} is missing from ${sourceRoot} — run \`node bin/build-manifest.js\``,
|
|
120
|
-
);
|
|
117
|
+
throw new Error(`${MANIFEST_FILE} is missing from ${sourceRoot} — run \`node bin/build-manifest.js\``);
|
|
121
118
|
}
|
|
122
|
-
|
|
119
|
+
const manifest = JSON.parse(readFileSync(path, "utf8"));
|
|
120
|
+
const problems = validateManifest(manifest, { sourceRoot });
|
|
121
|
+
if (problems.length) throw new Error(`invalid current manifest:\n${problems.join("\n")}`);
|
|
122
|
+
return manifest;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** Load historical merge metadata without mutating its on-disk schema-v1 form. */
|
|
126
|
+
export function loadSnapshotManifest(sourceRoot) {
|
|
127
|
+
const path = join(sourceRoot, MANIFEST_FILE);
|
|
128
|
+
if (!existsSync(path)) return null;
|
|
129
|
+
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
130
|
+
if (!SNAPSHOT_SCHEMA_VERSIONS.has(raw.schemaVersion)) {
|
|
131
|
+
throw new Error(`unsupported snapshot manifest schemaVersion ${raw.schemaVersion}`);
|
|
132
|
+
}
|
|
133
|
+
const manifest = raw.schemaVersion === 1 ? normalizeV1Manifest(raw) : raw;
|
|
134
|
+
const problems = validateSnapshotManifest(manifest);
|
|
135
|
+
if (problems.length) throw new Error(`invalid snapshot manifest:\n${problems.join("\n")}`);
|
|
136
|
+
return manifest;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Compatibility alias for runtime callers; current package metadata is always v2. */
|
|
140
|
+
export const loadManifest = loadCurrentManifest;
|
|
141
|
+
|
|
142
|
+
export function normalizeV1Manifest(manifest) {
|
|
143
|
+
return {
|
|
144
|
+
...manifest,
|
|
145
|
+
schemaVersion: 2,
|
|
146
|
+
presets: {},
|
|
147
|
+
features: {},
|
|
148
|
+
items: (manifest.items ?? []).map((item) => ({
|
|
149
|
+
...item,
|
|
150
|
+
stability: item.retired ? "retired" : "stable",
|
|
151
|
+
})),
|
|
152
|
+
};
|
|
123
153
|
}
|
|
124
154
|
|
|
125
155
|
// ── derivation ──────────────────────────────────────────────────────────────
|
|
@@ -160,25 +190,17 @@ function deriveSkills(sourceRoot, meta) {
|
|
|
160
190
|
|
|
161
191
|
function derivePersonas(sourceRoot, meta) {
|
|
162
192
|
const excluded = new Set(meta.exclude?.personas ?? []);
|
|
163
|
-
const perAgent = new Map(
|
|
164
|
-
MANIFEST_AGENTS.map((agent) => [
|
|
165
|
-
agent,
|
|
166
|
-
new Map(listPersonas(sourceRoot, { agent }).map((p) => [p.name, p])),
|
|
167
|
-
]),
|
|
168
|
-
);
|
|
169
|
-
|
|
170
193
|
const names = uniqSorted(
|
|
171
|
-
|
|
194
|
+
listPersonas(sourceRoot).map((p) => p.name).filter((n) => !excluded.has(n)),
|
|
172
195
|
);
|
|
173
196
|
|
|
174
197
|
return names.map((name) => {
|
|
175
198
|
const agents = {};
|
|
176
199
|
for (const agent of MANIFEST_AGENTS) {
|
|
177
|
-
if (!perAgent.get(agent).has(name)) continue; // pi-only persona
|
|
178
200
|
agents[agent] = {
|
|
179
201
|
source: [`agents/${name}.md`],
|
|
180
|
-
target: targetRelPath(
|
|
181
|
-
strategy:
|
|
202
|
+
target: targetRelPath(name).split("\\").join("/"),
|
|
203
|
+
strategy: "copy-file",
|
|
182
204
|
};
|
|
183
205
|
}
|
|
184
206
|
return makeItem(meta, {
|
|
@@ -217,9 +239,9 @@ function deriveCommands(sourceRoot, meta) {
|
|
|
217
239
|
source: [rel],
|
|
218
240
|
target: rel,
|
|
219
241
|
strategy: "copy-file",
|
|
220
|
-
// pi
|
|
221
|
-
//
|
|
222
|
-
//
|
|
242
|
+
// pi commands used to install unprefixed. A workspace set up before
|
|
243
|
+
// the `af-` namespace still has the old file, and pi will happily
|
|
244
|
+
// keep offering `/spec` from it. Declaring the old path lets
|
|
223
245
|
// apply() retire it under the same ownership rule as anything else.
|
|
224
246
|
...(prefix ? { legacyTargets: [`${dir}/${name}.md`] } : {}),
|
|
225
247
|
};
|
|
@@ -245,19 +267,20 @@ function deriveReferences(sourceRoot, meta) {
|
|
|
245
267
|
.sort()
|
|
246
268
|
.map((file) => {
|
|
247
269
|
const name = file.slice(0, -3);
|
|
248
|
-
//
|
|
249
|
-
//
|
|
250
|
-
//
|
|
270
|
+
// A reference is never chosen on its own merits — it is the long-form
|
|
271
|
+
// half of a skill that cites it by path. meta wires each one as a
|
|
272
|
+
// `companions:` entry of the citing skills, so selecting the skill
|
|
273
|
+
// brings its checklists and uninstall refuses to strand them.
|
|
251
274
|
return makeItem(meta, {
|
|
252
275
|
id: `reference:${name}`,
|
|
253
276
|
kind: "reference",
|
|
254
|
-
group: "references
|
|
277
|
+
group: "references",
|
|
255
278
|
title: name,
|
|
256
279
|
summary: "",
|
|
257
280
|
agents: {
|
|
258
|
-
|
|
281
|
+
pi: {
|
|
259
282
|
source: [`references/${file}`],
|
|
260
|
-
target: `.
|
|
283
|
+
target: `.pi/references/${file}`,
|
|
261
284
|
strategy: "copy-file",
|
|
262
285
|
},
|
|
263
286
|
},
|
|
@@ -272,16 +295,19 @@ function deriveHooks(sourceRoot, meta) {
|
|
|
272
295
|
.sort()
|
|
273
296
|
.map((file) => {
|
|
274
297
|
const name = file.replace(/\.(sh|mjs)$/, "");
|
|
275
|
-
//
|
|
276
|
-
//
|
|
298
|
+
// The one hook left is the Claude Code Stop hook the coms bridge reads,
|
|
299
|
+
// so it installs under `.claude/` even though the agent is pi: the
|
|
300
|
+
// bridged pane is a Claude Code process, and that is where Claude Code
|
|
301
|
+
// looks. Registering it in `.claude/settings.json` stays manual —
|
|
302
|
+
// docs/claude-code-coms-bridge.md carries the snippet.
|
|
277
303
|
return makeItem(meta, {
|
|
278
304
|
id: `hook:${name}`,
|
|
279
305
|
kind: "hook",
|
|
280
|
-
group: "
|
|
306
|
+
group: "coms-bridge",
|
|
281
307
|
title: name,
|
|
282
308
|
summary: "",
|
|
283
309
|
agents: {
|
|
284
|
-
|
|
310
|
+
pi: {
|
|
285
311
|
source: [`hooks/${file}`],
|
|
286
312
|
target: `.claude/hooks/${file}`,
|
|
287
313
|
strategy: "copy-file",
|
|
@@ -411,9 +437,7 @@ function deriveCompanions(sourceRoot, meta) {
|
|
|
411
437
|
}));
|
|
412
438
|
}
|
|
413
439
|
|
|
414
|
-
const closurePath = join(
|
|
415
|
-
sourceRoot, "skills", "guided-workspace-setup", "companion-manifest.json",
|
|
416
|
-
);
|
|
440
|
+
const closurePath = join(sourceRoot, "bin", "catalog", "harness-runtime-closure.json");
|
|
417
441
|
if (existsSync(closurePath)) {
|
|
418
442
|
const closure = JSON.parse(readFileSync(closurePath, "utf8"));
|
|
419
443
|
// `justfile` is in the closure list but needs the managed-region strategy,
|
|
@@ -474,6 +498,7 @@ function makeItem(meta, base) {
|
|
|
474
498
|
title: base.title,
|
|
475
499
|
summary: overrides.summary ?? base.summary ?? "",
|
|
476
500
|
recommended: (meta.recommended ?? []).includes(base.id),
|
|
501
|
+
stability: overrides.stability ?? (overrides.retired ? "retired" : "stable"),
|
|
477
502
|
consent: overrides.consent ?? base.consent ?? "file",
|
|
478
503
|
platform: overrides.platform ?? base.platform ?? "any",
|
|
479
504
|
agents: orderAgents(base.agents),
|
|
@@ -517,8 +542,8 @@ function orderAgents(agents) {
|
|
|
517
542
|
return out;
|
|
518
543
|
}
|
|
519
544
|
|
|
520
|
-
function orderedManifest({ schemaVersion, packageVersion, groups, profiles, items }) {
|
|
521
|
-
return { schemaVersion, packageVersion, groups, profiles, items };
|
|
545
|
+
function orderedManifest({ schemaVersion, packageVersion, groups, presets, features, profiles, items }) {
|
|
546
|
+
return { schemaVersion, packageVersion, groups, presets, features, profiles, items };
|
|
522
547
|
}
|
|
523
548
|
|
|
524
549
|
// ── validation ──────────────────────────────────────────────────────────────
|
|
@@ -532,13 +557,14 @@ function orderedManifest({ schemaVersion, packageVersion, groups, profiles, item
|
|
|
532
557
|
* @param {string} [opts.sourceRoot]
|
|
533
558
|
* @returns {string[]}
|
|
534
559
|
*/
|
|
535
|
-
export function validateManifest(manifest, { sourceRoot = null } = {}) {
|
|
560
|
+
export function validateManifest(manifest, { sourceRoot = null, snapshot = false } = {}) {
|
|
536
561
|
const problems = [];
|
|
537
562
|
|
|
538
563
|
if (manifest.schemaVersion !== MANIFEST_SCHEMA_VERSION) {
|
|
539
|
-
problems.push(
|
|
540
|
-
|
|
541
|
-
|
|
564
|
+
problems.push(`schemaVersion is ${manifest.schemaVersion}, expected ${MANIFEST_SCHEMA_VERSION}`);
|
|
565
|
+
}
|
|
566
|
+
if (!snapshot && (!manifest.presets || !manifest.features)) {
|
|
567
|
+
problems.push("schema v2 manifest requires presets and features");
|
|
542
568
|
}
|
|
543
569
|
if (!manifest.packageVersion) problems.push("packageVersion is missing");
|
|
544
570
|
|
|
@@ -555,6 +581,7 @@ export function validateManifest(manifest, { sourceRoot = null } = {}) {
|
|
|
555
581
|
if (!groupIds.has(item.group)) problems.push(`${at}: unknown group "${item.group}"`);
|
|
556
582
|
if (!CONSENT.includes(item.consent)) problems.push(`${at}: unknown consent "${item.consent}"`);
|
|
557
583
|
if (!PLATFORMS.includes(item.platform)) problems.push(`${at}: unknown platform "${item.platform}"`);
|
|
584
|
+
if (!STABILITY.includes(item.stability)) problems.push(`${at}: invalid stability "${item.stability}"`);
|
|
558
585
|
|
|
559
586
|
const agents = Object.keys(item.agents ?? {});
|
|
560
587
|
if (agents.length === 0) problems.push(`${at}: has no agent bindings`);
|
|
@@ -617,6 +644,41 @@ export function validateManifest(manifest, { sourceRoot = null } = {}) {
|
|
|
617
644
|
}
|
|
618
645
|
}
|
|
619
646
|
|
|
647
|
+
for (const [name, preset] of Object.entries(manifest.presets ?? {})) {
|
|
648
|
+
if (preset.rule && preset.items) problems.push(`preset ${name}: declares both "rule" and "items"`);
|
|
649
|
+
if (!preset.rule && !preset.items) problems.push(`preset ${name}: declares neither "rule" nor "items"`);
|
|
650
|
+
if (preset.rule && preset.rule !== "stable") problems.push(`preset ${name}: unknown rule "${preset.rule}"`);
|
|
651
|
+
for (const id of preset.items ?? []) {
|
|
652
|
+
const item = (manifest.items ?? []).find((candidate) => candidate.id === id);
|
|
653
|
+
if (!item) problems.push(`preset ${name}: unknown item "${id}"`);
|
|
654
|
+
else if (item.stability === "retired") problems.push(`preset ${name}: selectable retired item "${id}"`);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
const features = manifest.features ?? {};
|
|
659
|
+
for (const [name, feature] of Object.entries(features)) {
|
|
660
|
+
if (!STABILITY.includes(feature.stability)) problems.push(`feature ${name}: invalid stability "${feature.stability}"`);
|
|
661
|
+
if (feature.platform && !PLATFORMS.includes(feature.platform)) problems.push(`feature ${name}: unknown platform "${feature.platform}"`);
|
|
662
|
+
for (const id of feature.items ?? []) {
|
|
663
|
+
const item = (manifest.items ?? []).find((candidate) => candidate.id === id);
|
|
664
|
+
if (!item) problems.push(`feature ${name}: unknown item "${id}"`);
|
|
665
|
+
else if (item.stability === "retired") problems.push(`feature ${name}: selectable retired item "${id}"`);
|
|
666
|
+
}
|
|
667
|
+
for (const dependency of feature.requiresFeatures ?? []) {
|
|
668
|
+
if (!features[dependency]) problems.push(`feature ${name}: unknown feature dependency "${dependency}"`);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
for (const name of Object.keys(features)) {
|
|
672
|
+
const visit = (featureName, path = []) => {
|
|
673
|
+
if (path.includes(featureName)) {
|
|
674
|
+
problems.push(`feature dependency cycle: ${[...path, featureName].join(" -> ")}`);
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
for (const dependency of features[featureName]?.requiresFeatures ?? []) visit(dependency, [...path, featureName]);
|
|
678
|
+
};
|
|
679
|
+
visit(name);
|
|
680
|
+
}
|
|
681
|
+
|
|
620
682
|
for (const [name, profile] of Object.entries(manifest.profiles ?? {})) {
|
|
621
683
|
if (profile.rule && profile.items) {
|
|
622
684
|
problems.push(`profile ${name}: declares both "rule" and "items"`);
|
|
@@ -635,6 +697,23 @@ export function validateManifest(manifest, { sourceRoot = null } = {}) {
|
|
|
635
697
|
return problems;
|
|
636
698
|
}
|
|
637
699
|
|
|
700
|
+
export function validateSnapshotManifest(manifest) {
|
|
701
|
+
const problems = [];
|
|
702
|
+
const ids = new Set((manifest.items ?? []).map((item) => item.id));
|
|
703
|
+
if (!Array.isArray(manifest.items)) problems.push("items is missing");
|
|
704
|
+
for (const item of manifest.items ?? []) {
|
|
705
|
+
if (!ID_RE.test(item.id ?? "")) problems.push(`item ${item.id}: invalid id`);
|
|
706
|
+
if (!STABILITY.includes(item.stability)) problems.push(`item ${item.id}: invalid stability "${item.stability}"`);
|
|
707
|
+
for (const key of ["companions", "requires", "pinnedBy", "parents"]) {
|
|
708
|
+
for (const ref of item[key] ?? []) if (!ids.has(ref)) problems.push(`item ${item.id}: ${key} references unknown item "${ref}"`);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
// V1 snapshots predate presets/features and may have agent bindings the
|
|
712
|
+
// current package no longer supports; their role is a merge base, not a
|
|
713
|
+
// current install catalogue.
|
|
714
|
+
return problems;
|
|
715
|
+
}
|
|
716
|
+
|
|
638
717
|
// ── queries ─────────────────────────────────────────────────────────────────
|
|
639
718
|
|
|
640
719
|
/** Items installable for one agent, with that agent's binding resolved. */
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Preserve user-authored override sections while deterministically refreshing generated facts.
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { OVERRIDES_REL_PATH } from "./validate-overrides.js";
|
|
5
|
+
|
|
6
|
+
export function generatedOverrideSection(scan) {
|
|
7
|
+
const lines = [];
|
|
8
|
+
if (scan.rules.length) lines.push(`rules: ${scan.rules.join(", ")}`);
|
|
9
|
+
if (scan.docs.length) lines.push(`docs: ${scan.docs.join(", ")}`);
|
|
10
|
+
return lines.length ? `## agent-hub\n${lines.join("\n")}\n` : "";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Replace only generated agent-hub keys, retaining all unknown/hand-written text. */
|
|
14
|
+
export function mergeOverrides(existing, scan) {
|
|
15
|
+
const generated = generatedOverrideSection(scan);
|
|
16
|
+
if (!generated) return existing ?? "";
|
|
17
|
+
const source = existing ?? "";
|
|
18
|
+
const sections = source.split(/(?=^##\s)/m);
|
|
19
|
+
let found = false;
|
|
20
|
+
const merged = sections.map((section) => {
|
|
21
|
+
if (!/^##\s+agent-hub\s*$/m.test(section)) return section;
|
|
22
|
+
found = true;
|
|
23
|
+
const retained = section.split("\n").filter((line) => !/^(rules|docs):\s*/.test(line)).join("\n").replace(/\n+$/, "");
|
|
24
|
+
return `${retained}\n${generated.replace(/^## agent-hub\n/, "")}`;
|
|
25
|
+
});
|
|
26
|
+
if (!found) merged.push(generated);
|
|
27
|
+
return merged.join("").replace(/^\n+/, "").replace(/\n*$/, "\n");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function planOverrides(workspace, scan) {
|
|
31
|
+
const path = join(workspace, OVERRIDES_REL_PATH);
|
|
32
|
+
const existing = existsSync(path) ? readFileSync(path, "utf8") : "";
|
|
33
|
+
const text = mergeOverrides(existing, scan);
|
|
34
|
+
return { path, text, write: text !== existing };
|
|
35
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// personas.js — the canonical persona catalogue.
|
|
2
|
+
//
|
|
3
|
+
// `agents/*.md` is written in pi's own frontmatter dialect, so installing a
|
|
4
|
+
// persona is a plain file copy: source and target carry identical bytes.
|
|
5
|
+
// There is no per-agent frontmatter translation any more — the `transform-persona`
|
|
6
|
+
// CLI subcommand and its mapping table went away with Claude Code as an
|
|
7
|
+
// install target (docs/claude-code-coms-bridge.md explains what remains).
|
|
8
|
+
//
|
|
9
|
+
// Used by manifest.js to derive the `persona:*` items.
|
|
10
|
+
|
|
11
|
+
import { readdirSync, existsSync } from "node:fs";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
|
|
14
|
+
/** Install path for a persona, relative to the workspace root. */
|
|
15
|
+
export function targetRelPath(name) {
|
|
16
|
+
return join("agents", `${name}.md`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Every persona in `<sourceRoot>/agents`, sorted by name.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} sourceRoot agent-fleet package root (absolute)
|
|
23
|
+
* @returns {Array<{name: string, sourcePath: string, targetRelPath: string}>}
|
|
24
|
+
*/
|
|
25
|
+
export function listPersonas(sourceRoot) {
|
|
26
|
+
const dir = join(sourceRoot, "agents");
|
|
27
|
+
if (!existsSync(dir)) return [];
|
|
28
|
+
return readdirSync(dir)
|
|
29
|
+
.filter((f) => f.endsWith(".md"))
|
|
30
|
+
.map((f) => f.replace(/\.md$/, ""))
|
|
31
|
+
.sort()
|
|
32
|
+
.map((name) => ({
|
|
33
|
+
name,
|
|
34
|
+
sourcePath: join(dir, `${name}.md`),
|
|
35
|
+
targetRelPath: targetRelPath(name),
|
|
36
|
+
}));
|
|
37
|
+
}
|
package/bin/lib/plan.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// See plans/deterministic-installer-manifest-spec.md §4 for the state and merge
|
|
15
15
|
// tables this implements, and plans/deterministic-installer.md phases 3 and 5.
|
|
16
16
|
|
|
17
|
-
import { itemsForAgent, resolveSelection } from "./manifest.js";
|
|
17
|
+
import { itemsForAgent, resolveSelection, loadSnapshotManifest } from "./manifest.js";
|
|
18
18
|
import { evaluateWorkspace, resolveBaseRoot } from "./verify.js";
|
|
19
19
|
import { readState, readLegacyRecord, isAgentFleetCheckout } from "./state.js";
|
|
20
20
|
|
|
@@ -84,13 +84,23 @@ export function buildPlan({
|
|
|
84
84
|
const resolvedAgent = agent ?? state?.agent ?? legacy?.agent ?? null;
|
|
85
85
|
if (!resolvedAgent) {
|
|
86
86
|
throw new Error(
|
|
87
|
-
"cannot plan without a coding agent — pass --agent
|
|
87
|
+
"cannot plan without a coding agent — pass --agent pi",
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
const recordedVersion = state?.packageVersion ?? legacy?.version ?? null;
|
|
92
92
|
const stateSource = state ? "state-file" : legacy ? "legacy-record" : "none";
|
|
93
93
|
const baseRoot = resolveBaseRoot(sourceRoot, recordedVersion);
|
|
94
|
+
// Pre-manifest snapshots (no install-manifest.json) remain valid merge bases.
|
|
95
|
+
// Corrupt or unsupported snapshot metadata must fail closed — never silent two-way.
|
|
96
|
+
let snapshotMetadataError = null;
|
|
97
|
+
if (baseRoot) {
|
|
98
|
+
try {
|
|
99
|
+
loadSnapshotManifest(baseRoot);
|
|
100
|
+
} catch (error) {
|
|
101
|
+
snapshotMetadataError = error.message;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
94
104
|
|
|
95
105
|
// Symlink installs survive only inside an agent-fleet checkout (see
|
|
96
106
|
// isAgentFleetCheckout). A workspace that recorded `symlink` before the
|
|
@@ -218,7 +228,8 @@ export function buildPlan({
|
|
|
218
228
|
packageVersion,
|
|
219
229
|
recordedVersion,
|
|
220
230
|
stateSource,
|
|
221
|
-
baseAvailable: Boolean(baseRoot),
|
|
231
|
+
baseAvailable: Boolean(baseRoot) && !snapshotMetadataError,
|
|
232
|
+
snapshotMetadataError,
|
|
222
233
|
selection: {
|
|
223
234
|
profiles: [...profiles].sort(),
|
|
224
235
|
requested: [...items].sort(),
|
|
@@ -538,12 +549,10 @@ function describe(evaluation) {
|
|
|
538
549
|
// What the human does instead, for the two classes the engine won't do itself.
|
|
539
550
|
if (evaluation.operatorSteps) out.operatorSteps = evaluation.operatorSteps;
|
|
540
551
|
if (evaluation.packageSpec) out.packageSpec = evaluation.packageSpec;
|
|
541
|
-
//
|
|
542
|
-
//
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
);
|
|
546
|
-
if (notable.length > 0) out.files = notable.map((f) => ({ path: f.path, state: f.state }));
|
|
552
|
+
// Transaction recovery needs the complete owned file set, not merely paths
|
|
553
|
+
// notable to the confirmation screen. These are workspace-relative leaves.
|
|
554
|
+
const files = evaluation.files ?? [];
|
|
555
|
+
if (files.length > 0) out.files = files.map((f) => ({ path: f.path, state: f.state }));
|
|
547
556
|
return out;
|
|
548
557
|
}
|
|
549
558
|
|
package/bin/lib/purge.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// purge.js — explicit human-config boundary for state-owned uninstall.
|
|
2
|
+
import { existsSync, rmSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
const HUMAN_CONFIG = [".ai/agent-fleet.json", ".ai/agent-fleet-overrides.md", ".ai/stt.json"];
|
|
6
|
+
export function purgeHumanConfig(workspace, { purgeConfig = false } = {}) {
|
|
7
|
+
if (!purgeConfig) return { removed: [], preserved: HUMAN_CONFIG.filter((path) => existsSync(join(workspace, path))) };
|
|
8
|
+
const removed = [];
|
|
9
|
+
for (const path of HUMAN_CONFIG) if (existsSync(join(workspace, path))) { rmSync(join(workspace, path), { force: true }); removed.push(path); }
|
|
10
|
+
return { removed, preserved: [] };
|
|
11
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// reconcile.js — desired state × manifest × disk × ownership ledger.
|
|
2
|
+
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { resolveDesiredState, DESIRED_FILE } from "./desired.js";
|
|
6
|
+
import { resolveDesiredFeatures } from "./features.js";
|
|
7
|
+
import { buildPlan } from "./plan.js";
|
|
8
|
+
import { readState } from "./state.js";
|
|
9
|
+
import { scanProject } from "./scan.js";
|
|
10
|
+
import { planOverrides } from "./overrides.js";
|
|
11
|
+
import { appendEnvPlaceholders, renderSttConfig } from "./stt-wizard.js";
|
|
12
|
+
|
|
13
|
+
/** Build one setup plan. This function writes nothing. */
|
|
14
|
+
export function buildReconcilePlan(opts) {
|
|
15
|
+
const { workspace, manifest, sourceRoot, packageVersion, agent = "pi", method,
|
|
16
|
+
preset, features, saveDesired = false, tuiDesired = null, dryRun = false,
|
|
17
|
+
migrate = false, yes = false, accept = null, platform = process.platform } = opts;
|
|
18
|
+
const state = readState(workspace);
|
|
19
|
+
const desiredPath = join(workspace, DESIRED_FILE);
|
|
20
|
+
const firstMigration = Boolean(state && !existsSync(desiredPath));
|
|
21
|
+
const explicitDesired = preset !== undefined && features !== undefined;
|
|
22
|
+
|
|
23
|
+
if (migrate && !firstMigration) throw new Error("--migrate is valid only for first-migration workspaces");
|
|
24
|
+
let migrationBlocked = false;
|
|
25
|
+
if (firstMigration && !dryRun && (!migrate || !yes || !explicitDesired)) {
|
|
26
|
+
migrationBlocked = true;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const desiredResult = resolveDesiredState({ workspace, manifest, preset, features, saveDesired, tuiDesired, dryRun });
|
|
30
|
+
const featureResult = resolveDesiredFeatures(manifest, {
|
|
31
|
+
preset: desiredResult.desired.preset,
|
|
32
|
+
features: Object.entries(desiredResult.desired.features).filter(([, enabled]) => enabled).map(([name]) => name),
|
|
33
|
+
agent, platform,
|
|
34
|
+
});
|
|
35
|
+
const base = buildPlan({ workspace, sourceRoot, packageVersion, manifest, verb: "install", agent,
|
|
36
|
+
method, items: featureResult.roots, accept, platform });
|
|
37
|
+
const wanted = new Set(featureResult.selected);
|
|
38
|
+
const overrides = planOverrides(workspace, scanProject(workspace));
|
|
39
|
+
const sttConfig = featureResult.features.includes("voice")
|
|
40
|
+
? { provider: "openai", apiKeyEnv: "OPENAI_API_KEY" }
|
|
41
|
+
: null;
|
|
42
|
+
const stt = sttConfig ? {
|
|
43
|
+
path: join(workspace, ".ai", "stt.json"), text: renderSttConfig(sttConfig),
|
|
44
|
+
env: appendEnvPlaceholders(workspace, sttConfig),
|
|
45
|
+
} : null;
|
|
46
|
+
const recorded = Object.keys(state?.items ?? {});
|
|
47
|
+
const removals = recorded.filter((id) => !wanted.has(id)).sort().map((id) => ({
|
|
48
|
+
kind: "remove", id, itemKind: state.items[id].kind ?? "unknown", consent: "file", state: "owned",
|
|
49
|
+
owned: true, target: state.items[id].files?.[0]?.path ?? null,
|
|
50
|
+
paths: (state.items[id].files ?? []).map((file) => file.path).sort(),
|
|
51
|
+
reason: "not selected by desired state",
|
|
52
|
+
}));
|
|
53
|
+
// Desired state narrows ownership; no unrecorded/foreign path is ever named.
|
|
54
|
+
const actions = base.actions.filter((action) => !(action.kind === "keep" && !wanted.has(action.id))).concat(removals);
|
|
55
|
+
const conflicts = actions.filter((action) => action.kind === "conflict");
|
|
56
|
+
return {
|
|
57
|
+
...base, verb: "setup", desired: desiredResult.desired, desiredPath: desiredResult.path,
|
|
58
|
+
writeDesired: desiredResult.writeDesired, firstMigration, migrationBlocked,
|
|
59
|
+
migrationError: migrationBlocked
|
|
60
|
+
? "first migration requires --migrate --preset <default|full> --features <exact-set> --yes"
|
|
61
|
+
: null,
|
|
62
|
+
selection: { ...base.selection, desired: featureResult, resolved: featureResult.selected },
|
|
63
|
+
actions, conflicts,
|
|
64
|
+
overrides,
|
|
65
|
+
stt,
|
|
66
|
+
summary: { ...base.summary, remove: removals.length, changes: base.summary.changes + removals.length },
|
|
67
|
+
};
|
|
68
|
+
}
|
package/bin/lib/scan.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Deterministic, bounded project facts used for generated overrides.
|
|
2
|
+
import { existsSync, statSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
const RULE_DIRS = [".cursor/rules", ".github/rules", "rules", ".agent/rules"];
|
|
6
|
+
const DOC_PATHS = ["docs", "DOCS.md", "README.md"];
|
|
7
|
+
|
|
8
|
+
function existingDirectories(workspace, candidates) {
|
|
9
|
+
return candidates.filter((path) => {
|
|
10
|
+
try { return existsSync(join(workspace, path)) && statSync(join(workspace, path)).isDirectory(); }
|
|
11
|
+
catch { return false; }
|
|
12
|
+
}).sort();
|
|
13
|
+
}
|
|
14
|
+
function existingPaths(workspace, candidates) {
|
|
15
|
+
return candidates.filter((path) => existsSync(join(workspace, path))).sort();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Scan only declared conventional paths; never recursively crawls a project. */
|
|
19
|
+
export function scanProject(workspace) {
|
|
20
|
+
return {
|
|
21
|
+
rules: existingDirectories(workspace, RULE_DIRS),
|
|
22
|
+
docs: existingPaths(workspace, DOC_PATHS),
|
|
23
|
+
};
|
|
24
|
+
}
|
package/bin/lib/state.js
CHANGED
|
@@ -56,6 +56,7 @@ export function emptyState({ agent, method, packageVersion, sourceRoot, profiles
|
|
|
56
56
|
updatedAt: now,
|
|
57
57
|
items: {},
|
|
58
58
|
externalPackages: [],
|
|
59
|
+
runtimeRepairs: [],
|
|
59
60
|
events: [],
|
|
60
61
|
};
|
|
61
62
|
}
|
|
@@ -77,6 +78,7 @@ function orderState(state) {
|
|
|
77
78
|
Object.keys(state.items ?? {}).sort().map((k) => [k, state.items[k]]),
|
|
78
79
|
),
|
|
79
80
|
externalPackages: state.externalPackages ?? [],
|
|
81
|
+
runtimeRepairs: state.runtimeRepairs ?? [],
|
|
80
82
|
events: (state.events ?? []).slice(-MAX_EVENTS),
|
|
81
83
|
};
|
|
82
84
|
}
|
|
@@ -166,7 +168,11 @@ export function inspectPath(path) {
|
|
|
166
168
|
return { kind: st.isDirectory() ? "dir" : "file" };
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
/** True when `child` is inside `parent` (or equal),
|
|
171
|
+
/** True when `child` is inside `parent` (or equal), comparing normalized paths.
|
|
172
|
+
*
|
|
173
|
+
* Both arguments must already be resolved the same way. Callers holding a
|
|
174
|
+
* realpath — anything from `inspectPath().linkTarget` — want
|
|
175
|
+
* `linkPointsInside` instead. */
|
|
170
176
|
export function isInside(parent, child) {
|
|
171
177
|
if (!parent || !child) return false;
|
|
172
178
|
const p = resolve(parent);
|
|
@@ -174,6 +180,24 @@ export function isInside(parent, child) {
|
|
|
174
180
|
return c === p || c.startsWith(p.endsWith(sep) ? p : p + sep);
|
|
175
181
|
}
|
|
176
182
|
|
|
183
|
+
/**
|
|
184
|
+
* True when a symlink's resolved target points into `root`.
|
|
185
|
+
*
|
|
186
|
+
* `inspectPath` reports `linkTarget` through realpathSync, so the root it is
|
|
187
|
+
* measured against has to be resolved the same way. Comparing a realpath
|
|
188
|
+
* against a raw path disagrees the moment any component of the root is itself a
|
|
189
|
+
* symlink, and the answer is silently wrong rather than an error: the planner
|
|
190
|
+
* decides a perfectly good link points outside the source tree and schedules a
|
|
191
|
+
* repair. On macOS both /tmp and /var are symlinks, which is where this
|
|
192
|
+
* surfaced.
|
|
193
|
+
*/
|
|
194
|
+
export function linkPointsInside(root, linkTarget) {
|
|
195
|
+
if (!root || !linkTarget) return false;
|
|
196
|
+
let resolvedRoot = root;
|
|
197
|
+
try { resolvedRoot = realpathSync(root); } catch { /* unresolvable: compare as given */ }
|
|
198
|
+
return isInside(resolvedRoot, linkTarget);
|
|
199
|
+
}
|
|
200
|
+
|
|
177
201
|
/**
|
|
178
202
|
* npx caches are wiped without warning, which breaks every symlink pointing
|
|
179
203
|
* into them. A recorded source root inside one is flagged so `verify` can warn
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Non-secret STT configuration. Values are env-var names only.
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
const PROVIDERS = {
|
|
6
|
+
openai: { apiKeyEnv: "OPENAI_API_KEY" },
|
|
7
|
+
groq: { apiKeyEnv: "GROQ_API_KEY" },
|
|
8
|
+
azure: { apiKeyEnv: "AZURE_OPENAI_API_KEY", endpointEnv: "AZURE_OPENAI_ENDPOINT" },
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export function validateSttConfig(value) {
|
|
12
|
+
const spec = PROVIDERS[value?.provider];
|
|
13
|
+
if (!spec) throw new Error(`unsupported STT provider "${value?.provider}"`);
|
|
14
|
+
for (const key of ["apiKeyEnv", ...(spec.endpointEnv ? ["endpointEnv"] : [])]) {
|
|
15
|
+
if (value[key] !== spec[key]) throw new Error(`${key} must be ${spec[key]} for ${value.provider}`);
|
|
16
|
+
}
|
|
17
|
+
for (const [key, item] of Object.entries(value)) {
|
|
18
|
+
if (/key|token|secret|password/i.test(key) && !/Env$/.test(key)) throw new Error(`STT config must not store ${key}`);
|
|
19
|
+
if (typeof item === "string" && /sk-[A-Za-z0-9]|AIza|ghp_/i.test(item)) throw new Error("STT config must not store secret values");
|
|
20
|
+
}
|
|
21
|
+
return { provider: value.provider, apiKeyEnv: spec.apiKeyEnv, ...(spec.endpointEnv ? { endpointEnv: spec.endpointEnv } : {}) };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function renderSttConfig(value) { return JSON.stringify(validateSttConfig(value), null, 2) + "\n"; }
|
|
25
|
+
|
|
26
|
+
/** Append empty placeholders only for variables not already declared. */
|
|
27
|
+
export function appendEnvPlaceholders(workspace, config) {
|
|
28
|
+
const path = join(workspace, ".env");
|
|
29
|
+
const before = existsSync(path) ? readFileSync(path, "utf8") : "";
|
|
30
|
+
const names = [config.apiKeyEnv, config.endpointEnv].filter(Boolean);
|
|
31
|
+
const missing = names.filter((name) => !new RegExp(`^\\s*(?:export\\s+)?${name}\\s*=`, "m").test(before));
|
|
32
|
+
return { path, text: missing.length ? `${before}${before && !before.endsWith("\n") ? "\n" : ""}${missing.map((name) => `${name}=`).join("\n")}\n` : before, missing };
|
|
33
|
+
}
|