@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
@@ -1,16 +1,7 @@
1
1
  /**
2
2
  * spawnPiAgent — the ONE place agent-hub code spawns a headless `pi` child and
3
- * parses its JSON event stream. Used by the hub itself (specialist dispatch +
4
- * research helpers, index.ts) and by the injected delegate extension
5
- * (delegate.ts), so the spawn args and stream parsing never exist in two
6
- * copies.
7
- *
8
- * The child is always `pi --mode json -p --no-extensions` with explicit `-e`
9
- * extensions (damage-control first, delegate when the persona declares
10
- * subagents), a model, a tool allowlist, and a session file. NOTE: pi's
11
- * `--tools` allowlist applies to extension-registered tools too, so a tool a
12
- * `-e` extension provides (e.g. `delegate`) must be NAMED in `tools` or the
13
- * child model never sees it (validated 2026-06-11).
3
+ * parses its JSON event stream. Research helpers and read-only delegate children
4
+ * opt into the per-tool watchdog here, rather than trusting an agent-side timer.
14
5
  */
15
6
 
16
7
  import { spawn, type ChildProcess } from "child_process";
@@ -21,49 +12,97 @@ export interface PiUsage {
21
12
  [k: string]: any;
22
13
  }
23
14
 
15
+ export interface ToolTimeout {
16
+ toolCallId: string;
17
+ toolName: string;
18
+ args: string;
19
+ startedAt: number;
20
+ deadlineAt: number;
21
+ }
22
+
23
+ export interface Termination {
24
+ reason: "tool_timeout" | "turn_timeout" | "drift_stop" | "cancelled";
25
+ confirmed: boolean;
26
+ escalated: boolean;
27
+ tool?: ToolTimeout;
28
+ }
29
+
30
+ /** External run control handed to the caller via onControl (drift watchdog). */
31
+ export interface PiRunControl {
32
+ /** Terminate the child group with the given classification (default "drift_stop"). */
33
+ terminate(reason?: "drift_stop" | "cancelled"): void;
34
+ }
35
+
36
+ export interface ToolWatchdogOptions {
37
+ /** Per read-only tool call deadline. null disables the watchdog. */
38
+ timeoutMs: number | null;
39
+ /** Grace after SIGTERM, followed by SIGKILL. Kept injectable for focused tests. */
40
+ termGraceMs?: number;
41
+ /** Bound on final settlement; never wait forever for close or inherited pipes. */
42
+ settleGraceMs?: number;
43
+ /** Only these tool names are watched (research/delegate read-only surface). */
44
+ tools?: readonly string[];
45
+ }
46
+
24
47
  export interface SpawnPiAgentOptions {
25
48
  model: string;
26
49
  tools: string;
27
50
  thinking: string;
28
51
  appendSystemPrompt: string;
29
52
  sessionFile: string;
30
- /** Pass `-c` so the child resumes sessionFile instead of starting fresh. */
31
53
  resume?: boolean;
32
54
  prompt: string;
33
- /** `-e` extension paths, in order (damage-control first). */
34
55
  extensions?: string[];
35
- /** Extra env on top of process.env (e.g. AGENT_HUB_DELEGATE_CONFIG). */
36
56
  env?: Record<string, string>;
37
- /**
38
- * Spawn the child as its own process group leader (setsid). The kill
39
- * cascade relies on this: delegate children spawned INSIDE the child
40
- * inherit its group, so signalling the negative PID kills the whole tree.
41
- */
57
+ /** Own a process group. Required for a watchdog/cancellation kill cascade. */
42
58
  detached?: boolean;
43
59
  cwd?: string;
60
+ /** Parent tool cancellation; classified separately from a tool timeout. */
61
+ signal?: AbortSignal;
62
+ toolWatchdog?: ToolWatchdogOptions;
63
+ /**
64
+ * Whole-run deadline: one timer from spawn start; on expiry the child group is
65
+ * terminated with reason "turn_timeout" (same SIGTERM→SIGKILL→settle cascade as
66
+ * the per-tool watchdog). null/undefined disables it. Unlike the tool watchdog
67
+ * this bounds the ENTIRE run, thinking and non-watched tools included.
68
+ */
69
+ turnDeadlineMs?: number | null;
44
70
  }
45
71
 
