@chankov/agent-fleet 0.0.6 → 0.0.8

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 (717) hide show
  1. package/.claude/commands/set-hermes-watchdog.md +6 -0
  2. package/.opencode/commands/af-set-hermes-watchdog.md +6 -0
  3. package/.pi/harnesses/agent-hub/README.md +75 -16
  4. package/.pi/harnesses/agent-hub/artifacts.js +56 -2
  5. package/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  6. package/.pi/harnesses/agent-hub/context-window.js +106 -0
  7. package/.pi/harnesses/agent-hub/delegate.ts +58 -9
  8. package/.pi/harnesses/agent-hub/drift-watchdog.js +54 -8
  9. package/.pi/harnesses/agent-hub/helpers.ts +34 -0
  10. package/.pi/harnesses/agent-hub/index.ts +723 -159
  11. package/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  12. package/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  13. package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +2 -2
  14. package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +257 -11
  15. package/.pi/harnesses/agent-hub/package.json +1 -1
  16. package/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  17. package/.pi/harnesses/agent-hub/return-contract.js +78 -0
  18. package/.pi/harnesses/agent-hub/return-extract.js +75 -0
  19. package/.pi/harnesses/agent-hub/run-budget.js +29 -3
  20. package/.pi/harnesses/agent-hub/session-health.js +110 -0
  21. package/.pi/harnesses/agent-hub/spawn.ts +109 -1
  22. package/.pi/harnesses/agent-hub/spawned-peers.js +74 -0
  23. package/.pi/harnesses/coms/README.md +4 -3
  24. package/.pi/harnesses/coms/index.ts +80 -58
  25. package/.pi/harnesses/coms/package.json +1 -1
  26. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  27. package/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  28. package/.pi/harnesses/lib/herdr-client.ts +7 -2
  29. package/.pi/harnesses/lib/herdr-presence.ts +141 -30
  30. package/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  31. package/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
  32. package/.pi/harnesses/lib/hermes-monitor-registry.ts +1 -1
  33. package/.pi/harnesses/lib/hermes-monitor-socket.ts +47 -2
  34. package/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  35. package/.versions/0.0.7/.claude/commands/build.md +44 -0
  36. package/.versions/0.0.7/.claude/commands/code-simplify.md +22 -0
  37. package/.versions/0.0.7/.claude/commands/design-agent.md +14 -0
  38. package/.versions/0.0.7/.claude/commands/doctor-agent-fleet.md +17 -0
  39. package/.versions/0.0.7/.claude/commands/orchestrate.md +112 -0
  40. package/.versions/0.0.7/.claude/commands/plan.md +16 -0
  41. package/.versions/0.0.7/.claude/commands/prime.md +22 -0
  42. package/.versions/0.0.7/.claude/commands/review.md +16 -0
  43. package/.versions/0.0.7/.claude/commands/set-hermes-telegram.md +15 -0
  44. package/.versions/0.0.7/.claude/commands/set-hermes-watchdog.md +6 -0
  45. package/.versions/0.0.7/.claude/commands/setup-agent-fleet.md +25 -0
  46. package/.versions/0.0.7/.claude/commands/ship.md +72 -0
  47. package/.versions/0.0.7/.claude/commands/spec.md +15 -0
  48. package/.versions/0.0.7/.claude/commands/test.md +19 -0
  49. package/.versions/0.0.7/.claude/commands/webperf.md +32 -0
  50. package/.versions/0.0.7/.claude/orchestrate-teams.yaml +24 -0
  51. package/.versions/0.0.7/.opencode/commands/af-build.md +17 -0
  52. package/.versions/0.0.7/.opencode/commands/af-code-simplify.md +16 -0
  53. package/.versions/0.0.7/.opencode/commands/af-compound.md +16 -0
  54. package/.versions/0.0.7/.opencode/commands/af-design-agent.md +15 -0
  55. package/.versions/0.0.7/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  56. package/.versions/0.0.7/.opencode/commands/af-orchestrate.md +112 -0
  57. package/.versions/0.0.7/.opencode/commands/af-plan.md +16 -0
  58. package/.versions/0.0.7/.opencode/commands/af-prime.md +22 -0
  59. package/.versions/0.0.7/.opencode/commands/af-review.md +15 -0
  60. package/.versions/0.0.7/.opencode/commands/af-set-hermes-telegram.md +15 -0
  61. package/.versions/0.0.7/.opencode/commands/af-set-hermes-watchdog.md +6 -0
  62. package/.versions/0.0.7/.opencode/commands/af-setup-agent-fleet.md +15 -0
  63. package/.versions/0.0.7/.opencode/commands/af-ship.md +16 -0
  64. package/.versions/0.0.7/.opencode/commands/af-spec.md +16 -0
  65. package/.versions/0.0.7/.opencode/commands/af-test.md +21 -0
  66. package/.versions/0.0.7/.opencode/commands/af-webperf.md +32 -0
  67. package/.versions/0.0.7/.opencode/orchestrate-teams.yaml +24 -0
  68. package/.versions/0.0.7/.pi/agents/dispatch-policy.yaml +32 -0
  69. package/.versions/0.0.7/.pi/agents/model-profiles.yaml +20 -0
  70. package/.versions/0.0.7/.pi/agents/peers.yaml +146 -0
  71. package/.versions/0.0.7/.pi/agents/teams.yaml +39 -0
  72. package/.versions/0.0.7/.pi/damage-control-rules.yaml +297 -0
  73. package/.versions/0.0.7/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  74. package/.versions/0.0.7/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  75. package/.versions/0.0.7/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  76. package/.versions/0.0.7/.pi/extensions/btw/README.md +118 -0
  77. package/.versions/0.0.7/.pi/extensions/btw/index.ts +917 -0
  78. package/.versions/0.0.7/.pi/extensions/btw/package.json +6 -0
  79. package/.versions/0.0.7/.pi/extensions/btw/state.js +179 -0
  80. package/.versions/0.0.7/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  81. package/.versions/0.0.7/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  82. package/.versions/0.0.7/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  83. package/.versions/0.0.7/.pi/extensions/compact-and-continue/README.md +42 -0
  84. package/.versions/0.0.7/.pi/extensions/compact-and-continue/index.ts +120 -0
  85. package/.versions/0.0.7/.pi/extensions/compact-and-continue/package.json +6 -0
  86. package/.versions/0.0.7/.pi/extensions/mcp-bridge/README.md +46 -0
  87. package/.versions/0.0.7/.pi/extensions/mcp-bridge/index.ts +206 -0
  88. package/.versions/0.0.7/.pi/extensions/mcp-bridge/package.json +6 -0
  89. package/.versions/0.0.7/.pi/extensions/package-lock.json +1143 -0
  90. package/.versions/0.0.7/.pi/extensions/package.json +9 -0
  91. package/.versions/0.0.7/.pi/extensions/pi-voice-stt/README.md +201 -0
  92. package/.versions/0.0.7/.pi/extensions/pi-voice-stt/config.ts +198 -0
  93. package/.versions/0.0.7/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  94. package/.versions/0.0.7/.pi/extensions/pi-voice-stt/index.ts +248 -0
  95. package/.versions/0.0.7/.pi/extensions/pi-voice-stt/package.json +6 -0
  96. package/.versions/0.0.7/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  97. package/.versions/0.0.7/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  98. package/.versions/0.0.7/.pi/harnesses/agent-hub/README.md +857 -0
  99. package/.versions/0.0.7/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  100. package/.versions/0.0.7/.pi/harnesses/agent-hub/artifacts.js +146 -0
  101. package/.versions/0.0.7/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  102. package/.versions/0.0.7/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  103. package/.versions/0.0.7/.pi/harnesses/agent-hub/context-window.js +106 -0
  104. package/.versions/0.0.7/.pi/harnesses/agent-hub/delegate.ts +435 -0
  105. package/.versions/0.0.7/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
  106. package/.versions/0.0.7/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  107. package/.versions/0.0.7/.pi/harnesses/agent-hub/footer.ts +29 -0
  108. package/.versions/0.0.7/.pi/harnesses/agent-hub/helpers.ts +248 -0
  109. package/.versions/0.0.7/.pi/harnesses/agent-hub/index.ts +8609 -0
  110. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  111. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  112. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  113. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  114. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  115. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  116. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  117. package/.versions/0.0.7/.pi/harnesses/agent-hub/monitor-session-bridge.ts +257 -0
  118. package/.versions/0.0.7/.pi/harnesses/agent-hub/package.json +7 -0
  119. package/.versions/0.0.7/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  120. package/.versions/0.0.7/.pi/harnesses/agent-hub/research-retention.js +34 -0
  121. package/.versions/0.0.7/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  122. package/.versions/0.0.7/.pi/harnesses/agent-hub/return-contract.js +293 -0
  123. package/.versions/0.0.7/.pi/harnesses/agent-hub/return-extract.js +75 -0
  124. package/.versions/0.0.7/.pi/harnesses/agent-hub/run-budget.js +181 -0
  125. package/.versions/0.0.7/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  126. package/.versions/0.0.7/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  127. package/.versions/0.0.7/.pi/harnesses/agent-hub/session-health.js +110 -0
  128. package/.versions/0.0.7/.pi/harnesses/agent-hub/spawn.ts +354 -0
  129. package/.versions/0.0.7/.pi/harnesses/agent-hub/spawned-peers.js +74 -0
  130. package/.versions/0.0.7/.pi/harnesses/agent-hub/version.ts +18 -0
  131. package/.versions/0.0.7/.pi/harnesses/ask-user-remote/README.md +19 -0
  132. package/.versions/0.0.7/.pi/harnesses/ask-user-remote/index.ts +321 -0
  133. package/.versions/0.0.7/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  134. package/.versions/0.0.7/.pi/harnesses/coms/README.md +93 -0
  135. package/.versions/0.0.7/.pi/harnesses/coms/index.ts +1767 -0
  136. package/.versions/0.0.7/.pi/harnesses/coms/package.json +7 -0
  137. package/.versions/0.0.7/.pi/harnesses/coms/version.ts +18 -0
  138. package/.versions/0.0.7/.pi/harnesses/damage-control-continue/README.md +117 -0
  139. package/.versions/0.0.7/.pi/harnesses/damage-control-continue/index.ts +536 -0
  140. package/.versions/0.0.7/.pi/harnesses/damage-control-continue/package.json +7 -0
  141. package/.versions/0.0.7/.pi/harnesses/damage-control-continue/version.ts +18 -0
  142. package/.versions/0.0.7/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  143. package/.versions/0.0.7/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  144. package/.versions/0.0.7/.pi/harnesses/lib/herdr-client.ts +463 -0
  145. package/.versions/0.0.7/.pi/harnesses/lib/herdr-presence.ts +399 -0
  146. package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  147. package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  148. package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  149. package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  150. package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  151. package/.versions/0.0.7/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  152. package/.versions/0.0.7/.pi/harnesses/package-lock.json +35 -0
  153. package/.versions/0.0.7/.pi/harnesses/package.json +9 -0
  154. package/.versions/0.0.7/.pi/prompts/af-build.md +24 -0
  155. package/.versions/0.0.7/.pi/prompts/af-code-simplify.md +22 -0
  156. package/.versions/0.0.7/.pi/prompts/af-doctor-agent-fleet.md +15 -0
  157. package/.versions/0.0.7/.pi/prompts/af-plan.md +16 -0
  158. package/.versions/0.0.7/.pi/prompts/af-review.md +16 -0
  159. package/.versions/0.0.7/.pi/prompts/af-set-hermes-telegram.md +15 -0
  160. package/.versions/0.0.7/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  161. package/.versions/0.0.7/.pi/prompts/af-setup-agent-fleet.md +27 -0
  162. package/.versions/0.0.7/.pi/prompts/af-ship.md +17 -0
  163. package/.versions/0.0.7/.pi/prompts/af-spec.md +15 -0
  164. package/.versions/0.0.7/.pi/prompts/af-test.md +19 -0
  165. package/.versions/0.0.7/.pi/skills/bowser/SKILL.md +145 -0
  166. package/.versions/0.0.7/.version +1 -0
  167. package/.versions/0.0.7/agents/architect.md +23 -0
  168. package/.versions/0.0.7/agents/bowser.md +26 -0
  169. package/.versions/0.0.7/agents/builder.md +53 -0
  170. package/.versions/0.0.7/agents/code-reviewer.md +205 -0
  171. package/.versions/0.0.7/agents/deep-researcher.md +31 -0
  172. package/.versions/0.0.7/agents/documenter.md +18 -0
  173. package/.versions/0.0.7/agents/orchestrator.md +65 -0
  174. package/.versions/0.0.7/agents/plan-reviewer.md +60 -0
  175. package/.versions/0.0.7/agents/planner.md +69 -0
  176. package/.versions/0.0.7/agents/releaser.md +24 -0
  177. package/.versions/0.0.7/agents/researcher.md +28 -0
  178. package/.versions/0.0.7/agents/security-auditor.md +166 -0
  179. package/.versions/0.0.7/agents/test-engineer.md +151 -0
  180. package/.versions/0.0.7/agents/web-debugger.md +42 -0
  181. package/.versions/0.0.7/agents/web-performance-auditor.md +192 -0
  182. package/.versions/0.0.7/codex/CONDUCTOR.md +148 -0
  183. package/.versions/0.0.7/docs/ARCHITECTURE.md +262 -0
  184. package/.versions/0.0.7/docs/agent-fleet-setup.md +366 -0
  185. package/.versions/0.0.7/docs/claude-code-coms-bridge.md +109 -0
  186. package/.versions/0.0.7/docs/codex-remote-conductor.md +170 -0
  187. package/.versions/0.0.7/docs/coms-hermes-bridge.md +189 -0
  188. package/.versions/0.0.7/docs/getting-started.md +231 -0
  189. package/.versions/0.0.7/docs/npm-install.md +337 -0
  190. package/.versions/0.0.7/docs/opencode-setup.md +249 -0
  191. package/.versions/0.0.7/docs/pi-extensions.md +293 -0
  192. package/.versions/0.0.7/docs/pi-setup.md +476 -0
  193. package/.versions/0.0.7/docs/skill-anatomy.md +150 -0
  194. package/.versions/0.0.7/hermes/README.md +347 -0
  195. package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  196. package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  197. package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  198. package/.versions/0.0.7/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  199. package/.versions/0.0.7/hermes/gates/gate-o-capability.md +8 -0
  200. package/.versions/0.0.7/hermes/gates/gate-o-validator-fixtures.json +1 -0
  201. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  202. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  203. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  204. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  205. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  206. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  207. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  208. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  209. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  210. package/.versions/0.0.7/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  211. package/.versions/0.0.7/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  212. package/.versions/0.0.7/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  213. package/.versions/0.0.7/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  214. package/.versions/0.0.7/hermes/skills/hub-conductor/SKILL.md +84 -0
  215. package/.versions/0.0.7/hermes/skills/hub-liaison/SKILL.md +84 -0
  216. package/.versions/0.0.7/hermes/skills/hub-watchdog/SKILL.md +76 -0
  217. package/.versions/0.0.7/hermes/skills/hub-watchdog/manifest.json +1 -0
  218. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  219. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  220. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  221. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  222. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  223. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  224. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  225. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  226. package/.versions/0.0.7/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  227. package/.versions/0.0.7/hermes/watchdog-tests/__init__.py +0 -0
  228. package/.versions/0.0.7/hooks/SIMPLIFY-IGNORE.md +90 -0
  229. package/.versions/0.0.7/hooks/coms-stop-hook.mjs +84 -0
  230. package/.versions/0.0.7/hooks/hooks.json +14 -0
  231. package/.versions/0.0.7/hooks/session-start.sh +74 -0
  232. package/.versions/0.0.7/hooks/simplify-ignore.sh +302 -0
  233. package/.versions/0.0.7/justfile +245 -0
  234. package/.versions/0.0.7/references/accessibility-checklist.md +160 -0
  235. package/.versions/0.0.7/references/definition-of-done.md +67 -0
  236. package/.versions/0.0.7/references/fleet-coordination-patterns.md +151 -0
  237. package/.versions/0.0.7/references/observability-checklist.md +91 -0
  238. package/.versions/0.0.7/references/orchestration-patterns.md +370 -0
  239. package/.versions/0.0.7/references/performance-checklist.md +153 -0
  240. package/.versions/0.0.7/references/prompting-patterns.md +380 -0
  241. package/.versions/0.0.7/references/security-checklist.md +179 -0
  242. package/.versions/0.0.7/references/testing-patterns.md +236 -0
  243. package/.versions/0.0.7/scripts/codex-conductor.ts +41 -0
  244. package/.versions/0.0.7/scripts/codex-remote-control.ts +167 -0
  245. package/.versions/0.0.7/scripts/coms-claude-bridge.ts +401 -0
  246. package/.versions/0.0.7/scripts/coms-cli.ts +484 -0
  247. package/.versions/0.0.7/scripts/coms-hermes-bridge.ts +413 -0
  248. package/.versions/0.0.7/scripts/fleet.ts +149 -0
  249. package/.versions/0.0.7/scripts/hermes-monitor-capability-runner.ts +25 -0
  250. package/.versions/0.0.7/scripts/hermes-monitor-scenario.ts +474 -0
  251. package/.versions/0.0.7/scripts/hermes-watchdog-capability-probe.ts +45 -0
  252. package/.versions/0.0.7/scripts/install-hermes-plugin.sh +180 -0
  253. package/.versions/0.0.7/scripts/lib/claude-bridge-core.ts +165 -0
  254. package/.versions/0.0.7/scripts/lib/codex-conductor.ts +88 -0
  255. package/.versions/0.0.7/scripts/lib/codex-remote-control.ts +480 -0
  256. package/.versions/0.0.7/scripts/lib/coms-envelope.ts +582 -0
  257. package/.versions/0.0.7/scripts/lib/fake-herdr-server.ts +88 -0
  258. package/.versions/0.0.7/scripts/lib/fleet-command.ts +109 -0
  259. package/.versions/0.0.7/scripts/lib/herdr-layout.ts +263 -0
  260. package/.versions/0.0.7/scripts/lib/hermes-bridge-core.ts +241 -0
  261. package/.versions/0.0.7/scripts/lib/hermes-monitor-events.ts +1 -0
  262. package/.versions/0.0.7/scripts/lib/hermes-monitor-herdr.ts +2 -0
  263. package/.versions/0.0.7/scripts/lib/hermes-monitor-model.ts +3 -0
  264. package/.versions/0.0.7/scripts/lib/hermes-monitor-registry.ts +2 -0
  265. package/.versions/0.0.7/scripts/lib/hermes-monitor-socket.ts +2 -0
  266. package/.versions/0.0.7/scripts/lib/hermes-monitor-store.ts +2 -0
  267. package/.versions/0.0.7/scripts/lib/monitor-env.ts +120 -0
  268. package/.versions/0.0.7/scripts/lib/persona-banner.ts +62 -0
  269. package/.versions/0.0.7/scripts/lib/spawn-stagger.ts +101 -0
  270. package/.versions/0.0.7/scripts/lib/team-project.ts +191 -0
  271. package/.versions/0.0.7/scripts/lib/team-snapshot.ts +147 -0
  272. package/.versions/0.0.7/scripts/peer-banner.ts +40 -0
  273. package/.versions/0.0.7/scripts/team-snapshot.ts +237 -0
  274. package/.versions/0.0.7/scripts/team-up.ts +360 -0
  275. package/.versions/0.0.7/skills/_internal/grilling.md +11 -0
  276. package/.versions/0.0.7/skills/browser-testing-with-devtools/SKILL.md +352 -0
  277. package/.versions/0.0.7/skills/code-review-and-quality/SKILL.md +381 -0
  278. package/.versions/0.0.7/skills/compound-learning/SKILL.md +137 -0
  279. package/.versions/0.0.7/skills/context-engineering/SKILL.md +291 -0
  280. package/.versions/0.0.7/skills/deprecation-and-migration/SKILL.md +206 -0
  281. package/.versions/0.0.7/skills/designing-agents/SKILL.md +394 -0
  282. package/.versions/0.0.7/skills/designing-agents/pi-harness-authoring.md +222 -0
  283. package/.versions/0.0.7/skills/frontend-ui-engineering/SKILL.md +328 -0
  284. package/.versions/0.0.7/skills/git-workflow-and-versioning/SKILL.md +316 -0
  285. package/.versions/0.0.7/skills/guided-workspace-setup/SKILL.md +544 -0
  286. package/.versions/0.0.7/skills/guided-workspace-setup/companion-manifest.json +35 -0
  287. package/.versions/0.0.7/skills/idea-refine/SKILL.md +182 -0
  288. package/.versions/0.0.7/skills/idea-refine/examples.md +238 -0
  289. package/.versions/0.0.7/skills/idea-refine/frameworks.md +99 -0
  290. package/.versions/0.0.7/skills/idea-refine/refinement-criteria.md +113 -0
  291. package/.versions/0.0.7/skills/idea-refine/scripts/idea-refine.sh +15 -0
  292. package/.versions/0.0.7/skills/incremental-implementation/SKILL.md +287 -0
  293. package/.versions/0.0.7/skills/interview-me/SKILL.md +226 -0
  294. package/.versions/0.0.7/skills/orchestration-verification/SKILL.md +181 -0
  295. package/.versions/0.0.7/skills/peer-coms/SKILL.md +90 -0
  296. package/.versions/0.0.7/skills/performance-optimization/SKILL.md +350 -0
  297. package/.versions/0.0.7/skills/planning-and-task-breakdown/SKILL.md +236 -0
  298. package/.versions/0.0.7/skills/security-and-hardening/SKILL.md +461 -0
  299. package/.versions/0.0.7/skills/spec-driven-development/SKILL.md +245 -0
  300. package/.versions/0.0.7/skills/using-agent-skills/SKILL.md +199 -0
  301. package/.versions/0.0.7/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  302. package/.versions/0.0.7/vendor/agent-skills-upstream/LICENSE +21 -0
  303. package/.versions/0.0.7/vendor/agent-skills-upstream/README.md +11 -0
  304. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  305. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  306. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  307. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  308. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  309. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  310. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  311. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  312. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  313. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  314. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  315. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  316. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  317. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  318. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  319. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  320. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  321. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  322. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  323. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  324. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  325. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  326. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  327. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  328. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  329. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  330. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  331. package/.versions/0.0.7/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  332. package/.versions/0.0.8/.claude/commands/build.md +44 -0
  333. package/.versions/0.0.8/.claude/commands/code-simplify.md +22 -0
  334. package/.versions/0.0.8/.claude/commands/design-agent.md +14 -0
  335. package/.versions/0.0.8/.claude/commands/doctor-agent-fleet.md +17 -0
  336. package/.versions/0.0.8/.claude/commands/orchestrate.md +112 -0
  337. package/.versions/0.0.8/.claude/commands/plan.md +16 -0
  338. package/.versions/0.0.8/.claude/commands/prime.md +22 -0
  339. package/.versions/0.0.8/.claude/commands/review.md +16 -0
  340. package/.versions/0.0.8/.claude/commands/set-hermes-telegram.md +15 -0
  341. package/.versions/0.0.8/.claude/commands/set-hermes-watchdog.md +6 -0
  342. package/.versions/0.0.8/.claude/commands/setup-agent-fleet.md +25 -0
  343. package/.versions/0.0.8/.claude/commands/ship.md +72 -0
  344. package/.versions/0.0.8/.claude/commands/spec.md +15 -0
  345. package/.versions/0.0.8/.claude/commands/test.md +19 -0
  346. package/.versions/0.0.8/.claude/commands/webperf.md +32 -0
  347. package/.versions/0.0.8/.claude/orchestrate-teams.yaml +24 -0
  348. package/.versions/0.0.8/.opencode/commands/af-build.md +17 -0
  349. package/.versions/0.0.8/.opencode/commands/af-code-simplify.md +16 -0
  350. package/.versions/0.0.8/.opencode/commands/af-compound.md +16 -0
  351. package/.versions/0.0.8/.opencode/commands/af-design-agent.md +15 -0
  352. package/.versions/0.0.8/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  353. package/.versions/0.0.8/.opencode/commands/af-orchestrate.md +112 -0
  354. package/.versions/0.0.8/.opencode/commands/af-plan.md +16 -0
  355. package/.versions/0.0.8/.opencode/commands/af-prime.md +22 -0
  356. package/.versions/0.0.8/.opencode/commands/af-review.md +15 -0
  357. package/.versions/0.0.8/.opencode/commands/af-set-hermes-telegram.md +15 -0
  358. package/.versions/0.0.8/.opencode/commands/af-set-hermes-watchdog.md +6 -0
  359. package/.versions/0.0.8/.opencode/commands/af-setup-agent-fleet.md +15 -0
  360. package/.versions/0.0.8/.opencode/commands/af-ship.md +16 -0
  361. package/.versions/0.0.8/.opencode/commands/af-spec.md +16 -0
  362. package/.versions/0.0.8/.opencode/commands/af-test.md +21 -0
  363. package/.versions/0.0.8/.opencode/commands/af-webperf.md +32 -0
  364. package/.versions/0.0.8/.opencode/orchestrate-teams.yaml +24 -0
  365. package/.versions/0.0.8/.pi/agents/dispatch-policy.yaml +32 -0
  366. package/.versions/0.0.8/.pi/agents/model-profiles.yaml +20 -0
  367. package/.versions/0.0.8/.pi/agents/peers.yaml +146 -0
  368. package/.versions/0.0.8/.pi/agents/teams.yaml +39 -0
  369. package/.versions/0.0.8/.pi/damage-control-rules.yaml +297 -0
  370. package/.versions/0.0.8/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  371. package/.versions/0.0.8/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  372. package/.versions/0.0.8/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  373. package/.versions/0.0.8/.pi/extensions/btw/README.md +118 -0
  374. package/.versions/0.0.8/.pi/extensions/btw/index.ts +917 -0
  375. package/.versions/0.0.8/.pi/extensions/btw/package.json +6 -0
  376. package/.versions/0.0.8/.pi/extensions/btw/state.js +179 -0
  377. package/.versions/0.0.8/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  378. package/.versions/0.0.8/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  379. package/.versions/0.0.8/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  380. package/.versions/0.0.8/.pi/extensions/compact-and-continue/README.md +42 -0
  381. package/.versions/0.0.8/.pi/extensions/compact-and-continue/index.ts +120 -0
  382. package/.versions/0.0.8/.pi/extensions/compact-and-continue/package.json +6 -0
  383. package/.versions/0.0.8/.pi/extensions/mcp-bridge/README.md +46 -0
  384. package/.versions/0.0.8/.pi/extensions/mcp-bridge/index.ts +206 -0
  385. package/.versions/0.0.8/.pi/extensions/mcp-bridge/package.json +6 -0
  386. package/.versions/0.0.8/.pi/extensions/package-lock.json +1143 -0
  387. package/.versions/0.0.8/.pi/extensions/package.json +9 -0
  388. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/README.md +201 -0
  389. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/config.ts +198 -0
  390. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  391. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/index.ts +248 -0
  392. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/package.json +6 -0
  393. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  394. package/.versions/0.0.8/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  395. package/.versions/0.0.8/.pi/harnesses/agent-hub/README.md +857 -0
  396. package/.versions/0.0.8/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  397. package/.versions/0.0.8/.pi/harnesses/agent-hub/artifacts.js +146 -0
  398. package/.versions/0.0.8/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  399. package/.versions/0.0.8/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  400. package/.versions/0.0.8/.pi/harnesses/agent-hub/context-window.js +106 -0
  401. package/.versions/0.0.8/.pi/harnesses/agent-hub/delegate.ts +435 -0
  402. package/.versions/0.0.8/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
  403. package/.versions/0.0.8/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  404. package/.versions/0.0.8/.pi/harnesses/agent-hub/footer.ts +29 -0
  405. package/.versions/0.0.8/.pi/harnesses/agent-hub/helpers.ts +248 -0
  406. package/.versions/0.0.8/.pi/harnesses/agent-hub/index.ts +8609 -0
  407. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  408. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  409. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  410. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  411. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  412. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  413. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  414. package/.versions/0.0.8/.pi/harnesses/agent-hub/monitor-session-bridge.ts +257 -0
  415. package/.versions/0.0.8/.pi/harnesses/agent-hub/package.json +7 -0
  416. package/.versions/0.0.8/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  417. package/.versions/0.0.8/.pi/harnesses/agent-hub/research-retention.js +34 -0
  418. package/.versions/0.0.8/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  419. package/.versions/0.0.8/.pi/harnesses/agent-hub/return-contract.js +293 -0
  420. package/.versions/0.0.8/.pi/harnesses/agent-hub/return-extract.js +75 -0
  421. package/.versions/0.0.8/.pi/harnesses/agent-hub/run-budget.js +181 -0
  422. package/.versions/0.0.8/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  423. package/.versions/0.0.8/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  424. package/.versions/0.0.8/.pi/harnesses/agent-hub/session-health.js +110 -0
  425. package/.versions/0.0.8/.pi/harnesses/agent-hub/spawn.ts +354 -0
  426. package/.versions/0.0.8/.pi/harnesses/agent-hub/spawned-peers.js +74 -0
  427. package/.versions/0.0.8/.pi/harnesses/agent-hub/version.ts +18 -0
  428. package/.versions/0.0.8/.pi/harnesses/ask-user-remote/README.md +19 -0
  429. package/.versions/0.0.8/.pi/harnesses/ask-user-remote/index.ts +321 -0
  430. package/.versions/0.0.8/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  431. package/.versions/0.0.8/.pi/harnesses/coms/README.md +93 -0
  432. package/.versions/0.0.8/.pi/harnesses/coms/index.ts +1767 -0
  433. package/.versions/0.0.8/.pi/harnesses/coms/package.json +7 -0
  434. package/.versions/0.0.8/.pi/harnesses/coms/version.ts +18 -0
  435. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/README.md +117 -0
  436. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/index.ts +536 -0
  437. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/package.json +7 -0
  438. package/.versions/0.0.8/.pi/harnesses/damage-control-continue/version.ts +18 -0
  439. package/.versions/0.0.8/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  440. package/.versions/0.0.8/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  441. package/.versions/0.0.8/.pi/harnesses/lib/herdr-client.ts +463 -0
  442. package/.versions/0.0.8/.pi/harnesses/lib/herdr-presence.ts +399 -0
  443. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  444. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  445. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  446. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  447. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  448. package/.versions/0.0.8/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  449. package/.versions/0.0.8/.pi/harnesses/package-lock.json +35 -0
  450. package/.versions/0.0.8/.pi/harnesses/package.json +9 -0
  451. package/.versions/0.0.8/.pi/prompts/af-build.md +24 -0
  452. package/.versions/0.0.8/.pi/prompts/af-code-simplify.md +22 -0
  453. package/.versions/0.0.8/.pi/prompts/af-doctor-agent-fleet.md +15 -0
  454. package/.versions/0.0.8/.pi/prompts/af-plan.md +16 -0
  455. package/.versions/0.0.8/.pi/prompts/af-review.md +16 -0
  456. package/.versions/0.0.8/.pi/prompts/af-set-hermes-telegram.md +15 -0
  457. package/.versions/0.0.8/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  458. package/.versions/0.0.8/.pi/prompts/af-setup-agent-fleet.md +27 -0
  459. package/.versions/0.0.8/.pi/prompts/af-ship.md +17 -0
  460. package/.versions/0.0.8/.pi/prompts/af-spec.md +15 -0
  461. package/.versions/0.0.8/.pi/prompts/af-test.md +19 -0
  462. package/.versions/0.0.8/.pi/skills/bowser/SKILL.md +145 -0
  463. package/.versions/0.0.8/.version +1 -0
  464. package/.versions/0.0.8/agents/architect.md +23 -0
  465. package/.versions/0.0.8/agents/bowser.md +26 -0
  466. package/.versions/0.0.8/agents/builder.md +53 -0
  467. package/.versions/0.0.8/agents/code-reviewer.md +205 -0
  468. package/.versions/0.0.8/agents/deep-researcher.md +31 -0
  469. package/.versions/0.0.8/agents/documenter.md +18 -0
  470. package/.versions/0.0.8/agents/orchestrator.md +65 -0
  471. package/.versions/0.0.8/agents/plan-reviewer.md +60 -0
  472. package/.versions/0.0.8/agents/planner.md +69 -0
  473. package/.versions/0.0.8/agents/releaser.md +24 -0
  474. package/.versions/0.0.8/agents/researcher.md +28 -0
  475. package/.versions/0.0.8/agents/security-auditor.md +166 -0
  476. package/.versions/0.0.8/agents/test-engineer.md +151 -0
  477. package/.versions/0.0.8/agents/web-debugger.md +42 -0
  478. package/.versions/0.0.8/agents/web-performance-auditor.md +192 -0
  479. package/.versions/0.0.8/codex/CONDUCTOR.md +148 -0
  480. package/.versions/0.0.8/docs/ARCHITECTURE.md +262 -0
  481. package/.versions/0.0.8/docs/agent-fleet-setup.md +366 -0
  482. package/.versions/0.0.8/docs/claude-code-coms-bridge.md +109 -0
  483. package/.versions/0.0.8/docs/codex-remote-conductor.md +170 -0
  484. package/.versions/0.0.8/docs/coms-hermes-bridge.md +189 -0
  485. package/.versions/0.0.8/docs/getting-started.md +231 -0
  486. package/.versions/0.0.8/docs/npm-install.md +337 -0
  487. package/.versions/0.0.8/docs/opencode-setup.md +249 -0
  488. package/.versions/0.0.8/docs/pi-extensions.md +293 -0
  489. package/.versions/0.0.8/docs/pi-setup.md +476 -0
  490. package/.versions/0.0.8/docs/skill-anatomy.md +150 -0
  491. package/.versions/0.0.8/hermes/README.md +347 -0
  492. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  493. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  494. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  495. package/.versions/0.0.8/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  496. package/.versions/0.0.8/hermes/gates/gate-o-capability.md +8 -0
  497. package/.versions/0.0.8/hermes/gates/gate-o-validator-fixtures.json +1 -0
  498. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  499. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  500. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  501. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  502. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  503. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  504. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  505. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  506. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  507. package/.versions/0.0.8/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  508. package/.versions/0.0.8/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  509. package/.versions/0.0.8/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  510. package/.versions/0.0.8/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  511. package/.versions/0.0.8/hermes/skills/hub-conductor/SKILL.md +84 -0
  512. package/.versions/0.0.8/hermes/skills/hub-liaison/SKILL.md +84 -0
  513. package/.versions/0.0.8/hermes/skills/hub-watchdog/SKILL.md +76 -0
  514. package/.versions/0.0.8/hermes/skills/hub-watchdog/manifest.json +1 -0
  515. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  516. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  517. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  518. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  519. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  520. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  521. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  522. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  523. package/.versions/0.0.8/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  524. package/.versions/0.0.8/hermes/watchdog-tests/__init__.py +0 -0
  525. package/.versions/0.0.8/hooks/SIMPLIFY-IGNORE.md +90 -0
  526. package/.versions/0.0.8/hooks/coms-stop-hook.mjs +84 -0
  527. package/.versions/0.0.8/hooks/hooks.json +14 -0
  528. package/.versions/0.0.8/hooks/session-start.sh +74 -0
  529. package/.versions/0.0.8/hooks/simplify-ignore.sh +302 -0
  530. package/.versions/0.0.8/justfile +245 -0
  531. package/.versions/0.0.8/references/accessibility-checklist.md +160 -0
  532. package/.versions/0.0.8/references/definition-of-done.md +67 -0
  533. package/.versions/0.0.8/references/fleet-coordination-patterns.md +151 -0
  534. package/.versions/0.0.8/references/observability-checklist.md +91 -0
  535. package/.versions/0.0.8/references/orchestration-patterns.md +370 -0
  536. package/.versions/0.0.8/references/performance-checklist.md +153 -0
  537. package/.versions/0.0.8/references/prompting-patterns.md +380 -0
  538. package/.versions/0.0.8/references/security-checklist.md +179 -0
  539. package/.versions/0.0.8/references/testing-patterns.md +236 -0
  540. package/.versions/0.0.8/scripts/codex-conductor.ts +41 -0
  541. package/.versions/0.0.8/scripts/codex-remote-control.ts +167 -0
  542. package/.versions/0.0.8/scripts/coms-claude-bridge.ts +401 -0
  543. package/.versions/0.0.8/scripts/coms-cli.ts +484 -0
  544. package/.versions/0.0.8/scripts/coms-hermes-bridge.ts +413 -0
  545. package/.versions/0.0.8/scripts/fleet.ts +149 -0
  546. package/.versions/0.0.8/scripts/hermes-monitor-capability-runner.ts +25 -0
  547. package/.versions/0.0.8/scripts/hermes-monitor-scenario.ts +474 -0
  548. package/.versions/0.0.8/scripts/hermes-watchdog-capability-probe.ts +45 -0
  549. package/.versions/0.0.8/scripts/install-hermes-plugin.sh +180 -0
  550. package/.versions/0.0.8/scripts/lib/claude-bridge-core.ts +165 -0
  551. package/.versions/0.0.8/scripts/lib/codex-conductor.ts +88 -0
  552. package/.versions/0.0.8/scripts/lib/codex-remote-control.ts +480 -0
  553. package/.versions/0.0.8/scripts/lib/coms-envelope.ts +582 -0
  554. package/.versions/0.0.8/scripts/lib/fake-herdr-server.ts +88 -0
  555. package/.versions/0.0.8/scripts/lib/fleet-command.ts +109 -0
  556. package/.versions/0.0.8/scripts/lib/herdr-layout.ts +263 -0
  557. package/.versions/0.0.8/scripts/lib/hermes-bridge-core.ts +241 -0
  558. package/.versions/0.0.8/scripts/lib/hermes-monitor-events.ts +1 -0
  559. package/.versions/0.0.8/scripts/lib/hermes-monitor-herdr.ts +2 -0
  560. package/.versions/0.0.8/scripts/lib/hermes-monitor-model.ts +3 -0
  561. package/.versions/0.0.8/scripts/lib/hermes-monitor-registry.ts +2 -0
  562. package/.versions/0.0.8/scripts/lib/hermes-monitor-socket.ts +2 -0
  563. package/.versions/0.0.8/scripts/lib/hermes-monitor-store.ts +2 -0
  564. package/.versions/0.0.8/scripts/lib/monitor-env.ts +120 -0
  565. package/.versions/0.0.8/scripts/lib/persona-banner.ts +62 -0
  566. package/.versions/0.0.8/scripts/lib/spawn-stagger.ts +101 -0
  567. package/.versions/0.0.8/scripts/lib/team-project.ts +191 -0
  568. package/.versions/0.0.8/scripts/lib/team-snapshot.ts +147 -0
  569. package/.versions/0.0.8/scripts/peer-banner.ts +40 -0
  570. package/.versions/0.0.8/scripts/team-snapshot.ts +237 -0
  571. package/.versions/0.0.8/scripts/team-up.ts +360 -0
  572. package/.versions/0.0.8/skills/_internal/grilling.md +11 -0
  573. package/.versions/0.0.8/skills/browser-testing-with-devtools/SKILL.md +352 -0
  574. package/.versions/0.0.8/skills/code-review-and-quality/SKILL.md +381 -0
  575. package/.versions/0.0.8/skills/compound-learning/SKILL.md +137 -0
  576. package/.versions/0.0.8/skills/context-engineering/SKILL.md +291 -0
  577. package/.versions/0.0.8/skills/deprecation-and-migration/SKILL.md +206 -0
  578. package/.versions/0.0.8/skills/designing-agents/SKILL.md +394 -0
  579. package/.versions/0.0.8/skills/designing-agents/pi-harness-authoring.md +222 -0
  580. package/.versions/0.0.8/skills/frontend-ui-engineering/SKILL.md +328 -0
  581. package/.versions/0.0.8/skills/git-workflow-and-versioning/SKILL.md +316 -0
  582. package/.versions/0.0.8/skills/guided-workspace-setup/SKILL.md +544 -0
  583. package/.versions/0.0.8/skills/guided-workspace-setup/companion-manifest.json +36 -0
  584. package/.versions/0.0.8/skills/idea-refine/SKILL.md +182 -0
  585. package/.versions/0.0.8/skills/idea-refine/examples.md +238 -0
  586. package/.versions/0.0.8/skills/idea-refine/frameworks.md +99 -0
  587. package/.versions/0.0.8/skills/idea-refine/refinement-criteria.md +113 -0
  588. package/.versions/0.0.8/skills/idea-refine/scripts/idea-refine.sh +15 -0
  589. package/.versions/0.0.8/skills/incremental-implementation/SKILL.md +287 -0
  590. package/.versions/0.0.8/skills/interview-me/SKILL.md +226 -0
  591. package/.versions/0.0.8/skills/orchestration-verification/SKILL.md +181 -0
  592. package/.versions/0.0.8/skills/peer-coms/SKILL.md +90 -0
  593. package/.versions/0.0.8/skills/performance-optimization/SKILL.md +350 -0
  594. package/.versions/0.0.8/skills/planning-and-task-breakdown/SKILL.md +236 -0
  595. package/.versions/0.0.8/skills/security-and-hardening/SKILL.md +461 -0
  596. package/.versions/0.0.8/skills/spec-driven-development/SKILL.md +245 -0
  597. package/.versions/0.0.8/skills/using-agent-skills/SKILL.md +199 -0
  598. package/.versions/0.0.8/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  599. package/.versions/0.0.8/vendor/agent-skills-upstream/LICENSE +21 -0
  600. package/.versions/0.0.8/vendor/agent-skills-upstream/README.md +11 -0
  601. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  602. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  603. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  604. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  605. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  606. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  607. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  608. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  609. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  610. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  611. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  612. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  613. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  614. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  615. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  616. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  617. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  618. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  619. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  620. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  621. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  622. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  623. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  624. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  625. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  626. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  627. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  628. package/.versions/0.0.8/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  629. package/CHANGELOG.md +140 -0
  630. package/README.md +175 -18
  631. package/agents/code-reviewer.md +2 -2
  632. package/agents/orchestrator.md +11 -0
  633. package/agents/plan-reviewer.md +1 -1
  634. package/agents/planner.md +1 -1
  635. package/agents/security-auditor.md +1 -1
  636. package/bin/cli.js +40 -1
  637. package/bin/lib/hermes-profile-artifact.js +144 -0
  638. package/bin/lib/set-hermes-watchdog.js +173 -0
  639. package/bin/set-hermes-watchdog.js +26 -0
  640. package/docs/ARCHITECTURE.md +64 -12
  641. package/docs/agent-fleet-setup.md +2 -2
  642. package/docs/claude-code-coms-bridge.md +7 -1
  643. package/docs/coms-hermes-bridge.md +10 -0
  644. package/docs/getting-started.md +48 -0
  645. package/docs/hermes-watchdog-supervisor.md +140 -0
  646. package/hermes/README.md +135 -19
  647. package/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  648. package/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  649. package/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  650. package/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  651. package/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  652. package/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  653. package/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  654. package/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  655. package/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  656. package/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  657. package/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  658. package/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  659. package/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  660. package/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  661. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  662. package/hermes/plugins/agent-fleet-monitor/dashboard/dist/index.js +10 -0
  663. package/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  664. package/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  665. package/hermes/skills/hub-watchdog/SKILL.md +76 -0
  666. package/hermes/skills/hub-watchdog/manifest.json +1 -0
  667. package/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  668. package/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  669. package/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  670. package/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  671. package/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  672. package/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  673. package/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  674. package/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  675. package/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  676. package/hooks/coms-stop-hook.mjs +12 -1
  677. package/package.json +11 -2
  678. package/scripts/coms-claude-bridge.ts +154 -39
  679. package/scripts/fleet.ts +9 -1
  680. package/scripts/hermes-watchdog-capability-probe.ts +45 -0
  681. package/scripts/lib/claude-bridge-core.ts +65 -0
  682. package/scripts/lib/coms-envelope.ts +44 -1
  683. package/scripts/lib/hermes-monitor-events.ts +1 -0
  684. package/scripts/lib/monitor-env.ts +120 -0
  685. package/scripts/team-snapshot.ts +1 -1
  686. package/scripts/team-up.ts +10 -1
  687. package/skills/guided-workspace-setup/companion-manifest.json +1 -0
  688. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +0 -15
  689. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +0 -19
  690. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +0 -13
  691. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +0 -11
  692. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +0 -9
  693. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +0 -17
  694. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +0 -34
  695. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +0 -39
  696. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +0 -12
  697. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +0 -22
  698. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +0 -15
  699. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +0 -19
  700. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +0 -13
  701. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +0 -11
  702. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +0 -9
  703. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +0 -17
  704. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +0 -34
  705. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +0 -39
  706. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +0 -12
  707. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +0 -22
  708. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +0 -15
  709. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +0 -19
  710. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +0 -13
  711. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +0 -11
  712. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +0 -9
  713. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +0 -17
  714. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +0 -34
  715. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +0 -39
  716. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +0 -12
  717. package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +0 -22
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: Inspect or safely install the fail-closed Hermes watchdog
3
+ argument-hint: "<status|install|update|uninstall> [--profile NAME] [--force] [--dry-run]"
4
+ ---
5
+
6
+ Ask for confirmation before install, update, uninstall, or force. Use only the deterministic Agent Fleet watchdog controller with the supplied separately quoted arguments. `status` is read-only; `--dry-run` writes nothing. Never start/restart a gateway or watcher, change tools, send a message, initiate a watch, or infer Gate O/origin routing. The packaged skill remains journal-only/dormant until independently reviewed live Gate O evidence exists.
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: Inspect or safely install the fail-closed Hermes watchdog
3
+ argument-hint: "<status|install|update|uninstall> [--profile NAME] [--force] [--dry-run]"
4
+ ---
5
+
6
+ Ask the user before every write or `--force`. Use the deterministic watchdog installer only; status is read-only, stopped profiles require explicit `--profile`, and the controller never changes Hermes services, starts a watcher, or changes unrelated permissions. Gate O remains unproven and fail-closed: no live origin delivery, steering, surgical, or out-of-turn chat claim.
@@ -72,7 +72,8 @@ Every borrowed idea from another harness passes one test before it lands: *does
72
72
  - **Verification Contract (assertion ledger)** — the dispatcher owns a ledger of checkable
