@chankov/agent-fleet 0.0.4 → 0.0.5

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 (321) hide show
  1. package/.claude/commands/set-hermes-telegram.md +15 -0
  2. package/.opencode/commands/af-set-hermes-telegram.md +15 -0
  3. package/.pi/agents/dispatch-policy.yaml +1 -1
  4. package/.pi/agents/peers.yaml +4 -4
  5. package/.pi/extensions/chrome-devtools-mcp/README.md +1 -1
  6. package/.pi/extensions/mcp-bridge/README.md +1 -1
  7. package/.pi/harnesses/agent-hub/README.md +26 -26
  8. package/.pi/harnesses/agent-hub/index.ts +6 -6
  9. package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +1 -1
  10. package/.pi/harnesses/agent-hub/monitor-publisher.ts +3 -3
  11. package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +1 -1
  12. package/.pi/harnesses/agent-hub/package.json +1 -1
  13. package/.pi/harnesses/ask-user-remote/README.md +1 -0
  14. package/.pi/harnesses/ask-user-remote/index.ts +36 -8
  15. package/.pi/harnesses/coms/README.md +5 -5
  16. package/.pi/harnesses/coms/package.json +1 -1
  17. package/.pi/harnesses/damage-control-continue/README.md +7 -7
  18. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  19. package/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  20. package/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
  21. package/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  22. package/.pi/harnesses/lib/hermes-monitor-socket.ts +118 -0
  23. package/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  24. package/.pi/prompts/set-hermes-telegram.md +15 -0
  25. package/.versions/0.0.5/.claude/commands/build.md +44 -0
  26. package/.versions/0.0.5/.claude/commands/code-simplify.md +22 -0
  27. package/.versions/0.0.5/.claude/commands/design-agent.md +14 -0
  28. package/.versions/0.0.5/.claude/commands/doctor-agent-fleet.md +17 -0
  29. package/.versions/0.0.5/.claude/commands/orchestrate.md +112 -0
  30. package/.versions/0.0.5/.claude/commands/plan.md +16 -0
  31. package/.versions/0.0.5/.claude/commands/prime.md +22 -0
  32. package/.versions/0.0.5/.claude/commands/review.md +16 -0
  33. package/.versions/0.0.5/.claude/commands/set-hermes-telegram.md +15 -0
  34. package/.versions/0.0.5/.claude/commands/setup-agent-fleet.md +25 -0
  35. package/.versions/0.0.5/.claude/commands/ship.md +72 -0
  36. package/.versions/0.0.5/.claude/commands/spec.md +15 -0
  37. package/.versions/0.0.5/.claude/commands/test.md +19 -0
  38. package/.versions/0.0.5/.claude/commands/webperf.md +32 -0
  39. package/.versions/0.0.5/.claude/orchestrate-teams.yaml +24 -0
  40. package/.versions/0.0.5/.opencode/commands/af-build.md +17 -0
  41. package/.versions/0.0.5/.opencode/commands/af-code-simplify.md +16 -0
  42. package/.versions/0.0.5/.opencode/commands/af-compound.md +16 -0
  43. package/.versions/0.0.5/.opencode/commands/af-design-agent.md +15 -0
  44. package/.versions/0.0.5/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  45. package/.versions/0.0.5/.opencode/commands/af-orchestrate.md +112 -0
  46. package/.versions/0.0.5/.opencode/commands/af-plan.md +16 -0
  47. package/.versions/0.0.5/.opencode/commands/af-prime.md +22 -0
  48. package/.versions/0.0.5/.opencode/commands/af-review.md +15 -0
  49. package/.versions/0.0.5/.opencode/commands/af-set-hermes-telegram.md +15 -0
  50. package/.versions/0.0.5/.opencode/commands/af-setup-agent-fleet.md +15 -0
  51. package/.versions/0.0.5/.opencode/commands/af-ship.md +16 -0
  52. package/.versions/0.0.5/.opencode/commands/af-spec.md +16 -0
  53. package/.versions/0.0.5/.opencode/commands/af-test.md +21 -0
  54. package/.versions/0.0.5/.opencode/commands/af-webperf.md +32 -0
  55. package/.versions/0.0.5/.opencode/orchestrate-teams.yaml +24 -0
  56. package/.versions/0.0.5/.pi/agents/dispatch-policy.yaml +32 -0
  57. package/.versions/0.0.5/.pi/agents/model-profiles.yaml +20 -0
  58. package/.versions/0.0.5/.pi/agents/peers.yaml +146 -0
  59. package/.versions/0.0.5/.pi/agents/teams.yaml +39 -0
  60. package/.versions/0.0.5/.pi/damage-control-rules.yaml +297 -0
  61. package/.versions/0.0.5/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  62. package/.versions/0.0.5/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  63. package/.versions/0.0.5/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  64. package/.versions/0.0.5/.pi/extensions/btw/README.md +118 -0
  65. package/.versions/0.0.5/.pi/extensions/btw/index.ts +917 -0
  66. package/.versions/0.0.5/.pi/extensions/btw/package.json +6 -0
  67. package/.versions/0.0.5/.pi/extensions/btw/state.js +179 -0
  68. package/.versions/0.0.5/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  69. package/.versions/0.0.5/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
  70. package/.versions/0.0.5/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  71. package/.versions/0.0.5/.pi/extensions/compact-and-continue/README.md +42 -0
  72. package/.versions/0.0.5/.pi/extensions/compact-and-continue/index.ts +120 -0
  73. package/.versions/0.0.5/.pi/extensions/compact-and-continue/package.json +6 -0
  74. package/.versions/0.0.5/.pi/extensions/mcp-bridge/README.md +46 -0
  75. package/.versions/0.0.5/.pi/extensions/mcp-bridge/index.ts +206 -0
  76. package/.versions/0.0.5/.pi/extensions/mcp-bridge/package.json +6 -0
  77. package/.versions/0.0.5/.pi/extensions/package-lock.json +1143 -0
  78. package/.versions/0.0.5/.pi/extensions/package.json +9 -0
  79. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/README.md +201 -0
  80. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/config.ts +198 -0
  81. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  82. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/index.ts +248 -0
  83. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/package.json +6 -0
  84. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  85. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  86. package/.versions/0.0.5/.pi/harnesses/agent-hub/README.md +798 -0
  87. package/.versions/0.0.5/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  88. package/.versions/0.0.5/.pi/harnesses/agent-hub/artifacts.js +92 -0
  89. package/.versions/0.0.5/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  90. package/.versions/0.0.5/.pi/harnesses/agent-hub/delegate.ts +386 -0
  91. package/.versions/0.0.5/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  92. package/.versions/0.0.5/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  93. package/.versions/0.0.5/.pi/harnesses/agent-hub/footer.ts +29 -0
  94. package/.versions/0.0.5/.pi/harnesses/agent-hub/helpers.ts +214 -0
  95. package/.versions/0.0.5/.pi/harnesses/agent-hub/index.ts +8045 -0
  96. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  97. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  98. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  99. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  100. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  101. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  102. package/.versions/0.0.5/.pi/harnesses/agent-hub/package.json +7 -0
  103. package/.versions/0.0.5/.pi/harnesses/agent-hub/research-retention.js +34 -0
  104. package/.versions/0.0.5/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  105. package/.versions/0.0.5/.pi/harnesses/agent-hub/return-contract.js +215 -0
  106. package/.versions/0.0.5/.pi/harnesses/agent-hub/run-budget.js +155 -0
  107. package/.versions/0.0.5/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  108. package/.versions/0.0.5/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  109. package/.versions/0.0.5/.pi/harnesses/agent-hub/spawn.ts +246 -0
  110. package/.versions/0.0.5/.pi/harnesses/agent-hub/version.ts +18 -0
  111. package/.versions/0.0.5/.pi/harnesses/ask-user-remote/README.md +19 -0
  112. package/.versions/0.0.5/.pi/harnesses/ask-user-remote/index.ts +321 -0
  113. package/.versions/0.0.5/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  114. package/.versions/0.0.5/.pi/harnesses/coms/README.md +92 -0
  115. package/.versions/0.0.5/.pi/harnesses/coms/index.ts +1745 -0
  116. package/.versions/0.0.5/.pi/harnesses/coms/package.json +7 -0
  117. package/.versions/0.0.5/.pi/harnesses/coms/version.ts +18 -0
  118. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/README.md +117 -0
  119. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/index.ts +536 -0
  120. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/package.json +7 -0
  121. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/version.ts +18 -0
  122. package/.versions/0.0.5/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  123. package/.versions/0.0.5/.pi/harnesses/lib/herdr-client.ts +458 -0
  124. package/.versions/0.0.5/.pi/harnesses/lib/herdr-presence.ts +288 -0
  125. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  126. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
  127. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  128. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-socket.ts +118 -0
  129. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  130. package/.versions/0.0.5/.pi/harnesses/package-lock.json +35 -0
  131. package/.versions/0.0.5/.pi/harnesses/package.json +9 -0
  132. package/.versions/0.0.5/.pi/prompts/build.md +24 -0
  133. package/.versions/0.0.5/.pi/prompts/code-simplify.md +22 -0
  134. package/.versions/0.0.5/.pi/prompts/doctor-agent-fleet.md +15 -0
  135. package/.versions/0.0.5/.pi/prompts/plan.md +16 -0
  136. package/.versions/0.0.5/.pi/prompts/review.md +16 -0
  137. package/.versions/0.0.5/.pi/prompts/set-hermes-telegram.md +15 -0
  138. package/.versions/0.0.5/.pi/prompts/setup-agent-fleet.md +27 -0
  139. package/.versions/0.0.5/.pi/prompts/ship.md +17 -0
  140. package/.versions/0.0.5/.pi/prompts/spec.md +15 -0
  141. package/.versions/0.0.5/.pi/prompts/test.md +19 -0
  142. package/.versions/0.0.5/.pi/skills/bowser/SKILL.md +145 -0
  143. package/.versions/0.0.5/.version +1 -0
  144. package/.versions/0.0.5/agents/architect.md +23 -0
  145. package/.versions/0.0.5/agents/bowser.md +26 -0
  146. package/.versions/0.0.5/agents/builder.md +53 -0
  147. package/.versions/0.0.5/agents/code-reviewer.md +205 -0
  148. package/.versions/0.0.5/agents/deep-researcher.md +31 -0
  149. package/.versions/0.0.5/agents/documenter.md +18 -0
  150. package/.versions/0.0.5/agents/orchestrator.md +54 -0
  151. package/.versions/0.0.5/agents/plan-reviewer.md +60 -0
  152. package/.versions/0.0.5/agents/planner.md +69 -0
  153. package/.versions/0.0.5/agents/releaser.md +24 -0
  154. package/.versions/0.0.5/agents/researcher.md +28 -0
  155. package/.versions/0.0.5/agents/security-auditor.md +166 -0
  156. package/.versions/0.0.5/agents/test-engineer.md +151 -0
  157. package/.versions/0.0.5/agents/web-debugger.md +42 -0
  158. package/.versions/0.0.5/agents/web-performance-auditor.md +192 -0
  159. package/.versions/0.0.5/codex/CONDUCTOR.md +148 -0
  160. package/.versions/0.0.5/docs/ARCHITECTURE.md +210 -0
  161. package/.versions/0.0.5/docs/agent-fleet-setup.md +366 -0
  162. package/.versions/0.0.5/docs/claude-code-coms-bridge.md +103 -0
  163. package/.versions/0.0.5/docs/codex-remote-conductor.md +170 -0
  164. package/.versions/0.0.5/docs/coms-hermes-bridge.md +179 -0
  165. package/.versions/0.0.5/docs/getting-started.md +183 -0
  166. package/.versions/0.0.5/docs/npm-install.md +337 -0
  167. package/.versions/0.0.5/docs/opencode-setup.md +249 -0
  168. package/.versions/0.0.5/docs/pi-extensions.md +293 -0
  169. package/.versions/0.0.5/docs/pi-setup.md +472 -0
  170. package/.versions/0.0.5/docs/skill-anatomy.md +150 -0
  171. package/.versions/0.0.5/hermes/README.md +231 -0
  172. package/.versions/0.0.5/hermes/skills/hub-conductor/SKILL.md +84 -0
  173. package/.versions/0.0.5/hermes/skills/hub-liaison/SKILL.md +84 -0
  174. package/.versions/0.0.5/hooks/SIMPLIFY-IGNORE.md +90 -0
  175. package/.versions/0.0.5/hooks/coms-stop-hook.mjs +73 -0
  176. package/.versions/0.0.5/hooks/hooks.json +14 -0
  177. package/.versions/0.0.5/hooks/session-start.sh +74 -0
  178. package/.versions/0.0.5/hooks/simplify-ignore.sh +302 -0
  179. package/.versions/0.0.5/justfile +245 -0
  180. package/.versions/0.0.5/references/accessibility-checklist.md +160 -0
  181. package/.versions/0.0.5/references/definition-of-done.md +67 -0
  182. package/.versions/0.0.5/references/fleet-coordination-patterns.md +151 -0
  183. package/.versions/0.0.5/references/observability-checklist.md +91 -0
  184. package/.versions/0.0.5/references/orchestration-patterns.md +370 -0
  185. package/.versions/0.0.5/references/performance-checklist.md +153 -0
  186. package/.versions/0.0.5/references/prompting-patterns.md +380 -0
  187. package/.versions/0.0.5/references/security-checklist.md +179 -0
  188. package/.versions/0.0.5/references/testing-patterns.md +236 -0
  189. package/.versions/0.0.5/scripts/codex-conductor.ts +41 -0
  190. package/.versions/0.0.5/scripts/codex-remote-control.ts +167 -0
  191. package/.versions/0.0.5/scripts/coms-claude-bridge.ts +286 -0
  192. package/.versions/0.0.5/scripts/coms-cli.ts +484 -0
  193. package/.versions/0.0.5/scripts/coms-hermes-bridge.ts +413 -0
  194. package/.versions/0.0.5/scripts/fleet.ts +141 -0
  195. package/.versions/0.0.5/scripts/hermes-monitor-capability-runner.ts +25 -0
  196. package/.versions/0.0.5/scripts/hermes-monitor-scenario.ts +7 -0
  197. package/.versions/0.0.5/scripts/lib/claude-bridge-core.ts +100 -0
  198. package/.versions/0.0.5/scripts/lib/codex-conductor.ts +88 -0
  199. package/.versions/0.0.5/scripts/lib/codex-remote-control.ts +480 -0
  200. package/.versions/0.0.5/scripts/lib/coms-envelope.ts +539 -0
  201. package/.versions/0.0.5/scripts/lib/fake-herdr-server.ts +88 -0
  202. package/.versions/0.0.5/scripts/lib/fleet-command.ts +109 -0
  203. package/.versions/0.0.5/scripts/lib/herdr-layout.ts +263 -0
  204. package/.versions/0.0.5/scripts/lib/hermes-bridge-core.ts +241 -0
  205. package/.versions/0.0.5/scripts/lib/hermes-monitor-herdr.ts +2 -0
  206. package/.versions/0.0.5/scripts/lib/hermes-monitor-model.ts +3 -0
  207. package/.versions/0.0.5/scripts/lib/hermes-monitor-registry.ts +2 -0
  208. package/.versions/0.0.5/scripts/lib/hermes-monitor-socket.ts +2 -0
  209. package/.versions/0.0.5/scripts/lib/hermes-monitor-store.ts +2 -0
  210. package/.versions/0.0.5/scripts/lib/persona-banner.ts +62 -0
  211. package/.versions/0.0.5/scripts/lib/spawn-stagger.ts +101 -0
  212. package/.versions/0.0.5/scripts/lib/team-project.ts +191 -0
  213. package/.versions/0.0.5/scripts/lib/team-snapshot.ts +147 -0
  214. package/.versions/0.0.5/scripts/peer-banner.ts +40 -0
  215. package/.versions/0.0.5/scripts/team-snapshot.ts +237 -0
  216. package/.versions/0.0.5/scripts/team-up.ts +351 -0
  217. package/.versions/0.0.5/skills/_internal/grilling.md +11 -0
  218. package/.versions/0.0.5/skills/browser-testing-with-devtools/SKILL.md +352 -0
  219. package/.versions/0.0.5/skills/code-review-and-quality/SKILL.md +381 -0
  220. package/.versions/0.0.5/skills/compound-learning/SKILL.md +137 -0
  221. package/.versions/0.0.5/skills/context-engineering/SKILL.md +291 -0
  222. package/.versions/0.0.5/skills/deprecation-and-migration/SKILL.md +206 -0
  223. package/.versions/0.0.5/skills/designing-agents/SKILL.md +394 -0
  224. package/.versions/0.0.5/skills/designing-agents/pi-harness-authoring.md +222 -0
  225. package/.versions/0.0.5/skills/frontend-ui-engineering/SKILL.md +328 -0
  226. package/.versions/0.0.5/skills/git-workflow-and-versioning/SKILL.md +316 -0
  227. package/.versions/0.0.5/skills/guided-workspace-setup/SKILL.md +542 -0
  228. package/.versions/0.0.5/skills/guided-workspace-setup/companion-manifest.json +35 -0
  229. package/.versions/0.0.5/skills/idea-refine/SKILL.md +182 -0
  230. package/.versions/0.0.5/skills/idea-refine/examples.md +238 -0
  231. package/.versions/0.0.5/skills/idea-refine/frameworks.md +99 -0
  232. package/.versions/0.0.5/skills/idea-refine/refinement-criteria.md +113 -0
  233. package/.versions/0.0.5/skills/idea-refine/scripts/idea-refine.sh +15 -0
  234. package/.versions/0.0.5/skills/incremental-implementation/SKILL.md +287 -0
  235. package/.versions/0.0.5/skills/interview-me/SKILL.md +226 -0
  236. package/.versions/0.0.5/skills/orchestration-verification/SKILL.md +181 -0
  237. package/.versions/0.0.5/skills/peer-coms/SKILL.md +90 -0
  238. package/.versions/0.0.5/skills/performance-optimization/SKILL.md +350 -0
  239. package/.versions/0.0.5/skills/planning-and-task-breakdown/SKILL.md +236 -0
  240. package/.versions/0.0.5/skills/security-and-hardening/SKILL.md +461 -0
  241. package/.versions/0.0.5/skills/spec-driven-development/SKILL.md +245 -0
  242. package/.versions/0.0.5/skills/using-agent-skills/SKILL.md +199 -0
  243. package/.versions/0.0.5/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  244. package/.versions/0.0.5/vendor/agent-skills-upstream/LICENSE +21 -0
  245. package/.versions/0.0.5/vendor/agent-skills-upstream/README.md +11 -0
  246. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  247. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  248. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  249. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  250. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  251. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  252. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  253. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  254. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  255. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  256. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  257. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  258. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  259. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  260. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  261. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  262. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  263. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  264. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  265. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  266. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  267. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  268. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  269. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  270. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  271. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  272. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  273. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  274. package/CHANGELOG.md +9 -0
  275. package/README.md +14 -13
  276. package/bin/cli.js +83 -1
  277. package/bin/lib/set-hermes-telegram.js +323 -0
  278. package/docs/ARCHITECTURE.md +4 -4
  279. package/docs/agent-fleet-setup.md +1 -1
  280. package/docs/claude-code-coms-bridge.md +4 -4
  281. package/docs/codex-remote-conductor.md +12 -12
  282. package/docs/coms-hermes-bridge.md +62 -4
  283. package/docs/getting-started.md +4 -4
  284. package/docs/opencode-setup.md +1 -0
  285. package/docs/pi-extensions.md +30 -25
  286. package/docs/pi-setup.md +17 -8
  287. package/hermes/README.md +14 -11
  288. package/justfile +141 -152
  289. package/package.json +6 -3
  290. package/references/fleet-coordination-patterns.md +1 -1
  291. package/scripts/coms-hermes-bridge.ts +18 -8
  292. package/scripts/fleet.ts +141 -0
  293. package/scripts/lib/fleet-command.ts +109 -0
  294. package/scripts/lib/hermes-bridge-core.ts +5 -2
  295. package/scripts/lib/hermes-monitor-herdr.ts +2 -28
  296. package/scripts/lib/hermes-monitor-model.ts +3 -9
  297. package/scripts/lib/hermes-monitor-registry.ts +2 -6
  298. package/scripts/lib/hermes-monitor-socket.ts +2 -118
  299. package/scripts/lib/hermes-monitor-store.ts +2 -31
  300. package/scripts/lib/team-project.ts +10 -3
  301. package/scripts/team-snapshot.ts +4 -5
  302. package/scripts/team-up.ts +24 -6
  303. package/skills/guided-workspace-setup/SKILL.md +13 -6
  304. package/skills/guided-workspace-setup/companion-manifest.json +3 -1
  305. package/skills/peer-coms/SKILL.md +1 -1
  306. package/hermes/plugins/agent-fleet-monitor/dashboard/dist/index.js +0 -10
  307. /package/{hermes → .versions/0.0.5/hermes}/desktop-plugins/agent-fleet-monitor/plugin.js +0 -0
  308. /package/{hermes → .versions/0.0.5/hermes}/desktop-plugins/agent-fleet-monitor/state.js +0 -0
  309. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +0 -0
  310. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +0 -0
  311. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +0 -0
  312. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +0 -0
  313. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +0 -0
  314. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +0 -0
  315. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +0 -0
  316. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter.py +0 -0
  317. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/adapter.test.py +0 -0
  318. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/manifest.json +0 -0
  319. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +0 -0
  320. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/plugin_api.py +0 -0
  321. /package/{hermes → .versions/0.0.5/hermes}/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +0 -0