46
72
  export interface SpawnPiAgentCallbacks {
47
- /** Fires immediately after spawn so the caller can store the proc for kill. */
48
73
  onProcess?(proc: ChildProcess): void;
74
+ /** Receives a terminate handle for parent-side classified stops (drift watchdog). */
75
+ onControl?(control: PiRunControl): void;
49
76
  onTextDelta?(delta: string): void;
50
77
  onThinkingDelta?(delta: string): void;
51
- onToolStart?(toolName: string, argStr: string): void;
52
- /**
53
- * Usage from the stream: per assistant message (`message_end`) and once at
54
- * the end with the final assistant message (`agent_end`).
55
- */
78
+ onToolStart?(toolName: string, argStr: string, toolCallId?: string): void;
79
+ /** isError is present only when the event stream carries an error flag. */
80
+ onToolEnd?(toolName: string, toolCallId?: string, isError?: boolean): void;
56
81
  onUsage?(usage: PiUsage, source: "message_end" | "agent_end"): void;
57
82
  }
58
83
 
59
84
  export interface SpawnPiAgentResult {
60
- /** Concatenated assistant text deltas. */
61
85
  output: string;
62
- /** Process exit code; null when the child died from a signal (e.g. SIGTERM). */
63
86
  exitCode: number | null;
64
87
  stderr: string;
65
- /** Set when the process could not be spawned at all (proc `error` event). */
66
88
  spawnError?: string;
89
+ /** Present only when parent-side bounded termination was requested. */
90
+ termination?: Termination;
91
+ }
92
+
93
+ const DEFAULT_TERM_GRACE_MS = 1_000;
94
+ const DEFAULT_SETTLE_GRACE_MS = 1_000;
95
+ const WATCHED_TOOLS = new Set(["read", "grep", "find", "ls"]);
96
+
97
+ /** Signal an explicitly owned process group, falling back only for legacy callers. */
98
+ export function killPiTree(proc: ChildProcess, signal: NodeJS.Signals = "SIGTERM"): void {
99
+ const pid = proc.pid;
100
+ if (pid == null) return;
101
+ try {
102
+ process.kill(-pid, signal);
103
+ } catch {
104
+ try { proc.kill(signal); } catch {}
105
+ }
67
106
  }
68
107
 
