@chankov/agent-fleet 2.0.13 → 2.0.15

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 (1125) hide show
  1. package/.pi/agent-fleet/scripts/fleet.ts +2 -1
  2. package/.pi/extensions/compact-and-continue/README.md +2 -2
  3. package/.pi/harnesses/agent-hub/README.md +98 -10
  4. package/.pi/harnesses/agent-hub/budget-recovery.ts +2 -2
  5. package/.pi/harnesses/agent-hub/commands/context.ts +2 -0
  6. package/.pi/harnesses/agent-hub/commands/recover.ts +13 -4
  7. package/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  8. package/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  9. package/.pi/harnesses/agent-hub/context/budgets.ts +9 -7
  10. package/.pi/harnesses/agent-hub/deterministic-fs.ts +51 -12
  11. package/.pi/harnesses/agent-hub/dispatch-native-complete.ts +4 -0
  12. package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +14 -3
  13. package/.pi/harnesses/agent-hub/dispatch-native-types.ts +3 -0
  14. package/.pi/harnesses/agent-hub/dispatch-native.ts +9 -1
  15. package/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
  16. package/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +76 -0
  17. package/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  18. package/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  19. package/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  20. package/.pi/harnesses/agent-hub/docs-lane.js +2 -1
  21. package/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  22. package/.pi/harnesses/agent-hub/filesystem-tool.ts +75 -11
  23. package/.pi/harnesses/agent-hub/index.ts +284 -23
  24. package/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +13 -5
  25. package/.pi/harnesses/agent-hub/no-progress.ts +232 -28
  26. package/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
  27. package/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  28. package/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
  29. package/.pi/harnesses/agent-hub/package.json +1 -1
  30. package/.pi/harnesses/agent-hub/policy/work-mode.ts +14 -5
  31. package/.pi/harnesses/agent-hub/process-obligations.ts +116 -15
  32. package/.pi/harnesses/agent-hub/prompts/context.ts +1 -0
  33. package/.pi/harnesses/agent-hub/prompts/fragments.ts +9 -11
  34. package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +8 -1
  35. package/.pi/harnesses/agent-hub/recover-policy.ts +18 -1
  36. package/.pi/harnesses/agent-hub/recover-state.ts +1 -1
  37. package/.pi/harnesses/agent-hub/recovery-contract.ts +70 -0
  38. package/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  39. package/.pi/harnesses/agent-hub/research/runtime.ts +2 -0
  40. package/.pi/harnesses/agent-hub/research/spawn-run.ts +15 -6
  41. package/.pi/harnesses/agent-hub/return-contract.js +27 -5
  42. package/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  43. package/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  44. package/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  45. package/.pi/harnesses/agent-hub/run-budget.js +12 -0
  46. package/.pi/harnesses/agent-hub/scope-gate.js +23 -2
  47. package/.pi/harnesses/agent-hub/session-audit.ts +94 -8
  48. package/.pi/harnesses/agent-hub/spawn.ts +10 -2
  49. package/.pi/harnesses/agent-hub/system1-activity.ts +116 -1
  50. package/.pi/harnesses/agent-hub/system1-communication-store.ts +129 -0
  51. package/.pi/harnesses/agent-hub/system1-report.ts +50 -0
  52. package/.pi/harnesses/agent-hub/system1-runtime.ts +8 -4
  53. package/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
  54. package/.pi/harnesses/agent-hub/task-triage-config.ts +37 -0
  55. package/.pi/harnesses/agent-hub/task-triage-contract.ts +19 -0
  56. package/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
  57. package/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  58. package/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
  59. package/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  60. package/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  61. package/.pi/harnesses/agent-hub/tools/action-executors.ts +33 -10
  62. package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
  63. package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +10 -4
  64. package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +86 -26
  65. package/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  66. package/.pi/harnesses/agent-hub/tools/herdr-executors.ts +9 -0
  67. package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +37 -6
  68. package/.pi/harnesses/agent-hub/ui/fleet-source.ts +6 -2
  69. package/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  70. package/.pi/harnesses/agent-hub/work-mode.ts +14 -8
  71. package/.pi/harnesses/coms/package.json +1 -1
  72. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  73. package/.pi/harnesses/lib/context-budget-hub-prompt.ts +6 -1
  74. package/.pi/harnesses/lib/fleet-dashboard-view.ts +30 -5
  75. package/.pi/harnesses/lib/fleet-read-model.ts +73 -0
  76. package/.pi/harnesses/lib/fleet-strip-controller.ts +2 -1
  77. package/.pi/harnesses/lib/fleet-strip-view.ts +1 -1
  78. package/.pi/harnesses/lib/system1/demo.ts +2 -4
  79. package/.pi/harnesses/lib/system1/selection.js +11 -0
  80. package/.pi/prompts/af-build.md +9 -6
  81. package/.versions/2.0.14/.pi/agent-fleet/hermes/README.md +347 -0
  82. package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  83. package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  84. package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  85. package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  86. package/.versions/2.0.14/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  87. package/.versions/2.0.14/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  88. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  89. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  90. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  91. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  92. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  93. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  94. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  95. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  96. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  97. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  98. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  99. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  100. package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  101. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  102. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  103. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  104. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  105. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  106. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  107. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  108. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  109. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  110. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  111. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  112. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  113. package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  114. package/.versions/2.0.14/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  115. package/.versions/2.0.14/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  116. package/.versions/2.0.14/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  117. package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
  118. package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  119. package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  120. package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  121. package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  122. package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet.ts +216 -0
  123. package/.versions/2.0.14/.pi/agent-fleet/scripts/flow.ts +157 -0
  124. package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  125. package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  126. package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  127. package/.versions/2.0.14/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  128. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
  129. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  130. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  131. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  132. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  133. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  134. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  135. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  136. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
  137. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  138. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  139. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  140. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  141. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  142. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  143. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  144. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  145. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  146. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  147. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  148. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  149. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  150. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  151. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  152. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  153. package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  154. package/.versions/2.0.14/.pi/agent-fleet/scripts/package-lock.json +35 -0
  155. package/.versions/2.0.14/.pi/agent-fleet/scripts/package.json +9 -0
  156. package/.versions/2.0.14/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  157. package/.versions/2.0.14/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  158. package/.versions/2.0.14/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  159. package/.versions/2.0.14/.pi/agent-fleet/scripts/team-up.ts +378 -0
  160. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
  161. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  162. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  163. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  164. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  165. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  166. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  167. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
  168. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  169. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  170. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  171. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  172. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  173. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  174. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
  175. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  176. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  177. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  178. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  179. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  180. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  181. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  182. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  183. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  184. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  185. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  186. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  187. package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  188. package/.versions/2.0.14/.pi/agents/dispatch-policy.yaml +32 -0
  189. package/.versions/2.0.14/.pi/agents/model-profiles.yaml +134 -0
  190. package/.versions/2.0.14/.pi/agents/peers.yaml +147 -0
  191. package/.versions/2.0.14/.pi/agents/teams.yaml +41 -0
  192. package/.versions/2.0.14/.pi/agents/voices.yaml +13 -0
  193. package/.versions/2.0.14/.pi/damage-control-rules.yaml +297 -0
  194. package/.versions/2.0.14/.pi/extensions/btw/README.md +120 -0
  195. package/.versions/2.0.14/.pi/extensions/btw/index.ts +914 -0
  196. package/.versions/2.0.14/.pi/extensions/btw/package.json +6 -0
  197. package/.versions/2.0.14/.pi/extensions/btw/state.js +179 -0
  198. package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  199. package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  200. package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  201. package/.versions/2.0.14/.pi/extensions/compact-and-continue/README.md +42 -0
  202. package/.versions/2.0.14/.pi/extensions/compact-and-continue/index.ts +120 -0
  203. package/.versions/2.0.14/.pi/extensions/compact-and-continue/package.json +6 -0
  204. package/.versions/2.0.14/.pi/extensions/mcp-bridge/README.md +46 -0
  205. package/.versions/2.0.14/.pi/extensions/mcp-bridge/index.ts +206 -0
  206. package/.versions/2.0.14/.pi/extensions/mcp-bridge/package.json +6 -0
  207. package/.versions/2.0.14/.pi/extensions/package-lock.json +1175 -0
  208. package/.versions/2.0.14/.pi/extensions/package.json +9 -0
  209. package/.versions/2.0.14/.pi/extensions/pi-voice-stt/README.md +224 -0
  210. package/.versions/2.0.14/.pi/extensions/pi-voice-stt/config.ts +198 -0
  211. package/.versions/2.0.14/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  212. package/.versions/2.0.14/.pi/extensions/pi-voice-stt/index.ts +248 -0
  213. package/.versions/2.0.14/.pi/extensions/pi-voice-stt/package.json +6 -0
  214. package/.versions/2.0.14/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  215. package/.versions/2.0.14/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  216. package/.versions/2.0.14/.pi/harnesses/agent-hub/README.md +1369 -0
  217. package/.versions/2.0.14/.pi/harnesses/agent-hub/acceptance.ts +199 -0
  218. package/.versions/2.0.14/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  219. package/.versions/2.0.14/.pi/harnesses/agent-hub/artifacts.js +146 -0
  220. package/.versions/2.0.14/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
  221. package/.versions/2.0.14/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
  222. package/.versions/2.0.14/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  223. package/.versions/2.0.14/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  224. package/.versions/2.0.14/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
  225. package/.versions/2.0.14/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
  226. package/.versions/2.0.14/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  227. package/.versions/2.0.14/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
  228. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  229. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  230. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  231. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  232. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  233. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  234. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  235. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  236. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  237. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  238. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  239. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  240. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
  241. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  242. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  243. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  244. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/context.ts +45 -0
  245. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  246. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  247. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  248. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  249. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  250. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  251. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/recover.ts +52 -0
  252. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  253. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  254. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  255. package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  256. package/.versions/2.0.14/.pi/harnesses/agent-hub/config/agents.ts +178 -0
  257. package/.versions/2.0.14/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
  258. package/.versions/2.0.14/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
  259. package/.versions/2.0.14/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  260. package/.versions/2.0.14/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
  261. package/.versions/2.0.14/.pi/harnesses/agent-hub/context/budgets.ts +204 -0
  262. package/.versions/2.0.14/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  263. package/.versions/2.0.14/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  264. package/.versions/2.0.14/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  265. package/.versions/2.0.14/.pi/harnesses/agent-hub/context-window.js +108 -0
  266. package/.versions/2.0.14/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  267. package/.versions/2.0.14/.pi/harnesses/agent-hub/delegate.ts +467 -0
  268. package/.versions/2.0.14/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
  269. package/.versions/2.0.14/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  270. package/.versions/2.0.14/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  271. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
  272. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  273. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-complete.ts +169 -0
  274. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +248 -0
  275. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
  276. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-types.ts +257 -0
  277. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native.ts +226 -0
  278. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  279. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
  280. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +75 -0
  281. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  282. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +53 -0
  283. package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-state.ts +15 -0
  284. package/.versions/2.0.14/.pi/harnesses/agent-hub/docs-lane.js +122 -0
  285. package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  286. package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  287. package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  288. package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  289. package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
  290. package/.versions/2.0.14/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  291. package/.versions/2.0.14/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  292. package/.versions/2.0.14/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  293. package/.versions/2.0.14/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
  294. package/.versions/2.0.14/.pi/harnesses/agent-hub/fixtures/registration-surface.json +62 -0
  295. package/.versions/2.0.14/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  296. package/.versions/2.0.14/.pi/harnesses/agent-hub/footer.ts +30 -0
  297. package/.versions/2.0.14/.pi/harnesses/agent-hub/helpers.ts +270 -0
  298. package/.versions/2.0.14/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
  299. package/.versions/2.0.14/.pi/harnesses/agent-hub/index.ts +2370 -0
  300. package/.versions/2.0.14/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  301. package/.versions/2.0.14/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
  302. package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +125 -0
  303. package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  304. package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  305. package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
  306. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  307. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  308. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  309. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  310. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  311. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  312. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  313. package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  314. package/.versions/2.0.14/.pi/harnesses/agent-hub/no-progress.ts +359 -0
  315. package/.versions/2.0.14/.pi/harnesses/agent-hub/package.json +7 -0
  316. package/.versions/2.0.14/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  317. package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  318. package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  319. package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  320. package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  321. package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/work-mode.ts +126 -0
  322. package/.versions/2.0.14/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  323. package/.versions/2.0.14/.pi/harnesses/agent-hub/presentation.ts +48 -0
  324. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
  325. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  326. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  327. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  328. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
  329. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
  330. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
  331. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
  332. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  333. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  334. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
  335. package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
  336. package/.versions/2.0.14/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
  337. package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
  338. package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/fragments.ts +118 -0
  339. package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  340. package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
  341. package/.versions/2.0.14/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  342. package/.versions/2.0.14/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  343. package/.versions/2.0.14/.pi/harnesses/agent-hub/recover-policy.ts +27 -0
  344. package/.versions/2.0.14/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  345. package/.versions/2.0.14/.pi/harnesses/agent-hub/recovery-contract.ts +80 -0
  346. package/.versions/2.0.14/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  347. package/.versions/2.0.14/.pi/harnesses/agent-hub/research/runtime.ts +195 -0
  348. package/.versions/2.0.14/.pi/harnesses/agent-hub/research/spawn-run.ts +174 -0
  349. package/.versions/2.0.14/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  350. package/.versions/2.0.14/.pi/harnesses/agent-hub/return-contract.js +327 -0
  351. package/.versions/2.0.14/.pi/harnesses/agent-hub/return-extract.js +77 -0
  352. package/.versions/2.0.14/.pi/harnesses/agent-hub/review-findings.js +104 -0
  353. package/.versions/2.0.14/.pi/harnesses/agent-hub/run-budget.js +542 -0
  354. package/.versions/2.0.14/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  355. package/.versions/2.0.14/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
  356. package/.versions/2.0.14/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  357. package/.versions/2.0.14/.pi/harnesses/agent-hub/scope-gate.js +123 -0
  358. package/.versions/2.0.14/.pi/harnesses/agent-hub/session-audit.ts +227 -0
  359. package/.versions/2.0.14/.pi/harnesses/agent-hub/session-health.js +110 -0
  360. package/.versions/2.0.14/.pi/harnesses/agent-hub/session-start.ts +42 -0
  361. package/.versions/2.0.14/.pi/harnesses/agent-hub/spawn.ts +526 -0
  362. package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-activity.ts +510 -0
  363. package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-communication-store.ts +95 -0
  364. package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-report.ts +225 -0
  365. package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-runtime.ts +279 -0
  366. package/.versions/2.0.14/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
  367. package/.versions/2.0.14/.pi/harnesses/agent-hub/timeline.ts +72 -0
  368. package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
  369. package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
  370. package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  371. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/action-executors.ts +185 -0
  372. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  373. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/context.ts +144 -0
  374. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
  375. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +498 -0
  376. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  377. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  378. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  379. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
  380. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
  381. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  382. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
  383. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  384. package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
  385. package/.versions/2.0.14/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  386. package/.versions/2.0.14/.pi/harnesses/agent-hub/types.ts +66 -0
  387. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  388. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
  389. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  390. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  391. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +152 -0
  392. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  393. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-source.ts +175 -0
  394. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  395. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  396. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  397. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  398. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  399. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  400. package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  401. package/.versions/2.0.14/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  402. package/.versions/2.0.14/.pi/harnesses/agent-hub/version.ts +42 -0
  403. package/.versions/2.0.14/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  404. package/.versions/2.0.14/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  405. package/.versions/2.0.14/.pi/harnesses/agent-hub/work-mode.ts +174 -0
  406. package/.versions/2.0.14/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
  407. package/.versions/2.0.14/.pi/harnesses/ask-user-remote/README.md +59 -0
  408. package/.versions/2.0.14/.pi/harnesses/ask-user-remote/index.ts +558 -0
  409. package/.versions/2.0.14/.pi/harnesses/ask-user-remote/questions.ts +161 -0
  410. package/.versions/2.0.14/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  411. package/.versions/2.0.14/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
  412. package/.versions/2.0.14/.pi/harnesses/coms/README.md +100 -0
  413. package/.versions/2.0.14/.pi/harnesses/coms/index.ts +282 -0
  414. package/.versions/2.0.14/.pi/harnesses/coms/package.json +7 -0
  415. package/.versions/2.0.14/.pi/harnesses/coms/version.ts +42 -0
  416. package/.versions/2.0.14/.pi/harnesses/damage-control-continue/README.md +135 -0
  417. package/.versions/2.0.14/.pi/harnesses/damage-control-continue/index.ts +550 -0
  418. package/.versions/2.0.14/.pi/harnesses/damage-control-continue/package.json +7 -0
  419. package/.versions/2.0.14/.pi/harnesses/damage-control-continue/version.ts +42 -0
  420. package/.versions/2.0.14/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  421. package/.versions/2.0.14/.pi/harnesses/lib/coms-core-io.ts +385 -0
  422. package/.versions/2.0.14/.pi/harnesses/lib/coms-core.ts +577 -0
  423. package/.versions/2.0.14/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  424. package/.versions/2.0.14/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
  425. package/.versions/2.0.14/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
  426. package/.versions/2.0.14/.pi/harnesses/lib/context-budget-view.ts +107 -0
  427. package/.versions/2.0.14/.pi/harnesses/lib/context-budget.ts +114 -0
  428. package/.versions/2.0.14/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  429. package/.versions/2.0.14/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
  430. package/.versions/2.0.14/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  431. package/.versions/2.0.14/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  432. package/.versions/2.0.14/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  433. package/.versions/2.0.14/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  434. package/.versions/2.0.14/.pi/harnesses/lib/fleet-dashboard-view.ts +147 -0
  435. package/.versions/2.0.14/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  436. package/.versions/2.0.14/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  437. package/.versions/2.0.14/.pi/harnesses/lib/fleet-panel.ts +34 -0
  438. package/.versions/2.0.14/.pi/harnesses/lib/fleet-read-model.ts +536 -0
  439. package/.versions/2.0.14/.pi/harnesses/lib/fleet-selection.ts +24 -0
  440. package/.versions/2.0.14/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  441. package/.versions/2.0.14/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  442. package/.versions/2.0.14/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  443. package/.versions/2.0.14/.pi/harnesses/lib/herdr-client.ts +472 -0
  444. package/.versions/2.0.14/.pi/harnesses/lib/herdr-presence.ts +399 -0
  445. package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  446. package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  447. package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  448. package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  449. package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  450. package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  451. package/.versions/2.0.14/.pi/harnesses/lib/spawned-peers.js +191 -0
  452. package/.versions/2.0.14/.pi/harnesses/lib/system1/config.js +61 -0
  453. package/.versions/2.0.14/.pi/harnesses/lib/system1/contracts.ts +152 -0
  454. package/.versions/2.0.14/.pi/harnesses/lib/system1/demo.ts +106 -0
  455. package/.versions/2.0.14/.pi/harnesses/lib/system1/jev.ts +503 -0
  456. package/.versions/2.0.14/.pi/harnesses/lib/system1/service.ts +245 -0
  457. package/.versions/2.0.14/.pi/harnesses/lib/update-check.ts +222 -0
  458. package/.versions/2.0.14/.pi/harnesses/package-lock.json +2039 -0
  459. package/.versions/2.0.14/.pi/harnesses/package.json +10 -0
  460. package/.versions/2.0.14/.pi/prompts/af-build.md +24 -0
  461. package/.versions/2.0.14/.pi/prompts/af-code-simplify.md +22 -0
  462. package/.versions/2.0.14/.pi/prompts/af-constraints.md +31 -0
  463. package/.versions/2.0.14/.pi/prompts/af-plan.md +17 -0
  464. package/.versions/2.0.14/.pi/prompts/af-review.md +16 -0
  465. package/.versions/2.0.14/.pi/prompts/af-set-hermes-telegram.md +15 -0
  466. package/.versions/2.0.14/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  467. package/.versions/2.0.14/.pi/prompts/af-setup-rules.md +20 -0
  468. package/.versions/2.0.14/.pi/prompts/af-ship.md +17 -0
  469. package/.versions/2.0.14/.pi/prompts/af-spec.md +15 -0
  470. package/.versions/2.0.14/.pi/prompts/af-test.md +19 -0
  471. package/.versions/2.0.14/.pi/skills/bowser/SKILL.md +145 -0
  472. package/.versions/2.0.14/.version +1 -0
  473. package/.versions/2.0.14/agents/architect.md +24 -0
  474. package/.versions/2.0.14/agents/bowser.md +28 -0
  475. package/.versions/2.0.14/agents/builder.md +55 -0
  476. package/.versions/2.0.14/agents/code-reviewer.md +209 -0
  477. package/.versions/2.0.14/agents/deep-researcher.md +32 -0
  478. package/.versions/2.0.14/agents/documenter.md +22 -0
  479. package/.versions/2.0.14/agents/orchestrator.md +22 -0
  480. package/.versions/2.0.14/agents/plan-reviewer.md +83 -0
  481. package/.versions/2.0.14/agents/planner.md +105 -0
  482. package/.versions/2.0.14/agents/releaser.md +24 -0
  483. package/.versions/2.0.14/agents/researcher.md +30 -0
  484. package/.versions/2.0.14/agents/security-auditor.md +167 -0
  485. package/.versions/2.0.14/agents/test-engineer.md +153 -0
  486. package/.versions/2.0.14/agents/web-debugger.md +44 -0
  487. package/.versions/2.0.14/agents/web-performance-auditor.md +194 -0
  488. package/.versions/2.0.14/bin/catalog/harness-runtime-closure.json +73 -0
  489. package/.versions/2.0.14/codex/fleet-session-client/SKILL.md +34 -0
  490. package/.versions/2.0.14/codex/fleet-session-client.zip +0 -0
  491. package/.versions/2.0.14/docs/ARCHITECTURE.md +754 -0
  492. package/.versions/2.0.14/docs/agent-fleet-setup.md +917 -0
  493. package/.versions/2.0.14/docs/claude-code-coms-bridge.md +134 -0
  494. package/.versions/2.0.14/docs/codex-session-bridge.md +219 -0
  495. package/.versions/2.0.14/docs/coms-hermes-bridge.md +188 -0
  496. package/.versions/2.0.14/docs/getting-started.md +126 -0
  497. package/.versions/2.0.14/docs/npm-install.md +476 -0
  498. package/.versions/2.0.14/docs/pi-extensions.md +454 -0
  499. package/.versions/2.0.14/docs/pi-setup.md +92 -0
  500. package/.versions/2.0.14/docs/skill-anatomy.md +150 -0
  501. package/.versions/2.0.14/install-manifest.json +3183 -0
  502. package/.versions/2.0.14/justfile +247 -0
  503. package/.versions/2.0.14/manifest-meta.json +1065 -0
  504. package/.versions/2.0.14/references/accessibility-checklist.md +160 -0
  505. package/.versions/2.0.14/references/communication-contract.md +26 -0
  506. package/.versions/2.0.14/references/definition-of-done.md +67 -0
  507. package/.versions/2.0.14/references/fleet-coordination-patterns.md +171 -0
  508. package/.versions/2.0.14/references/observability-checklist.md +92 -0
  509. package/.versions/2.0.14/references/orchestration-patterns.md +370 -0
  510. package/.versions/2.0.14/references/performance-checklist.md +236 -0
  511. package/.versions/2.0.14/references/prompting-patterns.md +380 -0
  512. package/.versions/2.0.14/references/security-checklist.md +245 -0
  513. package/.versions/2.0.14/references/testing-patterns.md +235 -0
  514. package/.versions/2.0.14/references/workflow-authoring.md +304 -0
  515. package/.versions/2.0.14/skills/_internal/grilling.md +59 -0
  516. package/.versions/2.0.14/skills/browser-testing-with-devtools/SKILL.md +351 -0
  517. package/.versions/2.0.14/skills/code-review-and-quality/SKILL.md +396 -0
  518. package/.versions/2.0.14/skills/compound-learning/SKILL.md +137 -0
  519. package/.versions/2.0.14/skills/constraint-driven-development/SKILL.md +338 -0
  520. package/.versions/2.0.14/skills/constraint-driven-development/references/floor-guard.md +99 -0
  521. package/.versions/2.0.14/skills/context-engineering/SKILL.md +341 -0
  522. package/.versions/2.0.14/skills/deprecation-and-migration/SKILL.md +247 -0
  523. package/.versions/2.0.14/skills/designing-agents/SKILL.md +394 -0
  524. package/.versions/2.0.14/skills/designing-agents/pi-harness-authoring.md +222 -0
  525. package/.versions/2.0.14/skills/drafting-workflows/SKILL.md +143 -0
  526. package/.versions/2.0.14/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  527. package/.versions/2.0.14/skills/frontend-ui-engineering/SKILL.md +328 -0
  528. package/.versions/2.0.14/skills/git-workflow-and-versioning/SKILL.md +316 -0
  529. package/.versions/2.0.14/skills/idea-refine/SKILL.md +182 -0
  530. package/.versions/2.0.14/skills/idea-refine/examples.md +238 -0
  531. package/.versions/2.0.14/skills/idea-refine/frameworks.md +99 -0
  532. package/.versions/2.0.14/skills/idea-refine/refinement-criteria.md +113 -0
  533. package/.versions/2.0.14/skills/idea-refine/scripts/idea-refine.sh +15 -0
  534. package/.versions/2.0.14/skills/incremental-implementation/SKILL.md +302 -0
  535. package/.versions/2.0.14/skills/interview-me/SKILL.md +226 -0
  536. package/.versions/2.0.14/skills/orchestration-verification/SKILL.md +182 -0
  537. package/.versions/2.0.14/skills/peer-coms/SKILL.md +90 -0
  538. package/.versions/2.0.14/skills/performance-optimization/SKILL.md +496 -0
  539. package/.versions/2.0.14/skills/planning-and-task-breakdown/SKILL.md +289 -0
  540. package/.versions/2.0.14/skills/repository-ai-setup/SKILL.md +117 -0
  541. package/.versions/2.0.14/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  542. package/.versions/2.0.14/skills/repository-ai-setup/references/apply-contract.md +74 -0
  543. package/.versions/2.0.14/skills/repository-ai-setup/references/provenance-template.md +16 -0
  544. package/.versions/2.0.14/skills/repository-ai-setup/references/setup-flow.md +108 -0
  545. package/.versions/2.0.14/skills/repository-ai-setup/references/verify-setup.md +20 -0
  546. package/.versions/2.0.14/skills/security-and-hardening/SKILL.md +524 -0
  547. package/.versions/2.0.14/skills/spec-driven-development/SKILL.md +295 -0
  548. package/.versions/2.0.14/skills/using-agent-skills/SKILL.md +198 -0
  549. package/.versions/2.0.14/vendor/agent-skills-upstream/LICENSE +21 -0
  550. package/.versions/2.0.14/vendor/agent-skills-upstream/README.md +430 -0
  551. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  552. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  553. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  554. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  555. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  556. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  557. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  558. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  559. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  560. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  561. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  562. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  563. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  564. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  565. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  566. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  567. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  568. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  569. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  570. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  571. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  572. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  573. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  574. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  575. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  576. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  577. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  578. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  579. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  580. package/.versions/2.0.14/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  581. package/.versions/2.0.15/.pi/agent-fleet/hermes/README.md +347 -0
  582. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  583. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  584. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  585. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  586. package/.versions/2.0.15/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  587. package/.versions/2.0.15/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  588. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  589. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  590. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  591. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  592. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  593. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  594. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  595. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  596. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  597. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  598. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  599. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  600. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  601. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  602. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  603. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  604. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  605. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  606. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  607. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  608. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  609. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  610. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  611. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  612. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  613. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  614. package/.versions/2.0.15/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  615. package/.versions/2.0.15/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  616. package/.versions/2.0.15/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  617. package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
  618. package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  619. package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  620. package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  621. package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  622. package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet.ts +217 -0
  623. package/.versions/2.0.15/.pi/agent-fleet/scripts/flow.ts +157 -0
  624. package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  625. package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  626. package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  627. package/.versions/2.0.15/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  628. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
  629. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  630. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  631. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  632. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  633. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  634. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  635. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  636. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
  637. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  638. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  639. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  640. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  641. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  642. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  643. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  644. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  645. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  646. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  647. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  648. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  649. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  650. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  651. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  652. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  653. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  654. package/.versions/2.0.15/.pi/agent-fleet/scripts/package-lock.json +35 -0
  655. package/.versions/2.0.15/.pi/agent-fleet/scripts/package.json +9 -0
  656. package/.versions/2.0.15/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  657. package/.versions/2.0.15/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  658. package/.versions/2.0.15/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  659. package/.versions/2.0.15/.pi/agent-fleet/scripts/team-up.ts +378 -0
  660. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
  661. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  662. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  663. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  664. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  665. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  666. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  667. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
  668. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  669. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  670. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  671. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  672. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  673. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  674. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
  675. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  676. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  677. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  678. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  679. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  680. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  681. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  682. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  683. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  684. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  685. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  686. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  687. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  688. package/.versions/2.0.15/.pi/agents/dispatch-policy.yaml +32 -0
  689. package/.versions/2.0.15/.pi/agents/model-profiles.yaml +134 -0
  690. package/.versions/2.0.15/.pi/agents/peers.yaml +147 -0
  691. package/.versions/2.0.15/.pi/agents/teams.yaml +41 -0
  692. package/.versions/2.0.15/.pi/agents/voices.yaml +13 -0
  693. package/.versions/2.0.15/.pi/damage-control-rules.yaml +297 -0
  694. package/.versions/2.0.15/.pi/extensions/btw/README.md +120 -0
  695. package/.versions/2.0.15/.pi/extensions/btw/index.ts +914 -0
  696. package/.versions/2.0.15/.pi/extensions/btw/package.json +6 -0
  697. package/.versions/2.0.15/.pi/extensions/btw/state.js +179 -0
  698. package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  699. package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  700. package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  701. package/.versions/2.0.15/.pi/extensions/compact-and-continue/README.md +42 -0
  702. package/.versions/2.0.15/.pi/extensions/compact-and-continue/index.ts +120 -0
  703. package/.versions/2.0.15/.pi/extensions/compact-and-continue/package.json +6 -0
  704. package/.versions/2.0.15/.pi/extensions/mcp-bridge/README.md +46 -0
  705. package/.versions/2.0.15/.pi/extensions/mcp-bridge/index.ts +206 -0
  706. package/.versions/2.0.15/.pi/extensions/mcp-bridge/package.json +6 -0
  707. package/.versions/2.0.15/.pi/extensions/package-lock.json +1175 -0
  708. package/.versions/2.0.15/.pi/extensions/package.json +9 -0
  709. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/README.md +224 -0
  710. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/config.ts +198 -0
  711. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  712. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/index.ts +248 -0
  713. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/package.json +6 -0
  714. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  715. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  716. package/.versions/2.0.15/.pi/harnesses/agent-hub/README.md +1448 -0
  717. package/.versions/2.0.15/.pi/harnesses/agent-hub/acceptance.ts +199 -0
  718. package/.versions/2.0.15/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  719. package/.versions/2.0.15/.pi/harnesses/agent-hub/artifacts.js +146 -0
  720. package/.versions/2.0.15/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
  721. package/.versions/2.0.15/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
  722. package/.versions/2.0.15/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  723. package/.versions/2.0.15/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  724. package/.versions/2.0.15/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
  725. package/.versions/2.0.15/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
  726. package/.versions/2.0.15/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  727. package/.versions/2.0.15/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
  728. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  729. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  730. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  731. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  732. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  733. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  734. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  735. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  736. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  737. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  738. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  739. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  740. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
  741. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  742. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  743. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  744. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/context.ts +47 -0
  745. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  746. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  747. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  748. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  749. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  750. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  751. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
  752. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  753. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  754. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  755. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  756. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  757. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  758. package/.versions/2.0.15/.pi/harnesses/agent-hub/config/agents.ts +178 -0
  759. package/.versions/2.0.15/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
  760. package/.versions/2.0.15/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
  761. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  762. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
  763. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
  764. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  765. package/.versions/2.0.15/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  766. package/.versions/2.0.15/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  767. package/.versions/2.0.15/.pi/harnesses/agent-hub/context-window.js +108 -0
  768. package/.versions/2.0.15/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  769. package/.versions/2.0.15/.pi/harnesses/agent-hub/delegate.ts +467 -0
  770. package/.versions/2.0.15/.pi/harnesses/agent-hub/deterministic-fs.ts +166 -0
  771. package/.versions/2.0.15/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  772. package/.versions/2.0.15/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  773. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
  774. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  775. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
  776. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +259 -0
  777. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
  778. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-types.ts +260 -0
  779. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
  780. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  781. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
  782. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +76 -0
  783. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  784. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  785. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  786. package/.versions/2.0.15/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  787. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  788. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  789. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  790. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  791. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
  792. package/.versions/2.0.15/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  793. package/.versions/2.0.15/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  794. package/.versions/2.0.15/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  795. package/.versions/2.0.15/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  796. package/.versions/2.0.15/.pi/harnesses/agent-hub/filesystem-tool.ts +137 -0
  797. package/.versions/2.0.15/.pi/harnesses/agent-hub/fixtures/registration-surface.json +64 -0
  798. package/.versions/2.0.15/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  799. package/.versions/2.0.15/.pi/harnesses/agent-hub/footer.ts +30 -0
  800. package/.versions/2.0.15/.pi/harnesses/agent-hub/helpers.ts +270 -0
  801. package/.versions/2.0.15/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
  802. package/.versions/2.0.15/.pi/harnesses/agent-hub/index.ts +2597 -0
  803. package/.versions/2.0.15/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  804. package/.versions/2.0.15/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
  805. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
  806. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  807. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  808. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
  809. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  810. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  811. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  812. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  813. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  814. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  815. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  816. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  817. package/.versions/2.0.15/.pi/harnesses/agent-hub/no-progress.ts +563 -0
  818. package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
  819. package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  820. package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
  821. package/.versions/2.0.15/.pi/harnesses/agent-hub/package.json +7 -0
  822. package/.versions/2.0.15/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  823. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  824. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  825. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  826. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  827. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/work-mode.ts +135 -0
  828. package/.versions/2.0.15/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  829. package/.versions/2.0.15/.pi/harnesses/agent-hub/presentation.ts +48 -0
  830. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
  831. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  832. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  833. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  834. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
  835. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
  836. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
  837. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
  838. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  839. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  840. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
  841. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
  842. package/.versions/2.0.15/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
  843. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
  844. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/fragments.ts +116 -0
  845. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  846. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
  847. package/.versions/2.0.15/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  848. package/.versions/2.0.15/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  849. package/.versions/2.0.15/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  850. package/.versions/2.0.15/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  851. package/.versions/2.0.15/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
  852. package/.versions/2.0.15/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  853. package/.versions/2.0.15/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  854. package/.versions/2.0.15/.pi/harnesses/agent-hub/research/runtime.ts +197 -0
  855. package/.versions/2.0.15/.pi/harnesses/agent-hub/research/spawn-run.ts +183 -0
  856. package/.versions/2.0.15/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  857. package/.versions/2.0.15/.pi/harnesses/agent-hub/return-contract.js +349 -0
  858. package/.versions/2.0.15/.pi/harnesses/agent-hub/return-extract.js +77 -0
  859. package/.versions/2.0.15/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  860. package/.versions/2.0.15/.pi/harnesses/agent-hub/review-findings.js +104 -0
  861. package/.versions/2.0.15/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  862. package/.versions/2.0.15/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  863. package/.versions/2.0.15/.pi/harnesses/agent-hub/run-budget.js +554 -0
  864. package/.versions/2.0.15/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  865. package/.versions/2.0.15/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
  866. package/.versions/2.0.15/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  867. package/.versions/2.0.15/.pi/harnesses/agent-hub/scope-gate.js +144 -0
  868. package/.versions/2.0.15/.pi/harnesses/agent-hub/session-audit.ts +313 -0
  869. package/.versions/2.0.15/.pi/harnesses/agent-hub/session-health.js +110 -0
  870. package/.versions/2.0.15/.pi/harnesses/agent-hub/session-start.ts +42 -0
  871. package/.versions/2.0.15/.pi/harnesses/agent-hub/spawn.ts +534 -0
  872. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  873. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-communication-store.ts +129 -0
  874. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  875. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-runtime.ts +280 -0
  876. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
  877. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
  878. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-config.ts +37 -0
  879. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-contract.ts +19 -0
  880. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  881. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-live-stage-closure.user-run.mjs +336 -0
  882. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
  883. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  884. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  885. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  886. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  887. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only.user-run.mjs +157 -0
  888. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
  889. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  890. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  891. package/.versions/2.0.15/.pi/harnesses/agent-hub/timeline.ts +72 -0
  892. package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
  893. package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
  894. package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  895. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/action-executors.ts +208 -0
  896. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  897. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/context.ts +144 -0
  898. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
  899. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +558 -0
  900. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  901. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  902. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  903. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
  904. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
  905. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  906. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
  907. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  908. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
  909. package/.versions/2.0.15/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  910. package/.versions/2.0.15/.pi/harnesses/agent-hub/types.ts +66 -0
  911. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  912. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
  913. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  914. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  915. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
  916. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  917. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  918. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  919. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  920. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  921. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  922. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  923. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  924. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  925. package/.versions/2.0.15/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  926. package/.versions/2.0.15/.pi/harnesses/agent-hub/version.ts +42 -0
  927. package/.versions/2.0.15/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  928. package/.versions/2.0.15/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  929. package/.versions/2.0.15/.pi/harnesses/agent-hub/work-mode.ts +179 -0
  930. package/.versions/2.0.15/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
  931. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/README.md +59 -0
  932. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/index.ts +558 -0
  933. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/questions.ts +161 -0
  934. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  935. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
  936. package/.versions/2.0.15/.pi/harnesses/coms/README.md +100 -0
  937. package/.versions/2.0.15/.pi/harnesses/coms/index.ts +282 -0
  938. package/.versions/2.0.15/.pi/harnesses/coms/package.json +7 -0
  939. package/.versions/2.0.15/.pi/harnesses/coms/version.ts +42 -0
  940. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/README.md +135 -0
  941. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/index.ts +550 -0
  942. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/package.json +7 -0
  943. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/version.ts +42 -0
  944. package/.versions/2.0.15/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  945. package/.versions/2.0.15/.pi/harnesses/lib/coms-core-io.ts +385 -0
  946. package/.versions/2.0.15/.pi/harnesses/lib/coms-core.ts +577 -0
  947. package/.versions/2.0.15/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  948. package/.versions/2.0.15/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
  949. package/.versions/2.0.15/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
  950. package/.versions/2.0.15/.pi/harnesses/lib/context-budget-view.ts +107 -0
  951. package/.versions/2.0.15/.pi/harnesses/lib/context-budget.ts +114 -0
  952. package/.versions/2.0.15/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  953. package/.versions/2.0.15/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
  954. package/.versions/2.0.15/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  955. package/.versions/2.0.15/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  956. package/.versions/2.0.15/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  957. package/.versions/2.0.15/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  958. package/.versions/2.0.15/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
  959. package/.versions/2.0.15/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  960. package/.versions/2.0.15/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  961. package/.versions/2.0.15/.pi/harnesses/lib/fleet-panel.ts +34 -0
  962. package/.versions/2.0.15/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  963. package/.versions/2.0.15/.pi/harnesses/lib/fleet-selection.ts +24 -0
  964. package/.versions/2.0.15/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  965. package/.versions/2.0.15/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  966. package/.versions/2.0.15/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  967. package/.versions/2.0.15/.pi/harnesses/lib/herdr-client.ts +472 -0
  968. package/.versions/2.0.15/.pi/harnesses/lib/herdr-presence.ts +399 -0
  969. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  970. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  971. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  972. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  973. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  974. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  975. package/.versions/2.0.15/.pi/harnesses/lib/spawned-peers.js +191 -0
  976. package/.versions/2.0.15/.pi/harnesses/lib/system1/config.js +61 -0
  977. package/.versions/2.0.15/.pi/harnesses/lib/system1/contracts.ts +152 -0
  978. package/.versions/2.0.15/.pi/harnesses/lib/system1/demo.ts +104 -0
  979. package/.versions/2.0.15/.pi/harnesses/lib/system1/jev.ts +503 -0
  980. package/.versions/2.0.15/.pi/harnesses/lib/system1/selection.js +11 -0
  981. package/.versions/2.0.15/.pi/harnesses/lib/system1/service.ts +245 -0
  982. package/.versions/2.0.15/.pi/harnesses/lib/update-check.ts +222 -0
  983. package/.versions/2.0.15/.pi/harnesses/package-lock.json +2039 -0
  984. package/.versions/2.0.15/.pi/harnesses/package.json +10 -0
  985. package/.versions/2.0.15/.pi/prompts/af-build.md +27 -0
  986. package/.versions/2.0.15/.pi/prompts/af-code-simplify.md +22 -0
  987. package/.versions/2.0.15/.pi/prompts/af-constraints.md +31 -0
  988. package/.versions/2.0.15/.pi/prompts/af-plan.md +17 -0
  989. package/.versions/2.0.15/.pi/prompts/af-review.md +16 -0
  990. package/.versions/2.0.15/.pi/prompts/af-set-hermes-telegram.md +15 -0
  991. package/.versions/2.0.15/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  992. package/.versions/2.0.15/.pi/prompts/af-setup-rules.md +20 -0
  993. package/.versions/2.0.15/.pi/prompts/af-ship.md +17 -0
  994. package/.versions/2.0.15/.pi/prompts/af-spec.md +15 -0
  995. package/.versions/2.0.15/.pi/prompts/af-test.md +19 -0
  996. package/.versions/2.0.15/.pi/skills/bowser/SKILL.md +145 -0
  997. package/.versions/2.0.15/.version +1 -0
  998. package/.versions/2.0.15/agents/architect.md +24 -0
  999. package/.versions/2.0.15/agents/bowser.md +28 -0
  1000. package/.versions/2.0.15/agents/builder.md +55 -0
  1001. package/.versions/2.0.15/agents/code-reviewer.md +209 -0
  1002. package/.versions/2.0.15/agents/deep-researcher.md +32 -0
  1003. package/.versions/2.0.15/agents/documenter.md +22 -0
  1004. package/.versions/2.0.15/agents/orchestrator.md +22 -0
  1005. package/.versions/2.0.15/agents/plan-reviewer.md +83 -0
  1006. package/.versions/2.0.15/agents/planner.md +105 -0
  1007. package/.versions/2.0.15/agents/releaser.md +24 -0
  1008. package/.versions/2.0.15/agents/researcher.md +30 -0
  1009. package/.versions/2.0.15/agents/security-auditor.md +167 -0
  1010. package/.versions/2.0.15/agents/test-engineer.md +153 -0
  1011. package/.versions/2.0.15/agents/web-debugger.md +44 -0
  1012. package/.versions/2.0.15/agents/web-performance-auditor.md +194 -0
  1013. package/.versions/2.0.15/bin/catalog/harness-runtime-closure.json +73 -0
  1014. package/.versions/2.0.15/codex/fleet-session-client/SKILL.md +34 -0
  1015. package/.versions/2.0.15/codex/fleet-session-client.zip +0 -0
  1016. package/.versions/2.0.15/docs/ARCHITECTURE.md +829 -0
  1017. package/.versions/2.0.15/docs/agent-fleet-setup.md +1090 -0
  1018. package/.versions/2.0.15/docs/claude-code-coms-bridge.md +134 -0
  1019. package/.versions/2.0.15/docs/codex-session-bridge.md +219 -0
  1020. package/.versions/2.0.15/docs/coms-hermes-bridge.md +188 -0
  1021. package/.versions/2.0.15/docs/getting-started.md +126 -0
  1022. package/.versions/2.0.15/docs/npm-install.md +525 -0
  1023. package/.versions/2.0.15/docs/pi-extensions.md +454 -0
  1024. package/.versions/2.0.15/docs/pi-setup.md +92 -0
  1025. package/.versions/2.0.15/docs/skill-anatomy.md +150 -0
  1026. package/.versions/2.0.15/install-manifest.json +3193 -0
  1027. package/.versions/2.0.15/justfile +247 -0
  1028. package/.versions/2.0.15/manifest-meta.json +1071 -0
  1029. package/.versions/2.0.15/references/accessibility-checklist.md +160 -0
  1030. package/.versions/2.0.15/references/communication-contract.md +26 -0
  1031. package/.versions/2.0.15/references/definition-of-done.md +67 -0
  1032. package/.versions/2.0.15/references/fleet-coordination-patterns.md +171 -0
  1033. package/.versions/2.0.15/references/observability-checklist.md +92 -0
  1034. package/.versions/2.0.15/references/orchestration-patterns.md +370 -0
  1035. package/.versions/2.0.15/references/performance-checklist.md +236 -0
  1036. package/.versions/2.0.15/references/prompting-patterns.md +380 -0
  1037. package/.versions/2.0.15/references/security-checklist.md +245 -0
  1038. package/.versions/2.0.15/references/testing-patterns.md +235 -0
  1039. package/.versions/2.0.15/references/workflow-authoring.md +304 -0
  1040. package/.versions/2.0.15/skills/_internal/grilling.md +59 -0
  1041. package/.versions/2.0.15/skills/browser-testing-with-devtools/SKILL.md +351 -0
  1042. package/.versions/2.0.15/skills/code-review-and-quality/SKILL.md +396 -0
  1043. package/.versions/2.0.15/skills/compound-learning/SKILL.md +137 -0
  1044. package/.versions/2.0.15/skills/constraint-driven-development/SKILL.md +338 -0
  1045. package/.versions/2.0.15/skills/constraint-driven-development/references/floor-guard.md +99 -0
  1046. package/.versions/2.0.15/skills/context-engineering/SKILL.md +341 -0
  1047. package/.versions/2.0.15/skills/deprecation-and-migration/SKILL.md +247 -0
  1048. package/.versions/2.0.15/skills/designing-agents/SKILL.md +394 -0
  1049. package/.versions/2.0.15/skills/designing-agents/pi-harness-authoring.md +222 -0
  1050. package/.versions/2.0.15/skills/drafting-workflows/SKILL.md +143 -0
  1051. package/.versions/2.0.15/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  1052. package/.versions/2.0.15/skills/frontend-ui-engineering/SKILL.md +328 -0
  1053. package/.versions/2.0.15/skills/git-workflow-and-versioning/SKILL.md +316 -0
  1054. package/.versions/2.0.15/skills/idea-refine/SKILL.md +182 -0
  1055. package/.versions/2.0.15/skills/idea-refine/examples.md +238 -0
  1056. package/.versions/2.0.15/skills/idea-refine/frameworks.md +99 -0
  1057. package/.versions/2.0.15/skills/idea-refine/refinement-criteria.md +113 -0
  1058. package/.versions/2.0.15/skills/idea-refine/scripts/idea-refine.sh +15 -0
  1059. package/.versions/2.0.15/skills/incremental-implementation/SKILL.md +353 -0
  1060. package/.versions/2.0.15/skills/interview-me/SKILL.md +226 -0
  1061. package/.versions/2.0.15/skills/orchestration-verification/SKILL.md +182 -0
  1062. package/.versions/2.0.15/skills/peer-coms/SKILL.md +90 -0
  1063. package/.versions/2.0.15/skills/performance-optimization/SKILL.md +496 -0
  1064. package/.versions/2.0.15/skills/planning-and-task-breakdown/SKILL.md +318 -0
  1065. package/.versions/2.0.15/skills/repository-ai-setup/SKILL.md +117 -0
  1066. package/.versions/2.0.15/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  1067. package/.versions/2.0.15/skills/repository-ai-setup/references/apply-contract.md +74 -0
  1068. package/.versions/2.0.15/skills/repository-ai-setup/references/provenance-template.md +16 -0
  1069. package/.versions/2.0.15/skills/repository-ai-setup/references/setup-flow.md +108 -0
  1070. package/.versions/2.0.15/skills/repository-ai-setup/references/verify-setup.md +20 -0
  1071. package/.versions/2.0.15/skills/security-and-hardening/SKILL.md +524 -0
  1072. package/.versions/2.0.15/skills/spec-driven-development/SKILL.md +295 -0
  1073. package/.versions/2.0.15/skills/using-agent-skills/SKILL.md +198 -0
  1074. package/.versions/2.0.15/vendor/agent-skills-upstream/LICENSE +21 -0
  1075. package/.versions/2.0.15/vendor/agent-skills-upstream/README.md +430 -0
  1076. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  1077. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  1078. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  1079. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  1080. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  1081. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  1082. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  1083. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  1084. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  1085. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  1086. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  1087. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  1088. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  1089. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  1090. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  1091. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  1092. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  1093. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  1094. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  1095. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  1096. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  1097. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  1098. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  1099. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  1100. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  1101. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  1102. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  1103. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  1104. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  1105. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  1106. package/CHANGELOG.md +12 -0
  1107. package/README.md +1 -1
  1108. package/agents/builder.md +2 -2
  1109. package/bin/cli.js +16 -2
  1110. package/bin/lib/apply.js +5 -0
  1111. package/bin/lib/doctor.js +85 -12
  1112. package/bin/lib/reconcile.js +9 -1
  1113. package/bin/lib/state.js +1 -0
  1114. package/bin/lib/task-triage-setup.js +76 -0
  1115. package/bin/lib/transaction.js +4 -0
  1116. package/docs/ARCHITECTURE.md +100 -24
  1117. package/docs/agent-fleet-setup.md +196 -6
  1118. package/docs/npm-install.md +72 -15
  1119. package/docs/pi-extensions.md +1 -1
  1120. package/install-manifest.json +21 -3
  1121. package/manifest-meta.json +14 -0
  1122. package/package.json +11 -3
  1123. package/skills/incremental-implementation/SKILL.md +64 -13
  1124. package/skills/planning-and-task-breakdown/SKILL.md +43 -14
  1125. package/skills/using-agent-skills/SKILL.md +2 -2