@@ -0,0 +1,323 @@
1
+ import { createHash, randomUUID } from "node:crypto";
2
+ import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync } from "node:fs";
3
+ import { isAbsolute, join, relative, resolve } from "node:path";
4
+ import { spawnSync } from "node:child_process";
5
+
6
+ const TELEGRAM_ID_RE = /^\d+(?::\d+)?$/;
7
+ const SAFE_NAME_RE = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
8
+ const BRIDGE_LABEL = "hermes-bridge";
9
+ const LIAISON_SKILL = "hub-liaison";
10
+
11
+ function usageError(detail) {
12
+ return new Error(`${detail}\nUsage:\n agent-fleet set-hermes-telegram install [--profile NAME] [--force] [--restart]\n agent-fleet set-hermes-telegram status [--profile NAME]\n agent-fleet set-hermes-telegram <on|off> <telegram-id[:topic-id]> [--profile NAME]`);
13
+ }
14
+
15
+ export function parseSetHermesTelegramArgs(argv) {
16
+ const [action, telegramId, ...extra] = argv;
17
+ if (["install", "status"].includes(action) && telegramId === undefined && extra.length === 0) return { action };
18
+ if (!["on", "off"].includes(action) || telegramId === undefined || extra.length > 0) {
19
+ throw usageError("Expected install, status, or an on/off action with one Telegram ID.");
20
+ }
21
+ if (!TELEGRAM_ID_RE.test(telegramId)) {
22
+ throw usageError("Telegram ID must be digits, optionally followed by a colon and a numeric topic ID.");
23
+ }
24
+ return { action, telegramId, target: `telegram:${telegramId}` };
25
+ }
26
+
27
+ function validateSafeName(value, label) {
28
+ if (!SAFE_NAME_RE.test(value) || value === "." || value.includes("..")) {
29
+ throw new Error(`Invalid ${label}: ${JSON.stringify(value)}`);
30
+ }
31
+ return value;
32
+ }
33
+
34
+ function validateProject(project) {
35
+ return validateSafeName(project, "project inferred from the current pane");
36
+ }
37
+
38
+ export function inferProjectFromProcessInfo(response, env = process.env) {
39
+ const processes = response?.result?.process_info?.foreground_processes ?? [];
40
+ for (const processInfo of processes) {
41
+ const argv = Array.isArray(processInfo?.argv) ? processInfo.argv : [];
42
+ for (let i = 0; i < argv.length; i++) {
43
+ if (argv[i] === "--project" && typeof argv[i + 1] === "string") return validateProject(argv[i + 1]);
44
+ if (typeof argv[i] === "string" && argv[i].startsWith("--project=")) {
45
+ return validateProject(argv[i].slice("--project=".length));
46
+ }
47
+ }
48
+ }
49
+ const envProject = env.PI_COMS_PROJECT?.trim();
50
+ return validateProject(envProject || "default");
51
+ }
52
+
53
+ function shellQuote(value) {
54
+ return `'${String(value).replaceAll("'", `'"'"'`)}'`;
55
+ }
56
+
57
+ export function parseHerdrOutput(stdout) {
58
+ const text = stdout.trim();
59
+ if (!text) return { result: {} };
60
+ return JSON.parse(text);
61
+ }
62
+
63
+ function runCommand(command, args) {
64
+ const result = spawnSync(command, args, { encoding: "utf8" });
65
+ if (result.error) throw new Error(`failed to run ${command}: ${result.error.message}`);
66
+ if (result.status !== 0) throw new Error((result.stderr || result.stdout).trim() || `${command} ${args.join(" ")} failed`);
67
+ return { stdout: result.stdout, stderr: result.stderr };
68
+ }
69
+
70
+ export function runHerdrCommand(args) {
71
+ const result = runCommand("herdr", args);
72
+ try {
73
+ return parseHerdrOutput(result.stdout);
74
+ } catch {
75
+ throw new Error(`herdr returned invalid JSON for ${args.slice(0, 2).join(" ")}`);
76
+ }
77
+ }
78
+
79
+ export function runHermesCommand(args) {
80
+ return runCommand("hermes", args).stdout;
81
+ }
82
+
83
+ function stripAnsi(text) {
84
+ return text.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g, "");
85
+ }
86
+
87
+ export function parseRunningGatewayProfiles(output) {
88
+ const profiles = [];
89
+ for (const line of stripAnsi(output).split("\n")) {
90
+ const match = line.match(/^\s*✓\s+([A-Za-z0-9][A-Za-z0-9._-]*)(?:\s|$)/u);
91
+ if (match) profiles.push(match[1]);
92
+ }
93
+ return profiles;
94
+ }
95
+
96
+ export function parseProfilePath(output, expectedProfile) {
97
+ const clean = stripAnsi(output);
98
+ const profile = clean.match(/^Profile:\s*(\S+)\s*$/m)?.[1];
99
+ const profilePath = clean.match(/^Path:\s*(.+?)\s*$/m)?.[1];
100
+ if (profile !== expectedProfile || !profilePath || !isAbsolute(profilePath)) {
101
+ throw new Error(`Hermes returned an invalid profile description for ${expectedProfile}`);
102
+ }
103
+ return resolve(profilePath);
104
+ }
105
+
106
+ function directoryFingerprint(root) {
107
+ if (!existsSync(root)) return null;
108
+ const hash = createHash("sha256");
109
+ function visit(current) {
110
+ const stat = lstatSync(current);
111
+ if (stat.isSymbolicLink()) throw new Error(`refusing symlink in Hermes skill tree: ${current}`);
112
+ if (stat.isDirectory()) {
113
+ for (const name of readdirSync(current).sort()) visit(join(current, name));
114
+ return;
115
+ }
116
+ if (!stat.isFile()) throw new Error(`unsupported entry in Hermes skill tree: ${current}`);
117
+ const rel = relative(root, current);
118
+ hash.update(rel); hash.update("\0"); hash.update(readFileSync(current)); hash.update("\0");
119
+ }
120
+ visit(root);
121
+ return hash.digest("hex");
122
+ }
123
+
124
+ function skillState(sourceDir, installedDir) {
125
+ const sourceFingerprint = directoryFingerprint(sourceDir);
126
+ if (!sourceFingerprint) throw new Error(`packaged ${LIAISON_SKILL} source is missing: ${sourceDir}`);
127
+ const installedFingerprint = directoryFingerprint(installedDir);
128
+ return {
129
+ state: installedFingerprint === null ? "missing" : installedFingerprint === sourceFingerprint ? "current" : "drifted",
130
+ sourceFingerprint,
131
+ installedFingerprint,
132
+ };
133
+ }
134
+
135
+ function parseSkillEnabled(output) {
136
+ return stripAnsi(output).split("\n").some((line) => line.includes(LIAISON_SKILL) && /\benabled\b/i.test(line));
137
+ }
138
+
139
+ export function parseTelegramToolReadiness(output) {
140
+ const clean = stripAnsi(output);
141
+ const enabled = (name) => new RegExp(`^\\s*✓\\s+enabled\\s+${name}\\b`, "m").test(clean);
142
+ return { terminal: enabled("terminal"), file: enabled("file") };
143
+ }
144
+
145
+ async function resolveHermesProfile(requestedProfile, hermes) {
146
+ const gatewaysOutput = await hermes(["gateway", "list"]);
147
+ const runningProfiles = parseRunningGatewayProfiles(gatewaysOutput);
148
+ let profile = requestedProfile?.trim();
149
+ if (profile) validateSafeName(profile, "Hermes profile");
150
+ else {
151
+ if (runningProfiles.length !== 1) {
152
+ throw new Error(`cannot infer Hermes profile: expected exactly one running gateway, found ${runningProfiles.length}; pass --profile NAME`);
153
+ }
154
+ [profile] = runningProfiles;
155
+ }
156
+ const profileOutput = await hermes(["profile", "show", profile]);
157
+ const profilePath = parseProfilePath(profileOutput, profile);
158
+ if (!existsSync(profilePath) || !lstatSync(profilePath).isDirectory() || lstatSync(profilePath).isSymbolicLink()) {
159
+ throw new Error(`unsafe or missing Hermes profile directory: ${profilePath}`);
160
+ }
161
+ return { profile, profilePath, gatewayRunning: runningProfiles.includes(profile) };
162
+ }
163
+
164
+ export async function inspectHermesTelegram(options) {
165
+ const hermes = options.hermes ?? (async (args) => runHermesCommand(args));
166
+ const resolvedProfile = await resolveHermesProfile(options.profile, hermes);
167
+ const sourceDir = options.skillSourceDir ?? join(options.packageRoot, "hermes", "skills", LIAISON_SKILL);
168
+ const installedDir = join(resolvedProfile.profilePath, "skills", LIAISON_SKILL);
169
+ const skill = skillState(sourceDir, installedDir);
170
+ const [skillsOutput, toolsOutput] = await Promise.all([
171
+ hermes(["--profile", resolvedProfile.profile, "skills", "list", "--enabled-only"]),
172
+ hermes(["--profile", resolvedProfile.profile, "tools", "list", "--platform", "telegram"]),
173
+ ]);
174
+ const tools = parseTelegramToolReadiness(toolsOutput);
175
+ const skillEnabled = parseSkillEnabled(skillsOutput);
176
+ return {
177
+ ...resolvedProfile,
178
+ sourceDir,
179
+ installedDir,
180
+ skillState: skill.state,
181
+ skillEnabled,
182
+ tools,
183
+ ready: skill.state === "current" && skillEnabled && tools.terminal && tools.file && resolvedProfile.gatewayRunning,
184
+ };
185
+ }
186
+
187
+ function readinessError(status) {
188
+ const problems = [];
189
+ if (status.skillState !== "current") problems.push(`${LIAISON_SKILL} is ${status.skillState}`);
190
+ if (!status.skillEnabled) problems.push(`${LIAISON_SKILL} is not enabled`);
191
+ if (!status.tools.terminal || !status.tools.file) problems.push("Telegram terminal/file tools are not both enabled");
192
+ if (!status.gatewayRunning) problems.push(`gateway profile ${status.profile} is not running`);
193
+ return `${problems.join("; ")}. Run: agent-fleet set-hermes-telegram install --profile ${status.profile}${status.skillState === "drifted" ? " --force" : ""}`;
194
+ }
195
+
196
+ function backupName(now) {
197
+ return `${LIAISON_SKILL}-${now().toISOString().replace(/[:.]/g, "-")}`;
198
+ }
199
+
200
+ function ensurePlainDirectory(dir, parent) {
201
+ if (existsSync(dir)) {
202
+ const stat = lstatSync(dir);
203
+ if (stat.isSymbolicLink() || !stat.isDirectory()) throw new Error(`refusing unsafe Hermes directory: ${dir}`);
204
+ return;
205
+ }
206
+ if (parent) ensurePlainDirectory(parent);
207
+ mkdirSync(dir, { mode: 0o700 });
208
+ }
209
+
210
+ function atomicInstallSkill(sourceDir, installedDir, profilePath, now) {
211
+ const skillsDir = join(profilePath, "skills");
212
+ ensurePlainDirectory(skillsDir, profilePath);
213
+ const tempDir = join(skillsDir, `.${LIAISON_SKILL}.tmp-${process.pid}-${randomUUID()}`);
214
+ const backupRoot = join(profilePath, "backups", "agent-fleet");
215
+ let backupDir = null;
216
+ try {
217
+ cpSync(sourceDir, tempDir, { recursive: true, errorOnExist: true, force: false });
218
+ directoryFingerprint(tempDir);
219
+ if (existsSync(installedDir)) {
220
+ ensurePlainDirectory(join(profilePath, "backups"), profilePath);
221
+ ensurePlainDirectory(backupRoot, join(profilePath, "backups"));
222
+ backupDir = join(backupRoot, backupName(now));
223
+ renameSync(installedDir, backupDir);
224
+ }
225
+ renameSync(tempDir, installedDir);
226
+ return backupDir;
227
+ } catch (error) {
228
+ rmSync(tempDir, { recursive: true, force: true });
229
+ if (backupDir && existsSync(backupDir) && !existsSync(installedDir)) renameSync(backupDir, installedDir);
230
+ throw error;
231
+ }
232
+ }
233
+
234
+ export async function installHermesTelegram(options) {
235
+ const hermes = options.hermes ?? (async (args) => runHermesCommand(args));
236
+ const before = await inspectHermesTelegram({ ...options, hermes });
237
+ if (before.skillState === "drifted" && !options.force) {
238
+ throw new Error(`${LIAISON_SKILL} differs from the packaged Agent Fleet version in profile ${before.profile}; re-run with --force to back it up and replace it`);
239
+ }
240
+ let backupDir = null;
241
+ let changed = false;
242
+ if (before.skillState !== "current") {
243
+ backupDir = atomicInstallSkill(before.sourceDir, before.installedDir, before.profilePath, options.now ?? (() => new Date()));
244
+ changed = true;
245
+ }
246
+ const after = await inspectHermesTelegram({ ...options, profile: before.profile, hermes });
247
+ if (after.skillState !== "current") throw new Error(`${LIAISON_SKILL} verification failed after install`);
248
+ let restarted = false;
249
+ if (options.restart && after.gatewayRunning) {
250
+ await hermes(["--profile", after.profile, "gateway", "restart"]);
251
+ restarted = true;
252
+ }
253
+ return {
254
+ action: "install",
255
+ profile: after.profile,
256
+ profilePath: after.profilePath,
257
+ skillState: after.skillState,
258
+ skillEnabled: after.skillEnabled,
259
+ tools: after.tools,
260
+ gatewayRunning: after.gatewayRunning,
261
+ ready: after.skillEnabled && after.tools.terminal && after.tools.file && after.gatewayRunning,
262
+ changed,
263
+ backupDir,
264
+ restarted,
265
+ restartRequired: changed && after.gatewayRunning && !restarted,
266
+ };
267
+ }
268
+
269
+ async function controlBridge(options, parsed) {
270
+ const herdr = options.herdr ?? (async (args) => runHerdrCommand(args));
271
+ const currentPaneId = options.currentPaneId;
272
+ if (!currentPaneId) throw new Error("HERDR_PANE_ID is required; run this command inside a Herdr pane");
273
+
274
+ let hermesProfile = null;
275
+ if (parsed.action === "on") {
276
+ const status = await inspectHermesTelegram(options);
277
+ if (!status.ready) throw new Error(readinessError(status));
278
+ hermesProfile = status.profile;
279
+ }
280
+
281
+ const currentResponse = await herdr(["pane", "get", currentPaneId]);
282
+ const currentPane = currentResponse?.result?.pane;
283
+ if (!currentPane?.workspace_id) throw new Error(`cannot resolve workspace for current pane ${currentPaneId}`);
284
+ const workspaceId = currentPane.workspace_id;
285
+ const processInfo = await herdr(["pane", "process-info", "--pane", currentPaneId]);
286
+ const project = inferProjectFromProcessInfo(processInfo, options.env);
287
+ const list = await herdr(["pane", "list", "--workspace", workspaceId]);
288
+ const bridgePanes = (list?.result?.panes ?? []).filter((pane) => pane.label === BRIDGE_LABEL && pane.pane_id !== currentPaneId);
289
+ for (const pane of bridgePanes) await herdr(["pane", "close", pane.pane_id]);
290
+
291
+ if (parsed.action === "off") {
292
+ return { action: "off", closedPaneIds: bridgePanes.map((pane) => pane.pane_id), project, target: parsed.target, workspaceId };
293
+ }
294
+
295
+ const split = await herdr(["pane", "split", currentPaneId, "--direction", "right", "--ratio", "0.3", "--cwd", currentPane.cwd || process.cwd(), "--no-focus"]);
296
+ const paneId = split?.result?.pane?.pane_id;
297
+ if (!paneId) throw new Error("herdr did not return the new bridge pane ID");
298
+ try {
299
+ await herdr(["pane", "rename", paneId, BRIDGE_LABEL]);
300
+ const command = [
301
+ shellQuote(process.execPath), "--experimental-strip-types",
302
+ shellQuote(join(options.packageRoot, "scripts", "coms-hermes-bridge.ts")),
303
+ "--project", shellQuote(project), "--hermes-profile", shellQuote(hermesProfile),
304
+ "--timeout", "1800000", "--to", shellQuote(parsed.target),
305
+ ].join(" ");
306
+ await herdr(["pane", "run", paneId, command]);
307
+ } catch (error) {
308
+ await herdr(["pane", "close", paneId]).catch(() => {});
309
+ throw error;
310
+ }
311
+ return { action: "on", hermesProfile, paneId, project, target: parsed.target, workspaceId };
312
+ }
313
+
314
+ export async function setHermesTelegram(options) {
315
+ const positionals = options.positionals ?? [options.action, options.telegramId].filter((value) => value !== undefined);
316
+ const parsed = parseSetHermesTelegramArgs(positionals);
317
+ if (parsed.action !== "install" && (options.force || options.restart)) {
318
+ throw usageError("--force and --restart are valid only with install.");
319
+ }
320
+ if (parsed.action === "status") return { action: "status", ...(await inspectHermesTelegram(options)) };
321
+ if (parsed.action === "install") return installHermesTelegram(options);
322
+ return controlBridge(options, parsed);
323
+ }
@@ -13,7 +13,7 @@ the runtime responsibilities and where each module lives in the repository.
13
13
  | **coms** | Peer communication protocol/data plane — envelope-based P2P messaging between agents | `.pi/harnesses/coms/`, `scripts/lib/coms-envelope.ts`, `scripts/coms-cli.ts` |
