@chankov/agent-fleet 0.0.11 → 1.0.1

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.
Files changed (771) hide show
  1. package/.pi/agents/model-profiles.yaml +2 -2
  2. package/.pi/extensions/agent-fleet-update-check/README.md +4 -4
  3. package/.pi/extensions/btw/README.md +26 -25
  4. package/.pi/extensions/btw/index.ts +80 -83
  5. package/.pi/extensions/pi-voice-stt/README.md +4 -3
  6. package/.pi/extensions/pi-voice-stt/config.ts +1 -1
  7. package/.pi/harnesses/agent-hub/README.md +118 -57
  8. package/.pi/harnesses/agent-hub/backend-policy.js +25 -4
  9. package/.pi/harnesses/agent-hub/footer.ts +4 -0
  10. package/.pi/harnesses/agent-hub/helpers.ts +18 -0
  11. package/.pi/harnesses/agent-hub/hub-state-audit.js +55 -0
  12. package/.pi/harnesses/agent-hub/index.ts +657 -425
  13. package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +10 -1
  14. package/.pi/harnesses/agent-hub/package.json +1 -1
  15. package/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  16. package/.pi/harnesses/agent-hub/posture.ts +103 -0
  17. package/.pi/harnesses/agent-hub/run-budget.js +61 -0
  18. package/.pi/harnesses/ask-user-remote/README.md +37 -3
  19. package/.pi/harnesses/ask-user-remote/index.ts +173 -17
  20. package/.pi/harnesses/coms/package.json +1 -1
  21. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  22. package/.pi/harnesses/lib/fleet-dashboard-ops.ts +155 -0
  23. package/.pi/harnesses/lib/fleet-dashboard-view.ts +140 -0
  24. package/.pi/harnesses/lib/fleet-detail-view.ts +43 -0
  25. package/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  26. package/.pi/harnesses/lib/fleet-panel.ts +34 -0
  27. package/.pi/harnesses/lib/fleet-read-model.ts +131 -0
  28. package/.pi/harnesses/lib/fleet-selection.ts +24 -0
  29. package/.pi/harnesses/package-lock.json +2011 -0
  30. package/.pi/harnesses/package.json +1 -0
  31. package/.versions/0.0.11/.pi/extensions/agent-fleet-update-check/README.md +4 -4
  32. package/.versions/0.0.11/.pi/extensions/pi-voice-stt/README.md +4 -3
  33. package/.versions/0.0.11/.pi/extensions/pi-voice-stt/config.ts +1 -1
  34. package/.versions/0.0.11/.pi/harnesses/agent-hub/monitor-session-bridge.ts +10 -1
  35. package/.versions/0.0.11/.pi/harnesses/ask-user-remote/README.md +37 -3
  36. package/.versions/0.0.11/.pi/harnesses/ask-user-remote/index.ts +173 -17
  37. package/.versions/0.0.11/.pi/harnesses/package-lock.json +2011 -0
  38. package/.versions/0.0.11/.pi/harnesses/package.json +1 -0
  39. package/.versions/0.0.11/docs/ARCHITECTURE.md +6 -8
  40. package/.versions/0.0.11/docs/agent-fleet-setup.md +17 -43
  41. package/.versions/0.0.11/docs/claude-code-coms-bridge.md +20 -2
  42. package/.versions/0.0.11/docs/coms-hermes-bridge.md +1 -1
  43. package/.versions/0.0.11/docs/getting-started.md +26 -237
  44. package/.versions/0.0.11/docs/npm-install.md +60 -478
  45. package/.versions/0.0.11/docs/pi-extensions.md +4 -4
  46. package/.versions/0.0.11/docs/pi-setup.md +37 -551
  47. package/.versions/0.0.11/hermes/README.md +1 -1
  48. package/.versions/0.0.11/install-manifest.json +375 -1247
  49. package/.versions/0.0.11/justfile +13 -6
  50. package/.versions/0.0.11/manifest-meta.json +543 -134
  51. package/.versions/0.0.11/scripts/lib/fleet-command.ts +8 -0
  52. package/.versions/0.0.11/scripts/lib/monitor-env.ts +18 -6
  53. package/.versions/0.0.11/skills/designing-agents/SKILL.md +1 -1
  54. package/.versions/0.0.11/skills/designing-agents/pi-harness-authoring.md +1 -1
  55. package/.versions/1.0.0/.pi/agents/dispatch-policy.yaml +32 -0
  56. package/.versions/1.0.0/.pi/agents/model-profiles.yaml +27 -0
  57. package/.versions/1.0.0/.pi/agents/peers.yaml +142 -0
  58. package/.versions/1.0.0/.pi/agents/teams.yaml +41 -0
  59. package/.versions/1.0.0/.pi/damage-control-rules.yaml +297 -0
  60. package/.versions/1.0.0/.pi/extensions/agent-fleet-update-check/README.md +57 -0
  61. package/.versions/1.0.0/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  62. package/.versions/1.0.0/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  63. package/.versions/1.0.0/.pi/extensions/btw/README.md +120 -0
  64. package/.versions/1.0.0/.pi/extensions/btw/index.ts +914 -0
  65. package/.versions/1.0.0/.pi/extensions/btw/package.json +6 -0
  66. package/.versions/1.0.0/.pi/extensions/btw/state.js +179 -0
  67. package/.versions/1.0.0/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  68. package/.versions/1.0.0/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  69. package/.versions/1.0.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  70. package/.versions/1.0.0/.pi/extensions/compact-and-continue/README.md +42 -0
  71. package/.versions/1.0.0/.pi/extensions/compact-and-continue/index.ts +120 -0
  72. package/.versions/1.0.0/.pi/extensions/compact-and-continue/package.json +6 -0
  73. package/.versions/1.0.0/.pi/extensions/mcp-bridge/README.md +46 -0
  74. package/.versions/1.0.0/.pi/extensions/mcp-bridge/index.ts +206 -0
  75. package/.versions/1.0.0/.pi/extensions/mcp-bridge/package.json +6 -0
  76. package/.versions/1.0.0/.pi/extensions/package-lock.json +1143 -0
  77. package/.versions/1.0.0/.pi/extensions/package.json +9 -0
  78. package/.versions/1.0.0/.pi/extensions/pi-voice-stt/README.md +205 -0
  79. package/.versions/1.0.0/.pi/extensions/pi-voice-stt/config.ts +198 -0
  80. package/.versions/1.0.0/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  81. package/.versions/1.0.0/.pi/extensions/pi-voice-stt/index.ts +248 -0
  82. package/.versions/1.0.0/.pi/extensions/pi-voice-stt/package.json +6 -0
  83. package/.versions/1.0.0/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  84. package/.versions/1.0.0/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  85. package/.versions/1.0.0/.pi/harnesses/agent-hub/README.md +1056 -0
  86. package/.versions/1.0.0/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  87. package/.versions/1.0.0/.pi/harnesses/agent-hub/artifacts.js +146 -0
  88. package/.versions/1.0.0/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  89. package/.versions/1.0.0/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  90. package/.versions/1.0.0/.pi/harnesses/agent-hub/context-window.js +106 -0
  91. package/.versions/1.0.0/.pi/harnesses/agent-hub/delegate.ts +435 -0
  92. package/.versions/1.0.0/.pi/harnesses/agent-hub/docs-lane.js +122 -0
  93. package/.versions/1.0.0/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
  94. package/.versions/1.0.0/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  95. package/.versions/1.0.0/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  96. package/.versions/1.0.0/.pi/harnesses/agent-hub/footer.ts +35 -0
  97. package/.versions/1.0.0/.pi/harnesses/agent-hub/helpers.ts +266 -0
  98. package/.versions/1.0.0/.pi/harnesses/agent-hub/index.ts +9279 -0
  99. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  100. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  101. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  102. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  103. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  104. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  105. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  106. package/.versions/1.0.0/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  107. package/.versions/1.0.0/.pi/harnesses/agent-hub/package.json +7 -0
  108. package/.versions/1.0.0/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  109. package/.versions/1.0.0/.pi/harnesses/agent-hub/posture.ts +103 -0
  110. package/.versions/1.0.0/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  111. package/.versions/1.0.0/.pi/harnesses/agent-hub/research-retention.js +34 -0
  112. package/.versions/1.0.0/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  113. package/.versions/1.0.0/.pi/harnesses/agent-hub/return-contract.js +293 -0
  114. package/.versions/1.0.0/.pi/harnesses/agent-hub/return-extract.js +75 -0
  115. package/.versions/1.0.0/.pi/harnesses/agent-hub/review-findings.js +102 -0
  116. package/.versions/1.0.0/.pi/harnesses/agent-hub/run-budget.js +479 -0
  117. package/.versions/1.0.0/.pi/harnesses/agent-hub/run-namespace.js +87 -0
  118. package/.versions/1.0.0/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  119. package/.versions/1.0.0/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  120. package/.versions/1.0.0/.pi/harnesses/agent-hub/session-health.js +110 -0
  121. package/.versions/1.0.0/.pi/harnesses/agent-hub/spawn.ts +354 -0
  122. package/.versions/1.0.0/.pi/harnesses/agent-hub/version.ts +42 -0
  123. package/.versions/1.0.0/.pi/harnesses/ask-user-remote/README.md +53 -0
  124. package/.versions/1.0.0/.pi/harnesses/ask-user-remote/index.ts +477 -0
  125. package/.versions/1.0.0/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  126. package/.versions/1.0.0/.pi/harnesses/coms/README.md +100 -0
  127. package/.versions/1.0.0/.pi/harnesses/coms/index.ts +1767 -0
  128. package/.versions/1.0.0/.pi/harnesses/coms/package.json +7 -0
  129. package/.versions/1.0.0/.pi/harnesses/coms/version.ts +42 -0
  130. package/.versions/1.0.0/.pi/harnesses/damage-control-continue/README.md +124 -0
  131. package/.versions/1.0.0/.pi/harnesses/damage-control-continue/index.ts +536 -0
  132. package/.versions/1.0.0/.pi/harnesses/damage-control-continue/package.json +7 -0
  133. package/.versions/1.0.0/.pi/harnesses/damage-control-continue/version.ts +42 -0
  134. package/.versions/1.0.0/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  135. package/.versions/1.0.0/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  136. package/.versions/1.0.0/.pi/harnesses/lib/fleet-dashboard-ops.ts +118 -0
  137. package/.versions/1.0.0/.pi/harnesses/lib/fleet-dashboard-view.ts +140 -0
  138. package/.versions/1.0.0/.pi/harnesses/lib/fleet-detail-view.ts +43 -0
  139. package/.versions/1.0.0/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  140. package/.versions/1.0.0/.pi/harnesses/lib/fleet-panel.ts +34 -0
  141. package/.versions/1.0.0/.pi/harnesses/lib/fleet-read-model.ts +131 -0
  142. package/.versions/1.0.0/.pi/harnesses/lib/fleet-selection.ts +24 -0
  143. package/.versions/1.0.0/.pi/harnesses/lib/herdr-client.ts +472 -0
  144. package/.versions/1.0.0/.pi/harnesses/lib/herdr-presence.ts +399 -0
  145. package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  146. package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  147. package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  148. package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  149. package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  150. package/.versions/1.0.0/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  151. package/.versions/1.0.0/.pi/harnesses/lib/spawned-peers.js +190 -0
  152. package/.versions/1.0.0/.pi/harnesses/package-lock.json +2046 -0
  153. package/.versions/1.0.0/.pi/harnesses/package.json +10 -0
  154. package/.versions/1.0.0/.pi/prompts/af-build.md +24 -0
  155. package/{.claude/commands/code-simplify.md → .versions/1.0.0/.pi/prompts/af-code-simplify.md} +3 -3
  156. package/{.claude/commands/plan.md → .versions/1.0.0/.pi/prompts/af-plan.md} +1 -1
  157. package/.versions/{0.0.11/.claude/commands/review.md → 1.0.0/.pi/prompts/af-review.md} +3 -3
  158. package/.versions/1.0.0/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  159. package/.versions/1.0.0/.pi/prompts/af-ship.md +17 -0
  160. package/.versions/{0.0.11/.claude/commands/spec.md → 1.0.0/.pi/prompts/af-spec.md} +1 -1
  161. package/.versions/{0.0.11/.claude/commands/test.md → 1.0.0/.pi/prompts/af-test.md} +2 -2
  162. package/.versions/1.0.0/.pi/skills/bowser/SKILL.md +145 -0
  163. package/.versions/1.0.0/.version +1 -0
  164. package/.versions/1.0.0/agents/architect.md +24 -0
  165. package/.versions/1.0.0/agents/bowser.md +27 -0
  166. package/.versions/1.0.0/agents/builder.md +54 -0
  167. package/.versions/1.0.0/agents/code-reviewer.md +208 -0
  168. package/.versions/1.0.0/agents/deep-researcher.md +32 -0
  169. package/.versions/1.0.0/agents/documenter.md +18 -0
  170. package/.versions/1.0.0/agents/orchestrator.md +72 -0
  171. package/.versions/1.0.0/agents/plan-reviewer.md +83 -0
  172. package/.versions/1.0.0/agents/planner.md +70 -0
  173. package/.versions/1.0.0/agents/releaser.md +24 -0
  174. package/.versions/1.0.0/agents/researcher.md +28 -0
  175. package/.versions/1.0.0/agents/security-auditor.md +167 -0
  176. package/.versions/1.0.0/agents/test-engineer.md +153 -0
  177. package/.versions/1.0.0/agents/web-debugger.md +43 -0
  178. package/.versions/1.0.0/agents/web-performance-auditor.md +193 -0
  179. package/.versions/1.0.0/codex/CONDUCTOR.md +148 -0
  180. package/.versions/1.0.0/docs/ARCHITECTURE.md +337 -0
  181. package/.versions/1.0.0/docs/agent-fleet-setup.md +437 -0
  182. package/.versions/1.0.0/docs/claude-code-coms-bridge.md +128 -0
  183. package/.versions/1.0.0/docs/codex-remote-conductor.md +170 -0
  184. package/.versions/1.0.0/docs/coms-hermes-bridge.md +189 -0
  185. package/.versions/1.0.0/docs/getting-started.md +98 -0
  186. package/.versions/1.0.0/docs/npm-install.md +292 -0
  187. package/.versions/1.0.0/docs/pi-extensions.md +412 -0
  188. package/.versions/1.0.0/docs/pi-setup.md +74 -0
  189. package/.versions/1.0.0/docs/skill-anatomy.md +150 -0
  190. package/.versions/1.0.0/hermes/README.md +347 -0
  191. package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  192. package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  193. package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  194. package/.versions/1.0.0/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  195. package/.versions/1.0.0/hermes/gates/gate-o-capability.md +8 -0
  196. package/.versions/1.0.0/hermes/gates/gate-o-validator-fixtures.json +1 -0
  197. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  198. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  199. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  200. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  201. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  202. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  203. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  204. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  205. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  206. package/.versions/1.0.0/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  207. package/.versions/1.0.0/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  208. package/.versions/1.0.0/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  209. package/.versions/1.0.0/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  210. package/.versions/1.0.0/hermes/skills/hub-conductor/SKILL.md +84 -0
  211. package/.versions/1.0.0/hermes/skills/hub-liaison/SKILL.md +84 -0
  212. package/.versions/1.0.0/hermes/skills/hub-watchdog/SKILL.md +76 -0
  213. package/.versions/1.0.0/hermes/skills/hub-watchdog/manifest.json +1 -0
  214. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  215. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  216. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  217. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  218. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  219. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  220. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  221. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  222. package/.versions/1.0.0/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  223. package/.versions/1.0.0/hermes/watchdog-tests/__init__.py +0 -0
  224. package/.versions/1.0.0/hooks/coms-stop-hook.mjs +84 -0
  225. package/.versions/1.0.0/install-manifest.json +2745 -0
  226. package/.versions/1.0.0/justfile +272 -0
  227. package/.versions/1.0.0/manifest-meta.json +882 -0
  228. package/.versions/1.0.0/references/accessibility-checklist.md +160 -0
  229. package/.versions/1.0.0/references/definition-of-done.md +67 -0
  230. package/.versions/1.0.0/references/fleet-coordination-patterns.md +151 -0
  231. package/.versions/1.0.0/references/observability-checklist.md +91 -0
  232. package/.versions/1.0.0/references/orchestration-patterns.md +370 -0
  233. package/.versions/1.0.0/references/performance-checklist.md +153 -0
  234. package/.versions/1.0.0/references/prompting-patterns.md +380 -0
  235. package/.versions/1.0.0/references/security-checklist.md +179 -0
  236. package/.versions/1.0.0/references/testing-patterns.md +236 -0
  237. package/.versions/1.0.0/scripts/codex-conductor.ts +41 -0
  238. package/.versions/1.0.0/scripts/codex-remote-control.ts +167 -0
  239. package/.versions/1.0.0/scripts/coms-claude-bridge.ts +411 -0
  240. package/.versions/1.0.0/scripts/coms-cli.ts +484 -0
  241. package/.versions/1.0.0/scripts/coms-hermes-bridge.ts +413 -0
  242. package/.versions/1.0.0/scripts/fleet.ts +185 -0
  243. package/.versions/1.0.0/scripts/hermes-monitor-capability-runner.ts +25 -0
  244. package/.versions/1.0.0/scripts/hermes-monitor-scenario.ts +474 -0
  245. package/.versions/1.0.0/scripts/hermes-watchdog-capability-probe.ts +45 -0
  246. package/.versions/1.0.0/scripts/install-hermes-plugin.sh +180 -0
  247. package/.versions/1.0.0/scripts/lib/claude-bridge-core.ts +210 -0
  248. package/.versions/1.0.0/scripts/lib/codex-conductor.ts +88 -0
  249. package/.versions/1.0.0/scripts/lib/codex-remote-control.ts +480 -0
  250. package/.versions/1.0.0/scripts/lib/coms-envelope.ts +582 -0
  251. package/.versions/1.0.0/scripts/lib/fake-herdr-server.ts +88 -0
  252. package/.versions/1.0.0/scripts/lib/fleet-command.ts +266 -0
  253. package/.versions/1.0.0/scripts/lib/herdr-layout.ts +281 -0
  254. package/.versions/1.0.0/scripts/lib/hermes-bridge-core.ts +241 -0
  255. package/.versions/1.0.0/scripts/lib/hermes-monitor-events.ts +1 -0
  256. package/.versions/1.0.0/scripts/lib/hermes-monitor-herdr.ts +2 -0
  257. package/.versions/1.0.0/scripts/lib/hermes-monitor-model.ts +3 -0
  258. package/.versions/1.0.0/scripts/lib/hermes-monitor-registry.ts +2 -0
  259. package/.versions/1.0.0/scripts/lib/hermes-monitor-socket.ts +2 -0
  260. package/.versions/1.0.0/scripts/lib/hermes-monitor-store.ts +2 -0
  261. package/.versions/1.0.0/scripts/lib/monitor-env.ts +146 -0
  262. package/.versions/1.0.0/scripts/lib/peer-launch.ts +318 -0
  263. package/.versions/1.0.0/scripts/lib/persona-banner.ts +62 -0
  264. package/.versions/1.0.0/scripts/lib/spawn-stagger.ts +101 -0
  265. package/.versions/1.0.0/scripts/lib/team-project.ts +213 -0
  266. package/.versions/1.0.0/scripts/lib/team-snapshot.ts +147 -0
  267. package/.versions/1.0.0/scripts/peer-banner.ts +40 -0
  268. package/.versions/1.0.0/scripts/peer-launch.ts +259 -0
  269. package/.versions/1.0.0/scripts/team-snapshot.ts +237 -0
  270. package/.versions/1.0.0/scripts/team-up.ts +406 -0
  271. package/.versions/1.0.0/skills/_internal/grilling.md +11 -0
  272. package/.versions/1.0.0/skills/browser-testing-with-devtools/SKILL.md +351 -0
  273. package/.versions/1.0.0/skills/code-review-and-quality/SKILL.md +381 -0
  274. package/.versions/1.0.0/skills/compound-learning/SKILL.md +137 -0
  275. package/.versions/1.0.0/skills/context-engineering/SKILL.md +291 -0
  276. package/.versions/1.0.0/skills/deprecation-and-migration/SKILL.md +206 -0
  277. package/.versions/1.0.0/skills/designing-agents/SKILL.md +394 -0
  278. package/.versions/1.0.0/skills/designing-agents/pi-harness-authoring.md +222 -0
  279. package/.versions/1.0.0/skills/frontend-ui-engineering/SKILL.md +328 -0
  280. package/.versions/1.0.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
  281. package/.versions/1.0.0/skills/idea-refine/SKILL.md +182 -0
  282. package/.versions/1.0.0/skills/idea-refine/examples.md +238 -0
  283. package/.versions/1.0.0/skills/idea-refine/frameworks.md +99 -0
  284. package/.versions/1.0.0/skills/idea-refine/refinement-criteria.md +113 -0
  285. package/.versions/1.0.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
  286. package/.versions/1.0.0/skills/incremental-implementation/SKILL.md +287 -0
  287. package/.versions/1.0.0/skills/interview-me/SKILL.md +226 -0
  288. package/.versions/1.0.0/skills/orchestration-verification/SKILL.md +181 -0
  289. package/.versions/1.0.0/skills/peer-coms/SKILL.md +90 -0
  290. package/.versions/1.0.0/skills/performance-optimization/SKILL.md +350 -0
  291. package/.versions/1.0.0/skills/planning-and-task-breakdown/SKILL.md +254 -0
  292. package/.versions/1.0.0/skills/security-and-hardening/SKILL.md +461 -0
  293. package/.versions/1.0.0/skills/spec-driven-development/SKILL.md +257 -0
  294. package/.versions/1.0.0/skills/using-agent-skills/SKILL.md +199 -0
  295. package/.versions/1.0.0/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  296. package/.versions/1.0.0/vendor/agent-skills-upstream/LICENSE +21 -0
  297. package/.versions/1.0.0/vendor/agent-skills-upstream/README.md +11 -0
  298. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  299. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  300. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  301. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  302. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  303. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  304. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  305. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  306. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  307. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  308. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  309. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  310. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  311. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  312. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  313. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  314. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  315. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  316. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  317. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  318. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  319. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  320. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  321. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  322. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  323. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  324. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  325. package/.versions/1.0.0/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  326. package/.versions/1.0.1/.pi/agents/dispatch-policy.yaml +32 -0
  327. package/.versions/1.0.1/.pi/agents/model-profiles.yaml +27 -0
  328. package/.versions/1.0.1/.pi/agents/peers.yaml +142 -0
  329. package/.versions/1.0.1/.pi/agents/teams.yaml +41 -0
  330. package/.versions/1.0.1/.pi/damage-control-rules.yaml +297 -0
  331. package/.versions/1.0.1/.pi/extensions/agent-fleet-update-check/README.md +57 -0
  332. package/.versions/1.0.1/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  333. package/.versions/1.0.1/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  334. package/.versions/1.0.1/.pi/extensions/btw/README.md +120 -0
  335. package/.versions/1.0.1/.pi/extensions/btw/index.ts +914 -0
  336. package/.versions/1.0.1/.pi/extensions/btw/package.json +6 -0
  337. package/.versions/1.0.1/.pi/extensions/btw/state.js +179 -0
  338. package/.versions/1.0.1/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  339. package/.versions/1.0.1/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  340. package/.versions/1.0.1/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  341. package/.versions/1.0.1/.pi/extensions/compact-and-continue/README.md +42 -0
  342. package/.versions/1.0.1/.pi/extensions/compact-and-continue/index.ts +120 -0
  343. package/.versions/1.0.1/.pi/extensions/compact-and-continue/package.json +6 -0
  344. package/.versions/1.0.1/.pi/extensions/mcp-bridge/README.md +46 -0
  345. package/.versions/1.0.1/.pi/extensions/mcp-bridge/index.ts +206 -0
  346. package/.versions/1.0.1/.pi/extensions/mcp-bridge/package.json +6 -0
  347. package/.versions/1.0.1/.pi/extensions/package-lock.json +1143 -0
  348. package/.versions/1.0.1/.pi/extensions/package.json +9 -0
  349. package/.versions/1.0.1/.pi/extensions/pi-voice-stt/README.md +205 -0
  350. package/.versions/1.0.1/.pi/extensions/pi-voice-stt/config.ts +198 -0
  351. package/.versions/1.0.1/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  352. package/.versions/1.0.1/.pi/extensions/pi-voice-stt/index.ts +248 -0
  353. package/.versions/1.0.1/.pi/extensions/pi-voice-stt/package.json +6 -0
  354. package/.versions/1.0.1/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  355. package/.versions/1.0.1/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  356. package/.versions/1.0.1/.pi/harnesses/agent-hub/README.md +1065 -0
  357. package/.versions/1.0.1/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  358. package/.versions/1.0.1/.pi/harnesses/agent-hub/artifacts.js +146 -0
  359. package/.versions/1.0.1/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  360. package/.versions/1.0.1/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  361. package/.versions/1.0.1/.pi/harnesses/agent-hub/context-window.js +106 -0
  362. package/.versions/1.0.1/.pi/harnesses/agent-hub/delegate.ts +435 -0
  363. package/.versions/1.0.1/.pi/harnesses/agent-hub/docs-lane.js +122 -0
  364. package/.versions/1.0.1/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
  365. package/.versions/1.0.1/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  366. package/.versions/1.0.1/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  367. package/.versions/1.0.1/.pi/harnesses/agent-hub/footer.ts +35 -0
  368. package/.versions/1.0.1/.pi/harnesses/agent-hub/helpers.ts +266 -0
  369. package/.versions/1.0.1/.pi/harnesses/agent-hub/hub-state-audit.js +55 -0
  370. package/.versions/1.0.1/.pi/harnesses/agent-hub/index.ts +9343 -0
  371. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  372. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  373. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  374. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  375. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  376. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  377. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  378. package/.versions/1.0.1/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  379. package/.versions/1.0.1/.pi/harnesses/agent-hub/package.json +7 -0
  380. package/.versions/1.0.1/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  381. package/.versions/1.0.1/.pi/harnesses/agent-hub/posture.ts +103 -0
  382. package/.versions/1.0.1/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  383. package/.versions/1.0.1/.pi/harnesses/agent-hub/research-retention.js +34 -0
  384. package/.versions/1.0.1/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  385. package/.versions/1.0.1/.pi/harnesses/agent-hub/return-contract.js +293 -0
  386. package/.versions/1.0.1/.pi/harnesses/agent-hub/return-extract.js +75 -0
  387. package/.versions/1.0.1/.pi/harnesses/agent-hub/review-findings.js +102 -0
  388. package/.versions/1.0.1/.pi/harnesses/agent-hub/run-budget.js +540 -0
  389. package/.versions/1.0.1/.pi/harnesses/agent-hub/run-namespace.js +87 -0
  390. package/.versions/1.0.1/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  391. package/.versions/1.0.1/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  392. package/.versions/1.0.1/.pi/harnesses/agent-hub/session-health.js +110 -0
  393. package/.versions/1.0.1/.pi/harnesses/agent-hub/spawn.ts +354 -0
  394. package/.versions/1.0.1/.pi/harnesses/agent-hub/version.ts +42 -0
  395. package/.versions/1.0.1/.pi/harnesses/ask-user-remote/README.md +53 -0
  396. package/.versions/1.0.1/.pi/harnesses/ask-user-remote/index.ts +477 -0
  397. package/.versions/1.0.1/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  398. package/.versions/1.0.1/.pi/harnesses/coms/README.md +100 -0
  399. package/.versions/1.0.1/.pi/harnesses/coms/index.ts +1767 -0
  400. package/.versions/1.0.1/.pi/harnesses/coms/package.json +7 -0
  401. package/.versions/1.0.1/.pi/harnesses/coms/version.ts +42 -0
  402. package/.versions/1.0.1/.pi/harnesses/damage-control-continue/README.md +124 -0
  403. package/.versions/1.0.1/.pi/harnesses/damage-control-continue/index.ts +536 -0
  404. package/.versions/1.0.1/.pi/harnesses/damage-control-continue/package.json +7 -0
  405. package/.versions/1.0.1/.pi/harnesses/damage-control-continue/version.ts +42 -0
  406. package/.versions/1.0.1/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  407. package/.versions/1.0.1/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  408. package/.versions/1.0.1/.pi/harnesses/lib/fleet-dashboard-ops.ts +155 -0
  409. package/.versions/1.0.1/.pi/harnesses/lib/fleet-dashboard-view.ts +140 -0
  410. package/.versions/1.0.1/.pi/harnesses/lib/fleet-detail-view.ts +43 -0
  411. package/.versions/1.0.1/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  412. package/.versions/1.0.1/.pi/harnesses/lib/fleet-panel.ts +34 -0
  413. package/.versions/1.0.1/.pi/harnesses/lib/fleet-read-model.ts +131 -0
  414. package/.versions/1.0.1/.pi/harnesses/lib/fleet-selection.ts +24 -0
  415. package/.versions/1.0.1/.pi/harnesses/lib/herdr-client.ts +472 -0
  416. package/.versions/1.0.1/.pi/harnesses/lib/herdr-presence.ts +399 -0
  417. package/.versions/1.0.1/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  418. package/.versions/1.0.1/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  419. package/.versions/1.0.1/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  420. package/.versions/1.0.1/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  421. package/.versions/1.0.1/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  422. package/.versions/1.0.1/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  423. package/.versions/1.0.1/.pi/harnesses/lib/spawned-peers.js +190 -0
  424. package/.versions/1.0.1/.pi/harnesses/package-lock.json +2046 -0
  425. package/.versions/1.0.1/.pi/harnesses/package.json +10 -0
  426. package/.versions/1.0.1/.pi/prompts/af-build.md +24 -0
  427. package/.versions/{0.0.11/.claude/commands/code-simplify.md → 1.0.1/.pi/prompts/af-code-simplify.md} +3 -3
  428. package/.versions/{0.0.11/.claude/commands/plan.md → 1.0.1/.pi/prompts/af-plan.md} +1 -1
  429. package/{.claude/commands/review.md → .versions/1.0.1/.pi/prompts/af-review.md} +3 -3
  430. package/.versions/1.0.1/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  431. package/.versions/1.0.1/.pi/prompts/af-ship.md +17 -0
  432. package/{.claude/commands/spec.md → .versions/1.0.1/.pi/prompts/af-spec.md} +1 -1
  433. package/{.claude/commands/test.md → .versions/1.0.1/.pi/prompts/af-test.md} +2 -2
  434. package/.versions/1.0.1/.pi/skills/bowser/SKILL.md +145 -0
  435. package/.versions/1.0.1/.version +1 -0
  436. package/.versions/1.0.1/agents/architect.md +24 -0
  437. package/.versions/1.0.1/agents/bowser.md +27 -0
  438. package/.versions/1.0.1/agents/builder.md +54 -0
  439. package/.versions/1.0.1/agents/code-reviewer.md +208 -0
  440. package/.versions/1.0.1/agents/deep-researcher.md +32 -0
  441. package/.versions/1.0.1/agents/documenter.md +18 -0
  442. package/.versions/1.0.1/agents/orchestrator.md +72 -0
  443. package/.versions/1.0.1/agents/plan-reviewer.md +83 -0
  444. package/.versions/1.0.1/agents/planner.md +70 -0
  445. package/.versions/1.0.1/agents/releaser.md +24 -0
  446. package/.versions/1.0.1/agents/researcher.md +28 -0
  447. package/.versions/1.0.1/agents/security-auditor.md +167 -0
  448. package/.versions/1.0.1/agents/test-engineer.md +153 -0
  449. package/.versions/1.0.1/agents/web-debugger.md +43 -0
  450. package/.versions/1.0.1/agents/web-performance-auditor.md +193 -0
  451. package/.versions/1.0.1/codex/CONDUCTOR.md +148 -0
  452. package/.versions/1.0.1/docs/ARCHITECTURE.md +337 -0
  453. package/.versions/1.0.1/docs/agent-fleet-setup.md +437 -0
  454. package/.versions/1.0.1/docs/claude-code-coms-bridge.md +128 -0
  455. package/.versions/1.0.1/docs/codex-remote-conductor.md +170 -0
  456. package/.versions/1.0.1/docs/coms-hermes-bridge.md +189 -0
  457. package/.versions/1.0.1/docs/getting-started.md +98 -0
  458. package/.versions/1.0.1/docs/npm-install.md +292 -0
  459. package/.versions/1.0.1/docs/pi-extensions.md +412 -0
  460. package/.versions/1.0.1/docs/pi-setup.md +74 -0
  461. package/.versions/1.0.1/docs/skill-anatomy.md +150 -0
  462. package/.versions/1.0.1/hermes/README.md +347 -0
  463. package/.versions/1.0.1/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  464. package/.versions/1.0.1/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  465. package/.versions/1.0.1/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  466. package/.versions/1.0.1/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  467. package/.versions/1.0.1/hermes/gates/gate-o-capability.md +8 -0
  468. package/.versions/1.0.1/hermes/gates/gate-o-validator-fixtures.json +1 -0
  469. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  470. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  471. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  472. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  473. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  474. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  475. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  476. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  477. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  478. package/.versions/1.0.1/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  479. package/.versions/1.0.1/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  480. package/.versions/1.0.1/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  481. package/.versions/1.0.1/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  482. package/.versions/1.0.1/hermes/skills/hub-conductor/SKILL.md +84 -0
  483. package/.versions/1.0.1/hermes/skills/hub-liaison/SKILL.md +84 -0
  484. package/.versions/1.0.1/hermes/skills/hub-watchdog/SKILL.md +76 -0
  485. package/.versions/1.0.1/hermes/skills/hub-watchdog/manifest.json +1 -0
  486. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  487. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  488. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  489. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  490. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  491. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  492. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  493. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  494. package/.versions/1.0.1/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  495. package/.versions/1.0.1/hermes/watchdog-tests/__init__.py +0 -0
  496. package/.versions/1.0.1/hooks/coms-stop-hook.mjs +84 -0
  497. package/.versions/1.0.1/install-manifest.json +2745 -0
  498. package/.versions/1.0.1/justfile +272 -0
  499. package/.versions/1.0.1/manifest-meta.json +882 -0
  500. package/.versions/1.0.1/references/accessibility-checklist.md +160 -0
  501. package/.versions/1.0.1/references/definition-of-done.md +67 -0
  502. package/.versions/1.0.1/references/fleet-coordination-patterns.md +151 -0
  503. package/.versions/1.0.1/references/observability-checklist.md +91 -0
  504. package/.versions/1.0.1/references/orchestration-patterns.md +370 -0
  505. package/.versions/1.0.1/references/performance-checklist.md +153 -0
  506. package/.versions/1.0.1/references/prompting-patterns.md +380 -0
  507. package/.versions/1.0.1/references/security-checklist.md +179 -0
  508. package/.versions/1.0.1/references/testing-patterns.md +236 -0
  509. package/.versions/1.0.1/scripts/codex-conductor.ts +41 -0
  510. package/.versions/1.0.1/scripts/codex-remote-control.ts +167 -0
  511. package/.versions/1.0.1/scripts/coms-claude-bridge.ts +411 -0
  512. package/.versions/1.0.1/scripts/coms-cli.ts +484 -0
  513. package/.versions/1.0.1/scripts/coms-hermes-bridge.ts +413 -0
  514. package/.versions/1.0.1/scripts/fleet.ts +185 -0
  515. package/.versions/1.0.1/scripts/hermes-monitor-capability-runner.ts +25 -0
  516. package/.versions/1.0.1/scripts/hermes-monitor-scenario.ts +474 -0
  517. package/.versions/1.0.1/scripts/hermes-watchdog-capability-probe.ts +45 -0
  518. package/.versions/1.0.1/scripts/install-hermes-plugin.sh +180 -0
  519. package/.versions/1.0.1/scripts/lib/claude-bridge-core.ts +210 -0
  520. package/.versions/1.0.1/scripts/lib/codex-conductor.ts +88 -0
  521. package/.versions/1.0.1/scripts/lib/codex-remote-control.ts +480 -0
  522. package/.versions/1.0.1/scripts/lib/coms-envelope.ts +582 -0
  523. package/.versions/1.0.1/scripts/lib/fake-herdr-server.ts +88 -0
  524. package/.versions/1.0.1/scripts/lib/fleet-command.ts +266 -0
  525. package/.versions/1.0.1/scripts/lib/herdr-layout.ts +281 -0
  526. package/.versions/1.0.1/scripts/lib/hermes-bridge-core.ts +241 -0
  527. package/.versions/1.0.1/scripts/lib/hermes-monitor-events.ts +1 -0
  528. package/.versions/1.0.1/scripts/lib/hermes-monitor-herdr.ts +2 -0
  529. package/.versions/1.0.1/scripts/lib/hermes-monitor-model.ts +3 -0
  530. package/.versions/1.0.1/scripts/lib/hermes-monitor-registry.ts +2 -0
  531. package/.versions/1.0.1/scripts/lib/hermes-monitor-socket.ts +2 -0
  532. package/.versions/1.0.1/scripts/lib/hermes-monitor-store.ts +2 -0
  533. package/.versions/1.0.1/scripts/lib/monitor-env.ts +146 -0
  534. package/.versions/1.0.1/scripts/lib/peer-launch.ts +318 -0
  535. package/.versions/1.0.1/scripts/lib/persona-banner.ts +62 -0
  536. package/.versions/1.0.1/scripts/lib/spawn-stagger.ts +101 -0
  537. package/.versions/1.0.1/scripts/lib/team-project.ts +213 -0
  538. package/.versions/1.0.1/scripts/lib/team-snapshot.ts +147 -0
  539. package/.versions/1.0.1/scripts/peer-banner.ts +40 -0
  540. package/.versions/1.0.1/scripts/peer-launch.ts +259 -0
  541. package/.versions/1.0.1/scripts/team-snapshot.ts +237 -0
  542. package/.versions/1.0.1/scripts/team-up.ts +406 -0
  543. package/.versions/1.0.1/skills/_internal/grilling.md +11 -0
  544. package/.versions/1.0.1/skills/browser-testing-with-devtools/SKILL.md +351 -0
  545. package/.versions/1.0.1/skills/code-review-and-quality/SKILL.md +381 -0
  546. package/.versions/1.0.1/skills/compound-learning/SKILL.md +137 -0
  547. package/.versions/1.0.1/skills/context-engineering/SKILL.md +291 -0
  548. package/.versions/1.0.1/skills/deprecation-and-migration/SKILL.md +206 -0
  549. package/.versions/1.0.1/skills/designing-agents/SKILL.md +394 -0
  550. package/.versions/1.0.1/skills/designing-agents/pi-harness-authoring.md +222 -0
  551. package/.versions/1.0.1/skills/frontend-ui-engineering/SKILL.md +328 -0
  552. package/.versions/1.0.1/skills/git-workflow-and-versioning/SKILL.md +316 -0
  553. package/.versions/1.0.1/skills/idea-refine/SKILL.md +182 -0
  554. package/.versions/1.0.1/skills/idea-refine/examples.md +238 -0
  555. package/.versions/1.0.1/skills/idea-refine/frameworks.md +99 -0
  556. package/.versions/1.0.1/skills/idea-refine/refinement-criteria.md +113 -0
  557. package/.versions/1.0.1/skills/idea-refine/scripts/idea-refine.sh +15 -0
  558. package/.versions/1.0.1/skills/incremental-implementation/SKILL.md +287 -0
  559. package/.versions/1.0.1/skills/interview-me/SKILL.md +226 -0
  560. package/.versions/1.0.1/skills/orchestration-verification/SKILL.md +181 -0
  561. package/.versions/1.0.1/skills/peer-coms/SKILL.md +90 -0
  562. package/.versions/1.0.1/skills/performance-optimization/SKILL.md +350 -0
  563. package/.versions/1.0.1/skills/planning-and-task-breakdown/SKILL.md +254 -0
  564. package/.versions/1.0.1/skills/security-and-hardening/SKILL.md +461 -0
  565. package/.versions/1.0.1/skills/spec-driven-development/SKILL.md +257 -0
  566. package/.versions/1.0.1/skills/using-agent-skills/SKILL.md +199 -0
  567. package/.versions/1.0.1/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  568. package/.versions/1.0.1/vendor/agent-skills-upstream/LICENSE +21 -0
  569. package/.versions/1.0.1/vendor/agent-skills-upstream/README.md +11 -0
  570. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  571. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  572. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  573. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  574. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  575. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  576. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  577. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  578. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  579. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  580. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  581. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  582. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  583. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  584. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  585. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  586. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  587. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  588. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  589. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  590. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  591. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  592. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  593. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  594. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  595. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  596. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  597. package/.versions/1.0.1/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  598. package/CHANGELOG.md +148 -0
  599. package/README.md +117 -79
  600. package/agents/code-reviewer.md +1 -1
  601. package/agents/deep-researcher.md +1 -1
  602. package/agents/orchestrator.md +1 -1
  603. package/agents/plan-reviewer.md +1 -1
  604. package/agents/planner.md +1 -1
  605. package/agents/security-auditor.md +1 -1
  606. package/agents/test-engineer.md +1 -1
  607. package/bin/catalog/harness-runtime-closure.json +38 -0
  608. package/bin/cli.js +289 -359
  609. package/bin/force-patch-changesets.js +18 -2
  610. package/bin/lib/apply.js +86 -32
  611. package/bin/lib/desired.js +87 -0
  612. package/bin/lib/detect-agent.js +22 -38
  613. package/bin/lib/doctor.js +283 -33
  614. package/bin/lib/features.js +78 -0
  615. package/bin/lib/manifest.js +127 -48
  616. package/bin/lib/overrides.js +35 -0
  617. package/bin/lib/personas.js +37 -0
  618. package/bin/lib/plan.js +18 -9
  619. package/bin/lib/purge.js +11 -0
  620. package/bin/lib/reconcile.js +68 -0
  621. package/bin/lib/scan.js +24 -0
  622. package/bin/lib/state.js +25 -1
  623. package/bin/lib/stt-wizard.js +33 -0
  624. package/bin/lib/transaction.js +149 -0
  625. package/bin/lib/tui.js +71 -0
  626. package/bin/lib/verify.js +9 -26
  627. package/bin/snapshot-version.js +3 -6
  628. package/docs/ARCHITECTURE.md +55 -21
  629. package/docs/MIGRATION-agent-fleet.md +222 -0
  630. package/docs/agent-fleet-setup.md +124 -64
  631. package/docs/claude-code-coms-bridge.md +21 -2
  632. package/docs/coms-hermes-bridge.md +1 -1
  633. package/docs/getting-started.md +61 -217
  634. package/docs/npm-install.md +207 -429
  635. package/docs/pi-extensions.md +85 -41
  636. package/docs/pi-setup.md +48 -545
  637. package/hermes/README.md +1 -1
  638. package/install-manifest.json +385 -1255
  639. package/justfile +45 -27
  640. package/manifest-meta.json +544 -134
  641. package/node_modules/pi-ask-user/README.md +43 -5
  642. package/node_modules/pi-ask-user/index.ts +630 -75
  643. package/node_modules/pi-ask-user/package.json +1 -1
  644. package/package.json +5 -11
  645. package/scripts/coms-claude-bridge.ts +10 -0
  646. package/scripts/fleet.ts +107 -90
  647. package/scripts/lib/claude-bridge-core.ts +45 -0
  648. package/scripts/lib/fleet-command.ts +170 -15
  649. package/scripts/lib/monitor-env.ts +18 -6
  650. package/scripts/lib/peer-launch.ts +6 -2
  651. package/scripts/lib/team-project.ts +24 -4
  652. package/scripts/team-up.ts +57 -11
  653. package/skills/designing-agents/SKILL.md +1 -1
  654. package/skills/designing-agents/pi-harness-authoring.md +3 -3
  655. package/.claude/commands/build.md +0 -44
  656. package/.claude/commands/design-agent.md +0 -14
  657. package/.claude/commands/doctor-agent-fleet.md +0 -22
  658. package/.claude/commands/orchestrate.md +0 -112
  659. package/.claude/commands/prime.md +0 -22
  660. package/.claude/commands/set-hermes-telegram.md +0 -15
  661. package/.claude/commands/set-hermes-watchdog.md +0 -6
  662. package/.claude/commands/setup-agent-fleet.md +0 -17
  663. package/.claude/commands/ship.md +0 -72
  664. package/.claude/commands/webperf.md +0 -32
  665. package/.claude/orchestrate-teams.yaml +0 -24
  666. package/.opencode/commands/af-build.md +0 -17
  667. package/.opencode/commands/af-code-simplify.md +0 -16
  668. package/.opencode/commands/af-compound.md +0 -16
  669. package/.opencode/commands/af-design-agent.md +0 -15
  670. package/.opencode/commands/af-doctor-agent-fleet.md +0 -22
  671. package/.opencode/commands/af-orchestrate.md +0 -112
  672. package/.opencode/commands/af-plan.md +0 -16
  673. package/.opencode/commands/af-prime.md +0 -22
  674. package/.opencode/commands/af-review.md +0 -15
  675. package/.opencode/commands/af-set-hermes-watchdog.md +0 -6
  676. package/.opencode/commands/af-setup-agent-fleet.md +0 -17
  677. package/.opencode/commands/af-ship.md +0 -16
  678. package/.opencode/commands/af-spec.md +0 -16
  679. package/.opencode/commands/af-test.md +0 -21
  680. package/.opencode/commands/af-webperf.md +0 -32
  681. package/.opencode/orchestrate-teams.yaml +0 -24
  682. package/.pi/prompts/af-doctor-agent-fleet.md +0 -22
  683. package/.pi/prompts/af-setup-agent-fleet.md +0 -19
  684. package/.versions/0.0.1/.opencode/commands/af-doctor-agent-fleet.md +0 -15
  685. package/.versions/0.0.1/.opencode/commands/af-setup-agent-fleet.md +0 -15
  686. package/.versions/0.0.1/skills/guided-workspace-setup/SKILL.md +0 -506
  687. package/.versions/0.0.10/.opencode/commands/af-doctor-agent-fleet.md +0 -22
  688. package/.versions/0.0.10/.opencode/commands/af-setup-agent-fleet.md +0 -17
  689. package/.versions/0.0.10/.pi/prompts/af-doctor-agent-fleet.md +0 -22
  690. package/.versions/0.0.10/.pi/prompts/af-setup-agent-fleet.md +0 -19
  691. package/.versions/0.0.10/skills/guided-workspace-setup/SKILL.md +0 -226
  692. package/.versions/0.0.11/.claude/commands/build.md +0 -44
  693. package/.versions/0.0.11/.claude/commands/design-agent.md +0 -14
  694. package/.versions/0.0.11/.claude/commands/doctor-agent-fleet.md +0 -22
  695. package/.versions/0.0.11/.claude/commands/orchestrate.md +0 -112
  696. package/.versions/0.0.11/.claude/commands/prime.md +0 -22
  697. package/.versions/0.0.11/.claude/commands/set-hermes-telegram.md +0 -15
  698. package/.versions/0.0.11/.claude/commands/set-hermes-watchdog.md +0 -6
  699. package/.versions/0.0.11/.claude/commands/setup-agent-fleet.md +0 -17
  700. package/.versions/0.0.11/.claude/commands/ship.md +0 -72
  701. package/.versions/0.0.11/.claude/commands/webperf.md +0 -32
  702. package/.versions/0.0.11/.claude/orchestrate-teams.yaml +0 -24
  703. package/.versions/0.0.11/.opencode/commands/af-build.md +0 -17
  704. package/.versions/0.0.11/.opencode/commands/af-code-simplify.md +0 -16
  705. package/.versions/0.0.11/.opencode/commands/af-compound.md +0 -16
  706. package/.versions/0.0.11/.opencode/commands/af-design-agent.md +0 -15
  707. package/.versions/0.0.11/.opencode/commands/af-doctor-agent-fleet.md +0 -22
  708. package/.versions/0.0.11/.opencode/commands/af-orchestrate.md +0 -112
  709. package/.versions/0.0.11/.opencode/commands/af-plan.md +0 -16
  710. package/.versions/0.0.11/.opencode/commands/af-prime.md +0 -22
  711. package/.versions/0.0.11/.opencode/commands/af-review.md +0 -15
  712. package/.versions/0.0.11/.opencode/commands/af-set-hermes-watchdog.md +0 -6
  713. package/.versions/0.0.11/.opencode/commands/af-setup-agent-fleet.md +0 -17
  714. package/.versions/0.0.11/.opencode/commands/af-ship.md +0 -16
  715. package/.versions/0.0.11/.opencode/commands/af-spec.md +0 -16
  716. package/.versions/0.0.11/.opencode/commands/af-test.md +0 -21
  717. package/.versions/0.0.11/.opencode/commands/af-webperf.md +0 -32
  718. package/.versions/0.0.11/.opencode/orchestrate-teams.yaml +0 -24
  719. package/.versions/0.0.11/.pi/prompts/af-doctor-agent-fleet.md +0 -22
  720. package/.versions/0.0.11/.pi/prompts/af-setup-agent-fleet.md +0 -19
  721. package/.versions/0.0.11/docs/opencode-setup.md +0 -281
  722. package/.versions/0.0.11/hooks/SIMPLIFY-IGNORE.md +0 -90
  723. package/.versions/0.0.11/hooks/hooks.json +0 -14
  724. package/.versions/0.0.11/hooks/session-start.sh +0 -74
  725. package/.versions/0.0.11/hooks/simplify-ignore.sh +0 -302
  726. package/.versions/0.0.11/skills/guided-workspace-setup/SKILL.md +0 -226
  727. package/.versions/0.0.4/.opencode/commands/af-doctor-agent-fleet.md +0 -17
  728. package/.versions/0.0.4/.opencode/commands/af-setup-agent-fleet.md +0 -15
  729. package/.versions/0.0.4/skills/guided-workspace-setup/SKILL.md +0 -535
  730. package/.versions/0.0.4/skills/guided-workspace-setup/companion-manifest.json +0 -33
  731. package/.versions/0.0.5/.opencode/commands/af-doctor-agent-fleet.md +0 -17
  732. package/.versions/0.0.5/.opencode/commands/af-setup-agent-fleet.md +0 -15
  733. package/.versions/0.0.5/skills/guided-workspace-setup/SKILL.md +0 -542
  734. package/.versions/0.0.5/skills/guided-workspace-setup/companion-manifest.json +0 -35
  735. package/.versions/0.0.6/.opencode/commands/af-doctor-agent-fleet.md +0 -17
  736. package/.versions/0.0.6/.opencode/commands/af-setup-agent-fleet.md +0 -15
  737. package/.versions/0.0.6/.pi/prompts/af-doctor-agent-fleet.md +0 -15
  738. package/.versions/0.0.6/.pi/prompts/af-setup-agent-fleet.md +0 -27
  739. package/.versions/0.0.6/skills/guided-workspace-setup/SKILL.md +0 -544
  740. package/.versions/0.0.6/skills/guided-workspace-setup/companion-manifest.json +0 -35
  741. package/.versions/0.0.7/.opencode/commands/af-doctor-agent-fleet.md +0 -17
  742. package/.versions/0.0.7/.opencode/commands/af-setup-agent-fleet.md +0 -15
  743. package/.versions/0.0.7/.pi/prompts/af-doctor-agent-fleet.md +0 -15
  744. package/.versions/0.0.7/.pi/prompts/af-setup-agent-fleet.md +0 -27
  745. package/.versions/0.0.7/skills/guided-workspace-setup/SKILL.md +0 -544
  746. package/.versions/0.0.7/skills/guided-workspace-setup/companion-manifest.json +0 -35
  747. package/.versions/0.0.8/.opencode/commands/af-doctor-agent-fleet.md +0 -17
  748. package/.versions/0.0.8/.opencode/commands/af-setup-agent-fleet.md +0 -15
  749. package/.versions/0.0.8/.pi/prompts/af-doctor-agent-fleet.md +0 -15
  750. package/.versions/0.0.8/.pi/prompts/af-setup-agent-fleet.md +0 -27
  751. package/.versions/0.0.8/skills/guided-workspace-setup/SKILL.md +0 -544
  752. package/.versions/0.0.8/skills/guided-workspace-setup/companion-manifest.json +0 -36
  753. package/.versions/0.0.9/.opencode/commands/af-doctor-agent-fleet.md +0 -17
  754. package/.versions/0.0.9/.opencode/commands/af-setup-agent-fleet.md +0 -15
  755. package/.versions/0.0.9/.pi/prompts/af-doctor-agent-fleet.md +0 -15
  756. package/.versions/0.0.9/.pi/prompts/af-setup-agent-fleet.md +0 -27
  757. package/.versions/0.0.9/skills/guided-workspace-setup/SKILL.md +0 -544
  758. package/bin/lib/bootstrap.js +0 -323
  759. package/bin/lib/transform-persona.js +0 -180
  760. package/docs/opencode-setup.md +0 -281
  761. package/hooks/SIMPLIFY-IGNORE.md +0 -90
  762. package/hooks/hooks.json +0 -14
  763. package/hooks/session-start.sh +0 -74
  764. package/hooks/simplify-ignore.sh +0 -302
  765. package/skills/guided-workspace-setup/SKILL.md +0 -226
  766. /package/.versions/0.0.10/{skills/guided-workspace-setup/companion-manifest.json → bin/catalog/harness-runtime-closure.json} +0 -0
  767. /package/.versions/0.0.11/{skills/guided-workspace-setup/companion-manifest.json → bin/catalog/harness-runtime-closure.json} +0 -0
  768. /package/{.opencode/commands → .versions/1.0.0/.pi/prompts}/af-set-hermes-telegram.md +0 -0
  769. /package/.versions/{0.0.9/skills/guided-workspace-setup/companion-manifest.json → 1.0.0/bin/catalog/harness-runtime-closure.json} +0 -0
  770. /package/.versions/{0.0.11/.opencode/commands → 1.0.1/.pi/prompts}/af-set-hermes-telegram.md +0 -0
  771. /package/{skills/guided-workspace-setup/companion-manifest.json → .versions/1.0.1/bin/catalog/harness-runtime-closure.json} +0 -0
