@chankov/agent-fleet 2.0.14 → 2.0.16

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 (1157) hide show
  1. package/.pi/agent-fleet/scripts/fleet.ts +2 -1
  2. package/.pi/extensions/compact-and-continue/README.md +2 -2
  3. package/.pi/harnesses/agent-hub/README.md +94 -11
  4. package/.pi/harnesses/agent-hub/budget-recovery.ts +2 -2
  5. package/.pi/harnesses/agent-hub/commands/context.ts +2 -0
  6. package/.pi/harnesses/agent-hub/commands/recover.ts +13 -4
  7. package/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  8. package/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  9. package/.pi/harnesses/agent-hub/config/overrides.ts +1 -6
  10. package/.pi/harnesses/agent-hub/context/budgets.ts +9 -7
  11. package/.pi/harnesses/agent-hub/deterministic-fs.ts +51 -12
  12. package/.pi/harnesses/agent-hub/dispatch-native-complete.ts +4 -0
  13. package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +14 -3
  14. package/.pi/harnesses/agent-hub/dispatch-native-types.ts +3 -0
  15. package/.pi/harnesses/agent-hub/dispatch-native.ts +9 -1
  16. package/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +4 -15
  17. package/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +8 -6
  18. package/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +2 -0
  19. package/.pi/harnesses/agent-hub/dispatch-triage-state.ts +23 -5
  20. package/.pi/harnesses/agent-hub/docs-lane.js +2 -1
  21. package/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  22. package/.pi/harnesses/agent-hub/filesystem-tool.ts +75 -11
  23. package/.pi/harnesses/agent-hub/index.ts +255 -24
  24. package/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +13 -5
  25. package/.pi/harnesses/agent-hub/no-progress.ts +232 -28
  26. package/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
  27. package/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  28. package/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
  29. package/.pi/harnesses/agent-hub/package.json +1 -1
  30. package/.pi/harnesses/agent-hub/policy/work-mode.ts +14 -5
  31. package/.pi/harnesses/agent-hub/proactive-config.ts +11 -35
  32. package/.pi/harnesses/agent-hub/proactive-local.ts +1 -18
  33. package/.pi/harnesses/agent-hub/process-obligations.ts +116 -15
  34. package/.pi/harnesses/agent-hub/prompts/fragments.ts +9 -11
  35. package/.pi/harnesses/agent-hub/recover-policy.ts +18 -1
  36. package/.pi/harnesses/agent-hub/recover-state.ts +1 -1
  37. package/.pi/harnesses/agent-hub/recovery-contract.ts +70 -0
  38. package/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  39. package/.pi/harnesses/agent-hub/research/runtime.ts +2 -0
  40. package/.pi/harnesses/agent-hub/research/spawn-run.ts +15 -6
  41. package/.pi/harnesses/agent-hub/return-contract.js +27 -5
  42. package/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  43. package/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  44. package/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  45. package/.pi/harnesses/agent-hub/run-budget.js +12 -0
  46. package/.pi/harnesses/agent-hub/scope-gate.js +23 -2
  47. package/.pi/harnesses/agent-hub/session-audit.ts +94 -8
  48. package/.pi/harnesses/agent-hub/spawn.ts +10 -2
  49. package/.pi/harnesses/agent-hub/system1-activity.ts +116 -1
  50. package/.pi/harnesses/agent-hub/system1-communication-store.ts +47 -13
  51. package/.pi/harnesses/agent-hub/system1-report.ts +50 -0
  52. package/.pi/harnesses/agent-hub/system1-runtime.ts +8 -29
  53. package/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
  54. package/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
  55. package/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
  56. package/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
  57. package/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  58. package/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
  59. package/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  60. package/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  61. package/.pi/harnesses/agent-hub/tools/action-executors.ts +33 -10
  62. package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +1 -1
  63. package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +86 -26
  64. package/.pi/harnesses/agent-hub/tools/herdr-executors.ts +9 -0
  65. package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +9 -6
  66. package/.pi/harnesses/agent-hub/ui/fleet-source.ts +6 -2
  67. package/.pi/harnesses/agent-hub/ui/system1-communication.ts +1 -1
  68. package/.pi/harnesses/agent-hub/work-mode.ts +13 -8
  69. package/.pi/harnesses/coms/package.json +1 -1
  70. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  71. package/.pi/harnesses/lib/context-budget-hub-prompt.ts +6 -1
  72. package/.pi/harnesses/lib/fleet-dashboard-view.ts +29 -4
  73. package/.pi/harnesses/lib/fleet-read-model.ts +73 -0
  74. package/.pi/harnesses/lib/system1/config-json.js +37 -0
  75. package/.pi/harnesses/lib/system1/config-loader.js +44 -0
  76. package/.pi/harnesses/lib/system1/config-proactive.js +57 -0
  77. package/.pi/harnesses/lib/system1/config-triage.js +42 -0
  78. package/.pi/harnesses/lib/system1/config-v2.js +100 -0
  79. package/.pi/harnesses/lib/system1/config.js +7 -18
  80. package/.pi/harnesses/lib/system1/contracts.ts +4 -2
  81. package/.pi/harnesses/lib/system1/demo.ts +3 -14
  82. package/.pi/harnesses/lib/system1/selection.js +11 -0
  83. package/.pi/prompts/af-build.md +9 -6
  84. package/.versions/2.0.15/.pi/agent-fleet/hermes/README.md +347 -0
  85. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  86. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  87. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  88. package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  89. package/.versions/2.0.15/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  90. package/.versions/2.0.15/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  91. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  92. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  93. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  94. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  95. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  96. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  97. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  98. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  99. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  100. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  101. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  102. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  103. package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  104. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  105. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  106. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  107. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  108. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  109. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  110. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  111. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  112. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  113. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  114. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  115. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  116. package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  117. package/.versions/2.0.15/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  118. package/.versions/2.0.15/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  119. package/.versions/2.0.15/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  120. package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
  121. package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  122. package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  123. package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  124. package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  125. package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet.ts +217 -0
  126. package/.versions/2.0.15/.pi/agent-fleet/scripts/flow.ts +157 -0
  127. package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  128. package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  129. package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  130. package/.versions/2.0.15/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  131. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
  132. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  133. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  134. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  135. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  136. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  137. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  138. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  139. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
  140. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  141. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  142. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  143. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  144. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  145. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  146. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  147. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  148. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  149. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  150. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  151. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  152. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  153. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  154. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  155. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  156. package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  157. package/.versions/2.0.15/.pi/agent-fleet/scripts/package-lock.json +35 -0
  158. package/.versions/2.0.15/.pi/agent-fleet/scripts/package.json +9 -0
  159. package/.versions/2.0.15/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  160. package/.versions/2.0.15/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  161. package/.versions/2.0.15/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  162. package/.versions/2.0.15/.pi/agent-fleet/scripts/team-up.ts +378 -0
  163. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
  164. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  165. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  166. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  167. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  168. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  169. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  170. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
  171. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  172. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  173. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  174. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  175. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  176. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  177. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
  178. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  179. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  180. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  181. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  182. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  183. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  184. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  185. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  186. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  187. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  188. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  189. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  190. package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  191. package/.versions/2.0.15/.pi/agents/dispatch-policy.yaml +32 -0
  192. package/.versions/2.0.15/.pi/agents/model-profiles.yaml +134 -0
  193. package/.versions/2.0.15/.pi/agents/peers.yaml +147 -0
  194. package/.versions/2.0.15/.pi/agents/teams.yaml +41 -0
  195. package/.versions/2.0.15/.pi/agents/voices.yaml +13 -0
  196. package/.versions/2.0.15/.pi/damage-control-rules.yaml +297 -0
  197. package/.versions/2.0.15/.pi/extensions/btw/README.md +120 -0
  198. package/.versions/2.0.15/.pi/extensions/btw/index.ts +914 -0
  199. package/.versions/2.0.15/.pi/extensions/btw/package.json +6 -0
  200. package/.versions/2.0.15/.pi/extensions/btw/state.js +179 -0
  201. package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  202. package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  203. package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  204. package/.versions/2.0.15/.pi/extensions/compact-and-continue/README.md +42 -0
  205. package/.versions/2.0.15/.pi/extensions/compact-and-continue/index.ts +120 -0
  206. package/.versions/2.0.15/.pi/extensions/compact-and-continue/package.json +6 -0
  207. package/.versions/2.0.15/.pi/extensions/mcp-bridge/README.md +46 -0
  208. package/.versions/2.0.15/.pi/extensions/mcp-bridge/index.ts +206 -0
  209. package/.versions/2.0.15/.pi/extensions/mcp-bridge/package.json +6 -0
  210. package/.versions/2.0.15/.pi/extensions/package-lock.json +1175 -0
  211. package/.versions/2.0.15/.pi/extensions/package.json +9 -0
  212. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/README.md +224 -0
  213. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/config.ts +198 -0
  214. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  215. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/index.ts +248 -0
  216. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/package.json +6 -0
  217. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  218. package/.versions/2.0.15/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  219. package/.versions/2.0.15/.pi/harnesses/agent-hub/README.md +1448 -0
  220. package/.versions/2.0.15/.pi/harnesses/agent-hub/acceptance.ts +199 -0
  221. package/.versions/2.0.15/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  222. package/.versions/2.0.15/.pi/harnesses/agent-hub/artifacts.js +146 -0
  223. package/.versions/2.0.15/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
  224. package/.versions/2.0.15/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
  225. package/.versions/2.0.15/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  226. package/.versions/2.0.15/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  227. package/.versions/2.0.15/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
  228. package/.versions/2.0.15/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
  229. package/.versions/2.0.15/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  230. package/.versions/2.0.15/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
  231. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  232. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  233. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  234. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  235. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  236. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  237. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  238. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  239. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  240. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  241. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  242. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  243. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
  244. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  245. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  246. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  247. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/context.ts +47 -0
  248. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  249. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  250. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  251. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  252. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  253. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  254. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
  255. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  256. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  257. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  258. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  259. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  260. package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  261. package/.versions/2.0.15/.pi/harnesses/agent-hub/config/agents.ts +178 -0
  262. package/.versions/2.0.15/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
  263. package/.versions/2.0.15/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
  264. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  265. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
  266. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
  267. package/.versions/2.0.15/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  268. package/.versions/2.0.15/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  269. package/.versions/2.0.15/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  270. package/.versions/2.0.15/.pi/harnesses/agent-hub/context-window.js +108 -0
  271. package/.versions/2.0.15/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  272. package/.versions/2.0.15/.pi/harnesses/agent-hub/delegate.ts +467 -0
  273. package/.versions/2.0.15/.pi/harnesses/agent-hub/deterministic-fs.ts +166 -0
  274. package/.versions/2.0.15/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  275. package/.versions/2.0.15/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  276. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
  277. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  278. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
  279. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +259 -0
  280. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
  281. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-types.ts +260 -0
  282. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
  283. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  284. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
  285. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +76 -0
  286. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  287. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  288. package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  289. package/.versions/2.0.15/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  290. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  291. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  292. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  293. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  294. package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
  295. package/.versions/2.0.15/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  296. package/.versions/2.0.15/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  297. package/.versions/2.0.15/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  298. package/.versions/2.0.15/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  299. package/.versions/2.0.15/.pi/harnesses/agent-hub/filesystem-tool.ts +137 -0
  300. package/.versions/2.0.15/.pi/harnesses/agent-hub/fixtures/registration-surface.json +64 -0
  301. package/.versions/2.0.15/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  302. package/.versions/2.0.15/.pi/harnesses/agent-hub/footer.ts +30 -0
  303. package/.versions/2.0.15/.pi/harnesses/agent-hub/helpers.ts +270 -0
  304. package/.versions/2.0.15/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
  305. package/.versions/2.0.15/.pi/harnesses/agent-hub/index.ts +2597 -0
  306. package/.versions/2.0.15/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  307. package/.versions/2.0.15/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
  308. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
  309. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  310. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  311. package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
  312. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  313. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  314. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  315. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  316. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  317. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  318. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  319. package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  320. package/.versions/2.0.15/.pi/harnesses/agent-hub/no-progress.ts +563 -0
  321. package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
  322. package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  323. package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
  324. package/.versions/2.0.15/.pi/harnesses/agent-hub/package.json +7 -0
  325. package/.versions/2.0.15/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  326. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  327. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  328. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  329. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  330. package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/work-mode.ts +135 -0
  331. package/.versions/2.0.15/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  332. package/.versions/2.0.15/.pi/harnesses/agent-hub/presentation.ts +48 -0
  333. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
  334. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  335. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  336. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  337. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
  338. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
  339. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
  340. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
  341. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  342. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  343. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
  344. package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
  345. package/.versions/2.0.15/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
  346. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
  347. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/fragments.ts +116 -0
  348. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  349. package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
  350. package/.versions/2.0.15/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  351. package/.versions/2.0.15/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  352. package/.versions/2.0.15/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  353. package/.versions/2.0.15/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  354. package/.versions/2.0.15/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
  355. package/.versions/2.0.15/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  356. package/.versions/2.0.15/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  357. package/.versions/2.0.15/.pi/harnesses/agent-hub/research/runtime.ts +197 -0
  358. package/.versions/2.0.15/.pi/harnesses/agent-hub/research/spawn-run.ts +183 -0
  359. package/.versions/2.0.15/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  360. package/.versions/2.0.15/.pi/harnesses/agent-hub/return-contract.js +349 -0
  361. package/.versions/2.0.15/.pi/harnesses/agent-hub/return-extract.js +77 -0
  362. package/.versions/2.0.15/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  363. package/.versions/2.0.15/.pi/harnesses/agent-hub/review-findings.js +104 -0
  364. package/.versions/2.0.15/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  365. package/.versions/2.0.15/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  366. package/.versions/2.0.15/.pi/harnesses/agent-hub/run-budget.js +554 -0
  367. package/.versions/2.0.15/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  368. package/.versions/2.0.15/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
  369. package/.versions/2.0.15/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  370. package/.versions/2.0.15/.pi/harnesses/agent-hub/scope-gate.js +144 -0
  371. package/.versions/2.0.15/.pi/harnesses/agent-hub/session-audit.ts +313 -0
  372. package/.versions/2.0.15/.pi/harnesses/agent-hub/session-health.js +110 -0
  373. package/.versions/2.0.15/.pi/harnesses/agent-hub/session-start.ts +42 -0
  374. package/.versions/2.0.15/.pi/harnesses/agent-hub/spawn.ts +534 -0
  375. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  376. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-communication-store.ts +129 -0
  377. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  378. package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-runtime.ts +280 -0
  379. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
  380. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
  381. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-config.ts +37 -0
  382. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-contract.ts +19 -0
  383. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  384. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
  385. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  386. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  387. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  388. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  389. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
  390. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  391. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  392. package/.versions/2.0.15/.pi/harnesses/agent-hub/timeline.ts +72 -0
  393. package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
  394. package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
  395. package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  396. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/action-executors.ts +208 -0
  397. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  398. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/context.ts +144 -0
  399. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
  400. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +558 -0
  401. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  402. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  403. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  404. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
  405. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
  406. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  407. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
  408. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  409. package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
  410. package/.versions/2.0.15/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  411. package/.versions/2.0.15/.pi/harnesses/agent-hub/types.ts +66 -0
  412. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  413. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
  414. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  415. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  416. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
  417. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  418. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  419. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  420. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  421. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  422. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  423. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  424. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  425. package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  426. package/.versions/2.0.15/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  427. package/.versions/2.0.15/.pi/harnesses/agent-hub/version.ts +42 -0
  428. package/.versions/2.0.15/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  429. package/.versions/2.0.15/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  430. package/.versions/2.0.15/.pi/harnesses/agent-hub/work-mode.ts +179 -0
  431. package/.versions/2.0.15/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
  432. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/README.md +59 -0
  433. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/index.ts +558 -0
  434. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/questions.ts +161 -0
  435. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  436. package/.versions/2.0.15/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
  437. package/.versions/2.0.15/.pi/harnesses/coms/README.md +100 -0
  438. package/.versions/2.0.15/.pi/harnesses/coms/index.ts +282 -0
  439. package/.versions/2.0.15/.pi/harnesses/coms/package.json +7 -0
  440. package/.versions/2.0.15/.pi/harnesses/coms/version.ts +42 -0
  441. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/README.md +135 -0
  442. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/index.ts +550 -0
  443. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/package.json +7 -0
  444. package/.versions/2.0.15/.pi/harnesses/damage-control-continue/version.ts +42 -0
  445. package/.versions/2.0.15/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  446. package/.versions/2.0.15/.pi/harnesses/lib/coms-core-io.ts +385 -0
  447. package/.versions/2.0.15/.pi/harnesses/lib/coms-core.ts +577 -0
  448. package/.versions/2.0.15/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  449. package/.versions/2.0.15/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
  450. package/.versions/2.0.15/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
  451. package/.versions/2.0.15/.pi/harnesses/lib/context-budget-view.ts +107 -0
  452. package/.versions/2.0.15/.pi/harnesses/lib/context-budget.ts +114 -0
  453. package/.versions/2.0.15/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  454. package/.versions/2.0.15/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
  455. package/.versions/2.0.15/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  456. package/.versions/2.0.15/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  457. package/.versions/2.0.15/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  458. package/.versions/2.0.15/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  459. package/.versions/2.0.15/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
  460. package/.versions/2.0.15/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  461. package/.versions/2.0.15/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  462. package/.versions/2.0.15/.pi/harnesses/lib/fleet-panel.ts +34 -0
  463. package/.versions/2.0.15/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  464. package/.versions/2.0.15/.pi/harnesses/lib/fleet-selection.ts +24 -0
  465. package/.versions/2.0.15/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  466. package/.versions/2.0.15/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  467. package/.versions/2.0.15/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  468. package/.versions/2.0.15/.pi/harnesses/lib/herdr-client.ts +472 -0
  469. package/.versions/2.0.15/.pi/harnesses/lib/herdr-presence.ts +399 -0
  470. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  471. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  472. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  473. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  474. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  475. package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  476. package/.versions/2.0.15/.pi/harnesses/lib/spawned-peers.js +191 -0
  477. package/.versions/2.0.15/.pi/harnesses/lib/system1/config.js +61 -0
  478. package/.versions/2.0.15/.pi/harnesses/lib/system1/contracts.ts +152 -0
  479. package/.versions/2.0.15/.pi/harnesses/lib/system1/demo.ts +104 -0
  480. package/.versions/2.0.15/.pi/harnesses/lib/system1/jev.ts +503 -0
  481. package/.versions/2.0.15/.pi/harnesses/lib/system1/selection.js +11 -0
  482. package/.versions/2.0.15/.pi/harnesses/lib/system1/service.ts +245 -0
  483. package/.versions/2.0.15/.pi/harnesses/lib/update-check.ts +222 -0
  484. package/.versions/2.0.15/.pi/harnesses/package-lock.json +2039 -0
  485. package/.versions/2.0.15/.pi/harnesses/package.json +10 -0
  486. package/.versions/2.0.15/.pi/prompts/af-build.md +27 -0
  487. package/.versions/2.0.15/.pi/prompts/af-code-simplify.md +22 -0
  488. package/.versions/2.0.15/.pi/prompts/af-constraints.md +31 -0
  489. package/.versions/2.0.15/.pi/prompts/af-plan.md +17 -0
  490. package/.versions/2.0.15/.pi/prompts/af-review.md +16 -0
  491. package/.versions/2.0.15/.pi/prompts/af-set-hermes-telegram.md +15 -0
  492. package/.versions/2.0.15/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  493. package/.versions/2.0.15/.pi/prompts/af-setup-rules.md +20 -0
  494. package/.versions/2.0.15/.pi/prompts/af-ship.md +17 -0
  495. package/.versions/2.0.15/.pi/prompts/af-spec.md +15 -0
  496. package/.versions/2.0.15/.pi/prompts/af-test.md +19 -0
  497. package/.versions/2.0.15/.pi/skills/bowser/SKILL.md +145 -0
  498. package/.versions/2.0.15/.version +1 -0
  499. package/.versions/2.0.15/agents/architect.md +24 -0
  500. package/.versions/2.0.15/agents/bowser.md +28 -0
  501. package/.versions/2.0.15/agents/builder.md +55 -0
  502. package/.versions/2.0.15/agents/code-reviewer.md +209 -0
  503. package/.versions/2.0.15/agents/deep-researcher.md +32 -0
  504. package/.versions/2.0.15/agents/documenter.md +22 -0
  505. package/.versions/2.0.15/agents/orchestrator.md +22 -0
  506. package/.versions/2.0.15/agents/plan-reviewer.md +83 -0
  507. package/.versions/2.0.15/agents/planner.md +105 -0
  508. package/.versions/2.0.15/agents/releaser.md +24 -0
  509. package/.versions/2.0.15/agents/researcher.md +30 -0
  510. package/.versions/2.0.15/agents/security-auditor.md +167 -0
  511. package/.versions/2.0.15/agents/test-engineer.md +153 -0
  512. package/.versions/2.0.15/agents/web-debugger.md +44 -0
  513. package/.versions/2.0.15/agents/web-performance-auditor.md +194 -0
  514. package/.versions/2.0.15/bin/catalog/harness-runtime-closure.json +73 -0
  515. package/.versions/2.0.15/codex/fleet-session-client/SKILL.md +34 -0
  516. package/.versions/2.0.15/codex/fleet-session-client.zip +0 -0
  517. package/.versions/2.0.15/docs/ARCHITECTURE.md +829 -0
  518. package/.versions/2.0.15/docs/agent-fleet-setup.md +1090 -0
  519. package/.versions/2.0.15/docs/claude-code-coms-bridge.md +134 -0
  520. package/.versions/2.0.15/docs/codex-session-bridge.md +219 -0
  521. package/.versions/2.0.15/docs/coms-hermes-bridge.md +188 -0
  522. package/.versions/2.0.15/docs/getting-started.md +126 -0
  523. package/.versions/2.0.15/docs/npm-install.md +525 -0
  524. package/.versions/2.0.15/docs/pi-extensions.md +454 -0
  525. package/.versions/2.0.15/docs/pi-setup.md +92 -0
  526. package/.versions/2.0.15/docs/skill-anatomy.md +150 -0
  527. package/.versions/2.0.15/install-manifest.json +3193 -0
  528. package/.versions/2.0.15/justfile +247 -0
  529. package/.versions/2.0.15/manifest-meta.json +1071 -0
  530. package/.versions/2.0.15/references/accessibility-checklist.md +160 -0
  531. package/.versions/2.0.15/references/communication-contract.md +26 -0
  532. package/.versions/2.0.15/references/definition-of-done.md +67 -0
  533. package/.versions/2.0.15/references/fleet-coordination-patterns.md +171 -0
  534. package/.versions/2.0.15/references/observability-checklist.md +92 -0
  535. package/.versions/2.0.15/references/orchestration-patterns.md +370 -0
  536. package/.versions/2.0.15/references/performance-checklist.md +236 -0
  537. package/.versions/2.0.15/references/prompting-patterns.md +380 -0
  538. package/.versions/2.0.15/references/security-checklist.md +245 -0
  539. package/.versions/2.0.15/references/testing-patterns.md +235 -0
  540. package/.versions/2.0.15/references/workflow-authoring.md +304 -0
  541. package/.versions/2.0.15/skills/_internal/grilling.md +59 -0
  542. package/.versions/2.0.15/skills/browser-testing-with-devtools/SKILL.md +351 -0
  543. package/.versions/2.0.15/skills/code-review-and-quality/SKILL.md +396 -0
  544. package/.versions/2.0.15/skills/compound-learning/SKILL.md +137 -0
  545. package/.versions/2.0.15/skills/constraint-driven-development/SKILL.md +338 -0
  546. package/.versions/2.0.15/skills/constraint-driven-development/references/floor-guard.md +99 -0
  547. package/.versions/2.0.15/skills/context-engineering/SKILL.md +341 -0
  548. package/.versions/2.0.15/skills/deprecation-and-migration/SKILL.md +247 -0
  549. package/.versions/2.0.15/skills/designing-agents/SKILL.md +394 -0
  550. package/.versions/2.0.15/skills/designing-agents/pi-harness-authoring.md +222 -0
  551. package/.versions/2.0.15/skills/drafting-workflows/SKILL.md +143 -0
  552. package/.versions/2.0.15/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  553. package/.versions/2.0.15/skills/frontend-ui-engineering/SKILL.md +328 -0
  554. package/.versions/2.0.15/skills/git-workflow-and-versioning/SKILL.md +316 -0
  555. package/.versions/2.0.15/skills/idea-refine/SKILL.md +182 -0
  556. package/.versions/2.0.15/skills/idea-refine/examples.md +238 -0
  557. package/.versions/2.0.15/skills/idea-refine/frameworks.md +99 -0
  558. package/.versions/2.0.15/skills/idea-refine/refinement-criteria.md +113 -0
  559. package/.versions/2.0.15/skills/idea-refine/scripts/idea-refine.sh +15 -0
  560. package/.versions/2.0.15/skills/incremental-implementation/SKILL.md +353 -0
  561. package/.versions/2.0.15/skills/interview-me/SKILL.md +226 -0
  562. package/.versions/2.0.15/skills/orchestration-verification/SKILL.md +182 -0
  563. package/.versions/2.0.15/skills/peer-coms/SKILL.md +90 -0
  564. package/.versions/2.0.15/skills/performance-optimization/SKILL.md +496 -0
  565. package/.versions/2.0.15/skills/planning-and-task-breakdown/SKILL.md +318 -0
  566. package/.versions/2.0.15/skills/repository-ai-setup/SKILL.md +117 -0
  567. package/.versions/2.0.15/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  568. package/.versions/2.0.15/skills/repository-ai-setup/references/apply-contract.md +74 -0
  569. package/.versions/2.0.15/skills/repository-ai-setup/references/provenance-template.md +16 -0
  570. package/.versions/2.0.15/skills/repository-ai-setup/references/setup-flow.md +108 -0
  571. package/.versions/2.0.15/skills/repository-ai-setup/references/verify-setup.md +20 -0
  572. package/.versions/2.0.15/skills/security-and-hardening/SKILL.md +524 -0
  573. package/.versions/2.0.15/skills/spec-driven-development/SKILL.md +295 -0
  574. package/.versions/2.0.15/skills/using-agent-skills/SKILL.md +198 -0
  575. package/.versions/2.0.15/vendor/agent-skills-upstream/LICENSE +21 -0
  576. package/.versions/2.0.15/vendor/agent-skills-upstream/README.md +430 -0
  577. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  578. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  579. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  580. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  581. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  582. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  583. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  584. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  585. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  586. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  587. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  588. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  589. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  590. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  591. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  592. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  593. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  594. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  595. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  596. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  597. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  598. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  599. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  600. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  601. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  602. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  603. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  604. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  605. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  606. package/.versions/2.0.15/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  607. package/.versions/2.0.16/.pi/agent-fleet/hermes/README.md +347 -0
  608. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  609. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  610. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  611. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  612. package/.versions/2.0.16/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  613. package/.versions/2.0.16/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  614. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  615. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  616. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  617. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  618. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  619. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  620. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  621. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  622. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  623. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  624. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  625. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  626. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  627. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  628. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  629. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  630. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  631. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  632. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  633. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  634. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  635. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  636. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  637. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  638. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  639. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  640. package/.versions/2.0.16/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  641. package/.versions/2.0.16/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  642. package/.versions/2.0.16/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  643. package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
  644. package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  645. package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  646. package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  647. package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  648. package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet.ts +217 -0
  649. package/.versions/2.0.16/.pi/agent-fleet/scripts/flow.ts +157 -0
  650. package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  651. package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  652. package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  653. package/.versions/2.0.16/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  654. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
  655. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  656. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  657. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  658. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  659. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  660. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  661. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  662. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
  663. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  664. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  665. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  666. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  667. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  668. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  669. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  670. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  671. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  672. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  673. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  674. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  675. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  676. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  677. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  678. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  679. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  680. package/.versions/2.0.16/.pi/agent-fleet/scripts/package-lock.json +35 -0
  681. package/.versions/2.0.16/.pi/agent-fleet/scripts/package.json +9 -0
  682. package/.versions/2.0.16/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  683. package/.versions/2.0.16/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  684. package/.versions/2.0.16/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  685. package/.versions/2.0.16/.pi/agent-fleet/scripts/team-up.ts +378 -0
  686. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
  687. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  688. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  689. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  690. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  691. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  692. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  693. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
  694. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  695. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  696. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  697. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  698. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  699. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  700. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
  701. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  702. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  703. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  704. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  705. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  706. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  707. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  708. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  709. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  710. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  711. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  712. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  713. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  714. package/.versions/2.0.16/.pi/agents/dispatch-policy.yaml +32 -0
  715. package/.versions/2.0.16/.pi/agents/model-profiles.yaml +134 -0
  716. package/.versions/2.0.16/.pi/agents/peers.yaml +147 -0
  717. package/.versions/2.0.16/.pi/agents/teams.yaml +41 -0
  718. package/.versions/2.0.16/.pi/agents/voices.yaml +13 -0
  719. package/.versions/2.0.16/.pi/damage-control-rules.yaml +297 -0
  720. package/.versions/2.0.16/.pi/extensions/btw/README.md +120 -0
  721. package/.versions/2.0.16/.pi/extensions/btw/index.ts +914 -0
  722. package/.versions/2.0.16/.pi/extensions/btw/package.json +6 -0
  723. package/.versions/2.0.16/.pi/extensions/btw/state.js +179 -0
  724. package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  725. package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  726. package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  727. package/.versions/2.0.16/.pi/extensions/compact-and-continue/README.md +42 -0
  728. package/.versions/2.0.16/.pi/extensions/compact-and-continue/index.ts +120 -0
  729. package/.versions/2.0.16/.pi/extensions/compact-and-continue/package.json +6 -0
  730. package/.versions/2.0.16/.pi/extensions/mcp-bridge/README.md +46 -0
  731. package/.versions/2.0.16/.pi/extensions/mcp-bridge/index.ts +206 -0
  732. package/.versions/2.0.16/.pi/extensions/mcp-bridge/package.json +6 -0
  733. package/.versions/2.0.16/.pi/extensions/package-lock.json +1175 -0
  734. package/.versions/2.0.16/.pi/extensions/package.json +9 -0
  735. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/README.md +224 -0
  736. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/config.ts +198 -0
  737. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  738. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/index.ts +248 -0
  739. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/package.json +6 -0
  740. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  741. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  742. package/.versions/2.0.16/.pi/harnesses/agent-hub/README.md +1452 -0
  743. package/.versions/2.0.16/.pi/harnesses/agent-hub/acceptance.ts +199 -0
  744. package/.versions/2.0.16/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  745. package/.versions/2.0.16/.pi/harnesses/agent-hub/artifacts.js +146 -0
  746. package/.versions/2.0.16/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
  747. package/.versions/2.0.16/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
  748. package/.versions/2.0.16/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  749. package/.versions/2.0.16/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  750. package/.versions/2.0.16/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
  751. package/.versions/2.0.16/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
  752. package/.versions/2.0.16/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  753. package/.versions/2.0.16/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
  754. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  755. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  756. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  757. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  758. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  759. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  760. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  761. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  762. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  763. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  764. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  765. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  766. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
  767. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  768. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  769. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  770. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/context.ts +47 -0
  771. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  772. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  773. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  774. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  775. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  776. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  777. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
  778. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  779. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  780. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  781. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  782. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  783. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  784. package/.versions/2.0.16/.pi/harnesses/agent-hub/config/agents.ts +178 -0
  785. package/.versions/2.0.16/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
  786. package/.versions/2.0.16/.pi/harnesses/agent-hub/config/overrides.ts +155 -0
  787. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  788. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
  789. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
  790. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  791. package/.versions/2.0.16/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  792. package/.versions/2.0.16/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  793. package/.versions/2.0.16/.pi/harnesses/agent-hub/context-window.js +108 -0
  794. package/.versions/2.0.16/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  795. package/.versions/2.0.16/.pi/harnesses/agent-hub/delegate.ts +467 -0
  796. package/.versions/2.0.16/.pi/harnesses/agent-hub/deterministic-fs.ts +166 -0
  797. package/.versions/2.0.16/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  798. package/.versions/2.0.16/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  799. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
  800. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  801. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
  802. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +259 -0
  803. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
  804. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-types.ts +260 -0
  805. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
  806. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  807. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
  808. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
  809. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  810. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  811. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  812. package/.versions/2.0.16/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  813. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  814. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  815. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  816. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  817. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
  818. package/.versions/2.0.16/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  819. package/.versions/2.0.16/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  820. package/.versions/2.0.16/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  821. package/.versions/2.0.16/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  822. package/.versions/2.0.16/.pi/harnesses/agent-hub/filesystem-tool.ts +137 -0
  823. package/.versions/2.0.16/.pi/harnesses/agent-hub/fixtures/registration-surface.json +64 -0
  824. package/.versions/2.0.16/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  825. package/.versions/2.0.16/.pi/harnesses/agent-hub/footer.ts +30 -0
  826. package/.versions/2.0.16/.pi/harnesses/agent-hub/helpers.ts +270 -0
  827. package/.versions/2.0.16/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
  828. package/.versions/2.0.16/.pi/harnesses/agent-hub/index.ts +2601 -0
  829. package/.versions/2.0.16/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  830. package/.versions/2.0.16/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
  831. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
  832. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  833. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  834. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
  835. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  836. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  837. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  838. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  839. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  840. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  841. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  842. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  843. package/.versions/2.0.16/.pi/harnesses/agent-hub/no-progress.ts +563 -0
  844. package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
  845. package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  846. package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
  847. package/.versions/2.0.16/.pi/harnesses/agent-hub/package.json +7 -0
  848. package/.versions/2.0.16/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  849. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  850. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  851. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  852. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  853. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/work-mode.ts +135 -0
  854. package/.versions/2.0.16/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  855. package/.versions/2.0.16/.pi/harnesses/agent-hub/presentation.ts +48 -0
  856. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-config.ts +16 -0
  857. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  858. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  859. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  860. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-local.ts +71 -0
  861. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
  862. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
  863. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
  864. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  865. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  866. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
  867. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
  868. package/.versions/2.0.16/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
  869. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
  870. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/fragments.ts +116 -0
  871. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  872. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
  873. package/.versions/2.0.16/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  874. package/.versions/2.0.16/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  875. package/.versions/2.0.16/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  876. package/.versions/2.0.16/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  877. package/.versions/2.0.16/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
  878. package/.versions/2.0.16/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  879. package/.versions/2.0.16/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  880. package/.versions/2.0.16/.pi/harnesses/agent-hub/research/runtime.ts +197 -0
  881. package/.versions/2.0.16/.pi/harnesses/agent-hub/research/spawn-run.ts +183 -0
  882. package/.versions/2.0.16/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  883. package/.versions/2.0.16/.pi/harnesses/agent-hub/return-contract.js +349 -0
  884. package/.versions/2.0.16/.pi/harnesses/agent-hub/return-extract.js +77 -0
  885. package/.versions/2.0.16/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  886. package/.versions/2.0.16/.pi/harnesses/agent-hub/review-findings.js +104 -0
  887. package/.versions/2.0.16/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  888. package/.versions/2.0.16/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  889. package/.versions/2.0.16/.pi/harnesses/agent-hub/run-budget.js +554 -0
  890. package/.versions/2.0.16/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  891. package/.versions/2.0.16/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
  892. package/.versions/2.0.16/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  893. package/.versions/2.0.16/.pi/harnesses/agent-hub/scope-gate.js +144 -0
  894. package/.versions/2.0.16/.pi/harnesses/agent-hub/session-audit.ts +313 -0
  895. package/.versions/2.0.16/.pi/harnesses/agent-hub/session-health.js +110 -0
  896. package/.versions/2.0.16/.pi/harnesses/agent-hub/session-start.ts +42 -0
  897. package/.versions/2.0.16/.pi/harnesses/agent-hub/spawn.ts +534 -0
  898. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  899. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-communication-store.ts +129 -0
  900. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  901. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-runtime.ts +258 -0
  902. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
  903. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
  904. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
  905. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
  906. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  907. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
  908. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  909. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  910. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  911. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  912. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
  913. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  914. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  915. package/.versions/2.0.16/.pi/harnesses/agent-hub/timeline.ts +72 -0
  916. package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
  917. package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
  918. package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  919. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/action-executors.ts +208 -0
  920. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  921. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/context.ts +144 -0
  922. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
  923. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +558 -0
  924. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  925. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  926. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  927. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
  928. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
  929. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  930. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
  931. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  932. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
  933. package/.versions/2.0.16/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  934. package/.versions/2.0.16/.pi/harnesses/agent-hub/types.ts +66 -0
  935. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  936. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
  937. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  938. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  939. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
  940. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  941. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  942. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  943. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  944. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  945. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  946. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  947. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  948. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  949. package/.versions/2.0.16/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  950. package/.versions/2.0.16/.pi/harnesses/agent-hub/version.ts +42 -0
  951. package/.versions/2.0.16/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  952. package/.versions/2.0.16/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  953. package/.versions/2.0.16/.pi/harnesses/agent-hub/work-mode.ts +179 -0
  954. package/.versions/2.0.16/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
  955. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/README.md +59 -0
  956. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/index.ts +558 -0
  957. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/questions.ts +161 -0
  958. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  959. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
  960. package/.versions/2.0.16/.pi/harnesses/coms/README.md +100 -0
  961. package/.versions/2.0.16/.pi/harnesses/coms/index.ts +282 -0
  962. package/.versions/2.0.16/.pi/harnesses/coms/package.json +7 -0
  963. package/.versions/2.0.16/.pi/harnesses/coms/version.ts +42 -0
  964. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/README.md +135 -0
  965. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/index.ts +550 -0
  966. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/package.json +7 -0
  967. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/version.ts +42 -0
  968. package/.versions/2.0.16/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  969. package/.versions/2.0.16/.pi/harnesses/lib/coms-core-io.ts +385 -0
  970. package/.versions/2.0.16/.pi/harnesses/lib/coms-core.ts +577 -0
  971. package/.versions/2.0.16/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  972. package/.versions/2.0.16/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
  973. package/.versions/2.0.16/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
  974. package/.versions/2.0.16/.pi/harnesses/lib/context-budget-view.ts +107 -0
  975. package/.versions/2.0.16/.pi/harnesses/lib/context-budget.ts +114 -0
  976. package/.versions/2.0.16/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  977. package/.versions/2.0.16/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
  978. package/.versions/2.0.16/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  979. package/.versions/2.0.16/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  980. package/.versions/2.0.16/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  981. package/.versions/2.0.16/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  982. package/.versions/2.0.16/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
  983. package/.versions/2.0.16/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  984. package/.versions/2.0.16/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  985. package/.versions/2.0.16/.pi/harnesses/lib/fleet-panel.ts +34 -0
  986. package/.versions/2.0.16/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  987. package/.versions/2.0.16/.pi/harnesses/lib/fleet-selection.ts +24 -0
  988. package/.versions/2.0.16/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  989. package/.versions/2.0.16/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  990. package/.versions/2.0.16/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  991. package/.versions/2.0.16/.pi/harnesses/lib/herdr-client.ts +472 -0
  992. package/.versions/2.0.16/.pi/harnesses/lib/herdr-presence.ts +399 -0
  993. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  994. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  995. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  996. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  997. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  998. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  999. package/.versions/2.0.16/.pi/harnesses/lib/spawned-peers.js +191 -0
  1000. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-json.js +37 -0
  1001. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-loader.js +44 -0
  1002. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-proactive.js +57 -0
  1003. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-triage.js +42 -0
  1004. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-v2.js +100 -0
  1005. package/.versions/2.0.16/.pi/harnesses/lib/system1/config.js +50 -0
  1006. package/.versions/2.0.16/.pi/harnesses/lib/system1/contracts.ts +154 -0
  1007. package/.versions/2.0.16/.pi/harnesses/lib/system1/demo.ts +95 -0
  1008. package/.versions/2.0.16/.pi/harnesses/lib/system1/jev.ts +503 -0
  1009. package/.versions/2.0.16/.pi/harnesses/lib/system1/selection.js +11 -0
  1010. package/.versions/2.0.16/.pi/harnesses/lib/system1/service.ts +245 -0
  1011. package/.versions/2.0.16/.pi/harnesses/lib/update-check.ts +222 -0
  1012. package/.versions/2.0.16/.pi/harnesses/package-lock.json +2039 -0
  1013. package/.versions/2.0.16/.pi/harnesses/package.json +10 -0
  1014. package/.versions/2.0.16/.pi/prompts/af-build.md +27 -0
  1015. package/.versions/2.0.16/.pi/prompts/af-code-simplify.md +22 -0
  1016. package/.versions/2.0.16/.pi/prompts/af-constraints.md +31 -0
  1017. package/.versions/2.0.16/.pi/prompts/af-plan.md +17 -0
  1018. package/.versions/2.0.16/.pi/prompts/af-review.md +16 -0
  1019. package/.versions/2.0.16/.pi/prompts/af-set-hermes-telegram.md +15 -0
  1020. package/.versions/2.0.16/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  1021. package/.versions/2.0.16/.pi/prompts/af-setup-rules.md +20 -0
  1022. package/.versions/2.0.16/.pi/prompts/af-ship.md +17 -0
  1023. package/.versions/2.0.16/.pi/prompts/af-spec.md +15 -0
  1024. package/.versions/2.0.16/.pi/prompts/af-test.md +19 -0
  1025. package/.versions/2.0.16/.pi/skills/bowser/SKILL.md +145 -0
  1026. package/.versions/2.0.16/.version +1 -0
  1027. package/.versions/2.0.16/agents/architect.md +24 -0
  1028. package/.versions/2.0.16/agents/bowser.md +28 -0
  1029. package/.versions/2.0.16/agents/builder.md +55 -0
  1030. package/.versions/2.0.16/agents/code-reviewer.md +209 -0
  1031. package/.versions/2.0.16/agents/deep-researcher.md +32 -0
  1032. package/.versions/2.0.16/agents/documenter.md +22 -0
  1033. package/.versions/2.0.16/agents/orchestrator.md +22 -0
  1034. package/.versions/2.0.16/agents/plan-reviewer.md +83 -0
  1035. package/.versions/2.0.16/agents/planner.md +105 -0
  1036. package/.versions/2.0.16/agents/releaser.md +24 -0
  1037. package/.versions/2.0.16/agents/researcher.md +30 -0
  1038. package/.versions/2.0.16/agents/security-auditor.md +167 -0
  1039. package/.versions/2.0.16/agents/test-engineer.md +153 -0
  1040. package/.versions/2.0.16/agents/web-debugger.md +44 -0
  1041. package/.versions/2.0.16/agents/web-performance-auditor.md +194 -0
  1042. package/.versions/2.0.16/bin/catalog/harness-runtime-closure.json +73 -0
  1043. package/.versions/2.0.16/codex/fleet-session-client/SKILL.md +34 -0
  1044. package/.versions/2.0.16/codex/fleet-session-client.zip +0 -0
  1045. package/.versions/2.0.16/docs/ARCHITECTURE.md +834 -0
  1046. package/.versions/2.0.16/docs/agent-fleet-setup.md +1101 -0
  1047. package/.versions/2.0.16/docs/claude-code-coms-bridge.md +134 -0
  1048. package/.versions/2.0.16/docs/codex-session-bridge.md +219 -0
  1049. package/.versions/2.0.16/docs/coms-hermes-bridge.md +188 -0
  1050. package/.versions/2.0.16/docs/getting-started.md +126 -0
  1051. package/.versions/2.0.16/docs/npm-install.md +530 -0
  1052. package/.versions/2.0.16/docs/pi-extensions.md +454 -0
  1053. package/.versions/2.0.16/docs/pi-setup.md +92 -0
  1054. package/.versions/2.0.16/docs/skill-anatomy.md +150 -0
  1055. package/.versions/2.0.16/install-manifest.json +3193 -0
  1056. package/.versions/2.0.16/justfile +247 -0
  1057. package/.versions/2.0.16/manifest-meta.json +1071 -0
  1058. package/.versions/2.0.16/references/accessibility-checklist.md +160 -0
  1059. package/.versions/2.0.16/references/communication-contract.md +26 -0
  1060. package/.versions/2.0.16/references/definition-of-done.md +67 -0
  1061. package/.versions/2.0.16/references/fleet-coordination-patterns.md +171 -0
  1062. package/.versions/2.0.16/references/observability-checklist.md +92 -0
  1063. package/.versions/2.0.16/references/orchestration-patterns.md +370 -0
  1064. package/.versions/2.0.16/references/performance-checklist.md +236 -0
  1065. package/.versions/2.0.16/references/prompting-patterns.md +380 -0
  1066. package/.versions/2.0.16/references/security-checklist.md +245 -0
  1067. package/.versions/2.0.16/references/testing-patterns.md +235 -0
  1068. package/.versions/2.0.16/references/workflow-authoring.md +304 -0
  1069. package/.versions/2.0.16/skills/_internal/grilling.md +59 -0
  1070. package/.versions/2.0.16/skills/browser-testing-with-devtools/SKILL.md +351 -0
  1071. package/.versions/2.0.16/skills/code-review-and-quality/SKILL.md +396 -0
  1072. package/.versions/2.0.16/skills/compound-learning/SKILL.md +137 -0
  1073. package/.versions/2.0.16/skills/constraint-driven-development/SKILL.md +338 -0
  1074. package/.versions/2.0.16/skills/constraint-driven-development/references/floor-guard.md +99 -0
  1075. package/.versions/2.0.16/skills/context-engineering/SKILL.md +341 -0
  1076. package/.versions/2.0.16/skills/deprecation-and-migration/SKILL.md +247 -0
  1077. package/.versions/2.0.16/skills/designing-agents/SKILL.md +394 -0
  1078. package/.versions/2.0.16/skills/designing-agents/pi-harness-authoring.md +222 -0
  1079. package/.versions/2.0.16/skills/drafting-workflows/SKILL.md +143 -0
  1080. package/.versions/2.0.16/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  1081. package/.versions/2.0.16/skills/frontend-ui-engineering/SKILL.md +328 -0
  1082. package/.versions/2.0.16/skills/git-workflow-and-versioning/SKILL.md +316 -0
  1083. package/.versions/2.0.16/skills/idea-refine/SKILL.md +182 -0
  1084. package/.versions/2.0.16/skills/idea-refine/examples.md +238 -0
  1085. package/.versions/2.0.16/skills/idea-refine/frameworks.md +99 -0
  1086. package/.versions/2.0.16/skills/idea-refine/refinement-criteria.md +113 -0
  1087. package/.versions/2.0.16/skills/idea-refine/scripts/idea-refine.sh +15 -0
  1088. package/.versions/2.0.16/skills/incremental-implementation/SKILL.md +353 -0
  1089. package/.versions/2.0.16/skills/interview-me/SKILL.md +226 -0
  1090. package/.versions/2.0.16/skills/orchestration-verification/SKILL.md +182 -0
  1091. package/.versions/2.0.16/skills/peer-coms/SKILL.md +90 -0
  1092. package/.versions/2.0.16/skills/performance-optimization/SKILL.md +496 -0
  1093. package/.versions/2.0.16/skills/planning-and-task-breakdown/SKILL.md +318 -0
  1094. package/.versions/2.0.16/skills/repository-ai-setup/SKILL.md +117 -0
  1095. package/.versions/2.0.16/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  1096. package/.versions/2.0.16/skills/repository-ai-setup/references/apply-contract.md +74 -0
  1097. package/.versions/2.0.16/skills/repository-ai-setup/references/provenance-template.md +16 -0
  1098. package/.versions/2.0.16/skills/repository-ai-setup/references/setup-flow.md +108 -0
  1099. package/.versions/2.0.16/skills/repository-ai-setup/references/verify-setup.md +20 -0
  1100. package/.versions/2.0.16/skills/security-and-hardening/SKILL.md +524 -0
  1101. package/.versions/2.0.16/skills/spec-driven-development/SKILL.md +295 -0
  1102. package/.versions/2.0.16/skills/using-agent-skills/SKILL.md +198 -0
  1103. package/.versions/2.0.16/vendor/agent-skills-upstream/LICENSE +21 -0
  1104. package/.versions/2.0.16/vendor/agent-skills-upstream/README.md +430 -0
  1105. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  1106. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  1107. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  1108. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  1109. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  1110. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  1111. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  1112. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  1113. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  1114. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  1115. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  1116. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  1117. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  1118. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  1119. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  1120. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  1121. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  1122. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  1123. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  1124. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  1125. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  1126. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  1127. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  1128. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  1129. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  1130. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  1131. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  1132. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  1133. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  1134. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  1135. package/CHANGELOG.md +18 -0
  1136. package/README.md +1 -1
  1137. package/agents/builder.md +2 -2
  1138. package/bin/cli.js +33 -2
  1139. package/bin/lib/apply.js +5 -0
  1140. package/bin/lib/doctor.js +113 -31
  1141. package/bin/lib/reconcile.js +9 -1
  1142. package/bin/lib/state.js +1 -0
  1143. package/bin/lib/system1-migration.js +107 -0
  1144. package/bin/lib/task-triage-setup.js +36 -0
  1145. package/bin/lib/transaction.js +61 -16
  1146. package/bin/lib/workspace-safety.js +3 -2
  1147. package/docs/ARCHITECTURE.md +107 -27
  1148. package/docs/agent-fleet-setup.md +196 -12
  1149. package/docs/npm-install.md +72 -18
  1150. package/docs/pi-extensions.md +1 -1
  1151. package/docs/system1-config.md +83 -0
  1152. package/install-manifest.json +15 -5
  1153. package/manifest-meta.json +8 -2
  1154. package/package.json +14 -5
  1155. package/skills/incremental-implementation/SKILL.md +64 -13
  1156. package/skills/planning-and-task-breakdown/SKILL.md +43 -14
  1157. package/skills/using-agent-skills/SKILL.md +2 -2