73
73
  acceptance assertions built from the request *before* any builder runs, so a clearly stated
74
74
  requirement is never silently dropped. `set_assertions` records the numbered, tagged assertions
75
- (`test` | `runtime-ui` | `code-grep` | `manual`, one pass condition each) and rebuilds the whole
75
+ (`test` | `runtime-ui` | `code-grep` | `manual`, one pass condition each, plus a required
76
+ `source` naming where the requirement comes from) and rebuilds the whole
76
77
  ledger on a "wrong again" regression reset; `update_assertion` marks each one proven (named
77
78
  evidence required), unproven, or failed after a verification gate; `get_assertions` reads the
78
79
  full ledger (ids, tags, pass conditions, evidence) back. The hub persists the ledger to
@@ -93,10 +94,19 @@ Every borrowed idea from another harness passes one test before it lands: *does
93
94
  manual needs user/`ask_user` confirmation, and `runtime-ui` needs an existing artifact path under
94
95
  `.pi/agent-sessions/artifacts/evidence/`. **Advisory by design** (PRD open question 2): status is
95
96
  surfaced and "proven" requires named evidence, but a dispatch is never hard-refused on an unproven
96
- assertion — code-enforcement is the Checkpoint A decision.
97
+ assertion — code-enforcement is the Checkpoint A decision. Two contract rules ARE enforced at the
98
+ tool: a batch with any sourceless assertion is refused with the offending ids named (a specialist
99
+ told to prove `A9` must be able to read its origin instead of spending a dispatch and an ASK_USER
100
+ cycle asking where `A9` was defined), and a batch over **8** open assertions is accepted with a
101
+ warning suggesting the split — declare the batch the next dispatches actually prove, and
102
+ `set_assertions` the next one when it starts.
97
103
  - **Artifact bus** — session handoffs live under `.pi/agent-sessions/artifacts/` with conventional