14
14
  | **Claude Code bridge** | Makes an interactive Claude Code pane a bidirectional coms peer | `scripts/coms-claude-bridge.ts`, `hooks/coms-stop-hook.mjs`, `skills/peer-coms/` — see [claude-code-coms-bridge.md](claude-code-coms-bridge.md) |
15
15
  | **Hermes bridge** | Remote human control — relays hub questions to Telegram, races phone vs. local answers, conductor/liaison skills | `scripts/coms-hermes-bridge.ts`, `.pi/harnesses/ask-user-remote/`, `hermes/skills/` — see [coms-hermes-bridge.md](coms-hermes-bridge.md) |
16
- | **Hermes local monitor transport** | Local, authenticated visibility/control contract for hub-owned task generations; presentation is supplied by an external consumer | `.pi/harnesses/agent-hub/monitor-*.ts`, `scripts/lib/hermes-monitor-{model,store,registry,socket}.ts` — see [Hermes artifacts](../hermes/README.md#local-agent-hub-monitor-integration) |
16
+ | **Hermes local monitor transport** | Local, authenticated visibility/control contract for hub-owned task generations; presentation is supplied by an external consumer | `.pi/harnesses/agent-hub/monitor-*.ts`, `.pi/harnesses/lib/hermes-monitor-{model,store,registry,socket}.ts` (with compatibility re-exports under `scripts/lib/`) — see [Hermes artifacts](../hermes/README.md#local-agent-hub-monitor-integration) |
17
17
  | **Codex remote-control conductor** | Experimental outbound-only, user-systemd-managed Android conductor; verified on Codex CLI 0.144.x | `scripts/codex-remote-control.ts`, `scripts/codex-conductor.ts`, `codex/CONDUCTOR.md`, `systemd/user/`; runtime under `~/.local/state/agent-fleet/codex-conductor/` — see [codex-remote-conductor.md](codex-remote-conductor.md) |
18
18
  | **Skill library** | Lifecycle workflows and quality gates every agent follows | `skills/` (native) + `vendor/agent-skills-upstream/skills/` (vendored) — see [UPSTREAM-SKILLS.md](UPSTREAM-SKILLS.md) |
19
19
  | **Personas** | Reusable specialist definitions, transformed per harness | `agents/`, `bin/lib/transform-persona.js` |
@@ -26,7 +26,7 @@ Agent Fleet is layered on purpose. Work flows **down** (delegate); evidence and
26
26
  flowchart TD
27
27
  You(["You · Hermes inbound relay · Codex outbound conductor on your phone"])
28
28
 
29
- subgraph HUBL["HUB — thin dispatcher (just hub · just hub-team)"]
29
+ subgraph HUBL["HUB — thin dispatcher (just fleet hub · just fleet team)"]
30
30
  Hub["agent-hub harness + orchestrator persona<br/>routes tasks · owns the Verification Contract on disk<br/>never swallows research dumps into its own context"]
31
31
  end
32
32
 
@@ -136,8 +136,8 @@ These are the external systems Agent Fleet assumes or integrates with — not np
136
136
 
137
137
  | Dependency | Role | Required? |
138
138
  | --- | --- | --- |
139
- | **[pi](https://github.com/badlogic/pi-mono)** (or your pi install) | Primary coding-agent runtime; loads harnesses, extensions, prompts, and personas | Yes for full fleet mode (`just hub`) |
140
- | **[herdr](https://herdr.dev)** | Workspace control plane: tiled peer panes, presence push events, team snapshot/resume | Yes for fleet recipes (`just team-up`, `just hub-team`, …); optional for solo hub |
139
+ | **[pi](https://github.com/badlogic/pi-mono)** (or your pi install) | Primary coding-agent runtime; loads harnesses, extensions, prompts, and personas | Yes for full fleet mode (`just fleet hub`) |
140
+ | **[herdr](https://herdr.dev)** | Workspace control plane: tiled peer panes, presence push events, team snapshot/resume | Yes for team mode (`just fleet team`); optional for `just fleet hub` |
141
141
  | **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** | First-class peer via the [coms bridge](claude-code-coms-bridge.md); also a supported install target for skills/personas | Optional peer / alternate harness |
142
142
  | **[OpenCode](https://opencode.ai)** | Skill-driven execution target (`AGENTS.md` + `skill` tool); `af-*` slash commands | Optional alternate harness |
143
143
  | **Hermes** | Remote human-in-the-loop (Telegram relay for hub questions) — [coms-hermes-bridge](coms-hermes-bridge.md) | Optional |
@@ -157,7 +157,7 @@ the environment nor declared in the workspace root `.env`.
157
157
 
158
158
  ### Per-peer env files (`env_file:` in peers.yaml)
159
159
 
160
- Fleet peers spawned by `just team-up` / `just hub-team` can carry their own
160
+ Fleet peers spawned by `just fleet team` can carry their own
161
161
  environment: an `env_file:` entry in `.pi/agents/peers.yaml` names a
162
162
  **repo-relative** KEY=VALUE file (same format as `.env`, no shell evaluation)
163
163
  that herdr injects into the peer's pane before the command runs — no `source`,
@@ -20,7 +20,7 @@ Claude Code ── Bash: coms-cli send/await ──▶ any pi peer (o
20
20
  | Envelope CLI | `scripts/coms-cli.ts` | `list` / `send` / `await` / `reply` — any process becomes a coms participant. `send --await` is a blocking round trip; plain `send` prints a `msg_id` and a detached waiter holds the reply for `await`. |
21
21
  | Stop hook | `hooks/coms-stop-hook.mjs` | PRIMARY completion path: writes each turn's final assistant message to `~/.pi/coms/claude-bridge/<pane>/last-message.json` (keyed by `HERDR_PANE_ID`). Exact text, no scraping. |
22
22
  | Skill | `skills/peer-coms/SKILL.md` | Teaches Claude Code its peer role: discover with `coms-cli list`, ask with `send --await`, answer inbound prompts normally, never drive panes itself. |
23
- | Runner | `runner: claude-code` in `.pi/agents/peers.yaml` | `just team-up` spawns the Claude CLI + its bridge in one pane (`_claude-peer` recipe); `model:` maps to `claude --model`, team-resume maps the herdr-captured session id to `claude --resume`. |
23
+ | Runner | `runner: claude-code` in `.pi/agents/peers.yaml` | `just fleet team` spawns the Claude CLI + its bridge in one pane (`_claude-peer` internally); `model:` maps to `claude --model`, and `just fleet resume` maps the Herdr-captured session id to `claude --resume`. |
24
24
 
25
25
  ## Setup
26
26
 
@@ -43,7 +43,7 @@ Claude Code ── Bash: coms-cli send/await ──▶ any pi peer (o
43
43
  is a peer and how to use `coms-cli`.
44
44
 
45
45
  3. **Spawn:** either add a `runner: claude-code` peer to a peers.yaml team and
46
- `just team-up <team>`, or attach a bridge to an existing herdr Claude pane:
46
+ `just fleet team <team> --no-hub`, or attach a bridge to an existing Herdr Claude pane:
47
47
 
48
48
  ```bash
49
49
  node --experimental-strip-types scripts/coms-claude-bridge.ts --name claude-main
@@ -53,9 +53,9 @@ Claude Code ── Bash: coms-cli send/await ──▶ any pi peer (o
53
53
  ## Demo scenario (verified live)
54
54
 
55
55
  ```bash
56
- just team-up docs # pi peers up
56
+ just fleet team docs --no-hub # Pi peers up
57
57
  # pane with: bridge (claude-main) + claude
58
- just hub # in another pane: the orchestrator
58
+ just fleet hub # in another pane: the orchestrator
59
59
  # from the hub (or any shell):
60
60
  node --experimental-strip-types scripts/coms-cli.ts send claude-main \
61
61
  "Summarize the failing test output in artifacts/test.log" --await --timeout 300000
@@ -45,7 +45,7 @@ The loading mechanism uses a managed runtime contract at `$HOME/.local/state/age
45
45
  Run these recipes from the repository root. The helper rejects unsafe scope, invalid paths, unsupported Codex versions, and mismatched singleton configuration.
46
46
 
47
47
  ```bash
48
- just conductor-codex-setup docs --project af
48
+ just fleet conductor codex setup docs --project af
49
49
  ```
50
50
 
51
51
  The recipe resolves `codex`, the real repository root, and `$HOME/.pi/coms`, derives the isolated identity `codex-docs-conductor`, creates `$HOME/.local/state/agent-fleet/codex-conductor/workspace` outside the checkout and refreshes its owned contract copy with the absolute validated wrapper path. The lower-level `scripts/codex-remote-control.ts setup` command remains available for explicit integrations.
@@ -63,7 +63,7 @@ The unit is `Type=oneshot` with `RemainAfterExit=yes`, has no `Restart=` policy,
63
63
  Pair the mobile client manually in an interactive operator TTY, after setup. Any displayed pairing code is short-lived secret material:
64
64
 
65
65
  ```bash
66
- just conductor-codex-pair
66
+ just fleet conductor codex pair
67
67
  ```
68
68
 
69
69
  Do not pipe, tee, capture, transcribe, screenshot, or commit the output. Never put pairing material or Codex credentials in the unit or config.
@@ -71,22 +71,22 @@ Do not pipe, tee, capture, transcribe, screenshot, or commit the output. Never p
71
71
  ### Start, status, and conductor launch
72
72
 
73
73
  ```bash
74
- just conductor-codex-start
75
- just conductor-codex-status
76
- just conductor-codex docs --project af
74
+ just fleet conductor codex start
75
+ just fleet conductor codex status
76
+ just fleet conductor codex docs --project af
77
77
  ```
78
78
 
79
79
  `status` reports only requested systemd state. Actual usability must be checked from the paired client, without inventing a network probe. The control pane similarly reports requested state only. Legacy `conductor-codex-pilot*` aliases remain available for the initial 0.144.x rollout.
80
80
 
81
- ### Use with `hub-team` and Android
81
+ ### Use with `just fleet team` and Android
82
82
 
83
83
  The service does not start peers. Launch a hub/team in the exact project stored by setup:
84
84
 
85
85
  ```bash
86
- just hub-team docs --project af
86
+ just fleet team docs --project af
87
87
  ```
88
88
 
89
- Do not also run `just conductor-codex docs --project af` for the same team unless a second peer set is intentional. `conductor-codex` is the alternative control-pane-plus-team layout when no hub is needed.
89
+ Do not also run `just fleet conductor codex docs --project af` for the same team unless a second peer set is intentional. The conductor mode is the alternative control-pane-plus-team layout when no Hub is needed.
90
90
 
91
91
  In ChatGPT Android, open the paired Remote Control host and create a fresh thread using:
92
92
 
@@ -107,8 +107,8 @@ After confirmation, request approval for the exact wrapper send once.
107
107
  ### Stop, recovery, and reconfiguration
108
108
 
109
109
  ```bash
110
- just conductor-codex-stop
111
- just conductor-codex-recover
110
+ just fleet conductor codex stop
111
+ just fleet conductor codex recover
112
112
  ```
113
113
 
114
114
  Use recovery when the unit says `active (exited)` but the paired client is unavailable, or when an `ExecStart` failure left the unit in `failed`. It is an explicit operator-confirmed systemd stop/reset/preflight/start path, not a health probe. Plain `start` still refuses `failed` and directs the operator to recovery or uninstall. Stop and emergency stop safely clear a confirmed `failed` state; other ambiguous states refuse rather than guessing.
@@ -116,7 +116,7 @@ Use recovery when the unit says `active (exited)` but the paired client is unava
116
116
  To change the configured scope—or to upgrade an earlier in-checkout pilot runtime to the external user-state boundary—use `reconfigure` with the complete validated setup arguments, then explicitly stop/start as required. Do not edit the unit or config by hand:
117
117
 
118
118
  ```bash
119
- just conductor-codex-reconfigure docs --project af
119
+ just fleet conductor codex reconfigure docs --project af
120
120
  ```
121
121
 
122
122
  ### Stale Codex send lock
@@ -145,7 +145,7 @@ If that capability is absent, restore a supported `0.144.x` CLI before stopping
145
145
  Uninstall is explicit, operates only on the owned unit/config, accepts and clears a confirmed `failed` state, resets the loaded unit before deleting it, disables the service, reloads user systemd, and leaves Codex authentication and pairing state untouched:
146
146
 
147
147
  ```bash
148
- just conductor-codex-uninstall
148
+ just fleet conductor codex uninstall
149
149
  # After version drift, use the lower-level helper only if the exact current
150
150
  # stop capability is proved:
151
151
  node --experimental-strip-types scripts/codex-remote-control.ts uninstall \
@@ -15,7 +15,7 @@ Protocol contract for the Hermes ⇄ pi `coms` bridge. The first implemented dae
15
15
  ## user-remote topology
16
16
 
17
17
  1. A pi peer sends a coms `prompt` envelope to `user-remote`.
18
- 2. The bridge derives `qid` from `prompt.msg_id`, formats the question, and runs `hermes send --to <target> <message>` (`<target>` defaults to `telegram`).
18
+ 2. The bridge derives `qid` from `prompt.msg_id`, formats the question, and runs `hermes send --to <target> <message>` (`<target>` defaults to `telegram`). For a topic, copy the target accepted by `hermes send --list telegram`; depending on the Hermes output format, its `id` may already contain the `:<thread_id>` suffix, so do not append the thread twice.
19
19
  3. The human replies in Telegram; the Hermes gateway/liaison writes the answer file.
20
20
  4. The bridge polls the questions directory, validates the file, maps the answer, sends a coms `response` envelope, and removes the answer file.
21
21
 
@@ -32,6 +32,8 @@ Protocol contract for the Hermes ⇄ pi `coms` bridge. The first implemented dae
32
32
  ```text
33
33
  ❓ [HUB-Q:<qid>] <question>
34
34
 
35
+ 📁 Project: <coms-project>
36
+
35
37
  Context: <context, truncated if needed>
36
38
 
37
39
  Options:
@@ -41,7 +43,7 @@ Options:
41
43
  ↩ Reply to this message, or type: HUB-Q:<qid>: <answer>
42
44
  ```
43
45
 
44
- `Context:` is omitted when absent. `Options:` is omitted when no options are supplied. Context receives the remaining budget after the header, options, and reply instruction.
46
+ `Project:` is always present and comes from the bridge's validated `--project` scope, making simultaneous questions from different pools distinguishable. `Context:` is omitted when absent. `Options:` is omitted when no options are supplied. Context receives the remaining budget after the header, project, options, and reply instruction.
45
47
 
46
48
  ### Answer-file path, schema, and validation
47
49
 
@@ -93,12 +95,68 @@ Hermes can also act as the conductor without this daemon: use `coms-cli list` to
93
95
  Launch a visible conductor workspace with:
94
96
 
95
97
  ```bash
96
- just conductor docs # live herdr workspace: conductor pane + docs team panes
97
- just conductor-dry docs # no herdr calls; prints the planned layout JSON
98
+ just fleet conductor hermes docs # live conductor + team workspace
99
+ just fleet conductor hermes docs --dry-run # preview; no Herdr calls
98
100
  ```
99
101
 
100
102
  The live recipe reuses `scripts/team-up.ts --conductor`: it creates a normal herdr workspace labeled `<worktree-tag>-conductor-<team>` (the tag is the last dot-segment of the checkout's basename, so the same team from a different worktree gets its own workspace), places a `conductor` pane running `hermes -p dev`, and tiles the chosen team beside it. Team peers keep their normal coms harness and herdr presence reporting, so they continue to show agent state in the sidebar; Hermes' own herdr-agent-state plugin is responsible for the conductor pane's state.
101
103
 
104
+ ### `/set-hermes-telegram` bridge control
105
+
106
+ The outbound `hermes send` path needs a configured Telegram channel but no skill. Full reply round-trip additionally needs Agent Fleet's `hub-liaison` skill in the profile that owns the running Telegram gateway. From Pi or Claude Code use:
107
+
108
+ ```text
109
+ /set-hermes-telegram status --profile default
110
+ /set-hermes-telegram install --profile default
111
+ /set-hermes-telegram install --profile default --force --restart
112
+ /set-hermes-telegram on 7883056502:1735 --profile default
113
+ /set-hermes-telegram off 7883056502:1735
114
+ ```
115
+
116
+ OpenCode exposes `/af-set-hermes-telegram`; the arguments and backend are identical. The deterministic CLI can also be called directly with `agent-fleet set-hermes-telegram ...`.
117
+
118
+ #### `status` and profile resolution
119
+
120
+ `status` is read-only. It verifies the Hermes executable/profile, compares the complete installed `hub-liaison` tree to the version packaged with Agent Fleet, asks Hermes whether the skill is enabled, checks `terminal` and `file` toolsets for the `telegram` platform, and reports gateway state. `--profile <name>` is recommended. Without it the controller selects a profile only when `hermes gateway list` reports exactly one running gateway; zero or multiple running gateways fail closed and require an explicit profile.
121
+
122
+ #### `install`
123
+
124
+ `install` writes to `<Hermes-profile-path>/skills/hub-liaison`, where the profile path comes from `hermes profile show <name>` (important because the `default` profile is normally `~/.hermes`, while named profiles normally live below `~/.hermes/profiles/`). Installation behavior is:
125
+
126
+ - missing skill: copied atomically from the packaged Agent Fleet source;
127
+ - byte-identical tree: no-op;
128
+ - differing tree: refused unless `--force` is explicit;
129
+ - forced replacement: the previous tree is moved first to `<profile>/backups/agent-fleet/hub-liaison-<timestamp>`;
130
+ - symlinks or unsupported filesystem entries in either skill tree are refused;
131
+ - the installed tree is fingerprinted again, then `hermes --profile <name> skills list --enabled-only` and `tools list --platform telegram` are run for verification.
132
+
133
+ The command does not silently broaden Telegram tool permissions. If `terminal` or `file` is disabled, it prints the explicit remediation:
134
+
135
+ ```bash
136
+ hermes --profile <name> tools enable --platform telegram terminal file
137
+ ```
138
+
139
+ If the skill itself is disabled, use `hermes --profile <name> skills config`. A running gateway is restarted only with explicit `--restart`; otherwise the command prints the required restart command. A stopped gateway is never started as a side effect. No install/status/on/off action sends a test Telegram message.
140
+
141
+ #### `on` and `off`
142
+
143
+ `on` fails before touching Herdr unless the selected gateway is running, `hub-liaison` is current and enabled, and both required Telegram toolsets are enabled. It then closes any existing pane labeled `hermes-bridge` in the current workspace, creates a new right-hand pane in that **same Herdr workspace**, labels it `hermes-bridge`, and starts the daemon with `telegram:<id>` as its exact target. The selected profile is forwarded as `--hermes-profile`, so every question, timeout, cancel, and late-answer send executes as `hermes --profile <name> send ...` rather than silently falling back to Hermes' sticky default. `off` remains available even when Hermes readiness is broken, closes the bridge pane, creates nothing, and is idempotent.
144
+
145
+ The Telegram destination must contain digits only (`<chat_id>`) or two digit groups separated by one colon (`<chat_id>:<topic_id>`). Values such as `telegram:123`, `123:`, `123:456:789`, spaces, signs, and letters are rejected. The controller infers the coms project independently from the current hub process's explicit `--project`, then `PI_COMS_PROJECT`, then `default`.
146
+
147
+ The manual equivalent is:
148
+
149
+ ```bash
150
+ node --experimental-strip-types scripts/coms-hermes-bridge.ts \
151
+ --project af \
152
+ --hermes-profile default \
153
+ --timeout 1800000 \
154
+ --to 'telegram:<chat_id>:<thread_id>'
155
+ just fleet team docs --project af
156
+ ```
157
+
158
+ Repeated value flags such as two `--to` arguments are rejected at startup rather than silently selecting one destination. The `ask-user-remote` wrapper resolves the explicit Pi `--project` flag when the tool executes, so non-default hubs discover `user-remote` in their own pool.
159
+
102
160
  Hard boundary: the Hermes conductor must not run `herdr` commands, drive panes, create/kill workspaces, or manage fleet lifecycle. Herdr driving stays with the human/orchestrator so the damage-control model remains intact; see `.pi/damage-control-rules.yaml` for the authoritative no-herdr boundary. Hermes may only operate inside the project coms pool through the documented coms CLI commands.
103
161
 
104
162
  ## Hermes and the experimental Codex conductor
@@ -24,10 +24,10 @@ Linux/pi fleet users can pair Codex Remote Control with ChatGPT Android and dele
24
24
 
25
25
  ```bash
26
26
  cd /path/to/agent-fleet
27
- just conductor-codex-setup docs --project af
28
- just conductor-codex-pair
29
- just conductor-codex-start
30
- just hub-team docs --project af
27
+ just fleet conductor codex setup docs --project af
28
+ just fleet conductor codex pair
29
+ just fleet conductor codex start
30
+ just fleet team docs --project af
31
31
  ```
32
32
 
33
33
  The runtime contract is generated under `$HOME/.local/state/agent-fleet/codex-conductor/`, outside the checkout. Pairing is interactive secret-bearing output and must never be captured. Read the complete [Codex conductor runbook](codex-remote-conductor.md) before enabling the service.
@@ -101,6 +101,7 @@ This repo ships OpenCode-native commands with an `af-` prefix so they are easy t
101
101
  - `/af-prime`
102
102
  - `/af-setup-agent-fleet`
103
103
  - `/af-doctor-agent-fleet`
104
+ - `/af-set-hermes-telegram install|status|on|off …` — profile-aware Hermes liaison setup and bridge control
104
105
 
105
106
  These commands are optional shortcuts. The agent can still invoke the correct skills automatically from plain natural-language requests.
106
107