@@ -1,6 +1,6 @@
1
1
  import { retainDeliverable } from "../execution-evidence.ts";
2
2
  import { buildRuntimeResult, minimalChangeRequirement, preflightDeliverables, readBackDeliverables, type AcceptanceRequirement, type DeliverableContract, type VerificationCheckInput } from "../acceptance.ts";
3
- import { normalizeResearchContract, withNoProgress, type NoProgressGuard } from "../no-progress.ts";
3
+ import { normalizeResearchContract, withNoProgress, canonicalExecutor, type NoProgressGuard } from "../no-progress.ts";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { mkdirSync, writeFileSync } from "node:fs";
6
6
  import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
@@ -9,7 +9,7 @@ import { countReviewFindings, findingBudgetNotice } from "../review-findings.js"
9
9
  import { checkDocsLane, docsLaneNotice } from "../docs-lane.js";
10
10
  import { checkExternalBlockerGate, extractExternalBlockers } from "../external-blocker.js";
11
11
  import type { BudgetRecovery } from "../budget-recovery.ts";
12
- import { checkScope, diffAgainst, snapshotWorktree, worktreeRevision } from "../scope-gate.js";
12
+ import { checkScope, diffAgainst, reviewableChangedPaths, snapshotWorktree, worktreeRevision } from "../scope-gate.js";
13
13
  import { diagnoseChangedTypeScript, formatAdvisory, type DiagnosticsResult } from "../../lib/changed-file-diagnostics.ts";