98
- `returns/`, `plans/`, `reviews/`, `inventories/`, and `evidence/` subdirectories, all wiped and
99
- recreated at session start like `findings/`. `dispatch_agent` and `spawn_research` accept optional
104
+ `returns/`, `failures/`, `plans/`, `reviews/`, `inventories/`, and `evidence/` subdirectories, all
105
+ wiped and recreated at session start like `findings/`. `failures/` is separate on purpose: a run
106
+ that errored or timed out produced no specialist result, so its output goes there and the dispatch
107
+ result names it a **delivery failure** carrying no assertion evidence. Filing a 142-byte coms error
108
+ stub as `returns/code-reviewer-run4.md` once cost a 103-second dispatch investigating a review that
109
+ had in fact succeeded — only its reply was lost. `dispatch_agent` and `spawn_research` accept optional
100
110
  `artifacts: string[]` paths (repo-relative or session-artifact-relative); the hub validates that
101
111
  they stay inside the repo/session roots and injects only the path plus first heading/one-line
102
112
  preview, never file bodies. Document-producing specialists are instructed to write plans, reviews,
@@ -140,7 +150,17 @@ Every borrowed idea from another harness passes one test before it lands: *does
140
150
  from `.pi/agents/model-profiles.yaml` — a macro over the same declared candidates, validated at
