@chankov/agent-fleet 2.0.15 → 2.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1125) hide show
  1. package/.pi/harnesses/agent-hub/README.md +9 -1
  2. package/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
  3. package/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
  4. package/.pi/harnesses/agent-hub/agentic-hub.ts +54 -0
  5. package/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
  6. package/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
  7. package/.pi/harnesses/agent-hub/agentic-sources.ts +50 -0
  8. package/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
  9. package/.pi/harnesses/agent-hub/config/overrides.ts +1 -6
  10. package/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +4 -15
  11. package/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +8 -7
  12. package/.pi/harnesses/agent-hub/index.ts +17 -7
  13. package/.pi/harnesses/agent-hub/package.json +1 -1
  14. package/.pi/harnesses/agent-hub/peer-spawn-plan.ts +1 -1
  15. package/.pi/harnesses/agent-hub/policy/work-mode.ts +2 -1
  16. package/.pi/harnesses/agent-hub/proactive-config.ts +11 -35
  17. package/.pi/harnesses/agent-hub/proactive-local.ts +1 -18
  18. package/.pi/harnesses/agent-hub/proactive-snapshot.ts +9 -24
  19. package/.pi/harnesses/agent-hub/prompts/context.ts +2 -0
  20. package/.pi/harnesses/agent-hub/prompts/fragments.ts +7 -0
  21. package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +3 -1
  22. package/.pi/harnesses/agent-hub/system1-communication-store.ts +29 -7
  23. package/.pi/harnesses/agent-hub/system1-runtime.ts +7 -29
  24. package/.pi/harnesses/agent-hub/task-triage-config.ts +8 -16
  25. package/.pi/harnesses/agent-hub/task-triage-contract.ts +1 -6
  26. package/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
  27. package/.pi/harnesses/agent-hub/ui/system1-communication.ts +1 -1
  28. package/.pi/harnesses/agent-hub/work-mode.ts +6 -1
  29. package/.pi/harnesses/coms/package.json +1 -1
  30. package/.pi/harnesses/damage-control-continue/index.ts +6 -23
  31. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  32. package/.pi/harnesses/lib/damage-control-shared.ts +29 -0
  33. package/.pi/harnesses/lib/safe-source-read.js +29 -0
  34. package/.pi/harnesses/lib/system1/config-agentic.js +14 -0
  35. package/.pi/harnesses/lib/system1/config-json.js +37 -0
  36. package/.pi/harnesses/lib/system1/config-loader.js +44 -0
  37. package/.pi/harnesses/lib/system1/config-proactive.js +57 -0
  38. package/.pi/harnesses/lib/system1/config-triage.js +42 -0
  39. package/.pi/harnesses/lib/system1/config-v2.js +103 -0
  40. package/.pi/harnesses/lib/system1/config.js +7 -18
  41. package/.pi/harnesses/lib/system1/contracts.ts +4 -2
  42. package/.pi/harnesses/lib/system1/demo.ts +3 -12
  43. package/.versions/2.0.16/.pi/agent-fleet/hermes/README.md +347 -0
  44. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  45. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  46. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  47. package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  48. package/.versions/2.0.16/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  49. package/.versions/2.0.16/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  50. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  51. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  52. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  53. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  54. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  55. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  56. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  57. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  58. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  59. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  60. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  61. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  62. package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  63. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  64. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  65. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  66. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  67. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  68. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  69. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  70. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  71. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  72. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  73. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  74. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  75. package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  76. package/.versions/2.0.16/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  77. package/.versions/2.0.16/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  78. package/.versions/2.0.16/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  79. package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
  80. package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  81. package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  82. package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  83. package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  84. package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet.ts +217 -0
  85. package/.versions/2.0.16/.pi/agent-fleet/scripts/flow.ts +157 -0
  86. package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  87. package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  88. package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  89. package/.versions/2.0.16/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  90. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
  91. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  92. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  93. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  94. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  95. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  96. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  97. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  98. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
  99. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  100. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  101. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  102. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  103. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  104. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  105. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  106. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  107. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  108. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  109. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  110. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  111. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  112. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  113. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  114. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  115. package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  116. package/.versions/2.0.16/.pi/agent-fleet/scripts/package-lock.json +35 -0
  117. package/.versions/2.0.16/.pi/agent-fleet/scripts/package.json +9 -0
  118. package/.versions/2.0.16/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  119. package/.versions/2.0.16/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  120. package/.versions/2.0.16/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  121. package/.versions/2.0.16/.pi/agent-fleet/scripts/team-up.ts +378 -0
  122. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
  123. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  124. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  125. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  126. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  127. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  128. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  129. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
  130. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  131. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  132. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  133. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  134. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  135. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  136. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
  137. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  138. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  139. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  140. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  141. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  142. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  143. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  144. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  145. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  146. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  147. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  148. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  149. package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  150. package/.versions/2.0.16/.pi/agents/dispatch-policy.yaml +32 -0
  151. package/.versions/2.0.16/.pi/agents/model-profiles.yaml +134 -0
  152. package/.versions/2.0.16/.pi/agents/peers.yaml +147 -0
  153. package/.versions/2.0.16/.pi/agents/teams.yaml +41 -0
  154. package/.versions/2.0.16/.pi/agents/voices.yaml +13 -0
  155. package/.versions/2.0.16/.pi/damage-control-rules.yaml +297 -0
  156. package/.versions/2.0.16/.pi/extensions/btw/README.md +120 -0
  157. package/.versions/2.0.16/.pi/extensions/btw/index.ts +914 -0
  158. package/.versions/2.0.16/.pi/extensions/btw/package.json +6 -0
  159. package/.versions/2.0.16/.pi/extensions/btw/state.js +179 -0
  160. package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  161. package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  162. package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  163. package/.versions/2.0.16/.pi/extensions/compact-and-continue/README.md +42 -0
  164. package/.versions/2.0.16/.pi/extensions/compact-and-continue/index.ts +120 -0
  165. package/.versions/2.0.16/.pi/extensions/compact-and-continue/package.json +6 -0
  166. package/.versions/2.0.16/.pi/extensions/mcp-bridge/README.md +46 -0
  167. package/.versions/2.0.16/.pi/extensions/mcp-bridge/index.ts +206 -0
  168. package/.versions/2.0.16/.pi/extensions/mcp-bridge/package.json +6 -0
  169. package/.versions/2.0.16/.pi/extensions/package-lock.json +1175 -0
  170. package/.versions/2.0.16/.pi/extensions/package.json +9 -0
  171. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/README.md +224 -0
  172. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/config.ts +198 -0
  173. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  174. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/index.ts +248 -0
  175. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/package.json +6 -0
  176. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  177. package/.versions/2.0.16/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  178. package/.versions/2.0.16/.pi/harnesses/agent-hub/README.md +1452 -0
  179. package/.versions/2.0.16/.pi/harnesses/agent-hub/acceptance.ts +199 -0
  180. package/.versions/2.0.16/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  181. package/.versions/2.0.16/.pi/harnesses/agent-hub/artifacts.js +146 -0
  182. package/.versions/2.0.16/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
  183. package/.versions/2.0.16/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
  184. package/.versions/2.0.16/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  185. package/.versions/2.0.16/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  186. package/.versions/2.0.16/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
  187. package/.versions/2.0.16/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
  188. package/.versions/2.0.16/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  189. package/.versions/2.0.16/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
  190. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  191. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  192. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  193. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  194. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  195. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  196. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  197. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  198. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  199. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  200. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  201. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  202. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
  203. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  204. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  205. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  206. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/context.ts +47 -0
  207. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  208. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  209. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  210. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  211. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  212. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  213. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
  214. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  215. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  216. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  217. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  218. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  219. package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  220. package/.versions/2.0.16/.pi/harnesses/agent-hub/config/agents.ts +178 -0
  221. package/.versions/2.0.16/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
  222. package/.versions/2.0.16/.pi/harnesses/agent-hub/config/overrides.ts +155 -0
  223. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  224. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
  225. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
  226. package/.versions/2.0.16/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  227. package/.versions/2.0.16/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  228. package/.versions/2.0.16/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  229. package/.versions/2.0.16/.pi/harnesses/agent-hub/context-window.js +108 -0
  230. package/.versions/2.0.16/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  231. package/.versions/2.0.16/.pi/harnesses/agent-hub/delegate.ts +467 -0
  232. package/.versions/2.0.16/.pi/harnesses/agent-hub/deterministic-fs.ts +166 -0
  233. package/.versions/2.0.16/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  234. package/.versions/2.0.16/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  235. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
  236. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  237. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
  238. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +259 -0
  239. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
  240. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-types.ts +260 -0
  241. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
  242. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  243. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
  244. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
  245. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  246. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  247. package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  248. package/.versions/2.0.16/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  249. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  250. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  251. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  252. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  253. package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
  254. package/.versions/2.0.16/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  255. package/.versions/2.0.16/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  256. package/.versions/2.0.16/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  257. package/.versions/2.0.16/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  258. package/.versions/2.0.16/.pi/harnesses/agent-hub/filesystem-tool.ts +137 -0
  259. package/.versions/2.0.16/.pi/harnesses/agent-hub/fixtures/registration-surface.json +64 -0
  260. package/.versions/2.0.16/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  261. package/.versions/2.0.16/.pi/harnesses/agent-hub/footer.ts +30 -0
  262. package/.versions/2.0.16/.pi/harnesses/agent-hub/helpers.ts +270 -0
  263. package/.versions/2.0.16/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
  264. package/.versions/2.0.16/.pi/harnesses/agent-hub/index.ts +2601 -0
  265. package/.versions/2.0.16/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  266. package/.versions/2.0.16/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
  267. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
  268. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  269. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  270. package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
  271. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  272. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  273. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  274. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  275. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  276. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  277. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  278. package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  279. package/.versions/2.0.16/.pi/harnesses/agent-hub/no-progress.ts +563 -0
  280. package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
  281. package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  282. package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
  283. package/.versions/2.0.16/.pi/harnesses/agent-hub/package.json +7 -0
  284. package/.versions/2.0.16/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  285. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  286. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  287. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  288. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  289. package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/work-mode.ts +135 -0
  290. package/.versions/2.0.16/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  291. package/.versions/2.0.16/.pi/harnesses/agent-hub/presentation.ts +48 -0
  292. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-config.ts +16 -0
  293. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  294. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  295. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  296. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-local.ts +71 -0
  297. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
  298. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
  299. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
  300. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  301. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  302. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
  303. package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
  304. package/.versions/2.0.16/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
  305. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
  306. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/fragments.ts +116 -0
  307. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  308. package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
  309. package/.versions/2.0.16/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  310. package/.versions/2.0.16/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  311. package/.versions/2.0.16/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  312. package/.versions/2.0.16/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  313. package/.versions/2.0.16/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
  314. package/.versions/2.0.16/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  315. package/.versions/2.0.16/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  316. package/.versions/2.0.16/.pi/harnesses/agent-hub/research/runtime.ts +197 -0
  317. package/.versions/2.0.16/.pi/harnesses/agent-hub/research/spawn-run.ts +183 -0
  318. package/.versions/2.0.16/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  319. package/.versions/2.0.16/.pi/harnesses/agent-hub/return-contract.js +349 -0
  320. package/.versions/2.0.16/.pi/harnesses/agent-hub/return-extract.js +77 -0
  321. package/.versions/2.0.16/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  322. package/.versions/2.0.16/.pi/harnesses/agent-hub/review-findings.js +104 -0
  323. package/.versions/2.0.16/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  324. package/.versions/2.0.16/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  325. package/.versions/2.0.16/.pi/harnesses/agent-hub/run-budget.js +554 -0
  326. package/.versions/2.0.16/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  327. package/.versions/2.0.16/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
  328. package/.versions/2.0.16/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  329. package/.versions/2.0.16/.pi/harnesses/agent-hub/scope-gate.js +144 -0
  330. package/.versions/2.0.16/.pi/harnesses/agent-hub/session-audit.ts +313 -0
  331. package/.versions/2.0.16/.pi/harnesses/agent-hub/session-health.js +110 -0
  332. package/.versions/2.0.16/.pi/harnesses/agent-hub/session-start.ts +42 -0
  333. package/.versions/2.0.16/.pi/harnesses/agent-hub/spawn.ts +534 -0
  334. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  335. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-communication-store.ts +129 -0
  336. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  337. package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-runtime.ts +258 -0
  338. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
  339. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
  340. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
  341. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
  342. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  343. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
  344. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  345. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  346. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  347. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  348. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
  349. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  350. package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  351. package/.versions/2.0.16/.pi/harnesses/agent-hub/timeline.ts +72 -0
  352. package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
  353. package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
  354. package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  355. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/action-executors.ts +208 -0
  356. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  357. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/context.ts +144 -0
  358. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
  359. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +558 -0
  360. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  361. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  362. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  363. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
  364. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
  365. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  366. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
  367. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  368. package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
  369. package/.versions/2.0.16/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  370. package/.versions/2.0.16/.pi/harnesses/agent-hub/types.ts +66 -0
  371. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  372. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
  373. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  374. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  375. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
  376. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  377. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  378. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  379. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  380. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  381. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  382. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  383. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  384. package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  385. package/.versions/2.0.16/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  386. package/.versions/2.0.16/.pi/harnesses/agent-hub/version.ts +42 -0
  387. package/.versions/2.0.16/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  388. package/.versions/2.0.16/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  389. package/.versions/2.0.16/.pi/harnesses/agent-hub/work-mode.ts +179 -0
  390. package/.versions/2.0.16/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
  391. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/README.md +59 -0
  392. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/index.ts +558 -0
  393. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/questions.ts +161 -0
  394. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  395. package/.versions/2.0.16/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
  396. package/.versions/2.0.16/.pi/harnesses/coms/README.md +100 -0
  397. package/.versions/2.0.16/.pi/harnesses/coms/index.ts +282 -0
  398. package/.versions/2.0.16/.pi/harnesses/coms/package.json +7 -0
  399. package/.versions/2.0.16/.pi/harnesses/coms/version.ts +42 -0
  400. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/README.md +135 -0
  401. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/index.ts +550 -0
  402. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/package.json +7 -0
  403. package/.versions/2.0.16/.pi/harnesses/damage-control-continue/version.ts +42 -0
  404. package/.versions/2.0.16/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  405. package/.versions/2.0.16/.pi/harnesses/lib/coms-core-io.ts +385 -0
  406. package/.versions/2.0.16/.pi/harnesses/lib/coms-core.ts +577 -0
  407. package/.versions/2.0.16/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  408. package/.versions/2.0.16/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
  409. package/.versions/2.0.16/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
  410. package/.versions/2.0.16/.pi/harnesses/lib/context-budget-view.ts +107 -0
  411. package/.versions/2.0.16/.pi/harnesses/lib/context-budget.ts +114 -0
  412. package/.versions/2.0.16/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  413. package/.versions/2.0.16/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
  414. package/.versions/2.0.16/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  415. package/.versions/2.0.16/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  416. package/.versions/2.0.16/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  417. package/.versions/2.0.16/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  418. package/.versions/2.0.16/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
  419. package/.versions/2.0.16/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  420. package/.versions/2.0.16/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  421. package/.versions/2.0.16/.pi/harnesses/lib/fleet-panel.ts +34 -0
  422. package/.versions/2.0.16/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  423. package/.versions/2.0.16/.pi/harnesses/lib/fleet-selection.ts +24 -0
  424. package/.versions/2.0.16/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  425. package/.versions/2.0.16/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  426. package/.versions/2.0.16/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  427. package/.versions/2.0.16/.pi/harnesses/lib/herdr-client.ts +472 -0
  428. package/.versions/2.0.16/.pi/harnesses/lib/herdr-presence.ts +399 -0
  429. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  430. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  431. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  432. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  433. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  434. package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  435. package/.versions/2.0.16/.pi/harnesses/lib/spawned-peers.js +191 -0
  436. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-json.js +37 -0
  437. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-loader.js +44 -0
  438. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-proactive.js +57 -0
  439. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-triage.js +42 -0
  440. package/.versions/2.0.16/.pi/harnesses/lib/system1/config-v2.js +100 -0
  441. package/.versions/2.0.16/.pi/harnesses/lib/system1/config.js +50 -0
  442. package/.versions/2.0.16/.pi/harnesses/lib/system1/contracts.ts +154 -0
  443. package/.versions/2.0.16/.pi/harnesses/lib/system1/demo.ts +95 -0
  444. package/.versions/2.0.16/.pi/harnesses/lib/system1/jev.ts +503 -0
  445. package/.versions/2.0.16/.pi/harnesses/lib/system1/selection.js +11 -0
  446. package/.versions/2.0.16/.pi/harnesses/lib/system1/service.ts +245 -0
  447. package/.versions/2.0.16/.pi/harnesses/lib/update-check.ts +222 -0
  448. package/.versions/2.0.16/.pi/harnesses/package-lock.json +2039 -0
  449. package/.versions/2.0.16/.pi/harnesses/package.json +10 -0
  450. package/.versions/2.0.16/.pi/prompts/af-build.md +27 -0
  451. package/.versions/2.0.16/.pi/prompts/af-code-simplify.md +22 -0
  452. package/.versions/2.0.16/.pi/prompts/af-constraints.md +31 -0
  453. package/.versions/2.0.16/.pi/prompts/af-plan.md +17 -0
  454. package/.versions/2.0.16/.pi/prompts/af-review.md +16 -0
  455. package/.versions/2.0.16/.pi/prompts/af-set-hermes-telegram.md +15 -0
  456. package/.versions/2.0.16/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  457. package/.versions/2.0.16/.pi/prompts/af-setup-rules.md +20 -0
  458. package/.versions/2.0.16/.pi/prompts/af-ship.md +17 -0
  459. package/.versions/2.0.16/.pi/prompts/af-spec.md +15 -0
  460. package/.versions/2.0.16/.pi/prompts/af-test.md +19 -0
  461. package/.versions/2.0.16/.pi/skills/bowser/SKILL.md +145 -0
  462. package/.versions/2.0.16/.version +1 -0
  463. package/.versions/2.0.16/agents/architect.md +24 -0
  464. package/.versions/2.0.16/agents/bowser.md +28 -0
  465. package/.versions/2.0.16/agents/builder.md +55 -0
  466. package/.versions/2.0.16/agents/code-reviewer.md +209 -0
  467. package/.versions/2.0.16/agents/deep-researcher.md +32 -0
  468. package/.versions/2.0.16/agents/documenter.md +22 -0
  469. package/.versions/2.0.16/agents/orchestrator.md +22 -0
  470. package/.versions/2.0.16/agents/plan-reviewer.md +83 -0
  471. package/.versions/2.0.16/agents/planner.md +105 -0
  472. package/.versions/2.0.16/agents/releaser.md +24 -0
  473. package/.versions/2.0.16/agents/researcher.md +30 -0
  474. package/.versions/2.0.16/agents/security-auditor.md +167 -0
  475. package/.versions/2.0.16/agents/test-engineer.md +153 -0
  476. package/.versions/2.0.16/agents/web-debugger.md +44 -0
  477. package/.versions/2.0.16/agents/web-performance-auditor.md +194 -0
  478. package/.versions/2.0.16/bin/catalog/harness-runtime-closure.json +73 -0
  479. package/.versions/2.0.16/codex/fleet-session-client/SKILL.md +34 -0
  480. package/.versions/2.0.16/codex/fleet-session-client.zip +0 -0
  481. package/.versions/2.0.16/docs/ARCHITECTURE.md +834 -0
  482. package/.versions/2.0.16/docs/agent-fleet-setup.md +1101 -0
  483. package/.versions/2.0.16/docs/claude-code-coms-bridge.md +134 -0
  484. package/.versions/2.0.16/docs/codex-session-bridge.md +219 -0
  485. package/.versions/2.0.16/docs/coms-hermes-bridge.md +188 -0
  486. package/.versions/2.0.16/docs/getting-started.md +126 -0
  487. package/.versions/2.0.16/docs/npm-install.md +530 -0
  488. package/.versions/2.0.16/docs/pi-extensions.md +454 -0
  489. package/.versions/2.0.16/docs/pi-setup.md +92 -0
  490. package/.versions/2.0.16/docs/skill-anatomy.md +150 -0
  491. package/.versions/2.0.16/install-manifest.json +3193 -0
  492. package/.versions/2.0.16/justfile +247 -0
  493. package/.versions/2.0.16/manifest-meta.json +1071 -0
  494. package/.versions/2.0.16/references/accessibility-checklist.md +160 -0
  495. package/.versions/2.0.16/references/communication-contract.md +26 -0
  496. package/.versions/2.0.16/references/definition-of-done.md +67 -0
  497. package/.versions/2.0.16/references/fleet-coordination-patterns.md +171 -0
  498. package/.versions/2.0.16/references/observability-checklist.md +92 -0
  499. package/.versions/2.0.16/references/orchestration-patterns.md +370 -0
  500. package/.versions/2.0.16/references/performance-checklist.md +236 -0
  501. package/.versions/2.0.16/references/prompting-patterns.md +380 -0
  502. package/.versions/2.0.16/references/security-checklist.md +245 -0
  503. package/.versions/2.0.16/references/testing-patterns.md +235 -0
  504. package/.versions/2.0.16/references/workflow-authoring.md +304 -0
  505. package/.versions/2.0.16/skills/_internal/grilling.md +59 -0
  506. package/.versions/2.0.16/skills/browser-testing-with-devtools/SKILL.md +351 -0
  507. package/.versions/2.0.16/skills/code-review-and-quality/SKILL.md +396 -0
  508. package/.versions/2.0.16/skills/compound-learning/SKILL.md +137 -0
  509. package/.versions/2.0.16/skills/constraint-driven-development/SKILL.md +338 -0
  510. package/.versions/2.0.16/skills/constraint-driven-development/references/floor-guard.md +99 -0
  511. package/.versions/2.0.16/skills/context-engineering/SKILL.md +341 -0
  512. package/.versions/2.0.16/skills/deprecation-and-migration/SKILL.md +247 -0
  513. package/.versions/2.0.16/skills/designing-agents/SKILL.md +394 -0
  514. package/.versions/2.0.16/skills/designing-agents/pi-harness-authoring.md +222 -0
  515. package/.versions/2.0.16/skills/drafting-workflows/SKILL.md +143 -0
  516. package/.versions/2.0.16/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  517. package/.versions/2.0.16/skills/frontend-ui-engineering/SKILL.md +328 -0
  518. package/.versions/2.0.16/skills/git-workflow-and-versioning/SKILL.md +316 -0
  519. package/.versions/2.0.16/skills/idea-refine/SKILL.md +182 -0
  520. package/.versions/2.0.16/skills/idea-refine/examples.md +238 -0
  521. package/.versions/2.0.16/skills/idea-refine/frameworks.md +99 -0
  522. package/.versions/2.0.16/skills/idea-refine/refinement-criteria.md +113 -0
  523. package/.versions/2.0.16/skills/idea-refine/scripts/idea-refine.sh +15 -0
  524. package/.versions/2.0.16/skills/incremental-implementation/SKILL.md +353 -0
  525. package/.versions/2.0.16/skills/interview-me/SKILL.md +226 -0
  526. package/.versions/2.0.16/skills/orchestration-verification/SKILL.md +182 -0
  527. package/.versions/2.0.16/skills/peer-coms/SKILL.md +90 -0
  528. package/.versions/2.0.16/skills/performance-optimization/SKILL.md +496 -0
  529. package/.versions/2.0.16/skills/planning-and-task-breakdown/SKILL.md +318 -0
  530. package/.versions/2.0.16/skills/repository-ai-setup/SKILL.md +117 -0
  531. package/.versions/2.0.16/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  532. package/.versions/2.0.16/skills/repository-ai-setup/references/apply-contract.md +74 -0
  533. package/.versions/2.0.16/skills/repository-ai-setup/references/provenance-template.md +16 -0
  534. package/.versions/2.0.16/skills/repository-ai-setup/references/setup-flow.md +108 -0
  535. package/.versions/2.0.16/skills/repository-ai-setup/references/verify-setup.md +20 -0
  536. package/.versions/2.0.16/skills/security-and-hardening/SKILL.md +524 -0
  537. package/.versions/2.0.16/skills/spec-driven-development/SKILL.md +295 -0
  538. package/.versions/2.0.16/skills/using-agent-skills/SKILL.md +198 -0
  539. package/.versions/2.0.16/vendor/agent-skills-upstream/LICENSE +21 -0
  540. package/.versions/2.0.16/vendor/agent-skills-upstream/README.md +430 -0
  541. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  542. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  543. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  544. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  545. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  546. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  547. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  548. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  549. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  550. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  551. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  552. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  553. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  554. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  555. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  556. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  557. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  558. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  559. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  560. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  561. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  562. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  563. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  564. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  565. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  566. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  567. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  568. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  569. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  570. package/.versions/2.0.16/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  571. package/.versions/2.0.17/.pi/agent-fleet/hermes/README.md +347 -0
  572. package/.versions/2.0.17/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  573. package/.versions/2.0.17/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  574. package/.versions/2.0.17/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  575. package/.versions/2.0.17/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  576. package/.versions/2.0.17/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  577. package/.versions/2.0.17/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  578. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  579. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  580. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  581. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  582. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  583. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  584. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  585. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  586. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  587. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  588. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  589. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  590. package/.versions/2.0.17/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  591. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  592. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  593. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  594. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  595. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  596. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  597. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  598. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  599. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  600. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  601. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  602. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  603. package/.versions/2.0.17/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  604. package/.versions/2.0.17/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  605. package/.versions/2.0.17/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  606. package/.versions/2.0.17/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  607. package/.versions/2.0.17/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
  608. package/.versions/2.0.17/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  609. package/.versions/2.0.17/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  610. package/.versions/2.0.17/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  611. package/.versions/2.0.17/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  612. package/.versions/2.0.17/.pi/agent-fleet/scripts/fleet.ts +217 -0
  613. package/.versions/2.0.17/.pi/agent-fleet/scripts/flow.ts +157 -0
  614. package/.versions/2.0.17/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  615. package/.versions/2.0.17/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  616. package/.versions/2.0.17/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  617. package/.versions/2.0.17/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  618. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
  619. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  620. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  621. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  622. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  623. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  624. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  625. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  626. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
  627. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  628. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  629. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  630. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  631. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  632. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  633. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  634. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  635. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  636. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  637. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  638. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  639. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  640. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  641. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  642. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  643. package/.versions/2.0.17/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  644. package/.versions/2.0.17/.pi/agent-fleet/scripts/package-lock.json +35 -0
  645. package/.versions/2.0.17/.pi/agent-fleet/scripts/package.json +9 -0
  646. package/.versions/2.0.17/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  647. package/.versions/2.0.17/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  648. package/.versions/2.0.17/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  649. package/.versions/2.0.17/.pi/agent-fleet/scripts/team-up.ts +378 -0
  650. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
  651. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  652. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  653. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  654. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  655. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  656. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  657. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
  658. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  659. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  660. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  661. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  662. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  663. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  664. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
  665. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  666. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  667. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  668. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  669. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  670. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  671. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  672. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  673. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  674. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  675. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  676. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  677. package/.versions/2.0.17/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  678. package/.versions/2.0.17/.pi/agents/dispatch-policy.yaml +32 -0
  679. package/.versions/2.0.17/.pi/agents/model-profiles.yaml +134 -0
  680. package/.versions/2.0.17/.pi/agents/peers.yaml +147 -0
  681. package/.versions/2.0.17/.pi/agents/teams.yaml +41 -0
  682. package/.versions/2.0.17/.pi/agents/voices.yaml +13 -0
  683. package/.versions/2.0.17/.pi/damage-control-rules.yaml +297 -0
  684. package/.versions/2.0.17/.pi/extensions/btw/README.md +120 -0
  685. package/.versions/2.0.17/.pi/extensions/btw/index.ts +914 -0
  686. package/.versions/2.0.17/.pi/extensions/btw/package.json +6 -0
  687. package/.versions/2.0.17/.pi/extensions/btw/state.js +179 -0
  688. package/.versions/2.0.17/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  689. package/.versions/2.0.17/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  690. package/.versions/2.0.17/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  691. package/.versions/2.0.17/.pi/extensions/compact-and-continue/README.md +42 -0
  692. package/.versions/2.0.17/.pi/extensions/compact-and-continue/index.ts +120 -0
  693. package/.versions/2.0.17/.pi/extensions/compact-and-continue/package.json +6 -0
  694. package/.versions/2.0.17/.pi/extensions/mcp-bridge/README.md +46 -0
  695. package/.versions/2.0.17/.pi/extensions/mcp-bridge/index.ts +206 -0
  696. package/.versions/2.0.17/.pi/extensions/mcp-bridge/package.json +6 -0
  697. package/.versions/2.0.17/.pi/extensions/package-lock.json +1175 -0
  698. package/.versions/2.0.17/.pi/extensions/package.json +9 -0
  699. package/.versions/2.0.17/.pi/extensions/pi-voice-stt/README.md +224 -0
  700. package/.versions/2.0.17/.pi/extensions/pi-voice-stt/config.ts +198 -0
  701. package/.versions/2.0.17/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  702. package/.versions/2.0.17/.pi/extensions/pi-voice-stt/index.ts +248 -0
  703. package/.versions/2.0.17/.pi/extensions/pi-voice-stt/package.json +6 -0
  704. package/.versions/2.0.17/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  705. package/.versions/2.0.17/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  706. package/.versions/2.0.17/.pi/harnesses/agent-hub/README.md +1456 -0
  707. package/.versions/2.0.17/.pi/harnesses/agent-hub/acceptance.ts +199 -0
  708. package/.versions/2.0.17/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  709. package/.versions/2.0.17/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
  710. package/.versions/2.0.17/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
  711. package/.versions/2.0.17/.pi/harnesses/agent-hub/agentic-hub.ts +54 -0
  712. package/.versions/2.0.17/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
  713. package/.versions/2.0.17/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
  714. package/.versions/2.0.17/.pi/harnesses/agent-hub/agentic-sources.ts +50 -0
  715. package/.versions/2.0.17/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
  716. package/.versions/2.0.17/.pi/harnesses/agent-hub/artifacts.js +146 -0
  717. package/.versions/2.0.17/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
  718. package/.versions/2.0.17/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
  719. package/.versions/2.0.17/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  720. package/.versions/2.0.17/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  721. package/.versions/2.0.17/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
  722. package/.versions/2.0.17/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
  723. package/.versions/2.0.17/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  724. package/.versions/2.0.17/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
  725. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  726. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  727. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  728. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  729. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  730. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  731. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  732. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  733. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  734. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  735. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  736. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  737. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
  738. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  739. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  740. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  741. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/context.ts +47 -0
  742. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  743. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  744. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  745. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  746. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  747. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  748. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
  749. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  750. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  751. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  752. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  753. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  754. package/.versions/2.0.17/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  755. package/.versions/2.0.17/.pi/harnesses/agent-hub/config/agents.ts +178 -0
  756. package/.versions/2.0.17/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
  757. package/.versions/2.0.17/.pi/harnesses/agent-hub/config/overrides.ts +155 -0
  758. package/.versions/2.0.17/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  759. package/.versions/2.0.17/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
  760. package/.versions/2.0.17/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
  761. package/.versions/2.0.17/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  762. package/.versions/2.0.17/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  763. package/.versions/2.0.17/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  764. package/.versions/2.0.17/.pi/harnesses/agent-hub/context-window.js +108 -0
  765. package/.versions/2.0.17/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  766. package/.versions/2.0.17/.pi/harnesses/agent-hub/delegate.ts +467 -0
  767. package/.versions/2.0.17/.pi/harnesses/agent-hub/deterministic-fs.ts +166 -0
  768. package/.versions/2.0.17/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  769. package/.versions/2.0.17/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  770. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
  771. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  772. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
  773. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +259 -0
  774. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
  775. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-native-types.ts +260 -0
  776. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
  777. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  778. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
  779. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
  780. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  781. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  782. package/.versions/2.0.17/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  783. package/.versions/2.0.17/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  784. package/.versions/2.0.17/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  785. package/.versions/2.0.17/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  786. package/.versions/2.0.17/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  787. package/.versions/2.0.17/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  788. package/.versions/2.0.17/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
  789. package/.versions/2.0.17/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  790. package/.versions/2.0.17/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  791. package/.versions/2.0.17/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  792. package/.versions/2.0.17/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  793. package/.versions/2.0.17/.pi/harnesses/agent-hub/filesystem-tool.ts +137 -0
  794. package/.versions/2.0.17/.pi/harnesses/agent-hub/fixtures/registration-surface.json +65 -0
  795. package/.versions/2.0.17/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  796. package/.versions/2.0.17/.pi/harnesses/agent-hub/footer.ts +30 -0
  797. package/.versions/2.0.17/.pi/harnesses/agent-hub/helpers.ts +270 -0
  798. package/.versions/2.0.17/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
  799. package/.versions/2.0.17/.pi/harnesses/agent-hub/index.ts +2607 -0
  800. package/.versions/2.0.17/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  801. package/.versions/2.0.17/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
  802. package/.versions/2.0.17/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
  803. package/.versions/2.0.17/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  804. package/.versions/2.0.17/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  805. package/.versions/2.0.17/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
  806. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  807. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  808. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  809. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  810. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  811. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  812. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  813. package/.versions/2.0.17/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  814. package/.versions/2.0.17/.pi/harnesses/agent-hub/no-progress.ts +563 -0
  815. package/.versions/2.0.17/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
  816. package/.versions/2.0.17/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  817. package/.versions/2.0.17/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
  818. package/.versions/2.0.17/.pi/harnesses/agent-hub/package.json +7 -0
  819. package/.versions/2.0.17/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  820. package/.versions/2.0.17/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  821. package/.versions/2.0.17/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  822. package/.versions/2.0.17/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  823. package/.versions/2.0.17/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  824. package/.versions/2.0.17/.pi/harnesses/agent-hub/policy/work-mode.ts +136 -0
  825. package/.versions/2.0.17/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  826. package/.versions/2.0.17/.pi/harnesses/agent-hub/presentation.ts +48 -0
  827. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-config.ts +16 -0
  828. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  829. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  830. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  831. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-local.ts +71 -0
  832. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
  833. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
  834. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
  835. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  836. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  837. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-snapshot.ts +228 -0
  838. package/.versions/2.0.17/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
  839. package/.versions/2.0.17/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
  840. package/.versions/2.0.17/.pi/harnesses/agent-hub/prompts/context.ts +56 -0
  841. package/.versions/2.0.17/.pi/harnesses/agent-hub/prompts/fragments.ts +123 -0
  842. package/.versions/2.0.17/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  843. package/.versions/2.0.17/.pi/harnesses/agent-hub/prompts/system-prompt.ts +124 -0
  844. package/.versions/2.0.17/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  845. package/.versions/2.0.17/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  846. package/.versions/2.0.17/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  847. package/.versions/2.0.17/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  848. package/.versions/2.0.17/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
  849. package/.versions/2.0.17/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  850. package/.versions/2.0.17/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  851. package/.versions/2.0.17/.pi/harnesses/agent-hub/research/runtime.ts +197 -0
  852. package/.versions/2.0.17/.pi/harnesses/agent-hub/research/spawn-run.ts +183 -0
  853. package/.versions/2.0.17/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  854. package/.versions/2.0.17/.pi/harnesses/agent-hub/return-contract.js +349 -0
  855. package/.versions/2.0.17/.pi/harnesses/agent-hub/return-extract.js +77 -0
  856. package/.versions/2.0.17/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  857. package/.versions/2.0.17/.pi/harnesses/agent-hub/review-findings.js +104 -0
  858. package/.versions/2.0.17/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  859. package/.versions/2.0.17/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  860. package/.versions/2.0.17/.pi/harnesses/agent-hub/run-budget.js +554 -0
  861. package/.versions/2.0.17/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  862. package/.versions/2.0.17/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
  863. package/.versions/2.0.17/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  864. package/.versions/2.0.17/.pi/harnesses/agent-hub/scope-gate.js +144 -0
  865. package/.versions/2.0.17/.pi/harnesses/agent-hub/session-audit.ts +313 -0
  866. package/.versions/2.0.17/.pi/harnesses/agent-hub/session-health.js +110 -0
  867. package/.versions/2.0.17/.pi/harnesses/agent-hub/session-start.ts +42 -0
  868. package/.versions/2.0.17/.pi/harnesses/agent-hub/spawn.ts +534 -0
  869. package/.versions/2.0.17/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  870. package/.versions/2.0.17/.pi/harnesses/agent-hub/system1-communication-store.ts +151 -0
  871. package/.versions/2.0.17/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  872. package/.versions/2.0.17/.pi/harnesses/agent-hub/system1-runtime.ts +258 -0
  873. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
  874. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
  875. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
  876. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
  877. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  878. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
  879. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  880. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  881. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  882. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  883. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
  884. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  885. package/.versions/2.0.17/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  886. package/.versions/2.0.17/.pi/harnesses/agent-hub/timeline.ts +72 -0
  887. package/.versions/2.0.17/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
  888. package/.versions/2.0.17/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
  889. package/.versions/2.0.17/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  890. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/action-executors.ts +208 -0
  891. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
  892. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  893. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/context.ts +144 -0
  894. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
  895. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +558 -0
  896. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  897. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  898. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  899. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
  900. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
  901. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  902. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
  903. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  904. package/.versions/2.0.17/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
  905. package/.versions/2.0.17/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  906. package/.versions/2.0.17/.pi/harnesses/agent-hub/types.ts +66 -0
  907. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  908. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
  909. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  910. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  911. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
  912. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  913. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  914. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  915. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  916. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  917. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  918. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  919. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  920. package/.versions/2.0.17/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  921. package/.versions/2.0.17/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  922. package/.versions/2.0.17/.pi/harnesses/agent-hub/version.ts +42 -0
  923. package/.versions/2.0.17/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  924. package/.versions/2.0.17/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  925. package/.versions/2.0.17/.pi/harnesses/agent-hub/work-mode.ts +184 -0
  926. package/.versions/2.0.17/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
  927. package/.versions/2.0.17/.pi/harnesses/ask-user-remote/README.md +59 -0
  928. package/.versions/2.0.17/.pi/harnesses/ask-user-remote/index.ts +558 -0
  929. package/.versions/2.0.17/.pi/harnesses/ask-user-remote/questions.ts +161 -0
  930. package/.versions/2.0.17/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  931. package/.versions/2.0.17/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
  932. package/.versions/2.0.17/.pi/harnesses/coms/README.md +100 -0
  933. package/.versions/2.0.17/.pi/harnesses/coms/index.ts +282 -0
  934. package/.versions/2.0.17/.pi/harnesses/coms/package.json +7 -0
  935. package/.versions/2.0.17/.pi/harnesses/coms/version.ts +42 -0
  936. package/.versions/2.0.17/.pi/harnesses/damage-control-continue/README.md +135 -0
  937. package/.versions/2.0.17/.pi/harnesses/damage-control-continue/index.ts +533 -0
  938. package/.versions/2.0.17/.pi/harnesses/damage-control-continue/package.json +7 -0
  939. package/.versions/2.0.17/.pi/harnesses/damage-control-continue/version.ts +42 -0
  940. package/.versions/2.0.17/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  941. package/.versions/2.0.17/.pi/harnesses/lib/coms-core-io.ts +385 -0
  942. package/.versions/2.0.17/.pi/harnesses/lib/coms-core.ts +577 -0
  943. package/.versions/2.0.17/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  944. package/.versions/2.0.17/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
  945. package/.versions/2.0.17/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
  946. package/.versions/2.0.17/.pi/harnesses/lib/context-budget-view.ts +107 -0
  947. package/.versions/2.0.17/.pi/harnesses/lib/context-budget.ts +114 -0
  948. package/.versions/2.0.17/.pi/harnesses/lib/damage-control-shared.ts +226 -0
  949. package/.versions/2.0.17/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
  950. package/.versions/2.0.17/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  951. package/.versions/2.0.17/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  952. package/.versions/2.0.17/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  953. package/.versions/2.0.17/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  954. package/.versions/2.0.17/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
  955. package/.versions/2.0.17/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  956. package/.versions/2.0.17/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  957. package/.versions/2.0.17/.pi/harnesses/lib/fleet-panel.ts +34 -0
  958. package/.versions/2.0.17/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  959. package/.versions/2.0.17/.pi/harnesses/lib/fleet-selection.ts +24 -0
  960. package/.versions/2.0.17/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  961. package/.versions/2.0.17/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  962. package/.versions/2.0.17/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  963. package/.versions/2.0.17/.pi/harnesses/lib/herdr-client.ts +472 -0
  964. package/.versions/2.0.17/.pi/harnesses/lib/herdr-presence.ts +399 -0
  965. package/.versions/2.0.17/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  966. package/.versions/2.0.17/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  967. package/.versions/2.0.17/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  968. package/.versions/2.0.17/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  969. package/.versions/2.0.17/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  970. package/.versions/2.0.17/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  971. package/.versions/2.0.17/.pi/harnesses/lib/safe-source-read.js +29 -0
  972. package/.versions/2.0.17/.pi/harnesses/lib/spawned-peers.js +191 -0
  973. package/.versions/2.0.17/.pi/harnesses/lib/system1/config-agentic.js +14 -0
  974. package/.versions/2.0.17/.pi/harnesses/lib/system1/config-json.js +37 -0
  975. package/.versions/2.0.17/.pi/harnesses/lib/system1/config-loader.js +44 -0
  976. package/.versions/2.0.17/.pi/harnesses/lib/system1/config-proactive.js +57 -0
  977. package/.versions/2.0.17/.pi/harnesses/lib/system1/config-triage.js +42 -0
  978. package/.versions/2.0.17/.pi/harnesses/lib/system1/config-v2.js +103 -0
  979. package/.versions/2.0.17/.pi/harnesses/lib/system1/config.js +50 -0
  980. package/.versions/2.0.17/.pi/harnesses/lib/system1/contracts.ts +154 -0
  981. package/.versions/2.0.17/.pi/harnesses/lib/system1/demo.ts +95 -0
  982. package/.versions/2.0.17/.pi/harnesses/lib/system1/jev.ts +503 -0
  983. package/.versions/2.0.17/.pi/harnesses/lib/system1/selection.js +11 -0
  984. package/.versions/2.0.17/.pi/harnesses/lib/system1/service.ts +245 -0
  985. package/.versions/2.0.17/.pi/harnesses/lib/update-check.ts +222 -0
  986. package/.versions/2.0.17/.pi/harnesses/package-lock.json +2039 -0
  987. package/.versions/2.0.17/.pi/harnesses/package.json +10 -0
  988. package/.versions/2.0.17/.pi/prompts/af-build.md +27 -0
  989. package/.versions/2.0.17/.pi/prompts/af-code-simplify.md +22 -0
  990. package/.versions/2.0.17/.pi/prompts/af-constraints.md +31 -0
  991. package/.versions/2.0.17/.pi/prompts/af-plan.md +17 -0
  992. package/.versions/2.0.17/.pi/prompts/af-review.md +16 -0
  993. package/.versions/2.0.17/.pi/prompts/af-set-hermes-telegram.md +15 -0
  994. package/.versions/2.0.17/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  995. package/.versions/2.0.17/.pi/prompts/af-setup-rules.md +20 -0
  996. package/.versions/2.0.17/.pi/prompts/af-ship.md +17 -0
  997. package/.versions/2.0.17/.pi/prompts/af-spec.md +15 -0
  998. package/.versions/2.0.17/.pi/prompts/af-test.md +19 -0
  999. package/.versions/2.0.17/.pi/skills/bowser/SKILL.md +145 -0
  1000. package/.versions/2.0.17/.version +1 -0
  1001. package/.versions/2.0.17/agents/architect.md +24 -0
  1002. package/.versions/2.0.17/agents/bowser.md +28 -0
  1003. package/.versions/2.0.17/agents/builder.md +55 -0
  1004. package/.versions/2.0.17/agents/code-reviewer.md +209 -0
  1005. package/.versions/2.0.17/agents/deep-researcher.md +32 -0
  1006. package/.versions/2.0.17/agents/documenter.md +22 -0
  1007. package/.versions/2.0.17/agents/orchestrator.md +22 -0
  1008. package/.versions/2.0.17/agents/plan-reviewer.md +83 -0
  1009. package/.versions/2.0.17/agents/planner.md +105 -0
  1010. package/.versions/2.0.17/agents/releaser.md +24 -0
  1011. package/.versions/2.0.17/agents/researcher.md +30 -0
  1012. package/.versions/2.0.17/agents/security-auditor.md +167 -0
  1013. package/.versions/2.0.17/agents/test-engineer.md +153 -0
  1014. package/.versions/2.0.17/agents/web-debugger.md +44 -0
  1015. package/.versions/2.0.17/agents/web-performance-auditor.md +194 -0
  1016. package/.versions/2.0.17/bin/catalog/harness-runtime-closure.json +73 -0
  1017. package/.versions/2.0.17/codex/fleet-session-client/SKILL.md +34 -0
  1018. package/.versions/2.0.17/codex/fleet-session-client.zip +0 -0
  1019. package/.versions/2.0.17/docs/ARCHITECTURE.md +834 -0
  1020. package/.versions/2.0.17/docs/agent-fleet-setup.md +1101 -0
  1021. package/.versions/2.0.17/docs/claude-code-coms-bridge.md +134 -0
  1022. package/.versions/2.0.17/docs/codex-session-bridge.md +219 -0
  1023. package/.versions/2.0.17/docs/coms-hermes-bridge.md +188 -0
  1024. package/.versions/2.0.17/docs/getting-started.md +126 -0
  1025. package/.versions/2.0.17/docs/npm-install.md +530 -0
  1026. package/.versions/2.0.17/docs/pi-extensions.md +454 -0
  1027. package/.versions/2.0.17/docs/pi-setup.md +92 -0
  1028. package/.versions/2.0.17/docs/skill-anatomy.md +150 -0
  1029. package/.versions/2.0.17/install-manifest.json +3193 -0
  1030. package/.versions/2.0.17/justfile +247 -0
  1031. package/.versions/2.0.17/manifest-meta.json +1071 -0
  1032. package/.versions/2.0.17/references/accessibility-checklist.md +160 -0
  1033. package/.versions/2.0.17/references/communication-contract.md +26 -0
  1034. package/.versions/2.0.17/references/definition-of-done.md +67 -0
  1035. package/.versions/2.0.17/references/fleet-coordination-patterns.md +171 -0
  1036. package/.versions/2.0.17/references/observability-checklist.md +92 -0
  1037. package/.versions/2.0.17/references/orchestration-patterns.md +370 -0
  1038. package/.versions/2.0.17/references/performance-checklist.md +236 -0
  1039. package/.versions/2.0.17/references/prompting-patterns.md +380 -0
  1040. package/.versions/2.0.17/references/security-checklist.md +245 -0
  1041. package/.versions/2.0.17/references/testing-patterns.md +235 -0
  1042. package/.versions/2.0.17/references/workflow-authoring.md +304 -0
  1043. package/.versions/2.0.17/skills/_internal/grilling.md +59 -0
  1044. package/.versions/2.0.17/skills/browser-testing-with-devtools/SKILL.md +351 -0
  1045. package/.versions/2.0.17/skills/code-review-and-quality/SKILL.md +396 -0
  1046. package/.versions/2.0.17/skills/compound-learning/SKILL.md +137 -0
  1047. package/.versions/2.0.17/skills/constraint-driven-development/SKILL.md +338 -0
  1048. package/.versions/2.0.17/skills/constraint-driven-development/references/floor-guard.md +99 -0
  1049. package/.versions/2.0.17/skills/context-engineering/SKILL.md +341 -0
  1050. package/.versions/2.0.17/skills/deprecation-and-migration/SKILL.md +247 -0
  1051. package/.versions/2.0.17/skills/designing-agents/SKILL.md +394 -0
  1052. package/.versions/2.0.17/skills/designing-agents/pi-harness-authoring.md +222 -0
  1053. package/.versions/2.0.17/skills/drafting-workflows/SKILL.md +143 -0
  1054. package/.versions/2.0.17/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  1055. package/.versions/2.0.17/skills/frontend-ui-engineering/SKILL.md +328 -0
  1056. package/.versions/2.0.17/skills/git-workflow-and-versioning/SKILL.md +316 -0
  1057. package/.versions/2.0.17/skills/idea-refine/SKILL.md +182 -0
  1058. package/.versions/2.0.17/skills/idea-refine/examples.md +238 -0
  1059. package/.versions/2.0.17/skills/idea-refine/frameworks.md +99 -0
  1060. package/.versions/2.0.17/skills/idea-refine/refinement-criteria.md +113 -0
  1061. package/.versions/2.0.17/skills/idea-refine/scripts/idea-refine.sh +15 -0
  1062. package/.versions/2.0.17/skills/incremental-implementation/SKILL.md +353 -0
  1063. package/.versions/2.0.17/skills/interview-me/SKILL.md +226 -0
  1064. package/.versions/2.0.17/skills/orchestration-verification/SKILL.md +182 -0
  1065. package/.versions/2.0.17/skills/peer-coms/SKILL.md +90 -0
  1066. package/.versions/2.0.17/skills/performance-optimization/SKILL.md +496 -0
  1067. package/.versions/2.0.17/skills/planning-and-task-breakdown/SKILL.md +318 -0
  1068. package/.versions/2.0.17/skills/repository-ai-setup/SKILL.md +117 -0
  1069. package/.versions/2.0.17/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  1070. package/.versions/2.0.17/skills/repository-ai-setup/references/apply-contract.md +74 -0
  1071. package/.versions/2.0.17/skills/repository-ai-setup/references/provenance-template.md +16 -0
  1072. package/.versions/2.0.17/skills/repository-ai-setup/references/setup-flow.md +108 -0
  1073. package/.versions/2.0.17/skills/repository-ai-setup/references/verify-setup.md +20 -0
  1074. package/.versions/2.0.17/skills/security-and-hardening/SKILL.md +524 -0
  1075. package/.versions/2.0.17/skills/spec-driven-development/SKILL.md +295 -0
  1076. package/.versions/2.0.17/skills/using-agent-skills/SKILL.md +198 -0
  1077. package/.versions/2.0.17/vendor/agent-skills-upstream/LICENSE +21 -0
  1078. package/.versions/2.0.17/vendor/agent-skills-upstream/README.md +430 -0
  1079. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  1080. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  1081. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  1082. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  1083. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  1084. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  1085. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  1086. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  1087. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  1088. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  1089. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  1090. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  1091. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  1092. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  1093. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  1094. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  1095. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  1096. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  1097. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  1098. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  1099. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  1100. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  1101. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  1102. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  1103. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  1104. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  1105. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  1106. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  1107. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  1108. package/.versions/2.0.17/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  1109. package/CHANGELOG.md +24 -0
  1110. package/bin/cli.js +17 -0
  1111. package/bin/lib/doctor.js +41 -32
  1112. package/bin/lib/system1-migration.js +107 -0
  1113. package/bin/lib/task-triage-setup.js +31 -71
  1114. package/bin/lib/transaction.js +61 -20
  1115. package/bin/lib/workspace-safety.js +3 -2
  1116. package/docs/ARCHITECTURE.md +9 -4
  1117. package/docs/agent-fleet-setup.md +28 -17
  1118. package/docs/npm-install.md +9 -4
  1119. package/docs/system1-agentic.md +106 -0
  1120. package/docs/system1-config.md +83 -0
  1121. package/install-manifest.json +3 -3
  1122. package/manifest-meta.json +2 -2
  1123. package/package.json +9 -4
  1124. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-live-stage-closure.user-run.mjs +0 -336
  1125. package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only.user-run.mjs +0 -157
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chankov/agent-fleet",
3
- "version": "2.0.15",
3
+ "version": "2.0.17",
4
4
  "description": "Subagent orchestration for the pi coding agent — a thin dispatcher runs parallel subagents under a verification contract, keeping their output out of its context window. Multi-agent fleets, 15 personas, skills, herdr panes, peer coms, Hermes desktop.",