14
14
  import { correctStructuredReturnForCompiler, crossCheck, deliveryDisposition, extractAssertionIds, parseDeliveredReturn } from "../return-contract.js";
15
15
  import { shouldExtractReturn } from "../return-extract.js";
@@ -22,6 +22,8 @@ import type { AgentState } from "../types.ts";
22
22
  import { diagnoseToolProtocol, type ToolProtocolDiagnostic } from "../tool-protocol.ts";
23
23
  import type { TaskResumeInput } from "../task-resume-contract.ts";
24
24
  import { evaluateProcessObligations, noteProcessStage, processAllowsPersona, processPreEffectGate, type ProcessObligationState, type ProcessVerdict } from "../process-obligations.ts";
25
+ import { activeOrchestrationHandoff, plannerRequiredRefusal, reviewMayClose } from "../orchestration-activation.ts";
26
+ import { authorizePlanStatusUpdate } from "../orchestration-route.ts";
25
27
 
26
28
  type Gate = { reason: string; message: string } | null;
27
29
  type DispatchResult = import("../dispatch-native-types.ts").NativeDispatchResult;
@@ -48,6 +50,7 @@ export interface DispatchExecutionState {
48
50
  getActiveWritableDispatches(): number; setActiveWritableDispatches(value: number): void;
49
51
  getWritableOverlapCounter(): number; setWritableOverlapCounter(value: number): void;
50
52
  getProcessState?(): ProcessObligationState;
53
+ processBlock?(): { reason: string; message: string } | null;
51
54
  setProcessState?(value: ProcessObligationState): void;
52
55
  persistProcessVerdict?(state: ProcessObligationState, verdict: ProcessVerdict): void;
53
56
  }