package/bin/cli.js CHANGED
@@ -1,19 +1,10 @@
1
1
  #!/usr/bin/env node
2
- // agent-fleet — thin dispatcher into the LLM-driven guided setup.
2
+ // agent-fleet — deterministic workspace lifecycle CLI.
3
3
  //
4
- // Main commands:
5
- // init materialize the package, detect the coding agent, hand off to its setup command
6
- // doctor deterministic preflight scan (broken symlinks, stale persona refs)
7
- // update refresh the package, then hand off to the setup workflow for the version-diff
8
- // transform-persona generate per-agent subagent files from the canonical agents/*.md
9
- // set-hermes-telegram install/inspect the liaison and start/stop its bridge
10
- //
11
- // The CLI itself never decides which skills to install or what to overwrite —
12
- // that is the job of the guided-workspace-setup skill, run by the user's
13
- // coding agent. We just put the source files where the agent can find them
14
- // and print the next-step command.
4
+ // setup, doctor, and uninstall are complete without a coding agent or model.
5
+ // Legacy command names remain compatibility aliases and route to setup.
15
6
 
16
- import { readFileSync, existsSync, statSync, mkdirSync, writeFileSync } from "node:fs";
7
+ import { readFileSync, existsSync, statSync, mkdirSync, writeFileSync, rmSync } from "node:fs";
17
8
  import { fileURLToPath } from "node:url";
