@chankov/agent-fleet 2.1.2 → 2.2.0

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 (861) hide show
  1. package/.pi/agent-fleet/hooks/coms-stop-hook.mjs +53 -13
  2. package/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/README.md +223 -0
  3. package/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile-0.167.json +5627 -0
  4. package/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +4 -0
  5. package/.pi/agent-fleet/scripts/fleet.ts +13 -17
  6. package/.pi/agent-fleet/scripts/flow.ts +2 -2
  7. package/.pi/agent-fleet/scripts/lib/codex-bootstrap-files.ts +46 -0
  8. package/.pi/agent-fleet/scripts/lib/codex-bootstrap-probe.ts +44 -0
  9. package/.pi/agent-fleet/scripts/lib/codex-bootstrap-producer.ts +131 -0
  10. package/.pi/agent-fleet/scripts/lib/codex-daemon-observer.ts +137 -0
  11. package/.pi/agent-fleet/scripts/lib/codex-desktop-discovery.ts +84 -0
  12. package/.pi/agent-fleet/scripts/lib/codex-desktop-preflight.ts +130 -0
  13. package/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +20 -13
  14. package/.pi/agent-fleet/scripts/lib/codex-measurement.ts +218 -0
  15. package/.pi/agent-fleet/scripts/lib/codex-native-presence.ts +61 -0
  16. package/.pi/agent-fleet/scripts/lib/codex-probe-transcript.ts +135 -0
  17. package/.pi/agent-fleet/scripts/lib/codex-send-lineage.ts +72 -0
  18. package/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +23 -13
  19. package/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +100 -14
  20. package/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +1 -1
  21. package/.pi/agent-fleet/scripts/lib/fleet-codex-bootstrap.ts +204 -0
  22. package/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +9 -3
  23. package/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +32 -16
  24. package/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +41 -21
  25. package/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +21 -0
  26. package/.pi/agent-fleet/scripts/lib/fleet-command.ts +4 -8
  27. package/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +2 -1
  28. package/.pi/agent-fleet/scripts/lib/team-project.ts +0 -2
  29. package/.pi/agent-fleet/scripts/team-up.ts +5 -12
  30. package/.pi/agent-fleet/scripts/workflows/lib/git.ts +9 -0
  31. package/.pi/agent-fleet/scripts/workflows/lib/quality.ts +17 -4
  32. package/.pi/agents/model-profiles.yaml +0 -2
  33. package/.pi/harnesses/agent-hub/README.md +116 -67
  34. package/.pi/harnesses/agent-hub/capability-packs.ts +7 -4
  35. package/.pi/harnesses/agent-hub/codex-bootstrap.ts +117 -0
  36. package/.pi/harnesses/agent-hub/commands/context.ts +0 -4
  37. package/.pi/harnesses/agent-hub/commands/recover.ts +2 -1
  38. package/.pi/harnesses/agent-hub/config/agents.ts +3 -1
  39. package/.pi/harnesses/agent-hub/config/model-profiles.ts +3 -0
  40. package/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +14 -1
  41. package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +17 -0
  42. package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +3 -1
  43. package/.pi/harnesses/agent-hub/dispatch-native-types.ts +4 -0
  44. package/.pi/harnesses/agent-hub/dispatch-native.ts +9 -3
  45. package/.pi/harnesses/agent-hub/drift-watchdog.js +5 -10
  46. package/.pi/harnesses/agent-hub/execution-trace.ts +1 -1
  47. package/.pi/harnesses/agent-hub/filesystem-tool.ts +1 -1
  48. package/.pi/harnesses/agent-hub/footer.ts +2 -3
  49. package/.pi/harnesses/agent-hub/helpers.ts +4 -5
  50. package/.pi/harnesses/agent-hub/history-projection.ts +1 -1
  51. package/.pi/harnesses/agent-hub/index.ts +213 -196
  52. package/.pi/harnesses/agent-hub/input/shortcuts.ts +0 -7
  53. package/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +0 -2
  54. package/.pi/harnesses/agent-hub/no-progress.ts +14 -9
  55. package/.pi/harnesses/agent-hub/operator-current-state.ts +5 -1
  56. package/.pi/harnesses/agent-hub/package.json +1 -1
  57. package/.pi/harnesses/agent-hub/policy/roster.ts +12 -3
  58. package/.pi/harnesses/agent-hub/policy/work-mode.ts +10 -49
  59. package/.pi/harnesses/agent-hub/poll-command.ts +12 -4
  60. package/.pi/harnesses/agent-hub/proactive-snapshot.ts +12 -4
  61. package/.pi/harnesses/agent-hub/process-obligations.ts +42 -9
  62. package/.pi/harnesses/agent-hub/prompts/context.ts +17 -0
  63. package/.pi/harnesses/agent-hub/prompts/fragments.ts +9 -1
  64. package/.pi/harnesses/agent-hub/prompts/session-start.ts +2 -3
  65. package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +25 -8
  66. package/.pi/harnesses/agent-hub/provider-semaphore.js +5 -0
  67. package/.pi/harnesses/agent-hub/review-continuity.ts +5 -2
  68. package/.pi/harnesses/agent-hub/review-reuse.ts +2 -1
  69. package/.pi/harnesses/agent-hub/run-budget.js +22 -2
  70. package/.pi/harnesses/agent-hub/scope-gate.js +38 -0
  71. package/.pi/harnesses/agent-hub/scope-overlap.ts +46 -0
  72. package/.pi/harnesses/agent-hub/task-brief.ts +98 -0
  73. package/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +4 -0
  74. package/.pi/harnesses/agent-hub/tool-catalog-state.ts +5 -3
  75. package/.pi/harnesses/agent-hub/tools/action-executors.ts +5 -7
  76. package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
  77. package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +2 -1
  78. package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +184 -33
  79. package/.pi/harnesses/agent-hub/tools/poll-panel-core.ts +30 -0
  80. package/.pi/harnesses/agent-hub/tools/poll-panel.ts +33 -0
  81. package/.pi/harnesses/agent-hub/tools/run-flow.ts +41 -10
  82. package/.pi/harnesses/agent-hub/tools/team-adjust.ts +1 -1
  83. package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +12 -2
  84. package/.pi/harnesses/agent-hub/work-mode.ts +44 -49
  85. package/.pi/harnesses/agent-hub/write-isolation.ts +53 -8
  86. package/.pi/harnesses/coms/package.json +1 -1
  87. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  88. package/.pi/harnesses/lib/codex-compat.ts +97 -0
  89. package/.pi/harnesses/lib/codex-contract.ts +259 -0
  90. package/.pi/harnesses/lib/codex-notification-profile.ts +75 -0
  91. package/.pi/harnesses/lib/coms-core.ts +8 -4
  92. package/.pi/harnesses/lib/context-budget-child-prompt.ts +1 -1
  93. package/.pi/harnesses/lib/context-budget-hub-prompt.ts +6 -3
  94. package/.pi/harnesses/lib/fleet-bootstrap-channel.ts +148 -0
  95. package/.pi/harnesses/lib/fleet-codex-catalog.ts +30 -0
  96. package/.pi/harnesses/lib/fleet-codex-chat-view.ts +43 -0
  97. package/.pi/harnesses/lib/fleet-codex-namespace.ts +2 -0
  98. package/.pi/harnesses/lib/fleet-codex-policy-snapshot.ts +10 -0
  99. package/.pi/harnesses/lib/fleet-connection-control.ts +20 -3
  100. package/.pi/harnesses/lib/fleet-notification-admission.ts +32 -0
  101. package/.pi/harnesses/lib/fleet-notification-bootstrap.ts +152 -0
  102. package/.pi/harnesses/lib/fleet-notification-validation.ts +80 -25
  103. package/.pi/harnesses/lib/fleet-target-identity.ts +9 -0
  104. package/.versions/2.2.0/.pi/agent-fleet/hermes/README.md +347 -0
  105. package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  106. package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  107. package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  108. package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  109. package/.versions/2.2.0/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  110. package/.versions/2.2.0/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  111. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  112. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  113. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  114. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  115. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  116. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  117. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  118. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  119. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  120. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  121. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  122. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  123. package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  124. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  125. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  126. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  127. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  128. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  129. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  130. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  131. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  132. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  133. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  134. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  135. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  136. package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  137. package/.versions/2.2.0/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  138. package/.versions/2.2.0/.pi/agent-fleet/hooks/coms-stop-hook.mjs +124 -0
  139. package/.versions/2.2.0/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  140. package/.versions/2.2.0/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
  141. package/.versions/2.2.0/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
  142. package/.versions/2.2.0/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
  143. package/.versions/2.2.0/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
  144. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/0.167-shared.json +1900 -0
  145. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/README.md +223 -0
  146. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/assessment.md +83 -0
  147. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile-0.167.json +5627 -0
  148. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile.md +43 -0
  149. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap.md +45 -0
  150. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture-profile.ts +53 -0
  151. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture.ts +102 -0
  152. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/catalog.md +91 -0
  153. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/channel.md +21 -0
  154. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurement.md +133 -0
  155. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurements.json +74 -0
  156. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/notification-profile-0.167.json +2679 -0
  157. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/observer.md +101 -0
  158. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/opaque-response.md +57 -0
  159. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/open-sent.md +68 -0
  160. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/probe-reader.md +51 -0
  161. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/profile.md +71 -0
  162. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/projection.md +147 -0
  163. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/reconnect.md +40 -0
  164. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/response-unions.md +74 -0
  165. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/semver.md +124 -0
  166. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/surface.md +73 -0
  167. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/fleet-codex-allowlist-store-child.ts +31 -0
  168. package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/response-fixture.ts +23 -0
  169. package/.versions/2.2.0/.pi/agent-fleet/scripts/fleet-codex-local-mcp.mjs +26 -0
  170. package/.versions/2.2.0/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +63 -0
  171. package/.versions/2.2.0/.pi/agent-fleet/scripts/fleet.ts +244 -0
  172. package/.versions/2.2.0/.pi/agent-fleet/scripts/flow.ts +166 -0
  173. package/.versions/2.2.0/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  174. package/.versions/2.2.0/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  175. package/.versions/2.2.0/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  176. package/.versions/2.2.0/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  177. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
  178. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-bootstrap-files.ts +46 -0
  179. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-bootstrap-probe.ts +44 -0
  180. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-bootstrap-producer.ts +131 -0
  181. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-daemon-observer.ts +137 -0
  182. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-desktop-discovery.ts +84 -0
  183. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-desktop-preflight.ts +130 -0
  184. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +113 -0
  185. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-measurement.ts +218 -0
  186. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-native-presence.ts +61 -0
  187. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-probe-transcript.ts +135 -0
  188. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-send-lineage.ts +72 -0
  189. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +101 -0
  190. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  191. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  192. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +453 -0
  193. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist.ts +175 -0
  194. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +73 -0
  195. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +74 -0
  196. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-bootstrap.ts +204 -0
  197. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +76 -0
  198. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +58 -0
  199. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +132 -0
  200. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +428 -0
  201. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-transport.ts +160 -0
  202. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +175 -0
  203. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +435 -0
  204. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-native-history.ts +215 -0
  205. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-observation-store.ts +208 -0
  206. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-observe-transport.ts +49 -0
  207. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-observe.ts +93 -0
  208. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-overview.ts +52 -0
  209. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +44 -0
  210. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +83 -0
  211. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +213 -0
  212. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-relay-latency.ts +45 -0
  213. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-response-read.ts +26 -0
  214. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-response-transport.ts +38 -0
  215. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-resync.ts +212 -0
  216. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-command.ts +264 -0
  217. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
  218. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +239 -0
  219. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  220. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  221. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  222. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  223. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  224. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  225. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  226. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  227. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  228. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  229. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
  230. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  231. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  232. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
  233. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  234. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
  235. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  236. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/team-project.ts +176 -0
  237. package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
  238. package/.versions/2.2.0/.pi/agent-fleet/scripts/package-lock.json +57 -0
  239. package/.versions/2.2.0/.pi/agent-fleet/scripts/package.json +10 -0
  240. package/.versions/2.2.0/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  241. package/.versions/2.2.0/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
  242. package/.versions/2.2.0/.pi/agent-fleet/scripts/pi-session.ts +9 -0
  243. package/.versions/2.2.0/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
  244. package/.versions/2.2.0/.pi/agent-fleet/scripts/team-up.ts +378 -0
  245. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
  246. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  247. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  248. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
  249. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  250. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  251. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/git.ts +108 -0
  252. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
  253. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  254. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  255. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  256. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
  257. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  258. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  259. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
  260. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/quality.ts +78 -0
  261. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
  262. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  263. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
  264. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  265. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
  266. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
  267. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  268. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  269. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  270. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  271. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  272. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  273. package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  274. package/.versions/2.2.0/.pi/agents/dispatch-policy.yaml +32 -0
  275. package/.versions/2.2.0/.pi/agents/model-profiles.yaml +132 -0
  276. package/.versions/2.2.0/.pi/agents/peers.yaml +147 -0
  277. package/.versions/2.2.0/.pi/agents/teams.yaml +41 -0
  278. package/.versions/2.2.0/.pi/agents/voices.yaml +13 -0
  279. package/.versions/2.2.0/.pi/damage-control-rules.yaml +297 -0
  280. package/.versions/2.2.0/.pi/extensions/btw/README.md +120 -0
  281. package/.versions/2.2.0/.pi/extensions/btw/index.ts +916 -0
  282. package/.versions/2.2.0/.pi/extensions/btw/package.json +6 -0
  283. package/.versions/2.2.0/.pi/extensions/btw/state.js +179 -0
  284. package/.versions/2.2.0/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  285. package/.versions/2.2.0/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  286. package/.versions/2.2.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  287. package/.versions/2.2.0/.pi/extensions/compact-and-continue/README.md +42 -0
  288. package/.versions/2.2.0/.pi/extensions/compact-and-continue/index.ts +136 -0
  289. package/.versions/2.2.0/.pi/extensions/compact-and-continue/package.json +6 -0
  290. package/.versions/2.2.0/.pi/extensions/mcp-bridge/README.md +46 -0
  291. package/.versions/2.2.0/.pi/extensions/mcp-bridge/index.ts +206 -0
  292. package/.versions/2.2.0/.pi/extensions/mcp-bridge/package.json +6 -0
  293. package/.versions/2.2.0/.pi/extensions/package-lock.json +1175 -0
  294. package/.versions/2.2.0/.pi/extensions/package.json +9 -0
  295. package/.versions/2.2.0/.pi/extensions/pi-voice-stt/README.md +224 -0
  296. package/.versions/2.2.0/.pi/extensions/pi-voice-stt/config.ts +199 -0
  297. package/.versions/2.2.0/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  298. package/.versions/2.2.0/.pi/extensions/pi-voice-stt/index.ts +248 -0
  299. package/.versions/2.2.0/.pi/extensions/pi-voice-stt/package.json +6 -0
  300. package/.versions/2.2.0/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  301. package/.versions/2.2.0/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  302. package/.versions/2.2.0/.pi/harnesses/agent-hub/README.md +1633 -0
  303. package/.versions/2.2.0/.pi/harnesses/agent-hub/acceptance.ts +204 -0
  304. package/.versions/2.2.0/.pi/harnesses/agent-hub/access-approval.ts +266 -0
  305. package/.versions/2.2.0/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
  306. package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
  307. package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
  308. package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
  309. package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
  310. package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
  311. package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
  312. package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
  313. package/.versions/2.2.0/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
  314. package/.versions/2.2.0/.pi/harnesses/agent-hub/artifacts.js +146 -0
  315. package/.versions/2.2.0/.pi/harnesses/agent-hub/assertion-ledger.js +68 -0
  316. package/.versions/2.2.0/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
  317. package/.versions/2.2.0/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  318. package/.versions/2.2.0/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  319. package/.versions/2.2.0/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
  320. package/.versions/2.2.0/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  321. package/.versions/2.2.0/.pi/harnesses/agent-hub/capability-packs.ts +187 -0
  322. package/.versions/2.2.0/.pi/harnesses/agent-hub/codex-bootstrap.ts +117 -0
  323. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  324. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  325. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  326. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  327. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  328. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  329. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  330. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  331. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  332. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  333. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  334. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  335. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  336. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  337. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/config.ts +9 -0
  338. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  339. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/context.ts +43 -0
  340. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  341. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  342. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  343. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  344. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  345. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  346. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/recover.ts +62 -0
  347. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  348. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  349. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  350. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  351. package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  352. package/.versions/2.2.0/.pi/harnesses/agent-hub/config/agents.ts +183 -0
  353. package/.versions/2.2.0/.pi/harnesses/agent-hub/config/model-profiles.ts +240 -0
  354. package/.versions/2.2.0/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
  355. package/.versions/2.2.0/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  356. package/.versions/2.2.0/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +234 -0
  357. package/.versions/2.2.0/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
  358. package/.versions/2.2.0/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  359. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  360. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
  361. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
  362. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
  363. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
  364. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
  365. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
  366. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
  367. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-compat.ts +45 -0
  368. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
  369. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
  370. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
  371. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
  372. package/.versions/2.2.0/.pi/harnesses/agent-hub/context-window.js +108 -0
  373. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-approval.ts +83 -0
  374. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
  375. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
  376. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
  377. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-hub.ts +263 -0
  378. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
  379. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
  380. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
  381. package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
  382. package/.versions/2.2.0/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  383. package/.versions/2.2.0/.pi/harnesses/agent-hub/delegate.ts +478 -0
  384. package/.versions/2.2.0/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
  385. package/.versions/2.2.0/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  386. package/.versions/2.2.0/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  387. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
  388. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  389. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-complete.ts +176 -0
  390. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +318 -0
  391. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +264 -0
  392. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-types.ts +297 -0
  393. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native.ts +242 -0
  394. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  395. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
  396. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
  397. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  398. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  399. package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  400. package/.versions/2.2.0/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  401. package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  402. package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  403. package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  404. package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  405. package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-watchdog.js +344 -0
  406. package/.versions/2.2.0/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  407. package/.versions/2.2.0/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  408. package/.versions/2.2.0/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
  409. package/.versions/2.2.0/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
  410. package/.versions/2.2.0/.pi/harnesses/agent-hub/external-blocker.js +92 -0
  411. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
  412. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
  413. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
  414. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
  415. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
  416. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
  417. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
  418. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
  419. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
  420. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
  421. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
  422. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
  423. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
  424. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
  425. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
  426. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
  427. package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
  428. package/.versions/2.2.0/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
  429. package/.versions/2.2.0/.pi/harnesses/agent-hub/fixtures/registration-surface.json +68 -0
  430. package/.versions/2.2.0/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  431. package/.versions/2.2.0/.pi/harnesses/agent-hub/footer.ts +29 -0
  432. package/.versions/2.2.0/.pi/harnesses/agent-hub/helpers.ts +269 -0
  433. package/.versions/2.2.0/.pi/harnesses/agent-hub/history-projection.ts +116 -0
  434. package/.versions/2.2.0/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
  435. package/.versions/2.2.0/.pi/harnesses/agent-hub/index.ts +2722 -0
  436. package/.versions/2.2.0/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  437. package/.versions/2.2.0/.pi/harnesses/agent-hub/input/shortcuts.ts +16 -0
  438. package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
  439. package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  440. package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  441. package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
  442. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  443. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  444. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  445. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  446. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  447. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  448. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  449. package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  450. package/.versions/2.2.0/.pi/harnesses/agent-hub/no-progress.ts +627 -0
  451. package/.versions/2.2.0/.pi/harnesses/agent-hub/operator-current-state.ts +57 -0
  452. package/.versions/2.2.0/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
  453. package/.versions/2.2.0/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
  454. package/.versions/2.2.0/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  455. package/.versions/2.2.0/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
  456. package/.versions/2.2.0/.pi/harnesses/agent-hub/package.json +7 -0
  457. package/.versions/2.2.0/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  458. package/.versions/2.2.0/.pi/harnesses/agent-hub/permission-channel.ts +87 -0
  459. package/.versions/2.2.0/.pi/harnesses/agent-hub/permission-relay.ts +84 -0
  460. package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  461. package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  462. package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  463. package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/roster.ts +103 -0
  464. package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/work-mode.ts +103 -0
  465. package/.versions/2.2.0/.pi/harnesses/agent-hub/poll-command.ts +184 -0
  466. package/.versions/2.2.0/.pi/harnesses/agent-hub/presentation.ts +54 -0
  467. package/.versions/2.2.0/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
  468. package/.versions/2.2.0/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
  469. package/.versions/2.2.0/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
  470. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
  471. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  472. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
  473. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
  474. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  475. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  476. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
  477. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
  478. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
  479. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
  480. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  481. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  482. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-snapshot.ts +287 -0
  483. package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
  484. package/.versions/2.2.0/.pi/harnesses/agent-hub/process-obligations.ts +210 -0
  485. package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/context.ts +72 -0
  486. package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/fragments.ts +94 -0
  487. package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/session-start.ts +89 -0
  488. package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/system-prompt.ts +142 -0
  489. package/.versions/2.2.0/.pi/harnesses/agent-hub/provider-semaphore.js +143 -0
  490. package/.versions/2.2.0/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  491. package/.versions/2.2.0/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  492. package/.versions/2.2.0/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  493. package/.versions/2.2.0/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
  494. package/.versions/2.2.0/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  495. package/.versions/2.2.0/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  496. package/.versions/2.2.0/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
  497. package/.versions/2.2.0/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
  498. package/.versions/2.2.0/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  499. package/.versions/2.2.0/.pi/harnesses/agent-hub/return-contract.js +371 -0
  500. package/.versions/2.2.0/.pi/harnesses/agent-hub/return-extract.js +77 -0
  501. package/.versions/2.2.0/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  502. package/.versions/2.2.0/.pi/harnesses/agent-hub/review-continuity.ts +76 -0
  503. package/.versions/2.2.0/.pi/harnesses/agent-hub/review-findings.js +96 -0
  504. package/.versions/2.2.0/.pi/harnesses/agent-hub/review-reuse.ts +48 -0
  505. package/.versions/2.2.0/.pi/harnesses/agent-hub/review-verdict.ts +6 -0
  506. package/.versions/2.2.0/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  507. package/.versions/2.2.0/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  508. package/.versions/2.2.0/.pi/harnesses/agent-hub/run-budget.js +362 -0
  509. package/.versions/2.2.0/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  510. package/.versions/2.2.0/.pi/harnesses/agent-hub/runtime-receipts.ts +63 -0
  511. package/.versions/2.2.0/.pi/harnesses/agent-hub/runtime-test-check.ts +85 -0
  512. package/.versions/2.2.0/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
  513. package/.versions/2.2.0/.pi/harnesses/agent-hub/scope-gate.js +271 -0
  514. package/.versions/2.2.0/.pi/harnesses/agent-hub/scope-overlap.ts +46 -0
  515. package/.versions/2.2.0/.pi/harnesses/agent-hub/session-audit.ts +331 -0
  516. package/.versions/2.2.0/.pi/harnesses/agent-hub/session-health.js +110 -0
  517. package/.versions/2.2.0/.pi/harnesses/agent-hub/session-start.ts +42 -0
  518. package/.versions/2.2.0/.pi/harnesses/agent-hub/spawn.ts +702 -0
  519. package/.versions/2.2.0/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
  520. package/.versions/2.2.0/.pi/harnesses/agent-hub/specialist-result.ts +78 -0
  521. package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  522. package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-communication-store.ts +225 -0
  523. package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  524. package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
  525. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-brief.ts +98 -0
  526. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
  527. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-resume-contract.ts +80 -0
  528. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-authorization.ts +170 -0
  529. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
  530. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
  531. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  532. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
  533. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  534. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  535. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  536. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  537. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
  538. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  539. package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  540. package/.versions/2.2.0/.pi/harnesses/agent-hub/timeline.ts +72 -0
  541. package/.versions/2.2.0/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +83 -0
  542. package/.versions/2.2.0/.pi/harnesses/agent-hub/tool-catalog-state.ts +125 -0
  543. package/.versions/2.2.0/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  544. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/action-executors.ts +214 -0
  545. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
  546. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
  547. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  548. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/context.ts +149 -0
  549. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +93 -0
  550. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +928 -0
  551. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  552. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  553. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
  554. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
  555. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/poll-panel-core.ts +30 -0
  556. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/poll-panel.ts +33 -0
  557. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/run-flow.ts +177 -0
  558. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  559. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
  560. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  561. package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/verification-contract.ts +81 -0
  562. package/.versions/2.2.0/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  563. package/.versions/2.2.0/.pi/harnesses/agent-hub/types.ts +66 -0
  564. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  565. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
  566. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  567. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  568. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +173 -0
  569. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  570. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  571. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  572. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  573. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  574. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  575. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  576. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  577. package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  578. package/.versions/2.2.0/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  579. package/.versions/2.2.0/.pi/harnesses/agent-hub/version.ts +42 -0
  580. package/.versions/2.2.0/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  581. package/.versions/2.2.0/.pi/harnesses/agent-hub/work-mode.ts +183 -0
  582. package/.versions/2.2.0/.pi/harnesses/agent-hub/write-isolation.ts +232 -0
  583. package/.versions/2.2.0/.pi/harnesses/ask-user-remote/README.md +59 -0
  584. package/.versions/2.2.0/.pi/harnesses/ask-user-remote/index.ts +571 -0
  585. package/.versions/2.2.0/.pi/harnesses/ask-user-remote/questions.ts +206 -0
  586. package/.versions/2.2.0/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  587. package/.versions/2.2.0/.pi/harnesses/ask-user-remote/runtime-ask.ts +90 -0
  588. package/.versions/2.2.0/.pi/harnesses/coms/README.md +105 -0
  589. package/.versions/2.2.0/.pi/harnesses/coms/index.ts +308 -0
  590. package/.versions/2.2.0/.pi/harnesses/coms/package.json +7 -0
  591. package/.versions/2.2.0/.pi/harnesses/coms/version.ts +42 -0
  592. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/README.md +161 -0
  593. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/index.ts +659 -0
  594. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/package.json +7 -0
  595. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
  596. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
  597. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
  598. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
  599. package/.versions/2.2.0/.pi/harnesses/damage-control-continue/version.ts +42 -0
  600. package/.versions/2.2.0/.pi/harnesses/lib/approval-wait.ts +17 -0
  601. package/.versions/2.2.0/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
  602. package/.versions/2.2.0/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  603. package/.versions/2.2.0/.pi/harnesses/lib/clarification-policy.ts +9 -0
  604. package/.versions/2.2.0/.pi/harnesses/lib/codex-compat.ts +97 -0
  605. package/.versions/2.2.0/.pi/harnesses/lib/codex-contract.ts +259 -0
  606. package/.versions/2.2.0/.pi/harnesses/lib/codex-notification-profile.ts +75 -0
  607. package/.versions/2.2.0/.pi/harnesses/lib/coms-core-io.ts +422 -0
  608. package/.versions/2.2.0/.pi/harnesses/lib/coms-core.ts +738 -0
  609. package/.versions/2.2.0/.pi/harnesses/lib/coms-instruction-receipts.ts +113 -0
  610. package/.versions/2.2.0/.pi/harnesses/lib/coms-observation.ts +74 -0
  611. package/.versions/2.2.0/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
  612. package/.versions/2.2.0/.pi/harnesses/lib/coms-response-read.ts +107 -0
  613. package/.versions/2.2.0/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
  614. package/.versions/2.2.0/.pi/harnesses/lib/context-budget-hub-prompt.ts +124 -0
  615. package/.versions/2.2.0/.pi/harnesses/lib/context-budget-view.ts +112 -0
  616. package/.versions/2.2.0/.pi/harnesses/lib/context-budget.ts +114 -0
  617. package/.versions/2.2.0/.pi/harnesses/lib/context-compaction-policy.js +35 -0
  618. package/.versions/2.2.0/.pi/harnesses/lib/damage-action-hash.ts +28 -0
  619. package/.versions/2.2.0/.pi/harnesses/lib/damage-auto-policy.ts +52 -0
  620. package/.versions/2.2.0/.pi/harnesses/lib/damage-control-presentation.ts +14 -0
  621. package/.versions/2.2.0/.pi/harnesses/lib/damage-control-shared.ts +276 -0
  622. package/.versions/2.2.0/.pi/harnesses/lib/damage-guard-port.ts +25 -0
  623. package/.versions/2.2.0/.pi/harnesses/lib/damage-policy.ts +35 -0
  624. package/.versions/2.2.0/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
  625. package/.versions/2.2.0/.pi/harnesses/lib/damage-result-view.ts +16 -0
  626. package/.versions/2.2.0/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
  627. package/.versions/2.2.0/.pi/harnesses/lib/exact-permission-port.ts +38 -0
  628. package/.versions/2.2.0/.pi/harnesses/lib/execution-trace.ts +45 -0
  629. package/.versions/2.2.0/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  630. package/.versions/2.2.0/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  631. package/.versions/2.2.0/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  632. package/.versions/2.2.0/.pi/harnesses/lib/fleet-bootstrap-channel.ts +148 -0
  633. package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-catalog.ts +30 -0
  634. package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-chat-view.ts +43 -0
  635. package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-event-bridge.ts +82 -0
  636. package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-namespace.ts +2 -0
  637. package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-policy-snapshot.ts +10 -0
  638. package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/cli-bridge.ts +111 -0
  639. package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/mutations.ts +201 -0
  640. package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/snapshot.ts +417 -0
  641. package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/transition.ts +68 -0
  642. package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/ui.ts +269 -0
  643. package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/view.ts +338 -0
  644. package/.versions/2.2.0/.pi/harnesses/lib/fleet-connection-control.ts +94 -0
  645. package/.versions/2.2.0/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  646. package/.versions/2.2.0/.pi/harnesses/lib/fleet-dashboard-view.ts +174 -0
  647. package/.versions/2.2.0/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  648. package/.versions/2.2.0/.pi/harnesses/lib/fleet-event-source.ts +21 -0
  649. package/.versions/2.2.0/.pi/harnesses/lib/fleet-notification-admission.ts +32 -0
  650. package/.versions/2.2.0/.pi/harnesses/lib/fleet-notification-bootstrap.ts +152 -0
  651. package/.versions/2.2.0/.pi/harnesses/lib/fleet-notification-validation.ts +122 -0
  652. package/.versions/2.2.0/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  653. package/.versions/2.2.0/.pi/harnesses/lib/fleet-panel.ts +34 -0
  654. package/.versions/2.2.0/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
  655. package/.versions/2.2.0/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  656. package/.versions/2.2.0/.pi/harnesses/lib/fleet-selection.ts +24 -0
  657. package/.versions/2.2.0/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  658. package/.versions/2.2.0/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  659. package/.versions/2.2.0/.pi/harnesses/lib/fleet-target-identity.ts +9 -0
  660. package/.versions/2.2.0/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  661. package/.versions/2.2.0/.pi/harnesses/lib/herdr-client.ts +472 -0
  662. package/.versions/2.2.0/.pi/harnesses/lib/herdr-presence.ts +399 -0
  663. package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  664. package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  665. package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  666. package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  667. package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  668. package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  669. package/.versions/2.2.0/.pi/harnesses/lib/identical-dialog.ts +27 -0
  670. package/.versions/2.2.0/.pi/harnesses/lib/installation-state.js +62 -0
  671. package/.versions/2.2.0/.pi/harnesses/lib/peer-target.ts +24 -0
  672. package/.versions/2.2.0/.pi/harnesses/lib/policy-roots.js +117 -0
  673. package/.versions/2.2.0/.pi/harnesses/lib/policy-roots.ts +32 -0
  674. package/.versions/2.2.0/.pi/harnesses/lib/process-shared.ts +9 -0
  675. package/.versions/2.2.0/.pi/harnesses/lib/resource-closure.js +26 -0
  676. package/.versions/2.2.0/.pi/harnesses/lib/safe-source-read.js +29 -0
  677. package/.versions/2.2.0/.pi/harnesses/lib/semantic-approval.ts +80 -0
  678. package/.versions/2.2.0/.pi/harnesses/lib/session-target.ts +62 -0
  679. package/.versions/2.2.0/.pi/harnesses/lib/spawned-peers.js +191 -0
  680. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-agentic.js +15 -0
  681. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
  682. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
  683. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
  684. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-json.js +37 -0
  685. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-loader.js +53 -0
  686. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-proactive.js +68 -0
  687. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-triage.js +42 -0
  688. package/.versions/2.2.0/.pi/harnesses/lib/system1/config-v2.js +112 -0
  689. package/.versions/2.2.0/.pi/harnesses/lib/system1/config.js +50 -0
  690. package/.versions/2.2.0/.pi/harnesses/lib/system1/contracts.ts +154 -0
  691. package/.versions/2.2.0/.pi/harnesses/lib/system1/demo.ts +95 -0
  692. package/.versions/2.2.0/.pi/harnesses/lib/system1/jev.ts +503 -0
  693. package/.versions/2.2.0/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
  694. package/.versions/2.2.0/.pi/harnesses/lib/system1/selection.js +11 -0
  695. package/.versions/2.2.0/.pi/harnesses/lib/system1/service.ts +245 -0
  696. package/.versions/2.2.0/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
  697. package/.versions/2.2.0/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
  698. package/.versions/2.2.0/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
  699. package/.versions/2.2.0/.pi/harnesses/lib/target-capabilities.js +7 -0
  700. package/.versions/2.2.0/.pi/harnesses/lib/update-check.ts +227 -0
  701. package/.versions/2.2.0/.pi/harnesses/lib/workspace-context.js +115 -0
  702. package/.versions/2.2.0/.pi/harnesses/lib/workspace-context.ts +22 -0
  703. package/.versions/2.2.0/.pi/harnesses/package-lock.json +2121 -0
  704. package/.versions/2.2.0/.pi/harnesses/package.json +13 -0
  705. package/.versions/2.2.0/.pi/prompts/af-build.md +27 -0
  706. package/.versions/2.2.0/.pi/prompts/af-code-simplify.md +22 -0
  707. package/.versions/2.2.0/.pi/prompts/af-constraints.md +31 -0
  708. package/.versions/2.2.0/.pi/prompts/af-plan.md +17 -0
  709. package/.versions/2.2.0/.pi/prompts/af-review.md +16 -0
  710. package/.versions/2.2.0/.pi/prompts/af-set-hermes-telegram.md +15 -0
  711. package/.versions/2.2.0/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  712. package/.versions/2.2.0/.pi/prompts/af-setup-rules.md +20 -0
  713. package/.versions/2.2.0/.pi/prompts/af-ship.md +17 -0
  714. package/.versions/2.2.0/.pi/prompts/af-spec.md +15 -0
  715. package/.versions/2.2.0/.pi/prompts/af-test.md +19 -0
  716. package/.versions/2.2.0/.pi/skills/bowser/SKILL.md +145 -0
  717. package/.versions/2.2.0/.version +1 -0
  718. package/.versions/2.2.0/agents/architect.md +24 -0
  719. package/.versions/2.2.0/agents/bowser.md +28 -0
  720. package/.versions/2.2.0/agents/builder.md +55 -0
  721. package/.versions/2.2.0/agents/code-reviewer.md +209 -0
  722. package/.versions/2.2.0/agents/deep-researcher.md +32 -0
  723. package/.versions/2.2.0/agents/documenter.md +22 -0
  724. package/.versions/2.2.0/agents/plan-reviewer.md +83 -0
  725. package/.versions/2.2.0/agents/planner.md +107 -0
  726. package/.versions/2.2.0/agents/releaser.md +24 -0
  727. package/.versions/2.2.0/agents/researcher.md +30 -0
  728. package/.versions/2.2.0/agents/security-auditor.md +167 -0
  729. package/.versions/2.2.0/agents/test-engineer.md +153 -0
  730. package/.versions/2.2.0/agents/web-debugger.md +44 -0
  731. package/.versions/2.2.0/agents/web-performance-auditor.md +194 -0
  732. package/.versions/2.2.0/bin/catalog/harness-runtime-closure.json +85 -0
  733. package/.versions/2.2.0/docs/ARCHITECTURE.md +1291 -0
  734. package/.versions/2.2.0/docs/agent-fleet-setup.md +1161 -0
  735. package/.versions/2.2.0/docs/claude-code-coms-bridge.md +147 -0
  736. package/.versions/2.2.0/docs/codex-local-mcp.md +520 -0
  737. package/.versions/2.2.0/docs/codex-session-bridge.md +44 -0
  738. package/.versions/2.2.0/docs/codex-setup.md +183 -0
  739. package/.versions/2.2.0/docs/coms-hermes-bridge.md +188 -0
  740. package/.versions/2.2.0/docs/fleet-native-voice.md +151 -0
  741. package/.versions/2.2.0/docs/getting-started.md +126 -0
  742. package/.versions/2.2.0/docs/npm-install.md +535 -0
  743. package/.versions/2.2.0/docs/pi-extensions.md +450 -0
  744. package/.versions/2.2.0/docs/pi-setup.md +92 -0
  745. package/.versions/2.2.0/docs/skill-anatomy.md +150 -0
  746. package/.versions/2.2.0/install-manifest.json +3226 -0
  747. package/.versions/2.2.0/justfile +246 -0
  748. package/.versions/2.2.0/manifest-meta.json +1098 -0
  749. package/.versions/2.2.0/references/accessibility-checklist.md +160 -0
  750. package/.versions/2.2.0/references/communication-contract.md +26 -0
  751. package/.versions/2.2.0/references/definition-of-done.md +67 -0
  752. package/.versions/2.2.0/references/fleet-coordination-patterns.md +171 -0
  753. package/.versions/2.2.0/references/observability-checklist.md +92 -0
  754. package/.versions/2.2.0/references/orchestration-patterns.md +370 -0
  755. package/.versions/2.2.0/references/performance-checklist.md +236 -0
  756. package/.versions/2.2.0/references/prompting-patterns.md +380 -0
  757. package/.versions/2.2.0/references/security-checklist.md +245 -0
  758. package/.versions/2.2.0/references/testing-patterns.md +235 -0
  759. package/.versions/2.2.0/references/workflow-authoring.md +304 -0
  760. package/.versions/2.2.0/skills/_internal/grilling.md +59 -0
  761. package/.versions/2.2.0/skills/browser-testing-with-devtools/SKILL.md +351 -0
  762. package/.versions/2.2.0/skills/code-review-and-quality/SKILL.md +396 -0
  763. package/.versions/2.2.0/skills/compound-learning/SKILL.md +137 -0
  764. package/.versions/2.2.0/skills/constraint-driven-development/SKILL.md +338 -0
  765. package/.versions/2.2.0/skills/constraint-driven-development/references/floor-guard.md +99 -0
  766. package/.versions/2.2.0/skills/context-engineering/SKILL.md +341 -0
  767. package/.versions/2.2.0/skills/deprecation-and-migration/SKILL.md +247 -0
  768. package/.versions/2.2.0/skills/designing-agents/SKILL.md +394 -0
  769. package/.versions/2.2.0/skills/designing-agents/pi-harness-authoring.md +222 -0
  770. package/.versions/2.2.0/skills/drafting-workflows/SKILL.md +143 -0
  771. package/.versions/2.2.0/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  772. package/.versions/2.2.0/skills/fleet-connect/SKILL.md +29 -0
  773. package/.versions/2.2.0/skills/fleet-connect.zip +0 -0
  774. package/.versions/2.2.0/skills/fleet-native-voice/SKILL.md +103 -0
  775. package/.versions/2.2.0/skills/fleet-native-voice/agents/openai.yaml +4 -0
  776. package/.versions/2.2.0/skills/fleet-native-voice.zip +0 -0
  777. package/.versions/2.2.0/skills/frontend-ui-engineering/SKILL.md +328 -0
  778. package/.versions/2.2.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
  779. package/.versions/2.2.0/skills/idea-refine/SKILL.md +182 -0
  780. package/.versions/2.2.0/skills/idea-refine/examples.md +238 -0
  781. package/.versions/2.2.0/skills/idea-refine/frameworks.md +99 -0
  782. package/.versions/2.2.0/skills/idea-refine/refinement-criteria.md +113 -0
  783. package/.versions/2.2.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
  784. package/.versions/2.2.0/skills/incremental-implementation/SKILL.md +353 -0
  785. package/.versions/2.2.0/skills/incremental-implementation.zip +0 -0
  786. package/.versions/2.2.0/skills/interview-me/SKILL.md +226 -0
  787. package/.versions/2.2.0/skills/orchestration-verification/SKILL.md +182 -0
  788. package/.versions/2.2.0/skills/peer-coms/SKILL.md +90 -0
  789. package/.versions/2.2.0/skills/performance-optimization/SKILL.md +496 -0
  790. package/.versions/2.2.0/skills/planning-and-task-breakdown/SKILL.md +318 -0
  791. package/.versions/2.2.0/skills/planning-and-task-breakdown.zip +0 -0
  792. package/.versions/2.2.0/skills/repository-ai-setup/SKILL.md +135 -0
  793. package/.versions/2.2.0/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  794. package/.versions/2.2.0/skills/repository-ai-setup/references/apply-contract.md +74 -0
  795. package/.versions/2.2.0/skills/repository-ai-setup/references/provenance-template.md +16 -0
  796. package/.versions/2.2.0/skills/repository-ai-setup/references/setup-flow.md +108 -0
  797. package/.versions/2.2.0/skills/repository-ai-setup/references/verify-setup.md +20 -0
  798. package/.versions/2.2.0/skills/repository-ai-setup.zip +0 -0
  799. package/.versions/2.2.0/skills/security-and-hardening/SKILL.md +524 -0
  800. package/.versions/2.2.0/skills/spec-driven-development/SKILL.md +295 -0
  801. package/.versions/2.2.0/skills/spec-driven-development.zip +0 -0
  802. package/.versions/2.2.0/skills/using-agent-skills/SKILL.md +198 -0
  803. package/.versions/2.2.0/vendor/agent-skills-upstream/LICENSE +21 -0
  804. package/.versions/2.2.0/vendor/agent-skills-upstream/README.md +430 -0
  805. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  806. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  807. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  808. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  809. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  810. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  811. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  812. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  813. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  814. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  815. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  816. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  817. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  818. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  819. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  820. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  821. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  822. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  823. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  824. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  825. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  826. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  827. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  828. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  829. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  830. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  831. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  832. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  833. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  834. package/.versions/2.2.0/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  835. package/CHANGELOG.md +33 -0
  836. package/README.md +7 -10
  837. package/bin/lib/set-codex-mcp.js +1 -1
  838. package/bin/lib/validate-overrides.js +8 -1
  839. package/docs/ARCHITECTURE.md +122 -26
  840. package/docs/MIGRATION-agent-fleet.md +26 -5
  841. package/docs/agent-fleet-setup.md +44 -26
  842. package/docs/claude-code-coms-bridge.md +1 -1
  843. package/docs/codex-local-mcp.md +29 -12
  844. package/docs/codex-session-bridge.md +2 -2
  845. package/docs/codex-setup.md +1 -1
  846. package/docs/fleet-native-voice.md +10 -4
  847. package/docs/npm-install.md +1 -1
  848. package/docs/pi-extensions.md +13 -18
  849. package/docs/system1-agentic.md +1 -1
  850. package/docs/system1-file-discovery.md +2 -2
  851. package/docs/workflows.md +24 -1
  852. package/install-manifest.json +15 -28
  853. package/justfile +3 -4
  854. package/manifest-meta.json +13 -2
  855. package/package.json +4 -2
  856. package/skills/fleet-connect/SKILL.md +20 -16
  857. package/skills/fleet-connect.zip +0 -0
  858. package/skills/fleet-native-voice.zip +0 -0
  859. package/.pi/harnesses/agent-hub/commands/work-mode.ts +0 -29
  860. package/.pi/harnesses/agent-hub/work-mode-controls.ts +0 -56
  861. package/agents/orchestrator.md +0 -22