141
151
  session start (a profile with any entry outside a persona's candidates is dropped whole, with an
142
152
  error); profiles never touch sub-role models — only `/af-agent-model` reaches those. Nothing
143
- outside the declared lists is ever selectable. Per project,
153
+ outside the declared lists is ever selectable. When an effective project or session override
154
+ fails with a model/provider error or aborted request before work begins (including local-model
155
+ memory-limit failures), the hub retries once with the model originally declared in the persona
156
+ frontmatter. For **write-capable** runs this is pre-work only: no fallback occurs after text
157
+ output, a tool call, cancellation, timeout, drift stop, or a Pi process-spawn failure, avoiding
158
+ duplicate writes. **Read-only children and research helpers** (tools limited to
159
+ `read,grep,find,ls`) also retry once when the provider fails *mid-run* — re-running a reader
160
+ repeats nothing, and those are exactly the children that exist to protect their parent's context,
161
+ so losing one to a local-endpoint OOM halfway through discards work for no safety gain. A
162
+ terminated run (watchdog, deadline, cancellation) never retries either way: that is a verdict on
163
+ the work, not a provider outage. The failed attempt is removed from the child session before retry. Per project,
144
164
  `model.<persona>:` / `models.<persona>:` keys under `## agent-hub` in
145
165
  `.ai/agent-fleet-overrides.md` replace a persona's default model / candidate list.