5
5
  "keywords": [
6
6
  "subagents",
@@ -69,7 +69,8 @@
69
69
  ".pi/harnesses/*.json",
70
70
  ".pi/harnesses/*/*.ts",
71
71
  ".pi/harnesses/*/*/*.ts",
72
- ".pi/harnesses/lib/system1/config.js",
72
+ ".pi/harnesses/lib/system1/*.js",
73
+ ".pi/harnesses/agent-hub/agentic-sources-worker.mjs",
73
74
  ".pi/harnesses/lib/system1/selection.js",
74
75
  ".pi/harnesses/*/*.js",
75
76
  ".pi/harnesses/*/package.json",
@@ -105,6 +106,7 @@
105
106
  "docs/agent-fleet-setup.md",
106
107
  "docs/MIGRATION-agent-fleet.md",
107
108
  "docs/ARCHITECTURE.md",
109
+ "docs/system1-agentic.md",
108
110
  "docs/claude-code-coms-bridge.md",
109
111
  "docs/coms-hermes-bridge.md",
110
112
  "docs/pi-extensions.md",
@@ -134,7 +136,9 @@
134
136
  "!docs/plans/**",
135
137
  ".pi/agent-fleet/scripts/fleet-codex-read.py",
136
138
  "docs/codex-session-bridge.md",
137
- ".pi/harnesses/agent-hub/proactive-snapshot-worker.mjs"
139
+ ".pi/harnesses/agent-hub/proactive-snapshot-worker.mjs",
140
+ "!**/task-triage*.user-run.mjs",
141
+ "docs/system1-config.md"
138
142
  ],
