@chankov/agent-fleet 0.0.2 → 0.0.4

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 (362) hide show
  1. package/.claude/commands/doctor-agent-fleet.md +1 -1
  2. package/.claude/commands/setup-agent-fleet.md +5 -5
  3. package/.opencode/commands/af-doctor-agent-fleet.md +2 -0
  4. package/.opencode/commands/af-setup-agent-fleet.md +1 -1
  5. package/.pi/agents/peers.yaml +4 -0
  6. package/.pi/agents/teams.yaml +2 -2
  7. package/.pi/harnesses/agent-hub/README.md +254 -18
  8. package/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  9. package/.pi/harnesses/agent-hub/delegate.ts +32 -9
  10. package/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  11. package/.pi/harnesses/agent-hub/footer.ts +29 -0
  12. package/.pi/harnesses/agent-hub/helpers.ts +49 -0
  13. package/.pi/harnesses/agent-hub/index.ts +1269 -322
  14. package/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  15. package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  16. package/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  17. package/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  18. package/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  19. package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  20. package/.pi/harnesses/agent-hub/package.json +5 -4
  21. package/.pi/harnesses/agent-hub/research-retention.js +34 -0
  22. package/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  23. package/.pi/harnesses/agent-hub/run-budget.js +155 -0
  24. package/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  25. package/.pi/harnesses/agent-hub/spawn.ts +161 -94
  26. package/.pi/harnesses/agent-hub/version.ts +18 -0
  27. package/.pi/harnesses/ask-user-remote/README.md +2 -0
  28. package/.pi/harnesses/coms/README.md +21 -0
  29. package/.pi/harnesses/coms/index.ts +2 -0
  30. package/.pi/harnesses/coms/package.json +5 -4
  31. package/.pi/harnesses/coms/version.ts +18 -0
  32. package/.pi/harnesses/damage-control-continue/README.md +32 -31
  33. package/.pi/harnesses/damage-control-continue/index.ts +23 -9
  34. package/.pi/harnesses/damage-control-continue/package.json +5 -4
  35. package/.pi/harnesses/damage-control-continue/version.ts +18 -0
  36. package/.pi/harnesses/{damage-control/shared.ts → lib/damage-control-shared.ts} +20 -6
  37. package/.pi/prompts/doctor-agent-fleet.md +1 -1
  38. package/.pi/prompts/setup-agent-fleet.md +5 -5
  39. package/.versions/0.0.4/.claude/commands/build.md +44 -0
  40. package/.versions/0.0.4/.claude/commands/code-simplify.md +22 -0
  41. package/.versions/0.0.4/.claude/commands/design-agent.md +14 -0
  42. package/.versions/0.0.4/.claude/commands/doctor-agent-fleet.md +17 -0
  43. package/.versions/0.0.4/.claude/commands/orchestrate.md +112 -0
  44. package/.versions/0.0.4/.claude/commands/plan.md +16 -0
  45. package/.versions/0.0.4/.claude/commands/prime.md +22 -0
  46. package/.versions/0.0.4/.claude/commands/review.md +16 -0
  47. package/.versions/0.0.4/.claude/commands/setup-agent-fleet.md +25 -0
  48. package/.versions/0.0.4/.claude/commands/ship.md +72 -0
  49. package/.versions/0.0.4/.claude/commands/spec.md +15 -0
  50. package/.versions/0.0.4/.claude/commands/test.md +19 -0
  51. package/.versions/0.0.4/.claude/commands/webperf.md +32 -0
  52. package/.versions/0.0.4/.claude/orchestrate-teams.yaml +24 -0
  53. package/.versions/0.0.4/.opencode/commands/af-build.md +17 -0
  54. package/.versions/0.0.4/.opencode/commands/af-code-simplify.md +16 -0
  55. package/.versions/0.0.4/.opencode/commands/af-compound.md +16 -0
  56. package/.versions/0.0.4/.opencode/commands/af-design-agent.md +15 -0
  57. package/.versions/0.0.4/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  58. package/.versions/0.0.4/.opencode/commands/af-orchestrate.md +112 -0
  59. package/.versions/0.0.4/.opencode/commands/af-plan.md +16 -0
  60. package/.versions/0.0.4/.opencode/commands/af-prime.md +22 -0
  61. package/.versions/0.0.4/.opencode/commands/af-review.md +15 -0
  62. package/.versions/0.0.4/.opencode/commands/af-setup-agent-fleet.md +15 -0
  63. package/.versions/0.0.4/.opencode/commands/af-ship.md +16 -0
  64. package/.versions/0.0.4/.opencode/commands/af-spec.md +16 -0
  65. package/.versions/0.0.4/.opencode/commands/af-test.md +21 -0
  66. package/.versions/0.0.4/.opencode/commands/af-webperf.md +32 -0
  67. package/.versions/0.0.4/.opencode/orchestrate-teams.yaml +24 -0
  68. package/.versions/0.0.4/.pi/agents/dispatch-policy.yaml +32 -0
  69. package/.versions/0.0.4/.pi/agents/model-profiles.yaml +20 -0
  70. package/.versions/0.0.4/.pi/agents/peers.yaml +146 -0
  71. package/.versions/0.0.4/.pi/agents/teams.yaml +39 -0
  72. package/.versions/0.0.4/.pi/damage-control-rules.yaml +297 -0
  73. package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  74. package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  75. package/{.pi/harnesses/damage-control → .versions/0.0.4/.pi/extensions/agent-fleet-update-check}/package.json +1 -1
  76. package/.versions/0.0.4/.pi/extensions/btw/README.md +118 -0
  77. package/.versions/0.0.4/.pi/extensions/btw/index.ts +917 -0
  78. package/.versions/0.0.4/.pi/extensions/btw/package.json +6 -0
  79. package/.versions/0.0.4/.pi/extensions/btw/state.js +179 -0
  80. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  81. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
  82. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  83. package/.versions/0.0.4/.pi/extensions/compact-and-continue/README.md +42 -0
  84. package/.versions/0.0.4/.pi/extensions/compact-and-continue/index.ts +120 -0
  85. package/.versions/0.0.4/.pi/extensions/compact-and-continue/package.json +6 -0
  86. package/.versions/0.0.4/.pi/extensions/mcp-bridge/README.md +46 -0
  87. package/.versions/0.0.4/.pi/extensions/mcp-bridge/index.ts +206 -0
  88. package/.versions/0.0.4/.pi/extensions/mcp-bridge/package.json +6 -0
  89. package/.versions/0.0.4/.pi/extensions/package-lock.json +1143 -0
  90. package/.versions/0.0.4/.pi/extensions/package.json +9 -0
  91. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/README.md +201 -0
  92. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/config.ts +198 -0
  93. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  94. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/index.ts +248 -0
  95. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/package.json +6 -0
  96. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  97. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  98. package/.versions/0.0.4/.pi/harnesses/agent-hub/README.md +798 -0
  99. package/.versions/0.0.4/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  100. package/.versions/0.0.4/.pi/harnesses/agent-hub/artifacts.js +92 -0
  101. package/.versions/0.0.4/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  102. package/.versions/0.0.4/.pi/harnesses/agent-hub/delegate.ts +386 -0
  103. package/.versions/0.0.4/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  104. package/.versions/0.0.4/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  105. package/.versions/0.0.4/.pi/harnesses/agent-hub/footer.ts +29 -0
  106. package/.versions/0.0.4/.pi/harnesses/agent-hub/helpers.ts +214 -0
  107. package/.versions/0.0.4/.pi/harnesses/agent-hub/index.ts +8045 -0
  108. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  109. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  110. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  111. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  112. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  113. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  114. package/.versions/0.0.4/.pi/harnesses/agent-hub/package.json +7 -0
  115. package/.versions/0.0.4/.pi/harnesses/agent-hub/research-retention.js +34 -0
  116. package/.versions/0.0.4/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  117. package/.versions/0.0.4/.pi/harnesses/agent-hub/return-contract.js +215 -0
  118. package/.versions/0.0.4/.pi/harnesses/agent-hub/run-budget.js +155 -0
  119. package/.versions/0.0.4/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  120. package/.versions/0.0.4/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  121. package/.versions/0.0.4/.pi/harnesses/agent-hub/spawn.ts +246 -0
  122. package/.versions/0.0.4/.pi/harnesses/agent-hub/version.ts +18 -0
  123. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/README.md +18 -0
  124. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/index.ts +293 -0
  125. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  126. package/.versions/0.0.4/.pi/harnesses/coms/README.md +92 -0
  127. package/.versions/0.0.4/.pi/harnesses/coms/index.ts +1745 -0
  128. package/.versions/0.0.4/.pi/harnesses/coms/package.json +7 -0
  129. package/.versions/0.0.4/.pi/harnesses/coms/version.ts +18 -0
  130. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/README.md +117 -0
  131. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/index.ts +536 -0
  132. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/package.json +7 -0
  133. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/version.ts +18 -0
  134. package/.versions/0.0.4/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  135. package/.versions/0.0.4/.pi/harnesses/lib/herdr-client.ts +458 -0
  136. package/.versions/0.0.4/.pi/harnesses/lib/herdr-presence.ts +288 -0
  137. package/.versions/0.0.4/.pi/harnesses/package-lock.json +35 -0
  138. package/.versions/0.0.4/.pi/harnesses/package.json +9 -0
  139. package/.versions/0.0.4/.pi/prompts/build.md +24 -0
  140. package/.versions/0.0.4/.pi/prompts/code-simplify.md +22 -0
  141. package/.versions/0.0.4/.pi/prompts/doctor-agent-fleet.md +15 -0
  142. package/.versions/0.0.4/.pi/prompts/plan.md +16 -0
  143. package/.versions/0.0.4/.pi/prompts/review.md +16 -0
  144. package/.versions/0.0.4/.pi/prompts/setup-agent-fleet.md +27 -0
  145. package/.versions/0.0.4/.pi/prompts/ship.md +17 -0
  146. package/.versions/0.0.4/.pi/prompts/spec.md +15 -0
  147. package/.versions/0.0.4/.pi/prompts/test.md +19 -0
  148. package/.versions/0.0.4/.pi/skills/bowser/SKILL.md +145 -0
  149. package/.versions/0.0.4/.version +1 -0
  150. package/.versions/0.0.4/agents/architect.md +23 -0
  151. package/.versions/0.0.4/agents/bowser.md +26 -0
  152. package/.versions/0.0.4/agents/builder.md +53 -0
  153. package/.versions/0.0.4/agents/code-reviewer.md +205 -0
  154. package/.versions/0.0.4/agents/deep-researcher.md +31 -0
  155. package/.versions/0.0.4/agents/documenter.md +18 -0
  156. package/.versions/0.0.4/agents/orchestrator.md +54 -0
  157. package/.versions/0.0.4/agents/plan-reviewer.md +60 -0
  158. package/.versions/0.0.4/agents/planner.md +69 -0
  159. package/.versions/0.0.4/agents/releaser.md +24 -0
  160. package/.versions/0.0.4/agents/researcher.md +28 -0
  161. package/.versions/0.0.4/agents/security-auditor.md +166 -0
  162. package/.versions/0.0.4/agents/test-engineer.md +151 -0
  163. package/.versions/0.0.4/agents/web-debugger.md +42 -0
  164. package/.versions/0.0.4/agents/web-performance-auditor.md +192 -0
  165. package/.versions/0.0.4/codex/CONDUCTOR.md +148 -0
  166. package/.versions/0.0.4/docs/ARCHITECTURE.md +210 -0
  167. package/.versions/0.0.4/docs/agent-fleet-setup.md +366 -0
  168. package/.versions/0.0.4/docs/claude-code-coms-bridge.md +103 -0
  169. package/.versions/0.0.4/docs/codex-remote-conductor.md +170 -0
  170. package/.versions/0.0.4/docs/coms-hermes-bridge.md +121 -0
  171. package/.versions/0.0.4/docs/getting-started.md +183 -0
  172. package/.versions/0.0.4/docs/npm-install.md +337 -0
  173. package/.versions/0.0.4/docs/opencode-setup.md +248 -0
  174. package/.versions/0.0.4/docs/pi-extensions.md +288 -0
  175. package/.versions/0.0.4/docs/pi-setup.md +463 -0
  176. package/.versions/0.0.4/docs/skill-anatomy.md +150 -0
  177. package/.versions/0.0.4/hermes/README.md +228 -0
  178. package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  179. package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  180. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
  181. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
  182. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
  183. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
  184. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
  185. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
  186. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
  187. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
  188. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
  189. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  190. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
  191. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  192. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
  193. package/.versions/0.0.4/hermes/skills/hub-conductor/SKILL.md +84 -0
  194. package/.versions/0.0.4/hermes/skills/hub-liaison/SKILL.md +84 -0
  195. package/.versions/0.0.4/hooks/SIMPLIFY-IGNORE.md +90 -0
  196. package/.versions/0.0.4/hooks/coms-stop-hook.mjs +73 -0
  197. package/.versions/0.0.4/hooks/hooks.json +14 -0
  198. package/.versions/0.0.4/hooks/session-start.sh +74 -0
  199. package/.versions/0.0.4/hooks/simplify-ignore.sh +302 -0
  200. package/.versions/0.0.4/justfile +256 -0
  201. package/.versions/0.0.4/references/accessibility-checklist.md +160 -0
  202. package/.versions/0.0.4/references/definition-of-done.md +67 -0
  203. package/.versions/0.0.4/references/fleet-coordination-patterns.md +151 -0
  204. package/.versions/0.0.4/references/observability-checklist.md +91 -0
  205. package/.versions/0.0.4/references/orchestration-patterns.md +370 -0
  206. package/.versions/0.0.4/references/performance-checklist.md +153 -0
  207. package/.versions/0.0.4/references/prompting-patterns.md +380 -0
  208. package/.versions/0.0.4/references/security-checklist.md +179 -0
  209. package/.versions/0.0.4/references/testing-patterns.md +236 -0
  210. package/.versions/0.0.4/scripts/codex-conductor.ts +41 -0
  211. package/.versions/0.0.4/scripts/codex-remote-control.ts +167 -0
  212. package/.versions/0.0.4/scripts/coms-claude-bridge.ts +286 -0
  213. package/.versions/0.0.4/scripts/coms-cli.ts +484 -0
  214. package/.versions/0.0.4/scripts/coms-hermes-bridge.ts +403 -0
  215. package/.versions/0.0.4/scripts/hermes-monitor-capability-runner.ts +25 -0
  216. package/.versions/0.0.4/scripts/hermes-monitor-scenario.ts +7 -0
  217. package/.versions/0.0.4/scripts/lib/claude-bridge-core.ts +100 -0
  218. package/.versions/0.0.4/scripts/lib/codex-conductor.ts +88 -0
  219. package/.versions/0.0.4/scripts/lib/codex-remote-control.ts +480 -0
  220. package/.versions/0.0.4/scripts/lib/coms-envelope.ts +539 -0
  221. package/.versions/0.0.4/scripts/lib/fake-herdr-server.ts +88 -0
  222. package/.versions/0.0.4/scripts/lib/herdr-layout.ts +263 -0
  223. package/.versions/0.0.4/scripts/lib/hermes-bridge-core.ts +238 -0
  224. package/.versions/0.0.4/scripts/lib/hermes-monitor-herdr.ts +28 -0
  225. package/.versions/0.0.4/scripts/lib/hermes-monitor-model.ts +9 -0
  226. package/.versions/0.0.4/scripts/lib/hermes-monitor-registry.ts +6 -0
  227. package/.versions/0.0.4/scripts/lib/hermes-monitor-socket.ts +118 -0
  228. package/.versions/0.0.4/scripts/lib/hermes-monitor-store.ts +31 -0
  229. package/.versions/0.0.4/scripts/lib/persona-banner.ts +62 -0
  230. package/.versions/0.0.4/scripts/lib/spawn-stagger.ts +101 -0
  231. package/.versions/0.0.4/scripts/lib/team-project.ts +184 -0
  232. package/.versions/0.0.4/scripts/lib/team-snapshot.ts +147 -0
  233. package/.versions/0.0.4/scripts/peer-banner.ts +40 -0
  234. package/.versions/0.0.4/scripts/team-snapshot.ts +238 -0
  235. package/.versions/0.0.4/scripts/team-up.ts +333 -0
  236. package/.versions/0.0.4/skills/_internal/grilling.md +11 -0
  237. package/.versions/0.0.4/skills/browser-testing-with-devtools/SKILL.md +352 -0
  238. package/.versions/0.0.4/skills/code-review-and-quality/SKILL.md +381 -0
  239. package/.versions/0.0.4/skills/compound-learning/SKILL.md +137 -0
  240. package/.versions/0.0.4/skills/context-engineering/SKILL.md +291 -0
  241. package/.versions/0.0.4/skills/deprecation-and-migration/SKILL.md +206 -0
  242. package/.versions/0.0.4/skills/designing-agents/SKILL.md +394 -0
  243. package/.versions/0.0.4/skills/designing-agents/pi-harness-authoring.md +222 -0
  244. package/.versions/0.0.4/skills/frontend-ui-engineering/SKILL.md +328 -0
  245. package/.versions/0.0.4/skills/git-workflow-and-versioning/SKILL.md +316 -0
  246. package/.versions/0.0.4/skills/guided-workspace-setup/SKILL.md +535 -0
  247. package/.versions/0.0.4/skills/guided-workspace-setup/companion-manifest.json +33 -0
  248. package/.versions/0.0.4/skills/idea-refine/SKILL.md +182 -0
  249. package/.versions/0.0.4/skills/idea-refine/examples.md +238 -0
  250. package/.versions/0.0.4/skills/idea-refine/frameworks.md +99 -0
  251. package/.versions/0.0.4/skills/idea-refine/refinement-criteria.md +113 -0
  252. package/.versions/0.0.4/skills/idea-refine/scripts/idea-refine.sh +15 -0
  253. package/.versions/0.0.4/skills/incremental-implementation/SKILL.md +287 -0
  254. package/.versions/0.0.4/skills/interview-me/SKILL.md +226 -0
  255. package/.versions/0.0.4/skills/orchestration-verification/SKILL.md +181 -0
  256. package/.versions/0.0.4/skills/peer-coms/SKILL.md +90 -0
  257. package/.versions/0.0.4/skills/performance-optimization/SKILL.md +350 -0
  258. package/.versions/0.0.4/skills/planning-and-task-breakdown/SKILL.md +236 -0
  259. package/.versions/0.0.4/skills/security-and-hardening/SKILL.md +461 -0
  260. package/.versions/0.0.4/skills/spec-driven-development/SKILL.md +245 -0
  261. package/.versions/0.0.4/skills/using-agent-skills/SKILL.md +199 -0
  262. package/.versions/0.0.4/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  263. package/.versions/0.0.4/vendor/agent-skills-upstream/LICENSE +21 -0
  264. package/.versions/0.0.4/vendor/agent-skills-upstream/README.md +11 -0
  265. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  266. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  267. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  268. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  269. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  270. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  271. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  272. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  273. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  274. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  275. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  276. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  277. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  278. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  279. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  280. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  281. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  282. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  283. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  284. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  285. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  286. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  287. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  288. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  289. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  290. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  291. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  292. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  293. package/CHANGELOG.md +53 -0
  294. package/README.md +103 -541
  295. package/agents/architect.md +1 -1
  296. package/agents/builder.md +1 -1
  297. package/agents/code-reviewer.md +1 -1
  298. package/agents/deep-researcher.md +3 -3
  299. package/agents/orchestrator.md +20 -11
  300. package/agents/plan-reviewer.md +3 -3
  301. package/agents/planner.md +1 -1
  302. package/agents/security-auditor.md +1 -1
  303. package/agents/test-engineer.md +11 -4
  304. package/bin/lib/validate-overrides.js +19 -0
  305. package/bin/snapshot-version.js +17 -1
  306. package/bin/sync-harness-versions.js +94 -0
  307. package/codex/CONDUCTOR.md +148 -0
  308. package/docs/ARCHITECTURE.md +210 -0
  309. package/docs/agent-fleet-setup.md +11 -0
  310. package/docs/claude-code-coms-bridge.md +10 -0
  311. package/docs/codex-remote-conductor.md +170 -0
  312. package/docs/coms-hermes-bridge.md +121 -0
  313. package/docs/getting-started.md +14 -0
  314. package/docs/npm-install.md +2 -0
  315. package/docs/pi-extensions.md +49 -14
  316. package/docs/pi-setup.md +12 -4
  317. package/hermes/README.md +228 -0
  318. package/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  319. package/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  320. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
  321. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
  322. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
  323. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
  324. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
  325. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
  326. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
  327. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
  328. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
  329. package/hermes/plugins/agent-fleet-monitor/dashboard/dist/index.js +10 -0
  330. package/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  331. package/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
  332. package/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  333. package/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
  334. package/hermes/skills/hub-conductor/SKILL.md +84 -0
  335. package/hermes/skills/hub-liaison/SKILL.md +84 -0
  336. package/justfile +106 -23
  337. package/package.json +17 -5
  338. package/scripts/codex-conductor.ts +41 -0
  339. package/scripts/codex-remote-control.ts +167 -0
  340. package/scripts/coms-cli.ts +311 -199
  341. package/scripts/coms-hermes-bridge.ts +2 -2
  342. package/scripts/lib/codex-conductor.ts +88 -0
  343. package/scripts/lib/codex-remote-control.ts +480 -0
  344. package/scripts/lib/coms-envelope.ts +51 -6
  345. package/scripts/lib/fake-herdr-server.ts +88 -0
  346. package/scripts/lib/herdr-layout.ts +18 -3
  347. package/scripts/lib/hermes-bridge-core.ts +4 -4
  348. package/scripts/lib/hermes-monitor-herdr.ts +28 -0
  349. package/scripts/lib/hermes-monitor-model.ts +9 -0
  350. package/scripts/lib/hermes-monitor-registry.ts +6 -0
  351. package/scripts/lib/hermes-monitor-socket.ts +118 -0
  352. package/scripts/lib/hermes-monitor-store.ts +31 -0
  353. package/scripts/lib/team-project.ts +85 -1
  354. package/scripts/team-up.ts +77 -18
  355. package/skills/designing-agents/SKILL.md +2 -2
  356. package/skills/designing-agents/pi-harness-authoring.md +26 -13
  357. package/skills/guided-workspace-setup/SKILL.md +131 -102
  358. package/skills/guided-workspace-setup/companion-manifest.json +33 -0
  359. package/skills/peer-coms/SKILL.md +9 -0
  360. package/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  361. package/.pi/harnesses/damage-control/README.md +0 -65
  362. package/.pi/harnesses/damage-control/index.ts +0 -250