@@ -80,13 +83,38 @@ export function preflightGate(d: DispatchExecutorDeps, persona: string): Gate {
80
83
  const s = d.state;
81
84
  const blocked = checkExternalBlockerGate({ blockers: s.getExternalBlockers(), acknowledged: s.getExternalBlockerAcknowledged(), askUserAvailable: s.isAskUserAvailable(), refusedOnce: s.getExternalBlockerRefusedOnce() });
82
85
  if (blocked) { s.setExternalBlockerRefusedOnce(true); return blocked; }
86
+ const blockedProcess = s.processBlock?.();
87
+ if (blockedProcess) return blockedProcess;
83
88
  const process = s.getProcessState?.();
84
89
  return process && processAllowsPersona(process, persona) ? null : checkTierPersonaGate(s.getTaskTier(), persona);
85
90
  }
86
91
 
92
+ function refusalCategoryFor(status: string, reason?: string): "not_started" | "operator_cancelled" | "unknown_tool" {
93
+ const values = [status, reason].filter((v): v is string => typeof v === "string").map(v => v.toLowerCase());
94
+ if (values.some(v => v.includes("operator_cancel") || v === "cancelled" || v === "canceled")) return "operator_cancelled";
95
+ if (values.some(v => v.includes("unknown_tool"))) return "unknown_tool";
96
+ return "not_started";
97
+ }
98
+
99
+ /** T7: authoritative state snapshot rendered into refusals. Prompt prose never changes
100
+ * state; setter/result/gate share one snapshot (task/tier/source). Refusals show the
101
+ * actual tier/catalog/revision so the operator can correct against reality. */
102
+ function refusalSnapshot(d: DispatchExecutorDeps, ctx: ExtensionContext): string {
103
+ try {
104
+ const tier = (d.state as any)?.getTaskTier?.() ?? "unknown";
105
+ const catalog = (d as any)?.getToolCatalogVersion?.() ?? "unknown";
106
+ let revision = "unavailable";
107
+ try { revision = worktreeRevision(ctx.cwd || process.cwd(), []); } catch {}
108
+ return `Snapshot: tier "${tier}", catalog "${catalog}", revision "${revision}". Prompt prose did not change state.`;
109
+ } catch { return "Snapshot unavailable."; }
110
+ }
111
+
112
+ /** Runtime-owned preflight refusal: never launched a process, never produced effects.
113
+ * Callers must not infer execution from exitCode alone; started:false is authoritative. */
87
114
  function refusal(d: DispatchExecutorDeps, agent: string, task: string, status: string, message: string, reason?: string): ToolExecutionResult {
88
115
  d.state.getTurnReport().refusals++; d.state.getSessionTotals().refusals++;
89
- return { content: [{ type: "text", text: message }], details: { agent, task, status, reason: reason ?? status, elapsed: 0, exitCode: 1, fullOutput: "" } };
116
+ const recoveryCategory = refusalCategoryFor(status, reason);
117
+ return { content: [{ type: "text", text: message }], details: { agent, task, status, reason: reason ?? status, recoveryCategory, elapsed: 0, exitCode: 1, fullOutput: "", started: false, notStarted: true, effects: "none" } };
90
118
  }
91
119
 
92
120
  const RESEARCH_DISPATCH_NAMES = new Set(["researcher", "deep-researcher"]);
@@ -105,7 +133,7 @@ function unknownAgentMessage(agent: string, available: string[], researchHint: b
105
133
  const research = researchHint
106
134
  ? `\n\n"${agent}" is a research persona. Call spawn_research with persona "${agent}" instead of dispatch_agent. Do not invent a substitute dispatch.`
107
135
  : "";
108
- return `Unknown agent "${agent}". dispatch_agent only accepts the active roster. Available agents: ${roster}.${research}\n\nDo not invent a substitute dispatch. Use an available agent, or spawn_research for a research persona.`;
136
+ return `Unknown agent "${agent}". dispatch_agent only accepts the active roster. Available agents: ${roster}.${research}\n\nDo not invent a substitute dispatch. ${["planner", "code-reviewer", "plan-reviewer", "security-auditor"].includes(agent) ? `Ask the human to activate the required role with /af-agents-add ${agent} or /af-agents-team; this does not change the tier or budget. ` : ""}Use an available agent, or spawn_research for a research persona.`;
109
137
  }
110
138
 