69
108
  export function spawnPiAgent(
@@ -71,54 +110,119 @@ export function spawnPiAgent(
71
110
  cbs: SpawnPiAgentCallbacks = {},
72
111
  ): Promise<SpawnPiAgentResult> {
73
112
  const args = [
74
- "--mode", "json",
75
- "-p",
76
- "--no-extensions",
113
+ "--mode", "json", "-p", "--no-extensions",
77
114
  ...(opts.extensions || []).flatMap(e => ["-e", e]),
78
- "--model", opts.model,
79
- "--tools", opts.tools,
80
- "--thinking", opts.thinking,
81
- "--append-system-prompt", opts.appendSystemPrompt,
82
- "--session", opts.sessionFile,
115
+ "--model", opts.model, "--tools", opts.tools, "--thinking", opts.thinking,
116
+ "--append-system-prompt", opts.appendSystemPrompt, "--session", opts.sessionFile,
83
117
  ];
84
118
  if (opts.resume) args.push("-c");
85
119
 
120
+ const watchdog = opts.toolWatchdog;
121
+ const turnDeadlineMs = opts.turnDeadlineMs ?? null;
122
+ // A watchdog or deadline must own its group: group signalling remains valid even
123
+ // after the pi leader exits while an inherited-stdio descendant is still alive.
124
+ const ownsGroup = opts.detached === true || watchdog !== undefined || opts.signal !== undefined || turnDeadlineMs != null || cbs.onControl !== undefined;
125
+ const watchedTools = new Set(watchdog?.tools ?? WATCHED_TOOLS);
126
+ const timeoutMs = watchdog?.timeoutMs ?? null;
127
+ const termGraceMs = watchdog?.termGraceMs ?? DEFAULT_TERM_GRACE_MS;
128
+ const settleGraceMs = watchdog?.settleGraceMs ?? DEFAULT_SETTLE_GRACE_MS;
129
+
86
130
  const textChunks: string[] = [];
87
131
  const stderrChunks: string[] = [];
88
-
89
132
  return new Promise((resolve) => {
90
133
  const proc = spawn("pi", args, {
91
- // pi's CLI does not accept a standalone `--` option separator, so pass
92
- // the prompt through stdin. Print mode documents stdin as prompt input,
93
- // and this keeps prompts that start with `-` from being parsed as flags.
94
134
  stdio: ["pipe", "pipe", "pipe"],
95
135
  env: { ...process.env, ...(opts.env || {}) },
96
136
  ...(opts.cwd ? { cwd: opts.cwd } : {}),
97
- ...(opts.detached ? { detached: true } : {}),
137
+ ...(ownsGroup ? { detached: true } : {}),
98
138
  });
99
139
  cbs.onProcess?.(proc);
100
140
  proc.stdin?.on("error", () => {});
101
141
  proc.stdin?.end(opts.prompt);
102
142
 
103
143
  let buffer = "";
144
+ let settled = false;
145
+ let closeSeen = false;
146
+ let termination: Termination | undefined;
147
+ let termTimer: ReturnType<typeof setTimeout> | undefined;
148
+ let settleTimer: ReturnType<typeof setTimeout> | undefined;
149
+ let deadlineTimer: ReturnType<typeof setTimeout> | undefined;
150
+ const calls = new Map<string, ToolTimeout & { timer: ReturnType<typeof setTimeout> }>();
151
+
152
+ const clearCalls = () => {
153
+ for (const call of calls.values()) clearTimeout(call.timer);
154
+ calls.clear();
155
+ };
156
+ const cleanup = () => {
157
+ clearCalls();
158
+ if (termTimer) clearTimeout(termTimer);
159
+ if (settleTimer) clearTimeout(settleTimer);
160
+ if (deadlineTimer) clearTimeout(deadlineTimer);
161
+ opts.signal?.removeEventListener("abort", onAbort);
162
+ };
163
+ const settle = (code: number | null, spawnError?: string) => {
164
+ if (settled) return;
165
+ settled = true;
166
+ cleanup();
167
+ if (termination) termination.confirmed = closeSeen;
168
+ // A pipe held by a descendant must not hold the caller forever.
169
+ try { proc.stdin?.destroy(); } catch {}
170
+ try { proc.stdout?.destroy(); } catch {}
171
+ try { proc.stderr?.destroy(); } catch {}
172
+ resolve({ output: textChunks.join(""), exitCode: code, stderr: stderrChunks.join(""), ...(spawnError ? { spawnError } : {}), ...(termination ? { termination } : {}) });
173
+ };
174
+ const terminate = (reason: Termination["reason"], tool?: ToolTimeout) => {
175
+ // The first classification wins; later cancellation/exit events keep it.
176
+ if (termination) return;
177
+ termination = { reason, confirmed: false, escalated: false, ...(tool ? { tool } : {}) };
178
+ clearCalls();
179
+ killPiTree(proc, "SIGTERM");
180
+ termTimer = setTimeout(() => {
181
+ if (settled) return;
182
+ termination!.escalated = true;
183
+ killPiTree(proc, "SIGKILL");
184
+ }, termGraceMs);
185
+ settleTimer = setTimeout(() => settle(null), termGraceMs + settleGraceMs);
186
+ };
187
+ const onAbort = () => terminate("cancelled");
188
+ if (opts.signal?.aborted) onAbort();
189
+ else opts.signal?.addEventListener("abort", onAbort, { once: true });
190
+ // External classified stop (drift watchdog): same first-classification-wins
191
+ // cascade as every other termination path; harmless after settle.
192
+ cbs.onControl?.({ terminate: (reason = "drift_stop") => { if (!settled) terminate(reason); } });
193
+ if (turnDeadlineMs != null) {
194
+ deadlineTimer = setTimeout(() => terminate("turn_timeout"), turnDeadlineMs);
195
+ }
196
+
197
+ const toolId = (event: any) => String(event.toolCallId ?? event.tool_call_id ?? event.id ?? "");
104
198
  const handleEvent = (event: any) => {
105
199
  if (event.type === "message_update") {
106
200
  const delta = event.assistantMessageEvent;
107
- if (delta?.type === "text_delta") {
108
- textChunks.push(delta.delta || "");
109
- cbs.onTextDelta?.(delta.delta || "");
110
- } else if (delta?.type === "thinking_delta") {
111
- cbs.onThinkingDelta?.(delta.delta || "");
112
- }
201
+ if (delta?.type === "text_delta") { textChunks.push(delta.delta || ""); cbs.onTextDelta?.(delta.delta || ""); }
202
+ else if (delta?.type === "thinking_delta") cbs.onThinkingDelta?.(delta.delta || "");
113
203
  } else if (event.type === "tool_execution_start") {
114
204
  let argStr = "";
115
- try { argStr = event.args != null ? JSON.stringify(event.args) : ""; } catch { argStr = ""; }
116
- cbs.onToolStart?.(event.toolName || "tool", argStr);
205
+ try { argStr = event.args != null ? JSON.stringify(event.args) : ""; } catch {}
206
+ const id = toolId(event);
207
+ const name = event.toolName || "tool";
208
+ cbs.onToolStart?.(name, argStr, id || undefined);
209
+ if (timeoutMs != null && id && watchedTools.has(name) && !calls.has(id)) {
210
+ const startedAt = Date.now();
211
+ const call: ToolTimeout = { toolCallId: id, toolName: name, args: argStr, startedAt, deadlineAt: startedAt + timeoutMs };
212
+ calls.set(id, { ...call, timer: setTimeout(() => terminate("tool_timeout", call), timeoutMs) });
213
+ }
214
+ } else if (event.type === "tool_execution_end") {
215
+ const id = toolId(event);
216
+ if (id) {
217
+ const call = calls.get(id);
218
+ if (call) { clearTimeout(call.timer); calls.delete(id); }
219
+ }
220
+ const rawIsError = event.isError ?? event.is_error ?? event.result?.isError ?? event.result?.is_error;
221
+ cbs.onToolEnd?.(event.toolName || "tool", id || undefined, typeof rawIsError === "boolean" ? rawIsError : undefined);
117
222
  } else if (event.type === "message_end") {
118
223
  if (event.message?.usage) cbs.onUsage?.(event.message.usage, "message_end");
119
224
  } else if (event.type === "agent_end") {
120
- const msgs = event.messages || [];
121
- const last = [...msgs].reverse().find((m: any) => m.role === "assistant");
225
+ const last = [...(event.messages || [])].reverse().find((m: any) => m.role === "assistant");
122
226
  if (last?.usage) cbs.onUsage?.(last.usage, "agent_end");
123
227
  }
124
228
  };
@@ -128,52 +232,15 @@ export function spawnPiAgent(
128
232
  buffer += chunk;
129
233
  const lines = buffer.split("\n");
130
234
  buffer = lines.pop() || "";
131
- for (const line of lines) {
132
- if (!line.trim()) continue;
133
- try { handleEvent(JSON.parse(line)); } catch {}
134
- }
235
+ for (const line of lines) { if (line.trim()) try { handleEvent(JSON.parse(line)); } catch {} }
135
236
  });
136
-
137
237
  proc.stderr!.setEncoding("utf-8");
138
- proc.stderr!.on("data", (chunk: string) => {
139
- stderrChunks.push(chunk);
140
- });
141
-
238
+ proc.stderr!.on("data", (chunk: string) => stderrChunks.push(chunk));
142
239
  proc.on("close", (code) => {
143
- if (buffer.trim()) {
144
- try { handleEvent(JSON.parse(buffer)); } catch {}
145
- }
146
- resolve({
147
- output: textChunks.join(""),
148
- exitCode: code,
149
- stderr: stderrChunks.join(""),
150
- });
151
- });
152
-
153
- proc.on("error", (err) => {
154
- resolve({
155
- output: "",
156
- exitCode: 1,
157
- stderr: stderrChunks.join(""),
158
- spawnError: err.message,
159
- });
240
+ closeSeen = true;
241
+ if (buffer.trim()) try { handleEvent(JSON.parse(buffer)); } catch {}
242
+ settle(code);
160
243
  });
244
+ proc.on("error", (err) => settle(1, err.message));
161
245
  });
162
246
  }