@@ -12,6 +12,6 @@ Also flag malformed peer entries in `.pi/agents/peers.yaml`: field lines (`perso
12
12
 
13
13
  Also validate `.ai/agent-fleet-overrides.md` when it exists, against the schema in `docs/agent-fleet-setup.md`: unknown sections, unknown keys in known sections, invalid values for the mechanically parsed `agent-hub` keys, missing `rules:` folders and `docs:` entry points, and `## env` `required:` names that are neither set nor declared in the root `.env`. These findings are advisory only — report them with fix "edit by hand", never edit the overrides file.
14
14
 
15
- Present findings as a `# | Path | Issue | Suggested fix` table and ask the user to pick which fixes to apply.
15
+ Present the findings per the skill's Step 1 interaction contract: print a short text summary (counts per kind, advisory findings as report-only text), then ask one `AskUserQuestion` multi-select — *"Which fixes should I apply now?"* — each option titled `<path> — <issue>` with the proposed fix as its description, chunked at ≤ 4 options per question; an empty selection applies nothing.
16
16
 
17
17
  Never overwrite a regular file — only act on symlinks whose target is missing. Report `repaired`, `deleted`, and `skipped` counts, and append a `## doctor-runs` line to `.ai/agent-fleet-setup.md` with the date, agent, phase (`standalone`), and counts.
@@ -10,16 +10,16 @@ Analyse the workspace. If prior install state is found (`.ai/agent-fleet-setup.m
10
10
 
11
11
  The Skills group draws from **two roots**: fleet-native `skills/` and the vendored upstream import `vendor/agent-skills-upstream/skills/` (see `docs/UPSTREAM-SKILLS.md`). On a name collision the native copy wins — never offer the vendored duplicate as a separate row.
12
12
 
13
- Then present the install menu as **one multi-select per group** — **7 groups** (4 shared: Skills, Agent personas, Commands/prompts, References & Hooks; 3 pi-only: pi extensions & runtime skills, pi harnesses, External pi packages — so a claude-code workspace sees just the 4 shared groups) with `★` marking recommendations. Multi-type groups carry a leading `Group` column labelling the sub-category (lifecycle phase for Skills, `rw`/`ro`/`pi-only` for personas, etc.). Each group renders as a `Pick | Item | Group | Status | Rec | Purpose` table; every row carries an explicit status text — `installed · up to date`, `installed · outdated`, `installed · modified`, `not installed`, or `broken · skipped in preflight`. Installed items are **pre-checked `[x]`** so unchecking = remove; not-installed items start `[ ]`. Per-group reply shortcuts: `all`, `recommended` (adds `★` items on top of the pre-selection — never unticks installed ones), `none`, `keep` (accept the pre-selection unchanged), or a list of picks. Never offer `setup`, `doctor`, or `guided-workspace-setup` — those are installer-only and live in the source agent-fleet repo.
13
+ Then present the install menu per the skill's Step 1 interaction contract — drive every decision through `AskUserQuestion`, never a printed table awaiting a free-text reply. Open with the **Express question** (fresh workspace: `Recommended ★` / `Everything` / `Custom — group by group` / `Nothing`; existing: `Keep as-is` / `Apply updates` / `Keep + add recommended ★` / `Custom`) — any answer but `Custom` skips all group screens. On `Custom`, run the **7 groups** (4 shared: Skills, Agent personas, Commands/prompts, References & Hooks; 3 pi-only — a claude-code workspace sees just the 4 shared groups): each opens as a single-select quick screen (`Recommended ★ (n)` / `Everything (m)` / `Customise` / `Skip group`, or the installed-state variants with `Remove some…`), and multi-select drill-ins appear only behind `Customise`, chunked by sub-category (lifecycle phase for Skills, `rw`/`ro` for personas, …) at ≤ 4 options per question. Option titles carry `name ★ [st]` (`ok`/`upd`/`mod`/`cflt`/`gone`/`new`/`—`/`brk`); descriptions carry the purpose plus the state in plain words (`mod` → warn that refreshing overwrites local edits). There is **no pre-checking** — installed state shows as counts on quick screens and words in descriptions; leaving an installed item unselected in a drill-in keeps it as-is. `recommended` adds `★` items on top of what is installed — it never removes; cancel = keep-as-is/skip. `cflt` rows are resolved only by showing the three-way diff and asking per row — never by Express or `Apply updates`. Never offer `setup`, `doctor`, or `guided-workspace-setup` — those are installer-only and live in the source agent-fleet repo.
14
14
 
15
- Unchecking an installed item means *remove it*, but **removal is scoped**: only act on items whose name is in the agent-fleet inventory **and** that are recorded in `## install-status` (or are symlinks resolving into the source repo). User-authored skills, custom commands, third-party plugins, and unrelated settings/env keys are left untouched and logged as "Skipped — not owned by agent-fleet".
15
+ Removal happens **only** on an explicit `Remove some…` multi-select (empty selection = remove nothing), and it is scoped: the screen lists only items whose name is in the agent-fleet inventory **and** that are recorded in `## install-status` (or are symlinks resolving into the source repo). User-authored skills, custom commands, third-party plugins, and unrelated settings/env keys are left untouched and logged as "Skipped — not owned by agent-fleet".
16
16
 
17
17
  **No cross-tool substitution.** Each row is offered only when the source file the chosen agent needs already exists — for `pi`, that means `.pi/prompts/<name>.md`, `.pi/extensions/<name>/`, etc. Never fall back to `.claude/commands/` (or another agent's tree) to satisfy a pi prompt request; items missing their per-agent source are filtered out of the menu entirely.
18
18
 
19
19
  **Personas are generated for non-pi targets.** The personas group lists the full availability roster from `node <source-root>/bin/cli.js transform-persona --list --agent <agent>` (pi-only personas — `bowser`, `orchestrator` — appear only when the agent is `pi`). For `claude-code`/`opencode` the apply step installs personas via `transform-persona --agent <agent> --workspace <workspace> <name…>` — always a generated copy, even in symlink mode — and records the rows with `transformed: true`; status checks diff against the generated output, not the raw canonical source.
20
20
 
21
- **pi harness companions.** When the agent is `pi`, installing/refreshing/removing any harness also refreshes its companions — the `justfile` launch recipes, the `team-up`/`coms-net` scripts, the peer/team YAML, `.pi/damage-control-rules.yaml`, and `.pi/harnesses/package.json`. Refresh the `justfile` from the current source (rewriting only the `agent-fleet:harnesses` managed region so user recipes survive) so retired-harness recipes are pruned and new ones added; a stale `justfile` left after a harness change is the regression this prevents.
21
+ **pi harness companions.** When the agent is `pi`, installing/refreshing/removing any harness also refreshes its companions — the `justfile` launch recipes, the `team-up`/`coms-net` scripts, the peer/team YAML, `.pi/damage-control-rules.yaml`, and `.pi/harnesses/package.json`. `agent-hub` requires only `damage-control-continue` and `ask-user-remote`; auto-include both. Refresh the `justfile` from the current source (rewriting only the `agent-fleet:harnesses` managed region so user recipes survive) so retired-harness recipes are pruned and new ones added. Treat the retired `damage-control` hard-stop directory as `gone`: remove it only when recorded and unchanged against the recorded snapshot, or when it is a symlink into the source root (including a broken retirement link). Preserve every user-modified or unowned copy.
22
22
 
23
- **No mid-apply overwrite prompts.** The Step 6 status text already warns that `installed · modified` rows will have local edits overwritten if kept ticked. The user's tick is the consent; the Step 9 confirmation is the single gate. During apply, refresh ticked items unconditionally — never pause to ask "should I overwrite this file?". Genuine errors (permission denied, missing source) still stop and report.
23
+ **No mid-apply overwrite prompts.** The `mod` description already warns that refreshing overwrites local edits. The user's selection is the consent; the Step 9 confirmation is the single gate. During apply, refresh selected items unconditionally — never pause to ask "should I overwrite this file?". Genuine errors (permission denied, missing source) still stop and report.
24
24
 
25
- Offer override sections for the workspace's `.ai/agent-fleet-overrides.md` based on the analysis, and record what was installed in `.ai/agent-fleet-setup.md`. Summarise the full plan and wait for explicit confirmation before writing anything, then perform the setup, re-scan for any new breakage, and report what changed.
25
+ Offer override sections for the workspace's `.ai/agent-fleet-overrides.md` based on the analysis (print each draft, then `Accept` / `Edit` / `Skip` per section), and record what was installed in `.ai/agent-fleet-setup.md`. Print the plan as compact action-grouped lines (Add / Refresh / Remove / Keep-count / Records / Method), then confirm with one question whose options are `Apply — and remove the installer commands` (default) / `Apply — keep the installer commands` / `Adjust picks` / `Cancel` — write nothing until an Apply is chosen. Then perform the setup, re-scan for any new breakage, and report what changed.
@@ -12,4 +12,6 @@ Also flag malformed peer entries in `.pi/agents/peers.yaml`: field lines (`perso
12
12
 
13
13
  Also validate `.ai/agent-fleet-overrides.md` when it exists, against the schema in `docs/agent-fleet-setup.md`: unknown sections, unknown keys in known sections, invalid values for the mechanically parsed `agent-hub` keys, missing `rules:` folders and `docs:` entry points, and `## env` `required:` names that are neither set nor declared in the root `.env`. These findings are advisory only — report them with fix "edit by hand", never edit the overrides file.
14
14
 
15
+ Present the findings per the skill's Step 1 interaction contract: print a short text summary (counts per kind, advisory findings as report-only text), then ask one native multi-select — *"Which fixes should I apply now?"* — each option titled `<path> — <issue>` with the proposed fix as its description; an empty selection applies nothing. Without a widget, print a `# | Path | Issue | Suggested fix` table instead and take the picks as text.
16
+
15
17
  Never overwrite a regular file — only act on symlinks whose target is missing. Report `repaired`, `deleted`, and `skipped` counts, and append a `## doctor-runs` line to `.ai/agent-fleet-setup.md` with the date and counts.
@@ -8,7 +8,7 @@ Run the guided install for a target workspace. If the user passed a workspace pa
8
8
 
9
9
  The Skills group draws from **two roots**: fleet-native `skills/` and the vendored upstream import `vendor/agent-skills-upstream/skills/` (see `docs/UPSTREAM-SKILLS.md`). On a name collision the native copy wins — never offer the vendored duplicate as a separate row.
10
10
 
11
- Analyse the workspace, then present a checklist of installable artifacts as **7 grouped multi-selects** (4 shared: Skills, Agent personas, Commands/prompts, References & Hooks; 3 pi-only: pi extensions & runtime skills, pi harnesses, External pi packages — an opencode workspace sees just the 4 shared groups). Multi-type groups carry a `Group` column labelling the sub-category. Mark what is already installed (pre-checked `[x]`). On `pi`, installing/refreshing/removing any harness also refreshes its companions — the `justfile` launch recipes (managed region only, so user recipes survive), the `team-up` script, the peer/team YAML, `.pi/damage-control-rules.yaml`, and `.pi/harnesses/package.json` — refreshed from the current source so retired-harness recipes are pruned and new ones added.
11
+ Analyse the workspace, then present the install menu per the skill's Step 1 interaction contract: with a native select widget, open with the **Express question** (`Recommended ★` / `Everything` / `Custom — group by group`, or the installed-state variants), and on `Custom` run the **7 groups** (4 shared: Skills, Agent personas, Commands/prompts, References & Hooks; 3 pi-only — an opencode workspace sees just the 4 shared groups) as single-select quick screens with multi-select drill-ins only behind `Customise`, chunked by sub-category; installed state shows as counts and plain-words descriptions (no pre-checking), removal only via an explicit `Remove some…` selection, and cancel = keep-as-is. Without a widget, fall back to the skill's tabular format (pre-checked `[x]` tables with text replies). On `pi`, installing/refreshing/removing any harness also refreshes its companions — the `justfile` launch recipes (managed region only, so user recipes survive), the `team-up` script, the peer/team YAML, `.pi/damage-control-rules.yaml`, and `.pi/harnesses/package.json` — refreshed from the current source so retired-harness recipes are pruned and new ones added. `agent-hub` requires only `damage-control-continue` and `ask-user-remote`. Treat the retired `damage-control` hard-stop directory as `gone`: remove it only when recorded and unchanged against the recorded snapshot, or when it is a symlink into the source root (including a broken retirement link); preserve every user-modified or unowned copy.
12
12
 
13
13
  **Personas are generated for opencode.** The personas group lists the full availability roster from `node <source-root>/bin/cli.js transform-persona --list --agent opencode` (pi-only personas — `bowser`, `orchestrator` — are excluded). The apply step installs them into `.opencode/agent/<name>.md` via `transform-persona --agent opencode --workspace <workspace> <name…>` — always a generated copy, even in symlink mode — and records the rows with `transformed: true`; status checks diff against the generated output, not the raw canonical source.
14
14
 
@@ -26,6 +26,10 @@
26
26
  # runner: claude-code
27
27
  # model: opus
28
28
 
29
+ # Hub-only workspace: `just hub-team base --project <name>` creates a Herdr
30
+ # workspace containing only the guarded hub, with no reusable coms peer panes.
31
+ base:
32
+
29
33
  full:
30
34
  - name: web-debugger
31
35
  persona: web-debugger
@@ -1,5 +1,5 @@
1
- # Първият team се активира при старт. Смяна: /agents-team
2
- # researcher / deep-researcher не се листват — винаги достъпни през spawn_research.
1
+ # The first team is activated at startup. Switch with: /agents-team
2
+ # researcher / deep-researcher are not listed — they are always available through spawn_research.
3
3
 
4
4
  default:
5
5
  - planner
@@ -13,10 +13,38 @@ another main agent** and **use a coms peer as a subagent**.
13
13
  > P2P layer from [`pi-vs-claude-code`](https://github.com/disler/pi-vs-claude-code) by
14
14
  > [disler](https://github.com/disler) (MIT). See the
15
15
  > [extension catalog](../../../docs/pi-extensions.md) and the
16
- > [design plan](../../../docs/plans/agent-hub-multi-agent-harness.md).
16
+ > [design plan](../../../docs/plans/agent-hub/).
17
+
18
+ **Optional phone control:** `just hub-team <team> --project <name>` can supply the live peers for the experimental [Codex Android conductor](../../../docs/codex-remote-conductor.md). Configure Codex for the same project; do not also launch a second `conductor-codex <team>` peer workspace. Hermes remains the inbound `ask_user` route, while Codex performs only human-confirmed, approval-gated outbound delegation.
17
19
 
18
20
  ## What it does
19
21
 
22
+ The whole dispatch loop, end to end:
23
+
24
+ ```mermaid
25
+ sequenceDiagram
26
+ autonumber
27
+ actor U as You
28
+ participant H as Hub (dispatcher)
29
+ participant S as Specialist (e.g. builder)
30
+ participant R as Research helper
31
+ participant D as Disk (.pi/agent-sessions/)
32
+
33
+ U->>H: task
34
+ H->>D: set_assertions — Verification Contract persisted
35
+ H->>S: dispatch_agent (task + advisory scope)
36
+ S-->>H: NEEDS_RESEARCH: how does X work?
37
+ H->>R: spawn_research (researcher / deep-researcher)
38
+ R->>D: write findings file
39
+ R-->>H: one-line notice + path
40
+ H->>S: resume with file paths — never raw findings
41
+ S-->>H: structured return + named evidence
42
+ H->>D: update_assertion
43
+ H-->>U: Assertions: 2✓ 1○ 1✗ · open: A4
44
+ ```
45
+
46
+ Every borrowed idea from another harness passes one test before it lands: *does this persistently enter the dispatcher context?* If yes, it goes to disk or a one-line status instead.
47
+
20
48
  `agent-hub` is the supported home for the former standalone dispatcher features:
21
49
 
22
50
  - **Dispatcher grid** — a live dashboard of fixed specialists from `.pi/agents/teams.yaml`.
@@ -25,6 +53,12 @@ another main agent** and **use a coms peer as a subagent**.
25
53
  `kind: research` personas ship by default: `researcher` (fast `gpt-5.3-codex-spark`) for simple
26
54
  reads and `deep-researcher` (`gpt-5.5` / xhigh) for hard, cross-cutting investigation. The
27
55
  orchestrator routes by persona; each persona's model + thinking level is shown in its catalog.
56
+ Finished helpers are **auto-pruned** so the research row doesn't grow without bound: auto-research
57
+ pipe helpers disappear as soon as they finish (their findings persist as `findings/*.md` files and
58
+ their handles are never resumed), while manual/persona helpers keep only the `research-keep` most
59
+ recently finished (default 4 — resumable via `/agents-cont rN`; older cards, and their session
60
+ files, are dropped oldest-first). Set `research-keep: <n>|all` in the overrides file to change
61
+ the cap. Running helpers are never pruned and `rN` handles are never reused.
28
62
  - **Human handoff path** — `ask_user` is exposed by the `ask-user-remote` wrapper (capturing stock
29
63
  `pi-ask-user` and optionally racing a `user-remote` bridge), so specialists can bubble decisions
30
64
  back through the dispatcher.
@@ -82,7 +116,15 @@ another main agent** and **use a coms peer as a subagent**.
82
116
  - **Agent controls** — `/zoom` inspects a live agent timeline; `/agents-history` replays the run as a
83
117
  timeline (orchestrator turns, dispatches, research helpers) with per-agent durations, parallel-run
84
118
  markers, and a grand total; kill/restart controls manage running child agents; per-agent `model:`
85
- fields select models from team config. Restartable team specialists at or above 70% context render
119
+ fields select models from team config. The `agents-*` commands address **both target kinds** —
120
+ team specialists by persona name, research helpers by `rN` handle (mirroring `/zoom`):
121
+ `/agents-kill <name|rN|all>` SIGTERMs a specialist (keeping its standing card), while on a
122
+ research helper it kills **and removes** the card + session — helpers are disposable by design
123
+ (`all` clears every helper); `/agents-restart <name|rN>` re-runs the last task fresh (a research
124
+ helper must be finished first); `/agents-cont rN <prompt>` resumes a finished helper's session.
125
+ The old `/research-rm` and `/research-clear` spellings remain as aliases of the kill semantics,
126
+ `/research-cont` of `/agents-cont`.
127
+ Restartable team specialists at or above 70% context render
86
128
  their context percentage with a warning marker/color in dashboard and compact views, and their next
87
129
  `dispatch_agent` result adds a `/agents-restart <persona>` hint. Research helpers are not warned,
88
130
  and the hub never restarts specialists automatically.
@@ -168,8 +210,8 @@ another main agent** and **use a coms peer as a subagent**.
168
210
  - **Default damage-control guardrails** — `just hub` and `just hub-solo` load the
169
211
  `damage-control-continue` harness before `agent-hub`, so dispatcher tool calls are checked against
170
212
  `.pi/damage-control-rules.yaml` and a blocked call feeds back instead of aborting the turn. A
171
- guardrail is also re-loaded into every spawned subagent (see [Safety scope](#safety-scope)):
172
- research helpers get the same continue variant, other specialists get the hard-stop `damage-control`.
213
+ guardrail is also re-loaded into every native specialist, research helper, and nested delegate
214
+ (see [Safety scope](#safety-scope)). Missing safety plumbing refuses child dispatch.
173
215
  - **Embedded coms** — the dispatcher is a discoverable peer on the local machine. Multiple
174
216
  `agent-hub` (or plain `coms`) sessions on the same box find each other through per-project registry
175
217
  files and exchange messages over a unix socket (named pipe on Windows).
@@ -214,6 +256,21 @@ done agents are hidden in compact mode, and the coms pool widget collapses too,
214
256
  collapses to just the prompt and footer. The current mode and binding are shown in the footer
215
257
  (`Alt+A view:dashboard` / `Alt+A view:compact`).
216
258
 
259
+ ### Version footer
260
+
261
+ `agent-hub` renders its local harness version first in its custom footer:
262
+ `v<version> · <model><thinking> · <team>`. It replaces pi's default footer, so it does **not**
263
+ consume or render the shared version status; it reads its own adjacent stamped manifest directly.
264
+ The three persistent-UI harnesses (`agent-hub`, `coms`, and
265
+ `damage-control-continue`) still register that one shared key, which gives default footers one
266
+ version in stacked non-hub sessions. In the supported guardrail-plus-hub stack, the hub's custom
267
+ footer supplies the single visible version. Damage-Control can update its own safety status after
268
+ a violation without overwriting the shared version entry. The canonical source is the
269
+ repository-root `package.json`; the adjacent harness manifest is a synchronized stamp maintained
270
+ by `bin/sync-harness-versions.js`. Its local `version.ts` reader intentionally stays with the
271
+ harness for copied or symlinked installs, but those installs still need the pre-existing full
272
+ `.pi/harnesses/` dependency installation.
273
+
217
274
  ### Voice dictation indicator
218
275
 
219
276
  The custom footer renders the optional [`pi-voice-stt`](../../extensions/pi-voice-stt/README.md)
@@ -280,9 +337,151 @@ task and follow their links instead of bulk-reading doc trees. The code-reviewer
280
337
  changes that alter documented behavior without a doc update; the documenter treats the entry
281
338
  points and the trees they link as the documentation it maintains.
282
339
 
340
+ The same section also tunes research-helper retention:
341
+
342
+ ```markdown
343
+ ## agent-hub
344
+ research-keep: 8
345
+ ```
346
+
347
+ `research-keep:` caps how many **finished** manual/persona research helpers stay resumable
348
+ (LRU by finish time, default 4; `all` disables the cap). Auto-research pipe helpers are
349
+ always pruned as soon as they finish, regardless of this key.
350
+
351
+ ### Bounded local-disk searches
352
+
353
+ Every `read`, `grep`, `find`, and `ls` call made by a native research helper or a nested
354
+ `delegate` child has a **parent-side** watchdog. The default is **120 seconds per tool call**;
355
+ it is a per-tool bound, not a whole-run deadline — the whole-run bound is the execution
356
+ mode's per-run deadline below. Configure it in the repository-standard overrides file:
357
+
358
+ ```markdown
359
+ ## agent-hub
360
+ recon-search-timeout-s: 120 # integer 1..3600
361
+ # recon-search-timeout-s: off # disable this per-tool watchdog
362
+ ```
363
+
364
+ Invalid values warn at session start and use 120. Calls are tracked independently by their
365
+ JSONL `toolCallId`; a repeated start/update cannot extend an existing deadline. A timeout returns
366
+ `tool_timeout` with the call metadata, ends the research/delegate lifecycle, sends SIGTERM to the
367
+ child's explicitly owned process group, then SIGKILL after a finite grace period. The parent also
368
+ has a final settlement timer, so it settles rather than waiting indefinitely for `close` or
369
+ inherited pipe drain. If child/process-group death cannot be confirmed after this bounded cleanup,
370
+ the timeout metadata reports `terminationConfirmed: false`: this prevents the parent hanging, but
371
+ may indicate an uninterruptible OS-level process that needs operator attention. This group
372
+ ownership covers descendants even when the pi leader exits first; nested delegates own their groups
373
+ and forward parent cancellation, avoiding detached-orphan processes. Caller
374
+ cancellation follows the same bounded cleanup path but is reported as `cancelled`, not
375
+ `tool_timeout`.
376
+
377
+ ### Execution modes & turn budgets
378
+
379
+ The hub runs one of three **execution modes** — `fast`, `standard` (default), `strict` —
380
+ with **per-user-turn budgets enforced in code**, not prose. This is the guardrail against
381
+ runaway orchestration (the observed failure mode: 100+ dispatches and 100M+ tokens for one
382
+ task, most of it re-billed stale specialist context).
383
+
384
+ | Budget (per user turn) | fast | standard | strict |
385
+ |-----------------------------------|--------|----------|---------|
386
+ | `dispatch_agent` calls | 2 | 8 | 24 |
387
+ | `spawn_research` calls | 1 | 4 | 12 |
388
+ | Turn wall clock | 15 min | 60 min | 240 min |
389
+ | Per-run deadline (specialist/research/delegate) | 10 min | 30 min | off |
390
+ | Specialist session recycled after | 3 runs | 5 runs | 5 runs |
391
+ | Nested delegation | off | on | on |
392
+
393
+ - **fast** — single-specialist path for small, low-risk asks; assertion ledger optional,
394
+ no nested delegation.
395
+ - **standard** — batched execution: one recon max, builder batches of 4–6 plan tasks with
396
+ one gate each, one review gate at the end.
397
+ - **strict** — the full Verification Contract (parity inventories, per-batch gates,
398
+ second confirming reads); use for production migrations and security-sensitive work.
399
+
400
+ When a budget is exhausted, `dispatch_agent`/`spawn_research` **refuse** with instructions
401
+ to summarize and ask the user; the next user message opens a fresh window. Switch modes
402
+ live with `/hub-mode fast|standard|strict` (no argument shows the current mode and usage);
403
+ set the project default and per-axis overrides in the overrides file:
404
+
405
+ ```markdown
406
+ ## agent-hub
407
+ mode: standard # fast|standard|strict
408
+ max-dispatches-per-turn: 8 # integer or off
409
+ max-research-per-turn: 4 # integer or off
410
+ turn-wall-time-s: 3600 # integer or off
411
+ agent-turn-timeout-s: 1800 # whole-run deadline per spawned run; integer or off
412
+ session-recycle-runs: 5 # recycle a specialist session after N resumed runs; integer or off
413
+ ```
414
+
415
+ Two related always-on behaviors: specialist **context pressure is measured over
416
+ input + cacheRead + cacheWrite** (resumed sessions re-send their whole accumulated context
417
+ as cache reads — counting `input` alone hid that entirely), and a specialist session is
418
+ **recycled** (fresh session, no `-c` resume) once it has served `session-recycle-runs` runs
419
+ or its measured context passes 60%. The dispatch result notes the recycle so the dispatcher
420
+ knows the specialist starts without session memory — task text and `artifacts:` paths must
421
+ carry the state, which the deliverable-to-file protocol already ensures.
422
+
423
+ The per-run deadline lands as `turn_timeout` (exit 124) with partial output preserved, for
424
+ dispatched specialists, research helpers, and nested delegate children alike — a hung child
425
+ can no longer hold its parent for hours.
426
+
427
+ ### Task triage (complexity tiers)
428
+
429
+ The dispatcher classifies each user turn with the `set_task_tier` tool BEFORE its first
430
+ dispatch — `trivial` / `small` / `feature` / `project` — and the hub lowers the enforced
431
+ dispatch/research caps to **min(mode, tier)**: trivial = 1 dispatch / 1 research,
432
+ small = 2 / 2, feature = 6 / 4, `project` defers to the mode. Skipping the call makes the
433
+ first dispatch assume `feature` (except in strict mode, where tiers are opt-in). The tier
434
+ resets every user turn and shows in the `hub-mode` status chip (`Mode: standard·small · …`).
435
+ The system prompt ties the tier to the anti-over-engineering rules: a provided plan is a
436
+ spec (no re-planning), assertions stay ≤3 for trivial/small asks, and "using every persona"
437
+ is called out as a smell. Two hygiene guards are enforced in code, not prose: a
438
+ **duplicate-dispatch guard** refuses re-dispatching the same agent with a near-identical
439
+ task inside one turn, and every budget/duplicate refusal is counted in `/hub-report`.
440
+
441
+ ### Drift watchdog (in-flight observation)
442
+
443
+ An armed dispatch is observed **while it runs**, from the same JSON event stream that
444
+ drives the cards — not post-hoc:
445
+
446
+ - **Layer 1 — deterministic rules, zero tokens** (`drift-watchdog.js`): a write/edit
447
+ outside the dispatch's declared `scope` globs, the identical tool call repeated 4×,
448
+ 5 consecutive failed tool calls, or 200 total tool calls in one run.
449
+ - **Layer 2 — LLM judge, escalation only**: when a rule fires (single-flight, 90 s
450
+ cooldown), a one-shot cheap run (default model: the researcher persona's; override with
451
+ `watchdog-judge-model`) reads the original task + declared scope + recent tool trail and
452
+ answers `VERDICT: ON_TRACK|DRIFTING|STUCK`. Judge failures fail open.
453
+ - **Intervention**: DRIFTING/STUCK terminates the run as **`drift_stop`** (exit 125,
454
+ partial output preserved) and the dispatch result instructs: re-dispatch ONCE with a
455
+ corrected, narrowed task — never the same task unchanged.
456
+
457
+ Enablement is dynamic, precedence top to bottom: the `watchdog: true|false` param on a
458
+ single `dispatch_agent` call → a per-agent override (`/watchdog builder on|off|clear`) →
459
+ the hub-wide setting (`/watchdog on|off|auto`, default `auto`, project default via the
460
+ `watchdog:` overrides key). Read-only research helpers are not monitored — they already
461
+ run under the per-tool watchdog + turn deadline and cannot write.
462
+
463
+ ### Dynamic teams
464
+
465
+ Rosters start from `.pi/agents/teams.yaml` but are not frozen there:
466
+
467
+ - `/agents-add <persona>…` / `/agents-drop <persona>…` — restructure the ACTIVE team
468
+ live (drop refuses running or last members; session files are kept for re-adding).
469
+ - `/agents-save <name>` — persist the current roster as a named team back into
470
+ `teams.yaml` (targeted block upsert; comments and other teams untouched).
471
+ - `team_adjust` — the dispatcher itself may add/drop a persona **with a stated reason**;
472
+ disabled in fast mode, capped at 8 roster members, and every change is notified to the
473
+ human. The system prompt is rebuilt each turn, so changes take effect immediately.
474
+
475
+ ### `/hub-report`
476
+
477
+ Per-turn cost accounting: dispatches (agent, status, elapsed, billed/output tokens),
478
+ research runs, session recycles, drift stops, and budget/duplicate refusals — for the
479
+ current turn, the last completed turn, and session totals. Billed tokens count
480
+ input + cacheRead + cacheWrite, the same measure the recycler uses.
481
+
283
482
  Paths that don't exist produce a session-start warning, never an error. The full key list for
284
- `## agent-hub` (models, sub-roles, depth budgets, persona gate) is documented in
285
- `docs/agent-fleet-setup.md`.
483
+ `## agent-hub` (models, sub-roles, depth budgets, persona gate, research retention, watchdog,
484
+ mode/budget keys) is documented in `docs/agent-fleet-setup.md`.
286
485
 
287
486
  ## The coms layer
288
487
 
@@ -478,6 +677,45 @@ orchestration surface the dispatcher persona never narrows.
478
677
  The dispatcher persona is **flavor-only** (decision G4 / 9) — it enriches the role but never narrows
479
678
  this tool set, so coms and dispatch stay available regardless of the chosen persona.
480
679
 
680
+ ## Optional Hermes local monitor transport
681
+
682
+ The optional monitor is an Agent Fleet-owned transport boundary, not a Hermes runtime API or a
683
+ bundled Hermes plugin. When enabled, `agent-hub` publishes dispatcher-turn and specialist-run
684
+ state and owns generation-safe cancellation. A separate local Hermes UI or operator client may
685
+ consume the owner-only discovery + Unix-socket contract documented in
686
+ [`hermes/README.md`](../../../hermes/README.md#local-agent-hub-monitor-integration).
687
+
688
+ Set these before the hub starts:
689
+
690
+ ```bash
691
+ export AGENT_FLEET_PROFILE_ID="approved-profile-id"
692
+ export AGENT_FLEET_MONITOR_RUNTIME_DIR="/absolute/owner-only/runtime-root"
693
+ ```
694
+
695
+ Both are required for monitor startup; the runtime root must be absolute and owner-only, and the
696
+ profile ID must be a safe identifier. The monitor also starts only for a Herdr-backed hub with
697
+ `HERDR_WORKSPACE_ID` and `HERDR_PANE_ID`; retain those values and `HERDR_SOCKET_PATH` in the
698
+ standard `just hub-team <team>` flow. Workspace labels are display metadata, not monitor identity.
699
+
700
+ The live contract exposes three authenticated newline-delimited JSON requests: `snapshot`, cursor-
701
+ based `output`, and exact-generation `cancel`. The monitor is local-only and fails closed when its
702
+ profile discovery, lease, token, or Unix socket is unavailable. A native cancel targets only the
703
+ matching hub-owned process generation. A coms cancel abandons the local wait only; its peer can
704
+ continue. Neither path controls or closes a Herdr workspace/pane.
705
+
706
+ Example startup:
707
+
708
+ ```bash
709
+ monitor_runtime="${XDG_RUNTIME_DIR:?}/agent-fleet-monitor"
710
+ install -d -m 700 "$monitor_runtime"
711
+ AGENT_FLEET_PROFILE_ID=dev \
712
+ AGENT_FLEET_MONITOR_RUNTIME_DIR="$monitor_runtime" \
713
+ just hub-team default
714
+ ```
715
+
716
+ No Desktop/backend plugin installation is required or provided. Consumers must re-discover after
717
+ lease or socket loss and must never persist or log the token.
718
+
481
719
  ## Requires
482
720
 
483
721
  - `.pi/agents/teams.yaml` for fixed specialist teams, the referenced persona `.md` files, and
@@ -509,18 +747,16 @@ Identity flags: `--name`, `--purpose`, `--project`, `--color`, `--explicit`.
509
747
  to hub/dispatcher tool calls in that parent pi process — and because it is the *continue* variant, a
510
748
  blocked dispatcher call feeds back and the turn keeps going rather than aborting. Specialist and
511
749
  research agents are spawned as separate pi subprocesses with `--no-extensions` — but `agent-hub`
512
- resolves a damage-control harness (from this session's `-e` flags, else the repo-local
513
- `.pi/harnesses/<variant>/index.ts`) and re-loads *only* that one into each child via `-e`. The variant
514
- is chosen per child: research helpers (`researcher` / `deep-researcher`) get `damage-control-continue`
515
- so a blocked read lets them adapt and keep going; every other specialist gets the hard-stop
516
- `damage-control` that aborts on a violation. (Continue falls back to the hard-stop variant when it
517
- isn't installed, so researchers stay guarded either way.) `--no-extensions` keeps discovery off, so
518
- children never auto-load the `.pi/extensions/` utilities or recursively re-load `agent-hub`; the
519
- explicit `-e` still applies, so every child's tool calls are checked against the same
520
- `.pi/damage-control-rules.yaml`. If damage-control can't be resolved, a session-start warning is
521
- shown and children spawn unguarded. Research helpers are additionally read-only by construction.
522
- The guided setup (`guided-workspace-setup`) enforces the pairing: installing or keeping `agent-hub`
523
- always installs/keeps `damage-control` (and `damage-control-continue`) with it.
750
+ resolves `damage-control-continue` from this session's `-e` flags, else the repo-local harness, and
751
+ re-loads it into every native specialist, research helper, and nested delegate via explicit `-e`.
752
+ `--no-extensions` keeps discovery off, so children never auto-load `.pi/extensions/` utilities or
753
+ recursively re-load `agent-hub`; the explicit guardrail still checks every child's tool calls against
754
+ `.pi/damage-control-rules.yaml`. Protected-path blocks escalate to the hub for explicit approval;
755
+ protected deletions offer only Deny or Allow once, while inherently dangerous command patterns are
756
+ non-exemptible. Denial or timeout blocks the call without aborting the child's turn. If continue
757
+ cannot be resolved, dispatch is refused—children are never spawned unguarded. Research helpers are
758
+ additionally read-only by construction. Guided setup enforces `agent-hub` ⇒
759
+ `damage-control-continue` + `ask-user-remote`.
524
760
 
525
761
  ### Related recipes
526
762
 
@@ -0,0 +1,135 @@
1
+ import {
2
+ accessDecisionChoices,
3
+ accessRequestCacheKey,
4
+ appendExemptionToFile,
5
+ fileExemptionsFor,
6
+ type AccessDecision,
7
+ type AccessDecisionChoice,
8
+ type AccessRequest,
9
+ } from "../lib/damage-control-shared.ts";
10
+
11
+ type ApprovalContext = {
12
+ hasUI: boolean;
13
+ ui: {
14
+ notify(message: string, level?: string): void;
15
+ select(title: string, options: string[], settings: { timeout: number }): Promise<string | undefined>;
16
+ };
17
+ };
18
+
19
+ type ReplySocket = {
20
+ write(chunk: string): unknown;
21
+ end(): unknown;
22
+ };
23
+
24
+ type AccessApprovalDeps = {
25
+ getContext(): ApprovalContext | null | undefined;
26
+ getExemptionsFile(): string | null | undefined;
27
+ appendLog(entry: Record<string, unknown>): void;
28
+ now(): string;
29
+ };
30
+
31
+ export function createAccessApprovalRouter(deps: AccessApprovalDeps) {
32
+ let askQueue: Promise<unknown> = Promise.resolve();
33
+ let generation = 0;
34
+ const denyCache = new Set<string>();
35
+ const pending = new Map<string, Promise<AccessDecisionChoice>>();
36
+
37
+ const respond = (socket: ReplySocket, msgId: string, decision: AccessDecisionChoice) => {
38
+ const reply: AccessDecision = { type: "access_decision", msg_id: msgId, decision };
39
+ try { socket.write(JSON.stringify(reply) + "\n"); } catch { /* child may have timed out */ }
40
+ try { socket.end(); } catch { /* ignore */ }
41
+ };
42
+
43
+ const validRequest = (request: AccessRequest) =>
44
+ typeof request.pattern === "string" && request.pattern.length > 0 &&
45
+ (request.category === "zero_access" || request.category === "read_only" || request.category === "no_delete");
46
+
47
+ const decide = (request: AccessRequest): Promise<AccessDecisionChoice> => {
48
+ const agent = (typeof request.agent === "string" && request.agent) || request.sender_session || "unknown-agent";
49
+ const pattern = request.pattern;
50
+ const cacheKey = accessRequestCacheKey({ ...request, agent, pattern });
51
+ const exemptionsFile = deps.getExemptionsFile();
52
+ const requestGeneration = generation;
53
+
54
+ if (fileExemptionsFor(exemptionsFile ?? undefined, agent).some((entry) => entry.pattern === pattern)) {
55
+ return Promise.resolve("allow_all");
56
+ }
57
+ if (denyCache.has(cacheKey)) return Promise.resolve("deny");
58
+ const existing = pending.get(cacheKey);
59
+ if (existing) return existing;
60
+
61
+ const ask = askQueue.then(async (): Promise<AccessDecisionChoice> => {
62
+ if (requestGeneration !== generation) return "deny";
63
+ const ctx = deps.getContext();
64
+ if (!ctx?.hasUI) return "deny";
65
+
66
+ const labels = new Map<AccessDecisionChoice, string>([
67
+ ["deny", "Deny (keep blocked)"],
68
+ ["allow_once", "Allow once"],
69
+ ["allow_agent", `Allow for ${agent} (this session)`],
70
+ ["allow_all", "Allow for all agents (this session)"],
71
+ ]);
72
+ const allowed = accessDecisionChoices(request.category);
73
+ const options = allowed.map((decision) => labels.get(decision)!);
74
+ ctx.ui.notify(
75
+ `🛡️ Access request from ${agent}: ${request.rule}\n tool: ${request.tool}\n attempted: ${String(request.invocation || "").slice(0, 200)}`,
76
+ "warning",
77
+ );
78
+ try {
79
+ const choice = await ctx.ui.select(
80
+ `🛡️ ${agent} requests access: ${pattern}`,
81
+ options,
82
+ { timeout: 600_000 },
83
+ );
84
+ if (requestGeneration !== generation) return "deny";
85
+ const selected = allowed.find((decision) => labels.get(decision) === choice) ?? "deny";
86
+ if (selected === "deny" && choice === labels.get("deny")) denyCache.add(cacheKey);
87
+ return selected;
88
+ } catch {
89
+ return "deny";
90
+ }
91
+ });
92
+
93
+ askQueue = ask.catch(() => {});
94
+ pending.set(cacheKey, ask);
95
+ void ask.finally(() => pending.delete(cacheKey));
96
+ return ask;
97
+ };
98
+
99
+ return {
100
+ async handle(socket: ReplySocket, request: AccessRequest): Promise<void> {
101
+ if (!validRequest(request)) {
102
+ respond(socket, request.msg_id, "deny");
103
+ return;
104
+ }
105
+ const agent = (typeof request.agent === "string" && request.agent) || request.sender_session || "unknown-agent";
106
+ const decision = await decide(request).catch((): AccessDecisionChoice => "deny");
107
+ const exemptionsFile = deps.getExemptionsFile();
108
+ if ((decision === "allow_agent" || decision === "allow_all") && exemptionsFile) {
109
+ try {
110
+ appendExemptionToFile(exemptionsFile, {
111
+ pattern: request.pattern,
112
+ scope: "session",
113
+ agent: decision === "allow_agent" ? agent : undefined,
114
+ grantedVia: "escalation",
115
+ grantedAt: deps.now(),
116
+ });
117
+ } catch { /* allow-once semantics still hold via the reply */ }
118
+ }
119
+ deps.appendLog({ action: `escalation_${decision}`, agent, pattern: request.pattern, tool: request.tool, rule: request.rule });
120
+ try {
121
+ deps.getContext()?.ui.notify(
122
+ `🛡️ Access ${decision === "deny" ? "denied" : `granted (${decision.replace(/_/g, " ")})`}: ${request.pattern} — ${agent}`,
123
+ decision === "deny" ? "warning" : "info",
124
+ );
125
+ } catch { /* ignore */ }
126
+ respond(socket, request.msg_id, decision);
127
+ },
128
+ reset() {
129
+ generation++;
130
+ askQueue = Promise.resolve();
131
+ denyCache.clear();
132
+ pending.clear();
133
+ },
134
+ };
135
+ }