139
143
  "engines": {
140
144
  "node": ">=18.0.0"
@@ -149,7 +153,8 @@
149
153
  "test:task-triage": "node --import ./bin/test/helpers/system1-no-network.js --experimental-strip-types --test .pi/harnesses/agent-hub/task-triage-config.test.ts .pi/harnesses/agent-hub/task-triage-state.test.ts .pi/harnesses/agent-hub/task-triage-policy.test.ts .pi/harnesses/agent-hub/task-triage-obligations.test.ts .pi/harnesses/agent-hub/task-triage-authorization.test.ts .pi/harnesses/agent-hub/task-triage-runtime.test.ts .pi/harnesses/agent-hub/task-triage-effects.integration.test.ts .pi/harnesses/agent-hub/task-triage-pressure.integration.test.ts .pi/harnesses/agent-hub/task-triage-persisted-compaction.integration.test.ts .pi/harnesses/agent-hub/task-triage-real-pi.integration.test.ts",
150
154
  "test:triage": "node --import ./bin/test/helpers/system1-no-network.js --test .pi/harnesses/agent-hub/dispatch-triage.test.ts .pi/harnesses/agent-hub/system1-communication-store.test.ts .pi/harnesses/agent-hub/ui/system1-communication.test.ts",
151
155
  "test:task-triage-pilot": "tsc --noEmit -p bin/test/helpers/task-triage-pilot-tsconfig.json && node --import ./bin/test/helpers/system1-no-network.js --test bin/test/task-triage-pilot-budget.test.ts bin/test/task-triage-pilot.test.ts",
152
- "test:system1": "npm run test:triage && npm run typecheck:system1 && node --test .pi/harnesses/lib/system1/config.test.js && node --experimental-strip-types --test .pi/harnesses/lib/system1/service.test.ts .pi/harnesses/lib/system1/fake-provider.test.ts .pi/harnesses/lib/system1/jev.test.ts .pi/harnesses/lib/system1/demo.test.ts",
156
+ "test:agentic": "node --import ./bin/test/helpers/system1-no-network.js --test .pi/harnesses/lib/system1/config-agentic.test.js .pi/harnesses/agent-hub/agentic*.test.ts",
157
+ "test:system1": "npm run test:agentic && npm run test:triage && npm run typecheck:system1 && node --test .pi/harnesses/lib/system1/config*.test.js && node --experimental-strip-types --test .pi/harnesses/lib/system1/service.test.ts .pi/harnesses/lib/system1/fake-provider.test.ts .pi/harnesses/lib/system1/jev.test.ts .pi/harnesses/lib/system1/demo.test.ts",
153
158
  "test:portability": "node bin/test/helpers/run-portability.js",
154
159
  "typecheck:workflows": "tsc -p .pi/agent-fleet/scripts/workflows/tsconfig.json --noEmit",
155
160
  "typecheck:hub": "tsc -p .pi/harnesses/agent-hub/tsconfig.json --noEmit",
@@ -1,336 +0,0 @@
1
- // USER-RUN LIVE ONLY: node .pi/harnesses/agent-hub/task-triage-live-stage-closure.user-run.mjs --live
2
- // Real provider spend. Never imported by offline tests or npm test.
3
- import { spawn, spawnSync } from "node:child_process";
4
- import { createHash } from "node:crypto";
5
- import { appendFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, writeFileSync } from "node:fs";
6
- import { tmpdir } from "node:os";
7
- import { join } from "node:path";
8
- import { fileURLToPath } from "node:url";
9
- import { reviewClosureUnmet, reviewReturnTemplate } from "./task-triage-review-contract.mjs";
10
-
11
- if (process.argv.length !== 3 || process.argv[2] !== "--live") {
12
- console.error("LIVE MODEL SPEND: opt in explicitly with --live; this is not an offline test.");
13
- process.exitCode = 2;
14
- } else {
15
- await run();
16
- }
17
-
18
- async function run() {
19
- const root = fileURLToPath(new URL("../../../", import.meta.url));
20
- const dir = mkdtempSync(join(tmpdir(), "t4-live-stage-closure-")); // retained, never delete evidence
21
- const worktree = join(dir, "worktree");
22
- const evidence = join(dir, "evidence");
23
- const runtimeTmp = join(dir, "runtime-tmp"), compileCache = join(dir, "node-compile-cache");
24
- for (const path of [evidence, runtimeTmp, compileCache, join(worktree, ".pi/agents/personas"), join(worktree, "skills/orchestration-verification")]) mkdirSync(path, { recursive: true });
25
- // Only the public skill instructions required by the synthetic personas; no repo source or secrets.
26
- cpSync(join(root, "skills/orchestration-verification/SKILL.md"), join(worktree, "skills/orchestration-verification/SKILL.md"));
27
- const model = "openai-codex/gpt-6-luna";
28
- const initial = "# Synthetic Widget (isolated test fixture)\n\nThe wdiget renders a greeting.\n\n## Steps\n\n1. Correct the typo.\n2. Keep every other byte unchanged.\n";
29
- const expected = initial.replace("wdiget renders", "widget renders");
30
- const expectedHash = createHash("sha256").update(expected).digest("hex");
31
- const readme = join(worktree, "README-SYNTH.md");
32
- const before = join(evidence, "README-before.md"), after = join(evidence, "README-after.md");
33
- const beforeDiff = join(evidence, "README-before.git-diff.patch");
34
- const afterDiff = join(evidence, "README-before-after.git-diff.patch");
35
- writeFileSync(readme, initial);
36
- writeFileSync(before, initial);
37
- writeFileSync(join(worktree, ".pi/agents/teams.yaml"), "stage:\n - planner\n - builder\n - code-reviewer\n");
38
- for (const [name, tools] of [["planner", "read,write,grep,find,ls"], ["builder", "read,edit,bash"], ["code-reviewer", "read,grep,find,ls"]]) {
39
- writeFileSync(join(worktree, `.pi/agents/personas/${name}.md`), `---\nname: ${name}\ndescription: Isolated synthetic ${name} for user-run T4 stage closure\ntools: ${tools}\nmodel: ${model}\ndelegate_depth: 0\n---\nWork only inside the isolated synthetic workspace. No delegation. Never read non-fixture repository data or credentials.\n${name === "planner" ? "For this synthetic task, write the plan to the absolute path declared in dispatch deliverables. Generic auto-handoff is separate and never substitutes for the explicit plan; cite the declared path in your return.\n" : name === "code-reviewer" ? "Start your final return with exactly one standalone line: VERDICT: APPROVE or VERDICT: REJECT. Never omit the colon or embed a verdict in prose.\n" : ""}`);
40
- }
41
- // Copy only this test gate into the synthetic fixture; it is not a Hub policy hook.
42
- cpSync(join(root, ".pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs"), join(worktree, "stage-boundary.mjs"));
43
- writeFileSync(join(worktree, "probe-hooks.ts"), `import { appendFileSync, readFileSync } from "node:fs";\nimport { createStageBoundary } from "./stage-boundary.mjs";\nexport default function (pi: any) {\n for (const hook of ["session_start", "before_agent_start", "turn_end", "session_shutdown"]) pi.on(hook, () => appendFileSync(process.env.T4_LIVE_EVENTS!, JSON.stringify({hook, at: Date.now()}) + "\\n"));\n let attempts = 0;\n const gate = createStageBoundary({\n stage: () => readFileSync(process.env.T4_LIVE_STAGE!, "utf8").trim(),\n planDeliverable: () => readFileSync(process.env.T4_LIVE_PLAN!, "utf8").trim(),\n record: (entry: any) => { if (++attempts <= 32) appendFileSync(process.env.T4_LIVE_DISPATCHES!, JSON.stringify(entry) + "\\n"); else if (attempts === 33) appendFileSync(process.env.T4_LIVE_DISPATCHES!, JSON.stringify({ truncated: true }) + "\\n"); },\n });\n pi.on("tool_call", (event: any, ctx: any) => gate(event, ctx));\n}\n`);
44
- const git = (...args) => {
45
- const result = spawnSync("git", ["-c", "core.excludesFile=/dev/null", ...args], { cwd: worktree, encoding: "utf8" });
46
- if (result.error || ![0, 1].includes(result.status)) throw new Error(`synthetic git evidence failed: ${args.join(" ")} (${result.status})`);
47
- return result;
48
- };
49
- git("init", "-q");
50
- const fixtureFiles = ["README-SYNTH.md", "probe-hooks.ts", "stage-boundary.mjs", "skills/orchestration-verification/SKILL.md", ".pi/agents/teams.yaml",
51
- ...["planner", "builder", "code-reviewer"].map(name => `.pi/agents/personas/${name}.md`)];
52
- const baselineBytes = new Map(fixtureFiles.map(file => [file, readFileSync(join(worktree, file))]));
53
- git("add", "--", ...fixtureFiles);
54
- const commit = git("-c", "user.name=T4 Synthetic", "-c", "user.email=t4-synthetic@example.invalid",
55
- "-c", "commit.gpgsign=false", "-c", "core.hooksPath=/dev/null", "commit", "-q", "-m", "synthetic fixture baseline");
56
- const baselineStatus = git("status", "--short", "--untracked-files=all");
57
- const baselineDiff = git("diff", "--no-index", "--", "/dev/null", "README-SYNTH.md");
58
- if (commit.status !== 0 || baselineStatus.status !== 0 || baselineStatus.stdout !== "" || baselineDiff.status !== 1) throw new Error("baseline git capture failed");
59
- writeFileSync(beforeDiff, baselineDiff.stdout);
60
- const baselineStatusPath = join(evidence, "baseline-git-status.txt");
61
- const afterStatusPath = join(evidence, "after-git-status.txt");
62
- const reviewStatusPath = join(evidence, "after-review-git-status.txt");
63
- const baselineManifest = join(evidence, "baseline-fixture-sha256.json");
64
- const baselineFilesPath = join(evidence, "baseline-fixture-bytes.json");
65
- writeFileSync(baselineStatusPath, baselineStatus.stdout);
66
- writeFileSync(baselineFilesPath, JSON.stringify(Object.fromEntries([...baselineBytes].map(([file, bytes]) =>
67
- [file, bytes.toString("utf8")])), null, 2));
68
- writeFileSync(baselineManifest, JSON.stringify(Object.fromEntries([...baselineBytes].map(([file, bytes]) =>
69
- [file, createHash("sha256").update(bytes).digest("hex")])), null, 2));
70
- const check = `node -e 'const fs=require("node:fs"); const crypto=require("node:crypto"); const t=fs.readFileSync("README-SYNTH.md","utf8"); if (!t.includes("widget renders") || t.includes("wdiget") || t.split("\\n").length > 30 || crypto.createHash("sha256").update(t).digest("hex") !== "${expectedHash}") process.exit(1)'`;
71
- const assertion = { id: "A1", tag: "test", text: "Synthetic README-SYNTH.md equals the baseline with only 'wdiget renders' corrected to 'widget renders'; it stays under 30 lines.", source: "isolated T4 live fixture", reference: before, critical_conditions: ["exact expected bytes", "no unrelated changes", "runtime check exit 0 at inspected revision"], test_command: check };
72
- const contract = `A1 [test]: ${assertion.text} (source: ${assertion.source}). Explicit verification command: ${JSON.stringify(check)} (execute only through approved bash). Runtime acceptance and reviewer evidence are separate; neither a return path nor a bare claim proves semantic adequacy.`;
73
- const resultPath = join(dir, "result.json"), rpcLog = join(dir, "rpc.log"), events = join(dir, "events.ndjson");
74
- const stagePath = join(evidence, "authorized-stage.txt"), planPath = join(evidence, "authorized-plan.txt"), dispatchLog = join(evidence, "dispatch-attempts.ndjson");
75
- function authorize(stage) {
76
- const next = `${stagePath}.next`;
77
- writeFileSync(next, stage);
78
- renameSync(next, stagePath); // explicit harness-owned transition after each evidence gate
79
- }
80
- authorize("plan");
81
- const outcome = { fixture: dir, worktree, model, declaredCheck: check,
82
- baseline: { status: baselineStatus.stdout, statusPath: baselineStatusPath, manifest: baselineManifest,
83
- filesPath: baselineFilesPath, diff: beforeDiff, bytes: before }, stages: [], error: null };
84
- const save = () => {
85
- outcome.dispatchAttempts = existsSync(dispatchLog) ? readFileSync(dispatchLog, "utf8").split("\n").filter(Boolean).map(line => JSON.parse(line)) : [];
86
- writeFileSync(resultPath, JSON.stringify(outcome, null, 2));
87
- };
88
- save();
89
- const env = { ...process.env, TMPDIR: runtimeTmp, NODE_COMPILE_CACHE: compileCache, T4_LIVE_EVENTS: events,
90
- T4_LIVE_STAGE: stagePath, T4_LIVE_PLAN: planPath, T4_LIVE_DISPATCHES: dispatchLog };
91
- // Inherit normal configured Pi auth/catalog; no credential values are read into task text or logs.
92
- delete env.PI_OFFLINE;
93
- delete env.TYPESAFE_API_KEY;
94
- delete env.AGENT_HUB_TASK_TRIAGE_FAKE;
95
- delete env.AGENT_HUB_TASK_TRIAGE_FAKE_RECORD;
96
- if (env.NODE_OPTIONS?.includes("system1-no-network")) delete env.NODE_OPTIONS;
97
- const child = spawn(join(root, "node_modules/.bin/pi"), [
98
- "--mode", "rpc", "--no-session", "--no-extensions",
99
- "-e", join(root, ".pi/harnesses/damage-control-continue/index.ts"),
100
- "-e", join(root, ".pi/harnesses/ask-user-remote/index.ts"),
101
- "-e", join(root, ".pi/harnesses/agent-hub/index.ts"),
102
- "-e", join(worktree, "probe-hooks.ts"),
103
- "--solo", "--work-mode", "orchestrator", "--agent-team", "stage", "--model", model,
104
- ], { cwd: worktree, env, detached: true, stdio: ["pipe", "pipe", "pipe"] });
105
- let ended = false, exit, turns = 0, serial = 0, err = "", buffer = "";
106
- const pending = new Map(), waiters = new Set(), parentModels = [];
107
- const log = entry => appendFileSync(rpcLog, JSON.stringify(entry) + "\n");
108
- function kill(signal) { if (child.pid && !ended) { try { process.kill(-child.pid, signal); } catch (e) { if (e.code !== "ESRCH") throw e; } } }
109
- function stop(reason) {
110
- ended = true;
111
- for (const wake of waiters) wake();
112
- for (const cb of pending.values()) cb({ success: false, error: reason });
113
- pending.clear();
114
- }
115
- child.once("error", e => stop(`Pi spawn failed: ${e.message}`));
116
- child.once("close", (code, signal) => { exit = { code, signal }; stop(`Pi exited: ${code ?? signal}`); });
117
- child.stderr.on("data", c => { err += String(c); });
118
- child.stdout.on("data", c => {
119
- buffer += String(c);
120
- for (let nl; (nl = buffer.indexOf("\n")) >= 0;) {
121
- const line = buffer.slice(0, nl); buffer = buffer.slice(nl + 1);
122
- let ev; try { ev = JSON.parse(line); } catch { continue; }
123
- if (ev.type === "agent_end") { turns++; for (const wake of waiters) wake(); }
124
- if (ev.type === "message_end" && ev.message?.role === "assistant") {
125
- parentModels.push({ provider: ev.message.provider, model: ev.message.model, output: ev.message.usage?.output });
126
- }
127
- if (ev.type === "response" && pending.has(ev.id)) { const cb = pending.get(ev.id); pending.delete(ev.id); cb(ev); }
128
- if (ev.type === "extension_ui_request") {
129
- log({ type: "ui", method: ev.method, title: String(ev.title ?? "").slice(0, 300) });
130
- if (ev.method === "select") {
131
- // Never silently authorize an unexpected human decision or budget extension.
132
- const deny = ev.options?.find(o => /no|deny|cancel/i.test(o));
133
- if (!deny) { kill("SIGTERM"); continue; }
134
- child.stdin.write(JSON.stringify({ type: "extension_ui_response", id: ev.id, value: deny }) + "\n");
135
- }
136
- }
137
- }
138
- });
139
- async function request(message, command = false) {
140
- const previous = turns;
141
- const reply = await new Promise((resolve, reject) => {
142
- if (ended) return reject(new Error("Pi exited before request"));
143
- const id = `t4-live-${++serial}`;
144
- const timer = setTimeout(() => { pending.delete(id); kill("SIGTERM"); reject(new Error("Pi RPC timeout")); }, 600_000);
145
- pending.set(id, ev => { clearTimeout(timer); resolve(ev); });
146
- child.stdin.write(JSON.stringify({ id, type: "prompt", message }) + "\n");
147
- });
148
- if (!reply.success || command || turns > previous) return reply;
149
- await new Promise((resolve, reject) => {
150
- const wake = () => {
151
- if (turns <= previous && !ended) return;
152
- clearTimeout(timer); waiters.delete(wake);
153
- if (ended && turns <= previous) reject(new Error("Pi exited before agent_end")); else resolve();
154
- };
155
- const timer = setTimeout(() => { waiters.delete(wake); kill("SIGTERM"); reject(new Error("Pi agent_end timeout")); }, 600_000);
156
- waiters.add(wake); wake();
157
- });
158
- return reply;
159
- }
160
- function nonRuntimeStatus(status, sessionId) {
161
- const prefix = `?? .pi/agent-sessions/sessions/${sessionId}/`;
162
- return status.split("\n").filter(line => line && !line.startsWith(prefix)).join("\n");
163
- }
164
- function observedChildModel(sessionPath) {
165
- if (!existsSync(sessionPath)) return { status: "unavailable", reason: "retained child session missing" };
166
- let rows;
167
- try { rows = readFileSync(sessionPath, "utf8").split("\n").filter(Boolean).map(line => JSON.parse(line)); }
168
- catch { return { status: "unavailable", reason: "retained child session unreadable" }; }
169
- const identities = rows.filter(row => row.type === "message" && row.message?.role === "assistant")
170
- .map(row => ({ provider: row.message.provider, model: row.message.model }));
171
- if (!identities.length || identities.some(m => typeof m.provider !== "string" || typeof m.model !== "string" || !m.provider || !m.model))
172
- return { status: "unavailable", reason: "no complete assistant model identity in retained session" };
173
- return { status: "observed", identities };
174
- }
175
- function snapshot(stage, role) {
176
- const sessionsRoot = join(worktree, ".pi/agent-sessions/sessions");
177
- const sessions = existsSync(sessionsRoot) ? readdirSync(sessionsRoot) : [];
178
- if (sessions.length !== 1) throw new Error(`Expected one isolated session, got ${sessions.length}`);
179
- const base = join(sessionsRoot, sessions[0]);
180
- const dispatchRoot = join(base, "dispatches"), evidenceRoot = join(base, "artifacts/evidence");
181
- // Count started dispatches, including any still pending; never hide an extra
182
- // child just because its result has not been persisted yet.
183
- const dispatches = readdirSync(dispatchRoot).filter(id => existsSync(join(dispatchRoot, id, "request.json")));
184
- const matching = dispatches.filter(id => existsSync(join(dispatchRoot, id, "result.json")) &&
185
- existsSync(join(base, "artifacts/returns", `${role}-${id}.md`)))
186
- .map(id => ({ id, result: JSON.parse(readFileSync(join(dispatchRoot, id, "result.json"), "utf8")) }));
187
- if (matching.length !== 1 || dispatches.length !== outcome.stages.length + 1) {
188
- const observed = dispatches.map(id => {
189
- const request = join(dispatchRoot, id, "request.json");
190
- let agent = "unknown";
191
- try { agent = JSON.parse(readFileSync(request, "utf8")).agent ?? "unknown"; } catch { /* keep ID */ }
192
- return { agent, id };
193
- });
194
- throw new Error(`Expected exactly one ${role} child at ${stage}; saw ${dispatches.length} total: ${JSON.stringify(observed)}`);
195
- }
196
- const { id, result } = matching[0];
197
- if (result.exitCode !== 0 || !result.diagnostics || !Object.hasOwn(result.diagnostics, "modelFallback") ||
198
- result.diagnostics.modelFallback !== null || !(result.billed > 0))
199
- throw new Error(`${role} did not complete with a retained explicit no-fallback result`);
200
- // diagnostics.modelUsed is the requested spawn model, not an observed message identity.
201
- const childModel = observedChildModel(join(dispatchRoot, id, "session.json"));
202
- if (childModel.status === "observed" && childModel.identities.some(m => `${m.provider}/${m.model}` !== model))
203
- throw new Error(`${role} emitted a model other than ${model}`);
204
- const files = readdirSync(evidenceRoot).filter(f => f.startsWith(`${role}-acceptance-${id}`));
205
- if (files.length !== 1) throw new Error(`Missing unique runtime ${role} acceptance artifact`);
206
- const acceptancePath = join(evidenceRoot, files[0]);
207
- const acceptance = JSON.parse(readFileSync(acceptancePath, "utf8"));
208
- const canonicalResultPath = join(dispatchRoot, id, "result.json");
209
- if (result.evidencePath !== canonicalResultPath || !existsSync(result.evidencePath)) throw new Error(`Missing canonical retained ${role} dispatch result`);
210
- const item = { stage, role, id, resultPath: result.evidencePath, returnPath: join(base, "artifacts/returns", `${role}-${id}.md`), acceptancePath, process: acceptance.process, billed: result.billed, modelEvidence: { ...childModel,
211
- requested: result.diagnostics?.modelUsed ?? null, fallback: result.diagnostics?.modelFallback ?? null } };
212
- outcome.stages.push(item); save();
213
- return { ...item, result, acceptance };
214
- }
215
- const p1 = `SYNTHETIC isolated live task; no repository data or credentials. Call set_task_tier tier "small", risk "low", scope "wide" with reason "synthetic stage-closure fixture". Call the REAL set_assertions tool with ${JSON.stringify({ assertions: [assertion] })}. Do not dispatch any child yet; finish this turn so the harness can declare the absolute plan path in the runtime session. Never manually mark stages satisfied.`;
216
- const p2 = `Continue SAME task; the pre-builder test assertion must already be registered. Dispatch exactly one native builder pinned ${model}, backend "native", scope ["README-SYNTH.md"], deliverables ["README-SYNTH.md"]. Task: In the isolated synthetic fixture, read ${before} and README-SYNTH.md. Edit ONLY 'wdiget renders' to 'widget renders', preserving every other byte. After editing, run EXACTLY this declared command via normal approved bash, no wrapper: ${check}. Do not delegate, read repository files, or modify other files. ${contract} Report actual builder result and process obligations; never force pass.`;
217
- try {
218
- const one = await request(p1);
219
- if (!one.success) throw new Error("classification/assertion turn failed");
220
- const sessionsRoot = join(worktree, ".pi/agent-sessions/sessions");
221
- const planSessions = existsSync(sessionsRoot) ? readdirSync(sessionsRoot) : [];
222
- if (planSessions.length !== 1 ||
223
- (existsSync(join(sessionsRoot, planSessions[0], "dispatches")) &&
224
- readdirSync(join(sessionsRoot, planSessions[0], "dispatches")).some(id => existsSync(join(sessionsRoot, planSessions[0], "dispatches", id, "request.json")))))
225
- throw new Error("Expected one initialized session and no child before plan path declaration");
226
- const planArtifact = join(sessionsRoot, planSessions[0], "artifacts/plans/synthetic-readme-fix.md");
227
- writeFileSync(planPath, planArtifact); // boundary and task share this exact absolute path
228
- const pPlan = `Continue SAME synthetic task. Dispatch exactly one native planner pinned ${model}, backend "native", with deliverables ["${planArtifact}"]. Planner task: Read the synthetic README and public verification skill in this isolated worktree, write a short concrete typo-only plan using your write tool to the explicit absolute deliverable ${planArtifact}. This explicit plan artifact is distinct from the generic auto-handoff; do not substitute that auto-handoff for it. Return a matching plan for correcting ONLY 'wdiget renders' in README-SYNTH.md with this declared check: ${check}. The planner must not edit README or execute the check: report A1 and AF-MIN-CHANGE unproven at plan time; the builder will verify them. No other children or delegated helpers. Report the tool results; never manually mark stages satisfied.`;
229
- const planned = await request(pPlan);
230
- if (!planned.success) throw new Error("planner turn failed");
231
- const plan = snapshot("plan", "planner");
232
- if (plan.acceptance.process?.obligations?.plan?.status !== "satisfied" ||
233
- plan.acceptance.readback?.length !== 1 || plan.acceptance.readback[0].status !== "read" ||
234
- plan.acceptance.readback[0].changed !== true ||
235
- plan.acceptance.readback[0].path !== planArtifact ||
236
- plan.acceptance.compatibility?.hubAcceptanceStatus === "deliverable_failed" ||
237
- !existsSync(planArtifact) || !readFileSync(planArtifact, "utf8").trim())
238
- throw new Error(plan.acceptance.readback?.[0]?.status !== "read" || !existsSync(planArtifact)
239
- ? "real planner declared plan artifact was not read back"
240
- : plan.acceptance.process?.obligations?.plan?.status !== "satisfied"
241
- ? "real planner artifact read back, but plan-stage gate remained open"
242
- : "real planner artifact did not meet plan readback/change/content requirements");
243
- // Planner can write: attribute no off-target change to the builder.
244
- const planStatus = git("status", "--short", "--untracked-files=all");
245
- const planNonRuntimeStatus = nonRuntimeStatus(planStatus.stdout, readdirSync(join(worktree, ".pi/agent-sessions/sessions"))[0]);
246
- const planUnchangedFixture = [...baselineBytes].every(([file, bytes]) => readFileSync(join(worktree, file)).equals(bytes));
247
- outcome.afterPlan = { gitStatus: planStatus.stdout, nonRuntimeStatus: planNonRuntimeStatus,
248
- readmeUnchanged: readFileSync(readme, "utf8") === initial, unchangedFixture: planUnchangedFixture };
249
- save();
250
- if (planStatus.status !== 0 || planNonRuntimeStatus !== "" || !outcome.afterPlan.readmeUnchanged || !planUnchangedFixture)
251
- throw new Error("planner changed README or non-runtime synthetic fixture before builder");
252
- authorize("build");
253
- const two = await request(p2);
254
- if (!two.success) throw new Error("builder turn failed");
255
- const build = snapshot("build", "builder");
256
- const actual = readFileSync(readme, "utf8");
257
- writeFileSync(after, actual);
258
- const diff = git("diff", "--no-index", "--", before, after);
259
- writeFileSync(afterDiff, diff.stdout);
260
- const status = git("status", "--short", "--untracked-files=all");
261
- writeFileSync(afterStatusPath, status.stdout);
262
- // The one runtime-owned session is the only worktree infrastructure exception.
263
- // Keep the full status: a new or changed file anywhere else must fail this gate.
264
- const sessions = readdirSync(join(worktree, ".pi/agent-sessions/sessions"));
265
- const sessionPrefix = sessions.length === 1 ? `?? .pi/agent-sessions/sessions/${sessions[0]}/` : null;
266
- const changedOutsideSession = sessionPrefix ? nonRuntimeStatus(status.stdout, sessions[0]) : status.stdout;
267
- const unchangedFixture = [...baselineBytes].every(([file, bytes]) =>
268
- file === "README-SYNTH.md" || readFileSync(join(worktree, file)).equals(bytes));
269
- outcome.after = { path: after, diffPath: afterDiff, gitStatus: status.stdout, statusPath: afterStatusPath,
270
- nonRuntimeStatus: changedOutsideSession, unchangedFixture, exactExpectedBytes: actual === expected };
271
- save();
272
- if (actual !== expected || diff.status !== 1 || status.status !== 0 || sessions.length !== 1 ||
273
- changedOutsideSession !== " M README-SYNTH.md" || !unchangedFixture) throw new Error("independent before/after bytes or git state failed");
274
- const req = build.acceptance.verification?.requirements ?? [];
275
- const checkEvidence = build.acceptance.verification?.checks?.[0];
276
- if (build.acceptance.process?.obligations?.acceptance?.status !== "satisfied" ||
277
- !["A1", "AF-MIN-CHANGE"].every(id => req.some(r => r.id === id && r.status === "passed")) ||
278
- checkEvidence?.command?.[0] !== check || checkEvidence?.exitCode !== 0 ||
279
- typeof checkEvidence?.inspectedRevision !== "string" || !checkEvidence.inspectedRevision ||
280
- checkEvidence.inspectedRevision !== build.acceptance.task?.revision?.after || !existsSync(checkEvidence?.evidenceRef ?? "")) {
281
- throw new Error("builder runtime acceptance/check/revision/readback incomplete; reviewer not dispatched");
282
- }
283
- // Every reviewer reference must be retained before the reviewer is dispatched.
284
- const reviewInputs = [plan.returnPath, readme, before, after, beforeDiff, afterDiff,
285
- baselineStatusPath, baselineManifest, baselineFilesPath, afterStatusPath,
286
- build.acceptancePath, checkEvidence.evidenceRef, build.resultPath];
287
- for (const path of reviewInputs) {
288
- if (typeof path !== "string" || !existsSync(path)) throw new Error(`Reviewer input unavailable before dispatch: ${path}`);
289
- }
290
- const reviewPaths = [plan.returnPath, before, after, afterDiff, build.acceptancePath, checkEvidence.evidenceRef];
291
- const returnTemplate = reviewReturnTemplate({ planReturnPath: plan.returnPath, before, after, afterDiff,
292
- acceptancePath: build.acceptancePath, checkPath: checkEvidence.evidenceRef, check,
293
- exitCode: checkEvidence.exitCode, inspectedRevision: checkEvidence.inspectedRevision });
294
- const p3 = `Continue SAME synthetic task. Dispatch exactly one native code-reviewer pinned ${model}, backend "native", scope ["README-SYNTH.md"], review_reason "Human explicitly requested independent synthetic wide-stage review despite docs-only lane". Task: Independently inspect the actual planner output ${plan.returnPath} for a relevant typo-only plan and acceptance criteria; README-SYNTH.md in ${worktree}, BEFORE ${before}, AFTER ${after}, baseline diff ${beforeDiff}, before/after diff ${afterDiff}, clean committed baseline git status ${baselineStatusPath}, baseline fixture hashes ${baselineManifest}, immutable baseline fixture bytes ${baselineFilesPath}, full after git status ${afterStatusPath}, builder runtime acceptance ${build.acceptancePath}, builder check ${checkEvidence.evidenceRef}, and builder native result at the absolute canonical dispatch evidence path ${build.resultPath} (dispatches/${build.id}/result.json, NOT under artifacts/evidence). These paths are available NOW; read them as written, without shortening or rebasing relative paths. The only excluded after-status entries are untracked files under the single runtime-owned .pi/agent-sessions/sessions/${sessions[0]}/; every other tracked or untracked path is checked. Check the exact byte-level one-token change, unchanged other fixture bytes, absence of unrelated changes outside that session, and the actual declared check, exit code, inspected revision and deliverable readback. ${contract} Start your final return with exactly one standalone line, VERDICT: APPROVE only if plan, content and verification are adequate, otherwise VERDICT: REJECT. Never omit the colon or embed a verdict in prose. Include the parseable structured return keys changed_files, assertions_proven, assertions_unproven, assertions_failed, tests_run, open_risks, requires_user_decision. REVIEW INSTRUCTIONS / TEMPLATE ONLY — this is NOT returned evidence and the harness never inserts it into your response. The production parser recognizes an A1 evidence field ONLY after the literal delimiter ' — evidence: ' inside an assertions_proven entry. A phrase such as 'source: builder runtime evidence' in the note or tests_run is NOT A1 evidence. If and only if you independently read and confirm every cited file and runtime field, you may write an actual return using the following shape, replacing the observation placeholder with your own findings and choosing the verdict; keep the A1 evidence on ONE physical bullet line, with the JSON-quoted command and paths copied exactly to preserve embedded quotes, escapes, commas or newlines. Do not copy an unverified A1 proven entry. If unsupported, choose VERDICT: REJECT and put A1 under assertions_unproven or assertions_failed with the reason, not assertions_proven. Approval is never required.\n${returnTemplate}\nYou are read-only: do not promise or cite a new review artifact you cannot create; the Hub retains your actual return under its returnPath. No bash, edits, delegation or forced stage updates. Report reviewer result, not a manufactured pass.`;
295
- authorize("review");
296
- const three = await request(p3);
297
- if (!three.success) throw new Error("reviewer turn failed");
298
- const review = snapshot("review", "code-reviewer");
299
- const reviewStatus = git("status", "--short", "--untracked-files=all");
300
- writeFileSync(reviewStatusPath, reviewStatus.stdout);
301
- const reviewNonRuntimeStatus = nonRuntimeStatus(reviewStatus.stdout, sessions[0]);
302
- const reviewUnchangedFixture = [...baselineBytes].every(([file, bytes]) =>
303
- file === "README-SYNTH.md" ? readFileSync(readme).equals(Buffer.from(expected)) : readFileSync(join(worktree, file)).equals(bytes));
304
- outcome.afterReview = { gitStatus: reviewStatus.stdout, statusPath: reviewStatusPath,
305
- nonRuntimeStatus: reviewNonRuntimeStatus, unchangedFixture: reviewUnchangedFixture };
306
- if (reviewStatus.status !== 0 || reviewNonRuntimeStatus !== " M README-SYNTH.md" || !reviewUnchangedFixture)
307
- throw new Error("independent post-review bytes or git state failed");
308
- outcome.parentModels = parentModels;
309
- if (parentModels.length < 3 || parentModels.some(m => m.provider !== "openai-codex" || m.model !== "gpt-6-luna" || !(m.output > 0))) throw new Error("parent provider/message usage not exactly luna on every observed response");
310
- const reviewVerdict = review.result.output.split(/\r?\n/, 1)[0];
311
- const unmet = reviewClosureUnmet({ process: review.acceptance.process, verdict: reviewVerdict,
312
- parsed: review.acceptance.structuredReturn, requiredPaths: reviewPaths,
313
- check, exitCode: checkEvidence.exitCode, inspectedRevision: checkEvidence.inspectedRevision });
314
- if (unmet.length) throw new Error(`review closure unmet: ${unmet.join("; ")}`);
315
- outcome.closed = true;
316
- } catch (e) {
317
- outcome.error = String(e?.message ?? e);
318
- process.exitCode = 1;
319
- } finally {
320
- outcome.turns = turns;
321
- outcome.parentModels = parentModels;
322
- outcome.stderrTail = err.slice(-2000);
323
- save();
324
- child.stdin.end();
325
- await new Promise(resolve => {
326
- if (ended) return resolve();
327
- const done = () => { clearTimeout(grace); clearTimeout(bound); resolve(); };
328
- child.once("close", done);
329
- const grace = setTimeout(() => kill("SIGTERM"), 2000);
330
- const bound = setTimeout(() => { kill("SIGKILL"); resolve(); }, 8000);
331
- });
332
- outcome.shutdown = exit; save();
333
- if (exit?.code !== 0 || exit?.signal) process.exitCode = 1;
334
- console.log(JSON.stringify({ fixture: dir, result: resultPath, closed: !!outcome.closed, error: outcome.error, stages: outcome.stages.map(s => ({ role: s.role, process: s.process?.currentStage, modelEvidence: s.modelEvidence })) }));
335
- }
336
- }
@@ -1,157 +0,0 @@
1
- // USER RUN ONLY: node .pi/harnesses/agent-hub/task-triage-reviewer-only.user-run.mjs --live --from /tmp/t4-live-stage-closure-...
2
- // Real provider spend. Never imported by offline tests/npm; no original fixture writes.
3
- import { spawn } from "node:child_process";
4
- import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, writeFileSync } from "node:fs";
5
- import { tmpdir } from "node:os";
6
- import { join } from "node:path";
7
- import { fileURLToPath } from "node:url";
8
- import { reviewFixture, independentReviewUnmet, reviewGateSource } from "./task-triage-reviewer-only-contract.mjs";
9
- import { reviewReturnTemplate } from "./task-triage-review-contract.mjs";
10
- import { BENIGN_UI_METHODS, createReviewDiagnostics } from "./task-triage-reviewer-only-diagnostics.mjs";
11
-
12
- if (process.argv.length !== 5 || process.argv[2] !== "--live" || process.argv[3] !== "--from") {
13
- console.error("LIVE MODEL SPEND: supply --live --from <absolute retained fixture>; no offline/automatic mode.");
14
- process.exitCode = 2;
15
- } else {
16
- await run(process.argv[4]);
17
- }
18
-
19
- async function run(from) {
20
- let fixture;
21
- try { fixture = reviewFixture(from); fixture.verify(); }
22
- catch (e) { console.error(`Pre-spend fixture refusal: ${e.message}`); process.exitCode = 2; return; }
23
- const root = fileURLToPath(new URL("../../../", import.meta.url));
24
- const dir = mkdtempSync(join(tmpdir(), "t4-independent-review-"));
25
- const workspace = join(dir, "worktree"), evidence = join(dir, "evidence");
26
- mkdirSync(join(workspace, ".pi/agents/personas"), { recursive: true });
27
- mkdirSync(join(workspace, "skills/orchestration-verification"), { recursive: true });
28
- mkdirSync(evidence);
29
- // The original result and all original evidence remain read-only inputs; only this fresh directory receives writes.
30
- cpSync(join(root, "skills/orchestration-verification/SKILL.md"), join(workspace, "skills/orchestration-verification/SKILL.md"));
31
- cpSync(fixture.after, join(workspace, "README-SYNTH.md")); // isolated scope root, not original evidence
32
- writeFileSync(join(workspace, ".pi/agents/teams.yaml"), "review-only:\n - code-reviewer\n");
33
- writeFileSync(join(workspace, ".pi/agents/personas/code-reviewer.md"), `---\nname: code-reviewer\ndescription: Independent synthetic fixture reviewer\ntools: read,grep,find,ls\nmodel: openai-codex/gpt-6-luna\ndelegate_depth: 0\n---\nReview only the retained synthetic evidence named in the dispatch. Do not run commands, edit, write, delegate or read credentials. First line must be exactly VERDICT: APPROVE or VERDICT: REJECT.\n`);
34
- // A tool_call gate reserves the ONLY permitted child before execution, with no planner/builder/delegates.
35
- writeFileSync(join(workspace, "review-gate.ts"), reviewGateSource);
36
- const outputPath = join(dir, "review-result.json");
37
- const outcome = { originalFixture: from, outputPath, originalProcessComplete: fixture.review.process.accepted === true &&
38
- fixture.review.process.currentStage === "complete" && fixture.review.process.obligations.review.status === "satisfied",
39
- independentReviewerContractAccepted: false,
40
- hashProvenance: "recordedBaseline covers only original fixture files; snapshot is first-time capture for all other retained records", recordedBaseline: fixture.recordedBaseline,
41
- firstTimeSnapshot: fixture.snapshot, error: null };
42
- const save = () => { writeFileSync(`${outputPath}.tmp`, JSON.stringify(outcome, null, 2), { mode: 0o600 }); renameSync(`${outputPath}.tmp`, outputPath); };
43
- const diagnostic = createReviewDiagnostics(outcome, save);
44
- save();
45
- const env = { ...process.env, TMPDIR: join(dir, "runtime-tmp"), NODE_COMPILE_CACHE: join(dir, "node-compile-cache") };
46
- mkdirSync(env.TMPDIR); mkdirSync(env.NODE_COMPILE_CACHE);
47
- delete env.PI_OFFLINE; delete env.TYPESAFE_API_KEY; delete env.AGENT_HUB_TASK_TRIAGE_FAKE; delete env.AGENT_HUB_TASK_TRIAGE_FAKE_RECORD;
48
- if (env.NODE_OPTIONS?.includes("system1-no-network")) delete env.NODE_OPTIONS;
49
- let child;
50
- try {
51
- // Verify again immediately before real spend; no Pi process exists on validation failure.
52
- fixture.verify();
53
- child = spawn(join(root, "node_modules/.bin/pi"), ["--mode", "rpc", "--no-session", "--no-extensions",
54
- "-e", join(root, ".pi/harnesses/damage-control-continue/index.ts"),
55
- "-e", join(root, ".pi/harnesses/ask-user-remote/index.ts"),
56
- "-e", join(root, ".pi/harnesses/agent-hub/index.ts"), "-e", join(workspace, "review-gate.ts"),
57
- "--solo", "--work-mode", "orchestrator", "--agent-team", "review-only", "--model", "openai-codex/gpt-6-luna"],
58
- { cwd: workspace, env, detached: true, stdio: ["pipe", "pipe", "pipe"] });
59
- let buffer = "", turns = 0, ended = false, reply, failPendingPrompt;
60
- const models = [], callbacks = new Map(), waiters = new Set();
61
- const kill = (signal, reason) => diagnostic.kill(reason, signal, () => {
62
- if (child.pid && !ended) { try { process.kill(-child.pid, signal); } catch (e) { if (e.code !== "ESRCH") throw e; } }
63
- });
64
- child.once("error", e => { diagnostic.spawnError(e); ended = true; failPendingPrompt?.(); for (const wake of waiters) wake(); });
65
- child.once("close", (code, signal) => { ended = true; outcome.shutdown = { code, signal }; diagnostic.exit(code, signal); failPendingPrompt?.(); for (const wake of waiters) wake(); });
66
- child.stdin.on("error", e => { diagnostic.failure(`Pi stdin error: ${e.message}`); failPendingPrompt?.(); });
67
- child.stderr.on("data", chunk => diagnostic.stderr(chunk));
68
- child.stderr.once("end", () => diagnostic.flushStderr());
69
- child.stdout.on("data", chunk => {
70
- buffer += String(chunk);
71
- for (let nl; (nl = buffer.indexOf("\n")) >= 0;) {
72
- const line = buffer.slice(0, nl); buffer = buffer.slice(nl + 1);
73
- let ev; try { ev = JSON.parse(line); } catch { continue; }
74
- if (["agent_start", "agent_end", "message_end", "tool_execution_start", "tool_execution_end", "response", "error", "extension_ui_request"].includes(ev.type)) diagnostic.rpc(ev);
75
- if (ev.type === "agent_end") { turns++; for (const wake of waiters) wake(); }
76
- if (ev.type === "message_end" && ev.message?.role === "assistant") models.push({ provider: ev.message.provider, model: ev.message.model, output: ev.message.usage?.output });
77
- if (ev.type === "response" && callbacks.has(ev.id)) { callbacks.get(ev.id)(ev); callbacks.delete(ev.id); }
78
- if (ev.type === "extension_ui_request" && !BENIGN_UI_METHODS.has(ev.method))
79
- kill("SIGTERM", `unexpected human decision (${["select", "confirm", "input", "editor"].includes(ev.method) ? ev.method : "unknown"}); no budget extension authorized`);
80
- if (ev.type === "error") diagnostic.failure(`Pi RPC error: ${ev.error ?? "unknown"}`);
81
- }
82
- });
83
- const prompt = async message => {
84
- const prior = turns, id = `independent-${prior}`;
85
- reply = await new Promise((resolve, reject) => {
86
- const finish = (error, ev) => { clearTimeout(timer); callbacks.delete(id); failPendingPrompt = undefined; error ? reject(error) : resolve(ev); };
87
- const timer = setTimeout(() => { kill("SIGTERM", "Pi RPC timeout"); finish(new Error("Pi RPC timeout")); }, 600_000);
88
- failPendingPrompt = () => finish(new Error(outcome.diagnostics.firstFailure?.reason ?? "Pi exited before RPC prompt response"));
89
- callbacks.set(id, ev => finish(null, ev));
90
- child.stdin.write(JSON.stringify({ id, type: "prompt", message }) + "\n");
91
- });
92
- if (!reply.success) { diagnostic.failure(`Pi prompt failed: ${reply.error ?? "unknown"}`); throw new Error("Pi prompt failed"); }
93
- if (turns <= prior) await new Promise((resolve, reject) => {
94
- const timer = setTimeout(() => { waiters.delete(wake); kill("SIGTERM", "Pi agent_end timeout"); reject(new Error("Pi agent_end timeout")); }, 600_000);
95
- const wake = () => { if (turns <= prior && !ended) return; clearTimeout(timer); waiters.delete(wake); ended && turns <= prior ? reject(new Error(outcome.diagnostics.firstFailure?.reason ?? "Pi exited before agent_end")) : resolve(); };
96
- waiters.add(wake); wake();
97
- });
98
- if (outcome.diagnostics.firstFailure) throw new Error(outcome.diagnostics.firstFailure.reason);
99
- };
100
- const template = reviewReturnTemplate({ planReturnPath: fixture.plan.returnPath, before: fixture.before, after: fixture.after,
101
- afterDiff: fixture.afterDiff, acceptancePath: fixture.acceptancePath, checkPath: fixture.checkPath,
102
- check: fixture.check, exitCode: fixture.exitCode, inspectedRevision: fixture.inspectedRevision });
103
- await prompt(`Independent synthetic reviewer-contract continuation, not a replay of original process. Dispatch EXACTLY ONE native code-reviewer, pinned openai-codex/gpt-6-luna, backend native, scope ["README-SYNTH.md"], artifacts [] (EMPTY: the cited files are read-only paths in the task, NOT dispatch input artifacts), review_reason "human authorized independent reviewer-only continuation". No planner, builder, helpers or further children. Reviewer must read these ORIGINAL actual absolute evidence inputs: planner return ${fixture.plan.returnPath}, actual plan ${join(fixture.plan.returnPath, "../../plans/synthetic-readme-fix.md")}, README ${join(from, "worktree/README-SYNTH.md")}, before ${fixture.before}, after ${fixture.after}, original baseline diff ${fixture.result.baseline.diff}, before/after diff ${fixture.afterDiff}, baseline status ${fixture.result.baseline.statusPath}, original recorded fixture hashes ${fixture.result.baseline.manifest}, baseline bytes ${fixture.result.baseline.filesPath}, after status ${fixture.result.after.statusPath}, after-review status ${fixture.result.afterReview.statusPath}. Scope accounting: the preflight independently checks both complete recorded status files and refuses any entry outside the changed README or untracked artifacts under the EXACT original Hub session .pi/agent-sessions/sessions/${fixture.plan.resultPath.split('/dispatches/')[0].split('/').at(-1)}/; those session artifacts are generated evidence, not declared README source edits. Verify this distinction yourself from the status paths, baseline manifest and artifact paths; REJECT if any unrelated source edit or foreign-session entry exists. Builder acceptance ${fixture.acceptancePath}, builder check ${fixture.checkPath}, builder result ${fixture.build.resultPath}, original reviewer return ${fixture.review.returnPath}, original reviewer acceptance ${fixture.review.acceptancePath}. Examine plan, exact change and README scope, diff, builder A1/AF-MIN-CHANGE check and revision/readback. Earlier reviewer returns conflict: one abbreviated A1; another rejected by comparing the BEFORE SHA-256 to the digest required for the AFTER bytes. Read the synthetic-only adjudication note at ${join(root, ".pi/agent-sessions/sessions/52b6c78b-3f03-4417-9493-bb877381f8bb/artifacts/c2-reviewer-hash-adjudication.md")} as a contested finding, not proof: independently read the cited BEFORE and AFTER bytes and declared command, verify whether the exact one-token replacement yields the declared AFTER digest, and REJECT if it does not or other evidence is insufficient. Do not reuse either prior verdict as authority. Do NOT execute or propose repeating the verification command: readonly review of recorded execution. Start final reviewer return with canonical first-line VERDICT: APPROVE or VERDICT: REJECT; reject freely if unsupported. Structured keys changed_files, assertions_proven, assertions_unproven, assertions_failed, tests_run, open_risks, requires_user_decision. The reviewer return must place exactly one A1 bullet DIRECTLY UNDER assertions_proven: as '- A1: <your independently verified finding> — evidence: <six JSON-quoted source paths; declared command JSON-quoted; exit code; inspected revision JSON-quoted; your observation>'. Do not put A1 in bracket shorthand 'assertions_proven: [A1 — ...]' or put '- A1 — evidence:' after the structured keys: those are not parsed A1 evidence and will be rejected. The command must be cited, NOT run. Choose VERDICT: REJECT and assertions_unproven if the sources do not support approval. Following is an INSTRUCTIONAL TEMPLATE, NOT evidence; do not copy unverified findings, and never auto-fill missing evidence.\n${template}\nNo new reviewer file is expected from you: Hub retains actual return. Report what you observed, do not assert this changes original process state.`);
104
- fixture.verify();
105
- const sessions = join(workspace, ".pi/agent-sessions/sessions");
106
- const ids = existsSync(sessions) ? readdirSync(sessions) : [];
107
- if (ids.length !== 1) throw new Error(`expected one fresh session; found ${ids.length}`);
108
- const base = join(sessions, ids[0]), dispatches = join(base, "dispatches");
109
- const started = existsSync(dispatches) ? readdirSync(dispatches).filter(id => existsSync(join(dispatches, id, "request.json"))) : [];
110
- if (started.length !== 1) throw new Error(`only one reviewer may start; observed ${started.length} dispatches`);
111
- const id = started[0], request = JSON.parse(readFileSync(join(dispatches, id, "request.json"), "utf8"));
112
- if (request.agent !== "code-reviewer" || request.backendRequested !== "native" ||
113
- JSON.stringify(request.scope) !== '["README-SYNTH.md"]') throw new Error("non-reviewer/native/scope child started");
114
- const result = JSON.parse(readFileSync(join(dispatches, id, "result.json"), "utf8"));
115
- const acceptancePath = join(base, "artifacts/evidence", `code-reviewer-acceptance-${id}.md`);
116
- const returnPath = join(base, "artifacts/returns", `code-reviewer-${id}.md`);
117
- const acceptance = JSON.parse(readFileSync(acceptancePath, "utf8"));
118
- const identities = readFileSync(join(dispatches, id, "session.json"), "utf8").split("\n").filter(Boolean).map(line => JSON.parse(line))
119
- .filter(row => row.type === "message" && row.message?.role === "assistant").map(row => `${row.message.provider}/${row.message.model}`);
120
- if (result.exitCode !== 0 || !(result.billed > 0) || result.diagnostics?.modelFallback !== null ||
121
- !identities.length || identities.some(identity => identity !== "openai-codex/gpt-6-luna") ||
122
- !models.length || models.some(m => `${m.provider}/${m.model}` !== "openai-codex/gpt-6-luna") ||
123
- result.evidencePath !== join(dispatches, id, "result.json") ||
124
- !existsSync(returnPath) || result.toolEvents?.some(e => !["read", "grep", "find", "ls"].includes(e.toolName)))
125
- throw new Error("reviewer execution/model/readonly evidence not proven");
126
- const unmet = independentReviewUnmet(fixture, result.output, acceptance.structuredReturn);
127
- outcome.reviewer = { id, resultPath: result.evidencePath, acceptancePath, returnPath, billed: result.billed, identities, parentModels: models,
128
- verdict: result.output.split(/\r?\n/, 1)[0], contractUnmet: unmet };
129
- outcome.independentReviewerContractAccepted = unmet.length === 0;
130
- if (unmet.length) throw new Error(`independent reviewer closure unmet: ${unmet.join("; ")}; new output: ${outputPath}`);
131
- } catch (e) { diagnostic.failure(String(e.message ?? e)); outcome.error = outcome.diagnostics.firstFailure.reason; process.exitCode = 1; }
132
- finally {
133
- if (child) {
134
- child.stdin.end();
135
- await new Promise(resolve => {
136
- if (outcome.shutdown) return resolve();
137
- const done = () => { clearTimeout(grace); clearTimeout(bound); resolve(); };
138
- child.once("close", done);
139
- const grace = setTimeout(() => { killShutdown("SIGTERM", "shutdown grace elapsed"); }, 2000);
140
- const bound = setTimeout(() => { killShutdown("SIGKILL", "shutdown bound elapsed"); resolve(); }, 8000);
141
- function killShutdown(signal, reason) { diagnostic.kill(reason, signal, () => {
142
- try { process.kill(-child.pid, signal); } catch { /* already closed */ }
143
- }); }
144
- });
145
- }
146
- if (child && (outcome.shutdown?.code !== 0 || outcome.shutdown?.signal)) {
147
- diagnostic.failure(`fresh Pi session did not exit cleanly: ${JSON.stringify(outcome.shutdown)}`);
148
- outcome.error = outcome.diagnostics.firstFailure.reason;
149
- outcome.independentReviewerContractAccepted = false; process.exitCode = 1;
150
- }
151
- try { fixture.verify(); } catch (e) { diagnostic.failure(`original evidence changed: ${e.message}`); outcome.error = outcome.diagnostics.firstFailure.reason; outcome.independentReviewerContractAccepted = false; process.exitCode = 1; }
152
- diagnostic.flushStderr();
153
- save();
154
- console.log(JSON.stringify({ originalProcessComplete: outcome.originalProcessComplete, independentReviewerContractAccepted: outcome.independentReviewerContractAccepted,
155
- output: outputPath, error: outcome.error, reviewer: outcome.reviewer }));
156
- }
157
- }