163
-
164
- /**
165
- * Kill a spawned pi child and — when it was spawned `detached` — its whole
166
- * process group, so delegate children and grandchildren die with their parent.
167
- * For a non-detached child the group kill fails with ESRCH (its pgid is the
168
- * hub's, not its own pid) and we fall back to a single-process SIGTERM, which
169
- * matches the pre-cascade behavior.
170
- */
171
- export function killPiTree(proc: ChildProcess, signal: NodeJS.Signals = "SIGTERM"): void {
172
- const pid = proc.pid;
173
- if (pid == null) return;
174
- try {
175
- process.kill(-pid, signal);
176
- } catch {
177
- try { proc.kill(signal); } catch {}
178
- }
179
- }
@@ -0,0 +1,18 @@
1
+ import { readFileSync } from "node:fs";
2
+
3
+ export const VERSION_STATUS_KEY = "00-agent-fleet-version";
4
+
5
+ function readAdjacentVersion(): string | null {
6
+ try {
7
+ const manifest = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
8
+ return typeof manifest.version === "string" && manifest.version.length > 0 ? manifest.version : null;
9
+ } catch {
10
+ return null;
11
+ }
12
+ }
13
+
14
+ export const HARNESS_VERSION = readAdjacentVersion();
15
+
16
+ export function registerVersionStatus(ctx: { ui?: { setStatus?: (key: string, text: string) => void } }): void {
17
+ if (HARNESS_VERSION) ctx.ui?.setStatus?.(VERSION_STATUS_KEY, `v${HARNESS_VERSION}`);
18
+ }
@@ -2,6 +2,8 @@
2
2
 