@@ -0,0 +1,1369 @@
1
+ # agent-hub
2
+
3
+ The unified Agent Fleet runtime for pi, with [`coms`](../coms/README.md) **embedded**. Bare
4
+ `just fleet` loads Fleet Core and starts `agent-hub` in **operator** work mode with direct coding
5
+ and orchestration tools, but no standing native roster. The same live session can switch to
6
+ **orchestrator** work mode, which removes direct coding tools and drives native specialists under
7
+ the Verification Contract. Fleet Core loads first: [`damage-control-continue`](../damage-control-continue/README.md),
8
+ [`ask-user-remote`](../ask-user-remote/README.md), STT, Compact & Continue, BTW, and the update
9
+ checker. Both work modes can adjust the native roster, run research, collaborate with Pi/Claude
10
+ peers, and hand the session to a visible coms peer.
11
+
12
+ > Consolidates the retired `agent-team` dispatcher into this harness and embeds the ported `coms`
13
+ > P2P layer from [`pi-vs-claude-code`](https://github.com/disler/pi-vs-claude-code) by
14
+ > [disler](https://github.com/disler) (MIT). See the
15
+ > [extension catalog](../../../docs/pi-extensions.md) and the
16
+ > [design plan](../../../docs/plans/agent-hub/).
17
+
18
+ **Optional ChatGPT client:** `just fleet --agents <roster> --peers <preset> --project <name>` can supply the live Pi session that the experimental [ChatGPT Fleet session client](https://github.com/chankov/agent-fleet/blob/main/docs/codex-session-bridge.md) selects. Hermes remains the inbound `ask_user` route.
19
+
20
+ ## Proactive turn review (experimental; off by default)
21
+
22
+ This is a **separate, per-repository, session-bound** advisory consumer of the
23
+ shared System 1 foundation, not the native watchdog's System 1 shortcut. The
24
+ human-owned `.ai/proactive-review.json` is never created by setup. Missing/off
25
+ means zero proactive capture, inference and feedback. Enabled `shadow` or
26
+ `advisory` requires explicit include scope; `remoteContext: "disabled"` is
27
+ local-only (reviewed deterministic validators, no semantic provider check),
28
+ while `selected-excerpts` additionally permits bounded source/assistant
29
+ excerpts to the already configured System 1 provider when ready. Shadow only
30
+ observes; advisory can deliver ≤3 current findings at the same owner's next
31
+ **natural** context hook (≤1,500 characters, once per finding revision).
32
+ There is no autonomous turn, fix, termination, permission, or acceptance gate;
33
+ the existing watchdog retains independent authority. Never interpret a
34
+ suspicion, uncovered rule, unavailable model, or lack of findings as verified
35
+ correctness.
36
+
37
+ Hub/direct and supported native Pi specialist turns are instrumented; nested
38
+ delegates, research helpers, coms peers and Hermes are not. Source and explicit
39
+ plan/rules are bound to the session's immutable snapshot; delivery checks
40
+ current source hashes and the session-bound rule revision. Rule discovery is read-only, source-bound and
41
+ bounded; missing/partial/unsupported coverage is visible rather than passed.
42
+ Editing rules during a session does **not** reload them: restart to adopt edits.
43
+ Bounded private snapshots support local validated evidence readback, while
44
+ operator history, `/af-hub-report` and `/af-audit` expose metadata-only
45
+ projections. Feedback never creates a new Pi turn. Native delivery without a
46
+ receipt remains unknown; rare async-close errors remain a nonblocking risk.
47
+ The tested native integration uses repo-local Pi 0.84.2; Node 18 covers only
48
+ extracted-package CLI/doctor compatibility, not the TypeScript observer.
49
+
50
+ See [config, limits, exact explicit human-label schema, offline installed
51
+ runbook, rollback and separately consented pilot](../../../docs/agent-fleet-setup.md#proactive-turn-review-experimental).
52
+ Use `/af-hub-report` and `/af-audit` without labels for read-only session
53
+ status; `--labels /absolute/path/to/CURRENT_SESSION/artifacts/labels.json`
54
+ requires an explicitly provided file in the current session, never auto-loads
55
+ labels and does not transmit payloads. Only retained findings expose label
56
+ keys in the local evidence view (Fleet Dashboard `p` → `n` → `e`, or specialist
57
+ detail `n` → `e`); unavailable evidence shows no template. Checked-clear
58
+ units have no operator-accessible keys, so human miss/true-negative labeling
59
+ and full recall evaluation are not operational; absent labels remain unknown.
60
+ Only the project's `rules:` roots are catalogued; an inactive session binding
61
+ proposal is not installed configuration or a loaded skill. C5 visibility and
62
+ the earlier C6 offline/package review do not constitute final post-fix review,
63
+ a live pilot or C7 acceptance. No release, deployment, repo config edit or
64
+ remote request is authorized by this README. Roll back with the complete
65
+ `{"version":1,"mode":"off"}` config and restart; cancel current work if
66
+ immediate stopping is necessary, without destructive artifact cleanup.
67
+
68
+ ## Work Mode, roster, and topology
69
+
70
+ These are independent runtime axes:
71
+
72
+ - **Work Mode** — `/af-work-mode operator|orchestrator` switches prompt and active tools without
73
+ restarting or losing session state; `/af-work-mode` without an argument and **Alt+M** open the
74
+ two-option picker. Operator keeps `read`, `bash`, `edit`, `write`, approved extension tools, and
75
+ orchestration. Orchestrator withholds direct coding tools but keeps dispatch, research, assertions,
76
+ roster controls, `ask_user`, ready coms, and ready Herdr tools. In orchestrator work mode, raw
77
+ Herdr panes are auxiliary-process orchestration—not a route around delegation for reading,
78
+ editing, testing, or implementing code.
79
+ - **Native roster** — local headless Pi specialists from `.pi/agents/teams.yaml`. Bare Fleet starts
80
+ empty; select one with `--agents frontend` or add one live with `/af-agents-add code-reviewer`.
81
+ - **Peer topology** — separate long-lived Pi or Claude Code processes from `peers.yaml`, connected
82
+ by coms and optionally placed in sibling Herdr panes. `--peers frontend` selects a standing
83
+ preset; `--herdr` creates a Hub-only workspace through the empty `base` preset.
84
+ Switching from Operator to Orchestrator with no active agents automatically loads the first valid
85
+ team in configuration order (`default` in the shipped configuration), skipping empty teams and teams
86
+ with missing personas. Existing agents are kept. If no valid team is available, the switch is refused
87
+ with a warning. The selected team is saved in the session just like a manual team selection.
88
+ Budgets, nested delegation, and Verification Contract rigor follow the **task tier**, not Work Mode.
89
+
90
+ All Hub slash commands, including `/af-handoff`, are registered in both work modes. A command whose
91
+ runtime capability is unavailable refuses with remediation rather than disappearing. `--no-coms`
92
+ disables only embedded coms; direct operator work and native dispatch remain available.
93
+
94
+ ### Automatic capability surfaces
95
+
96
+ Capability packs load **automatically** from the current request, work mode, task tier, pending work,
97
+ and runtime state; there is no activation command. `core` is always present. Orchestrator work mode
98
+ always includes `fleet`; explicit delegation/research, acceptance work, an existing coms peer, a
99
+ Herdr pane/watcher request, and explicit or imminent compaction respectively add `fleet`,
100
+ `verification`, `peer`, `workspace`, and `compaction`. A ready coms or Herdr runtime is only
101
+ **readiness**, not intent: its tools and policy remain model-inactive until requested.
102
+
103
+ Ambiguous delegation, peer, or workspace intent provisionally exposes the smallest relevant pack
104
+ and records its reason in the state capsule and `/af-context`. Before that pack's first side effect,
105
+ the Hub asks one focused `ask_user` confirmation. Confirming promotes it for the task; reject or
106
+ cancel removes it and leaves no message, child, or pane behind. Active task packs persist through
107
+ follow-up turns so a workflow does not lose tools. They shrink only through
108
+ `set_task_tier(new_task: true)` (apart from mandatory work mode and pending-operation leases), never
109
+ merely because the next message sounds different.
110
+
111
+ `/af-context` separates stable replacement-prompt cost from the volatile state capsule and active
112
+ schemas. Inactive and ready-but-inactive packs cost zero model-visible characters. Provider totals,
113
+ including cache read/write when Pi supplies them, remain authoritative; deterministic character
114
+ figures are regression diagnostics and never invent provider usage.
115
+
116
+ ### Context-pressure and resume recovery
117
+
118
+ Pre-turn surface cost and live conversation pressure are different budgets. `/af-context` separates
119
+ the stable replacement prompt, volatile state capsule, and active tool schemas; user and assistant
120
+ messages plus tool results then accumulate during a turn. A long tool loop can therefore reach the
121
+ model window even while every standing prompt ceiling remains green.
122
+
123
+ The Hub samples live provider usage and projects each finalized tool result before another model
124
+ request:
125
+
126
+ - Below **80%**, pressure is `normal`.
127
+ - At **80%**, pressure becomes `warning`; the compact recovery surface is exposed transiently and
128
+ ordinary work may continue.
129
+ - At **90%**, the Hub aborts the next same-turn provider request, waits until the tool result and
130
+ aborted turn are persisted, and starts one automatic Pi compaction. Only one recovery may run at
131
+ a time. Input received while startup or same-turn recovery is active is retained in memory,
132
+ including images, then replayed once after compaction succeeds.
133
+
134
+ The status line and `/af-context` show the pressure phase, measured usage, both thresholds, episode,
135
+ and last recovery outcome. Persisted pressure diagnostics contain numeric/enumerated metadata only;
136
+ they never include prompts, tool output, credentials, error bodies, or compaction summaries.
137
+
138
+ If automatic recovery reports `failed`, the queued input remains retained. Use Pi's built-in manual
139
+ fallback, or switch to a model with a larger context window:
140
+
141
+ ```text
142
+ /compact Preserve the current goal, decisions, assertions, pending operations, blockers, and next step.
143
+ ```
144
+
145
+ A resumed orchestrator session can also require roster recovery. The Hub persists only the selected
146
+ team name and resolves it again against the current `.pi/agents/teams.yaml` and persona files. If the
147
+ team is missing, renamed, empty, or stale, the Hub preserves orchestrator work mode, keeps direct coding
148
+ tools unavailable, and blocks model input rather than inventing a roster or silently downgrading.
149
+ Recover with one of these explicit choices:
150
+
151
+ ```text
152
+ /af-agents-team # select a currently valid team in the live session
153
+ /af-work-mode operator # explicitly leave delegate-only work mode and restore direct tools
154
+ just fleet --agents <name> # restart through the public Fleet CLI
155
+ just fleet --work-mode operator # restart explicitly as an operator
156
+ ```
157
+
158
+ For a direct Pi launch, the roster flag is `--agent-team <name>` and the work mode flag is
159
+ `--work-mode operator`; explicit startup flags take precedence over persisted selections. Fix stale
160
+ team/persona declarations before selecting them.
161
+
162
+ The Pi session JSONL under `~/.pi/agent/sessions/` is the authoritative append-only conversation and
163
+ recovery record. Context overflow or a stale roster does **not** by itself mean that file is corrupt.
164
+ Inspect it through `/session`, resume it through `/resume` or Pi's session flags, and recover through
165
+ compaction or the commands above. Never edit, truncate, reorder, or synthesize JSONL entries to
166
+ recover a session.
167
+
168
+ ## What it does
169
+
170
+ The whole dispatch loop, end to end:
171
+
172
+ ```mermaid
173
+ sequenceDiagram
174
+ autonumber
175
+ actor U as You
176
+ participant H as Hub (dispatcher)
177
+ participant S as Specialist (e.g. builder)
178
+ participant R as Research helper
179
+ participant D as Disk (.pi/agent-sessions/)
180
+
181
+ U->>H: task
182
+ H->>D: set_assertions — Verification Contract persisted
183
+ H->>S: dispatch_agent (task + advisory scope)
184
+ S-->>H: NEEDS_RESEARCH: how does X work?
185
+ H->>R: spawn_research (researcher / deep-researcher)
186
+ R->>D: write findings file
187
+ R-->>H: one-line notice + path
188
+ H->>S: resume with file paths — never raw findings
189
+ S-->>H: structured return + named evidence
190
+ H->>D: update_assertion
191
+ H-->>U: Assertions: 2✓ 1○ 1✗ · open: A4
192
+ ```
193
+
194
+ Every borrowed idea from another harness passes one test before it lands: *does this persistently enter the dispatcher context?* If yes, it goes to disk or a one-line status instead.
195
+
196
+ `agent-hub` is the supported home for the former standalone dispatcher features:
197
+
198
+ - **Dispatcher grid** — a live dashboard of the active, dynamically adjustable native roster from `.pi/agents/teams.yaml`.
199
+ - **Context budget** — `/af-context` opens a separate read-only full-screen diagnostic in either work mode. It shows provider totals and cache fields beside named, metadata-only estimates; `loaded-excluded` Pi inputs are discovered but contribute zero to the replacement Hub prompt. Each specialist, research helper, delegate, and peer remains a separate context plane with its own model window. Component token estimates are heuristic/provider-scaled, never exact claims; unavailable peer/provider detail is labelled explicitly and raw prompts, schemas, and conversation text are never retained or displayed.
200
+ - **Specialist delegation** — `dispatch_agent` sends writable tasks to configured specialists.
201
+ - **Research helpers** — the dispatcher invokes `spawn_research` automatically for read-only
202
+ investigation; specialists can trigger the separate automatic `NEEDS_RESEARCH:` pipe described
203
+ below. Managed research children use a replacement read-only prompt with `--no-skills` and
204
+ `--no-context-files`; managed specialists receive a selected context manifest (persona, applicable
205
+ policy paths, and named skill paths) rather than inherited global skill/context loading. Two
206
+ `kind: research` personas ship by default: `researcher` (`gpt-6-luna`, low thinking) for simple
207
+ reads and `deep-researcher` (`grok-4.7`, medium thinking) for hard, cross-cutting investigation.
208
+ The dispatcher routes by persona; each persona's model + thinking level is shown in its catalog.
209
+ Live helpers appear in the Fleet Dashboard (`Alt+A`) and bounded fleet widget while they are
210
+ running. On every terminal outcome (success, error, timeout, spawn/preflight failure, or operator
211
+ kill) the live `rN` handle is removed immediately.
212
+ Session, transcript, and `findings/*.md` files remain on disk for the requester, and
213
+ `/af-agents-history` keeps the audit/timing record. Finished helpers cannot be restarted; a new
214
+ request always creates a fresh helper. `rN` handles are never reused during a Hub session.
215
+ - **Human handoff path** — `ask_user` is exposed by the `ask-user-remote` wrapper (capturing stock
216
+ `pi-ask-user` and optionally racing a `user-remote` bridge), so specialists can bubble decisions
217
+ back through the dispatcher.
218
+ - **Auto-research pipe (`NEEDS_RESEARCH:`)** — a specialist that lacks information pauses by ending
219
+ its turn with `NEEDS_RESEARCH: <question>` lines (mirror of the `ASK_USER:` protocol). The hub
220
+ intercepts them **in code**: it fans out read-only research helpers (max 4 questions per pause,
221
+ 2 pauses per dispatch), writes each helper's findings to `.pi/agent-sessions/findings/*.md`, and
222
+ resumes the specialist's session with the file paths. The dispatcher LLM sees only a one-line
223
+ notice — raw findings never enter its context. Findings files are wiped at session start.
224
+ - **Verification Contract (assertion ledger)** — the dispatcher owns a ledger of checkable
225
+ acceptance assertions built from the request *before* any builder runs, so a clearly stated
226
+ requirement is never silently dropped. `set_assertions` records the numbered, tagged assertions
227
+ (`test` | `runtime-ui` | `code-grep` | `manual`, one pass condition each, plus a required
228
+ `source` naming where the requirement comes from) and rebuilds the whole
229
+ ledger on a "wrong again" regression reset; `update_assertion` marks each one proven (named
230
+ evidence required), unproven, or failed after a verification gate; `get_assertions` reads the
231
+ full ledger (ids, tags, pass conditions, evidence) back. The hub persists the ledger to
232
+ `.pi/agent-sessions/assertions.json` (wiped at session start like `findings/`) and renders a
233
+ one-line status (`Assertions: 2✓ 1○ 1✗ · open: A4`) so the contract survives compaction without
234
+ re-flooding the dispatcher LLM context — after a compaction the dispatcher calls `get_assertions`
235
+ to recover the full text the status line omits. The `orchestrator` persona drives it — a deep-researcher
236
+ parity inventory for "behave like" requests, runtime proof for UI/visibility assertions, the
237
+ regression reset on a re-ask — per
238
+ [`orchestration-verification`](../../../skills/orchestration-verification/SKILL.md). The hub also
239
+ machine-parses each assertion-carrying specialist's structured return, writes the full raw output
240
+ to `.pi/agent-sessions/sessions/<sessionId>/artifacts/returns/<agentKey>-<dispatchId>.md`, surfaces only a compact
241
+ `details.structuredReturn` digest plus `details.returnPath`, and marks contract notices such as
242
+ missing assertion ids or evidence-less `assertions_proven` entries (demoted to unproven in the
243
+ tool text). `details.fullOutput` remains for `/af-zoom`/compatibility, but dispatcher-visible text is
244
+ digest + path oriented. `update_assertion(status: "proven")` validates evidence by assertion tag:
245
+ test evidence needs a command/test and outcome, `code-grep` needs pattern plus result sample,
246
+ manual needs user/`ask_user` confirmation, and `runtime-ui` needs an existing artifact path under
247
+ `.pi/agent-sessions/artifacts/evidence/`. **Advisory by design** (PRD open question 2): status is
248
+ surfaced and "proven" requires named evidence, but a dispatch is never hard-refused on an unproven
249
+ assertion — code-enforcement is the Checkpoint A decision. Two contract rules ARE enforced at the
250
+ tool: a batch with any sourceless assertion is refused with the offending ids named (a specialist
251
+ told to prove `A9` must be able to read its origin instead of spending a dispatch and an ASK_USER
252
+ cycle asking where `A9` was defined), and a batch over **8** open assertions is accepted with a
253
+ warning suggesting the split — declare the batch the next dispatches actually prove, and
254
+ `set_assertions` the next one when it starts.
255
+ - **Artifact bus** — session handoffs live under `.pi/agent-sessions/artifacts/` with conventional
256
+ `returns/`, `failures/`, `plans/`, `reviews/`, `inventories/`, and `evidence/` subdirectories, all
257
+ **archived** into an immutable `runs/<runId>/` namespace at session start rather than wiped (see
258
+ [Immutable per-run artifact namespaces](#immutable-per-run-artifact-namespaces-run-namespacejs)),
259
+ so a later session can never overwrite an earlier one's returns. `failures/` is separate on purpose: a run
260
+ that errored or timed out produced no specialist result, so its output goes there and the dispatch
261
+ result names it a **delivery failure** carrying no assertion evidence. Filing a 142-byte coms error
262
+ stub as `returns/code-reviewer-run4.md` once cost a 103-second dispatch investigating a review that
263
+ had in fact succeeded — only its reply was lost. `dispatch_agent` and `spawn_research` accept optional
264
+ `artifacts: string[]` paths (repo-relative or session-artifact-relative); the hub validates that
265
+ they stay inside the repo/session roots and injects only the path plus first heading/one-line
266
+ preview, never file bodies. Document-producing specialists are instructed to write plans, reviews,
267
+ inventories, and reports to the real session path
268
+ `.pi/agent-sessions/artifacts/<kind>/<agentKey>-run<N>.md` when their tools allow it, then report/pass
269
+ the artifact-relative handoff path `artifacts/<kind>/<agentKey>-run<N>.md`, finish with that path plus
270
+ a ≤10-line digest, and still include structured returns when assertions are carried. Repo-root
271
+ `./artifacts/...` files are not session artifacts. Planner's existing PLAN_FILE behavior is preserved;
272
+ the artifact path is an additional handoff channel.
273
+ - **Dispatch scope advisory** — `dispatch_agent` accepts optional `scope: string[]` for writable
274
+ builder-style runs. The orchestrator should derive these globs from the plan task's file list,
275
+ and skip scope for exploratory/reconnaissance work where the right files are not known yet. The
276
+ hub snapshots git status before the writable dispatch, diffs after the whole tool call (including
277
+ auto-research resumes), and reports out-of-scope paths in `details.scopeViolations` plus a ⚠ text
278
+ notice. This is advisory only: the hub never blocks completion, reverts files, or escalates
279
+ automatically. Known limitation: concurrent writable dispatches can only be attributed
280
+ approximately, so overlapping runs are flagged in the notice.
281
+ - **Agent controls** — `/af-zoom` inspects a live agent timeline; `/af-agents-history` replays the run as a
282
+ timeline (orchestrator turns, dispatches, research helpers) with per-agent durations, parallel-run
283
+ markers, and a grand total; kill/restart controls manage running child agents; per-agent `model:`
284
+ fields select models from team config. `/af-agents-kill <name|rN|all>` SIGTERMs a specialist (keeping
285
+ its standing card) or kills a currently running research helper (`all` clears every live helper).
286
+ `/af-agents-restart <name>` re-runs a specialist's last task fresh; research helpers cannot be
287
+ restarted. `/af-zoom <name|rN>` opens a running helper through the Fleet data model. Research spawning
288
+ and follow-up reconnaissance are automated through `spawn_research` and `NEEDS_RESEARCH:`; there are
289
+ no dedicated research lifecycle slash commands.
290
+ Restartable team specialists at or above 70% context render
291
+ their context percentage with a warning marker/color in the Fleet Dashboard, and their next
292
+ `dispatch_agent` result adds a `/af-agents-restart <persona>` hint. Research helpers are not warned,
293
+ and the hub never restarts specialists automatically.
294
+ - **Model switching** — a persona's frontmatter `models:` list declares the models it may switch to
295
+ (the default `model:` is implicitly a candidate). `/af-agent-model <persona>` picks from that list;
296
+ the choice lasts for the session and takes effect on the persona's next dispatch
297
+ (`/af-agents-restart <persona>` applies it immediately). The dot form
298
+ `/af-agent-model <persona>.<role>` switches a delegate sub-role's model instead — its candidates are
299
+ the role's declared default plus the parent persona's own candidate list; the switch is applied
300
+ when the parent is next dispatched (it lands in the serialized delegate config, so nested
301
+ children inherit it). `/af-models [profile]` applies a named profile
302
+ from `.pi/agents/model-profiles.yaml` — a macro over the same declared candidates, validated at
303
+ session start (a profile with any entry outside a persona's candidates is dropped whole, with an
304
+ error). This is the legacy flat format. Version 2 profiles also set all child roles, thinking,
305
+ dispatcher, watchdog/extraction, poll/debate and routing from one selection; they declare their
306
+ own models without project candidate overrides. See [complete model profiles](../../../docs/agent-fleet-setup.md#complete-model-profiles). Those
307
+ declared-candidate commands stay within their lists; Fleet Detail and the session-wide
308
+ substitution target picker intentionally use Pi's currently available registry. When an effective project or session override
309
+ fails with a model/provider error or aborted request before work begins (including local-model
310
+ memory-limit failures), the hub retries once with the model originally declared in the persona
311
+ frontmatter. For **write-capable** runs this is pre-work only: no fallback occurs after text
312
+ output, a tool call, cancellation, timeout, drift stop, or a Pi process-spawn failure, avoiding
313
+ duplicate writes. **Read-only children and research helpers** (tools limited to
314
+ `read,grep,find,ls`) also retry once when the provider fails *mid-run* — re-running a reader
315
+ repeats nothing, and those are exactly the children that exist to protect their parent's context,
316
+ so losing one to a local-endpoint OOM halfway through discards work for no safety gain. A
317
+ terminated run (watchdog, deadline, cancellation) never retries either way: that is a verdict on
318
+ the work, not a provider outage. The failed attempt is removed from the child session before retry. Per project,
319
+ `model.<persona>:` / `models.<persona>:` keys under `## agent-hub` in
320
+ `.ai/agent-fleet-overrides.md` replace a persona's default model / candidate list.
321
+ Research personas (`researcher` / `deep-researcher`, `kind: research`) are switchable the same
322
+ way — `/af-agent-model <persona>` and `/af-agent-model-thinking <persona>` accept them alongside team
323
+ members. Since research helpers are spawned fresh through `spawn_research`, the switch lands on
324
+ their next spawn (there is no running instance to `/af-agents-restart`).
325
+ `/af-agent-models-substitute [<source> <target>]` saves a runtime source → target mapping for
326
+ the current session. With no arguments it opens the same two-step visual picker as `m` in Fleet
327
+ Dashboard: first choose a source from every model configured across persona defaults, candidates,
328
+ fallbacks, and delegate sub-roles; then choose a target from Pi's currently available models. The
329
+ two-argument form performs the same operation directly. The mapping is resolved when work is
330
+ spawned rather than eagerly copied into today's roster, so team members, research personas, and
331
+ delegate sub-roles activated or created later in the session inherit it automatically. Existing
332
+ runs are not interrupted, and all mappings reset at the next `session_start`.
333
+ - **Thinking levels** — each persona's frontmatter `thinking:` sets its pi `--thinking`
334
+ reasoning effort (`off` · `minimal` · `low` · `medium` · `high` · `xhigh`). `/af-agent-model-thinking
335
+ <persona>` switches it among those six levels for the session; like a model switch it takes effect
336
+ on the persona's next dispatch (`/af-agents-restart <persona>` applies it now), and selecting the
337
+ frontmatter default clears the override. The level shows as a short badge after the model
338
+ everywhere a model is rendered — `gpt-5.5 (xh)` in the dashboard (`min`/`low`/`med`/`hi`/`xh`; `off` shows no badge). Per project, a `thinking.<persona>:` key
339
+ under `## agent-hub` in `.ai/agent-fleet-overrides.md` replaces a persona's default level.
340
+ - **Mid-turn delegation (`delegate` tool)** — a persona that declares a `subagents:` map in its
341
+ frontmatter (`role: { model, tools? }` entries, or an indented `model:`/`tools:` block per role)
342
+ gets a real mid-turn `delegate(role, instruction, context?, allow_write?)` tool, injected as an
343
+ extra `-e delegate.ts` extension into its spawned process (the `delegate` tool name is appended to
344
+ its `--tools` allowlist — pi filters extension tools too). Only declared roles are spawnable, on
345
+ their declared models — model choice is configuration, never the child LLM's. Budgets are readable
346
+ refusals: at most 4 delegate children per dispatch, tree-wide, and a per-persona `delegate_depth:`
347
+ budget capped at 1 (the default). Children spawned with remaining depth 0 do not receive the
348
+ `delegate` extension/tool. Write safety: children run read-only (`read,grep,find,ls`) unless a
349
+ SINGLE live child gets `allow_write: true`, which inherits the parent's tools intersected with the
350
+ role's `tools:` cap; if a declared role cap leaves no available tools, delegation is refused.
351
+ Concurrent children are always forced read-only. Children stream timeline events through
352
+ `.pi/agent-sessions/delegations/<persona>/events.jsonl`; the hub tails it and renders nested rows
353
+ under the parent's card (child id, model, tokens, status),
354
+ each openable with `/af-zoom <child-id>`. Each child also writes its full final output to
355
+ `.pi/agent-sessions/delegations/<persona>/results/<childId>.md`; the parent receives only status,
356
+ a required final `DIGEST:` section (≤30 lines with path:line citations), and the result-file path.
357
+ If a child omits `DIGEST:`, the parent gets the first ~30 lines plus a no-DIGEST warning and the
358
+ result path. Spend rolls up: every child row and the parent's subtree
359
+ total show tokens, and a session-wide `Δ delegated` counter sits in the status line.
360
+ `/af-agents-kill` on the parent SIGTERMs its whole process group, so the delegation tree dies with
361
+ it. `context: fork` is accepted but treated as a summary brief in v1. Per project,
362
+ `subagents.<persona>.<role>:` and `delegate-depth.<persona>:` keys under `## agent-hub` in
363
+ `.ai/agent-fleet-overrides.md` replace individual sub-roles / the depth budget. An overridden
364
+ role retains its frontmatter model as a one-shot fallback under the same pre-work-only safety
365
+ rule; delegate cards and results show the model that ultimately ran. Six personas ship with
366
+ declared sub-roles, on a three-tier OpenAI model ladder — `gpt-5.3-codex-spark` for
367
+ recon/grep sweeps, `gpt-5.4` for analysis sweeps, the `gpt-5.5` (or opus) parent reserved for
368
+ synthesis and verdicts:
369
+ - `code-reviewer` — `preflight`+`docs` (spark), `quality`+`perf` (gpt-5.4); its first delegate
370
+ call is always `preflight`, which studies the project rules and the files under review and
371
+ returns a summary that drives the rest of the fan-out. Deep security review is not a
372
+ sub-role — it belongs to the separate `security-auditor` persona, which the reviewer
373
+ recommends dispatching when it spots deeper risk.
374
+ - `planner` — `scout`+`rules` (spark) fan out before the plan is drafted; `risk` (gpt-5.4)
375
+ optionally challenges the draft breakdown.
376
+ - `plan-reviewer` — `feasibility` (gpt-5.4) checks plan claims against the actual codebase;
377
+ `deps` (spark) verifies dependency ordering and file overlap. No preflight — the plan is
378
+ the map.
379
+ - `security-auditor` — solo `recon` (spark) maps the attack surface first, then
380
+ `input-sweep` (gpt-5.4) and `secrets-sweep` (spark) fan out; exploit reasoning stays with
381
+ the parent.
382
+ - `builder` — `recon` (spark) maps call sites before edits; `verifier` (spark, the one
383
+ `allow_write: true` child) runs the test suite after them. Implementation is never
384
+ delegated.
385
+ - `test-engineer` — `coverage-scout`+`conventions` (spark) inventory gaps and test patterns;
386
+ test writing is never delegated.
387
+ - **Default damage-control guardrails** — `just fleet` and `just fleet --no-coms` load the
388
+ `damage-control-continue` harness before `agent-hub`, so dispatcher tool calls are checked against
389
+ `.pi/damage-control-rules.yaml` and a blocked call feeds back instead of aborting the turn. A
390
+ guardrail is also re-loaded into every native specialist, research helper, and nested delegate
391
+ (see [Safety scope](#safety-scope)). Missing safety plumbing refuses child dispatch.
392
+ - **Embedded coms** — the dispatcher is a discoverable peer on the local machine. Multiple
393
+ `agent-hub` (or plain `coms`) sessions on the same box find each other through per-project registry
394
+ files and exchange messages over a unix socket (named pipe on Windows).
395
+
396
+ `/af-zoom <name|rN|child-id>` opens the selected agent's full-screen stream detail. For fleet rows,
397
+ it uses the [Fleet Dashboard detail controls](#fleet-dashboard-and-detail); a directly addressed
398
+ fallback stream keeps the legacy zoom controls. Both overlays size to the terminal.
399
+
400
+ ### `/af-agents-history`
401
+
402
+ `/af-agents-history` (or **`h`** while the Fleet Dashboard is open) opens a read-only overlay (same chrome as `/af-zoom`) that replays the session as an
403
+ execution **tree**:
404
+
405
+ - **Orchestrator turns** — each dispatcher turn that actually dispatched something is a depth-0 row
406
+ labelled `(dispatcher)`. Chat-only turns add no rows.
407
+ - **Dispatched specialists and research helpers** nest one level beneath the turn that launched them;
408
+ **delegate sub-sub-agents** nest one level deeper still under the specialist that spawned them — in
409
+ start order at every level.
410
+ - **Parallel runs** — siblings whose run times overlap are marked with a `│→` connector, so a
411
+ concurrent fan-out reads as a visually grouped block.
412
+ - **Real-work durations** — each row shows that node's *own* work: its span **minus the time it spent
413
+ awaiting children**. A dispatcher blocked on six concurrent agents is credited only for the time it
414
+ actually worked between/around the awaits, never for the await itself — so the same wall-clock isn't
415
+ counted twice up the tree. The same subtraction applies to a specialist awaiting its own delegate
416
+ children. Format: plain seconds under a minute (`42sec`), `m:ss` above it (`10:20min` for 620s).
417
+ Running rows tick live (the overlay re-renders once a second) and a new dispatch appears the instant
418
+ it starts.
419
+ - **Footer** shows `Σ real work <total> · <n> runs (agents <a> + dispatchers <d>)` — the real work of
420
+ *everyone*: the dispatched specialists' and research helpers' full runtime (`agents`) plus each
421
+ dispatcher turn's own work (`dispatchers` — its span minus the time it awaited agents **and** the
422
+ human via `ask_user`). Wall-clock is deliberately **not** shown: it would fold in the idle gaps
423
+ while you're away between turns, and `ask_user` waits are subtracted for the same reason.
424
+
425
+ Navigate with `↑/↓`, press `G` to jump back to the live tail, and `Q`/`Esc` to close. The log resets
426
+ on each session start.
427
+
428
+ The default agent view includes a collapsed fleet summary below the editor. When the installed public
429
+ SDK editor contract can be positively verified, an empty focused editor can activate its bounded
430
+ inspection window with the registered `Alt+I` shortcut; the same chord collapses it, and `j`/`k`
431
+ select. Enter opens detail, while `x`/`r` use the same two-press confirmation and ownership checks as
432
+ the dashboard. Plain and Alt arrow keys remain editor input unchanged and exactly once. Existing
433
+ `Alt+M` and `Alt+A` shortcuts continue to open the work-mode picker and Fleet Dashboard exactly once
434
+ from either widget state. Autocomplete, paste, key release,
435
+ non-empty/unfocused editors, modal UI, RPC/print/headless modes, and unsupported custom editors do not
436
+ activate it; unsupported environments retain a noninteractive summary without a key hint. The window
437
+ uses at most `floor(terminal.rows / 3)` rows including chrome, retains completed/error runs for exactly
438
+ 10 seconds (or while the same selected run is pinned), and separates active peers from task counts.
439
+ Both fleet surfaces scrub terminal controls and size Unicode by display cells. A confirmed coms kill
440
+ aborts only the local request—the confirmation explicitly notes that the peer pane keeps running.
441
+ The coms pool panel remains at the **bottom of the Fleet Dashboard**.
442
+
443
+ ### Work Mode picker
444
+
445
+ Press **`Alt+M`** or run **`/af-work-mode`** to open the work mode picker:
446
+ **operator** (direct tools) or **orchestrator** (delegate-only). Arrow keys move, Enter applies,
447
+ and Esc cancels with no change. Switching to Orchestrator with no agents auto-loads the first valid
448
+ configured team. On macOS, the outer terminal must send Option as Meta or Alt+M will not reach
449
+ the Hub. In Terminal.app, enable **Use Option as Meta key** under **Settings → Profiles → Keyboard**
450
+ for the profile used by the window. If Option+M inserts `µ`, this setting is not enabled. `Command+M`
451
+ is Terminal.app's Minimize shortcut, not a Fleet shortcut. For details, see the
452
+ [macOS terminal note](../../../docs/pi-extensions.md).
453
+
454
+ ### Fleet Dashboard and detail
455
+
456
+ Press **`Alt+A`** or run **`/af-agents-list`** to open the full-screen **Fleet Dashboard**. It is a
457
+ live overlay backed by the same fleet source as the compact widget and lists specialists, true nested
458
+ delegates, running research helpers, and coms peers. Dashboard filtering remains independent from the
459
+ widget, and `/af-zoom` continues to use an unfiltered key lookup.
460
+ The bordered **coms** panel is pinned to the bottom of this overlay. The dashboard shows status,
461
+ hierarchy, model, context/tokens, elapsed time, tool count, and recent work; its summary counts
462
+ running/done/failed rows, overlap-aware wall time, and visible token totals. Finished/idle/stale
463
+ rows are hidden by default.
464
+
465
+ - **`↑`/`↓`** or **`j`/`k`** selects a row; **`PgUp`/`PgDn`** pages; **Enter** opens its full-screen
466
+ detail view. **`h`** opens the same history overlay as `/af-agents-history` (Esc/`q` returns to the dashboard).
467
+ - **`f`** starts a name/model/recent-work filter; type the query and press **Enter** to apply it, or
468
+ **Esc** to clear it. **`a`** toggles finished rows.
469
+ - **`x`** requests a kill and **`r`** requests a restart; press the same key again within two seconds
470
+ to confirm. Kill acts on a local running specialist, a coms-backed specialist, or a research helper.
471
+ Confirmed restart terminates a running specialist when necessary, clears its session, and re-dispatches
472
+ its previous task fresh; it is refused for peer/delegate/research rows and rows with no previous task.
473
+ If a research detail view is already open when that helper finishes, it stays as a read-only terminal
474
+ snapshot until Esc; returning to the dashboard shows no completed research row.
475
+ - **`q`** or **Esc** closes the dashboard.
476
+
477
+ The detail view streams the selected local agent's assistant text, provider-emitted thinking, tool
478
+ arguments, and tool results (including success/error and duration). Normal events request an immediate
479
+ render; a 2-second ticker recovers missed file notifications and advances elapsed time. Use **`v`** to
480
+ switch between scan-friendly **Compact** rows and wrapped **Verbose** output. The choice is preserved
481
+ while drilling into other rows in the same open dashboard.
482
+
483
+ Use **`↑`/`↓`**, **`PgUp`/`PgDn`**, and **Home**/**End** to navigate. Manual movement pauses tail-follow;
484
+ **End** restores it. **Enter** expands a selected tool row in Compact mode and **Ctrl+C** copies the
485
+ selected entry. **`m`** replaces the log area with a full-screen picker containing every model currently
486
+ reported by Pi's available-model registry. Use **`↑`/`↓`**, **`PgUp`/`PgDn`**, or **Home**/**End**, then
487
+ **Enter** to apply; **Esc** cancels back to the logs.
488
+
489
+ Each local run also writes an append-only transcript under `.pi/agent-sessions/transcripts/`. The
490
+ directory/file permissions are owner-only (0700/0600 where the platform supports them), large events
491
+ are chunked, and the live in-memory window is bounded. Common authorization headers, API keys, access
492
+ tokens, passwords, provider tokens, and private-key blocks become `[REDACTED]` **before both persistence
493
+ and display**. This is pattern-based protection, so operators should still avoid deliberately printing
494
+ unknown secret formats.
495
+
496
+ “Thinking” means only text explicitly emitted by the provider/runtime; hidden model reasoning is not
497
+ available, and personas with thinking disabled have no thinking rows. Model switching works for local
498
+ specialists, a currently running research helper, and nested delegate roles. It applies on the next dispatch or
499
+ continuation and never interrupts a running child. A coms-backed specialist stores the choice for native
500
+ fallback runs; external coms peers control their own model, have no picker, and have no local transcript.
501
+ **Esc**/**`q`** returns to the dashboard. **`/af-zoom <name|rN>`** opens this same detail view directly.
502
+
503
+ ### Version footer
504
+
505
+ `agent-hub` renders its local harness version first in its custom footer:
506
+ `agent fleet v<version> · <model><thinking> · <team>`. It replaces pi's default footer, so it does **not**
507
+ consume or render the shared version status; it reads its own adjacent stamped manifest directly.
508
+ The three persistent-UI harnesses (`agent-hub`, `coms`, and
509
+ `damage-control-continue`) still register that one shared key, which gives default footers one
510
+ version in stacked non-hub sessions. In the supported guardrail-plus-hub stack, the hub's custom
511
+ footer supplies the single visible version. Damage-Control can update its own safety status after
512
+ a violation without overwriting the shared version entry. The canonical source is the
513
+ repository-root `package.json`; the adjacent harness manifest is a synchronized stamp maintained
514
+ by `bin/sync-harness-versions.js`. Its local `version.ts` reader intentionally stays with the
515
+ harness for copied or symlinked installs, but those installs still need the pre-existing full
516
+ `.pi/harnesses/` dependency installation.
517
+
518
+ The `agent fleet` half of the label is an OSC 8 terminal hyperlink to the project homepage —
519
+ clickable in terminals that support hyperlinks, ignored (rendered as plain text) elsewhere, and
520
+ free of footer columns because pi strips OSC sequences before measuring width. It opens the
521
+ repository in a browser, not a TUI panel: pi has no mouse tracking, so a click never reaches the
522
+ harness. `AGENT_FLEET_NO_LINKS=1` restores the plain label on multiplexers that mangle OSC 8
523
+ (GNU screen, tmux before 3.4).
524
+
525
+ ### Voice dictation indicator
526
+
527
+ The custom footer renders the optional [`pi-voice-stt`](../../extensions/pi-voice-stt/README.md)
528
+ extension's recording indicator on a line **below the model line** — e.g.
529
+ `● REC 0:01 ⏎ send · esc cancel` while recording, or a `transcribing…` dot. Because agent-hub
530
+ replaces pi's built-in footer (where that indicator normally lives), it reads the extension's
531
+ `setStatus("voice-stt", …)` value via the footer data provider and surfaces it itself. The
532
+ indicator only appears once `pi-voice-stt` is installed and configured; otherwise the footer is
533
+ the single model line. Press **`Alt+S`** to start/stop dictation as in a normal pi session.
534
+
535
+ ## Configuration
536
+
537
+ At session start, `agent-hub` reads `.ai/agent-fleet-overrides.md` in the workspace. The
538
+ canonical section name is `## agent-hub` (the legacy `## agent-team` name is still accepted):
539
+
540
+ ```markdown
541
+ ## agent-hub
542
+ # Replace Bulgarian with any language name.
543
+ language: Bulgarian
544
+ ```
545
+
546
+ Omit the section to keep the default `English`. `language` applies to dispatcher replies,
547
+ `ask_user` questions and `context` fields, handoff summaries, and user-facing status text;
548
+ specialist task strings stay in English.
549
+
550
+ The same section can point the team at the project's own rule files and documentation
551
+ entry points:
552
+
553
+ ```markdown
554
+ ## agent-hub
555
+ rules: docs/rules, .ai/rules
556
+ docs: Docs/AGENTS.md, Docs/architecture/ARCHITECTURE_OVERVIEW.md
557
+ ```
558
+
559
+ `rules:` lists repo-relative folders of HOW rules — implementation patterns the work must
560
+ comply with. Resolution is **index-first**: a folder with a top-level `README.md`/`index.md`
561
+ is treated as curated — personas read the index first and follow its loading manifest
562
+ (session bundles, conditional-load lists) instead of bulk-reading the tree; a folder without
563
+ an index is searched **recursively** through all subfolders. When set, every dispatched
564
+ specialist's system prompt gains a "Project rules" block naming the folders and the
565
+ resolution order; the planner and code-reviewer personas additionally validate their subject
566
+ against the relevant rules and pass them on (cited in plan acceptance criteria / handed to
567
+ delegate sub-reviewers).
568
+
569
+ `docs:` lists repo-relative WHAT/WHY documentation entry points — canonical files (e.g. an
570
+ `AGENTS.md`, an architecture overview) or doc folders (personas start from the folder's
571
+ README/index). Docs orient rather than bind: every dispatched specialist **and every research
572
+ helper** gains a "Project docs" block telling it to read the entry points relevant to its
573
+ task and follow their links instead of bulk-reading doc trees. The code-reviewer flags
574
+ changes that alter documented behavior without a doc update; the documenter treats the entry
575
+ points and the trees they link as the documentation it maintains.
576
+
577
+ `research-keep:` is **removed**. An existing key warns at session start and has no effect; delete it.
578
+ Live research helpers disappear from the Fleet Dashboard when they finish. Session/transcript/findings
579
+ files and `/af-agents-history` records remain.
580
+
581
+ ### Bounded local-disk searches
582
+
583
+ Every `read`, `grep`, `find`, and `ls` call made by a native research helper or a nested
584
+ `delegate` child has a **parent-side** watchdog. The default is **120 seconds per tool call**;
585
+ it is a per-tool bound, not a whole-run deadline — the whole-run bound is the execution
586
+ mode's per-run deadline below. Configure it in the repository-standard overrides file:
587
+
588
+ ```markdown
589
+ ## agent-hub
590
+ recon-search-timeout-s: 120 # integer 1..3600
591
+ # recon-search-timeout-s: off # disable this per-tool watchdog
592
+ ```
593
+
594
+ Invalid values warn at session start and use 120. Calls are tracked independently by their
595
+ JSONL `toolCallId`; a repeated start/update cannot extend an existing deadline. A timeout returns
596
+ `tool_timeout` with the call metadata, ends the research/delegate lifecycle, sends SIGTERM to the
597
+ child's explicitly owned process group, then SIGKILL after a finite grace period. The parent also
598
+ has a final settlement timer, so it settles rather than waiting indefinitely for `close` or
599
+ inherited pipe drain. If child/process-group death cannot be confirmed after this bounded cleanup,
600
+ the timeout metadata reports `terminationConfirmed: false`: this prevents the parent hanging, but
601
+ may indicate an uninterruptible OS-level process that needs operator attention. This group
602
+ ownership covers descendants even when the pi leader exits first; nested delegates own their groups
603
+ and forward parent cancellation, avoiding detached-orphan processes. Caller
604
+ cancellation follows the same bounded cleanup path but is reported as `cancelled`, not
605
+ `tool_timeout`.
606
+
607
+ ### Task-tier budgets
608
+
609
+ The hub runs **per-user-turn budgets enforced in code**, not prose, keyed off the current
610
+ **task tier**. This is the guardrail against runaway orchestration (the observed failure
611
+ mode: 100+ dispatches and 100M+ tokens for one task, most of it re-billed stale specialist
612
+ context).
613
+
614
+ | Budget (per user turn) | trivial | small | feature | project |
615
+ |-----------------------------------|---------|-------|---------|---------|
616
+ | `dispatch_agent` calls | 1 | 2 | 8 | 12 |
617
+ | `spawn_research` calls | 1 | 2 | 4 | 6 |
618
+ | Turn wall clock | 15 min | 15 min| 60 min | 90 min |
619
+ | Per-run deadline (specialist/research/delegate) | 10 min | 10 min | 30 min | 30 min |
620
+ | Specialist session recycled after | 3 runs | 3 runs| 5 runs | 5 runs |
621
+ | Nested delegation | off | off | on | on |
622
+
623
+ When a budget is exhausted, the runtime pauses `dispatch_agent`/`spawn_research` and opens
624
+ one localized Yes/No confirmation through the existing `ask-user-remote` wrapper. If the wrapper
625
+ is unavailable, it uses a local dialog; without either channel it stops. **Yes** renews the budget
626
+ and continues the original operation without another model call. Concurrent refusals share one
627
+ question and one renewal. **No**, cancellation, or confirmation failure latches a task-scoped stop
628
+ and aborts the parent loop. Only the human's `/af-budget-continue` command reopens that question;
629
+ the command itself neither grants budget nor dispatches work. Prose and magic-marker tool calls
630
+ cannot authorize renewal. A normal new user message still opens a fresh turn window, but cannot
631
+ clear a declined confirmation. Time blocked in any `ask_user` question is
632
+ excluded from the turn wall clock, so a slow human answer cannot exhaust the next dispatch.
633
+ Raise the task with `set_task_tier` when the work outgrew the current envelope. Override keys
634
+ in `.ai/agent-fleet-overrides.md` are a **ceiling** (`min` with the tier); `off` stays at the
635
+ tier rather than lifting the cap. A leftover `mode:` key is ignored with a warning.
636
+
637
+ ```markdown
638
+ ## agent-hub
639
+ max-dispatches-per-turn: 8 # integer ceiling, or off (stays at the tier)
640
+ max-research-per-turn: 4 # integer ceiling, or off (stays at the tier)
641
+ turn-wall-time-s: 3600 # integer ceiling, or off (stays at the tier)
642
+ agent-turn-timeout-s: 1800 # whole-run deadline per spawned run; integer or off
643
+ session-recycle-runs: 5 # recycle a specialist session after N resumed runs; integer or off
644
+ run-history-keep: 10 # previous sessions' artifact archives to retain; integer or off
645
+ ```
646
+
647
+ #### Task budget (the bound a turn window cannot provide)
648
+
649
+ A per-message allowance cannot bound a task. In the run this guardrail comes from, every
650
+ steering message opened a fresh window of 8 dispatches and 60 minutes, so no counter ever
651
+ bound: one workspace stayed open **47 hours**, while the same change made in a narrow
652
+ workspace took **13 minutes**.
653
+
654
+ So there is a second envelope, **`TASK_BUDGET_MULTIPLIER` (3) × the turn envelope**, whose
655
+ counters are **not** reset by a user message:
656
+
657
+ | | per turn (`feature`) | per task |
658
+ |---|---|---|
659
+ | `dispatch_agent` | 8 | 24 |
660
+ | `spawn_research` | 4 | 12 |
661
+ | clock | 60 min wall | 180 min **active** |
662
+
663
+ Exhausting it is a **hard stop**: the refusal says so, and another user message does not
664
+ reopen it. The hub asks one localized Yes/No `ask_user` question. **Yes** opens one audited
665
+ continuation tranche and resumes directly; it resets the task dispatch/research counters,
666
+ active-time clock, review allowance, and the current turn budget while preserving the task
667
+ tier, assertion ledger, capability packs, label, blockers, and accumulated progress. **No**
668
+ (or cancellation) stops. Each accepted tranche appends `agent-hub-budget-continuation` with
669
+ bounded prior usage, allowlisted process/session/pane identity, and runtime task/tranche/request
670
+ correlation. A reset invalidates pending answers; late or repeated answers cannot renew another task.
671
+ `/af-poll` and `/af-debate` use the same runtime confirmation gate for task and turn budgets.
672
+
673
+ `set_task_tier` with `new_task: true` remains the lifecycle action for genuinely different work.
674
+ It clears task identity/state as well as counters and appends an `agent-hub-task-reset` audit
675
+ entry. Do not use it merely to continue the same task. The status chip still shows both turn and
676
+ task usage (`… · task 4/18`).
677
+
678
+ The reasoning: three full envelopes still require an explicit human decision, but that decision
679
+ is now a single confirmation rather than a fake new task followed by a second message.
680
+
681
+ Both turn and task clocks charge **active time only** — turns that actually ran, minus the
682
+ time the dispatcher sat blocked on `ask_user`. Inter-turn idle costs nothing, because no turn
683
+ is open across it. Raw wall clock would bill a lunch break, an overnight pause, and every long
684
+ human answer against the task; at `fast` mode's 45-minute envelope a coffee break would
685
+ hard-stop a task with two dispatches spent. A false stop is worse than no stop — it teaches
686
+ people to reset the task window reflexively, and that reset is the one thing that has to
687
+ stay deliberate. Dispatch and research counts remain the honest hard stops.
688
+
689
+ The **auto-research pipe** (specialist emits `NEEDS_RESEARCH`, the hub fans out read-only
690
+ helpers in code) stays exempt from the TURN budget — it is hub mechanics, not a dispatcher
691
+ decision, and it must not steal the dispatcher's slots — but it **is** charged against the
692
+ task envelope. At 2 rounds × 4 questions per dispatch and 18 dispatches per task, leaving it
693
+ uncounted would have put 144 research runs inside the bound that is supposed to be the outer
694
+ one. When the task's research envelope is spent the pipe does not spawn and the specialist is
695
+ not resumed; the dispatch result says so.
696
+
697
+ Two related always-on behaviors: specialist **context pressure is measured over
698
+ input + cacheRead + cacheWrite** (resumed sessions re-send their whole accumulated context
699
+ as cache reads — counting `input` alone hid that entirely), and a specialist session is
700
+ **recycled** (fresh session, no `-c` resume) once it has served `session-recycle-runs` runs
701
+ or its measured context passes 60%. The dispatch result notes the recycle so the dispatcher
702
+ knows the specialist starts without session memory — task text and `artifacts:` paths must
703
+ carry the state, which the deliverable-to-file protocol already ensures.
704
+
705
+ Context is measured against **that agent's own** model window, resolved from pi's model
706
+ registry (`ctx.modelRegistry.find`) with the source recorded on every resolution. Dividing a
707
+ 49k local model's usage by the dispatcher's window is what produced unactionable readings
708
+ like `⚠ Planner context at 315%`; a reading above 100% now emits a one-time diagnostic that
709
+ names the window and where the number came from, so a mis-resolved window is distinguishable
710
+ from a genuine overflow. Two recycle rules follow from it: a session at or past a **full**
711
+ window is recycled unconditionally (no threshold override keeps it alive), and a resumed
712
+ session whose *projected* prompt — prior tokens plus this task — would overflow is recycled
713
+ **before** the spawn instead of after the run.
714
+
715
+ #### Per-provider concurrency
716
+
717
+ A dispatch may fan out to four delegate children at once and several specialists can be
718
+ mid-run, with nothing bounding how many requests land on one provider. That is fine against
719
+ a hosted endpoint and not against a local one. Requests are capped per process — **2 in
720
+ flight for `custom/*` and `omlx/*` by default, unlimited elsewhere**:
721
+
722
+ ```bash
723
+ AGENT_HUB_PROVIDER_LIMITS="custom=4" # raise the local cap
724
+ AGENT_HUB_PROVIDER_LIMITS="custom=off" # disable it
725
+ AGENT_HUB_PROVIDER_LIMITS="custom=2,ollama=1"
726
+ ```
727
+
728
+ Queued runs still execute — they wait for a permit, and the wait is announced rather than
729
+ looking like a hang. The cap applies per **level** of the delegation tree (each pi process
730
+ runs its own semaphore over the children it spawns), and a nested spawn reuses its parent's
731
+ permit, so a child can never wait on its own ancestor. The drift judge and the return
732
+ extractor are deliberately ungated: both run while a specialist holds a permit, so queueing
733
+ them behind it would stall the watchdog meant to stop it.
734
+
735
+ The per-run deadline lands as `turn_timeout` (exit 124) with partial output preserved, for
736
+ dispatched specialists, research helpers, and nested delegate children alike — a hung child
737
+ can no longer hold its parent for hours.
738
+
739
+ ### Task triage (complexity tiers)
740
+
741
+ The dispatcher classifies the current TASK with the `set_task_tier` tool BEFORE its first
742
+ dispatch — `trivial` / `small` / `feature` / `project` — and that classification *is* the
743
+ budget envelope (see the table above). The tier shows in the `hub-tier` status chip
744
+ (`Tier: small · …`), with a trailing `?` while it is only assumed.
745
+
746
+ Skipping the call makes the hub assume **`small`**, not `feature`. Because the tier is
747
+ task-scoped, a skipped triage latches for the whole task — and skipped triage is precisely
748
+ the case where the dispatcher was not thinking about proportionality. Assuming `feature`
749
+ there would unlock planner/plan-reviewer/security-auditor, loosen the review caps, and hand
750
+ out the full feature envelope: the over-apparatus failure mode, granted by forgetting a tool
751
+ call. Assuming `small` costs one explicit escalation when the work really is bigger, which
752
+ is the cheap direction to be wrong in. An assumed tier is not a ratchet baseline either: the
753
+ dispatcher's own first `set_task_tier` is treated as an initial declaration, so it never
754
+ needs a `reason` it had no way to know it needed.
755
+
756
+ The tier is **task-scoped and ratcheted**. It survives the user's next message, and it
757
+ moves in one direction cheaply: **lowering it is always free, raising it requires a
758
+ `reason`** naming what the ask turned out to contain (refused in code otherwise). A
759
+ turn-scoped tier could not bind on a steered run — every correction reset it to null, the
760
+ next dispatch re-assumed `feature`, and the effective tier drifted to the ceiling, because
761
+ nobody ever re-declares `trivial` after a steering message.
762
+
763
+ Three guards are enforced in code, not prose:
764
+
765
+ - **Duplicate-dispatch guard** — refuses re-dispatching the same agent with a
766
+ near-identical task inside one turn.
767
+ - **Tier persona gate** — at `trivial`/`small`, `dispatch_agent`/`spawn_research` refuse
768
+ `planner`, `plan-reviewer`, `architect`, `security-auditor` and `deep-researcher`
769
+ (`run-budget.js`). Each opens a document/finding loop whose output then has to be
770
+ executed and re-reviewed; the escape hatch is raising the tier *with a reason*, not a
771
+ flag. The refusal costs no budget slot.
772
+ - **Review round cap** — review dispatches per TASK are capped by tier (trivial/small 1,
773
+ feature 2, project uncapped) and the (N+1)-th is refused without spending a budget slot.
774
+ This is where the review ratchet is actually cut: findings become requirements and the
775
+ enlarged requirement set justifies the next round, so the round is the thing to bound.
776
+ - **Review finding budget** — a review persona's dispatch carries a blocking-finding cap
777
+ tied to the tier (trivial 1, small 2, feature 5, project uncapped) plus the rule that a
778
+ blocking finding may only enforce an invariant the task/plan/rules already state. The hub
779
+ **counts** what came back (`review-findings.js`) and appends a visible notice when the
780
+ return exceeds the cap — it never reclassifies a finding. No rule the hub can evaluate
781
+ distinguishes "invents a manifest nobody asked for" from "this logs a connection string";
782
+ both are a heading and a bullet, and silently demoting the second by position would, on
783
+ the day it matters, move a real security finding into the section nobody acts on.
784
+
785
+ Every budget/gate refusal is counted in `/af-hub-report`.
786
+
787
+ ### Docs lane (`docs-lane.js`)
788
+
789
+ A dispatch whose declared `scope` is documentation only — `Docs/**`, `**/*.md`,
790
+ `artifacts/evidence/*.png`, `.changeset/**` — runs in the single-worker docs lane:
791
+
792
+ - dispatching a review persona (`code-reviewer`, `plan-reviewer`, `security-auditor`,
793
+ `test-engineer`) on it is **refused** and costs no budget slot;
794
+ - any other persona's result carries a note telling the dispatcher not to open a review
795
+ gate for it.
796
+
797
+ An absent or empty `scope` is never the lighter lane — unknown is not docs. The refusal is
798
+ overridable per dispatch with `review_reason: "<why>"` for the cases that do warrant a gate
799
+ (the doc publishes a credential, or states a contract other systems depend on).
800
+
801
+ ### External-blocker stop (`external-blocker.js`)
802
+
803
+ A specialist that cannot proceed without something outside the fleet's reach — an account,
804
+ a permission, a deployment credential, a telemetry destination, a console-only action —
805
+ emits `EXTERNAL_BLOCKED: <what is missing, who owns it, what it blocks>` (the protocol is
806
+ injected into every specialist prompt). The hub records it and **refuses the next
807
+ dispatch/research** with an owner-escalation packet: what is missing and who owns it, which
808
+ assertions are blocked, what is already proven and where, and the human's options (provide
809
+ access / waive as UNPROVEN / drop from scope).
810
+
811
+ The gate opens when the human has been addressed — an `ask_user` call, or the next user
812
+ message. Without `ask_user` installed it fires exactly once, so a session that cannot reach
813
+ the human can still finish and report instead of deadlocking.
814
+
815
+ This exists because the alternative is the most expensive failure mode observed: with no
816
+ correlation destination available, a run kept substituting internal work for the missing
817
+ external fact — scripts, manifests, fixtures, diagnostic packets — for hours, and the
818
+ assertion still ended UNPROVEN.
819
+
820
+ ### Immutable per-run artifact namespaces (`run-namespace.js`)
821
+
822
+ Session start used to `rm -rf` `.pi/agent-sessions/artifacts/`, and specialist returns were
823
+ named by a per-session counter (`returns/builder-run1.md`). Both halves of that failed at
824
+ once: the next session's `builder-run1.md` claimed the same path as the previous one's, and
825
+ the wipe deleted the originals first — a post-mortem had to record eleven implementation
826
+ returns and two review artifacts as NOT RECOVERABLE.
827
+
828
+ Now each session **archives** the previous session's artifacts into
829
+ `.pi/agent-sessions/runs/<runId>/artifacts/` — a namespace written once and never reused —
830
+ alongside a read-only `meta.json` (run id, archive time, project, workspace, per-kind
831
+ artifact counts) and an appended `runs/index.json`. `runId` is a sortable UTC timestamp plus
832
+ a random suffix, so two sessions starting in the same second still get distinct namespaces.
833
+ Retention is `run-history-keep` (default 10, `off` keeps everything); an empty artifact tree
834
+ is not archived. If archiving fails the artifacts are **left in place** rather than deleted:
835
+ a stale tree is recoverable, a deleted one is not.
836
+
837
+ ### Drift watchdog (in-flight observation)
838
+
839
+ An armed dispatch is observed **while it runs**, from the same JSON event stream that
840
+ drives the cards — not post-hoc:
841
+
842
+ - **Layer 1 — deterministic rules, zero tokens** (`drift-watchdog.js`): a write/edit
843
+ outside the dispatch's declared `scope` globs, the identical tool call repeated 4×,
844
+ 5 consecutive failed tool calls, or 200 total tool calls in one run.
845
+ - **Layer 2 — LLM judge, escalation only**: when a rule fires (single-flight, 90 s
846
+ success cooldown), a one-shot cheap run (default model: the researcher persona's; override with
847
+ `watchdog-judge-model`) reads the original task + declared scope + recent tool trail and
848
+ answers `VERDICT: ON_TRACK|DRIFTING|STUCK`. An unavailable judge has no verdict:
849
+ it is recorded as `judge_unavailable` and, if the attempt and signal remain live,
850
+ is retried once after 5 seconds with new snapshot/LLM-attempt IDs. A second failure
851
+ is exhausted, not a successful 90-second cooldown.
852
+ - **Intervention**: DRIFTING/STUCK terminates the run as **`drift_stop`** (exit 125,
853
+ partial output preserved) and the dispatch result instructs: re-dispatch ONCE with a
854
+ corrected, narrowed task — never the same task unchanged.
855
+
856
+ Enablement is dynamic. In **operator** work mode, precedence is the `watchdog: true|false`
857
+ param on a single `dispatch_agent` call → a per-agent override (`/af-watchdog builder
858
+ on|off|clear`) → the hub-wide setting (`/af-watchdog on|off|auto`, default `auto`, project
859
+ default via the `watchdog:` overrides key): `on`/`auto` arm and `off` disarms. In
860
+ **orchestrator** work mode, hub `auto`/`on` auto-arms; dispatch `watchdog: false` cannot
861
+ disarm it. Opt out with hub `/af-watchdog off` (or override `watchdog: off`), or a per-agent
862
+ `off`. Read-only research helpers are not monitored — they already run under the per-tool
863
+ watchdog + turn deadline and cannot write.
864
+
865
+ ### Opt-in System 1 drift observations
866
+
867
+ `watchdog-system1: off|shadow|active` in `## agent-hub` defaults to `off`.
868
+ The separate experimental `system1` feature, valid `.ai/system1.json`, a
869
+ caller-injected key and an armed native watchdog are also needed. `shadow`
870
+ runs System 1 independently of the immediately started LLM judge; it cannot
871
+ stop a specialist. `active` is an **uncalibrated experiment in every installed
872
+ workspace**, requiring explicit `watchdog-system1: active` opt-in; default remains
873
+ off. Only advisory `scope` may bypass LLM on provider `on_track` with confidence
874
+ and on-track distribution ≥0.95 and all three predicate probabilities ≤0.05.
875
+ Terminal `loop`, `failures`, and `toolcap` always go to LLM. `/af-watchdog`
876
+ shows `experimental: scope only; G2 not validated`; an unavailable/mismatched
877
+ provider falls back to LLM. Production approved profiles are still empty.
878
+ This is not G2 approval or a safety guarantee: the experiment can miss a scope
879
+ advisory. No automatic hook is added for research, coms or normal Hub requests.
880
+
881
+ The limited **System 1** state includes reviewed task text, normalized
882
+ relative paths, structured tool kinds/outcomes and counters, not tool
883
+ args/commands/bodies or outputs. The existing parallel **LLM judge** still
884
+ receives the original task, scope and a recent trail containing up to 120
885
+ characters of raw tool arguments per call. Review pilot inputs and expected
886
+ tool arguments; unexpected agent actions remain a residual risk. Even task/path
887
+ names can leak information: the intended future pilot is agent-fleet-only,
888
+ without client data or secrets. The native spawn filters the shared
889
+ key from merged child env, not from files or unrelated launchers. The below-chat
890
+ Fleet strip holds the recent S1 result for 10 s; `/af-agents` Enter shows the
891
+ owner check and safe history. `/af-watchdog` shows current readiness and
892
+ blocking reason; `/af-hub-report` separates checks, evaluations and LLM
893
+ attempts from worker token usage; `/af-audit` exposes safe lifecycle/decision
894
+ metadata. Trace lives at `<sessionDir>/artifacts/watchdog/events.jsonl`; a
895
+ crash or unknown usage is not reported as success or zero. The offline G2
896
+ report requires human labels keyed by session/dispatch/attempt/check,
897
+ `snapshotId` **and** `llmAttemptId`; older five-ID labels cannot qualify.
898
+ No routine chat messages or extra model turns are sent for progress.
899
+
900
+ To roll back, set the consumer to `off` for the **next** Hub session; cancel a
901
+ current run normally if needed. G1 requires outbound state and real UI review
902
+ before any shadow pilot. G2 separately requires human-labelled held-out
903
+ session evidence and explicit maintainer approval for a production policy
904
+ profile. Offline tests and demo/doctor readiness do not grant either gate.
905
+
906
+ ### Dynamic teams
907
+
908
+ Rosters start from `.pi/agents/teams.yaml` but are not frozen there:
909
+
910
+ - `/af-agents-add <persona>…` / `/af-agents-drop <persona>…` — restructure the ACTIVE team
911
+ live (drop refuses running or last members; session files are kept for re-adding).
912
+ - `/af-agents-save <name>` — persist the current roster as a named team back into
913
+ `teams.yaml` (targeted block upsert; comments and other teams untouched).
914
+ - `team_adjust` — the dispatcher itself may add/drop a persona **with a stated reason**;
915
+ disabled at trivial/small tiers, capped at 8 roster members, and every change is notified to the
916
+ human. The system prompt is rebuilt each turn, so changes take effect immediately.
917
+
918
+ ### `/af-hub-report`
919
+
920
+ Per-turn cost accounting: dispatches (agent, status, elapsed, billed/output tokens),
921
+ research runs, session recycles, drift stops, and budget/duplicate refusals — for the
922
+ current turn, the last completed turn, and session totals. Billed tokens count
923
+ input + cacheRead + cacheWrite, the same measure the recycler uses. System 1
924
+ usage is reported separately; unavailable metadata remains unknown.
925
+
926
+ Paths that don't exist produce a session-start warning, never an error. The full key list for
927
+ `## agent-hub` (models, sub-roles, depth budgets, persona gate, research retention, watchdog,
928
+ mode/budget keys) is documented in `docs/agent-fleet-setup.md`.
929
+
930
+ ## The coms layer
931
+
932
+ > The runtime coordination protocols this layer implements (sentinels, push over
933
+ > polling, barriers, fan-out digests, racing) are catalogued in
934
+ > [references/fleet-coordination-patterns.md](../../../references/fleet-coordination-patterns.md).
935
+
936
+ ### Fleet tools (herdr)
937
+
938
+ Inside a [herdr](https://herdr.dev) pane with a live server, the dispatcher's tool
939
+ surface additionally gets (absent otherwise, like coms):
940
+
941
+ - `herdr_spawn_peer` — stand up a constrained Fleet peer through the shared peer-launch resolver.
942
+ The peer joins **this session's `--project` pool** (the model cannot override it), and a name
943
+ declared in `.pi/agents/peers.yaml` keeps its declared `runner:`/`extensions:`/`env_file:`,
944
+ including `runner: claude-code`; undeclared explicit shapes may select a Pi persona, identity-only
945
+ Fleet Core peer, or Claude Code. Manifest-declared env is the only env admitted. The peer gets a
946
+ sibling pane in the current workspace/tab, not a second process in the Hub pane. A spawn by name
947
+ therefore produces the same declared agent as a preset launch. A persona peer **boots idle**
948
+ and does nothing until a `coms_send` reaches it, so the call waits (bounded, ~45s) for it to
949
+ register and returns `peer_ready` plus its coms name instead of a bare pane id; on failure it
950
+ returns the pane's last output, which means the peer did not start rather than that it is slow.
951
+ Peers spawned but never addressed are named at turn end and in `/af-hub-report` with a close
952
+ suggestion — closing stays the human's call.
953
+ Mechanism: herdr's `pane.split` takes **no command** — it opens a shell — so the spawn splits,
954
+ waits for the pane's prompt, and types the argv (text and Enter sent separately, because bash
955
+ bracketed paste would swallow a newline). Only `layout.apply` pane nodes carry an argv, which is
956
+ why declarative preset layouts were never affected by this.
957
+ - `herdr_spawn_pane` — create an arbitrary command pane when a constrained/addressable Fleet peer
958
+ is not the desired shape; raw commands are intentionally excluded from `herdr_spawn_peer`.
959
+ Orchestrators may use this for auxiliary processes such as watchers or servers, never to bypass
960
+ delegate-only implementation policy.
961
+ - `herdr_read_pane` — bounded `pane.read` (≤200 lines), read-to-decide on workers/tools;
962
+ messaging still goes through coms, and peer busy state comes from `coms_list`, not from
963
+ reading the screen
964
+ - `herdr_close_pane` — kills a pane; **asks the human to confirm every call**; the
965
+ bash-level `herdr pane close`/`workspace close`/`server stop` verbs are hard-blocked
966
+ for spawned specialists by `.pi/damage-control-rules.yaml`
967
+ - `herdr_notify` — desktop notification to reach the human when they are away
968
+
969
+ This closes the fleet loop: spawn a worker, watch it, notify the human, tear it down —
970
+ without leaving the session. Claude Code panes join the same pool via the
971
+ [coms bridge](../../../docs/claude-code-coms-bridge.md).
972
+
973
+ ### Presence backend (herdr or files)
974
+
975
+ Presence is pluggable, exactly as in the standalone [coms harness](../coms/README.md#presence-backends-herdr-vs-files):
976
+ inside a [herdr](https://herdr.dev) pane with a live server, the ping cycle is replaced by
977
+ push events (`agent.list` + `events.subscribe`) and the hub reports itself into the herdr
978
+ sidebar (`custom_status` = `<name> <pct>% q<depth>`); everywhere else the original 10s
979
+ ping loop runs unchanged. The file registry is written in both backends, and the
980
+ pool-scope boundary is enforced identically.
981
+
982
+ ### Identity
983
+
984
+ Each session registers a coms identity at start-up, resolved in this precedence order:
985
+
986
+ 1. **CLI flags** — `--name`, `--purpose`, `--project`, `--color`, `--explicit`
987
+ 2. **Defaults** — auto-generated name `hub-<id>`, purpose `agent-hub dispatcher`, project
988
+ `default`, a deterministic color derived from the session id
989
+
990
+ Names are de-duplicated per project (`resolveUniqueName`), so two hubs that both want `architect`
991
+ become `architect` and `architect-2`. `--explicit` marks a **private** peer — kept out of every
992
+ pool by default, so it is neither listed nor reachable until a human opts in with `/af-coms --all`
993
+ (see [Pool scope is the reach boundary](#pool-scope-is-the-reach-boundary)). The registry lives
994
+ under `~/.pi/coms/projects/<project>/agents/<name>.json` and is created at runtime.
995
+
996
+ ### Commands & tools (local dispatcher plus coms)
997
+
998
+ - `/af-coms` — coms control surface (peer list / status)
999
+ - `/af-handoff <peer>` — hand the whole session off to a coms peer (see [Handoff](#handoff))
1000
+ - `/af-poll [--panel NAME] [--persona NAME] <question>` — ask every voice in a named model panel (from `.pi/agents/voices.yaml`) the same question. `--panel` wins; else `poll-panel:` in `## agent-hub`; else a refusal listing available panels. Counts as **one** turn-budget dispatch. The main loop gets an immediate `POLL STARTED` receipt (no dispatcher turn), then one `POLL VOICE` line per finished voice, then the digest. Full opinions stay on disk under `.pi/agent-sessions/artifacts/polls/<runId>/`.
1001
+ - `/af-debate [--panel NAME] [--persona NAME] [--rounds N] <question>` — same panel, 2–5 harness-mediated rounds (default 3). Each surviving voice sees the labeled positions of the others from the previous round. There is no judge and no hidden merge. Counts as **one** turn-budget dispatch. Per-round files land under `.pi/agent-sessions/artifacts/polls/<runId>/debate/round-<n>/`.
1002
+ - `/af-compound [focus]` — end-of-session **compound-learning pass**: the dispatcher composes a
1003
+ candidate-lessons brief from the session (corrections, recurring findings, root causes),
1004
+ confirms it with the user, then dispatches the `documenter` to land the approved lessons as
1005
+ minimal diffs on the project's `rules:`/`docs:` targets per `skills/compound-learning/SKILL.md`.
1006
+ Requires the `documenter` persona in the active team; run it before `/af-handoff` or session end.
1007
+ - `coms_list` — discover the peers in your pool: names, models, live context usage, purpose,
1008
+ `pane_id`, and `status` (`idle` | `working` | `booting`). Check status before sending: `working`
1009
+ means your send waits behind the peer's current turn, `booting` means it is not addressable yet.
1010
+ This is the field whose absence drove 127 `herdr_read_pane` calls in one session. Scoped
1011
+ to your project and excluding private peers; the LLM cannot widen it (see
1012
+ [Pool scope is the reach boundary](#pool-scope-is-the-reach-boundary)).
1013
+ - `coms_send` — send a prompt to a peer **in your pool**; returns a `msg_id`
1014
+ - `coms_await` — **block** until that `msg_id`'s reply lands (default 30 min,
1015
+ `PI_COMS_TIMEOUT_MS`)
1016
+ - `coms_get` — **non-blocking** poll of a `msg_id` (status `pending|complete|error`)
1017
+
1018
+ `/af-coms` and `/af-handoff` tab-complete live peer names **in your pool**.
1019
+
1020
+ ### Pool scope is the reach boundary
1021
+
1022
+ The set of peers shown in the pool widget is the security boundary: **a peer is reachable only if it
1023
+ is in your pool.** `coms_list`, `coms_send`, and `/af-handoff` all resolve targets through the same
1024
+ `peersInScope()` helper, so the dispatcher can never message a peer it cannot see. Two knobs define
1025
+ the pool, and **both are human-only** — the LLM cannot widen scope to reach more peers:
1026
+
1027
+ - **Project** — defaults to your own `identity.project`. A human can retarget with `/af-coms --project
1028
+ <name>` (one project) or `/af-coms --all` (every project). `coms_list`'s own parameters cannot
1029
+ override this; an LLM request for a wider project is clamped back to the current pool and flagged.
1030
+ - **Explicit (private) peers** — excluded from every pool by default. `/af-coms --all` opts them in.
1031
+
1032
+ This closes a cross-project leak where a peer reachable through the mesh was *not* shown in the
1033
+ default project-scoped pool — so it could be messaged without being "connected." Now the reachable
1034
+ set is always a subset of what the widget shows. To reach a peer outside the pool, a human widens
1035
+ scope first; the dispatcher is told to **ask** rather than attempt it, and not to pass cross-project
1036
+ context to a peer the human has not approved.
1037
+
1038
+ ### Peer as subagent
1039
+
1040
+ The dispatcher uses a peer as a subagent by pairing the tools: `coms_send(target, prompt)` to
1041
+ issue the task, then `coms_await(msg_id)` to block for the reply (or `coms_get` to poll). This sits
1042
+ alongside `dispatch_agent` — local persona specialists are dispatched as subprocesses; remote peers
1043
+ are reached over coms. The two paths stay explicit for the LLM, but
1044
+ [coms-backed dispatch](#coms-backed-dispatch-dispatch-policyyaml) can route a `dispatch_agent` call
1045
+ to a same-name peer under the hood. (The specialist-level `delegate` tool is a third,
1046
+ nested path: a dispatched specialist spawning its own declared sub-agents — it does not auto-route
1047
+ between local and remote either.) Multi-hop is inherited from coms: a peer handling a dispatched task can `coms_send`
1048
+ onward, hops accumulating up to `MAX_HOPS` (5).
1049
+
1050
+ ### Coms-backed dispatch (dispatch-policy.yaml)
1051
+
1052
+ `just fleet --agents <roster> --peers <preset>` boots the Hub next to standing peers from
1053
+ `.pi/agents/peers.yaml` — and some
1054
+ of them (e.g. `code-reviewer`, `plan-reviewer` with `runner: claude-code`) intentionally share a name
1055
+ with a team member. `.pi/agents/dispatch-policy.yaml` tells the dispatcher to serve such members
1056
+ **through the peer** instead of spawning a native subagent:
1057
+
1058
+ ```yaml
1059
+ default: native # coms = substitute ANY member with a live same-name pool peer
1060
+ grace_s: 30 # poll window for coms-required members
1061
+ substitutions:
1062
+ code-reviewer:
1063
+ prefer: coms
1064
+ fallback: native # none = coms-required: refuse with guidance instead of spawning
1065
+ # timeout_s: 3600 # per-member reply timeout (default PI_COMS_TIMEOUT_MS, 30 min)
1066
+ ```
1067
+
1068
+ Semantics:
1069
+
1070
+ - **One API with an explicit override.** `dispatch_agent(..., backend: "auto"|"native"|"coms")`
1071
+ defaults to `auto`, which follows this policy. `native` always starts the local Pi specialist even
1072
+ when a same-name peer is live. `coms` requires that live same-name peer and never falls back to
1073
+ native. The whole downstream pipeline — structured return contract,
1074
+ `ASK_USER:` extraction, the NEEDS_RESEARCH auto-research pipe, assertions, history, the grid —
1075
+ consumes a coms reply exactly like a subagent's final output (the dispatch protocols ride in the
1076
+ message body, since a standing peer only receives a user prompt).
1077
+ - **Decided per dispatch, against the live pool.** Hub and peers boot in parallel, so the first
1078
+ dispatch may land before the peer registers: with `fallback: native` it runs natively (one notice
1079
+ per member per team activation), and later dispatches pick up the peer once it is live. With
1080
+ `fallback: none` the dispatch polls the pool for `grace_s` seconds, then refuses with remediation
1081
+ steps. The name match is scoped to the coms pool — the same security boundary as `coms_send`.
1082
+ - **Standing context is the point.** Re-dispatches (ASK_USER answers, research resumes) go back to
1083
+ the same peer session, so a Claude Code reviewer keeps its review context across rounds.
1084
+ - **Visibility.** The member's grid card shows a `⇄coms <peer-model>` badge, history entries are
1085
+ annotated `(coms)`, and `/af-dispatch-policy` prints the resolved routing per member with live-peer
1086
+ status.
1087
+ - **Limitations.** `/af-agents-kill` on a coms-backed run only abandons the wait — the peer keeps
1088
+ running in its own pane and cannot be killed from the hub (`/af-agents-restart` abandons, then
1089
+ re-dispatches). `/af-zoom` shows only the final reply (there is no stream), tool counts stay 0, and
1090
+ context% is a registry snapshot. `/af-agent-model` overrides apply only to native(-fallback) runs —
1091
+ the peer's model is set in `peers.yaml`.
1092
+
1093
+ Missing file = everything native. HOW a peer runs (persona, model, `runner: claude-code`, env) stays
1094
+ in `peers.yaml`; this file only decides WHEN the hub prefers a peer over a native spawn.
1095
+
1096
+ ### Handoff
1097
+
1098
+ `/af-handoff <peer>` transfers the session to another **main** agent. Following the plan's
1099
+ **decision G1**, it does *not* try to extract a compaction summary; instead it asks the dispatcher
1100
+ LLM to compose a **self-contained brief** ("everything the target needs, assume no shared history"),
1101
+ then `coms_send`s that brief to the peer, `coms_await`s the reply, and relays it back — in the
1102
+ configured user-facing language. When the handoff `coms_send` fires, the hub appends machine-generated
1103
+ sections after the LLM brief: `## Verification ledger (verbatim, machine-appended)` with every current
1104
+ assertion in canonical ledger form, and `## Artifact index` with artifact paths plus first headings.
1105
+ The target peer must treat the machine-appended ledger as the contract, not the paraphrased brief.
1106
+ The target peer takes over; the source relays the result. There is no raw session copy (pi sessions
1107
+ aren't portable between live agents). The target must be a peer in your pool — `/af-handoff` resolves
1108
+ through the same [scope boundary](#pool-scope-is-the-reach-boundary) as `coms_send`, so you cannot
1109
+ hand a session to a peer you cannot see.
1110
+
1111
+ ### Pool widget
1112
+
1113
+ A live "pool" widget lists connected peers with name, model, and live context usage, refreshed by a
1114
+ ping cycle; a keepalive cycle re-writes this session's own registry entry (and self-heals it if an
1115
+ external prune removed it). Both timers are `unref`'d so they never hold the process open.
1116
+
1117
+ ### Purpose
1118
+
1119
+ The coms identity `purpose` is the `--purpose` CLI flag when set, otherwise the default
1120
+ `agent-hub dispatcher`. There is no runtime dispatcher-persona picker.
1121
+
1122
+ ### Graceful degradation
1123
+
1124
+ If the coms socket can't bind at start-up (`comsReady` stays `false`), the session degrades to a
1125
+ local dispatcher without coms: the `coms_*` tools are withheld from `setActiveTools`, the
1126
+ `/af-handoff` command refuses with a notice, and the "Peer agents (coms)" prompt section is omitted.
1127
+ Orchestration, research helpers, and the grid keep working.
1128
+
1129
+ ### Tool surface
1130
+
1131
+ `setActiveTools` always preserves the orchestration surface and adds runtime-ready capabilities.
1132
+ Operator work mode also preserves the baseline direct/extension tools; orchestrator work mode does not.
1133
+ Coms tools are active only when coms is ready, Herdr tools only in a live Herdr pane, and `ask_user`
1134
+ only when registered. Work mode switching recomputes this list live without touching session state.
1135
+
1136
+ `set_assertions` / `update_assertion` / `get_assertions` are the always-on Verification Contract ledger tools (see
1137
+ [What it does](#what-it-does)); like `dispatch_agent` / `spawn_research` they stay on the
1138
+ orchestration surface in both work modes.
1139
+
1140
+ ## Optional Hermes local monitor transport
1141
+
1142
+ The optional monitor is an Agent Fleet-owned transport boundary, not a Hermes runtime API or a
1143
+ bundled Hermes plugin. When enabled, `agent-hub` publishes dispatcher-turn and specialist-run
1144
+ state and owns generation-safe cancellation. A separate local Hermes UI or operator client may
1145
+ consume the owner-only discovery + Unix-socket contract documented in
1146
+ [`.pi/agent-fleet/hermes/README.md`](../../agent-fleet/hermes/README.md#local-agent-hub-monitor-integration).
1147
+
1148
+ Set these before the hub starts:
1149
+
1150
+ ```bash
1151
+ export AGENT_FLEET_PROFILE_ID="approved-profile-id"
1152
+ export AGENT_FLEET_MONITOR_RUNTIME_DIR="/absolute/owner-only/runtime-root"
1153
+ ```
1154
+
1155
+ Both are required for monitor startup; the runtime root must be absolute and owner-only, and the
1156
+ profile ID must be a safe identifier. The monitor also starts only for a Herdr-backed hub with
1157
+ `HERDR_WORKSPACE_ID` and `HERDR_PANE_ID`; retain those values and `HERDR_SOCKET_PATH` in the
1158
+ standard `just fleet --agents <roster> --peers <preset>` flow. Workspace labels are display metadata, not monitor identity.
1159
+
1160
+ The live contract exposes three authenticated newline-delimited JSON requests: `snapshot`, cursor-
1161
+ based `output`, and exact-generation `cancel`. The monitor is local-only and fails closed when its
1162
+ profile discovery, lease, token, or Unix socket is unavailable. A native cancel targets only the
1163
+ matching hub-owned process generation. A coms cancel abandons the local wait only; its peer can
1164
+ continue. Neither path controls or closes a Herdr workspace/pane.
1165
+
1166
+ Example startup:
1167
+
1168
+ ```bash
1169
+ monitor_runtime="${XDG_RUNTIME_DIR:?}/agent-fleet-monitor"
1170
+ install -d -m 700 "$monitor_runtime"
1171
+ AGENT_FLEET_PROFILE_ID=dev \
1172
+ AGENT_FLEET_MONITOR_RUNTIME_DIR="$monitor_runtime" \
1173
+ just fleet --agents default --peers default
1174
+ ```
1175
+
1176
+ No Desktop/backend plugin installation is required or provided. Consumers must re-discover after
1177
+ lease or socket loss and must never persist or log the token.
1178
+
1179
+ ## Requires
1180
+
1181
+ - `.pi/agents/teams.yaml` for fixed specialist teams, the referenced persona `.md` files, and
1182
+ (strongly recommended) [`pi-ask-user`](https://github.com/edlsh/pi-ask-user).
1183
+ - `.pi/damage-control-rules.yaml` for every guarded `just fleet` Pi mode.
1184
+ - Nothing extra in-repo for coms — the peer registry lives at `~/.pi/coms/` and is created at
1185
+ runtime.
1186
+
1187
+ ## Usage
1188
+
1189
+ ```bash
1190
+ # Unified Fleet interface (Fleet Core + Agent Hub are loaded together)
1191
+ just fleet
1192
+ just fleet --work-mode operator --agents frontend --project myrepo
1193
+ just fleet --agents frontend --peers frontend --project myrepo
1194
+
1195
+ # equivalent direct guarded launch
1196
+ pi -e .pi/harnesses/damage-control-continue/index.ts -e .pi/harnesses/ask-user-remote/index.ts -e .pi/harnesses/agent-hub/index.ts
1197
+ pi -e .pi/harnesses/damage-control-continue/index.ts -e .pi/harnesses/ask-user-remote/index.ts -e .pi/harnesses/agent-hub/index.ts --name releaser --explicit
1198
+
1199
+ # direct unguarded launch, only when you intentionally want to skip damage-control
1200
+ pi -e .pi/harnesses/agent-hub/index.ts
1201
+ ```
1202
+
1203
+ Identity flags: `--name`, `--purpose`, `--project`, `--color`, `--explicit`.
1204
+
1205
+ ### Safety scope
1206
+
1207
+ `just fleet` and `just fleet --no-coms` load Fleet Core before `agent-hub`, so guardrails and `ask_user` apply
1208
+ to hub/dispatcher tool calls in that parent pi process — and because it is the *continue* variant, a
1209
+ blocked dispatcher call feeds back and the turn keeps going rather than aborting. Specialist and
1210
+ research agents are spawned as separate pi subprocesses with `--no-extensions` — but `agent-hub`
1211
+ resolves `damage-control-continue` from this session's `-e` flags, else the repo-local harness, and
1212
+ re-loads it into every native specialist, research helper, and nested delegate via explicit `-e`.
1213
+ `--no-extensions` keeps discovery off, so children never auto-load `.pi/extensions/` utilities or
1214
+ recursively re-load `agent-hub`; the explicit guardrail still checks every child's tool calls against
1215
+ `.pi/damage-control-rules.yaml`. Protected-path blocks escalate to the hub for explicit approval;
1216
+ protected deletions offer only Deny or Allow once, while inherently dangerous command patterns are
1217
+ non-exemptible. Denial or timeout blocks the call without aborting the child's turn. If continue
1218
+ cannot be resolved, dispatch is refused—children are never spawned unguarded. Research helpers are
1219
+ additionally read-only by construction. Guided setup enforces `agent-hub` ⇒
1220
+ `damage-control-continue` + `ask-user-remote`.
1221
+
1222
+ ### Related recipes
1223
+
1224
+ ```bash
1225
+ # Operator/native work without coms
1226
+ just fleet --no-coms
1227
+
1228
+ # Hub-only Herdr workspace and a combined topology
1229
+ just fleet --herdr --project af
1230
+ just fleet --agents default --peers docs --project af
1231
+ just fleet --agents default --peers docs --project af --dry-run
1232
+
1233
+ # Compatibility aliases (accepted with migration warnings)
1234
+ just fleet hub --solo
1235
+ just fleet team docs
1236
+
1237
+ # Snapshot refs / close cleanly / restore conversations
1238
+ just fleet snapshot docs
1239
+ just fleet down docs
1240
+ just fleet resume docs
1241
+ ```
1242
+
1243
+ `peers.yaml` groups reusable peers into named teams; each entry is `name` / `persona`
1244
+ (+ optional `model`). The persona's frontmatter `description`/`color` become the peer's
1245
+ coms purpose/color.
1246
+
1247
+ ## How it differs from its sources
1248
+
1249
+ - **Embedded, not stacked (decision 1).** coms is folded into this one `index.ts`; the identity
1250
+ flags are registered once. Loading `coms` as a second `-e` would double-register
1251
+ `--name/--purpose/...` and abort start-up.
1252
+ - **Single `session_start`.** coms init is folded into the former dispatcher's `session_start` and
1253
+ guarded by `if (!comsReady)`, so `/new` reuses the same peer identity (no leaked socket).
1254
+ - **Dispatcher is also a peer.** `setActiveTools` lists `coms_*` alongside `dispatch_agent` +
1255
+ `spawn_research` (+ `ask_user`); the system prompt gains a "Peer agents (coms)" section when coms
1256
+ is ready. The persona's `description` drives the coms `purpose` (decision 6 / Phase 6 peer
1257
+ mapping) instead of a static `--purpose`.
1258
+ - **`/af-handoff` uses an LLM-composed brief**, not a compaction-summary extraction (decision G1).
1259
+ - **Clean shutdown** SIGTERMs any running specialist/research children, clears the coms pool
1260
+ widget, and removes the registry entry on `session_shutdown` / SIGINT / SIGTERM.
1261
+
1262
+ ### Execution evidence isolation
1263
+
1264
+ New sessions allocate `.pi/agent-sessions/sessions/<UUID>/`; startup does not migrate,
1265
+ clear or prune legacy shared files. Each native/coms dispatch and research helper has
1266
+ a UUID and a create-exclusive `dispatches/<UUID>/request.json` / `result.json` bundle.
1267
+ Requests retain task/scope and copies of supplied input artifacts; results preserve
1268
+ output/diagnostics and transcript/session paths (`details.evidencePath`). Native
1269
+ continuation copies the previous raw session into the new dispatch, never rewrites it;
1270
+ delegation events also live under the dispatch. Counters remain UI labels, not evidence IDs.
1271
+
1272
+ `run-history-keep` keeps its configured limit, applied to **closed, fully settled new
1273
+ sessions whose owning process is gone**. Live, unfinished, pending and malformed
1274
+ namespaces are protected. A crash without a close marker is retained for manual
1275
+ inspection, not silently classified as safely deletable. Follow absolute paths from
1276
+ tool results; `artifacts/...` is a session-relative handoff alias, not a read-tool path.
1277
+
1278
+ ### No-progress stops
1279
+
1280
+ Unchanged failed dispatch/research retries are refused across turns using normalized
1281
+ actor, structured scope, input artifacts, actual execution conditions and worktree
1282
+ state, not task wording or scope_mode. Research scope is advisory, not isolation.
1283
+
1284
+ Operator cancellation fences the **agent identity**, including disjoint scopes,
1285
+ model/prose changes and dispatch/research inputs. Other agents' already-running work
1286
+ is not cancelled. `/af-recover inspect <operationId>` reports safe attempt state and
1287
+ missing prerequisites; `retry|reconcile|abandon <operationId> <attemptId>` validate IDs.
1288
+ Legacy `/af-retry <dispatchId>` resolves the same retry handler for cancellation and
1289
+ settled indeterminate failures. Both retry spellings ask the human once, warning that an
1290
+ indeterminate attempt may already have partial effects and retry can duplicate them;
1291
+ there is at most one indeterminate grant per operation. Neither command executes or
1292
+ renews budget: after authorization, explicitly invoke the code-rendered original
1293
+ `dispatch_agent(...)` or `spawn_research(...)` contract. Pending/unknown process,
1294
+ duplicate grant, stale response, or unavailable original contract is not permission
1295
+ to replay. T3 protocol errors still need trusted effects evidence and corrected conditions;
1296
+ unknown-tool needs a catalog change. `reconcile` requires attributable unchanged-current-
1297
+ revision readback and independent nonblocking review; it clears a technical block only,
1298
+ retaining failed delivery and every open AF-MIN-CHANGE/test/review/plan obligation. `abandon`
1299
+ does not satisfy dependent work. Audit exports IDs/statuses only, never prompts, nonces,
1300
+ raw contracts or evidence paths.
1301
+
1302
+ Non-busy recovery refusals spend existing turn/task operation allowances. Exhaustion
1303
+ returns budget_refused; no new limit, parent abort, retry, wait or queue is added.
1304
+ Busy operations that never started spend no allowance. Turn reports include charged
1305
+ refusals as zero-time/zero-token no_progress_refused rows (research in its count);
1306
+ refusal totals include even uncharged budget refusals. Session execution totals
1307
+ still count real dispatch attempts rather than guard refusals.
1308
+
1309
+ The shared recovery contract is fail-closed. Protocol errors require changed
1310
+ conditions plus a trusted prior-effects inspection. The internal task-generation-bound
1311
+ establishEffects port accepts a retained inspection reference; it is not a model
1312
+ parameter or a promise that T3 exists. No T3 producer is installed yet. Unknown-tool
1313
+ recovery likewise has no trusted catalog-change producer in this slice.
1314
+
1315
+ ### Runtime verification contract
1316
+
1317
+ set_assertions.test_command declares an exact bash verification command for a test
1318
+ or code-grep requirement. It does not execute the command. For code-grep, the command
1319
+ must exit nonzero when the declared presence/absence condition fails. Native children
1320
+ run it through the existing approved bash path after edits. The child-loaded
1321
+ runtime-test-check observer preserves Pi's configured shell/prefix, execution context,
1322
+ renderers and tool_result error flag; the parent retains command, actual exit and
1323
+ before/after revisions, binding source/text/reference/critical conditions to task ID.
1324
+ Compilation only checks the minimal change requirement, never semantic assertions.
1325
+
1326
+ manual/runtime-ui requirements are explicitly unsupported by this producer. A test
1327
+ or code-grep without a command/check remains missing/unverified; a model's proven
1328
+ stamp is not runtime proof. Fresh bound runtime checks supersede old claimed ledger
1329
+ stamps; stale runtime checks do not. Runtime refs and claimedEvidenceRefs are separate.
1330
+
1331
+ agent-fleet.runtime-result/v1 reports orthogonal execution, changes, verification,
1332
+ acceptance and compatibility dimensions. Acceptance requires completed execution,
1333
+ current task, certain changed state, and all requirements/checks passing with current
1334
+ revision and retained runtime evidence. Missing/failed/stale/unsupported checks,
1335
+ unchanged/missing deliverables and uncertain attribution never accept, at any tier.
1336
+ needs_verification means unaccepted, not nearly done.
1337
+
1338
+ **Semantic limitation (operator accepted):** specialist-authored tests may pass the
1339
+ runtime gate. Runtime proves execution/state, NOT the adequacy of those tests or
1340
+ code-grep predicates. Separate code review remains required; accepted is not human
1341
+ Checkpoint A approval. No live model runs or T3/T7 implementation are included.
1342
+
1343
+ ### Explicit delivery contract
1344
+
1345
+ `dispatch_agent` accepts `deliverables: string[]` of exact expected output files.
1346
+ The worker receives their absolute paths. The hub reads every expected file back,
1347
+ records size/hash/preview and whether it changed, retains the inspected content, and
1348
+ saves `details.assessmentPath`. Missing files, directories and unsafe symlink paths
1349
+ do not pass readback. An existing unchanged file is not attributed to this run.
1350
+
1351
+ Exit 0 returns `executionStatus: completed`, **not** acceptance. Without qualifying runtime checks, tool status is
1352
+ `completed_unverified` or `verification_failed` and `accepted: false`. Only the
1353
+ runtime verification contract above can produce `accepted: true`. Every delivered return is
1354
+ saved even without assertion IDs. Pending peer delivery remains pending.
1355
+
1356
+ Scope roots are checked before budget confirmation/counters. Missing roots are not
1357
+ zero-match success. Set `scope_mode: create` explicitly to permit a new root. A new
1358
+ exact file in an existing directory is permitted when declared in `deliverables`;
1359
+ otherwise a missing dotted name such as `RIN.Video` is still treated as a missing
1360
+ root, not guessed to be a file. Free-form prose and XML are never executed as tools.
1361
+
1362
+ ## System 1 communication and dispatch advice
1363
+
1364
+ Fleet `1` opens a read-only request/response viewer. Press `e` to enable memory-only
1365
+ capture, Enter to inspect a pair, left/right and Enter to copy, `d` to disable and
1366
+ clear. `j` navigation is unchanged. The optional `dispatch_triage` tool is for the
1367
+ orchestrator, not a human slash command; all dispatch gates remain authoritative.
1368
+ See [the guide](../../../docs/system1-dispatch-triage.md) for opt-in configuration,
1369
+ privacy boundaries, evaluation commands and outstanding live acceptance.