18
9
  import { dirname, join, resolve, relative } from "node:path";
19
10
  import { spawnSync } from "node:child_process";
@@ -25,12 +16,15 @@ import { runDoctor } from "./lib/doctor.js";
25
16
  import { loadManifest } from "./lib/manifest.js";
26
17
  import { runVerify, hasDrift } from "./lib/verify.js";
27
18
  import { buildPlan, hasConflicts, isNoop } from "./lib/plan.js";
28
- import { applyPlan } from "./lib/apply.js";
19
+ import { buildReconcilePlan } from "./lib/reconcile.js";
20
+ import { applyPlan, retryRuntimeRepairs } from "./lib/apply.js";
21
+ import { chooseSetup } from "./lib/tui.js";
22
+ import { defaultDesired, readDesired } from "./lib/desired.js";
23
+ import { purgeHumanConfig } from "./lib/purge.js";
24
+ import { recoverTransaction, discardUnrecoverableTransaction, journalPath, transactionRecovery } from "./lib/transaction.js";
29
25
  import { readState, readLegacyRecord, isAgentFleetCheckout, STATE_REL_PATH } from "./lib/state.js";
30
- import { listPersonas, transformPersona } from "./lib/transform-persona.js";
31
26
  import { detectAgent, agentLabel, AGENTS } from "./lib/detect-agent.js";