111
139
  export function validateDispatchAgent(d: DispatchExecutorDeps, agent: string, task: string): ToolExecutionResult | null {
@@ -149,9 +177,10 @@ export function prepareDispatch(d: DispatchExecutorDeps, params: DispatchAgentPa
149
177
  if (rosterRefusal) return rosterRefusal;
150
178
  if (s.getAgentStates().get(agent)?.status === "running") return { content: [{ type: "text", text: "Agent is busy; nothing started, queued or charged. Re-invoke explicitly after it is idle." }], details: { status: "busy", reason: "busy", recoveryCategory: "busy", started: false, exitCode: 1 } };
151
179
  d.budget.ensureTaskTier();
152
- const processGate = s.getProcessState ? processPreEffectGate(s.getProcessState(), "child", agent) : { reason: "process_state_unavailable", message: "Process state is unavailable; child launch fails closed." };
153
- const preflight = preflightGate(d, agent) ?? processGate ?? checkReviewRoundCap(s.getTaskTier(), agent, s.getTaskReviewRounds()) ?? checkDocsLane(agent, scope || [], review_reason);
154
- if (preflight) return refusal(d, agent, task, preflight.reason, preflight.message, preflight.reason);
180
+ const routeReason = plannerRequiredRefusal(task, agent, s.getProcessState?.());
181
+ const processGate = routeReason ? { reason: "planner_required", message: routeReason } : s.processBlock?.() ?? (s.getProcessState ? processPreEffectGate(s.getProcessState(), "child", agent) : { reason: "process_state_unavailable", message: "Process state is unavailable; child launch fails closed." });
182
+ const preflight = preflightGate(d, agent) ?? processGate ?? checkReviewRoundCap(s.getTaskTier(), agent, s.getTaskReviewRounds()) ?? (s.getProcessState && processAllowsPersona(s.getProcessState(), agent) ? null : checkDocsLane(agent, scope || [], review_reason));
183
+ if (preflight) return refusal(d, agent, task, preflight.reason, `${preflight.message}\n\n${refusalSnapshot(d, ctx as any)}`, preflight.reason);
155
184
  const taskRefusal = checkTaskBudget("dispatch", d.budget.taskCounters(), d.budget.currentTaskBudget(), d.budget.taskActiveElapsedMs(), s.getTaskTier());
156
185
  if (taskRefusal) return refusal(d, agent, task, "task_budget_refused", taskRefusal.message, taskRefusal.reason);
157
186
  const turnRefusal = checkTurnBudget("dispatch", { dispatches: s.getTurnDispatchCount(), research: s.getTurnResearchCount() }, d.budget.currentBudget(), d.budget.turnBudgetActiveElapsedMs(), s.getTaskTier());
@@ -163,7 +192,7 @@ export function prepareDispatch(d: DispatchExecutorDeps, params: DispatchAgentPa
163
192
  if (s.getTurnDispatchFingerprints().has(fingerprint)) return refusal(d, agent, task, "duplicate_refused", `⚠ Duplicate dispatch refused: you already dispatched ${agent} with this task (or a trivial rewording of it) THIS turn. Use the earlier result — re-read its digest/returnPath — or change the task materially (new instructions, corrected inputs) before re-dispatching.`);
164
193
  let inputArtifacts: InputArtifactPreview[];
165
194
  try { inputArtifacts = d.artifacts.loadInputArtifacts(artifacts, ctx); }
166
- catch (err: any) { return { content: [{ type: "text", text: `⚠ Dispatch NOT sent and NOT counted against the turn budget — input artifact could not be resolved:\n${err?.message || err}\n\nFix the path and dispatch again.` }], details: { agent, task, status: "artifact_preflight_failed", elapsed: 0, exitCode: 1, fullOutput: "" } }; }
195
+ catch (err: any) { return { content: [{ type: "text", text: `⚠ Dispatch NOT sent and NOT counted against the turn budget — input artifact could not be resolved:\n${err?.message || err}\n\nFix the path and dispatch again.` }], details: { agent, task, status: "artifact_preflight_failed", reason: "artifact_preflight_failed", recoveryCategory: "not_started" as const, elapsed: 0, exitCode: 1, fullOutput: "", started: false, notStarted: true, effects: "none" } }; }
167
196
  s.setTurnDispatchCount(s.getTurnDispatchCount() + 1); s.setTaskDispatchCount(s.getTaskDispatchCount() + 1);
168
197
  if (isReviewPersona(agent)) s.setTaskReviewRounds(s.getTaskReviewRounds() + 1);
169
198
  s.getSessionTotals().dispatches++; d.budget.updateModeStatus();
@@ -329,11 +358,20 @@ async function finishDispatch(d: DispatchExecutorDeps, p: PreparedDispatch, para
329
358
  for (const record of backendUsed === "native" && tracking.writable ? result.runtimeTests ?? [] : []) for (const kind of ["test", "code-grep"] as const) {
330
359
  const covered = p.requirements.filter(requirement => requirement.tag === kind && requirement.source && requirement.testCommand === record.command);
331
360
  if (!covered.length) continue;
332
- const evidenceRef = d.artifacts.writeRunArtifact(`${key}-test-check`, state?.runCount ?? 0, JSON.stringify({ taskId: p.taskId, dispatchId: result.dispatchId, record, requirements: covered }, null, 2), "evidence", randomUUID(), p.sessionDir);
361
+ const coverage = covered.map(requirement => ({ id: requirement.id, source: requirement.source, text: requirement.text, reference: requirement.reference, criticalConditions: requirement.criticalConditions ?? [] }));
362
+ // This artifact records the observed command and declared coverage, not a
363
+ // pre-evaluation ledger snapshot. The acceptance artifact evaluates this
364
+ // check against the current task/revision and exact requirement binding.
365
+ const evidenceRef = d.artifacts.writeRunArtifact(`${key}-test-check`, state?.runCount ?? 0, JSON.stringify({
366
+ schema: "agent-fleet.runtime-test-evidence/v1",
367
+ observation: record,
368
+ declaration: { taskId: p.taskId, dispatchId: result.dispatchId, kind, coverage },
369
+ evaluationSource: "agent-fleet.runtime-result/v1 verification.checks and verification.requirements",
370
+ }, null, 2), "evidence", randomUUID(), p.sessionDir);
333
371
  checks.push({ producer: "runtime", kind, command: [record.command], exitCode: record.exitCode,
334
372
  inspectedRevision: record.beforeRevision === record.afterRevision ? record.afterRevision : "changed-during-check",
335
373
  evidenceRef, requirementIds: ["AF-MIN-CHANGE", ...covered.map(requirement => requirement.id)], taskId: p.taskId,
336
- coverage: covered.map(requirement => ({ id: requirement.id, source: requirement.source, text: requirement.text, reference: requirement.reference, criticalConditions: requirement.criticalConditions ?? [] })),
374
+ coverage,
337
375
  });
338
376
  }
339
377
  const runtimeResult: any = buildRuntimeResult({
@@ -345,16 +383,28 @@ async function finishDispatch(d: DispatchExecutorDeps, p: PreparedDispatch, para
345
383
  let processVerdict: ProcessVerdict | null = null;
346
384
  if (s.getProcessState) {
347
385
  let processState = s.getProcessState();
386
+ const taskChanges = (paths: string[]) => reviewableChangedPaths(paths, cwd, p.sessionDir, p.scopeGlobs, p.contract.files.map(file => file.path));
348
387
  if (runtimeResult.acceptance.accepted && runtimeResult.verification.evidenceRefs[0]) {
349
- processState = noteProcessStage(processState, "acceptance", { evidenceRef: runtimeResult.verification.evidenceRefs[0], revision: afterRevision, changedFiles: observation?.paths ?? [] });
388
+ processState = noteProcessStage(processState, "acceptance", { evidenceRef: runtimeResult.verification.evidenceRefs[0], revision: afterRevision, changedFiles: taskChanges(observation?.paths ?? []) });
350
389
  }
351
390
  const stage = p.agent === "planner" ? "plan" : isReviewPersona(p.agent) ? "review" : null;
352
391
  const affirmativeReview = /(?:^|\n)\s*(?:verdict\s*:\s*)?APPROVE\b/im.test(result.output) && !/(?:^|\n)\s*(?:verdict\s*:\s*)?REJECT\b/im.test(result.output);
353
392
  const reviewScope = checkScope(processState.changedFiles, p.scopeGlobs);
354
- const reviewAuthorized = stage !== "review" || (affirmativeReview && processState.changedFiles.length > 0 && reviewScope.outOfScope.length === 0);
355
- if (stage && reviewAuthorized && disposition.delivered && result.exitCode === 0 && sameTask && runPath) {
393
+ const reviewAuthorized = stage !== "review" || (affirmativeReview && processState.changedFiles.length > 0 && reviewScope.outOfScope.length === 0 && reviewMayClose({ revision: afterRevision, scope: processState.changedFiles, output: result.output, evidenceRef: runPath ?? undefined, declared: !!parsedReturn, wide: processState.scope === "wide" || !!processState.additions?.some(item => item.status === "active" && item.reason === "wide_change") }));
394
+ // A declared plan must read back successfully; a refusal or unresolved
395
+ // decision is not plan evidence. No declaration still permits a retained
396
+ // nonempty plan return. The Hub cannot judge its semantic adequacy.
397
+ const planProduced = stage !== "plan" || (result.output.trim().length > 0
398
+ && runtimeResult.compatibility.hubAcceptanceStatus !== "deliverable_failed"
399
+ && !(parsedReturn?.requires_user_decision ?? []).some((entry: unknown) => String(entry).trim().toLowerCase() !== "none")
400
+ && d.extractNeedsResearch(result.output).length === 0 && d.extractAskUserQuestions(result.output).length === 0);
401
+ if (stage && planProduced && reviewAuthorized && disposition.delivered && result.exitCode === 0 && sameTask && runPath) {
356
402
  processState = noteProcessStage(processState, stage, { evidenceRef: runPath, revision: afterRevision });
357
403
  }
404
+ const planDeliverable = p.contract.files.map(file => file.path).find(path => /plan/i.test(path));
405
+ if (p.agent === "builder" && planDeliverable && runPath && authorizePlanStatusUpdate({ planPath: planDeliverable, allowedScope: p.scopeGlobs, evidenceRefs: [runPath] }).allowed && sameTask) {
406
+ processState = noteProcessStage(processState, "plan", { evidenceRef: runPath, revision: afterRevision });
407
+ }
358
408
  s.setProcessState?.(processState);
359
409
  processVerdict = evaluateProcessObligations(processState, { writable: tracking.writable || stage !== null, budgetTier: s.getTaskTier() ?? "small", t2Accepted: runtimeResult.acceptance.accepted, currentRevision: afterRevision });
360
410
  runtimeResult.process = processVerdict;
@@ -363,10 +413,16 @@ async function finishDispatch(d: DispatchExecutorDeps, p: PreparedDispatch, para
363
413
  if (runtimeResult.compatibility.hubAcceptanceStatus !== "deliverable_failed") runtimeResult.compatibility = { hubAcceptanceStatus: "needs_verification", flowStatus: "rejected" };
364
414
  }
365
415
  s.persistProcessVerdict?.(processState, processVerdict);
416
+ if (s.processBlock?.()) {
417
+ runtimeResult.acceptance = { status: "not_accepted", accepted: false, reasons: [...new Set([...runtimeResult.acceptance.reasons, s.processBlock()!.reason])] };
418
+ runtimeResult.compatibility = { hubAcceptanceStatus: "needs_verification", flowStatus: "rejected" };
419
+ }
366
420
  }
367
421
  if (sameTask && result.dispatchId && !disposition.pending) {
422
+ // T2/F3: use the canonical wrapper identity so production reconcile can match.
423
+ // Previously this wrote raw p.agent while the wrapper used canonical([cwd, actor]).
368
424
  d.noProgress.recordDispatchEvidence({
369
- dispatchId: result.dispatchId, taskId: p.taskId, executor: p.agent, revision: afterRevision,
425
+ dispatchId: result.dispatchId, taskId: p.taskId, executor: canonicalExecutor(cwd, p.agent), revision: afterRevision,
370
426
  changedScope: changes.attribution === 'certain' ? changes.paths : [], readback,
371
427
  concurrentWriters: observation?.concurrentWritableOverlap ?? true,
372
428
  effectsRef: protocolEvidencePath ?? undefined,
@@ -379,14 +435,17 @@ async function finishDispatch(d: DispatchExecutorDeps, p: PreparedDispatch, para
379
435
  }
380
436
  const accepted = runtimeResult.acceptance.accepted;
381
437
  const acceptanceStatus = runtimeResult.compatibility.hubAcceptanceStatus;
382
- const status = protocolDiagnostic ? "tool_protocol_error" : accepted ? "accepted" : executionStatus === "completed" && (runtimeResult.verification.status === "failed" || acceptanceStatus === "deliverable_failed") ? "verification_failed" : executionStatus === "completed" ? "completed_unverified" : disposition.status;
438
+ const questions = d.extractAskUserQuestions(result.output);
439
+ const contractGap = acceptanceStatus === "deliverable_failed" ? "missing_deliverable" : !parsedReturn && questions.length ? "missing_structured_return" : null;
440
+ const blockedOnUser = questions.length > 0 && !protocolDiagnostic && executionStatus === "completed";
441
+ const status = protocolDiagnostic ? "tool_protocol_error" : blockedOnUser ? "blocked_on_user" : accepted ? "accepted" : executionStatus === "completed" && (runtimeResult.verification.status === "failed" || acceptanceStatus === "deliverable_failed") ? "verification_failed" : executionStatus === "completed" ? "completed_unverified" : disposition.status;
383
442
  const assessment = { ...runtimeResult,
384
443
  executionStatus, acceptanceStatus, accepted, dispatchId: result.dispatchId ?? null, readback, scopeRoots: p.contract.scopeRoots,
385
444
  assertions: ids, structuredReturn: parsedReturn, contractNotices, compilerDiagnostics, compilerEvidencePath, protocolDiagnostic, protocolEvidencePath };
386
445
  const assessmentPath = disposition.pending ? null : d.artifacts.writeRunArtifact(`${key}-acceptance`, state?.runCount ?? 0, JSON.stringify(assessment, null, 2), "evidence", assessmentId, p.sessionDir);
387
446
  if (sameTask && [0, 124, 125].includes(result.exitCode)) s.getTurnDispatchFingerprints().add(p.fingerprint);
388
447
  if (sameTask) { s.getTurnReport().dispatches.push({ agent: p.agent, status, elapsed: result.elapsed, billed: run.billed, out: run.out }); s.getSessionTotals().billed += run.billed; s.getSessionTotals().out += run.out; }
389
- const questions = d.extractAskUserQuestions(result.output); const unresolved = d.extractNeedsResearch(result.output); const answered = researchRounds.reduce((n, r) => n + r.questions.length, 0);
448
+ const unresolved = d.extractNeedsResearch(result.output); const answered = researchRounds.reduce((n, r) => n + r.questions.length, 0);
390
449
  const notices: string[] = [];
391
450
  if (!sameTask) notices.push("Late result from a prior task/session: evidence retained in its original namespace; current-task counters and blockers were not changed.");
392
451
  if (disposition.delivered) notices.push(accepted
@@ -396,7 +455,8 @@ async function finishDispatch(d: DispatchExecutorDeps, p: PreparedDispatch, para
396
455
  : `Execution completed, NOT accepted. ${acceptanceStatus === "deliverable_failed" ? "Expected deliverable readback failed." : "Verification is missing, failed, stale, unsupported, or attribution-uncertain; file presence, exit 0, and claims are not proof."} Acceptance check: ${assessmentPath}`);
397
456
  if (readback.some(file => file.changed === false)) notices.push("Some deliverables already existed unchanged. Do not attribute their creation to this execution.");
398
457
  const blockers = extractExternalBlockers(result.output); if (sameTask && blockers.length) { for (const what of blockers) if (!s.getExternalBlockers().some(b => b.what === what)) s.getExternalBlockers().push({ agent: p.agent, what }); s.setExternalBlockerAcknowledged(false); s.setExternalBlockerRefusedOnce(false); notices.push(`⛔ ${p.agent} reported an EXTERNAL BLOCKER — something outside the fleet's reach is missing:\n${blockers.map((w, i) => ` ${i + 1}. ${w}`).join("\n")}\nThe next dispatch/research call is refused until you escalate this to the human. Do not build a substitute for the missing fact.`); }
399
- if (questions.length) notices.push(`⚠ ${questions.length} ASK_USER question(s) raised by ${p.agent}. You MUST call ask_user for each (in ${s.getUserLanguage()}) before re-dispatching:\n${questions.map((q, i) => ` ${i + 1}. ${q}`).join("\n")}`);
458
+ if (questions.length) notices.push(`⚠ ${questions.length} ASK_USER question(s) raised by ${p.agent}. You MUST call ask_user for each (in ${s.getUserLanguage()}) before re-dispatching. Resume only with USER_ANSWER: ${result.dispatchId ?? "<dispatchId>"} :: <question>:\n${questions.map((q, i) => ` ${i + 1}. ${q}`).join("\n")}`);
459
+ notices.push("Orchestration handoff is in details.orchestration. Start from its manifest; reread a file only when it is missing, stale, or conflicting. A wide review closes only with a full regression marker. Model routing was not changed.");
400
460
  if (researchRounds.length) notices.push(`ℹ ${p.agent} auto-paused for research ${researchRounds.length} round(s); ${answered} question(s) answered by read-only helpers. Findings were saved under ${safePathWithin(s.getSessionDir(), "findings")} and read by the agent directly — they are NOT inlined here.`);
401
461
  if (unresolved.length && researchRounds.length >= MAX_AUTO_RESEARCH_ROUNDS) notices.push(`⚠ ${p.agent} still requests research (${unresolved.length} question(s)) but the auto-research budget is exhausted. Run spawn_research yourself and re-dispatch with the findings, or simplify the task.`);
402
462
  if (run.autoResearchTaskCapped) notices.push(`⚠ ${p.agent} paused for research, but the TASK research envelope is spent (${s.getTaskResearchCount()}/${d.budget.currentTaskBudget().maxResearch}) — no helper was spawned and the specialist was not resumed. Its questions are unanswered. Narrow the task so it can proceed on what it has, or call set_task_tier with new_task: true if this is genuinely different work.`);
@@ -413,10 +473,10 @@ async function finishDispatch(d: DispatchExecutorDeps, p: PreparedDispatch, para
413
473
  if (state && d.contextPressure(state.contextPct)) notices.push(`⚠ ${d.displayName(state.def.name)} context at ${Math.ceil(state.contextPct)}% — consider /af-agents-restart ${state.def.name} (state lives in the artifacts/ledger, a restart is cheap).`);
414
474
  const scopeViolations = scopeResult(p, observation); const scopeNotice = scopeNoticeText(scopeViolations); if (scopeNotice) notices.push(scopeNotice.trim());
415
475
  const finding = isReviewPersona(p.agent) ? findingBudgetNotice(p.agent, blockingFindingCap(s.getTaskTier()), countReviewFindings(result.output), s.getTaskReviewRounds(), reviewRoundCap(s.getTaskTier())) || "" : ""; if (finding) notices.push(finding.trim());
416
- const docs = docsLaneNotice(p.agent, p.scopeGlobs); if (docs) notices.push(docs);
476
+ const docs = docsLaneNotice(p.agent, p.scopeGlobs, processVerdict?.obligations?.review?.status === "open"); if (docs) notices.push(docs);
417
477
  const contract = contractNoticeText(contractNotices); const extraction = returnExtracted ? "ℹ The specialist declared no structured return. The block below was EXTRACTED from its report by a cheap read-only pass — weaker than a declared return. Verify the named evidence before you gate on it." : "";
418
478
  const digest = shouldUseDigest ? [extraction, structuredReturnDigest(parsedReturn) || "Structured return: (none parsed)", contract].filter(Boolean).join("\n\n") : (result.output.length > 8000 ? `${result.output.slice(0, 8000)}\n\n... [truncated]` : result.output);
419
- return { content: [{ type: "text", text: `[${p.agent}] ${status} in ${Math.round(result.elapsed / 1000)}s${notices.length ? `\n\n${notices.join("\n\n")}` : ""}${processVerdict ? `\n\nProcess: ${processVerdict.explanation}` : ""}\n\n${digest}` }], details: { agent: p.agent, task: p.task, status, ...(protocolDiagnostic ? { recoveryCategory: "tool_protocol_error", reason: protocolDiagnostic.message, protocolDiagnostic, protocolEvidencePath, protocolEffectsEvidenceRef: protocolEvidencePath } : { protocolDiagnostic: null, protocolEvidencePath: null }), executionStatus, acceptanceStatus, accepted, runtimeResult, processVerdict, taskIdentity: runtimeResult.task, changeResult: runtimeResult.changes, verificationResult: runtimeResult.verification, staleTask: !sameTask, deliverableReadback: readback, scopeRoots: p.contract.scopeRoots, assessmentPath, backendRequested: params.backend ?? "auto", backendUsed, elapsed: result.elapsed, exitCode: result.exitCode, fullOutput: result.output, dispatchId: result.dispatchId ?? null, transcriptPath: result.transcriptPath ?? null, diagnostics: result.diagnostics ?? null, evidencePath: result.evidencePath ?? null, compilerDiagnostics, compilerEvidencePath, structuredReturn: parsedReturn, returnExtracted, pending: disposition.pending, returnPath, failurePath, contractNotices, questions, researchRounds, scopeViolations, sessionReset: result.sessionReset ?? null, artifacts: p.inputArtifacts.map(a => ({ path: a.path, displayPath: a.displayPath, preview: a.preview, resolvedFromKind: a.resolvedFromKind ?? null })) } };
479
+ return { content: [{ type: "text", text: `[${p.agent}] ${status} in ${Math.round(result.elapsed / 1000)}s${notices.length ? `\n\n${notices.join("\n\n")}` : ""}${processVerdict ? `\n\nProcess: ${processVerdict.explanation}` : ""}\n\n${digest}` }], details: { agent: p.agent, task: p.task, status, ...(protocolDiagnostic ? { recoveryCategory: "tool_protocol_error", reason: protocolDiagnostic.message, protocolDiagnostic, protocolEvidencePath, protocolEffectsEvidenceRef: protocolEvidencePath } : blockedOnUser ? { recoveryCategory: "blocked_on_user", reason: "waiting for a recorded user answer", protocolDiagnostic: null, protocolEvidencePath: null } : { protocolDiagnostic: null, protocolEvidencePath: null }), contractGap, executionStatus, acceptanceStatus, accepted, runtimeResult, processVerdict, taskIdentity: runtimeResult.task, changeResult: runtimeResult.changes, verificationResult: runtimeResult.verification, staleTask: !sameTask, deliverableReadback: readback, scopeRoots: p.contract.scopeRoots, assessmentPath, backendRequested: params.backend ?? "auto", backendUsed, elapsed: result.elapsed, exitCode: result.exitCode, fullOutput: result.output, dispatchId: result.dispatchId ?? null, transcriptPath: result.transcriptPath ?? null, diagnostics: result.diagnostics ?? null, evidencePath: result.evidencePath ?? null, lifecycle: (result as any).lifecycle ?? null, termination: (result as any).termination ?? (result.diagnostics as any)?.termination ?? null, spawnError: (result.diagnostics as any)?.spawnError ?? null, compilerDiagnostics, compilerEvidencePath, structuredReturn: parsedReturn, returnExtracted, pending: disposition.pending, returnPath, failurePath, contractNotices, questions, orchestration: activeOrchestrationHandoff({ agent: p.agent, task: p.task, scope: p.scopeGlobs, revision: afterRevision, changes: changes.attribution === "certain" ? changes.paths : [], exitCode: result.exitCode, questions, evidenceRefs: runtimeResult.verification.evidenceRefs, approvedPlan: !!s.getProcessState?.().plan?.evidenceRef, risk: s.getProcessState?.().risk === "high" ? "high" : "low", scopeBreadth: s.getProcessState?.().scope === "wide" ? "wide" : "narrow", sharedCode: false, model: backendUsed ?? undefined, elapsedMs: result.elapsed }), researchRounds, scopeViolations, sessionReset: result.sessionReset ?? null, artifacts: p.inputArtifacts.map(a => ({ path: a.path, displayPath: a.displayPath, preview: a.preview, resolvedFromKind: a.resolvedFromKind ?? null })) } };
420
480
  }
421
481
 
422
482
  function dispatchExecutionConditions(d: DispatchExecutorDeps, params: DispatchAgentParams, ctx: ExtensionContext): Record<string, unknown> {
@@ -454,9 +514,9 @@ export function createDispatchExecutor(d: DispatchExecutorDeps): ToolExecutor<Di
454
514
  const invalid = validateDispatchAgent(d, agent, params.task); if (invalid) return invalid;
455
515
  if (d.state.getAgentStates().get(agent)?.status === "running") return { content: [{ type: "text", text: "Agent is busy; nothing started, queued or charged. Re-invoke explicitly after it is idle." }], details: { status: "busy", reason: "busy", recoveryCategory: "busy", started: false, exitCode: 1 } };
456
516
  d.budget.ensureTaskTier();
457
- const processGate = d.state.getProcessState ? processPreEffectGate(d.state.getProcessState(), "child", agent) : { reason: "process_state_unavailable", message: "Process state is unavailable; child launch fails closed." };
458
- const preflight = preflightGate(d, agent) ?? processGate ?? checkReviewRoundCap(d.state.getTaskTier(), agent, d.state.getTaskReviewRounds()) ?? checkDocsLane(agent, params.scope || [], params.review_reason);
459
- if (preflight) return refusal(d, agent, params.task, preflight.reason, preflight.message);
517
+ const processGate = d.state.processBlock?.() ?? (d.state.getProcessState ? processPreEffectGate(d.state.getProcessState(), "child", agent) : { reason: "process_state_unavailable", message: "Process state is unavailable; child launch fails closed." });
518
+ const preflight = preflightGate(d, agent) ?? processGate ?? checkReviewRoundCap(d.state.getTaskTier(), agent, d.state.getTaskReviewRounds()) ?? (d.state.getProcessState && processAllowsPersona(d.state.getProcessState(), agent) ? null : checkDocsLane(agent, params.scope || [], params.review_reason));
519
+ if (preflight) return refusal(d, agent, params.task, preflight.reason, `${preflight.message}\n\n${refusalSnapshot(d, ctx)}`);
460
520
  try { preflightDeliverables(params, { cwd: ctx.cwd || process.cwd(), sessionDir: d.state.getSessionDir() }); }
461
521
  catch (error) { return refusal(d, agent, params.task, "scope_preflight_failed", String(error)); }
462
522
  const budgetBlock = await d.budgetRecovery.ensure("dispatch", `${agent}: ${params.task}`, ctx, signal);
@@ -473,7 +533,7 @@ export function createDispatchExecutor(d: DispatchExecutorDeps): ToolExecutor<Di
473
533
  export function createResearchExecutor(d: DispatchExecutorDeps): ToolExecutor<SpawnResearchParams> {
474
534
  return withNoProgress(d, "research", async (_id, params, signal, onUpdate, ctx) => {
475
535
  const capability = d.provisionalCapabilityRefusal("fleet"); if (capability) return capability; const s = d.state; d.budget.ensureTaskTier();
476
- const preflight = preflightGate(d, params.persona || ""); if (preflight) return refusal(d, "", params.task, preflight.reason, preflight.message, preflight.reason);
536
+ const preflight = preflightGate(d, params.persona || ""); if (preflight) return refusal(d, "", params.task, preflight.reason, `${preflight.message}\n\n${refusalSnapshot(d, ctx)}`, preflight.reason);
477
537
  const budgetBlock = await d.budgetRecovery.ensure("research", params.task, ctx, signal);
478
538
  if (budgetBlock) return refusal(d, "", params.task, budgetBlock.reason, budgetBlock.message);
479
539
  if (signal?.aborted) return refusal(d, "", params.task, "cancelled", "Operation cancelled before research.");
@@ -482,12 +542,12 @@ export function createResearchExecutor(d: DispatchExecutorDeps): ToolExecutor<Sp
482
542
  const turnRefusal = checkTurnBudget("research", { dispatches: s.getTurnDispatchCount(), research: s.getTurnResearchCount() }, d.budget.currentBudget(), d.budget.turnBudgetActiveElapsedMs(), s.getTaskTier());
483
543
  if (turnRefusal) return refusal(d, "", params.task, "budget_refused", turnRefusal.message, turnRefusal.reason);
484
544
  let def: any; let persona = false;
485
- if (params.persona) { def = s.getResearchPersonas().find(x => x.name.toLowerCase() === params.persona!.toLowerCase()); if (!def) return { content: [{ type: "text", text: `No research persona "${params.persona}". Available: ${s.getResearchPersonas().map(x => x.name).join(", ") || "(none defined)"}. Omit \`persona\` for an ad-hoc helper. (Not counted against the turn budget.)` }], details: { status: "error" } }; persona = true; } else def = d.research.anonymousDef();
545
+ if (params.persona) { def = s.getResearchPersonas().find(x => x.name.toLowerCase() === params.persona!.toLowerCase()); if (!def) return { content: [{ type: "text", text: `No research persona "${params.persona}". Available: ${s.getResearchPersonas().map(x => x.name).join(", ") || "(none defined)"}. Omit \`persona\` for an ad-hoc helper. (Not counted against the turn budget.)` }], details: { status: "not_started", reason: "unknown_agent", recoveryCategory: "not_started" as const, started: false, notStarted: true, effects: "none", exitCode: 1 } }; persona = true; } else def = d.research.anonymousDef();
486
546
  const model = d.research.resolveModel(def, persona ? undefined : params.model, ctx); let artifacts: InputArtifactPreview[];
487
- try { artifacts = d.artifacts.loadInputArtifacts(params.artifacts, ctx); } catch (err: any) { return { content: [{ type: "text", text: `⚠ Research NOT spawned and NOT counted against the turn budget — input artifact could not be resolved:\n${err?.message || err}\n\nFix the path and try again.` }], details: { status: "artifact_preflight_failed" } }; }
547
+ try { artifacts = d.artifacts.loadInputArtifacts(params.artifacts, ctx); } catch (err: any) { return { content: [{ type: "text", text: `⚠ Research NOT spawned and NOT counted against the turn budget — input artifact could not be resolved:\n${err?.message || err}\n\nFix the path and try again.` }], details: { status: "artifact_preflight_failed", reason: "artifact_preflight_failed", recoveryCategory: "not_started" as const, started: false, notStarted: true, effects: "none", exitCode: 1 } }; }
488
548
  s.setTurnResearchCount(s.getTurnResearchCount() + 1); s.setTaskResearchCount(s.getTaskResearchCount() + 1); s.getTurnReport().research++; s.getSessionTotals().research++; d.budget.updateModeStatus();
489
549
  const state = d.research.createState(def, persona, model); onUpdate?.({ content: [{ type: "text", text: `Spawning research helper r${state.id}...` }], details: { handle: `r${state.id}`, persona: persona ? def.name : null, status: "spawning" } });
490
- try { const result = await d.research.spawn(state, structuredResearchPrompt(params), ctx, artifacts, signal); const status = result.termination ? result.termination.reason : result.exitCode === 0 ? "done" : "error"; const output = result.output.length > 8000 ? `${result.output.slice(0, 8000)}\n\n... [truncated]` : result.output; return { content: [{ type: "text", text: `[research r${state.id} · ${persona ? d.displayName(def.name) : "ad-hoc"} · read-only] ${status} in ${Math.round(result.elapsed / 1000)}s\n\n${output}${result.evidencePath ? `\n\nFull execution evidence: ${result.evidencePath}` : ""}` }], details: { handle: `r${state.id}`, persona: persona ? def.name : null, model, status, elapsed: result.elapsed, exitCode: result.exitCode, fullOutput: result.output, dispatchId: result.dispatchId, evidencePath: result.evidencePath, transcriptPath: result.transcriptPath, termination: result.termination, researchContract: normalizeResearchContract(params), artifacts: artifacts.map(a => ({ path: a.path, displayPath: a.displayPath, preview: a.preview, resolvedFromKind: a.resolvedFromKind ?? null })) } }; }
550
+ try { const result = await d.research.spawn(state, structuredResearchPrompt(params), ctx, artifacts, signal); const status = result.termination ? result.termination.reason : result.exitCode === 0 ? "done" : "error"; const output = result.output.length > 8000 ? `${result.output.slice(0, 8000)}\n\n... [truncated]` : result.output; return { content: [{ type: "text", text: `[research r${state.id} · ${persona ? d.displayName(def.name) : "ad-hoc"} · read-only] ${status} in ${Math.round(result.elapsed / 1000)}s\n\n${output}${result.evidencePath ? `\n\nFull execution evidence: ${result.evidencePath}` : ""}` }], details: { handle: `r${state.id}`, persona: persona ? def.name : null, model, status, elapsed: result.elapsed, exitCode: result.exitCode, fullOutput: result.output, dispatchId: result.dispatchId, evidencePath: result.evidencePath, transcriptPath: result.transcriptPath, termination: result.termination, lifecycle: (result as any).lifecycle ?? null, researchContract: normalizeResearchContract(params), artifacts: artifacts.map(a => ({ path: a.path, displayPath: a.displayPath, preview: a.preview, resolvedFromKind: a.resolvedFromKind ?? null })) } }; }
491
551
  catch (err: any) { return { content: [{ type: "text", text: `Error spawning research helper: ${err?.message || err}` }], details: { handle: `r${state.id}`, model, status: "error", elapsed: 0, exitCode: 1, fullOutput: "" } }; }
492
552
  }, (params, ctx) => researchExecutionConditions(d, params, ctx));
493
553
  }
@@ -1,3 +1,4 @@
1
+ import { processPreEffectGate, type ProcessObligationState } from "../process-obligations.ts";
1
2
  import { PROFILE_ENV, profilePeerGate, profileSpawnPeerRefusal, readActiveProfile } from '../policy/profile-runtime.ts';
2
3
  import { PANE_PROMPT_TIMEOUT_MS, launchPeerInPane } from "../../lib/spawned-peers.js";
3
4
  import { herdrPaneId } from "../../lib/herdr-presence.ts";
@@ -8,6 +9,8 @@ import { worktreeTag } from "../../../agent-fleet/scripts/lib/team-project.ts";
8
9
  import type { HerdrClosePaneParams, HerdrNotifyParams, HerdrReadPaneParams, HerdrSpawnPaneParams, HerdrSpawnPeerParams, ToolExecutionResult, ToolExecutor } from "./context.ts";
9
10
 
10
11
  export interface HerdrExecutorDeps {
12
+ getProcessState?(): ProcessObligationState | null;
13
+ processBlock?(): { reason: string; message: string } | null;
11
14
  provisionalCapabilityRefusal(pack: "workspace"): ToolExecutionResult | null;
12
15
  isFleetReady(): boolean;
13
16
  isComsReady(): boolean;
@@ -27,7 +30,12 @@ const unavailable = (): ToolExecutionResult => ({ content: [{ type: "text", text
27
30
  const noPane = (): ToolExecutionResult => ({ content: [{ type: "text", text: "not inside a herdr pane." }], details: { error: "no pane" } });
28
31
 
29
32
  export function createHerdrExecutors(d: HerdrExecutorDeps): Pick<import("./context.ts").ToolContext, "executeHerdrSpawnPeer" | "executeHerdrSpawnPane" | "executeHerdrReadPane" | "executeHerdrClosePane" | "executeHerdrNotify"> {
33
+ const effectGate = (): ToolExecutionResult | null => {
34
+ const gate = d.processBlock?.() ?? (d.getProcessState ? processPreEffectGate(d.getProcessState()!, "child", "") : null);
35
+ return gate ? { content: [{ type: "text", text: gate.message }], details: { status: "refused", reason: gate.reason } } : null;
36
+ };
30
37
  const executeHerdrSpawnPeer: ToolExecutor<HerdrSpawnPeerParams> = async (_id, params) => {
38
+ const gate = effectGate(); if (gate) return gate;
31
39
  const earlyProfile = profilePeerGate({ targetResolved: false }); if (earlyProfile) return earlyProfile;
32
40
  const refusal = d.provisionalCapabilityRefusal("workspace"); if (refusal) return refusal;
33
41
  if (!d.isFleetReady()) return unavailable();
@@ -54,6 +62,7 @@ export function createHerdrExecutors(d: HerdrExecutorDeps): Pick<import("./conte
54
62
  } catch (err) { const m = err instanceof Error ? err.message : String(err); return { content: [{ type: "text", text: `herdr_spawn_peer failed before readiness: ${m}` }], details: { error: m } }; }
55
63
  };
56
64
  const executeHerdrSpawnPane: ToolExecutor<HerdrSpawnPaneParams> = async (_id, params) => {
65
+ const gate = effectGate(); if (gate) return gate;
57
66
  const refusal = d.provisionalCapabilityRefusal("workspace"); if (refusal) return refusal;
58
67
  if (!d.isFleetReady()) return unavailable(); const ownPane = herdrPaneId(); if (!ownPane) return noPane();
59
68
  try {
@@ -4,13 +4,13 @@ import type { ModelPolicy } from "../policy/models.ts";
4
4
  import type { ResearchState } from "../research/runtime.ts";
5
5
  import type { DetailAgentDef, DetailAgentState, DetailUiContext } from "./detail-panel.ts";
6
6
  import type { DelegationChild } from "../dispatch-core.ts";
7
- import type { FleetRow, ProactiveFindingView, ProactiveSessionView } from "../../lib/fleet-read-model.ts";
7
+ import type { FleetRow, ProactiveFindingView, ProactiveSessionView, TaskTriageSessionView } from "../../lib/fleet-read-model.ts";
8
8
  import { safeTerminalText } from "../../lib/fleet-strip-view.ts";
9
9
  import { proactiveReviewLines, openProactiveEvidence, proactiveEvidenceContent, evidenceScroll, normalizeFleetDetailInput, type FleetDetailKey } from "../../lib/fleet-detail-view.ts";
10
10
  import { evidenceLines } from "./detail-panel.ts";
11
11
  import { summarise, unionMs } from "../../lib/fleet-read-model.ts";
12
12
  import { attachFleetDashboardTicker } from "../../lib/fleet-dashboard-ops.ts";
13
- import { dashboardTransition, renderFleetDashboard, FLEET_CHROME_ROWS, type DashboardConfirm } from "../../lib/fleet-dashboard-view.ts";
13
+ import { dashboardTransition, renderFleetDashboard, fleetDashboardListBody, FLEET_CHROME_ROWS, type DashboardConfirm } from "../../lib/fleet-dashboard-view.ts";
14
14
  import { modelPickerTransition, renderFleetSubstitutionPicker, type FleetModelChoice } from "../../lib/fleet-detail-view.ts";
15
15
  import { FULLSCREEN_OVERLAY, bodyRows, clampScroll, fitToHeight } from "../../lib/fleet-overlay.ts";
16
16
  import { createPanelResources } from "../../lib/fleet-panel.ts";
@@ -48,6 +48,7 @@ export interface FleetDashboardDeps<TDef extends DetailAgentDef, TAgent extends
48
48
  setFilter(value: string): void;
49
49
  getFleetRows(now: number, unfiltered: boolean): FleetRow[];
50
50
  getProactive?(): ProactiveSessionView | undefined;
51
+ getTaskTriage?(): TaskTriageSessionView | undefined;
51
52
  readProactiveEvidence?(finding: ProactiveFindingView): string | null;
52
53
  actions: {
53
54
  open(key: string, runToken: string | undefined, ctx: DetailUiContext, verbose?: boolean): Promise<boolean>;
@@ -115,11 +116,13 @@ export function createFleetDashboard<TDef extends DetailAgentDef, TAgent extends
115
116
  const toInput = (data: string) => { const key: FleetDetailKey | undefined = matchesKey(data, Key.up) ? "up" : matchesKey(data, Key.down) ? "down" : matchesKey(data, Key.pageUp) ? "pageUp" : matchesKey(data, Key.pageDown) ? "pageDown" : matchesKey(data, Key.home) ? "home" : matchesKey(data, Key.end) ? "end" : matchesKey(data, Key.enter) ? "enter" : matchesKey(data, Key.escape) ? "escape" : undefined; return normalizeFleetDetailInput(data, key); };
116
117
  try { await ctx.ui.custom((tui: any, theme: any, _kb: any, done: (result?: unknown) => void) => {
117
118
  attachFleetDashboardTicker(resources, () => tui.requestRender());
118
- return { render: (w: number) => { const now = Date.now(), rows = fleetRows(false, now); reconcileSelection(selection, rows); const comsLines = deps.getComsLines(w, theme); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS + comsLines.length); if (evidence !== undefined) return fitToHeight(evidenceLines(evidence, w, body, evidenceOffset, evidenceFinding), body + FLEET_CHROME_ROWS + comsLines.length);
119
+ return { render: (w: number) => { const now = Date.now(), rows = fleetRows(false, now); reconcileSelection(selection, rows); const comsLines = deps.getComsLines(w, theme); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS + comsLines.length, 0); if (evidence !== undefined) return fitToHeight(evidenceLines(evidence, w, body, evidenceOffset, evidenceFinding), body + FLEET_CHROME_ROWS + comsLines.length);
119
120
  if (picker) return renderFleetSubstitutionPicker(picker.stage, picker.source, picker.choices, picker, w, body, theme);
120
121
  if (reviewHistory) { const entries = history(), selected = entries[Math.min(historyIndex, entries.length - 1)]; const heading = selected ? `${safeTerminalText(selected.owner.owner)} · ${safeTerminalText(selected.owner.attempt)} · review ${historyIndex + 1}/${entries.length}` : "Review history unavailable"; const chosen = selected?.review.findings[findingIndex]; const lines = selected ? proactiveReviewLines({ ...selected.review, findings: chosen ? [chosen] : [] }, w) : []; const visible = [heading, ...lines.slice(historyOffset, historyOffset + Math.max(0, body - 2)), `↑↓ review · PgUp/PgDn/Home/End scroll · n finding ${chosen ? findingIndex + 1 : 0}/${selected?.review.findings.length ?? 0} · e evidence · Esc back`]; return fitToHeight(visible.map(line => truncateToWidth(line, w)), body + FLEET_CHROME_ROWS + comsLines.length); }
121
- scrollOffset = clampScroll(scrollOffset, rows.length, body); const summary = summarise(rows); const lines = renderFleetDashboard({ rows, selection, scrollOffset, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirmation: confirm && confirm.until > now ? `press ${confirm.action === "kill" ? "x" : "r"} again to ${confirm.action} ${rows.find(row => row.key === confirm!.key && row.runToken === confirm!.runToken)?.name ?? "agent"}` : undefined, summary: { ...summary, wallMs: unionMs(summary.intervals) }, proactive: deps.getProactive?.(), comsLines }, w, body, theme, { visibleWidth, truncateToWidth }); if (deps.getProactive?.()?.owners.some(owner => owner.history.length)) lines[body + 3] = truncateToWidth(" ←→ thinking · 1 System 1 communication · p reviews · h history · Enter detail · Esc close", w); if (deps.openSystem1 && !deps.getProactive?.()?.owners.some(owner => owner.history.length)) lines[body + 3] = truncateToWidth(" ←→ thinking · 1 System 1 communication · h history · Enter detail · Esc close", w); return lines; },
122
- handleInput: async (data: string) => { const now = Date.now(), rows = fleetRows(false, now); reconcileSelection(selection, rows); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS + deps.getComsLines(tui.terminal?.columns ?? 80, theme).length), input = toInput(data);
122
+ const taskTriage = deps.getTaskTriage?.(), listBody = fleetDashboardListBody(body, rows.length, taskTriage);
123
+ if (listBody > 0 && rows.length) { if (selection.index < scrollOffset) scrollOffset = selection.index; else if (selection.index >= scrollOffset + listBody) scrollOffset = selection.index - listBody + 1; }
124
+ scrollOffset = clampScroll(scrollOffset, rows.length, listBody); const summary = summarise(rows); const lines = renderFleetDashboard({ rows, selection, scrollOffset, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirmation: confirm && confirm.until > now ? `press ${confirm.action === "kill" ? "x" : "r"} again to ${confirm.action} ${rows.find(row => row.key === confirm!.key && row.runToken === confirm!.runToken)?.name ?? "agent"}` : undefined, summary: { ...summary, wallMs: unionMs(summary.intervals) }, proactive: deps.getProactive?.(), taskTriage, comsLines }, w, body, theme, { visibleWidth, truncateToWidth }); if (deps.getProactive?.()?.owners.some(owner => owner.history.length)) lines[body + 3] = truncateToWidth(" ←→ thinking · 1 System 1 communication · p reviews · h history · Enter detail · Esc close", w); if (deps.openSystem1 && !deps.getProactive?.()?.owners.some(owner => owner.history.length)) lines[body + 3] = truncateToWidth(" ←→ thinking · 1 System 1 communication · h history · Enter detail · Esc close", w); return lines; },
125
+ handleInput: async (data: string) => { const now = Date.now(), rows = fleetRows(false, now); reconcileSelection(selection, rows); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS + deps.getComsLines(tui.terminal?.columns ?? 80, theme).length, 0), input = toInput(data);
123
126
  if (evidence !== undefined) { if (input === "\u001b" || input === "q") { evidence = undefined; evidenceFinding = undefined; } else evidenceOffset = evidenceScroll(input, evidenceOffset, proactiveEvidenceContent(evidence, evidenceFinding, tui.terminal?.columns ?? 80).length, body); tui.requestRender(); return; }
124
127
  if (reviewHistory) {
125
128
  const entries = history();
@@ -142,7 +145,7 @@ export function createFleetDashboard<TDef extends DetailAgentDef, TAgent extends
142
145
  changeThinking(rows[selection.index], matchesKey(data, Key.left) ? -1 : 1, ctx);
143
146
  tui.requestRender(); return;
144
147
  }
145
- const state = { selection, scrollOffset, filtering, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirm }, intent = dashboardTransition(input, state, rows, body, now); ({ scrollOffset, filtering, confirm } = state); deps.setFilter(state.filterQuery); deps.setShowFinished(state.showFinished);
148
+ const state = { selection, scrollOffset, filtering, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirm }, intent = dashboardTransition(input, state, rows, fleetDashboardListBody(body, rows.length, deps.getTaskTriage?.()), now); ({ scrollOffset, filtering, confirm } = state); deps.setFilter(state.filterQuery); deps.setShowFinished(state.showFinished);
146
149
  if (intent === "close") done(); else if (intent === "history") { confirm = null; await deps.openHistory(ctx); } else if (intent === "substitute") { confirm = null; const choices = substitutionSourceChoices(); if (!choices.length) ctx.ui.notify("No configured persona or sub-role models are available as substitution sources.", "warning"); else picker = { stage: "source", choices, index: 0, scrollOffset: 0 }; } else if (intent && typeof intent === "object" && "open" in intent) { const selected = rows.find(row => row.key === intent.open); confirm = null; if (selected) detailVerbose = await deps.actions.open(selected.key, selected.runToken, ctx, detailVerbose); } else if (intent && typeof intent === "object" && "kill" in intent) { const selected = rows.find(row => row.key === intent.kill); if (selected) await deps.actions.execute("kill", selected.key, selected.runToken, ctx); else ctx.ui.notify("Selected fleet row no longer exists.", "warning"); } else if (intent && typeof intent === "object" && "restart" in intent) { const selected = rows.find(row => row.key === intent.restart); if (selected) await restartRow(selected, ctx); } tui.requestRender(); },
147
150
  invalidate() {}, dispose: () => resources.dispose() };
148
151
  }, FULLSCREEN_OVERLAY); } finally { resources.dispose(); }
@@ -1,4 +1,4 @@
1
- import { buildFleetRows, fleetTiming, projectProactive, projectSystem1Owner, type DelegateInput, type FleetFilter, type FleetRow, type FleetSource, type PeerInput, type ProactiveLedgerInput, type ResearchInput, type SpecialistInput, type System1CheckInput, type System1OwnerView } from "../../lib/fleet-read-model.ts";
1
+ import { buildFleetRows, fleetTiming, projectProactive, projectTaskTriage, type TaskTriageProjectionInput, projectSystem1Owner, type DelegateInput, type FleetFilter, type FleetRow, type FleetSource, type PeerInput, type ProactiveLedgerInput, type ResearchInput, type SpecialistInput, type System1CheckInput, type System1OwnerView } from "../../lib/fleet-read-model.ts";
2
2
 
3
3
  export interface FleetSourceAgent {
4
4
  def: { name: string; description?: string };
@@ -58,6 +58,8 @@ export interface FleetSourceDeps<TAgent extends FleetSourceAgent = FleetSourceAg
58
58
  getSystem1?(): { active: readonly System1CheckInput[]; completed: readonly System1CheckInput[]; degraded?: boolean } | null | undefined;
59
59
  /** Session-owned in-memory ledger; never read private evidence or trace files here. */
60
60
  getProactive?(): ProactiveLedgerInput | null | undefined;
61
+ /** Current session metadata only; no provider or disk reads while rendering. */
62
+ getTaskTriage?(): TaskTriageProjectionInput | null | undefined;
61
63
  }
62
64
 
63
65
  function delegateForest(children: readonly FleetSourceDelegate[], now: number, model: (value: string) => string): DelegateInput[] {
@@ -108,6 +110,8 @@ export function createFleetSource<TAgent extends FleetSourceAgent, TResearch ext
108
110
  function snapshot(now: number): FleetSource {
109
111
  const ledger = deps.getProactive?.();
110
112
  const proactive = ledger ? projectProactive(ledger) : undefined;
113
+ const triage = deps.getTaskTriage?.();
114
+ const taskTriage = triage ? projectTaskTriage(triage) : undefined;
111
115
  const specialists: SpecialistInput[] = Array.from(deps.getAgents().entries()).map(([key, state]) => ({
112
116
  key,
113
117
  name: deps.displayName(state.def.name),
@@ -166,7 +170,7 @@ export function createFleetSource<TAgent extends FleetSourceAgent, TResearch ext
166
170
  peers.push({ key: `peer-pending:${encodeURIComponent(name)}`, name, model: "", lastWork: `${pending.count} pending ${pending.count === 1 ? "reply" : "replies"}`, status: "running", timingKind: pending.oldest == null ? "unknown" : "wait", startedAt: pending.oldest, elapsed: pending.oldest == null ? 0 : Math.max(0, now - pending.oldest) });
167
171
  }
168
172
  }
169
- return { specialists, research, peers, ...(proactive ? { proactive } : {}) };
173
+ return { specialists, research, peers, ...(proactive ? { proactive } : {}), ...(taskTriage ? { taskTriage } : {}) };
170
174
  }
171
175
  return {
172
176
  snapshot,
@@ -16,7 +16,7 @@ export async function openSystem1Communication(ctx: Pick<ExtensionContext, "ui">
16
16
  let content: string[];
17
17
  if (detail) {
18
18
  const p = store.snapshot().find(p => p.id === detail);
19
- content = p ? [`${p.consumer} · ${p.provider}/${p.model} · ${p.status} · ${p.id}`, "Request", p.request ?? p.requestOmitted ?? "unavailable", "Response", p.response ?? p.responseOmitted ?? "pending", `${action === 0 ? "❯" : " "} Copy request ${action === 1 ? "❯" : " "} Copy response`].flatMap(x => x.split("\n")) : ["Pair evicted or capture cleared. Esc back."];
19
+ content = p ? [`${p.consumer} · ${p.provider}/${p.model} · ${p.status} · ${p.id}`, ...(p.consumer === "task-triage" ? ["Provider result only; task acceptance and obligations are separate"] : []), "Request", p.request ?? p.requestOmitted ?? "unavailable", "Response", p.response ?? p.responseOmitted ?? "pending", `${action === 0 ? "❯" : " "} Copy request ${action === 1 ? "❯" : " "} Copy response`].flatMap(x => x.split("\n")) : ["Pair evicted or capture cleared. Esc back."];
20
20
  } else {
21
21
  const entries = rows(); const retained = entries.findIndex(r => `${r.pair.id}:${r.direction}` === selectedKey); if (retained >= 0) selected = retained; selected = Math.max(0, Math.min(selected, entries.length - 1));
22
22
  selectedKey = entries[selected] ? `${entries[selected].pair.id}:${entries[selected].direction}` : "";
@@ -134,15 +134,18 @@ export function workModePrompt(workMode: WorkMode): { intro: string; hardRules:
134
134
  intro: "You are the Fleet operator. You may work on the codebase directly and may also coordinate specialist agents when delegation adds value.",
135
135
  hardRules: `- You MAY read, execute, edit, and write directly in operator work mode.
136
136
  - Use direct tools for focused work when they are the simplest path; delegate when specialization, parallelism, or independent verification adds value.
137
- - Give concurrent writable agents explicit non-overlapping scopes and inspect overlap warnings before proceeding.`,
137
+ - Give concurrent writable agents explicit non-overlapping scopes and inspect overlap warnings before proceeding.
138
+ - For inspection, use the active catalog's read/grep/find/ls with an explicit target path (or the filesystem tool when enabled). A refused shell string needs no planner and no slash reset; preflight refusals carry their authoritative tier/catalog/revision snapshot.`,
138
139
  };
139
140
  }
140
141
  return {
141
142
  intro: "You are a dispatcher agent — an orchestrator. You coordinate specialist agents to accomplish tasks. You have no generic direct coding tools.",
142
143
  hardRules: `- NEVER try to execute, edit, or write repository code directly — you have no generic bash/write/edit tools.
143
- - When explicitly enabled, \`filesystem\` is the only narrow direct exception: deterministic inspection plus managed current-session snapshots; it grants no arbitrary write or shell authority.
144
- - Optionally use \`dispatch_triage\` for System 1 persona/risk advice before dispatch when configured. It is not a gate or permission; low predicted risk never removes checks.
145
- - ALWAYS use \`dispatch_agent\` to get implementation work done; use \`spawn_research\` for read-only recon.`,
144
+ - \`filesystem\` is the only narrow direct exception: always available in orchestrator for read-only stat, inventory, excerpt, and readback. Call stat before excerpt. The self-read ceiling is 64 KiB for one file and 64 KiB for the whole turn, including inventory. A too_large refusal means do not retry: call spawn_research for a summary or dispatch_agent with the path only. Snapshot stays profile-gated. It grants no arbitrary write or shell authority.
145
+ - Tool availability is never gate admission: a visible tool can still refuse under tier, process, budget, or safety gates. Read the refusal's snapshot and correct the prerequisite; routine slash resets are not the recovery path.
146
+ - Optionally use \`dispatch_triage\` for System 1 persona/risk advice before dispatch when it is listed in the active tools. It is not a gate or permission; low predicted risk never removes checks. Do not call it when it is absent.
147
+ - ALWAYS use \`dispatch_agent\` to get implementation work done; use \`spawn_research\` for recon that \`filesystem\` cannot answer.
148
+ - The turn dispatch number in Current task state is the effective allowance. Orchestrator raises trivial/small to at least 3 dispatches per turn unless a max-dispatches-per-turn ceiling is configured. Research calls and the task dispatch envelope stay on the tier.`,
146
149
  };
147
150
  }
148
151
 
@@ -153,6 +156,8 @@ export function resolveWorkModeTools(options: {
153
156
  herdrReady: boolean;
154
157
  askUserAvailable: boolean;
155
158
  deterministicTools?: boolean;
159
+ /** Omit dispatch_triage unless the consumer can evaluate. Default off. */
160
+ triageEnabled?: boolean;
156
161
  /** Active and provisional packs; omitted only for legacy callers. */
157
162
  capabilityPacks?: readonly ("core" | "fleet" | "verification" | "peer" | "workspace" | "compaction")[];
158
163
  }): string[] {
@@ -161,14 +166,14 @@ export function resolveWorkModeTools(options: {
161
166
  ? options.baselineTools.filter(name => !HUB_OWNED_TOOLS.has(name))
162
167
  : [];
163
168
 
164
- if (packs.has("fleet")) tools.push(...FLEET_TOOLS);
169
+ if (packs.has("fleet")) tools.push(...(options.triageEnabled ? FLEET_TOOLS : FLEET_TOOLS.filter(name => name !== "dispatch_triage")));
165
170
  if (packs.has("verification")) tools.push(...VERIFICATION_TOOLS);
166
171
  if (packs.has("peer") && options.comsReady) tools.push(...COMS_TOOLS);
167
172
  if (packs.has("workspace") && options.herdrReady) tools.push(...HERDR_TOOLS);
168
173
  if (packs.has("core") && options.askUserAvailable) tools.push("ask_user");
169
174
  if (packs.has("compaction")) tools.push("request_compaction");
170
- // Profile-gated deterministic inspection is safe in either work mode, but never
171
- // appears in the effective surface when the explicit opt-in is absent.
172
- if (options.deterministicTools === true) tools.push("filesystem");
175
+ // Operator inspection stays profile-gated. Orchestrator always gets the same
176
+ // tool, but snapshot remains refused unless deterministic-tools is on.
177
+ if (options.deterministicTools === true || options.workMode === "orchestrator") tools.push("filesystem");
173
178
  return [...new Set(tools)];
174
179
  }
@@ -3,5 +3,5 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
- "version": "2.0.14"
6
+ "version": "2.0.16"
7
7
  }
@@ -3,5 +3,5 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
- "version": "2.0.14"
6
+ "version": "2.0.16"
7
7
  }
@@ -36,7 +36,12 @@ export const HUB_HERDR_SECTION = `
36
36
  - \`herdr_notify\` reaches an away human; it never replaces \`ask_user\`.
37
37
  `;
38
38
 
39
- /** Assemble the effective Hub replacement prompt. Ledger metadata is never interpolated. */
39
+ /** Assemble the effective Hub replacement prompt. Ledger metadata is never interpolated.
40
+ *
41
+ * T9 truthful guidance: the prompt points at the active catalog and the read-only
42
+ * inspection route, never at routine slash resets. Preflight refusals carry their
43
+ * authoritative tier/catalog/revision snapshot; tool availability is never gate admission.
44
+ */
40
45
  export function assembleHubSystemPrompt(parts: HubPromptParts): string {
41
46
  const team = parts.activeTeamName || "(none)";
42
47
  const members = parts.teamMembers || "(none — add a persona before using dispatch_agent)";
@@ -1,4 +1,4 @@
1
- import type { FleetRow, ProactiveSessionView } from "./fleet-read-model.ts";
1
+ import type { FleetRow, ProactiveSessionView, TaskTriageSessionView } from "./fleet-read-model.ts";
2
2
  import { proactiveHistoryLines } from "./fleet-detail-view.ts";
3
3
  import { moveSelection, type Selection } from "./fleet-selection.ts";
4
4
  import { confirmFleetAction, type FleetConfirmation } from "./fleet-dashboard-ops.ts";
@@ -16,6 +16,7 @@ export interface FleetViewModel {
16
16
  confirmation?: string;
17
17
  comsLines?: readonly string[];
18
18
  proactive?: ProactiveSessionView;
19
+ taskTriage?: TaskTriageSessionView;
19
20
  }
20
21
 
21
22
  /** Session history, including Hub turns with no dispatched worker rows. No strip expiry filter. */
@@ -31,6 +32,28 @@ const tokens = (n: number | null) => n == null ? "—" : n >= 1000 ? `${Math.rou
31
32
  const glyph = (row: FleetRow) => row.status === "running" ? "●" : row.status === "done" ? "✓" : row.status === "error" ? "✗" : row.status === "pending" ? "◌" : row.status === "stale" ? "○" : "▪";
32
33
  const context = (pct: number | null) => pct == null ? "[automatic] —" : `[${"#".repeat(Math.max(0, Math.min(10, Math.round(pct / 10))))}${"·".repeat(Math.max(0, 10 - Math.round(pct / 10)))}] ${Math.round(pct)}%`;
33
34
 
35
+ /** Session metadata, not a worker or an acceptance badge. Never reads provider/disk state. */
36
+ export function taskTriageDashboardLines(view: TaskTriageSessionView): string[] {
37
+ const { assessment, process } = view;
38
+ const counts = [...new Set(process.additions.map(a => a.reason))].map(reason => {
39
+ const matching = process.additions.filter(a => a.reason === reason);
40
+ return `${reason}: ${matching.filter(a => a.status === "active").length} active / ${matching.filter(a => a.status === "waived").length} waived`;
41
+ });
42
+ return [
43
+ ` Task triage · experimental · ${safeTerminalText(assessment.status)} · ${assessment.binding} · not acceptance`,
44
+ ` Blockers: ${process.blockers.map(safeTerminalText).join(", ") || "none recorded"} · /af-audit for metadata`,
45
+ ` Declared ${process.declaration.risk}/${process.declaration.scope} · tier ${process.declaration.budgetTier ?? "unknown"} (spend only) · stage ${process.currentStage}`,
46
+ ` Obligations: ${process.obligations ? Object.entries(process.obligations).map(([k, v]) => `${k} ${v}`).join(" · ") : "unknown"}`,
47
+ ` Probabilities: ${assessment.probabilities ? Object.entries(assessment.probabilities).map(([k, p]) => `${k}=${p}`).join(" · ") : "unknown"}`,
48
+ ` Additions: ${counts.join(" · ") || "none recorded"} · ${!process.additions.length ? "no addition evidence" : process.additions.some(a => a.binding !== "current") ? "stale/unbound source evidence" : "current source evidence"}`,
49
+ ` Process: ${process.completion} · Task acceptance: ${view.taskAcceptance}`,
50
+ ];
51
+ }
52
+ /** Reserve metadata cells without hiding every worker or changing keyboard row indices. */
53
+ export function fleetDashboardListBody(body: number, rowCount: number, triage?: TaskTriageSessionView): number {
54
+ return Math.max(0, body - (triage ? Math.min(7, Math.max(0, body - (rowCount ? 1 : 0))) : 0));
55
+ }
56
+
34
57
  /** Render a constant-height, width-bounded fleet list without pi runtime dependencies. */
35
58
  export function renderFleetDashboard(vm: FleetViewModel, width: number, bodyHeight: number, theme: ThemeLike, metrics: TextMetrics): string[] {
36
59
  const w = Math.max(1, width), body = Math.max(0, bodyHeight);
@@ -40,12 +63,14 @@ export function renderFleetDashboard(vm: FleetViewModel, width: number, bodyHeig
40
63
  const title = ` Fleet ${vm.filterQuery ? `· filter: ${safeTerminalText(vm.filterQuery)}` : ""}`;
41
64
  const header = fit(title, Math.max(1, w - metrics.visibleWidth(summary) - 1), metrics);
42
65
  const lines: string[] = [fit(theme.bold(header) + " " + theme.fg("dim", summary), w, metrics), theme.fg("dim", "╭" + "─".repeat(Math.max(0, w - 2)) + "╮")];
66
+ const listBody = fleetDashboardListBody(body, vm.rows.length, vm.taskTriage);
67
+ if (vm.taskTriage) lines.push(...taskTriageDashboardLines(vm.taskTriage).slice(0, body - listBody).map(line => fit(theme.fg("dim", safeTerminalText(line)), w, metrics)));
43
68
  if (vm.rows.length === 0) {
44
69
  const message = "no agents dispatched yet";
45
- lines.push(...Array.from({ length: body }, (_, i) => i === Math.floor(body / 2) ? fit(theme.fg("dim", " ".repeat(Math.max(0, Math.floor((w - metrics.visibleWidth(message)) / 2))) + message), w, metrics) : ""));
70
+ lines.push(...Array.from({ length: listBody }, (_, i) => i === Math.floor(listBody / 2) ? fit(theme.fg("dim", " ".repeat(Math.max(0, Math.floor((w - metrics.visibleWidth(message)) / 2))) + message), w, metrics) : ""));
46
71
  } else {
47
- const offset = Math.max(0, Math.min(vm.scrollOffset ?? 0, Math.max(0, vm.rows.length - body)));
48
- for (let i = 0; i < body; i++) {
72
+ const offset = Math.max(0, Math.min(vm.scrollOffset ?? 0, Math.max(0, vm.rows.length - listBody)));
73
+ for (let i = 0; i < listBody; i++) {
49
74
  const row = vm.rows[offset + i];
50
75
  if (!row) { lines.push(""); continue; }
51
76
  const selected = offset + i === vm.selection.index;