@chankov/agent-fleet 2.0.19 → 2.0.21

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