146
166
  Research personas (`researcher` / `deep-researcher`, `kind: research`) are switchable the same
@@ -184,8 +204,10 @@ Every borrowed idea from another harness passes one test before it lands: *does
184
204
  `/af-agents-kill` on the parent SIGTERMs its whole process group, so the delegation tree dies with
185
205
  it. `context: fork` is accepted but treated as a summary brief in v1. Per project,
186
206
  `subagents.<persona>.<role>:` and `delegate-depth.<persona>:` keys under `## agent-hub` in
187
- `.ai/agent-fleet-overrides.md` replace individual sub-roles / the depth budget. Six personas
188
- ship with declared sub-roles, on a three-tier OpenAI model ladder — `gpt-5.3-codex-spark` for
207
+ `.ai/agent-fleet-overrides.md` replace individual sub-roles / the depth budget. An overridden
208
+ role retains its frontmatter model as a one-shot fallback under the same pre-work-only safety
209
+ rule; delegate cards and results show the model that ultimately ran. Six personas ship with
210
+ declared sub-roles, on a three-tier OpenAI model ladder — `gpt-5.3-codex-spark` for
189
211
  recon/grep sweeps, `gpt-5.4` for analysis sweeps, the `gpt-5.5` (or opus) parent reserved for
190
212
  synthesis and verdicts:
191
213
  - `code-reviewer` — `preflight`+`docs` (spark), `quality`+`perf` (gpt-5.4); its first delegate
@@ -250,12 +272,12 @@ execution **tree**:
250
272
  Navigate with `↑/↓`, press `G` to jump back to the live tail, and `Q`/`Esc` to close. The log resets
251
273
  on each session start.
252
274
 
253
- Press **`Alt+A`** to toggle the agent view between the full **dashboard** (bordered card grid drawn
254
- *above* the input box) and a **compact** view that shows one line per *running* agent —
255
- `name · context% · state` — rendered *below* the input box, just above pi's status bar. Idle and
256
- done agents are hidden in compact mode, and the coms pool widget collapses too, so an idle session
257
- collapses to just the prompt and footer. The current mode and binding are shown in the footer
258
- (`Alt+A view:dashboard` / `Alt+A view:compact`).
275
+ The agent view starts in **compact** mode, showing one line per *running* agent —
276
+ `name · context% · state` — *below* the input box, just above pi's status bar. Idle and done agents
277
+ are hidden, and the coms pool widget collapses too, so an idle session collapses to just the prompt
278
+ and footer. Press **`Alt+A`** to toggle to the full **dashboard** (bordered card grid drawn *above*
279
+ the input box) and back. The current mode and binding are shown in the footer
280
+ (`Alt+A view:compact` / `Alt+A view:dashboard`).
259
281
 
260
282
  ### Version footer
261
283
 
@@ -421,6 +443,36 @@ or its measured context passes 60%. The dispatch result notes the recycle so the
421
443
  knows the specialist starts without session memory — task text and `artifacts:` paths must
422
444
  carry the state, which the deliverable-to-file protocol already ensures.
423
445
 
446
+ Context is measured against **that agent's own** model window, resolved from pi's model
447
+ registry (`ctx.modelRegistry.find`) with the source recorded on every resolution. Dividing a
448
+ 49k local model's usage by the dispatcher's window is what produced unactionable readings
449
+ like `⚠ Planner context at 315%`; a reading above 100% now emits a one-time diagnostic that
450
+ names the window and where the number came from, so a mis-resolved window is distinguishable
451
+ from a genuine overflow. Two recycle rules follow from it: a session at or past a **full**
452
+ window is recycled unconditionally (no threshold override keeps it alive), and a resumed
453
+ session whose *projected* prompt — prior tokens plus this task — would overflow is recycled
454
+ **before** the spawn instead of after the run.
455
+
456
+ #### Per-provider concurrency
457
+
458
+ A dispatch may fan out to four delegate children at once and several specialists can be
459
+ mid-run, with nothing bounding how many requests land on one provider. That is fine against
460
+ a hosted endpoint and not against a local one. Requests are capped per process — **2 in
461
+ flight for `custom/*` by default, unlimited elsewhere**:
462
+
463
+ ```bash
464
+ AGENT_HUB_PROVIDER_LIMITS="custom=4" # raise the local cap
465
+ AGENT_HUB_PROVIDER_LIMITS="custom=off" # disable it
466
+ AGENT_HUB_PROVIDER_LIMITS="custom=2,ollama=1"
467
+ ```
468
+
469
+ Queued runs still execute — they wait for a permit, and the wait is announced rather than
470
+ looking like a hang. The cap applies per **level** of the delegation tree (each pi process
471
+ runs its own semaphore over the children it spawns), and a nested spawn reuses its parent's
472
+ permit, so a child can never wait on its own ancestor. The drift judge and the return
473
+ extractor are deliberately ungated: both run while a specialist holds a permit, so queueing
474
+ them behind it would stall the watchdog meant to stop it.
475
+
424
476
  The per-run deadline lands as `turn_timeout` (exit 124) with partial output preserved, for
425
477
  dispatched specialists, research helpers, and nested delegate children alike — a hung child
426
478
  can no longer hold its parent for hours.