3
3
  Harness wrapper for `pi-ask-user` that preserves the stock `ask_user` UI and result shape while optionally racing it against the Hermes `user-remote` coms peer.
4
4
 
5
+ The experimental Codex Remote-Control conductor is **not** an inbound `ask_user` route. It initiates approval-gated outbound delegation from Android; Hermes remains the only phone answer participant in this race. See the [Codex conductor runbook](../../../docs/codex-remote-conductor.md).
6
+
5
7
  - The stock `pi-ask-user` extension is loaded through a capture proxy; its `ask_user` tool is not registered directly.
6
8
  - If no live `user-remote` peer is present at call time, the wrapper calls stock `execute` with the original arguments and signal unchanged.
7
9
  - If `user-remote` is present, the wrapper races local stock UI against the remote coms request using `race-core.js`; first answer wins and local-first emits one best-effort cancel.
@@ -13,6 +13,16 @@ peers through per-project registry files under `~/.pi/coms/projects/<project>/ag
13
13
  Surfaces a live "pool" widget of connected peers, with ping and keepalive cycles and a
14
14
  clean shutdown lifecycle.
15
15
 
16
+ ## Version footer and provenance
17
+
18
+ This persistent-UI harness shows `v<version>` below the prompt. It shares one common-key
19
+ status with `agent-hub` and `damage-control-continue`, so a stack renders the
20
+ version once. The root `package.json` is canonical; `bin/sync-harness-versions.js` synchronizes
21
+ its value into this adjacent manifest. The local `version.ts` reader is retained so a copied or
22
+ symlinked harness resolves its own adjacent stamp, not the launch directory. That provenance
23
+ pair does not carry dependencies: copy/symlink targets still require the existing full
24
+ `.pi/harnesses/` dependency installation.
25
+
16
26
  ## Presence backends: herdr vs files
17
27
 
18
28
  Presence (who's alive, what state they're in) is pluggable; the **envelope transport,
@@ -41,6 +51,17 @@ when you are on the herdr backend.
41
51
  - `coms_list` / `coms_send` / `coms_get` / `coms_await` tools — discover peers and
42
52
  exchange messages
43
53
 
54
+ ## External conductors
55
+
56
+ Two optional phone-facing conductors use this same pool without becoming pane owners:
57
+
58
+ - **Hermes/Telegram** is the inbound `ask_user` route and can also perform bounded coms delegation.
59
+ - **Codex Remote Control** is an experimental outbound-only Android route. Its user-systemd service loads a managed contract from an external user-state workspace, and `scripts/codex-conductor.ts` permits only scoped `list` plus one serialized `send --await`. See the [operator runbook](../../../docs/codex-remote-conductor.md).
60
+
61
+ Both must use the same validated project as the peers they target. Neither conductor may drive Herdr lifecycle.
62
+
63
+ Standalone `coms-cli` queues are project-scoped under `~/.pi/coms/cli/projects/<project>/<name>/`. Legacy name-only queues fail closed until an operator assigns and moves the complete queue; `projects` is a reserved identity name.
64
+
44
65
  ## Pool scope is the reach boundary
45
66
 
46
67
  The pool widget defines who you can reach: `coms_list` and `coms_send` resolve targets through one
@@ -23,6 +23,7 @@ import * as fs from "node:fs";
23
23
  import * as path from "node:path";
24
24
  import * as os from "node:os";
25
25
  import * as crypto from "node:crypto";
26
+ import { registerVersionStatus } from "./version.ts";
26
27
 
27
28
  import {
28
29
  formatPeerStatus,
@@ -783,6 +784,7 @@ export default function (pi: ExtensionAPI) {
783
784
 
784
785
  // ━━ session_start ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
785
786
  pi.on("session_start", async (_event, ctx) => {
787
+ registerVersionStatus(ctx);
786
788
  currentCtx = ctx;
787
789
 
788
790
  // 1. Resolve identity from CLI flags > frontmatter > defaults.
@@ -1,6 +1,7 @@
1
1
  {
2
- "name": "agent-fleet-pi-coms",
3
- "private": true,
4
- "type": "module",
5
- "main": "index.ts"
2
+ "name": "agent-fleet-pi-coms",
3
+ "private": true,
4
+ "type": "module",
5
+ "main": "index.ts",
6
+ "version": "0.0.4"
6
7
  }
@@ -0,0 +1,18 @@
1
+ import { readFileSync } from "node:fs";
2
+
3
+ export const VERSION_STATUS_KEY = "00-agent-fleet-version";
4
+
5
+ function readAdjacentVersion(): string | null {
6
+ try {
7
+ const manifest = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
8
+ return typeof manifest.version === "string" && manifest.version.length > 0 ? manifest.version : null;
9
+ } catch {
10
+ return null;
11
+ }
12
+ }
13
+
14
+ export const HARNESS_VERSION = readAdjacentVersion();
15
+
16
+ export function registerVersionStatus(ctx: { ui?: { setStatus?: (key: string, text: string) => void } }): void {
17
+ if (HARNESS_VERSION) ctx.ui?.setStatus?.(VERSION_STATUS_KEY, `v${HARNESS_VERSION}`);
18
+ }
@@ -6,23 +6,26 @@ Safety auditing — blocks destructive tool calls, but lets the agent **adapt an
6
6
 
7
7
  ## What it does
8
8
 
9
- Same rule engine as [`damage-control`](../damage-control/README.md) — it loads
10
- `.pi/damage-control-rules.yaml` (`bashToolPatterns`, `zeroAccessPaths`,
9
+ It loads `.pi/damage-control-rules.yaml` (`bashToolPatterns`, `zeroAccessPaths`,
11
10
  `readOnlyPaths`, `noDeletePaths`) and checks every tool call against it.
12
11
 
13
- The difference is what happens on a match:
12
+ On a match, `damage-control-continue` replaces the tool result with **actionable
13
+ feedback** that distinguishes destructive from non-destructive intent and tells
14
+ the agent how to adapt. It does **not** call `ctx.abort()`: the blocked operation
15
+ fails closed, but the turn continues so the agent can report the block or take a
16
+ safe alternative. Protected-path calls may proceed only through the explicit
17
+ approval/exemption paths below; inherently dangerous command patterns never can.
14
18
 
15
- - **`damage-control`** replaces the tool result with a block message **and calls
16
- `ctx.abort()`**, ending the agent's turn (hard stop).
17
- - **`damage-control-continue`** replaces the tool result with **actionable
18
- feedback** that distinguishes destructive from non-destructive intent and tells
19
- the agent how to adapt — and does **not** abort. The turn continues, so the
20
- agent can recover (e.g. assume a `.env` key exists instead of reading it to
21
- verify) instead of dead-ending.
19
+ ## Version footer and provenance
22
20
 
23
- By default both variants hard-block. The choice is whether the agent's turn dies
24
- or keeps going — plus, in this variant, whether **you** let the call through via
25
- exemptions (below).
21
+ This persistent-UI harness shows `v<version>` below the prompt. It shares one common-key
22
+ status with `agent-hub` and `coms`, so a stack renders the version once. Its
23
+ version remains separate from the mutable `damage-control` status: active-rule and
24
+ last-violation feedback never replaces it. The root `package.json` is canonical;
25
+ `bin/sync-harness-versions.js` synchronizes its value into this adjacent manifest. The local
26
+ `version.ts` reader supports copied or symlinked harness directories by resolving that adjacent
27
+ stamp, but those targets still require the pre-existing full `.pi/harnesses/` dependency
28
+ installation.
26
29
 
27
30
  ## Exemptions — allow access per turn or per session
28
31
 
@@ -49,28 +52,27 @@ re-prompt you; no answer within 60s fails closed.
49
52
  **Escalation from headless children**: when this harness runs inside a subagent
50
53
  spawned by agent-hub (no UI, `AGENT_HUB_ASK_ENDPOINT` set), a path block sends an
51
54
  `access_request` to the hub's coms socket instead. The dispatcher session shows
52
- who is asking, for what, and why it was blocked — *Deny / Allow once / Allow for
53
- this agent / Allow for all agents (session)*. The child waits up to 60s and fails
54
- closed on timeout; a late answer still lands in the shared exemptions file, so
55
- the next attempt (from any child) passes. At most 3 escalations per child run;
56
- denials are cached.
55
+ who is asking, for what, and why it was blocked. Ordinary protected reads/writes
56
+ offer *Deny / Allow once / Allow for this agent / Allow for all agents (session)*.
57
+ A protected deletion offers only *Deny / Allow once*, so approving one file does
58
+ not grant its parent directory. The child waits up to 60s and fails closed on
59
+ timeout. At most 3 escalations per child run; denials are cached.
57
60
 
58
61
  **Shared exemptions file**: agent-hub keeps one session-scoped file
59
62
  (`~/.pi/coms/exemptions/<session>.json`, deleted on shutdown) and passes it to
60
63
  every spawned child via `AGENT_HUB_EXEMPTIONS_FILE`. `/allow <pattern> session`
61
- in the hub lands there, so it covers the whole team — including hard-stop
62
- [`damage-control`](../damage-control/README.md) specialists, which honor the
63
- file but never prompt or escalate. It is re-read on every block, so mid-session
64
- grants reach already-running children. Everything (grants, revokes, escalation
64
+ in the hub lands there, so it covers the whole team. Every native specialist,
65
+ research helper, and nested delegate uses this harness and re-reads the file on
66
+ every block, so mid-session grants reach already-running children. Everything
67
+ (grants, revokes, escalation
65
68
  outcomes) is logged to the `damage-control-log` session entries.
66
69
 
67
70
  ## When it's used (this repo)
68
71
 
69
- `just hub` / `just hub-solo` load this variant for the **orchestrator/dispatcher
70
- main session**, and the hub re-loads it into spawned **research helpers**
71
- (`researcher` / `deep-researcher`) — both need to recover from a blocked read and
72
- keep going rather than abort. Every other spawned specialist (builder,
73
- test-engineer, …) keeps the hard-stop `damage-control` harness.
72
+ `just hub` / `just hub-solo` load this harness for the **orchestrator/dispatcher
73
+ main session**, and Agent Hub re-loads it into every native **specialist, research
74
+ helper, and nested delegate**. If the harness cannot be resolved, Agent Hub
75
+ refuses guarded child dispatch rather than launching an unprotected process.
74
76
 
75
77
  ## Commands & tools
76
78
 
@@ -107,10 +109,9 @@ pi -e .pi/harnesses/damage-control-continue/index.ts -e .pi/harnesses/agent-hub/
107
109
 
108
110
  - Theme integration removed — the `themeMap.ts` import and the `applyExtensionDefaults()`
109
111
  call were stripped (this repo does not ship pi themes).
110
- - The `find` tool's `pattern` is matched against `zeroAccessPaths` (mirrors the
111
- hardening in this repo's `damage-control`), closing a gap where `find` could
112
- still locate secret files.
112
+ - The `find` tool's `pattern` is matched against `zeroAccessPaths`, closing a gap
113
+ where `find` could still locate secret files.
113
114
  - Exemption layer added (not in upstream): `/allow`/`/allowed`/`/revoke`,
114
115
  block-time approval dialog, and escalation from headless agent-hub children to
115
116
  the dispatcher — see the Exemptions section above. Shared plumbing lives in
116
- [`../damage-control/shared.ts`](../damage-control/shared.ts).
117
+ [`../lib/damage-control-shared.ts`](../lib/damage-control-shared.ts).