@@ -0,0 +1,1291 @@
1
+ # Agent Fleet Architecture
2
+
3
+ Agent Fleet is a Pi-centered multi-agent orchestration system. This page maps
4
+ the runtime responsibilities and where each module lives in the repository.
5
+
6
+ For the principles governing future plans and design decisions, read the
7
+ [project philosophy](PHILOSOPHY.md). That document states the intended direction;
8
+ this page describes the current architecture.
9
+
10
+ Native chat connection leases, exact-owner receiver control, notification renewal, Fleet View status, and remaining host-bootstrap limits are described in [Codex connections](codex-connections.md). The new workflow does not auto-start delivery or retarget sessions after restart.
11
+
12
+ ## Session worktree root contract
13
+
14
+ The intended external Fleet layout is:
15
+
16
+ ```text
17
+ root/
18
+ ├── af/ # Fleet workspace: justfile, .pi/, .ai/, runtime dependencies
19
+ ├── repo/ # application's main Git checkout; no Fleet installation
20
+ ├── repo.worktree/ # registered linked/detached application checkout
21
+ └── docs/ # separately configured rules/documentation repository
22
+ ```
23
+
24
+ Here `workspaceRoot` / `resourceRoot` / `configBase` are `root/af`,
25
+ `repositoryRoot` is `root/repo`, and `executionRoot` / `worktreeRoot` are
26
+ `root/repo.worktree`. Relative selectors are resolved from `af`, so that checkout
27
+ is `../repo.worktree`, not `./repo.worktree`. External docs/rules paths must be
28
+ explicitly configured relative to `af` (for example `../docs`); neither sibling
29
+ placement nor selecting a checkout grants read, write, or remote-export consent.
30
+ Fleet must not be copied or symlinked into the application's checkouts.
31
+
32
+ `just fleet --worktree <registered-checkout>` binds a session to immutable,
33
+ canonical filesystem/Git registry identities independently of HEAD. Configuration,
34
+ resources and Fleet evidence remain workspace-owned; a managed symlink install
35
+ also pins its separate physical Fleet resource root without moving human config.
36
+ Coding tools, Git, native
37
+ specialists and workflow data use the execution root. Communications, retention
38
+ and resume carry target identity. Serialized transport is revalidated, never a
39
+ permission. Scoped workflows do not mutate a global active checkout.
40
+
41
+ System 1 requires exact, separately approved per-consumer physical-target scopes.
42
+ Off, pending consent, invalid adaptation, unchecked provider health and actual
43
+ consumer results are distinct. A scout clone cannot borrow source-export consent
44
+ from its source checkout. Routing is not OS isolation or external-service
45
+ isolation. Targeted `/btw` and Hermes conductor explicitly refuse unsupported
46
+ combinations. Interactive Pi history retains its global cwd-scoped location;
47
+ Fleet artifacts and native session files remain partitioned in the workspace.
48
+
49
+ See [usage and boundaries](session-worktree-targeting.md) and the
50
+ [implementation/verification plan](plans/2026-0-archive/PLAN-session-worktree-targeting.md).
51
+ No target-local Fleet copy or cwd-only workaround is needed.
52
+
53
+ ## Workspaces with nested repositories
54
+
55
+ A Fleet workspace root can also be a plain folder that holds several Git
56
+ repositories:
57
+
58
+ ```text
59
+ workspace/ # Fleet installation; not a Git repository
60
+ ├── .ai/ .pi/ justfile
61
+ ├── rin-docs/ # nested repository
62
+ └── ringithub/ # nested repository
63
+ ```
64
+
65
+ Configuration, policy, personas and Fleet evidence stay at the workspace root.
66
+ Git state is read and changed per nested repository:
67
+
68
+ - **Discovery.** A nested repository is known only once a declared scope or a
69
+ changed task file points inside it. The path is resolved to its nearest Git
70
+ root; the root's children are never scanned. A path outside every nested
71
+ repository is a gap, and a passing sibling repository cannot cover it.
72
+ - **Observation.** Dispatch snapshots, deltas and compiler discovery run per
73
+ repository and report workspace-relative paths (see
74
+ [runtime acceptance and recovery](#runtime-acceptance-and-recovery)).
75
+ Proactive turn review observes the same way. An `include` outside every
76
+ nested repository is recorded as `include_outside_nested_repository`, and the
77
+ root is not asked for a status of its own.
78
+ - **Task revision.** A task's revision covers, whole, each nested repository
79
+ that holds a declared path or a changed task file. Review, acceptance and plan
80
+ records keep that basis. The `update_assertion` gate, `/af-recover`, the
81
+ no-progress ticket and refusal snapshots check against the same basis. A
82
+ change in a covered repository makes a record stale; a change in another
83
+ repository does not. Incomplete observation gives `unavailable`, as in a
84
+ single repository.
85
+ - **Review reuse.** An incremental re-review keeps the `HEAD` of each declared
86
+ repository and is allowed only when none of them has moved.
87
+ - **Operator view.** Once a task has recorded a step on a nested repository,
88
+ the operator's state capsule says that the root is not a Git repository and
89
+ names up to six repositories in use, with `+N more` beyond that.
90
+ - **Flows.** A flow works in exactly one nested repository:
91
+ `just flow <flow> --worktree <repository>` from the CLI, or `repo:` on Hub
92
+ `run_flow` scout. Without that selection, a flow, `cleanup` or `merge` refuses
93
+ at startup, and `run_flow` refuses without a budget charge.
94
+ `quality.<repository>:` under `## workflows` wins over `quality:` for that
95
+ repository. See [workflows](workflows.md#workspaces-with-nested-repositories).
96
+
97
+ A root that is itself a Git repository keeps whole-repository behaviour
98
+ throughout. Git submodules, and repositories nested inside a root repository,
99
+ are outside this contract.
100
+
101
+ ## Runtime layers
102
+
103
+ | Layer | Role | Implementation |
104
+ | --- | --- | --- |
105
+ | **Pi Coding Agent** | Primary local runtime — runs the dispatcher and specialist subagents | `.pi/harnesses/`, `.pi/extensions/`, `.pi/agents/`, `.pi/prompts/` |
106
+ | **agent-hub** | Thin-context multi-agent harness: dispatcher + specialists + research helpers + Verification Contract | `.pi/harnesses/agent-hub/` |
107
+ | **Workflows** | Headless, code-owned phase order, retries, gates, writes enforcement, and acceptance through `just flow` | `.pi/agent-fleet/scripts/flow.ts`, `.pi/agent-fleet/scripts/workflows/` — see [workflows.md](workflows.md) |
108
+ | **Herdr** | Fleet/workspace control plane — spawns peer teams as tiled workspaces, presence via push events, snapshot/resume | [herdr.dev](https://herdr.dev); client in `.pi/harnesses/lib/herdr-client.ts`, layout in `.pi/agent-fleet/scripts/lib/herdr-layout.ts` |
109
+ | **coms** | Peer communication protocol/data plane — envelope-based P2P messaging between agents | Shared peer lifecycle in `.pi/harnesses/lib/coms-core.ts` and `coms-core-io.ts`; Pi registrations in `.pi/harnesses/coms/` and `agent-hub/`; wire helpers in `.pi/agent-fleet/scripts/lib/coms-envelope.ts` and `.pi/agent-fleet/scripts/coms-cli.ts` |
110
+ | **Fleet config screen** | Read-only in-session view of what is configured and active (`/af-config`, Alt+,) in the Hub and every coms peer; file facts and hash checks locally, installer evaluation through the read-only `agent-fleet inspect` verb (`bin/lib/inspect.js`) via a shell-less CLI bridge, and changes only as confirmed `agent-fleet setup`/`configure` runs after a dry-run preview and a matching second dry run | `.pi/harnesses/lib/fleet-config/` (snapshot, view, transition, ui, cli-bridge, mutations); registrations in `.pi/harnesses/agent-hub/commands/config.ts` and `.pi/harnesses/coms/index.ts` — see [setup guide](agent-fleet-setup.md#viewing-configuration-from-a-live-session) |
111
+ | **Claude Code bridge** | Makes an interactive Claude Code pane a bidirectional coms peer | `.pi/agent-fleet/scripts/coms-claude-bridge.ts`, `.pi/agent-fleet/hooks/coms-stop-hook.mjs`, `skills/peer-coms/` — see [claude-code-coms-bridge.md](claude-code-coms-bridge.md) |
112
+ | **Hermes bridge** | Remote human control — relays hub questions to Telegram, races phone vs. local answers, conductor/liaison skills | `.pi/agent-fleet/scripts/coms-hermes-bridge.ts`, `.pi/harnesses/ask-user-remote/`, `.pi/agent-fleet/hermes/skills/` — see [coms-hermes-bridge.md](coms-hermes-bridge.md) |
113
+ | **Hermes local monitor transport** | Local, authenticated monitor contract for Hub-owned task generations; consumers supply their own presentation | `.pi/harnesses/agent-hub/monitor-*.ts`, `.pi/harnesses/lib/hermes-monitor-{model,store,registry,socket}.ts` (with compatibility re-exports under `.pi/agent-fleet/scripts/lib/`) — see [Hermes artifacts](../.pi/agent-fleet/hermes/README.md#local-agent-hub-monitor-integration) and [watchdog limits](hermes-watchdog-supervisor.md) |
114
+ | **Hermes Desktop plugin** (`agent-fleet-herdr`) | Fleet observability surface — read-only panel of every live session joined from the coms registry, herdr presence, agent transcripts, and the monitor transport; `focus` and subagent `cancel` are its only write doors | `.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/` (Electron pane), `.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/` (FastAPI backend), installed by `.pi/agent-fleet/scripts/install-hermes-plugin.sh` — see [hermes-desktop-plugins.md](hermes-desktop-plugins.md) |
115
+ | **Native Codex MCP** | Local exact-context, multi-session observations and human-confirmed actions; no daemon or idle wake | `.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts`; user-level registration and the `fleet-native-voice` skill copy through the explicit `agent-fleet set-codex-mcp` command (`bin/lib/set-codex-mcp.js`) — see [setup guide](codex-setup.md), [native guide](codex-local-mcp.md) and [retired CLI migration](codex-session-bridge.md) |
116
+ | **System 1 foundation** | Experimental shared structured-judgment service; TypeSafe Jev only, with independent watchdog/dispatch/proactive/task-triage/agenticAsk/fileDiscovery/contextCompaction/damageGuard consumer opt-ins | `.pi/harnesses/lib/system1/`, feature `system1`, human-owned `.ai/system1.json` |
117
+ | **System 1 dispatch advice / communication** | Optional off-by-default `dispatch_triage` tool; shared-service memory-only Fleet `1` viewer, independently opt-in; live calibration not yet accepted | `.pi/harnesses/agent-hub/dispatch-triage-*.ts`, `system1-communication-store.ts`, `ui/system1-communication.ts` — [guide](system1-dispatch-triage.md) |
118
+ | **System 1 task triage** | Active uncalibrated opt-in: uncertain predicates add process obligations, never spend/permission authority; session Fleet/audit metadata | `.pi/harnesses/agent-hub/task-triage-*.ts`, human-owned `consumers.taskTriage` in `.ai/system1.json` — [config/recovery](agent-fleet-setup.md#task-triage-active-experimental-off-by-default) |
119
+ | **System 1 file discovery (D9)** | Off-by-default automatic full-list file ranking; parent scheduler/cache/durable budget, guarded source export, private UDS broker and per-physical-attempt native/descendant identities; no permission or acceptance authority | `.pi/harnesses/agent-hub/file-discovery/`, `tools/ask-system1-files.ts` — [scope/status/full-list and activation](system1-file-discovery.md) |
120
+ | **System 1 damage guard (D6)** | Off-by-default independent commands/edits/results scopes over mandatory Damage-Control baseline; parent-owned durable decisions, approval and native capability transport; production wiring exists, acceptance remains open | `.pi/harnesses/agent-hub/damage-guard-*.ts`, `damage-control-continue/system1-*.ts`, `result-screen.ts` — [contract and limits](system1-damage-guard.md) |
121
+ | **Skill library** | Lifecycle workflows and quality gates every agent follows | `skills/` (native) + `vendor/agent-skills-upstream/skills/` (vendored) — see [UPSTREAM-SKILLS.md](UPSTREAM-SKILLS.md) |
122
+ | **Personas** | Reusable specialist definitions, installed verbatim | `agents/` in the package → `.pi/agents/personas/` in a workspace; `bin/lib/personas.js` |
123
+
124
+ ## Private configuration-only verification
125
+
126
+ The Hub's explicit `private-config-current-state` mode uses
127
+ `private-config-current-state.ts` for bounded canonical notification-config/helper
128
+ fingerprints and `private-config-review.ts` for fresh native evidence and
129
+ independent-review validation. Pure shape/preview, exact-owner, loaded-catalog
130
+ and pinned queue-tuple validators live in
131
+ `.pi/harnesses/lib/fleet-notification-validation.ts`; the notification runtime
132
+ retains its original exports via compatibility re-exports. This keeps the Hub's
133
+ packed runtime import closure inside harnesses without importing script-side
134
+ notification activation or persistence code. A catalog parity regression binds
135
+ the pure expected tool names and assessment results to the public MCP catalog.
136
+ The MCP dispatcher retains its original catalog assessment and narrow dependency
137
+ allowlist; no notification runtime dependency is added there. Configuration
138
+ bodies are not model artifacts or proof output. `process-obligations.ts` retains a separate private proof, not Git
139
+ changed-file attribution or ordinary Git review evidence. It closes only a pure
140
+ configuration task's own acceptance/review stages; actual proof/gate use requires
141
+ live task/session/declaration, revision/fingerprint, receipt/evidence and
142
+ concurrency revalidation. Source obligations exclude private closure. The
143
+ composition root supplies live context to assertion proof and process reporting;
144
+ missing context fails closed. Old Git modes retain their contracts.
145
+
146
+ This advances deterministic, evidence-owned completion without a fake Git edit or
147
+ a generic waiver. Fixture support is not loaded-runtime/activation evidence;
148
+ independent whole-feature review and separate human activation remain outside
149
+ this implementation. See [verification contracts and limits](operator-current-state.md#private-configuration-only-current-state-separate-opt-in).
150
+
151
+ ## One Hub runtime, independent axes
152
+
153
+ Every public Pi launch through `just fleet` loads Fleet Core and the `agent-hub`
154
+ harness. Three independent choices shape that runtime:
155
+
156
+ | Axis | Choices | What it controls |
157
+ | --- | --- | --- |
158
+ | **Operator** | one | The main agent always keeps the captured `read`/`bash`/`edit`/`write` and approved extension surface plus delegation to every installed agent, `poll_panel`, and available coms/Herdr tools. Whether to delegate is its judgment (PHILOSOPHY, 2026-11-11); the former delegate-only `orchestrator` work mode was removed. |
159
+ | **Native roster** | empty or one entry from `.pi/agents/teams.yaml` | Which in-process Pi specialist personas `dispatch_agent` may start. Dispatching an installed agent outside the roster adds it. |
160
+ | **Peer topology** | current terminal, Hub-only Herdr workspace, or Hub plus a `.pi/agents/peers.yaml` preset | Which separate, addressable Pi/Claude processes occupy sibling panes. Starting or spawning peers does not change the native roster. |
161
+
162
+ Bare `just fleet` therefore means the operator, an empty native roster, and
163
+ the current terminal; `--agents <roster>` only picks the starting roster.
164
+ `--work-mode` is deprecated and ignored with a warning, and `/af-agents-*` changes
165
+ only the native roster. Dispatch, research, nested delegation, and Verification
166
+ Contract rigor follow the **task tier** (`trivial`/`small`/`feature`/`project`),
167
+ not a session execution mode. Dispatch/research counts and active duration are
168
+ accounting metrics without turn or task continuation quotas. Planner and plan
169
+ review are optional; wide/high-risk work retains independent review and applicable
170
+ exact-action authorization without a pre-effect planning gate.
171
+
172
+ Approval memory is shared across Pi's isolated extension loaders within the
173
+ runtime. Semantic decisions remain bound to the accepted task/input revision and
174
+ exact path; task/session changes fence late answers. Only an exact-action dialog
175
+ that showed the human the command records a delete decision; free-form `ask_user`
176
+ answers are never recorded and never answered automatically, because prose cannot
177
+ prove which path or polarity the human chose. Remembered confirmation is
178
+ not a reusable effect grant: actual irreversible effects still consume their
179
+ runtime authorization. Identical concurrent dialogs coalesce, and cancellation
180
+ does not become consent.
181
+
182
+ Successful independent reviews retain role-specific evidence, reviewed file
183
+ revision, coverage, requirement declarations and input-artifact hashes in the
184
+ process journal. An identical covered review returns the retained evidence without
185
+ starting another child. Changed accepted input, source, requirements, task, scope, evidence,
186
+ concurrent writes or an explicit `review_reason` require a fresh review; unresolved
187
+ questions, blocking findings and rejected reviews cannot supply reusable approval.
188
+
189
+ The model's context hook projects older successful coordination/inspection bodies
190
+ to short references backed by exact local originals. It leaves the session journal,
191
+ user/assistant messages, questions, failures, images and latest tool batch intact,
192
+ and retains a recent inspection working set. The prompt capsule carries current
193
+ sourced requirements and critical conditions without treating recorded status as
194
+ fresh proof. Plain continue/resume inputs retain the accepted task; identical
195
+ classification declarations avoid new triage, revision hashing and journal writes.
196
+ Changed intent still uses the existing task-transition fence.
197
+
198
+ All Hub-owned slash commands are always registered. Capability packs are resolved automatically from explicit task intent, tier, pending work, and compaction state—there is no activation command. Runtime **readiness** (a coms or Herdr connection) is not model-visible capability: ready-but-unrequested peer/workspace packs remain inactive. Ambiguous fleet, peer, and workspace requests are provisionally visible but require one `ask_user` confirmation before their first side effect; a rejection removes the provisional pack. Task packs persist across follow-ups and reset only through `set_task_tier(new_task: true)`, while mandatory work mode and pending-operation leases remain. The verification pack also exposes `set_task_tier` so direct operators can declare explicit risk/scope through the trusted producer without activating fleet dispatch. This does not clear any obligation or change work mode, roster, permissions, or the setter's existing transition/confirmation gates.
199
+
200
+ `/af-context` is a standalone, read-only full-screen budget diagnostic; it separates stable prompt cost, volatile state, active schemas, and zero-cost inactive/loaded-excluded inputs. Provider totals and cache read/write fields are authoritative where Pi supplies them; it never fabricates provider usage or combines capacity percentages across Hub, child, and peer planes. `/af-audit` is a separate read-only session audit over existing runtime-owned records: it reports allowlisted T1 recovery categories, T2 result states, T3 protocol failures, and T8 permission correlations while keeping root, child, compaction snapshot, and repeated-record identities distinct. It never copies prompts, model text, tool payloads, environment values, or transcript content, and unavailable evidence stays explicit rather than becoming a zero count. Managed specialists and research children use explicit replacement prompts/context manifests with selected persona, policy, and skill paths instead of inherited global skills/context files. Configured project rule and documentation pointers are rendered into the Hub prompt in both work modes and into native specialist, nested delegate, research, and coms handoffs. Files are read directly; folders are resolved index-first, with recursive rule discovery only when no index exists. The prompt carries pointers and selection instructions rather than bulk-injecting rule bodies, and the Hub ledger attributes that text as `hub/policy/project`. Runtime gates control whether an action can proceed: without coms, Herdr, a visible target, or an active roster, the corresponding command refuses with an actionable message rather than disappearing. `--browser` and `--all-extensions` expand the captured operator surface only when those optional extensions are installed.
201
+
202
+ T12 diagnostics have been withdrawn by user decision; there is no command, runner, or replacement entry point. Historical results and accounting remain unchanged. `diagnostic-series-budget.ts` retains the shared v2 ledger, stage/per-unit ceilings, conservative input preflight, migration refusal for ambiguous history, ownership locks, and cancellation fences used by benchmark consumers. `diagnostic-probe-extension.ts` is now a side-effect-free compatibility library exposing only provider/API output-cap mapping, its types, and the transport refusal exit constant. It preserves the reviewed 2048 cap and rejects unsupported payload semantics; it does not register an extension or tool. Existing sessions must be reloaded after updating. The installer retires unchanged managed command/runner files; user-modified obsolete files are preserved and reported for manual review, never deleted automatically. Such retained files are not imported by the current Hub.
203
+
204
+ ### Context pressure and recovery
205
+
206
+ Standing prompt ceilings constrain the repeatable replacement prompt and active schemas; they do not
207
+ bound conversation messages or results accumulated inside a long tool loop. The Hub therefore has a
208
+ second, runtime pressure guard. It samples provider usage, projects a finalized tool result at
209
+ `message_end`, warns and exposes transient compaction support at **60%**, then at **70%** aborts the
210
+ pre-model continuation and waits for `agent_settled` before requesting one Pi compaction. This
211
+ ordering ensures the result is persisted before summarization and prevents an ordinary provider call
212
+ from escaping between pressure detection and recovery. Automatic compaction re-arms when measured
213
+ usage falls below 60%, or after the history grows by 10% of the window over the first measurement
214
+ after a compaction. At the **80%** ceiling, work stops after a failed recovery or when even the
215
+ compacted baseline is at or above the ceiling. A baseline between 70% and 80% only warns, because a
216
+ small window then keeps working until growth re-arms compaction.
217
+
218
+ Recovery is single-flight. High-context startup or concurrent input is retained in memory and
219
+ replayed exactly once after success; failure retains it for `/compact` or a larger-context model.
220
+ `/af-context` and the status line report phase, usage, thresholds, episode, and last outcome. Session
221
+ entries store only numeric/enumerated pressure metadata, never prompts, tool payloads, credentials,
222
+ error bodies, or summaries.
223
+
224
+ A persisted native roster is also metadata, not copied configuration: only its team name is stored
225
+ and it is re-resolved against current teams and persona definitions. A stale or absent roster is
226
+ reported and the session continues without it. A session saved in the removed orchestrator mode
227
+ continues as the operator with a one-time notice; the Hub records the operator so the notice is not
228
+ repeated. An explicit `--agent-team` selection retains precedence.
229
+
230
+ Pi's session JSONL is the authoritative append-only record for rebuilding a session, including
231
+ compaction and Hub metadata. Pressure and roster recovery operate through Pi/Hub lifecycle APIs;
232
+ they never rewrite prior entries. Operators must not edit, truncate, reorder, or synthesize JSONL to
233
+ recover a session.
234
+
235
+ The project selected by `--project <name>` is the coms namespace for the Hub
236
+ and every standing or dynamically spawned peer. The Hub-facing peer spawn API
237
+ cannot override it. Native subagents remain children of that Hub and inherit
238
+ its repository context; peers are separate processes in their own panes.
239
+
240
+ At dispatch time, `backend: "auto"` applies
241
+ `.pi/agents/dispatch-policy.yaml`; `backend: "native"` bypasses same-name peer
242
+ substitution; and `backend: "coms"` requires a visible same-name peer and never
243
+ falls back to a native child. `.pi/agents/peers.yaml` owns how a peer runs
244
+ (`runner`, persona, model, extensions, and declared `env_file`), not whether a
245
+ dispatch uses it.
246
+
247
+ ## Fleet hierarchy
248
+
249
+ Agent Fleet is layered on purpose. Work flows **down** (delegate); evidence and status flow **up** — as compact structured returns, never raw dumps.
250
+
251
+ ```mermaid
252
+ flowchart TD
253
+ You(["You · Hermes relay · Codex native text/voice"])
254
+
255
+ subgraph HUBL["HUB — guarded runtime (bare just fleet)"]
256
+ Hub["agent-hub harness<br/>one operator · works directly and delegates<br/>owns the Verification Contract on disk · keeps research dumps out of its own context"]
257
+ end
258
+
259
+ subgraph TEAML["OPTIONAL NATIVE ROSTER (.pi/agents/teams.yaml)"]
260
+ Team["default: builder · test-engineer · code-reviewer · documenter<br/>also: plan · debug · frontend · security · hotfix · release · info"]
261
+ end
262
+
263
+ subgraph RESL["RESEARCH HELPERS — read-only, always available"]
264
+ Research["researcher (fast tier — simple reads)<br/>deep-researcher (deep tier — hard, cross-cutting questions)"]
265
+ end
266
+
267
+ subgraph SUBL["SUB-AGENTS — focused children, narrow tools + models"]
268
+ Subs["planner → scout · rules · risk<br/>plan-reviewer → feasibility · deps<br/>builder → recon · verifier<br/>test-engineer → coverage-scout · conventions<br/>code-reviewer → preflight · quality · perf · docs<br/>security-auditor → recon · input-sweep · secrets-sweep"]
269
+ end
270
+
271
+ You -->|task| Hub
272
+ Hub -->|"dispatch_agent — one persona = one specialist session"| Team
273
+ Hub -->|"spawn_research"| Research
274
+ Research -.->|"findings written to disk — hub gets paths, not dumps"| Hub
275
+ Team -->|"subagents: block (delegate_depth ≥ 1)"| Subs
276
+ Subs -.->|"results return to the parent agent only"| Team
277
+ Team -.->|"structured return + evidence"| Hub
278
+ Hub -.->|"one status line: Assertions: 2✓ 1○ 1✗"| You
279
+ ```
280
+
281
+ Every specialist session is one persona from [`agents/`](../agents/) (installed to `.pi/agents/personas/`) — *skills* tell each agent **how** to work; *personas* define **who** they are (see [agents.md](agents.md)).
282
+
283
+ The same idea as a tree:
284
+
285
+ ```text
286
+ hub (operator by default; orchestrator when selected)
287
+ ├── optional native roster (empty by default; example: default)
288
+ │ ├── builder → recon · verifier
289
+ │ ├── test-engineer → coverage-scout · conventions
290
+ │ ├── code-reviewer → preflight · quality · perf · docs
291
+ │ └── documenter
292
+ ├── research helpers (spawn_research, any time)
293
+ │ ├── researcher
294
+ │ └── deep-researcher
295
+ └── optional fleet peers (herdr + coms)
296
+ ├── architect / releaser / web-debugger panes
297
+ ├── Claude Code peer (coms bridge)
298
+ ├── Hermes (phone human · inbound ask_user)
299
+ └── Codex native MCP (compatible local host · existing Pi sessions)
300
+ ```
301
+
302
+ Composition rule: **the hub (or a slash command) orchestrates; personas do not invoke other personas as peers.** Specialists may only fan out to their configured **sub-agents**. Research helpers write findings to disk; the hub resumes specialists with paths, not raw dumps.
303
+
304
+ ### Automatic file discovery
305
+
306
+ The independently consented v2 `consumers.fileDiscovery` consumer intercepts eligible
307
+ parent inventory/find/ls/grep results and native research/worker/registered descendant
308
+ discoveries before the next model step. Pre-spawn context is prepared after launch
309
+ gates and rechecked after awaits. One parent runtime owns bounded scheduling,
310
+ durable logical reservations, full-question/current-permission cache identity and
311
+ individual waiter cancellation. The parent reads guarded files; native attempts
312
+ receive private, revocable broker assignments, never the provider key. Sandbox,
313
+ tool/depth/tree caps, task authority and mandatory policy remain unchanged.
314
+
315
+ All display-permitted candidates retain ranked or explicit unscored rows; >255 is
316
+ not a semantic limit. Managed per-page artifacts preserve total/offset/next/hash and
317
+ normal orchestrator self-read limits. Discovery/evaluation coverage and complete,
318
+ partial, unavailable, cancelled and skipped differ. Exact read/grep evidence is
319
+ not replaced. Fleet communication capture is opt-in and memory-only: D9 includes
320
+ only hashed owner/attempt, trigger, counts/coverage/elapsed and actual-or-unknown
321
+ usage, never source bodies, raw queries, arbitrary paths or tokens. Configuration
322
+ changes require a new session. Offline production lifecycle/package tests prove
323
+ mechanics, not semantic accuracy or final live activation. See the [D9 guide](system1-file-discovery.md)
324
+ for exact triggers, unsupported surfaces, residual limitations and unpublished
325
+ source/local-tarball commands.
326
+
327
+ ### Optional semantic damage guard
328
+
329
+ D6's parent Hub owns the shared service, task/accepted-input revision, durable
330
+ hold/denial state and shared approval coordinator. Baseline-allowed bash/write/edit
331
+ receive scoped pre-call assessment; only valid severe AND sufficient can hold an
332
+ exact action. When D6 is enabled or this task has a persisted hold/denial,
333
+ native specialists, research helpers and nested delegates have independent
334
+ physical-spawn registration, fresh/revocable assignments (including fallback),
335
+ stripped inherited assignments and no child provider credentials. Disabled D6
336
+ without a persisted fence skips its broker and registration entirely; ordinary
337
+ baseline-protected work does not depend on optional assessment IPC.
338
+ This is independent of D9 consent and cannot expand effective tools, admission,
339
+ OS isolation, budgets or baseline authority. Research stays read-only with
340
+ supported result screening; standalone Damage-Control without trusted assignment
341
+ has baseline only, and coms peers have no native D6 registration coverage.
342
+
343
+ Missing/off/invalid/root-off/unavailable-key means no new D6 inference, not
344
+ removal of durable fences. `/af-damage-override [actionId]` only re-arms a matching
345
+ human dialog, never executes, retries, clears denial or grants path access.
346
+ One-use semantic consent still requires current baseline authority after waiting.
347
+ Original→D6→D8 composition keeps frozen non-aliased original evidence separate
348
+ from appended visible advice; structured `damageGuard` and `fileDiscovery`
349
+ views preserve originals or envelope collisions. Failed capture is a gap and
350
+ warning absence never establishes trust. See the [D6 guide](system1-damage-guard.md)
351
+ for bounded provenance-checked result sources, exact structured API and deadlines.
352
+
353
+ Production wiring exists in the current worktree; named F10 no-network checks
354
+ record SDK/codemode 1.1.0 on Node v25.2.1, not universal compatibility. In that
355
+ SDK, non-structured error rejection exposes the original first block, not coverage
356
+ text (the nested outcome retains coverage/error). D6 remains incomplete/unaccepted:
357
+ A1–A8, independent review/final testing, F12 packaging and F13 final acceptance
358
+ remain open. Documentation and module presence do not close those gates.
359
+
360
+ ### Research search supervision
361
+
362
+ The shared `spawnPiAgent` seam supervises every `read`/`grep`/`find`/`ls` call from native
363
+ research helpers and nested delegate children. The supervisor tracks JSONL `toolCallId` values
364
+ independently, with a default 120-second deadline (`recon-search-timeout-s: 1..3600|off` under
365
+ `## agent-hub`). It is a per-tool watchdog; the whole-run bound is separate — the task-tier
366
+ per-run deadline (`agent-turn-timeout-s`), which terminates a hung run as `turn_timeout`.
367
+ On timeout or caller cancellation it owns and terminates the child's process group (SIGTERM,
368
+ then SIGKILL after a bounded grace), has a separate settlement timer for missing `close`/pipe
369
+ drain, and reports timeout separately from cancellation. Research helpers and nested delegates
370
+ are each given safe process-group ownership; delegates forward parent termination so no detached
371
+ child is orphaned. Full pattern catalog: [references/orchestration-patterns.md](../references/orchestration-patterns.md).
372
+
373
+ ### Usage accounting and supervision
374
+
375
+ The hub records dispatches, research, review rounds and active time across turns and
376
+ saved tasks (`run-budget.js`). None imposes a continuation quota. Legacy
377
+ `max-dispatches-per-turn`, `max-research-per-turn` and `turn-wall-time-s` overrides
378
+ are ignored with migration warnings. Usage remains visible with unlimited caps.
379
+ Task tiers still select delegation, specialist deadlines, recycling and role policy.
380
+ Planner and plan-reviewer are optional at every tier. Wide or high-risk classification
381
+ and System 1 additions retain independent review and action authorization, not a
382
+ Planner admission requirement. Gaps use research; new decisions use `ask_user` grilling.
383
+
384
+ The root operator and native specialists use the drift runtime. Repeated identical
385
+ calls or consecutive failures trigger a bounded judge; a current stuck/drifting
386
+ verdict requests cancellation. Root productive call volume alone never triggers it.
387
+ Judges are fenced at turn/input/session boundaries; an unavailable judge cannot
388
+ fabricate a stop. Root audit entries distinguish an abort request from a confirmed
389
+ physical child stop. This is tool-stream supervision, not a wall-time heartbeat or
390
+ visibility into an external coms peer's own tools. `watchdog: auto` arms it by default;
391
+ an explicit human `off` setting is respected.
392
+
393
+ Individual child deadlines and operator cancellation remain effective. Session
394
+ recycling at run-count/context thresholds and provider concurrency limits remain
395
+ independent resource controls. `agent-turn-timeout-s` and `session-recycle-runs`
396
+ can tighten their tier defaults. Active-time accounting excludes human waits.
397
+
398
+ ### Runtime acceptance and recovery
399
+
400
+ Writable specialist operations (`write`, `edit`, or `bash`) receive the same T2 minimal
401
+ acceptance contract at every task tier. The trigger is the actual operation/tool contract and
402
+ current assertion ledger, not user-language matching or the model's tier label. Read-only
403
+ operations remain lightweight. Language heuristics only expose the fuller verification pack;
404
+ they are supplementary and do not decide whether changed work needs evidence. Pending
405
+ capability leases survive a new-task transition, while stale task packs and assertion state
406
+ reset through the explicit lifecycle path.
407
+
408
+ The runtime-owned result schema is `agent-fleet.runtime-result/v1`. It records orthogonal
409
+ `execution` (`completed | failed | pending`), `changes` (`changed | unchanged | unknown`, with
410
+ `certain | uncertain | not_observed` attribution), `verification`
411
+ (`passed | failed | missing | stale | unsupported`), and `acceptance`
412
+ (`accepted | not_accepted`) dimensions, bound to task identity, before/after revision, command,
413
+ integer exit status, and evidence references. A changed result and failed verification can
414
+ therefore both be true. Compatibility presentation remains
415
+ `not_available | deliverable_failed | needs_verification | accepted` for the Hub and
416
+ `accepted | rejected` for flows.
417
+
418
+ Only native Pi children support trusted runtime checks. The Hub injects the code-owned
419
+ `runtime-test-check.ts` observer only when the native persona has `bash`; the observer wraps the
420
+ existing bash implementation and preserves the normal damage-control `tool_call` approval and
421
+ bash error-event semantics. The parent accepts a check only when producer schema, observed bash
422
+ start, exact declared command, task, coverage metadata, exit status, and unchanged inspected
423
+ revision agree. This proves exact command execution, not semantic adequacy: even a declared
424
+ `true` command can pass, so test quality remains subject to independent or human review.
425
+ Coms peers cannot produce trusted checks, and `manual`/`runtime-ui` requirements currently have
426
+ no trusted producer; all three paths fail closed as missing or unsupported.
427
+
428
+ The observer and trusted event-correlation path have an observed compatibility dependency on
429
+ `@earendil-works/pi-coding-agent@0.84.2`: they rely on its `createBashToolDefinition`, `tool_result`
430
+ hook, `args.path`, and JSON-event passthrough contracts. This records the currently verified API
431
+ surface rather than changing or independently pinning the package version; Pi upgrades must
432
+ re-verify these integration points.
433
+
434
+ Native runs also retain a bounded record of actual tool starts/ends by tool-call identity. T3
435
+ uses those code-owned events only to correlate a terminal, unfenced pseudo-write claim with the
436
+ readback of an explicitly declared deliverable. It never executes tool-shaped text. Fenced
437
+ XML/JSON documentation examples are excluded; a real matching write event with failed readback
438
+ remains a T2 verification/effect failure rather than being relabelled as a protocol failure.
439
+
440
+ A mismatch emits `agent-fleet.tool-protocol-diagnostic/v1` with category
441
+ `tool_protocol_error`, task-or-controlled-probe origin, effective backend/model/tool
442
+ configuration, the claimed effect, matching-event and deliverable facts, `none | partial`
443
+ effects, this-run-only conclusion, and evidence references. The T2 runtime-result dimensions
444
+ remain unchanged and orthogonal. For a real task, the retained diagnostic artifact is the only
445
+ input accepted by the task-generation-bound `establishEffects` recovery port; it records what
446
+ already happened so unchanged retries cannot replay partial effects. It does not authorize a
447
+ retry by itself and does not turn a task failure into a probe result or a universal model
448
+ judgment. The withdrawn T12 runner is not part of this path; historical evidence remains archived.
449
+
450
+ T5's opt-in `filesystem` tool performs deterministic inventory, byte excerpts, artifact readback, and
451
+ local-file-only source snapshots without another model run. It is registered in the Hub and native
452
+ children but appears in their effective tool surface only while the inherited complete profile has
453
+ `assist.deterministic-tools: true`; stale or forged calls are refused at execution too. Profile and
454
+ work-mode changes rebuild the truthful T4 catalog, and compaction reconciles that effective surface.
455
+ Excerpt hashes and reads a window, not the whole file into memory. Native specialist, research, and nested-delegate explicit tool caps remain
456
+ authoritative: the assist flag cannot append `filesystem` outside a declared cap.
457
+ Opaque handles bind canonical paths,
458
+ content hashes/fingerprints, and offsets; continuation fails on stale bytes or directory state,
459
+ and canonical-root checks reject symlink escape. Snapshot bytes and provenance metadata are
460
+ stored separately under the owning current session, marked untrusted, and never interpreted as analysis
461
+ or fetched from a network origin. Snapshot destinations are runtime-owned and cannot be supplied by the
462
+ caller; this narrow artifact creation path grants no general write or shell authority. Every source
463
+ path—including the path resolved from a readback handle—passes through the existing damage-control
464
+ `zeroAccessPaths` hook before execution, preserving its exemptions and interactive/headless approval
465
+ semantics; a denial occurs before source bytes or snapshot artifacts are created. Handle decoding is
466
+ single-sourced in `.pi/harnesses/lib/deterministic-handle-path.ts`, so damage-control retains this guard
467
+ when installed with its declared shared-library companion but without agent-hub. Inventory names and
468
+ all other operation results are marked untrusted. Because snapshot has a managed artifact side effect,
469
+ `filesystem` is not classified as replay-safe for automatic mid-run model fallback.
470
+ `assist.deterministic-tools` and `assist.bounded-output` are independent. Enabling
471
+ `bounded-output` alone bounds read-only tool results inside native specialists, research helpers,
472
+ and nested delegates before the next model continuation, and bounds parent reply transport too;
473
+ `deterministic-tools` controls the deterministic filesystem assistance without being a prerequisite
474
+ for output bounds. The fixed bounds are 500 inventory entries per page, 64 KiB per content/reply,
475
+ and 180 Unicode characters per preview; truncation always names a retained full-output path and
476
+ retrieval handle. With `bounded-output` off, legacy transport is preserved regardless of the
477
+ `deterministic-tools` setting. Inventory records an escaping or unavailable symlink as a denied
478
+ entry without traversing it or disclosing its target outside the authorized inventory.
479
+ T5 does not consume `assist.write-isolation`; the separate T6c native launch boundary does.
480
+ `assist.return-extraction` is opt-in help for models that forget `submit_result`: a native
481
+ specialist with tracked assertions that never submits gets the cheap read-only extraction pass
482
+ over its written report. The recovered block is labelled extracted, `resultProtocol` stays
483
+ `submission_missing`, and acceptance still depends on runtime evidence.
484
+
485
+ Invocation preflight for `dispatch_agent` and `spawn_research` validates the original
486
+ shape before normalization. Invalid input reports bounded safe field locations and
487
+ expected/actual types or reasons (`invalid_invocation_shape`), without raw values or
488
+ private payloads; unsafe unknown-key locations are redacted. This is distinct from
489
+ `invocation_persistence_failed`, where valid input could not be durably retained.
490
+ Both refuse before executor launch; persistence refusal releases the in-memory
491
+ reservation even when storage cannot retain failure evidence. Correct the named input
492
+ or storage prerequisite and re-invoke explicitly under unchanged gates and budgets.
493
+
494
+ Recovery remains the single T1 contract: no automatic retry, queue, model fallback, or new
495
+ numeric allowance. Busy work is refused before execution accounting or history mutation and is
496
+ not recorded as no-progress failure. Runtime-owned preflight refusals (`not_started`,
497
+ `started:false`, `effects:none`) never launched a process and never become indeterminate
498
+ attempts: correcting the input/prerequisite (tier, scope, artifacts, catalog, process) and
499
+ re-invoking explicitly proceeds without slash reset, grant, or reconcile, with 0 physical
500
+ launches and 0 indeterminate attempts. Refusals use separate accounting and never consume
501
+ turn/task launch counters; the anti-loop boundary stays in the guard (unchanged fingerprint
502
+ stays refused) while budgets still fail closed on real launches. A settled indeterminate failure permits at most one
503
+ explicit, warned, human-authorized retry per logical operation after the prior process is
504
+ confirmed finished and the executor is idle; partial side effects may be duplicated. Neither
505
+ `/af-recover retry <operationId> <attemptId>` nor legacy `/af-retry <dispatchId>` executes work:
506
+ both use the same authorization lane and offer a stored original-contract invocation for a
507
+ separate explicit tool call under unchanged budgets and safety gates. Pending/unknown process,
508
+ second grant, stale IDs, and missing/invalid/abandoned contracts each fail closed with their
509
+ own reason and next actions (independent inspection stays allowed; replay without a validated
510
+ contract does not). `/af-recover inspect` is
511
+ read-only and reports `not_started` history as needing no slash reset; `reconcile` clears only a technical block when independent current-revision
512
+ readback and nonblocking reviewer evidence cover the failed attempt, leaving the immutable
513
+ failure and open T2/T11 requirements intact; `abandon` never satisfies dependent work.
514
+ Wrapper and evidence producers share one canonical executor identity
515
+ (`canonical([cwd, actor])`), so production reconcile matches; task-scoped logical identity is
516
+ separate from the persistent effect fence (phantom `not_started` from another task is never
517
+ inherited, while cancel/unknown-write/indeterminate fences survive task/model/scope changes).
518
+ Launch/close/termination facts travel separately from exit/acceptance: safety refusal and
519
+ spawn failure never launched, timeout without close stays uncertain, and integer exit alone
520
+ never proves settlement. Unknown shell/backend stays a potential effect with no regex
521
+ exemption; the usable inspection route is the effective catalog's read/grep/find/ls (or the
522
+ opt-in filesystem tool) with an explicit target path. Tool availability is never gate
523
+ admission. Legacy preflight history is freed only with positive runtime-owned no-launch
524
+ evidence, never by missing records; unsupported schemas refuse effects without state deletion.
525
+ Operator cancellation fences the same agent identity until a fresh, one-use authorization is consumed.
526
+ Other agent identities—including the anonymous, read-only research actor—remain independent,
527
+ and a task reset does not erase the cancellation fence. Native session reuse is bound to an exact,
528
+ normalized current-task contract (task identity, instructions, scope, deliverables, input artifacts,
529
+ effective model, and permissions). A different/narrower task starts with a fresh session and
530
+ replacement manifest; only an exact continuation, including the auto-research continuation path,
531
+ receives Pi resume transport. This remains context hygiene rather than confinement.
532
+
533
+ When `assist.write-isolation` is explicitly true, dispatch snapshots that effective setting before
534
+ routing and forces a native child. Explicit coms is refused because remote isolation cannot be
535
+ claimed. The complete Pi process and descendants run under Linux bubblewrap or macOS Seatbelt;
536
+ the repository/root view is read-only except for existing exact relative files, expressly allowed
537
+ existing recursive directories, and separate current-run runtime/artifact/temp roots. Glob scope,
538
+ absolute/escaping scope, symlinked grants, an empty writable grant set, absent or wrong-platform
539
+ backends, and sandbox launch failure all fail closed without an unsandboxed retry. Damage-control remains the policy/audit/
540
+ approval overlay, but an approval cannot widen the OS boundary already created for a run; a wider
541
+ path requires a new explicitly authorized dispatch contract. Network, model, and read access are
542
+ otherwise unchanged. Turning the profile flag off does not dismantle an
543
+ active process boundary; the next run takes a new snapshot. Opt-out retains the legacy spawn path.
544
+ The sandbox never rolls back or deletes user edits, and it cannot protect an allowlisted file from
545
+ a concurrent writer. Exact-file grants support direct writes to the existing inode but intentionally
546
+ block temp-file-plus-rename atomic saves; callers must explicitly grant the containing directory for
547
+ that behavior, and the runtime never widens the grant automatically. Sandboxed spawn uses exactly
548
+ three pipe stdio entries and rejects extra inherited descriptors, closing the known writable-FD
549
+ bypass. Linux deliberately preserves the Hub-owned process group instead of adding a PID namespace,
550
+ and `/dev/tty` remains narrowly available; confinement therefore assumes host ptrace and terminal
551
+ injection controls prevent same-uid cross-process escape (for example Linux Yama ptrace restrictions
552
+ and disabled legacy TIOCSTI). Linux enforcement is exercised on a real bubblewrap host. Seatbelt
553
+ canonicalizes only trusted runtime/artifact/temp aliases such as `/tmp` → `/private/tmp`, while user
554
+ scope grants retain strict symlink rejection; its only device write exceptions are literal
555
+ `/dev/null` and `/dev/tty`, never a blanket `/dev` grant. The Seatbelt profile has contract coverage
556
+ but still requires a Darwin runtime check before T6c is fully verified.
557
+
558
+ T4 adds a code-owned effective-tool catalog without creating another recovery policy. Every
559
+ application of work-mode tools compares the actual active catalog before and after
560
+ `setActiveTools` and can emit `agent-fleet.tool-catalog-delta/v1`: removed, added/available,
561
+ active substitutes with explicit limitations, `permissionExpansion: false`, and SHA-256 catalog
562
+ identities. The delta is persisted as a trusted session entry and included in the next system
563
+ prompt. A substitute is only
564
+ an already-active path such as `dispatch_agent` or read-only inspection, and is never invoked by
565
+ the catalog machinery.
566
+
567
+ The runtime latches the effective catalog at `before_agent_start`. Actual assistant tool-call
568
+ blocks are compared to that originating-turn catalog on the real `message_end` path, so a
569
+ next-turn mode switch cannot charge an unknown-tool refusal for a call that was legal when the
570
+ turn began; text blocks are ignored and no pseudo-tool text is executed. On `session_compact`,
571
+ the runtime reconciles the restored `agent-fleet.tool-catalog-state/v1` identity with Pi's current
572
+ active tools, persists restore evidence, and retains the task-scoped unknown-tool counter. Catalog
573
+ errors are recorded fail-closed but cannot skip the existing compaction settlement/deferred-input
574
+ lifecycle.
575
+
576
+ Each unavailable tool refusal is keyed by normalized task and tool, while normalized arguments
577
+ and catalog identity record whether the request or availability was reevaluated. The
578
+ operator-approved limit is exactly three counted refusals, including the first. Mode switches,
579
+ compaction, prose, and real catalog changes never refill it; only the explicit new-task lifecycle
580
+ resets it. A real `unknown_tool` dispatch failure is stamped by the Hub with the latched,
581
+ code-owned catalog identity; a result-supplied identity is ignored. A later successfully persisted
582
+ effective-catalog event can establish `toolStateChanged` evidence for the existing T1
583
+ `unknown_tool` `recoveryDecision`, but still requires explicit reinvocation and existing general
584
+ budgets; it never schedules an automatic retry.
585
+
586
+ Qualitative guardrails remain separate from usage accounting. **Task triage** classifies
587
+ the current task (`trivial`/`small`/`feature`/`project`) for delegation, role and
588
+ individual-process resource policy. It survives follow-ups; lowering is free and
589
+ raising needs a recorded reason. Skipped triage assumes small. Near-identical
590
+ dispatches retain the duplicate guard. Architect, security-auditor and deep-researcher
591
+ retain the trivial/small persona gate; Planner and plan-reviewer are optional at
592
+ every tier. Review rounds are uncapped. Review findings retain their advisory
593
+ budget and source-invariant rule; findings are never silently demoted by position.
594
+ **Process obligations (T11)** are task-scoped and independent of that budget tier. The
595
+ `set_task_tier` tool accepts explicit `risk` (`unknown | low | high`) and process `scope`
596
+ (`read-only | small | wide`); neither is inferred from task prose. Legacy/omitted risk is
597
+ `unknown`, risk changes require a reason, and scope expansion requires a reason plus an
598
+ explicit risk reassessment. Unknown permits read-only research but cannot accept changed
599
+ work. Confirmed low-risk small work uses the existing T2 minimal acceptance path; high risk
600
+ adds a separate review stage; wide work also requires independent review. Planning
601
+ is optional and never a pre-effect gate. Current stage evidence names an artifact
602
+ and revision, without claiming that a model review is semantically adequate. A
603
+ requested Planner still needs genuine declared artifact readback to record plan
604
+ occurrence. Missing optional planning cannot block an authorized builder, direct
605
+ operator or coms peer. Exact-action authorization, independent review, current
606
+ verification and task-transition fencing still govern their respective effects.
607
+ Exit 0, prompt echoes, pending transport and stale evidence cannot replace them.
608
+
609
+ Sensitive-work prohibitions remain distinct from positive requests in handoff
610
+ advice; neither positive nor ambiguous wording mandates a Planner. Resolve factual
611
+ gaps with focused research and additional decisions with `ask_user` grilling.
612
+
613
+ Dispatch observation preserves the existing snapshot when the session cwd is a Git
614
+ worktree. For a non-Git parent it resolves only the literal anchors of declared scopes to
615
+ their nearest nested Git roots, rejects roots outside the workspace, and runs path-bounded
616
+ status there without recursive discovery or file-content capture. Each repository retains
617
+ its HEAD and file metadata separately. Deltas and compiler diagnostics are reported with
618
+ workspace-relative paths; compiler discovery runs at the owning repository. Missing roots
619
+ and changed HEADs create scope-specific gaps while other roots remain observable. Partial
620
+ observation or unavailable compiler coverage cannot establish acceptance through a passing
621
+ sibling repository. Runtime session outputs are excluded from nested observation. These
622
+ are local source guarantees, not evidence that an installed workspace copy was upgraded.
623
+
624
+ The same code-owned state is consumed by dispatch acceptance in operator and orchestrator
625
+ modes, appended as `agent-hub-process-state`, restored from the session log, and retained
626
+ through compaction and mode changes. Only `set_task_tier(new_task: true)` creates fresh
627
+ unknown-risk process state. `/af-audit` exports allowlisted satisfied/open/unsupported
628
+ obligation statuses and explains that the budget tier limits spend rather than correctness;
629
+ reasons and task prose are not copied. This extends the existing task/acceptance/audit paths
630
+ and is not a second workflow engine.
631
+
632
+ **Docs lane** (`docs-lane.js`): a dispatch whose whole declared `scope` is documentation
633
+ refuses review personas (overridable with `review_reason`) and tells the dispatcher not to
634
+ open a review gate; an absent scope is never the lighter lane. **External-blocker stop**
635
+ (`external-blocker.js`): a specialist emits `EXTERNAL_BLOCKED: …` when it needs something
636
+ outside the fleet's reach (account, permission, credential, telemetry destination), and the
637
+ hub refuses the next dispatch with an owner-escalation packet until the human is addressed —
638
+ the alternative, observed, is hours spent approximating the missing fact with scripts,
639
+ manifests and fixtures while the assertion still ends UNPROVEN. **Drift watchdog**
640
+ (`drift-watchdog.js`): armed dispatches are
641
+ observed in-flight from the JSON event stream — deterministic rules (out-of-scope writes
642
+ against the declared `scope` globs, tool-call loops, consecutive failures, tool-call cap)
643
+ escalate to a one-shot cheap LLM judge whose DRIFTING/STUCK verdict terminates the run as
644
+ `drift_stop` (exit 125, partial output preserved); enabled per hub/agent/dispatch
645
+ (`watchdog` key, `/af-watchdog`, `watchdog` param); a dispatch `watchdog` param wins over the
646
+ per-agent and hub settings. Hub or per-agent `off` remains the opt-out. Two rules about scope: the session's
647
+ own `artifacts/`, `findings/`, and `delegations/` subtrees are implicitly in scope (the
648
+ deliverable protocol *orders* specialists to write there, and the judge is told so), and the
649
+ `scope` rule is non-terminal — it reports a drift advisory on the result and never stops a
650
+ run by itself, matching the post-run scope gate, which reverts nothing. **Dynamic teams**: `/af-agents-add`,
651
+ `/af-agents-drop`, `/af-agents-save` restructure the roster live (the system prompt rebuilds
652
+ every turn), and the gated `team_adjust` tool lets the dispatcher itself adjust the roster
653
+ when nested delegation is on (feature/project), with user notification. `/af-hub-report` accounts each turn's dispatches,
654
+ tokens (billed = input + cacheRead + cacheWrite), recycles, drift stops, and refusals.
655
+
656
+ ## Runtime stack (tools the fleet sits on)
657
+
658
+ ```mermaid
659
+ flowchart TD
660
+ AF["<b>Agent Fleet</b><br/>agent-hub · personas · skills · coms · bridges · CLI"]
661
+ AF -->|primary runtime| PI["<b>pi</b><br/>coding agent — loads harnesses,<br/>extensions, prompts, personas"]
662
+ AF -->|control plane| HERDR["<b>herdr</b><br/>tiled peer workspaces,<br/>presence, snapshot/resume"]
663
+ AF -->|coms peer only| CC["<b>Claude Code</b><br/>bidirectional peer via<br/>the coms bridge<br/><i>not an install target</i>"]
664
+ AF -->|remote human| HERMES["<b>Hermes</b><br/>hub questions relayed to your phone,<br/>plus the Desktop fleet panel"]
665
+ AF -->|Local native MCP| CODEX["<b>Codex native workflow</b><br/>explicit existing sessions<br/>text or voice; no idle wake"]
666
+ ```
667
+
668
+ ### Explicit operator current-state verification
669
+
670
+ `dispatch_agent.review_mode="operator-current-state"` is an explicit native-only verification contract for current Git-visible scoped files, not reconstructed edit authorship. In a workspace root that is a plain folder holding nested repositories, each file is observed in its own repository, any file outside an observed repository refuses the whole candidate, and the revision is the per-repository basis described in [workspaces with nested repositories](#workspaces-with-nested-repositories). When an assertion proof is refused because review is open, the refusal names this route for operator-made edits, or the reviewer dispatch that covers registered changes. It snapshots the current task/revision, requires complete independent same-state review plus fresh runtime checks for every active automated assertion and AF-MIN-CHANGE, and preserves default changed-task/review/cancellation/action-confirmation gates. Process path/origin distinguishes current-state acceptance; read-only child `changes=unchanged`/`taskAccepted=false` and unsupported manual assertions are not rewritten. Scope mutation, stale input/revision, missing checks or concurrent writers fail closed. No automatic reload, grants, historical records or ledger proof is added. See [contract and manual activation](operator-current-state.md).
671
+
672
+ ### Local Codex observation boundary (experimental)
673
+
674
+ The STDIO MCP adapter, registered at the user level by `agent-fleet set-codex-mcp` ([setup guide](codex-setup.md)) or through a manual project-local table, uses validated per-call host conversation context and an exact Fleet epoch allowlist (D2-L: cooperative same-user routing, not cryptographic authority). Discovery/read checks are registry-only; `fleet_observe` authorizes before and after one bounded local snapshot. `fleet_overview` aggregates 1–4 explicit selectors with target-local errors and summary-only question previews. Observations never send prompts or answers. Separate instruction/answer prepare/commit/receipt tools require current rights. An explicit user send in the native chat to one unambiguous, already selected current session with read+send authorizes faithful relay without a second confirmation; the client still checks the prepared payload and commits once. Ambiguity requires clarification, changed sessions stop dispatch, and model-initiated or substantively expanded instructions require fresh preview confirmation. This cooperative client interpretation is not server-attested human consent and does not relax binding/grant, question-answer, host approval or receiver execution safeguards. Unknown/partial data and non-atomic snapshots remain explicit; neither registry presence nor a turn boundary establishes task completion. There is no CLI transport fallback, external listener or implicit binding grant. The separately opt-in experimental Desktop queue adapter has limited externally smoke-tested wake evidence, not a general delivery guarantee. Question notifications share a canonical lossless reference codec across ingress, packet and reply; legacy-safe references remain stable, while opaque IDs use a versioned encoding with a derived finite wire bound. The native ID contract, authorization and replay/deadline checks are unchanged. See the [native contract](codex-local-mcp.md).
675
+
676
+ S5c adds observation-only durable metadata in a separate private `<policyRoot>.observations` namespace, keyed by validated conversation and exact target epoch; it does not alter the allowlist schema or import legacy CLI authority. Stable opaque event/window identities extend the bounded receiver projection. Typed `fleet_resync` and active `fleet_watch` declare local writes (`readOnlyHint=false`), preserve pre/post authorization, and report independent gaps/reset/unsupported continuity and pending/resolved question observations. Cursors are not permission or human-delivery receipts. Watch is bounded by duration, frames, output and concurrency; it does not create background jobs/model wake or cancel Pi work. Source/local verification is not native receiver/MCP activation; any lifecycle/epoch changes remain human-controlled and separate.
677
+
678
+ ### External dependencies
679
+
680
+ These are the external systems Agent Fleet assumes or integrates with — not npm packages, but the **runtime stack** the fleet operates on top of.
681
+
682
+ | Dependency | Role | Required? |
683
+ | --- | --- | --- |
684
+ | **[pi](https://github.com/badlogic/pi-mono)** (or your pi install) | Primary coding-agent runtime; loads harnesses, extensions, prompts, and personas | Yes for `just fleet` |
685
+ | **[herdr](https://herdr.dev)** | Workspace control plane: Hub/peer panes, presence push events, team snapshot/resume | Required for `--herdr` or `--peers`; optional for bare `just fleet` |
686
+ | **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** | First-class coms peer via the [coms bridge](claude-code-coms-bridge.md) — cross-model review and analysis. Never an install target: it hosts no skills, commands, or personas | Optional peer |
687
+ | **Hermes** | Remote human-in-the-loop (Telegram relay for hub questions — [coms-hermes-bridge](coms-hermes-bridge.md)) and the Desktop fleet panel ([hermes-desktop-plugins](hermes-desktop-plugins.md), needs v0.19.0+ and the Desktop app) | Optional |
688
+ | **Compatible Codex host** | Local native MCP with real per-call UUID context, Node 22.18+ and existing COMS sessions — [guide](codex-local-mcp.md) | Explicit local configuration; CLI-only hosts retired, no mobile/remote promise |
689
+ | **[addyosmani/agent-skills](https://github.com/addyosmani/agent-skills)** | Upstream skill library (manually vendored) | Bundled (vendored) |
690
+ | **[disler/pi-vs-claude-code](https://github.com/disler/pi-vs-claude-code)** | Source inspiration / MIT port origin for pi harnesses | Design lineage (ported in-repo) |
691
+ | **LLM providers** | Models per persona (`model:` / `models:` in agent frontmatter) — e.g. OpenAI Codex, GitHub Copilot, Ollama, … | Yes (at least one provider your agents can call) |
692
+ | **Chrome DevTools MCP** / **Playwright Agent CLI** | Browser verify (`browser-testing-with-devtools`) and headless automation (`bowser`) | Optional, feature-specific |
693
+ | **Node.js + npm** | CLI (`npx @chankov/agent-fleet`), package install, `just` recipes | Yes for install & tooling |
694
+
695
+ The existing `agent-fleet doctor` command also performs a read-only manifest preflight. It reports exact selected installation files and manifest-declared tool probes as environment readiness, distinguishes missing installation from unknown or unavailable platforms, and names the existing explicit remediation path. Bare doctor never repairs or installs; `doctor --fix` remains the only repair activation, and package/tool installation remains behind its existing explicit consent path.
696
+
697
+ ### System 1 watchdog consumer (off by default)
698
+
699
+ The native specialist Layer 1 drift watchdog can use the shared System 1 runtime
700
+ only after explicit `watchdog-system1: shadow|active` in `## agent-hub`, feature selection,
701
+ valid provider configuration, an available key and an armed watchdog. It takes a
702
+ session snapshot; setup and doctor do not infer. Shadow starts the LLM judge at
703
+ once and separately observes the same bounded state with Jev. Only the LLM
704
+ verdict may terminate a child; an unavailable LLM judge is recorded as
705
+ `judge_unavailable` and gets one revalidated retry at 5 s, not a successful
706
+ 90 s cooldown. Successful decisions keep 90 s. Every physical attempt has
707
+ separate identities; D1 retries create a new snapshot and do not reuse or
708
+ repeat the previous System 1 evaluation.
709
+
710
+ The state carries a redacted task, relative scope/paths, up to 40 structured
711
+ kinds/outcomes/repeat counts, rule facts and coverage, not raw arguments,
712
+ commands, edit bodies or outputs. This limit applies to System 1 only: the
713
+ existing parallel LLM judge prompt contains the original task, scope and a
714
+ recent trail with up to 120 characters of raw tool arguments per call. Use
715
+ only reviewed nonsecret pilot inputs; manual review does not rule out
716
+ unexpected agent actions. The native spawn boundary removes
717
+ `TYPESAFE_API_KEY` after env overrides. This cannot prevent file reads or
718
+ requests from other launchers. The append-only session watchdog trace stores
719
+ only safe metadata, with explicit unknown usage and interrupted readback.
720
+ The below-chat Fleet strip and `/af-agents` owner detail share a projection;
721
+ `/af-watchdog` shows readiness/active blocking, `/af-hub-report` separates
722
+ watchdog checks, S1 evaluations and LLM attempts, and `/af-audit` lists safe
723
+ read-only lifecycle outcomes. UI/trace failure does not change judgment.
724
+
725
+ `watchdog-system1: active` explicitly opts into an **uncalibrated experimental**
726
+ shortcut available in installed workspaces: only advisory `scope` may skip LLM
727
+ when Jev `jev-1.13.0` reports provider on-track with confidence and on-track
728
+ distribution ≥0.95 and all three contradiction probabilities ≤0.05. Terminal
729
+ rules always use the LLM; System 1 cannot stop a child. The watchdog status
730
+ labels the mode `experimental: scope only; G2 not validated`; default remains
731
+ off and production approved profiles remain empty. Human snapshot labels,
732
+ session-separated held-out measurement and independent maintainer G2 approval
733
+ are still required before calling this calibrated or expanding its authority. Offline tests and installed-package checks do not
734
+ constitute a live pilot (G1) or active approval (G2). Roll back with
735
+ `watchdog-system1: off` and restart Hub; cancel the current run if needed.
736
+
737
+ ### Proactive turn review (separate opt-in consumer)
738
+
739
+ The Hub's `proactive-*` modules compose a separate, off-by-default consumer of the
740
+ existing shared System 1 library and its provider/key; they do not create another
741
+ provider owner or change watchdog authority. A human-owned per-repository
742
+ `consumers.proactiveReview` in `.ai/system1.json` selects `off`, `shadow`, or `advisory` and exact
743
+ repository-relative include scope. Missing/off means **zero proactive capture,
744
+ inference, and feedback**. Enabled config with `remoteContext: "disabled"` is
745
+ local-only: bounded source/rule capture and reviewed local validators may run,
746
+ but no semantic provider assessment. `selected-excerpts` separately permits
747
+ bounded selected source/assistant excerpts to the shared System 1 service when
748
+ it is ready; shadow records findings without delivery, advisory may deliver
749
+ feedback at the next *already-occurring* context hook for the same owner,
750
+ attempt, task, and bound rule/source revision. It never creates a turn, fixes
751
+ code, terminates work, changes acceptance gates, or suppresses the watchdog.
752
+ No activation, outbound transmission, or remote repository authorization is
753
+ conferred by installing this code or reading this documentation.
754
+
755
+ At `turn_start`/`turn_end`, Hub and supported native Pi specialists bind the
756
+ explicit task/plan and session rule catalog, collect bounded immutable
757
+ before/after worktree and text evidence, and retain private snapshots separately
758
+ from metadata-only finding/report projections. Source-backed rules come from
759
+ `rules:` folders in `## agent-hub` (legacy `## agent-team`), with index-first
760
+ Markdown discovery, explicit linked sections, and bounded fallback; discovery
761
+ is read-only and never executes rule instructions. Rule identity includes path,
762
+ heading occurrence and hash. Incomplete discovery, unselected sections,
763
+ unsupported Markdown, missing plan (`task_only`), concurrent edits, and
764
+ changed source stays partial, unsupported, uncertain or stale—not
765
+ confirmed passes. Rule references use the session-bound revision: on-disk rule
766
+ edits do not themselves stale a finding, and a restart is required to adopt them. Only explicitly reviewed bindings support deterministic
767
+ local link-form and new-file-placement checks; model findings remain
768
+ suspicions, not validated bugs. Rules are **bound per session**: editing a rule
769
+ in a running session does not reload it; restart to adopt edits. Research
770
+ helpers, nested delegates, coms peers and Hermes are not instrumented by this
771
+ consumer. Native observer hooks/integration were checked with repo-local Pi
772
+ 0.84.2; Node 18 compatibility concerns the extracted installer CLI/doctor,
773
+ not running the TypeScript observer under Node 18.
774
+
775
+ Limits and exclusions, exact config, local report/labels usage, and consent
776
+ sequence are in [Project Files — Proactive turn review](agent-fleet-setup.md#proactive-turn-review-experimental).
777
+ Offline/installed tests and C5 operator visibility establish neither live-pilot
778
+ utility nor universal correctness. The finding-label source fix passed final independent source/docs review;
779
+ this establishes offline/package readiness, not human-labelled semantic acceptance. Only retained finding keys
780
+ are exposed for human labels: checked-clear units lack an operator-accessible
781
+ key, so miss/true-negative labeling and full recall evaluation are not operational.
782
+ C7 human acceptance and any release/deployment remain separate. Current caveats include
783
+ unknown native delivery without a receipt and a rare async-close error risk.
784
+
785
+ ### Experimental System 1 foundation
786
+
787
+ System 1 is a shared Fleet library for bounded structured judgments, not a Pi
788
+ model and not a workflow stage. Its provider-neutral contract exposes
789
+ `choice`, `predicate`, and `ordinal` questions with explicit `ok`, `skipped`,
790
+ `unavailable`, `unsupported`, and `cancelled` outcomes. A valid judgment never
791
+ grants action authority. The contract retains distributions, predicate
792
+ probabilities, and provider confidence when supplied and required, but never
793
+ invents missing uncertainty or treats provider confidence as universal
794
+ calibration.
795
+
796
+ The shared service requires saved desired selection of experimental `system1`,
797
+ directly or via its `system1-task-triage` feature dependency; automatic Full
798
+ excludes both. Use `--save-desired` for permanent CLI changes over an existing
799
+ human-owned `.ai/agent-fleet.json`. Provider configuration is a
800
+ separate human-owned `.ai/system1.json` with exactly this version-1 contract:
801
+
802
+ ```json
803
+ {
804
+ "version": 2,
805
+ "mode": "auto",
806
+ "provider": "typesafe",
807
+ "model": "jev-1.13.0",
808
+ "apiKeyEnv": "TYPESAFE_API_KEY",
809
+ "consumers": {}
810
+ }
811
+ ```
812
+
813
+ Selection, valid `mode: "auto"` configuration, and a nonempty key in the
814
+ caller's environment are all required. `mode: "off"` wins, and key presence by
815
+ itself never activates the service. The runtime and imports do not load `.env`
816
+ or mutate global environment. Managed `just` launches may load the workspace
817
+ root `.env`; direct Node launches must export or inject the key themselves.
818
+
819
+ The only phase-0 production adapter uses the fixed official TypeSafe endpoint
820
+ and pinned `jev-1.13.0` model. It has a 2,000 ms total deadline, including body
821
+ collection and at most one budget-fitting retry for 429/529, rejects redirects,
822
+ and bounds request and response bodies at 1 MiB without truncation. Cancellation
823
+ prevents retry and late-result use; a 401 latches that service instance. Normal
824
+ failures return structured, sanitized outcomes rather than raw response bodies.
825
+ There is no arbitrary endpoint, SDK dependency, Pi/local-model fallback, daemon,
826
+ or local-model installation.
827
+
828
+ Doctor reuses the shared configuration validator and is advisory, read-only,
829
+ and offline—even with `--fix`. It does not inspect or load `.env`; key presence
830
+ in its current process remains local readiness, never API validity. The standalone
831
+ demo is also offline by default; only explicit `--live` sends its embedded
832
+ synthetic Bulgarian/English examples. Public setup and commands are documented
833
+ in [Install and lifecycle](npm-install.md#experimental-system-1-foundation).
834
+
835
+ Consumers own their field allowlists, data consent and policy separately. The
836
+ native managed child spawn filters the shared key, but this is not universal
837
+ file/environment isolation for arbitrary launchers. Watchdog's active scope
838
+ shortcut, profile-gated dispatch advice and active uncalibrated task triage are
839
+ different contracts; one consumer's profile/consent cannot enable another.
840
+
841
+ Evidence stays split: Node 18 verifies installer/doctor portability, real-Pi
842
+ synthetic sessions verify registered runtime hooks, and an extracted tarball
843
+ verifies install/import closure and disable/resume gates. Human UI observation
844
+ and independent checkpoint reviews are separate. None proves live Jev accuracy,
845
+ calibration, semantic assertion adequacy or universal remote effects.
846
+
847
+ ### Task triage: additive process evidence, not spend authority
848
+
849
+ The separately consented `system1-task-triage` consumer evaluates accepted user
850
+ input before the first Hub model turn, using the existing shared service even
851
+ with watchdog off. It supplies bounded user text and declared scope, not file
852
+ bodies, environment, transcripts or tool output. Runtime limits are 40 KiB
853
+ aggregate task/clarifications, 64 KiB serialized state, 100 logical evaluations
854
+ per saved session and a 2,000 ms deadline including adapter retries. Cache keys
855
+ bind input/scope/version; task adoption and compaction/resume cannot refill the
856
+ allowance. Physical attempts and unknown usage remain distinct from logical calls.
857
+
858
+ Independent intent-aware predicates at inclusive thresholds add review
859
+ (`security_change` ≥0.80), review (`wide_change` ≥0.85), or exact-action human
860
+ confirmation (`irreversible_execution` ≥0.80). They do not set risk/tier, select
861
+ a model/roster, increase spend or weaken baseline protections. Low probabilities
862
+ are not clearance; missing/invalid/provider-failed results add nothing while
863
+ existing obligations persist. This is active experimental policy, not calibrated
864
+ persona advice or a watchdog stop profile.
865
+
866
+ Source additions retain task/evaluation/input provenance and union with baseline
867
+ requirements. New scope invalidates uncovered evidence. A narrow correlated
868
+ human waiver releases one bound addition as `waived`, not `satisfied`; baseline
869
+ and other-source requirements survive. Pending task transition and authoritative
870
+ state/grant/consumption persistence refusal fence dependent effects. While that fence is up, `set_task_tier` and `ask_user` remain callable; any other tool is a diversion. The first assistant step that calls another tool is refused with the bind hint on every tool in that step and is not aborted, so the model can call `set_task_tier` next. A later step that still does not bind stops the turn, including its parallel batch, by aborting the run instead of repeating the same retryable refusal. The fence is persisted and restored on resume until `set_task_tier` clears it. Supported
871
+ Optional native planning and required review use the existing evidence path; exact-action
872
+ confirmation supports Hub direct bash/edit/write, not arbitrary child/remote/coms
873
+ execution. The human question shows complete tool inputs as JSON and cwd with
874
+ an **8 KiB (8192 bytes)** full-detail cap: invalid, missing, sensitive,
875
+ terminal/bidi-control, oversized or mismatched details refuse **without
876
+ truncation or partial redaction**. JSON preserves non-ASCII input through escapes;
877
+ sensitive-text detection remains heuristic. The one-use binding and pre-effect
878
+ recheck include task/revision, tool call, operation, input hash and cwd.
879
+ The question is **not local-only**: configured ask-user local/remote human routes
880
+ can carry action paths/content. Normal Pi tool/session rendering, human-route
881
+ records and clipboard are separate from metadata-only audit and its caps.
882
+ Unsupported bindings refuse the affected operation.
883
+
884
+ The full Fleet dashboard and `/af-audit` separate declared classification,
885
+ assessment, effective obligations, source waivers, blockers, logical calls,
886
+ physical attempts and recorded action grant/consumption/tool result. None means
887
+ semantic task acceptance by itself. New persistent trace/audit projections are
888
+ metadata-only; optional observation failure cannot alter enforcement. The
889
+ communication viewer stays separately opt-in, memory-only and capped at 32 KiB;
890
+ a larger valid task payload is withheld, not truncated. Task-triage presentation
891
+ is session-level and does not fabricate worker rows or a second dashboard.
892
+
893
+ Setup creates absent nonsecret consumer/provider templates transactionally only
894
+ with explicit task-context consent; it preserves existing configs/off. Disable
895
+ and restart stop future calls without deleting resumed obligations. Detailed
896
+ schema, saved desired selection, role/budget recovery, narrow waiver and rollback
897
+ are in [Project Files](agent-fleet-setup.md#task-triage-active-experimental-off-by-default).
898
+
899
+ ### Execution tracing and baseline policy classification
900
+
901
+ The Hub records `agent-hub-execution-trace` custom entries in the existing Pi
902
+ session JSONL journal. By default Pi keeps it under `~/.pi/agent/sessions/`, in a
903
+ directory named after the workspace's absolute path (for `/home/user/project`:
904
+ `--home-user-project--`); a configured Pi session directory may differ. These entries complement the Fleet session directory under
905
+ `.pi/agent-sessions/sessions/<fleet-session-id>/` and existing coms/Herdr logs.
906
+ `/af-audit` exposes their sanitized chronological `executionTrace` projection.
907
+ Schema v2 writes one row per finished span (start, end and outcome together);
908
+ turn and child spans also journal their start so an interrupted session still shows
909
+ what was in flight, and other unfinished spans appear in the live audit only. Older
910
+ v1 journals with separate start and end rows remain readable.
911
+
912
+ Root Pi hooks record input, turns, model rounds and tool requests/results. Existing
913
+ native callbacks link children to their dispatch and report child tool activity.
914
+ The shared Pi event bus connects process/baseline/semantic guard decisions and
915
+ runtime/model questions across isolated extension loaders. Native semantic-broker
916
+ requests join a tool only for one exact input fingerprint, owner and time range;
917
+ ambiguous requests stay visibly unlinked. Remote peers without these callbacks do
918
+ not acquire complete telemetry automatically.
919
+
920
+ Pi emits tool start before permission hooks. A denied request therefore has tool
921
+ activity but no fabricated execution duration. Actual execution duration comes
922
+ from the SDK; human waits and queue waits are separate observations. Overlapping
923
+ intervals count once. Model-round timing includes preparation and is not provider
924
+ latency alone. All aggregates cover only the retained 5,000-row trace window;
925
+ dropped, open, interrupted, invalid and unlinked records remain explicit. Old
926
+ journals without trace return `not_recorded` and unknown timing. Persistence
927
+ failure cannot block work: the live audit uses available memory and reports
928
+ `live_degraded`. Session shutdown releases the bus listener and fences late
929
+ completions; a proposed switch that is subsequently cancelled keeps its spans.
930
+
931
+ Only allowlisted metadata and hashed task/input/call/rule identities are stored
932
+ in the new trace. Commands, paths, user prose, answers, results and credentials
933
+ are excluded. Other existing Pi/session/coms logs retain their own payload rules.
934
+ Trace never grants permission, proves progress or accepts a task.
935
+
936
+ Baseline Bash policy now distinguishes supported static operands from literal
937
+ data. This fixes repository-relative `/bin/` collisions, read-only inspection of
938
+ `dist/` or lockfiles and quoted cat/tee heredoc fixtures containing protected-path
939
+ or deletion examples. Real redirects, writes, deletion and compound effects stay
940
+ guarded. Expanding shell syntax, interpreters, `sed`, `file` and ambiguous attached
941
+ short options retain conservative text checks; the trace labels which analysis was
942
+ used. This is a narrow classifier, not a shell sandbox or a guarantee against all
943
+ future false positives. Reload/restart the harness to activate updated sources;
944
+ separate copied installations still need their normal workspace update.
945
+
946
+ ## Repository module map
947
+
948
+ ### Agent Hub composition
949
+
950
+ `.pi/harnesses/agent-hub/index.ts` owns mutable Hub state and composes the extracted concerns without merging their context contracts:
951
+
952
+ ```text
953
+ agent-hub/
954
+ ├── index.ts # bounded composition root; constructs root-owned mutable ports
955
+ ├── types.ts # shared Hub agent/state contracts
956
+ ├── config/ # agent/frontmatter, teams, profiles, dispatch policy, overrides
957
+ ├── context/ # state, budgets, assertions/artifacts, session-health factories
958
+ ├── commands/ # 27 typed /af-* command registrars
959
+ ├── tools/ # 16 tools plus dispatch/research execution orchestration
960
+ ├── dispatch-core.ts # facade over native, coms, and observability dispatch
961
+ ├── dispatch-*.ts # native preparation/spawn/completion and backend adapters
962
+ ├── acceptance.ts # agent-fleet.runtime-result/v1 and minimal acceptance evaluation
963
+ ├── runtime-test-check.ts # code-owned native bash observer for trusted runtime checks
964
+ ├── tool-protocol.ts # T3 event/readback correlation and shared diagnostic schema
965
+ ├── recovery-contract.ts # shared typed failure/recovery policy
966
+ ├── damage-guard-*.ts # D6 parent state, approval, ownership and broker (acceptance open)
967
+ ├── policy/ # model, roster, capability, and work-mode decisions
968
+ ├── research/ # helper runtime, spawn transitions, and controls
969
+ ├── ui/ # grid, dashboard, detail, context, pool, zoom, and history
970
+ ├── input/ # shortcuts and completion derivation
971
+ ├── lifecycle/ # turn, pressure, monitor, session, and shutdown orchestration
972
+ ├── prompts/ # data-oriented system/session templates + HubPromptContext
973
+ ├── session-start.ts # typed ordered session_start step runner
974
+ ├── presentation.ts # marker, name, thinking, and delegate-path helpers
975
+ ├── timeline.ts # bounded transcript/timeline append helpers
976
+ ├── monitor-*.ts # local monitor transport and recovery primitives
977
+ └── *.test.{ts,js} # registration, loader, parity, and behavior contracts
978
+ ```
979
+
980
+ Cross-harness coms lifecycle remains shared in `.pi/harnesses/lib/coms-core.ts` and `coms-core-io.ts`; it is not owned by the Hub composition root.
981
+
982
+ ```text
983
+ .pi/ # Pi runtime: harnesses, extensions, agents config, prompts
984
+ .pi/agent-fleet/ # The fleet runtime, mirrored verbatim into a workspace:
985
+ scripts/ # CLI helpers, bridges, team + one-off peer launchers (pure logic in scripts/lib/)
986
+ scripts/workflows/ # deterministic flow graphs + phase/gate/permission/quality runtime
987
+ hermes/ # Hermes-facing skills/integration assets
988
+ hooks/ # the coms bridge Stop hook
989
+ docs/ # the one doc that installs into a workspace (workflows.md)
990
+ skills/ # Agent Fleet-native skills (shadow vendored names)
991
+ agents/ # Personas/subagents; installed to a workspace's .pi/agents/personas/
992
+ vendor/agent-skills-upstream/ # Manually imported upstream skills (pinned SHA)
993
+ bin/ # npm CLI: setup/doctor/uninstall, the installer engine, explicit operator controllers (bin/lib/)
994
+ references/ # Supplementary checklists, installed with the skills that cite them
995
+ docs/ # This file, setup guides, bridge references, vendoring policy
996
+ ```
997
+
998
+ `bin/lib/` holds the deterministic installer engine (`manifest.js`, `state.js`, `verify.js`,
999
+ `plan.js`, `apply.js`, `merge-forms.js`), which writes only inside a workspace, and the explicit
1000
+ operator controllers, the only modules that write outside one: `set-hermes-watchdog.js` and `set-hermes-telegram.js` for a Hermes profile
1001
+ (receipts and atomic installs in `hermes-profile-artifact.js`), and `set-codex-mcp.js` for the
1002
+ user-level Codex registration, with `skill-zip.js` (a bounded, dependency-free reader for the
1003
+ packaged `skills/*.zip`) and `mcp-probe.js` (one STDIO `initialize` + `tools/list` exchange that
1004
+ proves a launcher before any write). Each controller runs only when the operator invokes its
1005
+ `agent-fleet set-*` command; `setup` never calls them.
1006
+
1007
+ The fleet runtime keeps its *source* layout identical to its *installed* layout.
1008
+ That is not cosmetic: `companion:harness-runtime-closure` and its siblings copy
1009
+ with `preserveLayout`, so a relative import written here resolves the same way in
1010
+ a workspace — including the ones reaching from the stationary `.pi/harnesses/`
1011
+ into the movable `.pi/agent-fleet/scripts/`. `bin/test/path-boundaries.test.js`
1012
+ holds that invariant.
1013
+
1014
+ Reserved for future modules (do not repurpose these paths):
1015
+
1016
+ ```text
1017
+ apps/dashboard/ # future dashboard: Kanban state, Herdr workspaces, peer status
1018
+ packages/fleet-core/ # future extracted core orchestration library
1019
+ packages/herdr-bridge/ # future Herdr integration package
1020
+ packages/hermes-bridge/ # future Hermes integration package
1021
+ ```
1022
+
1023
+ ## Design rules
1024
+
1025
+ - **Workflow engine remains single-sourced.** `just flow` owns deterministic phase order, retries, executable gates, post-hoc writes enforcement, and one flow acceptance decision. It uses the clean spawn/context seams and keeps its clean-tree guard while staying on the current branch by default; creating a flow branch requires explicit `--branch`; normal traces live under `.pi/flow-sessions/`. Explicit flow branches retain source/result metadata, while reserved `cleanup` and `merge` delegate safe removal and squash integration to Worktrunk. The initial Hub `run_flow` adapter calls the same exported dispatcher directly and permits only read-only `scout`: it runs in a stable detached snapshot with no flow branch, stores trace/manifest in the current Hub session, and has one Hub budget/cancellation owner. Snapshot overlay operations validate plain parents before mutation and never follow a HEAD symlink leaf. The native process and descendants use `confineNativeChild`, with only the session-owned phase directory writable; the actual `read`/`grep`/`find`/`ls` data paths are separately limited to the snapshot while damage-control remains loaded. Runtime/model libraries and provider configuration remain readable for Pi startup, so this is intentionally not a global no-read claim. Duplicate identity is idempotent; stale/busy calls are uncharged. All setup/result exceptions settle as structured failures, release active ownership, and preserve honest charged/started state. Owned scout snapshots are cleaned on settlement, with visible cleanup status/errors; traces and explicit branches are retained. Flow acceptance never promotes parent assertions or closes T11 obligations. Writable/committing flows remain outside this adapter pending a separate review.
1026
+ - **Thin dispatcher context.** Nothing lands persistently in the dispatcher's
1027
+ context if it can live on disk or in a one-line status. Research findings,
1028
+ the Verification Contract ledger, and team snapshots are all disk-first.
1029
+ - **A harness fault must never look like a specialist fault.** The hub passes
1030
+ `--session <file>` on every run, so one corrupt session file used to fail a
1031
+ persona in ~1s with no output — indistinguishable from a bad agent, and
1032
+ unrecoverable by drop + re-add. Unusable session files are now validated and
1033
+ quarantined (`session-health.js`) with the reset named in the result. Same rule
1034
+ for the return contract: a report the parser cannot read gets one cheap
1035
+ read-only extraction pass (`return-extract.js`) before its assertions are
1036
+ written off as unproven, and extracted evidence is always labelled as weaker
1037
+ than declared evidence. The converse also holds: a run that errored or timed
1038
+ out writes to `artifacts/failures/`, never `returns/` — an error stub filed
1039
+ as a return reads as a specialist verdict and gets acted on as one.
1040
+ - **A pool status field beats reading the screen.** `coms_list` publishes each
1041
+ peer's `pane_id`, waiting-only `queue_depth`, and `status`
1042
+ (`idle`/`queued`/`working`/`booting`). `working` means an active turn;
1043
+ `queued` means accepted work is waiting to start. `herdr_spawn_peer` waits
1044
+ for the peer to register and returns `peer_ready`
1045
+ rather than a bare pane id. A spawned peer boots idle and does nothing until
1046
+ addressed, so peers spawned and never sent to are named at turn end and in
1047
+ `/af-hub-report` (`spawned-peers.js`); closing stays the human's call.
1048
+ - **A declared requirement carries its origin.** Every assertion in the ledger
1049
+ names its source (`assertion-ledger.js`), and the open ledger is soft-capped
1050
+ at 8 — an id nobody can trace back to a plan line costs a dispatch and an
1051
+ ASK_USER cycle to re-derive.
1052
+ - **Pre-flight validation is free.** Anything the hub can reject before spawning
1053
+ — an unresolvable artifact path, an unknown research persona, a heavy persona
1054
+ at a low tier, a reviewer on a docs-only scope — is refused without spending a
1055
+ budget slot. Artifact paths also resolve across artifact kinds when the name is
1056
+ unique, since the hub writes every auto-return under `returns/` while
1057
+ dispatchers reasonably guess `reviews/`.
1058
+ - **Evidence is archived, never overwritten.** Session start moves the previous
1059
+ session's `artifacts/` into an immutable `.pi/agent-sessions/runs/<runId>/`
1060
+ namespace with a read-only `meta.json` and an appended `runs/index.json`
1061
+ (`run-namespace.js`), retained per `run-history-keep` (default 10). The old
1062
+ behaviour — delete `artifacts/` at start, name returns by a per-session counter
1063
+ — collided two ways at once and made a post-mortem record eleven specialist
1064
+ returns and two reviews as NOT RECOVERABLE. A failed archive leaves the
1065
+ artifacts in place: a stale tree is recoverable, a deleted one is not.
1066
+ - **Herdr owns panes, presence, and lifecycle; coms owns messages.** Herdr
1067
+ topology recipes (`--herdr` or `--peers`) require a running server and refuse
1068
+ with an actionable message otherwise. Bare Fleet does not require Herdr.
1069
+ `--no-coms` leaves direct/native execution available but disables peer
1070
+ messaging, peer-backed dispatch, and handoff from the Hub.
1071
+ - **External agents are peers, not plugins.** Claude Code (and future CLI
1072
+ agents) join the fleet through bridge adaptors that speak coms envelopes —
1073
+ the fleet core stays agent-agnostic. Hermes remains the inbound `ask_user`/
1074
+ Telegram route. Codex uses the local native MCP workflow; both the former
1075
+ remote-control conductor and the Fleet CLI client are retired.
1076
+ - **Hermes monitor presentation is outside the fleet core.** Agent Fleet exposes owner-only
1077
+ local monitor operations for Hub-owned state; a consumer owns its UI and lifecycle. The
1078
+ worktree contains additive monitor/event/invoke code, but that implementation and its local
1079
+ tests are not proof of a durable external identity or live delivery contract. `invoke`, where
1080
+ available, is Hub-owned and queues dispatcher work rather than exposing tools directly.
1081
+ - **Packaged Hermes source is opt-in, never auto-installed.** The npm tarball carries the
1082
+ `hub-watchdog` skill (`.pi/agent-fleet/hermes/skills/`) plus the backend and Desktop monitor plugin source
1083
+ (`.pi/agent-fleet/hermes/plugins/`, `.pi/agent-fleet/hermes/desktop-plugins/`) as runtime-only source. Shipping that source
1084
+ makes it available to an operator; installing it into a Hermes profile is always an explicit
1085
+ action through `agent-fleet set-hermes-watchdog` (skill) or the consumer's own flow (plugins).
1086
+ Nothing is enabled, launched, or configured by installing the package.
1087
+ - **Codex registration is an explicit operator command, never part of `setup`.** `bin/lib/set-codex-mcp.js`
1088
+ registers the native `af-local-read` server in the user-level Codex configuration and installs the
1089
+ `fleet-native-voice` skill copy under `~/.agents/skills`; `skill-zip.js` reads the packaged archive and
1090
+ `mcp-probe.js` proves the exact launcher over STDIO before anything is written. Like `set-hermes-watchdog`,
1091
+ these modules write outside a workspace only when the operator invokes them, only through
1092
+ `codex mcp add`/`remove` with a `config.toml` backup, and only with receipts that let `uninstall` remove
1093
+ exactly what they created. `setup`, `apply.js`, and the manifest are untouched; no policy state, event
1094
+ relay, auto policy, or Desktop queue is created. See [codex-setup.md](codex-setup.md).
1095
+ - **Watchdog delivery is capability-gated and currently unproven.** No checked-in
1096
+ Gate O live artifact proves Hermes origin identity, updates, reconnect, or two-chat isolation,
1097
+ so its supported posture is journal-only/dormant: no delivery, steering, or surgical use. It
1098
+ never manages services, gateways, Herdr, or shell commands. Local runtime evidence — including
1099
+ a real foreground watcher against a disposable Hub UDS — is `synthetic-local` and proves none of
1100
+ those capabilities; see [the watchdog runbook](hermes-watchdog-supervisor.md).
1101
+ - **External conductor contracts are advisory.** Pi damage-control wraps Pi
1102
+ tool calls, not Hermes or Codex processes; human approvals and their
1103
+ contracts reduce risk but do not provide an OS command allowlist.
1104
+ - **Destructive fleet verbs are damage-control-guarded.** Specialists cannot
1105
+ spawn/close herdr panes; the human confirms destructive actions.
1106
+ - **Native-over-vendored skills.** The skill catalogue resolves `skills/`
1107
+ first, then the vendored upstream import; upstream updates are explicit
1108
+ maintainer actions ([UPSTREAM-SKILLS.md](UPSTREAM-SKILLS.md)).
1109
+
1110
+ ## History
1111
+
1112
+ Agent Fleet began as a fork of `addyosmani/agent-skills` and was split into a
1113
+ standalone repository in July 2026, with upstream demoted to vendored content.
1114
+ The one-time migration record, including the history-filtering commands, lives
1115
+ in [MIGRATION-agent-fleet.md](MIGRATION-agent-fleet.md). The product
1116
+ requirements that drove the split were a one-off planning document and are no
1117
+ longer maintained.
1118
+
1119
+ ## Unified System 1 v2 configuration
1120
+
1121
+ The runtime source is `.ai/system1.json` version 2 with independent consumer sections, one immutable session snapshot and a shared service. Installation selection remains separate. See [the unified configuration contract](system1-config.md) for setup, explicit migration, retained backups, diagnostics and remote/local off semantics. Legacy JSON files and `watchdog-system1` in Markdown are not runtime sources. v1 requires explicit migration and cannot start inference. Persisted Task Triage obligations remain enforced when inference is off or unavailable. D10 is not activated by this change.
1122
+
1123
+
1124
+ ## Local Codex S6a addressed instruction boundary
1125
+
1126
+ The local STDIO MCP source adds explicit `grant_send`/`revoke_send` policy previews
1127
+ and separate exact instruction prepare/commit/receipt tools (11 tools at the historical S6a checkpoint; the current source catalog has 21).
1128
+ Validated native conversation identity, existing S2 revision-bound rights and a
1129
+ separate private `.instructions` durable intent ledger precede any one-shot
1130
+ addressed write. Duplicates return history, unknown never triggers a resend,
1131
+ and no exactly-once execution or human-authentication claim is made.
1132
+ An optional versioned COMS capability and pre-enqueue exact-owner check protect
1133
+ the new sender from legacy receivers. Bounded terminal receipts are projections
1134
+ of actual computed responses, correlated by owner/wire ID and recoverable only
1135
+ through read-authorized exact lookup; legacy prompts remain unchanged.
1136
+ Code/local fixtures do not activate receivers/MCP or authorize live actions.
1137
+ See [the local MCP contract](codex-local-mcp.md).
1138
+
1139
+ ## Local Codex full final-response reading
1140
+
1141
+ `coms-response-read.ts` adds a bounded read-only RPC shared by Hub and standalone COMS peers through `createComsPeer`. At finalization it records owner/wire/source-entry pointer metadata in the existing session history and a bounded in-memory locator index (4096 slots, no silent eviction), never a second copy of the answer. The final assistant text blocks are projected and scrubbed together before 2048-byte UTF-8 pagination; thinking/tool data is excluded. Public source/projection size is limited to 1 MiB and the wire frame to 16 KiB. Legacy instruction receipts remain 4096-byte previews with unchanged schema.
1142
+
1143
+ The native `fleet_response_read` tool uses `fleet-codex-response-read.ts` and `fleet-codex-response-transport.ts`: current exact per-chat read checks before/after socket I/O, canonical local socket checks, strict framing and page validation. A namespace/epoch/reference/projection/digest-bound cursor requires no MCP-process cache or secret, so an MCP-only restart can resume against the same still-active receiver. Changed/revoked/unavailable sources fail closed. Fleet closure/restart discards the locator index; archive retention and historical access are deliberately not implemented.
1144
+
1145
+ Instruction result wrappers expose a locator without changing stored receipt fields or asserting freshness. A ready response publishes a separate reference-only `message` event through an already enabled notification runtime; failure does not destroy the source/receipt or authorize replay. The reference hashes the canonical owner epoch and wire ID, not raw answer content; it is routing data, not authority. Full public-text digests/version/offsets support deterministic local reconstruction tests, not a claim that a model or human consumed every page or that the underlying task succeeded. No direct Codex file reads, new rights or automatic activation are introduced. See [the MCP contract](codex-local-mcp.md#read-a-full-final-fleet-response).
1146
+
1147
+ ## Local Codex machine permission boundary (source checkpoint)
1148
+
1149
+ `fleet_permissions`, `fleet_permission_decide` and `fleet_permission_receipt`
1150
+ are separate from human question
1151
+ answers. A new per-binding `approve` right defaults off; `send` never implies it.
1152
+ Explicit approve grants upgrade only that allowlist namespace to v2 while
1153
+ preserving existing read/send; stale/rebound epochs drop approve. Machine decisions
1154
+ carry `codex_machine`, task/revision/action binding, reason and native thread ID,
1155
+ with no human or Codex-turn attestation. Pi checks the action again before one-use
1156
+ consumption. Baseline path/bash asks, D6, exact triage actions and per-spawn child
1157
+ access share the one-winner permission latch; material triage waivers remain
1158
+ human-only. Machine decisions do not seed human turn/session or semantic memory. `<policyRoot>.permissions` isolates durable attempt reservations
1159
+ from instruction/answer history. Unknown is never replayed, and latch acceptance
1160
+ or authority consumption is not tool completion. The local machine boundary is
1161
+ cooperative same-UID policy, not malicious-same-user protection.
1162
+
1163
+ An optional user-owned `.pi/damage-control-auto-policy.yaml` is outside installer
1164
+ ownership. It is disabled when missing/empty/invalid, allows only exact static
1165
+ once-only rules, carries `auto_policy` provenance, and cannot bypass D6 holds.
1166
+ No policy file/rules or live approve rights are created by this checkpoint.
1167
+
1168
+ The independently tested event pump covers explicitly addressed messages,
1169
+ questions and permissions, with exact binding/epoch checks and bounded deadlines.
1170
+ Production hooks in COMS prompt admission, ready question offers and permission
1171
+ holds publish reference/digest-only events into an explicitly enabled exact-owner
1172
+ runtime. `/af-codex-events prepare|enable <private-config>` and `disable` remain the
1173
+ legacy/manual opt-in entry; no configuration discovery or default activation occurs. Startup
1174
+ validates all restart state and reconciles before accepting new ingress. Source ACK
1175
+ requires a synchronous durable admission result; async/void consumers are refused.
1176
+ The separate `<stateRoot>.event-ingress` journal preserves never-attempted events
1177
+ and reconciles attempted/unknown ones without replay. Core receipts alone remain
1178
+ process-local, not durable evidence. An opt-in `CodexDesktopQueueHost` uses the externally
1179
+ smoke-tested experimental shared `thread/queue/add` path via connect-only
1180
+ WS-over-Unix. The user-owned private managed socket alias and canonical socket
1181
+ are checked and fenced against retargeting. It never starts/resumes a daemon,
1182
+ reads authentication, grants rights or forwards raw event payloads. Explicit
1183
+ host-supplied mapping/version/schema evidence is required; it is not live or
1184
+ cryptographic attestation. Known daemon-loaded targets are refused, but concurrent
1185
+ consumer changes cannot be atomically excluded by this shared-queue API.
1186
+ `queue_accepted` means ACK only, with `user_input` transport and machine provenance,
1187
+ not human consent or model delivery. The separate `<stateRoot>.desktop-events`
1188
+ ledger persists attempted-before-write/no-replay across restarts; durable producer
1189
+ ingestion is a separate journal, not inferred from this transport receipt. Unknown ACKs are never resent; queue absence does not
1190
+ prove consumption. Budgets of 10 seconds or less are refused. The busy smoke
1191
+ included an intentional 60s tool sleep, then 55ms dispatch after turn completion;
1192
+ the total wait still counts against the original deadline. A separately authorized single temporary adapter probe observed model input at
1193
+ 1.418s and an exact machine reply at 8.005s inside its original 30s deadline;
1194
+ there were no model tool calls or real permission grants. This is not persistent
1195
+ production activation, exclusive-process/UI attestation, a model permission-decision
1196
+ test, or a 5s SLA. Saved thread reads and active-turn first-party message
1197
+ delivery alone still do not establish external idle wake.
1198
+ The earlier **21/24** host observation is historical. On 2026-11-04 the user
1199
+ reported **24/24** in main after completed receiver reload/rebind, with permission
1200
+ state available and zero pending. No repeat restart/reload is required for that
1201
+ checkpoint. This does not establish live approve rights, production notification
1202
+ activation or model-to-Pi acceptance; those remain separate gates.
1203
+ `replyFleetEvent` separately checks actual native thread metadata, re-inspects
1204
+ permissions before deciding, and leaves question commit behind its existing human
1205
+ confirmation workflow. The latency harness distinguishes local monotonic phases,
1206
+ remote clock uncertainty, recorded host input, actual model awareness and Pi
1207
+ one-use consumption; fixture timings are never model SLA evidence.
1208
+ See [the native contract](codex-local-mcp.md) for API and proof limits.
1209
+
1210
+ ## Guarded native Codex notification bootstrap (unreleased minor)
1211
+
1212
+ `agent-hub/codex-bootstrap.ts` composes the shared `NotificationBootstrap` with
1213
+ `FleetCodexBootstrap` services and cached chat UI. Native MCP and Fleet View use the
1214
+ same coordinator. `BootstrapChannelServer` carries a bounded namespace/AF-owner-bound
1215
+ duplex stream; `CodexBootstrapProducer`, in the **Codex** process, is the only policy
1216
+ writer. AF reads exact revision/epoch/lease snapshots and never initializes or grants
1217
+ Codex rights. The singleton/quiescence/private-filesystem boundary is cooperative
1218
+ same-UID policy, not cryptographic host/human authentication.
1219
+
1220
+ Preparation obtains real mapping/catalog/no-load evidence or blocks. Current
1221
+ `DesktopPreflightRegistry` mapping is explicitly operator-established for a selected
1222
+ owned PID/start/executable and true Desktop version; SDK clientInfo, daemon UA,
1223
+ served source catalog and schema cannot manufacture Desktop/loaded-consumer identity.
1224
+ A changed Desktop/native host can require factual preflight again. Eligibility floors
1225
+ (daemon 0.166.0, Desktop 0.166.0-alpha.5.1) and the bundled unqualified bootstrap
1226
+ schema reference are not host qualification or a new historical tuple.
1227
+
1228
+ A native commit hands off `pending` so its initiating model/tool turn can end **before**
1229
+ that same chat must emit a terminal probe ACK; no long-held call waits on its own
1230
+ model turn. This follows the historical busy-turn boundary above, not a new live
1231
+ Desktop claim. The actual native Pi dialog reviews exact namespace/AF epoch/rights,
1232
+ one common deadline, revision, warnings and probe cost. Model booleans never replace
1233
+ that decision. Codex writes one explicit CAS transition, then `CodexBootstrapProbe`
1234
+ uses version/connection-epoch-pinned metadata requests, checkpoint-before-one-enqueue,
1235
+ exact new assistant `final_answer` ACK and before/after `notLoaded`. Missing/unsafe
1236
+ path or uncertain effects never activate or trigger replay/hydration.
1237
+
1238
+ `issueBootstrapAdmission` seals the complete config/settings in a module-private
1239
+ WeakMap: serialized JSON, a kind marker or old receipt cannot restore authority.
1240
+ Activation publishes private config and claims a one-use current admission. Runtime
1241
+ pre-byte guards recheck owner, mapping, rights, lease and daemon context; pin drift
1242
+ revokes/pauses. A separate safety watcher/IO invalidation can perform bounded D7
1243
+ read-only recheck plus one probe **only** for the same nonempty fingerprint/level
1244
+ inside the original rights revision and wall/monotonic common deadline. At most four
1245
+ such automatic probes are authorized by the original Pi review. No periodic/status
1246
+ probes, new grant or lease renewal; unverified/different/unknown contracts stay paused.
1247
+
1248
+ Continuation rotates notification binding epoch but retains stable journals and old
1249
+ unknown/source-ID evidence. Cold bootstrap also preserves persisted non-default
1250
+ journal roots; conflicts stop rather than silently resetting history. Disable/reset/
1251
+ shutdown cancel pending work; even a published config cannot resurrect a stopped
1252
+ runtime without the private admission. A new AF epoch needs explicit reconnect and
1253
+ new Pi consent, never automatic send/approve transfer.
1254
+
1255
+ Fleet View chat selection/details read detached cached rows. e/d/p are explicit
1256
+ enable/disable/factual-preflight intents; the dashboard closes before the native Pi
1257
+ action. Rendering/status/cache refresh cannot confirm, grant, probe or activate.
1258
+ Historical low-level rights-only/manual tuple APIs remain separate, not a bypass of
1259
+ notification-bootstrap consent. This source integration and its owned synthetic tests
1260
+ are not actual Desktop/voice/historical qualification. See the [workflow and separately
1261
+ authorized live preflight](codex-notification-bootstrap.md).
1262
+
1263
+ ## Local Codex human question actions and voice
1264
+
1265
+ The current source catalog contains 28 native tools (including connection controls and bounded full-response reading), including answer/journal-upgrade operations and local diagnostics/history/snapshot tools. Source availability is not loaded-host proof. The bounded S6b native checkpoint exercised answers, selection, question-scoped refusal, explicit migration and cleanup. The S7 desktop voice check exercised native discovery and read-policy checks; it did not prove voice mutations, mobile or remote support. See the [native MCP guide](codex-local-mcp.md) and [voice workflow](fleet-native-voice.md).
1266
+ The exact owner/project/peer/sessionId/startedAt, pending questionId/toolCallId,
1267
+ full question/effective-flags digest and canonical human response digest bind each action.
1268
+ An actual human answer/refusal and a separate exact preview confirmation are required;
1269
+ a bare tool call is not independent human attestation. Question refusal is not Pi-turn cancellation.
1270
+ An optional question RPC v2 uses the existing QuestionChannel and first-winner latch;
1271
+ legacy v1/local behavior remains unchanged. An inherited legacy shared-channel instance
1272
+ without the guarded method fails unsupported rather than being silently replaced.
1273
+ Bounded volatile proof is owner-bound; missing evidence stays unknown, without retries.
1274
+
1275
+ The SAME `.instructions` namespace/file/lock is the common v2 action ledger for
1276
+ instruction/answer/refusal IDs. V1 is read-only history until a separately consented
1277
+ CAS upgrade, with exact original receipts/timestamps/wire/digest/result preservation
1278
+ and an exact raw backup. Explicit journal-upgrade preview and commit tools support a separately confirmed migration after the operator has stopped old writers; there is no automatic migration. Old v1 binaries reject v2;
1279
+ rollback retains v2-capable data/reader or fails closed, never restoring old dedup snapshots.
1280
+ Shared proposal budgets remain16/context64/process and8 active calls. Sender reservation
1281
+ and attempt precede the single mutating write; this is not an atomic filesystem-to-Pi
1282
+ transaction, exactly-once execution, strong host/human authentication or hostile-UID isolation.
1283
+ No policy/config/lifecycle/native action is implied by source changes. The S6a and S6b bounded native checkpoints are complete; their test grants were revoked.
1284
+
1285
+ ### CLI retirement and historical data
1286
+
1287
+ The native workflow replaces all active Fleet CLI entrypoints, installer items and routing. Retired `chatgpt-client`/`codex-remote` selections require explicit narrow config repair with an original backup; there is no automatic native enrollment. Shared COMS, question v1/v2 handlers and Hermes reader consumers remain independent.
1288
+
1289
+ `fleet_diagnostics` reports local runtime/tool metadata without source probes; `fleet_receipts` lists historical native actions without refresh. Explicit `fleet_snapshot` retains one bounded redacted report per chat/selector under a no-steal lock in `<policyRoot>.reports`; `fleet_replay` returns that historical content, including after revoke, without claiming live rights or current state. Ordinary observations do not archive report content.
1290
+
1291
+ An optional trusted launcher `--legacy-state-root` enables exact-native-UUID, read-only `fleet_legacy_history` over original selection/runtime files. Original archives are never rewritten or converted to new delivery intents. Matching legacy instruction/question-response IDs block new native action attempts; active old writer locks, unsafe/corrupt/missing configured roots fail closed. There is no cross-identity auto-import or grant transfer. Historic release snapshots and original journals are retained. Read-only compatibility and native fixture tests are distinct from host activation or actual voice mutation coverage.