@@ -496,9 +548,13 @@ Inside a [herdr](https://herdr.dev) pane with a live server, the dispatcher's to
496
548
  surface additionally gets (absent otherwise, like coms):
497
549
 
498
550
  - `herdr_spawn_peer` — stand up a persona peer (joins the coms pool via `just _peer`) or a
499
- raw command pane in the current workspace
551
+ raw command pane in the current workspace. A persona peer **boots idle** and does nothing until
552
+ a `coms_send` reaches it, so the call waits (bounded, ~45s) for it to register and returns
553
+ `peer_ready` plus its coms name instead of a bare pane id. Peers spawned but never addressed are
554
+ named at turn end and in `/af-hub-report` with a close suggestion — closing stays the human's call
500
555
  - `herdr_read_pane` — bounded `pane.read` (≤200 lines), read-to-decide on workers/tools;
501
- messaging still goes through coms
556
+ messaging still goes through coms, and peer busy state comes from `coms_list`, not from
557
+ reading the screen
502
558
  - `herdr_close_pane` — kills a pane; **asks the human to confirm every call**; the
503
559
  bash-level `herdr pane close`/`workspace close`/`server stop` verbs are hard-blocked
504
560
  for spawned specialists by `.pi/damage-control-rules.yaml`
@@ -542,7 +598,10 @@ under `~/.pi/coms/projects/<project>/agents/<name>.json` and is created at runti
542
598
  confirms it with the user, then dispatches the `documenter` to land the approved lessons as
543
599
  minimal diffs on the project's `rules:`/`docs:` targets per `skills/compound-learning/SKILL.md`.
544
600
  Requires the `documenter` persona in the active team; run it before `/af-handoff` or session end.
545
- - `coms_list` — discover the peers in your pool: names, models, live context usage, purpose. Scoped
601
+ - `coms_list` — discover the peers in your pool: names, models, live context usage, purpose,
602
+ `pane_id`, and `status` (`idle` | `working` | `booting`). Check status before sending: `working`
603
+ means your send waits behind the peer's current turn, `booting` means it is not addressable yet.
604
+ This is the field whose absence drove 127 `herdr_read_pane` calls in one session. Scoped
546
605
  to your project and excluding private peers; the LLM cannot widen it (see
547
606
  [Pool scope is the reach boundary](#pool-scope-is-the-reach-boundary)).
548
607
  - `coms_send` — send a prompt to a peer **in your pool**; returns a `msg_id`
@@ -1,6 +1,11 @@
1
1
  import { isAbsolute, relative, resolve, sep } from "node:path";
2
2
 
3
- export const ARTIFACT_KINDS = ["returns", "plans", "reviews", "inventories", "evidence"];
3
+ // `failures` is deliberately its own kind, not a flavour of `returns`: a run
4
+ // that errored or timed out produced no specialist result, and storing its error
5
+ // text as a return is the most expensive artifact in the system — a 142-byte
6
+ // coms error stub written to returns/code-reviewer-run4.md cost a full dispatch
7
+ // investigating a review that had in fact succeeded, only its reply was lost.
8
+ export const ARTIFACT_KINDS = ["returns", "failures", "plans", "reviews", "inventories", "evidence"];
4
9
 
5
10
  const SESSION_RELATIVE_PREFIXES = new Set(["artifacts", "findings", "delegations"]);
6
11
  const PREVIEW_LIMIT = 180;
@@ -44,14 +49,63 @@ export function resolveArtifactPath(inputPath, options) {
44
49
  }
45
50
 
46
51
  const exists = typeof options.exists === "function" ? options.exists : () => true;
47
- const picked = valid.find((candidate) => exists(candidate.target)) || valid[0];
52
+ const found = valid.find((candidate) => exists(candidate.target));
53
+ if (found) {
54
+ return {
55
+ input: raw,
56
+ path: found.target,
57
+ displayPath: displayPath(found.target, found.displayBase, found.prefix),
58
+ resolvedFromKind: null,
59
+ };
60
+ }
61
+
62
+ // Nothing at the requested path. The hub writes EVERY auto-return under
63
+ // `returns/`, while the deliverable protocol teaches dispatchers that documents
64
+ // live in `artifacts/<kind>/` — so `reviews/code-reviewer-run1.md` is the
65
+ // natural and wrong guess for a file that is sitting in `returns/`. Look for
66
+ // the same name under the other kinds instead of reporting a missing file.
67
+ const requested = matchKindPath(normalized);
68
+ if (requested) {
69
+ const hits = ARTIFACT_KINDS
70
+ .filter((kind) => kind !== requested.kind)
71
+ .map((kind) => ({ kind, target: resolve(artifactRoot, `${kind}/${requested.rest}`) }))
72
+ .filter((candidate) => isWithin(artifactRoot, candidate.target) && exists(candidate.target));
73
+ if (hits.length === 1) {
74
+ return {
75
+ input: raw,
76
+ path: hits[0].target,
77
+ displayPath: displayPath(hits[0].target, artifactRoot, "artifacts"),
78
+ resolvedFromKind: hits[0].kind,
79
+ };
80
+ }
81
+ // Never guess between kinds: two files with the same name are two documents.
82
+ if (hits.length > 1) {
83
+ throw new Error(
84
+ `Ambiguous artifact ${raw}: "${requested.rest}" exists under ${hits.map((h) => `${h.kind}/`).join(" and ")}. ` +
85
+ "Name the kind explicitly.",
86
+ );
87
+ }
88
+ }
89
+
90
+ const picked = valid[0];
48
91
  return {
49
92
  input: raw,
50
93
  path: picked.target,
51
94
  displayPath: displayPath(picked.target, picked.displayBase, picked.prefix),
95
+ resolvedFromKind: null,
52
96
  };
53
97
  }
54
98
 
99
+ /** `reviews/x.md` / `artifacts/reviews/x.md` → `{ kind: "reviews", rest: "x.md" }`. */
100
+ function matchKindPath(normalized) {
101
+ const parts = String(normalized || "").split("/").filter(Boolean);
102
+ const offset = parts[0] === "artifacts" ? 1 : 0;
103
+ const kind = parts[offset];
104
+ if (!ARTIFACT_KINDS.includes(kind)) return null;
105
+ const rest = parts.slice(offset + 1).join("/");
106
+ return rest ? { kind, rest } : null;
107
+ }
108
+
55
109
  export function resolveArtifactPaths(paths, options) {
56
110
  return (paths || []).map((p) => resolveArtifactPath(p, options));
57
111
  }
@@ -0,0 +1,58 @@
1
+ // Assertion-ledger contract — pure validation for the `set_assertions` tool.
2
+ //
3
+ // Two rules, both drawn from the post-mortem of the hub sessions that declared
4
+ // 30 assertions (GO1–GO5, A1–A25) in one call and then spent a dispatch plus an
5
+ // ASK_USER cycle answering "where were A9–A16 defined?":
6
+ //
7
+ // 1. Every assertion names its origin, so an id can always be traced back to
8
+ // the plan/spec line it came from. Refused when missing — a sourceless id
9
+ // is exactly the failure that cost the cycle.
10
+ // 2. The open ledger is capped at MAX_OPEN_ASSERTIONS per batch. Warned, not
11
+ // refused: a large task legitimately has many assertions, they just should
12
+ // not all be open at once. Declare the rest when their batch starts.
13
+
14
+ export const MAX_OPEN_ASSERTIONS = 8;
15
+
16
+ const str = (v) => String(v ?? "").trim();
17
+
18
+ /**
19
+ * Validate + normalize one `set_assertions` batch.
20
+ * Returns { ok, refusal?, warning, assertions } — `assertions` is empty on a
21
+ * refusal so a rejected batch can never half-replace the live ledger.
22
+ */
23
+ export function validateAssertionBatch(input) {
24
+ const batch = Array.isArray(input) ? input : [];
25
+
26
+ const sourceless = batch
27
+ .map((a, i) => (str(a?.source) === "" ? str(a?.id) || `#${i + 1}` : null))
28
+ .filter((label) => label !== null);
29
+
30
+ if (sourceless.length > 0) {
31
+ return {
32
+ ok: false,
33
+ refusal:
34
+ `Ledger unchanged: ${sourceless.length} assertion(s) declare no source — ${sourceless.join(", ")}. ` +
35
+ "Every assertion must name where it comes from (e.g. source: \"PLAN-x.md:585-595\", " +
36
+ "\"user request\", \"review finding F3\") so a specialist asked to prove it can read the origin " +
37
+ "instead of asking. Re-send the batch with a source on each.",
38
+ warning: null,
39
+ assertions: [],
40
+ };
41
+ }
42
+
43
+ const assertions = batch.map((a) => ({
44
+ id: str(a?.id),
45
+ tag: str(a?.tag),
46
+ text: str(a?.text),
47
+ source: str(a?.source),
48
+ }));
49
+
50
+ const warning =
51
+ assertions.length > MAX_OPEN_ASSERTIONS
52
+ ? `⚠ ${assertions.length} assertions are open at once (soft cap ${MAX_OPEN_ASSERTIONS}). ` +
53
+ "Keep this batch to the assertions the next dispatches actually prove and defer the rest — " +
54
+ "declare them with a fresh set_assertions when their batch starts. Accepted as-is."
55
+ : null;
56
+
57
+ return { ok: true, warning, assertions };
58
+ }
@@ -0,0 +1,106 @@
1
+ // Context-window resolution and the pre-spawn overflow guard.
2
+ //
3
+ // The bug this fixes: the hub measured EVERY specialist and research helper
4
+ // against `ctx.model.contextWindow` — the DISPATCHER's window. A specialist on
5
+ // custom/Qwen3.6-35B-A3B-4bit (49152) and one on a 400k hosted model were
6
+ // divided by the same number, so `⚠ Planner context at 315%` could mean either
7
+ // "the window is wrong for that provider" or "the run really did run 3× over",
8
+ // and nothing in the output told them apart.
9
+ //
10
+ // The authoritative source is pi's own model registry (ctx.modelRegistry.find),
11
+ // which is where the dispatcher's own window came from. This module keeps the
12
+ // resolution pure by taking a `lookup(provider, modelId)` function, and records
13
+ // WHERE each window came from so a wrong number is traceable rather than
14
+ // mysterious.
15
+
16
+ /** Stop resuming a session when the projected prompt reaches this share of the window. */
17
+ export const PRESPAWN_HEADROOM = 0.9;
18
+
19
+ /**
20
+ * "openrouter/google/gemini-3-flash-preview" → provider "openrouter",
21
+ * model id "google/gemini-3-flash-preview". A spec with no slash has no
22
+ * provider and cannot be looked up.
23
+ */
24
+ export function splitModelSpec(spec) {
25
+ const s = String(spec ?? "").trim();
26
+ const slash = s.indexOf("/");
27
+ if (slash <= 0 || slash === s.length - 1) return { provider: "", modelId: s };
28
+ return { provider: s.slice(0, slash), modelId: s.slice(slash + 1) };
29
+ }
30
+
31
+ /**
32
+ * Resolve the context window for a model spec.
33
+ * `lookup(provider, modelId)` is pi's registry find (may return undefined);
34
+ * `fallbackWindow` is the dispatcher's own window, used only when the registry
35
+ * has nothing. Returns { window, source } — source names the origin so a
36
+ * suspicious percentage can be traced to the number that produced it.
37
+ */
38
+ export function resolveContextWindow(spec, { lookup, fallbackWindow = 0 } = {}) {
39
+ const { provider, modelId } = splitModelSpec(spec);
40
+ if (provider && typeof lookup === "function") {
41
+ let model;
42
+ try { model = lookup(provider, modelId); } catch { model = undefined; }
43
+ const win = Number(model?.contextWindow);
44
+ if (Number.isFinite(win) && win > 0) {
45
+ return { window: win, source: `pi model registry (${provider}/${modelId})` };
46
+ }
47
+ }
48
+ const fallback = Number(fallbackWindow);
49
+ if (Number.isFinite(fallback) && fallback > 0) {
50
+ return {
51
+ window: fallback,
52
+ // Named explicitly: this is the number that made 315% ambiguous.
53
+ source: `dispatcher's own model — not ${spec || "this model"}'s window`,
54
+ };
55
+ }
56
+ return { window: 0, source: "unknown" };
57
+ }
58
+
59
+ /** Percent of the window consumed. 0 when the window is unknown. */
60
+ export function contextPct({ input = 0, cacheRead = 0, cacheWrite = 0 } = {}, window) {
61
+ const win = Number(window);
62
+ if (!Number.isFinite(win) || win <= 0) return 0;
63
+ return (((input || 0) + (cacheRead || 0) + (cacheWrite || 0)) / win) * 100;
64
+ }
65
+
66
+ /**
67
+ * Rough prompt size in tokens. Deliberately crude (~4 chars/token) — it decides
68
+ * whether to start a session fresh, and being approximately right before the
69
+ * run beats being exactly right after it.
70
+ */
71
+ export function estimatePromptTokens(text) {
72
+ return Math.ceil(String(text ?? "").length / 4);
73
+ }
74
+
75
+ /**
76
+ * Pre-spawn guard: would resuming this session overflow the window? Recycling
77
+ * AFTER the run is what made the post-mortem's warnings arrive 985s too late.
78
+ * `priorTokens` is the resumed session's last measured total.
79
+ */
80
+ export function shouldRecycleBeforeSpawn({ priorTokens = 0, promptTokens = 0, window, headroom = PRESPAWN_HEADROOM }) {
81
+ const win = Number(window);
82
+ if (!Number.isFinite(win) || win <= 0) return null;
83
+ if (priorTokens <= 0) return null; // nothing accumulated — nothing to drop
84
+ const projected = priorTokens + promptTokens;
85
+ const limit = win * headroom;
86
+ if (projected < limit) return null;
87
+ return {
88
+ projected,
89
+ window: win,
90
+ message:
91
+ `projected prompt ~${Math.round(projected / 1000)}k tokens against a ${Math.round(win / 1000)}k window ` +
92
+ `(${Math.round((projected / win) * 100)}%)`,
93
+ };
94
+ }
95
+
96
+ /**
97
+ * The one-time diagnostic for a reading over 100%: name the window and where it
98
+ * came from, so "wrong window" and "genuine overflow" stop looking identical.
99
+ */
100
+ export function overWindowDiagnostic({ agent, model, pct, window, source }) {
101
+ return (
102
+ `⚠ ${agent} measured ${Math.round(pct)}% of its context window (${Math.round(window / 1000)}k tokens, ` +
103
+ `source: ${source}) on ${model}. Over 100% means either that window is wrong for this provider or the ` +
104
+ "run genuinely exceeded it — compare the model's declared window before treating the number as real."
105
+ );
106
+ }
@@ -35,10 +35,12 @@ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
35
35
  import { Type } from "@sinclair/typebox";
36
36
  import { appendFileSync, mkdirSync, writeFileSync } from "fs";
37
37
  import type { ChildProcess } from "child_process";
38
- import { spawnPiAgent, killPiTree } from "./spawn.ts";
38
+ import { spawnPiAgentWithModelFallback, killPiTree } from "./spawn.ts";
39
+ import { DEFAULT_PROVIDER_LIMITS, createProviderSemaphore, parseProviderLimits } from "./provider-semaphore.js";
39
40
  import {
40
41
  delegateBudgetRefusal,
41
42
  DELEGATE_TREE_SPAWN_BUDGET,
43
+ isReadOnlyToolList,
42
44
  normalizeDelegateRuntimeBudgets,
43
45
  planDelegateSpawn,
44
46
  resolveDelegateTools,
@@ -59,7 +61,7 @@ const TIMELINE_FLUSH_MS = 700;
59
61
  export interface DelegateConfig {
60
62
  persona: string;
61
63
  tag: string;
62
- roles: Record<string, { model: string; tools?: string }>;
64
+ roles: Record<string, { model: string; tools?: string; fallbackModel?: string }>;
63
65
  depth: number;
64
66
  callBudget: number;
65
67
  remainingSpawns?: number;
@@ -139,6 +141,15 @@ export default function (pi: ExtensionAPI) {
139
141
  let liveCount = 0;
140
142
  const liveChildren = new Set<ChildProcess>();
141
143
 
144
+ // Per-provider concurrency. Four read-only children fanning out at once is a
145
+ // feature against a hosted provider and a mid-run OOM against the local one,
146
+ // so `custom/*` queues past 2 in flight. Queued children still run — they
147
+ // just wait for a permit instead of racing for the same GPU.
148
+ const providerSemaphore = createProviderSemaphore({
149
+ ...DEFAULT_PROVIDER_LIMITS,
150
+ ...parseProviderLimits(process.env.AGENT_HUB_PROVIDER_LIMITS),
151
+ });
152
+
142
153
  // Fallback cascade: the primary kill path is the process group (the hub
143
154
  // signals the specialist's negative PID), but if only this process is
144
155
  // terminated, forward the signal to any live children.
@@ -285,6 +296,10 @@ export default function (pi: ExtensionAPI) {
285
296
  const flushTimer = setInterval(flushTimeline, TIMELINE_FLUSH_MS);
286
297
 
287
298
  const startTime = Date.now();
299
+ // Time spent waiting for a provider permit, reported alongside `elapsed`
300
+ // so a queued child is never mistaken for a slow one (the run deadline is
301
+ // measured from the spawn, not from here).
302
+ let queuedMs = 0;
288
303
  let childProc: ChildProcess | null = null;
289
304
  const mode = context?.trim().toLowerCase();
290
305
  const brief = context && mode !== "summary" && mode !== "fork" ? context : undefined;
@@ -295,7 +310,18 @@ export default function (pi: ExtensionAPI) {
295
310
  let res;
296
311
  liveCount++;
297
312
  try {
298
- res = await spawnPiAgent({
313
+ const providerCap = providerSemaphore.limitFor(roleDef.model);
314
+ if (providerCap != null && providerSemaphore.inFlight(roleDef.model) >= providerCap) {
315
+ const ahead = providerSemaphore.queued(roleDef.model) + 1;
316
+ emit({ t: "queued", id: childId, model: roleDef.model, ahead, ts: Date.now() });
317
+ onUpdate?.({
318
+ content: [{ type: "text", text: `${roleKey} queued — ${providerCap} requests already in flight on this provider (${ahead} waiting)...` }],
319
+ details: { id: childId, role: roleKey, model: roleDef.model, status: "queued" },
320
+ });
321
+ }
322
+ res = await providerSemaphore.run(roleDef.model, () => {
323
+ queuedMs = Date.now() - startTime;
324
+ return spawnPiAgentWithModelFallback({
299
325
  model: roleDef.model,
300
326
  tools: childTools,
301
327
  thinking: "off",
@@ -315,8 +341,19 @@ export default function (pi: ExtensionAPI) {
315
341
  // Whole-run bound from the hub's mode budget: a hung delegate (the
316
342
  // 92-minute conventions scout) must not hold its parent hostage.
317
343
  turnDeadlineMs: config.turnDeadlineMs === undefined ? null : config.turnDeadlineMs,
318
- }, {
319
- onProcess: (p) => { childProc = p; liveChildren.add(p); },
344
+ }, roleDef.fallbackModel, {
345
+ onProcess: (p) => {
346
+ if (childProc) liveChildren.delete(childProc);
347
+ childProc = p;
348
+ liveChildren.add(p);
349
+ },
350
+ onModelFallback: (notice) => {
351
+ emit({ t: "model_fallback", id: childId, ...notice, ts: Date.now() });
352
+ onUpdate?.({
353
+ content: [{ type: "text", text: `Override ${notice.from} failed before work began; retrying ${roleKey} with ${notice.to}...` }],
354
+ details: { id: childId, role: roleKey, model: notice.to, fallback: notice, status: "running" },
355
+ });
356
+ },
320
357
  onTextDelta: (delta) => queueDelta("text", delta),
321
358
  onThinkingDelta: (delta) => queueDelta("thinking", delta),
322
359
  onToolStart: (toolName, argStr) => {
@@ -328,6 +365,15 @@ export default function (pi: ExtensionAPI) {
328
365
  emit({ t: "usage", id: childId, input: usage.input || 0, output: usage.output || 0 });
329
366
  }
330
367
  },
368
+ }, {
369
+ // A child holding only read tools can be re-run safely, so a
370
+ // provider dying halfway through is recoverable rather than a
371
+ // discarded run. A write-capable child keeps the strict rule:
372
+ // a retry there could duplicate edits. A child that can delegate
373
+ // carries `delegate` in its tool list and so reads as non-read-only
374
+ // here — deliberately: retrying it would re-spawn its grandchildren.
375
+ midRun: isReadOnlyToolList(childTools),
376
+ });
331
377
  });
332
378
  } finally {
333
379
  liveCount--;
@@ -338,7 +384,7 @@ export default function (pi: ExtensionAPI) {
338
384
  flushTimeline();
339
385
  const elapsed = Date.now() - startTime;
340
386
  const code = res.spawnError ? 1 : (res.termination ? (res.termination.reason === "cancelled" ? 130 : res.termination.reason === "drift_stop" ? 125 : 124) : (res.exitCode ?? 1));
341
- emit({ t: "exit", id: childId, code, elapsed, termination: res.termination, ts: Date.now() });
387
+ emit({ t: "exit", id: childId, code, elapsed, ...(queuedMs > 0 ? { queuedMs } : {}), termination: res.termination, ts: Date.now() });
342
388
 
343
389
  if (res.spawnError) {
344
390
  const spawnFailure = `Delegate ${childId} failed to spawn: ${res.spawnError}`;
@@ -375,11 +421,14 @@ export default function (pi: ExtensionAPI) {
375
421
  if (mode === "fork") notes.push("context: fork is not supported in v1 — the child started fresh from your instruction");
376
422
  const noteBlock = notes.length > 0 ? `\n[note: ${notes.join("; ")}]` : "";
377
423
 
424
+ const fallbackNote = res.modelFallback
425
+ ? `\n[note: overridden model ${res.modelFallback.from} failed before work; retried once with original ${res.modelFallback.to}]`
426
+ : "";
378
427
  return {
379
428
  content: [{ type: "text" as const, text:
380
- `[delegate ${childId} · ${roleDef.model} · ${effectiveTools}] ${res.termination ? res.termination.reason : code === 0 ? "done" : "error"} ` +
381
- `in ${Math.round(elapsed / 1000)}s${noteBlock}\n\n${digest.text}` }],
382
- details: { id: childId, role: roleKey, model: roleDef.model, status: res.termination ? res.termination.reason : code === 0 ? "done" : "error", elapsed, resultPath: childResultFile, digestFound: digest.hasDigest, termination: res.termination },
429
+ `[delegate ${childId} · ${res.modelUsed} · ${effectiveTools}] ${res.termination ? res.termination.reason : code === 0 ? "done" : "error"} ` +
430
+ `in ${Math.round(elapsed / 1000)}s${noteBlock}${fallbackNote}\n\n${digest.text}` }],
431
+ details: { id: childId, role: roleKey, model: res.modelUsed, fallback: res.modelFallback, status: res.termination ? res.termination.reason : code === 0 ? "done" : "error", elapsed, resultPath: childResultFile, digestFound: digest.hasDigest, termination: res.termination },
383
432
  };
384
433
  },
385
434
  });