32
27
  import { checkAndNotify } from "./lib/update-notifier.js";
33
- import { bootstrap, cleanupInstaller, readBootstrapMarker } from "./lib/bootstrap.js";
34
28
  import { setHermesTelegram, runHermesCommand } from "./lib/set-hermes-telegram.js";
35
29
  import { setHermesWatchdog } from "./lib/set-hermes-watchdog.js";
36
30
 
@@ -63,6 +57,12 @@ const parsed = (() => {
63
57
  workspace: { type: "string" },
64
58
  yes: { type: "boolean", short: "y" },
65
59
  profile: { type: "string" },
60
+ preset: { type: "string" },
61
+ features: { type: "string" },
62
+ "save-desired": { type: "boolean" },
63
+ migrate: { type: "boolean" },
64
+ "on-conflict": { type: "string" },
65
+ "purge-config": { type: "boolean" },
66
66
  force: { type: "boolean" },
67
67
  restart: { type: "boolean" },
68
68
  "dry-run": { type: "boolean" },
@@ -86,6 +86,7 @@ const parsed = (() => {
86
86
 
87
87
  const opts = parsed.values;
88
88
  const workspace = resolve(opts.workspace ?? process.cwd());
89
+ let repairPlanNote = null;
89
90
 
90
91
  if (opts.help) {
91
92
  printHelp(sub);
@@ -106,16 +107,15 @@ if (!["update", "check-update", "verify", "install", "upgrade", "uninstall", "do
106
107
  }
107
108
 
108
109
  switch (sub) {
109
- case "init": await cmdInit(); break;
110
+ case "setup": await cmdSetup(); break;
111
+ case "init": warnAlias("init"); await cmdSetup(); break;
110
112
  case "doctor": await cmdDoctor(); break;
111
113
  case "verify": await cmdVerify(); break;
112
- case "install": await cmdPlanVerb("install"); break;
113
- case "upgrade": await cmdPlanVerb("upgrade"); break;
114
+ case "install": warnAlias("install"); await (opts.preset || opts.features ? cmdSetup() : cmdPlanVerb("install")); break;
115
+ case "upgrade": warnAlias("upgrade"); await cmdPlanVerb("upgrade"); break;
114
116
  case "uninstall": await cmdPlanVerb("uninstall"); break;
115
- case "update": await cmdUpdate(); break;
117
+ case "update": warnAlias("update"); await cmdSetup(); break;
116
118
  case "check-update": await cmdCheckUpdate(); break;
117
- case "cleanup-installer": await cmdCleanupInstaller(); break;
118
- case "transform-persona": await cmdTransformPersona(); break;
119
119
  case "set-hermes-telegram": await cmdSetHermesTelegram(); break;
120
120
  case "set-hermes-watchdog": await cmdSetHermesWatchdog(); break;
121
121
  default: fail(`unknown command: ${sub}\n\nRun "agent-fleet --help" for usage.`);
@@ -185,56 +185,6 @@ async function cmdSetHermesTelegram() {
185
185
  }
186
186
  }
187
187
 
188
- async function cmdInit() {
189
- await mustBeDirectory(workspace, "workspace");
190
-
191
- printBanner(`agent-fleet v${pkg.version} — guided init`);
192
- console.log(`Workspace: ${workspace}`);
193
- console.log(`Source: ${pkgRoot}`);
194
- console.log();
195
-
196
- const agent = await chooseAgent(opts.agent);
197
- console.log(`Coding agent: ${agentLabel(agent)}`);
198
-
199
- const method = resolveMethod(opts.method);
200
-
201
- // Bootstrap the installer artifacts (setup + doctor + the skill they invoke).
202
- // Without this, the agent has no setup command to hand off to. The command itself
203
- // is one of the files this writes; the rest of the catalogue (skills, personas,
204
- // etc.) is the setup workflow's job inside the agent.
205
- printSection("Bootstrap installer");
206
- const { written, skipped, removed, warnings } = bootstrap({
207
- agent,
208
- sourceRoot: pkgRoot,
209
- workspace,
210
- method,
211
- dryRun: opts["dry-run"],
212
- });
213
-
214
- for (const w of warnings) console.log(` ⚠ ${w}`);
215
- for (const p of removed) {
216
- const tag = opts["dry-run"] ? "would remove (legacy)" : "removed legacy";
217
- console.log(` − ${tag}: ${relative(workspace, p)}`);
218
- }
219
- for (const f of written) {
220
- const tag = opts["dry-run"] ? "would write" : (method === "symlink" ? "linked" : "wrote");
221
- console.log(` ✓ ${tag}: ${relative(workspace, f.dest)}`);
222
- }
223
- for (const f of skipped) {
224
- console.log(` ✗ skipped: ${relative(workspace, f.dest)} — ${f.error}`);
225
- }
226
- if (written.length === 0 && skipped.length === 0 && removed.length === 0) {
227
- console.log(" (nothing to do — sources missing from package)");
228
- }
229
-
230
- printSection("Next step");
231
- printHandoff({ agent, method, workspace, source: pkgRoot, version: pkg.version });
232
-
233
- if (opts.launch) {
234
- tryLaunch(agent, workspace);
235
- }
236
- }
237
-
238
188
  // Doctor has two repair sources, and the split is deliberate:
239
189
  //
240
190
  // • the engine — for every item the state file records. Repair is `plan()`
@@ -247,10 +197,127 @@ async function cmdInit() {
247
197
  //
248
198
  // Everything else the scan reports (overrides problems, malformed peer entries)
249
199
  // is advisory: printed, never auto-fixed, because the fix is always a hand edit.
200
+ function warnAlias(name) { console.error(`Warning: ${name} is deprecated; use setup.`); }
201
+
202
+ async function cmdSetup() {
203
+ await mustBeDirectory(workspace, "workspace");
204
+ if (opts["on-conflict"] !== undefined && !["ours", "theirs"].includes(opts["on-conflict"])) {
205
+ fail('--on-conflict must be "ours" or "theirs"');
206
+ }
207
+ if (opts.method) resolveMethod(opts.method);
208
+ if (opts.items || opts.profile) {
209
+ fail("setup does not accept raw item/profile selectors; use --preset <default|full> and --features <name[,name]> instead");
210
+ }
211
+ const manifest = loadManifest(pkgRoot);
212
+ const dryRun = Boolean(opts["dry-run"]);
213
+ const interactive = !opts.yes && !dryRun;
214
+ if (interactive && !stdin.isTTY) {
215
+ fail("setup mutation requires --yes in non-TTY mode (or use --dry-run to preview)");
216
+ }
217
+
218
+ let preset = opts.preset;
219
+ let features = opts.features;
220
+ let tuiDesired = null;
221
+ let setupReadLine = null;
222
+ let setupRl = null;
223
+ if (interactive) {
224
+ setupRl = createInterface({ input: stdin, output: stdout });
225
+ setupReadLine = async () => {
226
+ try { return await setupRl.question(""); } catch { return null; }
227
+ };
228
+ let selection;
229
+ try {
230
+ selection = await chooseSetup({
231
+ output: stdout,
232
+ readLine: setupReadLine,
233
+ manifest,
234
+ currentDesired: readDesired(workspace, manifest),
235
+ });
236
+ } catch (err) {
237
+ setupRl.close();
238
+ fail(err.message);
239
+ }
240
+ if (selection.cancelled) {
241
+ setupRl.close();
242
+ console.log("Aborted — nothing was written.");
243
+ exit(0);
244
+ }
245
+ preset = selection.preset;
246
+ features = selection.features.join(",");
247
+ if (selection.changed) {
248
+ const desired = defaultDesired(manifest);
249
+ desired.preset = preset;
250
+ desired.features = Object.fromEntries(Object.keys(desired.features).map((name) => [name, selection.features.includes(name)]));
251
+ tuiDesired = desired;
252
+ }
253
+ }
254
+
255
+ const interactiveMigration = interactive && Boolean(
256
+ readState(workspace) && !existsSync(join(workspace, ".ai", "agent-fleet.json")),
257
+ );
258
+ let plan;
259
+ try {
260
+ plan = buildReconcilePlan({ workspace, sourceRoot: pkgRoot, packageVersion: pkg.version, manifest,
261
+ agent: opts.agent ?? "pi", method: opts.method, preset, features,
262
+ saveDesired: opts["save-desired"], tuiDesired, dryRun,
263
+ // The interactive selector and final exact-plan confirmation are the
264
+ // migration consent. Automation retains every explicit gate.
265
+ migrate: opts.migrate || interactiveMigration, yes: opts.yes || interactive,
266
+ accept: opts["on-conflict"] ?? null });
267
+ } catch (err) {
268
+ setupRl?.close();
269
+ fail(err.message);
270
+ }
271
+ if (plan.migrationBlocked) {
272
+ setupRl?.close();
273
+ fail(plan.migrationError);
274
+ }
275
+ if (dryRun) {
276
+ setupRl?.close();
277
+ process.stdout.write(JSON.stringify(plan, null, 2) + "\n");
278
+ exit(plan.conflicts.length ? 3 : 0);
279
+ }
280
+ if ((interactive || opts.yes) && !opts.json) printPlan(plan);
281
+ if (interactive) {
282
+ stdout.write(`\nApply this exact ${plan.firstMigration ? "first-migration " : ""}setup plan? [y/N] `);
283
+ const answer = await setupReadLine();
284
+ setupRl.close();
285
+ if (answer === null || !/^y(es)?$/i.test(answer.trim())) {
286
+ console.log("Aborted — nothing was written.");
287
+ exit(0);
288
+ }
289
+ }
290
+ const execOutput = (line) => (opts.json ? console.error : console.log)(`exec: ${line}`);
291
+ let result = applyPlan({ plan, manifest, allowExec: Boolean(opts["allow-exec"]), output: execOutput });
292
+ if (opts["allow-exec"] && result.exitCode === 0) {
293
+ result = { ...result, retryRuntimeRepair: retryRuntimeRepairs({ workspace, output: execOutput }) };
294
+ }
295
+ if (opts.json) process.stdout.write(JSON.stringify(result, null, 2) + "\n");
296
+ else console.log(result.exitCode === 0 ? "Setup complete." : result.failure?.detail ?? "Setup incomplete.");
297
+ exit(result.exitCode);
298
+ }
299
+
250
300
  async function cmdDoctor() {
251
301
  await mustBeDirectory(workspace, "workspace");
252
302
 
303
+ // Recovery is itself a write, so bare doctor must not even inspect a journal
304
+ // beyond reporting the resulting repairable state. `--fix` recovers first,
305
+ // then plans against the restored ledger.
306
+ const recovery = transactionRecovery(workspace);
307
+ let recoveredTransaction = false;
308
+ let discardedUnrecoverableJournal = false;
309
+ if (opts.fix && !opts["dry-run"] && recovery.pending) {
310
+ try { recoveredTransaction = recoverTransaction(workspace); }
311
+ catch (err) {
312
+ if (!err.unrecoverable) fail(`cannot recover pending transaction: ${err.message}`);
313
+ discardUnrecoverableTransaction(workspace);
314
+ discardedUnrecoverableJournal = true;
315
+ }
316
+ }
317
+
253
318
  const ADVISORY_FINDING_TYPES = new Set(["overrides", "yaml-shape"]);
319
+ const pendingTransaction = existsSync(journalPath(workspace));
320
+ const unrecoverableJournal = recovery.pending && !recovery.recoverable;
254
321
  const plan = buildRepairPlan();
255
322
  const repairs = plan?.actions ?? [];
256
323
 
@@ -263,10 +330,15 @@ async function cmdDoctor() {
263
330
  );
264
331
  const findings = (await runDoctor({ workspace, sourceRoot: pkgRoot }))
265
332
  .filter((f) => !(f.type === "broken-symlink" && enginePaths.has(f.path)));
333
+ if (unrecoverableJournal) findings.unshift({
334
+ type: "unrecoverable-transaction", path: relative(workspace, journalPath(workspace)),
335
+ issue: "transaction backup is missing or unreadable", fix: "discard installer-owned journal with doctor --fix",
336
+ });
266
337
 
267
- const fixable = findings.filter((f) => !ADVISORY_FINDING_TYPES.has(f.type));
338
+ const fixable = findings.filter((f) => !ADVISORY_FINDING_TYPES.has(f.type) && f.type !== "unrecoverable-transaction");
268
339
  const advisory = findings.length - fixable.length;
269
- const outstanding = repairs.length + fixable.length;
340
+ const pendingRuntime = readState(workspace)?.runtimeRepairs ?? [];
341
+ const outstanding = repairs.length + fixable.length + (pendingTransaction ? 1 : 0) + pendingRuntime.length;
270
342
 
271
343
  // The report comes first, then the question. Asking "apply 7 fixes?" before
272
344
  // naming them is asking for a blind yes.
@@ -275,6 +347,7 @@ async function cmdDoctor() {
275
347
  console.log(`Workspace: ${workspace}`);
276
348
  if (!plan) console.log(`Recorded: ${repairPlanNote}`);
277
349
 
350
+ if (pendingTransaction) console.log("Pending transaction journal — re-run with --fix to restore the pre-transaction workspace.");
278
351
  if (repairs.length > 0) {
279
352
  printSection(`Recorded items to repair (${repairs.length})`);
280
353
  for (const a of repairs) console.log(` ${a.id} — ${a.reason}`);
@@ -290,11 +363,9 @@ async function cmdDoctor() {
290
363
 
291
364
  // --fix is the documented flag; -y stays an alias for the pre-engine muscle
292
365
  // memory, and a bare interactive run still asks.
293
- const wantsFix = Boolean(opts.fix || opts.yes);
294
- const willFix = outstanding > 0 && !opts["dry-run"] &&
295
- (wantsFix || (!opts.json && stdin.isTTY && await confirm(
296
- `\nApply the ${outstanding} suggested fix(es) now? [y/N] `,
297
- )));
366
+ // Doctor is strictly read-only unless --fix is explicit.
367
+ const wantsFix = Boolean(opts.fix);
368
+ const willFix = outstanding > 0 && !opts["dry-run"] && wantsFix;
298
369
 
299
370
  let applied = null;
300
371
  let scanRepair = null;
@@ -303,6 +374,10 @@ async function cmdDoctor() {
303
374
  if (fixable.length > 0) scanRepair = await runDoctor({ workspace, sourceRoot: pkgRoot, apply: true });
304
375
  }
305
376
 
377
+ const runtimeRepair = willFix
378
+ ? retryRuntimeRepairs({ workspace, output: (line) => console.log(`exec: ${line}`) })
379
+ : { attempted: 0, remaining: pendingRuntime };
380
+
306
381
  const report = {
307
382
  schemaVersion: 1,
308
383
  verb: "doctor",
@@ -313,6 +388,10 @@ async function cmdDoctor() {
313
388
  findings,
314
389
  planNote: plan ? null : repairPlanNote,
315
390
  applied,
391
+ pendingTransaction,
392
+ recoveredTransaction,
393
+ discardedUnrecoverableJournal,
394
+ runtimeRepair,
316
395
  scanRepair: scanRepair && {
317
396
  repaired: scanRepair.repaired, deleted: scanRepair.deleted, skipped: scanRepair.skipped,
318
397
  },
@@ -321,7 +400,7 @@ async function cmdDoctor() {
321
400
  fixable: fixable.length,
322
401
  advisories: advisory,
323
402
  fixed: willFix ? outstanding - (scanRepair?.skipped ?? 0) - (applied?.summary.failed ?? 0) : 0,
324
- outstanding: willFix ? (scanRepair?.skipped ?? 0) + (applied?.summary.failed ?? 0) : outstanding,
403
+ outstanding: willFix ? (scanRepair?.skipped ?? 0) + (applied?.summary.failed ?? 0) + runtimeRepair.remaining.length : outstanding,
325
404
  },
326
405
  };
327
406
 
@@ -332,7 +411,7 @@ async function cmdDoctor() {
332
411
 
333
412
  if (outstanding === 0) {
334
413
  console.log("\n✓ Nothing to repair: no broken recorded items, no broken symlinks, no stale persona references.");
335
- exit(findings.length > 0 ? 2 : 0);
414
+ exit(0);
336
415
  }
337
416
 
338
417
  console.log();
@@ -365,8 +444,6 @@ async function cmdDoctor() {
365
444
  exit(report.summary.outstanding > 0 ? 2 : 0);
366
445
  }
367
446
 
368
- let repairPlanNote = null;
369
-
370
447
  /**
371
448
  * The engine half of `doctor`. Returns null (with a note) rather than failing
372
449
  * when there is nothing to plan against — a workspace with no install record is
@@ -487,6 +564,19 @@ async function cmdVerify() {
487
564
  async function cmdPlanVerb(verb) {
488
565
  await mustBeDirectory(workspace, "workspace");
489
566
 
567
+ // State may already be gone after a self-uninstall. The separate explicit
568
+ // config-purge gate remains usable in that final state without inventing a
569
+ // new ownership record.
570
+ if (verb === "uninstall" && opts.all && opts["purge-config"] && !readState(workspace)) {
571
+ if (!opts.yes && (!stdin.isTTY || opts.json)) fail("--purge-config requires --yes in non-TTY/JSON mode");
572
+ if (!opts.yes && !await confirm("\nPurge human configuration? [y/N] ")) { console.log("Aborted — nothing was written."); exit(0); }
573
+ const purge = purgeHumanConfig(workspace, { purgeConfig: true });
574
+ if (opts.json) process.stdout.write(JSON.stringify({ plan: null, applied: null, purge }, null, 2) + "\n");
575
+ else if (purge.removed.length) console.log(`Purged human configuration: ${purge.removed.join(", ")}`);
576
+ else console.log("Nothing to purge.");
577
+ exit(0);
578
+ }
579
+
490
580
  let manifest;
491
581
  try { manifest = loadManifest(pkgRoot); }
492
582
  catch (err) { fail(err.message); }
@@ -557,13 +647,23 @@ async function cmdPlanVerb(verb) {
557
647
  exit(hasConflicts(plan) ? 3 : 0);
558
648
  }
559
649
 
560
- // Nothing to do is a success, not a prompt.
650
+ // A config purge is independent of state-owned actions, so it must still
651
+ // run after a prior --all removed every recorded item.
561
652
  if (isNoop(plan)) {
653
+ if (verb === "uninstall" && opts["purge-config"] && !opts.yes) {
654
+ if (!stdin.isTTY || opts.json) fail("--purge-config requires --yes in non-TTY/JSON mode");
655
+ printPlan(plan);
656
+ if (!await confirm("\nPurge human configuration? [y/N] ")) { console.log("Aborted — nothing was written."); exit(0); }
657
+ }
658
+ const purge = verb === "uninstall" && opts["purge-config"]
659
+ ? purgeHumanConfig(workspace, { purgeConfig: true })
660
+ : null;
562
661
  if (opts.json) {
563
- process.stdout.write(JSON.stringify({ plan, applied: null }, null, 2) + "\n");
662
+ process.stdout.write(JSON.stringify({ plan, applied: null, purge }, null, 2) + "\n");
564
663
  exit(0);
565
664
  }
566
665
  printPlan(plan);
666
+ if (purge?.removed.length) console.log(`Purged human configuration: ${purge.removed.join(", ")}`);
567
667
  exit(0);
568
668
  }
569
669
 
@@ -583,13 +683,32 @@ async function cmdPlanVerb(verb) {
583
683
  }
584
684
 
585
685
  const applied = applyPlan({ plan, manifest, allowExec: Boolean(opts["allow-exec"]) });
686
+ const purge = verb === "uninstall" && !applied.summary.failed
687
+ ? purgeHumanConfig(workspace, { purgeConfig: Boolean(opts["purge-config"]) })
688
+ : null;
689
+
690
+ // A complete --all removal has no remaining lifecycle ownership. Render the
691
+ // report from the in-memory result first, then remove state/record/journal so
692
+ // a self-hosted `just fleet uninstall --yes` can delete its own launcher last.
693
+ const cleanupLifecycle = verb === "uninstall" && opts.all && !applied.summary.failed
694
+ && Object.keys(readState(workspace)?.items ?? {}).length === 0;
695
+ const finishLifecycleCleanup = () => {
696
+ if (!cleanupLifecycle) return;
697
+ for (const path of [STATE_REL_PATH, ".ai/agent-fleet-setup.md", relative(workspace, journalPath(workspace))]) {
698
+ rmSync(join(workspace, path), { force: true });
699
+ }
700
+ };
586
701
 
587
702
  if (opts.json) {
588
- process.stdout.write(JSON.stringify({ plan, applied }, null, 2) + "\n");
703
+ process.stdout.write(JSON.stringify({ plan, applied, purge }, null, 2) + "\n");
704
+ finishLifecycleCleanup();
589
705
  exit(applied.summary.failed ? 1 : hasConflicts(plan) ? 3 : 0);
590
706
  }
591
707
 
592
708
  printApplied(plan, applied);
709
+ if (purge?.removed.length) console.log(`Purged human configuration: ${purge.removed.join(", ")}`);
710
+ else if (verb === "uninstall" && purge?.preserved.length) console.log(`Preserved human configuration: ${purge.preserved.join(", ")} (use --purge-config to remove)`);
711
+ finishLifecycleCleanup();
593
712
  exit(applied.summary.failed ? 1 : hasConflicts(plan) ? 3 : 0);
594
713
  }
595
714
 
@@ -615,7 +734,9 @@ function printApplied(plan, applied) {
615
734
  for (const path of applied.conflictFiles) console.log(` ${path}`);
616
735
  console.log(
617
736
  "\nEach `.new` file is the incoming version. Compare, merge what you want,\n" +
618
- "delete the `.new`, or re-run with --accept-theirs / --accept-ours.",
737
+ (plan.verb === "upgrade"
738
+ ? "delete the `.new`, or re-run upgrade with --accept-theirs or --accept-ours."
739
+ : "delete the `.new`, or re-run setup with --on-conflict theirs|ours."),
619
740
  );
620
741
  }
621
742
 
@@ -646,7 +767,7 @@ function printApplied(plan, applied) {
646
767
 
647
768
  function printPlan(plan) {
648
769
  const s = plan.summary;
649
- printBanner(`agent-fleet v${pkg.version} — ${plan.verb} (dry run)`);
770
+ printBanner(`agent-fleet v${pkg.version} — ${plan.verb} plan`);
650
771
  console.log(`Workspace: ${plan.workspace}`);
651
772
  console.log(`Agent: ${agentLabel(plan.agent)} Method: ${plan.method}`);
652
773
  if (plan.verb === "install") {
@@ -682,9 +803,11 @@ function printPlan(plan) {
682
803
  for (const a of shown) {
683
804
  console.log(` ${a.kind.padEnd(width)} ${a.id}${a.reason ? ` — ${a.reason}` : ""}`);
684
805
  for (const f of a.files ?? []) console.log(` ${" ".repeat(width)} ${f.state}: ${f.path}`);
806
+ for (const path of a.paths ?? []) console.log(` ${" ".repeat(width)} state-owned deletion: ${path}`);
685
807
  }
686
808
  }
687
809
 
810
+ printConfigurationWrites(plan);
688
811
  printOperatorSteps(plan.actions);
689
812
 
690
813
  printSection("Summary");
@@ -708,9 +831,12 @@ function printPlan(plan) {
708
831
 
709
832
  console.log();
710
833
  if (hasConflicts(plan)) {
834
+ const resolveHint = plan.verb === "upgrade"
835
+ ? " Resolve with --accept-theirs (take the new version) or --accept-ours (keep yours)."
836
+ : " Resolve with --on-conflict theirs (take the new version) or --on-conflict ours (keep yours).";
711
837
  console.log(
712
838
  `✗ ${plan.conflicts.length} conflict(s): changed both locally and upstream.\n` +
713
- " Resolve with --accept-theirs (take the new version) or --accept-ours (keep yours).",
839
+ resolveHint,
714
840
  );
715
841
  return;
716
842
  }
@@ -728,6 +854,30 @@ function printPlan(plan) {
728
854
  * write to, so the only useful thing to emit is the exact command list — which
729
855
  * the manifest declares, so it cannot rot away from the artifact it describes.
730
856
  */
857
+ function printConfigurationWrites(plan) {
858
+ const writes = [
859
+ plan.writeDesired ? plan.desiredPath : null,
860
+ plan.overrides?.write ? plan.overrides.path : null,
861
+ plan.stt?.path ?? null,
862
+ plan.stt?.env?.missing?.length ? plan.stt.env.path : null,
863
+ ].filter(Boolean);
864
+ if (writes.length === 0) return;
865
+ printSection("Configuration writes");
866
+ for (const path of [...new Set(writes)].sort()) console.log(` ${relative(plan.workspace, path)}`);
867
+ if (plan.stt?.env?.missing?.length && !isGitignored(plan.workspace, ".env")) {
868
+ console.log(" Warning: .env is not covered by the target .gitignore; it may be committed.");
869
+ }
870
+ }
871
+
872
+ function isGitignored(workspace, path) {
873
+ const ignore = join(workspace, ".gitignore");
874
+ if (!existsSync(ignore)) return false;
875
+ return readFileSync(ignore, "utf8").split(/\r?\n/).some((line) => {
876
+ const rule = line.trim();
877
+ return rule === path || rule === `/${path}` || rule === "*";
878
+ });
879
+ }
880
+
731
881
  function printOperatorSteps(actions) {
732
882
  const external = actions.filter((a) => a.kind === "external");
733
883
  const operator = actions.filter((a) => a.kind === "operator");
@@ -800,168 +950,6 @@ async function askProfile(manifest) {
800
950
  return chosen;
801
951
  }
802
952
 
803
- async function cmdUpdate() {
804
- await mustBeDirectory(workspace, "workspace");
805
-
806
- printBanner(`agent-fleet v${pkg.version} — update`);
807
- console.log(`Workspace: ${workspace}`);
808
- console.log();
809
-
810
- // npm itself does the package upgrade. The CLI's job here is to read the
811
- // workspace's install record, surface the version delta, re-install the
812
- // setup command, and hand off to the skill for the diff-aware
813
- // refresh.
814
- const recordPath = join(workspace, ".ai", "agent-fleet-setup.md");
815
- if (!existsSync(recordPath)) {
816
- console.log("This workspace has no .ai/agent-fleet-setup.md install record.");
817
- console.log("Run `npx agent-fleet init` first, then re-run `update` later.");
818
- exit(1);
819
- }
820
-
821
- const recorded = readRecordedVersion(recordPath);
822
- const current = pkg.version;
823
-
824
- console.log(`Recorded in workspace: v${recorded ?? "(pre-versioning)"}`);
825
- console.log(`Installed package: v${current}`);
826
- console.log();
827
-
828
- // Re-bootstrap the installer artifacts so the runtime's setup command is present
829
- // after the update. guided-workspace-setup removes these at the end of a
830
- // run by default (Step 10b / cleanupInstaller), so a workspace that has
831
- // completed setup once no longer has the command — and `update` used to
832
- // only print a stale setup instruction while pointing at a command that no
833
- // longer existed. The marker recovers the agent/method from init time; if
834
- // it was cleaned up too, fall back to detection (and prompt if ambiguous).
835
- const marker = readBootstrapMarker(workspace);
836
- let agent = opts.agent ?? marker?.agent
837
- ?? detectAgent({ workspace, env: process.env, preferWorkspaceHints: true });
838
- if (agent && !AGENTS.includes(agent)) agent = null;
839
- if (!agent) agent = await chooseAgent(opts.agent);
840
-
841
- const method = resolveMethod(opts.method, marker?.method ?? "copy");
842
-
843
- printSection("Refresh installer command");
844
- const { written, skipped, removed, warnings } = bootstrap({
845
- agent,
846
- sourceRoot: pkgRoot,
847
- workspace,
848
- method,
849
- dryRun: opts["dry-run"],
850
- });
851
- for (const w of warnings) console.log(` ⚠ ${w}`);
852
- for (const p of removed) {
853
- const tag = opts["dry-run"] ? "would remove (legacy)" : "removed legacy";
854
- console.log(` − ${tag}: ${relative(workspace, p)}`);
855
- }
856
- for (const f of written) {
857
- const tag = opts["dry-run"] ? "would write" : (method === "symlink" ? "linked" : "wrote");
858
- console.log(` ✓ ${tag}: ${relative(workspace, f.dest)}`);
859
- }
860
- for (const f of skipped) {
861
- console.log(` ✗ skipped: ${relative(workspace, f.dest)} — ${f.error}`);
862
- }
863
-
864
- const setupCmd = agent === "claude-code" ? "/setup-agent-fleet" : "/af-setup-agent-fleet";
865
-
866
- printSection("Next step");
867
- if (recorded === current) {
868
- console.log(`Recorded version (${recorded}) matches the installed package — no version delta.`);
869
- console.log(`${setupCmd} is back in your workspace; run it inside ${agentLabel(agent)} if you`);
870
- console.log("want to re-review your artifacts. To upgrade the package itself, run:");
871
- console.log(" npm install -g @chankov/agent-fleet@latest # global");
872
- console.log(" npx @chankov/agent-fleet@latest update # one-shot");
873
- return;
874
- }
875
- console.log(`Open ${agentLaunchHint(agent)} in this directory and run:`);
876
- console.log();
877
- console.log(` ${setupCmd}`);
878
- console.log();
879
- console.log("The guided-workspace-setup skill will detect the version delta, show the");
880
- console.log("CHANGELOG between the two versions, and offer a per-artifact three-way diff");
881
- console.log("before touching any file.");
882
- }
883
-
884
- async function cmdCleanupInstaller() {
885
- // Removes the bootstrap artifacts (setup-agent-fleet, doctor-agent-fleet,
886
- // guided-workspace-setup skill body) from the workspace. Invoked by the
887
- // skill itself at the end of Step 10 — keeps the workspace's slash-command
888
- // list clean. Re-running `init` brings them back.
889
- await mustBeDirectory(workspace, "workspace");
890
-
891
- const agent = opts.agent ?? detectAgent({ workspace, env: process.env });
892
- if (!agent || !AGENTS.includes(agent)) {
893
- fail(`cleanup-installer needs --agent (one of: ${AGENTS.join(", ")})`);
894
- }
895
-
896
- const { removed, kept, warnings } = cleanupInstaller({
897
- agent,
898
- workspace,
899
- dryRun: opts["dry-run"],
900
- });
901
-
902
- for (const w of warnings) console.log(` ⚠ ${w}`);
903
- for (const p of removed) {
904
- const tag = opts["dry-run"] ? "would remove" : "removed";
905
- console.log(` − ${tag}: ${relative(workspace, p)}`);
906
- }
907
- if (removed.length === 0 && warnings.length === 0) {
908
- console.log("Nothing to clean up — installer files already absent.");
909
- }
910
- }
911
-
912
- async function cmdTransformPersona() {
913
- // Generates per-agent subagent definitions from the canonical agents/*.md.
914
- // The guided-workspace-setup skill calls this during apply, so the
915
- // frontmatter mapping stays deterministic and under test (lib/transform-persona.js).
916
- const agent = opts.agent;
917
- if (!agent || !AGENTS.includes(agent)) {
918
- fail(`transform-persona needs --agent (one of: ${AGENTS.join(", ")})`);
919
- }
920
-
921
- const available = listPersonas(pkgRoot, { agent });
922
-
923
- if (opts.list) {
924
- for (const p of available) console.log(`${p.name} → ${p.targetRelPath}`);
925
- return;
926
- }
927
-
928
- const names = opts.all ? available.map((p) => p.name) : parsed.positionals;
929
- if (names.length === 0) {
930
- fail("name one or more personas, or pass --all / --list");
931
- }
932
-
933
- // Writing only happens when --workspace is given explicitly; otherwise the
934
- // transformed content goes to stdout (workspace would default to cwd, which
935
- // is too easy to splat by accident).
936
- const wantsWrite = opts.workspace !== undefined;
937
- if (wantsWrite) await mustBeDirectory(workspace, "workspace");
938
-
939
- for (const name of names) {
940
- const sourcePath = join(pkgRoot, "agents", `${name}.md`);
941
- if (!existsSync(sourcePath)) {
942
- fail(`unknown persona "${name}" — run \`agent-fleet transform-persona --list --agent ${agent}\``);
943
- }
944
- let out;
945
- try {
946
- out = transformPersona(readFileSync(sourcePath, "utf8"), { agent });
947
- } catch (err) {
948
- fail(err.message); // e.g. pi-only persona requested for claude-code/opencode
949
- }
950
- if (wantsWrite) {
951
- const dest = join(workspace, out.targetRelPath);
952
- if (opts["dry-run"]) {
953
- console.log(` ✓ would write: ${out.targetRelPath}`);
954
- } else {
955
- mkdirSync(dirname(dest), { recursive: true });
956
- writeFileSync(dest, out.content);
957
- console.log(` ✓ wrote: ${out.targetRelPath}`);
958
- }
959
- } else {
960
- process.stdout.write(out.content);
961
- }
962
- }
963
- }
964
-
965
953
  async function cmdCheckUpdate() {
966
954
  // Entry point for hook scripts and pi extensions. Blocks on a single
967
955
  // registry fetch (short timeout); emits a one-line banner to stdout if an
@@ -983,80 +971,18 @@ async function cmdCheckUpdate() {
983
971
 
984
972
  // ── helpers ───────────────────────────────────────────────────────────────
985
973
 
986
- async function chooseAgent(supplied) {
987
- if (supplied) {
988
- if (!AGENTS.includes(supplied)) {
989
- fail(`--agent must be one of: ${AGENTS.join(", ")} (got "${supplied}")`);
990
- }
991
- return supplied;
992
- }
993
- const detected = detectAgent({ workspace, env: process.env });
994
- if (detected) return detected;
995
-
996
- console.log("Could not auto-detect your coding agent.");
997
- const answer = (await prompt(
998
- `Which coding agent? [${AGENTS.join("/")}] (claude-code): `,
999
- )).trim() || "claude-code";
1000
-
1001
- if (!AGENTS.includes(answer)) {
1002
- fail(`Unknown agent "${answer}". Allowed: ${AGENTS.join(", ")}`);
974
+ // pi is the only coding agent Agent Fleet installs for, so there is nothing to
975
+ // ask: `--agent` is still honoured (and still validated) so scripts written
976
+ // against the old flag keep working and a wrong value fails loudly.
977
+ function chooseAgent(supplied) {
978
+ if (supplied && !AGENTS.includes(supplied)) {
979
+ fail(`--agent must be one of: ${AGENTS.join(", ")} (got "${supplied}")`);
1003
980
  }
1004
- return answer;
1005
- }
1006
-
1007
- function printHandoff({ agent, method, workspace, source, version }) {
1008
- const rel = relative(process.cwd(), workspace) || ".";
1009
- const setupCmd =
1010
- agent === "claude-code" ? "/setup-agent-fleet" : "/af-setup-agent-fleet";
1011
- const lines = [
1012
- `agent-fleet v${version} is ready.`,
1013
- "",
1014
- `Workspace: ${rel}`,
1015
- `Coding agent: ${agentLabel(agent)}`,
1016
- `Install method: ${method}`,
1017
- `Source root: ${source}`,
1018
- "",
1019
- `Open ${agentLaunchHint(agent)} in this directory and run:`,
1020
- "",
1021
- ` ${setupCmd}`,
1022
- "",
1023
- "The guided-workspace-setup skill will:",
1024
- " • analyse the workspace",
1025
- " • show grouped install menus with recommendations",
1026
- " • offer project overrides",
1027
- " • confirm everything before writing a single file",
1028
- " • remove the installer commands from your workspace at the end so",
1029
- " they don't pollute your agent's command list (reply 'keep' in",
1030
- " Step 9 if you'd rather leave them in)",
1031
- "",
1032
- ];
1033
- if (agent === "opencode") {
1034
- lines.push(
1035
- "OpenCode note: project-local skill discovery is limited. If",
1036
- "/af-setup-agent-fleet does not load the skill, follow",
1037
- "docs/opencode-setup.md to link it into ~/.config/opencode/skills/",
1038
- "and add a reference in AGENTS.md.",
1039
- "",
1040
- );
1041
- }
1042
- lines.push("Re-run `npx @chankov/agent-fleet init` later to re-bootstrap (commands are removed by default once setup completes).");
1043
- for (const line of lines) console.log(line);
981
+ return supplied ?? detectAgent();
1044
982
  }
1045
983
 
1046
984
  function agentLaunchHint(agent) {
1047
- return { "claude-code": "Claude Code (`claude`)", "opencode": "OpenCode (`opencode`)", "pi": "pi (`pi`)" }[agent] || agent;
1048
- }
1049
-
1050
- function tryLaunch(agent, cwd) {
1051
- const cmd = { "claude-code": "claude", "opencode": "opencode", "pi": "pi" }[agent];
1052
- if (!cmd) return;
1053
- console.log(`\nLaunching: ${cmd} (cwd: ${cwd})`);
1054
- const r = spawnSync(cmd, [], { cwd, stdio: "inherit" });
1055
- if (r.error) {
1056
- console.log(`(could not launch ${cmd}: ${r.error.message})`);
1057
- const setupCmd = agent === "claude-code" ? "/setup-agent-fleet" : "/af-setup-agent-fleet";
1058
- console.log(`Open ${cmd} manually and run ${setupCmd}.`);
1059
- }
985
+ return { "pi": "pi (`pi`)" }[agent] || agent;
1060
986
  }
1061
987
 
1062
988
  function readRecordedVersion(path) {
@@ -1117,13 +1043,39 @@ function fail(msg) {
1117
1043
  }
1118
1044
 
1119
1045
  function printHelp(sub) {
1046
+ if (sub === "setup") {
1047
+ console.log(`agent-fleet setup [options]
1048
+
1049
+ Reconcile the workspace to a Default or Full desired state. In a TTY without
1050
+ --yes, the interactive selector explains Default, Full, and experimental
1051
+ opt-in, then shows the exact plan before writing. Non-TTY mutations require
1052
+ --yes; --dry-run always writes nothing.
1053
+
1054
+ Options:
1055
+ --workspace <path> Target workspace (default: cwd)
1056
+ --preset <default|full> Desired preset
1057
+ --features <name[,name]|none> Exact feature opt-ins
1058
+ --save-desired Persist CLI overrides to .ai/agent-fleet.json
1059
+ --migrate Permit non-interactive first migration (with explicit preset/features and --yes)
1060
+ --allow-exec Run consented runtime commands after the file transaction
1061
+ --on-conflict <ours|theirs> Resolve a three-way conflict before the transaction
1062
+ --dry-run Print a plan; write nothing
1063
+ --json Emit a machine-readable plan/result (--yes applies)
1064
+ -y, --yes Consent to non-interactive mutation
1065
+ -h, --help Show this help
1066
+
1067
+ Resolve conflicts with --on-conflict theirs (take the package version) or
1068
+ --on-conflict ours (keep the local copy).
1069
+ `);
1070
+ return;
1071
+ }
1120
1072
  if (sub === "init") {
1121
1073
  console.log(`agent-fleet init [options]
1122
1074
 
1123
1075
  Materialize the package and hand off to the runtime's Agent Fleet setup command.
1124
1076
 
1125
1077
  Options:
1126
- --agent <claude-code|opencode|pi> Skip the agent auto-detection
1078
+ --agent pi Coding agent (pi is the only target)
1127
1079
  --workspace <path> Target workspace (default: cwd)
1128
1080
  --launch Attempt to launch the coding agent after init
1129
1081
  -h, --help Show this help
@@ -1146,7 +1098,7 @@ Options:
1146
1098
 
1147
1099
  Options:
1148
1100
  --workspace <path> Target workspace (default: cwd)
1149
- --agent <claude-code|opencode|pi> Override the recorded/detected agent
1101
+ --agent pi Coding agent (pi is the only target)
1150
1102
  --fix Apply the repairs without prompting
1151
1103
  --dry-run Report only; never write, never prompt
1152
1104
  --json Emit the machine report on stdout
@@ -1156,7 +1108,7 @@ Options:
1156
1108
  Exit codes:
1157
1109
  0 nothing to repair
1158
1110
  1 could not run
1159
- 2 repairable issues found (or advisory findings), or a repair failed
1111
+ 2 repairable issues found, pending runtime repair, or a repair failed
1160
1112
  `);
1161
1113
  return;
1162
1114
  }
@@ -1175,9 +1127,10 @@ Options:
1175
1127
  --workspace <path> Target workspace (default: cwd)
1176
1128
  --items <id[,id]> Item ids to remove
1177
1129
  --all Remove everything the state file records
1178
- --agent <claude-code|opencode|pi> Override the recorded agent
1130
+ --agent pi Coding agent (pi is the only target)
1179
1131
  --dry-run Print the plan, write nothing
1180
1132
  --json Emit the machine plan/result on stdout
1133
+ --purge-config Also remove .ai desired/override/STT config (requires consent)
1181
1134
  -y, --yes Skip the confirmation
1182
1135
  -h, --help Show this help
1183
1136
 
@@ -1195,7 +1148,7 @@ Exit codes:
1195
1148
 
1196
1149
  Options:
1197
1150
  --workspace <path> Target workspace (default: cwd)
1198
- --agent <claude-code|opencode|pi> Override the recorded/detected agent
1151
+ --agent pi Coding agent (pi is the only target)
1199
1152
  --json Emit the machine report on stdout
1200
1153
  --no-doctor Skip the symlink/persona/overrides scan
1201
1154
  -h, --help Show this help
@@ -1219,7 +1172,7 @@ An available upgrade (state "outdated") and a deliberate local edit (state
1219
1172
 
1220
1173
  Options:
1221
1174
  --workspace <path> Target workspace (default: cwd)
1222
- --agent <claude-code|opencode|pi> Override the recorded/detected agent${sub === "install" ? `
1175
+ --agent pi Coding agent (pi is the only target)${sub === "install" ? `
1223
1176
  --profile <name[,name]> Named selections, unioned
1224
1177
  --items <id[,id]> Explicit item ids, added to the profiles` : ""}
1225
1178
  --allow-exec Include items that run a command
@@ -1230,6 +1183,9 @@ Options:
1230
1183
  -y, --yes Skip the confirmation (required with --json)
1231
1184
  -h, --help Show this help
1232
1185
 
1186
+ Resolve conflicts with --accept-theirs (take the new version) or --accept-ours
1187
+ (keep the local copy). upgrade does not support setup's --on-conflict flag.
1188
+
1233
1189
  Exit codes:
1234
1190
  0 applied, or nothing to do
1235
1191
  1 could not plan, or a write failed partway
@@ -1243,29 +1199,6 @@ Artifacts are installed as copies. --method symlink exists only inside an
1243
1199
  agent-fleet checkout, where editing an artifact is meant to edit the source; a
1244
1200
  workspace that recorded symlinks before that restriction is migrated to copies
1245
1201
  on the next install or upgrade.
1246
- `);
1247
- return;
1248
- }
1249
- if (sub === "transform-persona") {
1250
- console.log(`agent-fleet transform-persona --agent <agent> [options] [persona…]
1251
-
1252
- Generate per-agent subagent definitions from the canonical agents/*.md
1253
- personas. pi gets the canonical file unchanged; claude-code and opencode get
1254
- a transformed copy (tools/model translated, agent-hub-only keys dropped).
1255
- pi-only personas (bowser, orchestrator) are refused for other agents.
1256
-
1257
- Options:
1258
- --agent <claude-code|opencode|pi> Target agent (required)
1259
- --list List available personas + target paths
1260
- --all Transform every available persona
1261
- --workspace <path> Write into <path>/<target>; omit to print to stdout
1262
- --dry-run With --workspace: show what would be written
1263
- -h, --help Show this help
1264
-
1265
- Examples:
1266
- agent-fleet transform-persona --list --agent claude-code
1267
- agent-fleet transform-persona --agent claude-code code-reviewer
1268
- agent-fleet transform-persona --agent opencode --all --workspace ~/projects/foo
1269
1202
  `);
1270
1203
  return;
1271
1204
  }
@@ -1320,12 +1253,12 @@ Examples:
1320
1253
  console.log(`agent-fleet update [options]
1321
1254
 
1322
1255
  Surface the version delta and re-install the runtime's Agent Fleet setup
1323
- command so it is always present after an update (guided-workspace-setup
1256
+ command so it is always present after an update (deterministic setup CLI
1324
1257
  removes it at the end of a run by default). The actual diff-aware refresh
1325
1258
  then runs inside your coding agent via that command.
1326
1259
 
1327
1260
  Options:
1328
- --agent <claude-code|opencode|pi> Override the agent (default: marker → auto-detect)
1261
+ --agent pi Coding agent (pi is the only target)
1329
1262
  --workspace <path> Target workspace (default: cwd)
1330
1263
  --dry-run Show what would be written; touch nothing
1331
1264
  -h, --help Show this help
@@ -1342,18 +1275,15 @@ Usage:
1342
1275
  npx agent-fleet <command> [options]
1343
1276
 
1344
1277
  Commands:
1345
- init Bootstrap installer files + hand off to the setup workflow
1278
+ init Compatibility alias for setup
1346
1279
  doctor Find and repair breakage (--fix); advisory findings listed
1347
1280
  verify Read-only report: manifest × install state × disk (--json)
1348
1281
  install Install from a profile or explicit item ids
1349
1282
  upgrade Upgrade what is installed, with a three-way merge
1283
+ setup Reconcile Default/Full desired state (interactive in a TTY)
1350
1284
  uninstall Remove recorded artifacts (--items / --all)
1351
- update Surface the version delta + hand off to the setup workflow
1285
+ update Compatibility alias for setup
1352
1286
  check-update One-line registry check (used by session hooks; safe to script)
1353
- cleanup-installer Remove the installer slash commands from a workspace (used
1354
- by the skill at end of setup; safe to run by hand)
1355
- transform-persona Generate per-agent subagent files from the canonical
1356
- agents/*.md personas (used by the setup skill during apply)
1357
1287
  set-hermes-telegram Install/status the liaison and start/stop its Herdr bridge
1358
1288
  set-hermes-watchdog Install/status/update/uninstall the fail-closed watchdog skill
1359
1289
 
@@ -1362,8 +1292,8 @@ Options:
1362
1292
  -h, --help Print this help (or per-command help)
1363
1293
 
1364
1294
  Examples:
1295
+ npx agent-fleet setup --preset default --features none --yes
1365
1296
  npx agent-fleet init
1366
- npx agent-fleet init --agent claude-code --method copy
1367
1297
  npx agent-fleet doctor --workspace ~/projects/foo --fix
1368
1298
  npx agent-fleet verify --agent pi --json
1369
1299
  npx agent-fleet install --agent pi --profile recommended --yes