@chankov/agent-fleet 2.2.2 → 2.2.3

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 (766) hide show
  1. package/.pi/harnesses/agent-hub/README.md +18 -2
  2. package/.pi/harnesses/agent-hub/budget-recovery.ts +28 -0
  3. package/.pi/harnesses/agent-hub/commands/recover.ts +28 -9
  4. package/.pi/harnesses/agent-hub/context/assertion-journal.ts +133 -0
  5. package/.pi/harnesses/agent-hub/index.ts +100 -17
  6. package/.pi/harnesses/agent-hub/no-progress.ts +133 -19
  7. package/.pi/harnesses/agent-hub/operator-current-state.ts +51 -6
  8. package/.pi/harnesses/agent-hub/package.json +1 -1
  9. package/.pi/harnesses/agent-hub/policy/work-mode.ts +2 -1
  10. package/.pi/harnesses/agent-hub/process-obligations.ts +1 -1
  11. package/.pi/harnesses/agent-hub/recover-policy.ts +1 -1
  12. package/.pi/harnesses/agent-hub/recover-state.ts +46 -6
  13. package/.pi/harnesses/agent-hub/recovery-continuation.ts +134 -0
  14. package/.pi/harnesses/agent-hub/tools/action-executors.ts +24 -3
  15. package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
  16. package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +60 -17
  17. package/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +2 -1
  18. package/.pi/harnesses/agent-hub/tools/recover-task.ts +16 -0
  19. package/.pi/harnesses/agent-hub/verification-diagnostics.ts +23 -0
  20. package/.pi/harnesses/agent-hub/work-mode.ts +4 -2
  21. package/.pi/harnesses/coms/package.json +1 -1
  22. package/.pi/harnesses/damage-control-continue/index.ts +7 -5
  23. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  24. package/.pi/harnesses/lib/bash-policy-analysis.ts +9 -1
  25. package/.pi/harnesses/lib/exact-permission-port.ts +6 -4
  26. package/.versions/2.2.3/.pi/agent-fleet/hermes/README.md +347 -0
  27. package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  28. package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  29. package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  30. package/.versions/2.2.3/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  31. package/.versions/2.2.3/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  32. package/.versions/2.2.3/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  33. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  34. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  35. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  36. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  37. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  38. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  39. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  40. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  41. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  42. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  43. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  44. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  45. package/.versions/2.2.3/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  46. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  47. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  48. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  49. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  50. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  51. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  52. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  53. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  54. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  55. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  56. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  57. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  58. package/.versions/2.2.3/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  59. package/.versions/2.2.3/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  60. package/.versions/2.2.3/.pi/agent-fleet/hooks/coms-stop-hook.mjs +124 -0
  61. package/.versions/2.2.3/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  62. package/.versions/2.2.3/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
  63. package/.versions/2.2.3/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
  64. package/.versions/2.2.3/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
  65. package/.versions/2.2.3/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
  66. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/0.167-shared.json +1900 -0
  67. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/README.md +223 -0
  68. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/assessment.md +83 -0
  69. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile-0.167.json +5627 -0
  70. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile.md +43 -0
  71. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap.md +45 -0
  72. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture-profile.ts +53 -0
  73. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture.ts +102 -0
  74. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/catalog.md +91 -0
  75. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/channel.md +21 -0
  76. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurement.md +133 -0
  77. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurements.json +74 -0
  78. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/notification-profile-0.167.json +2679 -0
  79. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/observer.md +101 -0
  80. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/opaque-response.md +57 -0
  81. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/open-sent.md +68 -0
  82. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/probe-reader.md +51 -0
  83. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/profile.md +71 -0
  84. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/projection.md +147 -0
  85. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/reconnect.md +40 -0
  86. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/response-unions.md +74 -0
  87. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/semver.md +124 -0
  88. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/surface.md +73 -0
  89. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/fleet-codex-allowlist-store-child.ts +31 -0
  90. package/.versions/2.2.3/.pi/agent-fleet/scripts/fixtures/response-fixture.ts +23 -0
  91. package/.versions/2.2.3/.pi/agent-fleet/scripts/fleet-codex-local-mcp.mjs +26 -0
  92. package/.versions/2.2.3/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +63 -0
  93. package/.versions/2.2.3/.pi/agent-fleet/scripts/fleet.ts +244 -0
  94. package/.versions/2.2.3/.pi/agent-fleet/scripts/flow.ts +166 -0
  95. package/.versions/2.2.3/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  96. package/.versions/2.2.3/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  97. package/.versions/2.2.3/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  98. package/.versions/2.2.3/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  99. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
  100. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-bootstrap-files.ts +46 -0
  101. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-bootstrap-probe.ts +52 -0
  102. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-bootstrap-producer.ts +131 -0
  103. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-connection-history.ts +51 -0
  104. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-daemon-observer.ts +137 -0
  105. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-desktop-discovery.ts +84 -0
  106. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-desktop-preflight.ts +130 -0
  107. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +113 -0
  108. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-measurement.ts +218 -0
  109. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-native-presence.ts +61 -0
  110. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-probe-transcript.ts +135 -0
  111. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-send-lineage.ts +72 -0
  112. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +101 -0
  113. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  114. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  115. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +453 -0
  116. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist.ts +175 -0
  117. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +73 -0
  118. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +74 -0
  119. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-bootstrap.ts +207 -0
  120. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +76 -0
  121. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +58 -0
  122. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +132 -0
  123. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +428 -0
  124. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-transport.ts +160 -0
  125. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +175 -0
  126. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +435 -0
  127. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-native-history.ts +215 -0
  128. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-observation-store.ts +208 -0
  129. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-observe-transport.ts +49 -0
  130. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-observe.ts +93 -0
  131. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-overview.ts +52 -0
  132. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +44 -0
  133. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +83 -0
  134. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +213 -0
  135. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-relay-latency.ts +45 -0
  136. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-response-read.ts +26 -0
  137. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-response-transport.ts +38 -0
  138. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-codex-resync.ts +212 -0
  139. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/fleet-command.ts +264 -0
  140. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
  141. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +239 -0
  142. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  143. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  144. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  145. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  146. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  147. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  148. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  149. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  150. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  151. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  152. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
  153. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  154. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  155. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
  156. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  157. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
  158. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  159. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/team-project.ts +176 -0
  160. package/.versions/2.2.3/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
  161. package/.versions/2.2.3/.pi/agent-fleet/scripts/package-lock.json +57 -0
  162. package/.versions/2.2.3/.pi/agent-fleet/scripts/package.json +10 -0
  163. package/.versions/2.2.3/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  164. package/.versions/2.2.3/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
  165. package/.versions/2.2.3/.pi/agent-fleet/scripts/pi-session.ts +9 -0
  166. package/.versions/2.2.3/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
  167. package/.versions/2.2.3/.pi/agent-fleet/scripts/team-up.ts +378 -0
  168. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
  169. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  170. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  171. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
  172. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  173. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  174. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/git.ts +108 -0
  175. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
  176. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  177. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  178. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  179. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
  180. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  181. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  182. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
  183. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/quality.ts +78 -0
  184. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
  185. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  186. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
  187. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  188. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
  189. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
  190. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  191. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  192. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  193. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  194. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  195. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  196. package/.versions/2.2.3/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  197. package/.versions/2.2.3/.pi/agents/dispatch-policy.yaml +32 -0
  198. package/.versions/2.2.3/.pi/agents/model-profiles.yaml +132 -0
  199. package/.versions/2.2.3/.pi/agents/peers.yaml +147 -0
  200. package/.versions/2.2.3/.pi/agents/teams.yaml +41 -0
  201. package/.versions/2.2.3/.pi/agents/voices.yaml +13 -0
  202. package/.versions/2.2.3/.pi/damage-control-rules.yaml +297 -0
  203. package/.versions/2.2.3/.pi/extensions/btw/README.md +120 -0
  204. package/.versions/2.2.3/.pi/extensions/btw/index.ts +916 -0
  205. package/.versions/2.2.3/.pi/extensions/btw/package.json +6 -0
  206. package/.versions/2.2.3/.pi/extensions/btw/state.js +179 -0
  207. package/.versions/2.2.3/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  208. package/.versions/2.2.3/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  209. package/.versions/2.2.3/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  210. package/.versions/2.2.3/.pi/extensions/compact-and-continue/README.md +42 -0
  211. package/.versions/2.2.3/.pi/extensions/compact-and-continue/index.ts +136 -0
  212. package/.versions/2.2.3/.pi/extensions/compact-and-continue/package.json +6 -0
  213. package/.versions/2.2.3/.pi/extensions/mcp-bridge/README.md +46 -0
  214. package/.versions/2.2.3/.pi/extensions/mcp-bridge/index.ts +206 -0
  215. package/.versions/2.2.3/.pi/extensions/mcp-bridge/package.json +6 -0
  216. package/.versions/2.2.3/.pi/extensions/package-lock.json +1175 -0
  217. package/.versions/2.2.3/.pi/extensions/package.json +9 -0
  218. package/.versions/2.2.3/.pi/extensions/pi-voice-stt/README.md +224 -0
  219. package/.versions/2.2.3/.pi/extensions/pi-voice-stt/config.ts +199 -0
  220. package/.versions/2.2.3/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  221. package/.versions/2.2.3/.pi/extensions/pi-voice-stt/index.ts +248 -0
  222. package/.versions/2.2.3/.pi/extensions/pi-voice-stt/package.json +6 -0
  223. package/.versions/2.2.3/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  224. package/.versions/2.2.3/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  225. package/.versions/2.2.3/.pi/harnesses/agent-hub/README.md +1657 -0
  226. package/.versions/2.2.3/.pi/harnesses/agent-hub/acceptance.ts +204 -0
  227. package/.versions/2.2.3/.pi/harnesses/agent-hub/access-approval.ts +266 -0
  228. package/.versions/2.2.3/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
  229. package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
  230. package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
  231. package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
  232. package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
  233. package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
  234. package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
  235. package/.versions/2.2.3/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
  236. package/.versions/2.2.3/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
  237. package/.versions/2.2.3/.pi/harnesses/agent-hub/artifacts.js +146 -0
  238. package/.versions/2.2.3/.pi/harnesses/agent-hub/assertion-ledger.js +68 -0
  239. package/.versions/2.2.3/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
  240. package/.versions/2.2.3/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  241. package/.versions/2.2.3/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  242. package/.versions/2.2.3/.pi/harnesses/agent-hub/budget-recovery.ts +151 -0
  243. package/.versions/2.2.3/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  244. package/.versions/2.2.3/.pi/harnesses/agent-hub/capability-packs.ts +187 -0
  245. package/.versions/2.2.3/.pi/harnesses/agent-hub/codex-bootstrap.ts +117 -0
  246. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  247. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  248. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  249. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  250. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  251. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  252. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  253. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  254. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  255. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  256. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  257. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  258. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  259. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  260. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/config.ts +9 -0
  261. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  262. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/context.ts +43 -0
  263. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  264. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  265. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  266. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  267. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  268. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  269. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/recover.ts +81 -0
  270. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  271. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  272. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  273. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  274. package/.versions/2.2.3/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  275. package/.versions/2.2.3/.pi/harnesses/agent-hub/config/agents.ts +183 -0
  276. package/.versions/2.2.3/.pi/harnesses/agent-hub/config/model-profiles.ts +240 -0
  277. package/.versions/2.2.3/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
  278. package/.versions/2.2.3/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  279. package/.versions/2.2.3/.pi/harnesses/agent-hub/context/assertion-journal.ts +133 -0
  280. package/.versions/2.2.3/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +234 -0
  281. package/.versions/2.2.3/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
  282. package/.versions/2.2.3/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  283. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  284. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
  285. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
  286. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
  287. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
  288. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
  289. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
  290. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
  291. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-compat.ts +45 -0
  292. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
  293. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
  294. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
  295. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
  296. package/.versions/2.2.3/.pi/harnesses/agent-hub/context-window.js +108 -0
  297. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-approval.ts +83 -0
  298. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
  299. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
  300. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
  301. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-hub.ts +263 -0
  302. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
  303. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
  304. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
  305. package/.versions/2.2.3/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
  306. package/.versions/2.2.3/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  307. package/.versions/2.2.3/.pi/harnesses/agent-hub/delegate.ts +478 -0
  308. package/.versions/2.2.3/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
  309. package/.versions/2.2.3/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  310. package/.versions/2.2.3/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  311. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
  312. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  313. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-complete.ts +176 -0
  314. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +318 -0
  315. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +264 -0
  316. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native-types.ts +297 -0
  317. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-native.ts +242 -0
  318. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  319. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
  320. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
  321. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  322. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  323. package/.versions/2.2.3/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  324. package/.versions/2.2.3/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  325. package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  326. package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  327. package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  328. package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  329. package/.versions/2.2.3/.pi/harnesses/agent-hub/drift-watchdog.js +344 -0
  330. package/.versions/2.2.3/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  331. package/.versions/2.2.3/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  332. package/.versions/2.2.3/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
  333. package/.versions/2.2.3/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
  334. package/.versions/2.2.3/.pi/harnesses/agent-hub/external-blocker.js +92 -0
  335. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
  336. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
  337. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
  338. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
  339. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
  340. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
  341. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
  342. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
  343. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
  344. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
  345. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
  346. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
  347. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
  348. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
  349. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
  350. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
  351. package/.versions/2.2.3/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
  352. package/.versions/2.2.3/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
  353. package/.versions/2.2.3/.pi/harnesses/agent-hub/fixtures/registration-surface.json +69 -0
  354. package/.versions/2.2.3/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  355. package/.versions/2.2.3/.pi/harnesses/agent-hub/footer.ts +29 -0
  356. package/.versions/2.2.3/.pi/harnesses/agent-hub/helpers.ts +269 -0
  357. package/.versions/2.2.3/.pi/harnesses/agent-hub/history-projection.ts +116 -0
  358. package/.versions/2.2.3/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
  359. package/.versions/2.2.3/.pi/harnesses/agent-hub/index.ts +2805 -0
  360. package/.versions/2.2.3/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  361. package/.versions/2.2.3/.pi/harnesses/agent-hub/input/shortcuts.ts +16 -0
  362. package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
  363. package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  364. package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
  365. package/.versions/2.2.3/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
  366. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  367. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  368. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  369. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  370. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  371. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  372. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  373. package/.versions/2.2.3/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  374. package/.versions/2.2.3/.pi/harnesses/agent-hub/no-progress.ts +741 -0
  375. package/.versions/2.2.3/.pi/harnesses/agent-hub/operator-current-state.ts +102 -0
  376. package/.versions/2.2.3/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
  377. package/.versions/2.2.3/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
  378. package/.versions/2.2.3/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  379. package/.versions/2.2.3/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
  380. package/.versions/2.2.3/.pi/harnesses/agent-hub/package.json +7 -0
  381. package/.versions/2.2.3/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  382. package/.versions/2.2.3/.pi/harnesses/agent-hub/permission-channel.ts +87 -0
  383. package/.versions/2.2.3/.pi/harnesses/agent-hub/permission-relay.ts +84 -0
  384. package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  385. package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  386. package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  387. package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/roster.ts +103 -0
  388. package/.versions/2.2.3/.pi/harnesses/agent-hub/policy/work-mode.ts +104 -0
  389. package/.versions/2.2.3/.pi/harnesses/agent-hub/poll-command.ts +184 -0
  390. package/.versions/2.2.3/.pi/harnesses/agent-hub/presentation.ts +54 -0
  391. package/.versions/2.2.3/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
  392. package/.versions/2.2.3/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
  393. package/.versions/2.2.3/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
  394. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
  395. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  396. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
  397. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
  398. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  399. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  400. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
  401. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
  402. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
  403. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
  404. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  405. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  406. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-snapshot.ts +287 -0
  407. package/.versions/2.2.3/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
  408. package/.versions/2.2.3/.pi/harnesses/agent-hub/process-obligations.ts +210 -0
  409. package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/context.ts +72 -0
  410. package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/fragments.ts +94 -0
  411. package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/session-start.ts +89 -0
  412. package/.versions/2.2.3/.pi/harnesses/agent-hub/prompts/system-prompt.ts +142 -0
  413. package/.versions/2.2.3/.pi/harnesses/agent-hub/provider-semaphore.js +143 -0
  414. package/.versions/2.2.3/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  415. package/.versions/2.2.3/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  416. package/.versions/2.2.3/.pi/harnesses/agent-hub/recover-state.ts +144 -0
  417. package/.versions/2.2.3/.pi/harnesses/agent-hub/recovery-continuation.ts +134 -0
  418. package/.versions/2.2.3/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
  419. package/.versions/2.2.3/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  420. package/.versions/2.2.3/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  421. package/.versions/2.2.3/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
  422. package/.versions/2.2.3/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
  423. package/.versions/2.2.3/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  424. package/.versions/2.2.3/.pi/harnesses/agent-hub/return-contract.js +371 -0
  425. package/.versions/2.2.3/.pi/harnesses/agent-hub/return-extract.js +77 -0
  426. package/.versions/2.2.3/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  427. package/.versions/2.2.3/.pi/harnesses/agent-hub/review-continuity.ts +76 -0
  428. package/.versions/2.2.3/.pi/harnesses/agent-hub/review-findings.js +96 -0
  429. package/.versions/2.2.3/.pi/harnesses/agent-hub/review-reuse.ts +48 -0
  430. package/.versions/2.2.3/.pi/harnesses/agent-hub/review-verdict.ts +6 -0
  431. package/.versions/2.2.3/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  432. package/.versions/2.2.3/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  433. package/.versions/2.2.3/.pi/harnesses/agent-hub/run-budget.js +362 -0
  434. package/.versions/2.2.3/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  435. package/.versions/2.2.3/.pi/harnesses/agent-hub/runtime-receipts.ts +63 -0
  436. package/.versions/2.2.3/.pi/harnesses/agent-hub/runtime-test-check.ts +85 -0
  437. package/.versions/2.2.3/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
  438. package/.versions/2.2.3/.pi/harnesses/agent-hub/scope-gate.js +271 -0
  439. package/.versions/2.2.3/.pi/harnesses/agent-hub/scope-overlap.ts +46 -0
  440. package/.versions/2.2.3/.pi/harnesses/agent-hub/session-audit.ts +331 -0
  441. package/.versions/2.2.3/.pi/harnesses/agent-hub/session-health.js +110 -0
  442. package/.versions/2.2.3/.pi/harnesses/agent-hub/session-start.ts +42 -0
  443. package/.versions/2.2.3/.pi/harnesses/agent-hub/spawn.ts +702 -0
  444. package/.versions/2.2.3/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
  445. package/.versions/2.2.3/.pi/harnesses/agent-hub/specialist-result.ts +78 -0
  446. package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  447. package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-communication-store.ts +225 -0
  448. package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  449. package/.versions/2.2.3/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
  450. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-brief.ts +98 -0
  451. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
  452. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-resume-contract.ts +80 -0
  453. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-authorization.ts +170 -0
  454. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
  455. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
  456. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  457. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
  458. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  459. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  460. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  461. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  462. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-runtime.ts +132 -0
  463. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  464. package/.versions/2.2.3/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  465. package/.versions/2.2.3/.pi/harnesses/agent-hub/timeline.ts +72 -0
  466. package/.versions/2.2.3/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +83 -0
  467. package/.versions/2.2.3/.pi/harnesses/agent-hub/tool-catalog-state.ts +125 -0
  468. package/.versions/2.2.3/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  469. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/action-executors.ts +237 -0
  470. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
  471. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
  472. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  473. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/context.ts +151 -0
  474. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +93 -0
  475. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +971 -0
  476. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  477. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +23 -0
  478. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
  479. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
  480. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/poll-panel-core.ts +30 -0
  481. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/poll-panel.ts +33 -0
  482. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/recover-task.ts +16 -0
  483. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/run-flow.ts +177 -0
  484. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  485. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
  486. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  487. package/.versions/2.2.3/.pi/harnesses/agent-hub/tools/verification-contract.ts +81 -0
  488. package/.versions/2.2.3/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  489. package/.versions/2.2.3/.pi/harnesses/agent-hub/types.ts +66 -0
  490. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  491. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
  492. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  493. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  494. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +173 -0
  495. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  496. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  497. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  498. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  499. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  500. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  501. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  502. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  503. package/.versions/2.2.3/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  504. package/.versions/2.2.3/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  505. package/.versions/2.2.3/.pi/harnesses/agent-hub/verification-diagnostics.ts +23 -0
  506. package/.versions/2.2.3/.pi/harnesses/agent-hub/version.ts +42 -0
  507. package/.versions/2.2.3/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  508. package/.versions/2.2.3/.pi/harnesses/agent-hub/work-mode.ts +185 -0
  509. package/.versions/2.2.3/.pi/harnesses/agent-hub/write-isolation.ts +232 -0
  510. package/.versions/2.2.3/.pi/harnesses/ask-user-remote/README.md +59 -0
  511. package/.versions/2.2.3/.pi/harnesses/ask-user-remote/index.ts +571 -0
  512. package/.versions/2.2.3/.pi/harnesses/ask-user-remote/questions.ts +206 -0
  513. package/.versions/2.2.3/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  514. package/.versions/2.2.3/.pi/harnesses/ask-user-remote/runtime-ask.ts +90 -0
  515. package/.versions/2.2.3/.pi/harnesses/coms/README.md +105 -0
  516. package/.versions/2.2.3/.pi/harnesses/coms/index.ts +308 -0
  517. package/.versions/2.2.3/.pi/harnesses/coms/package.json +7 -0
  518. package/.versions/2.2.3/.pi/harnesses/coms/version.ts +42 -0
  519. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/README.md +161 -0
  520. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/index.ts +661 -0
  521. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/package.json +7 -0
  522. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
  523. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
  524. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
  525. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
  526. package/.versions/2.2.3/.pi/harnesses/damage-control-continue/version.ts +42 -0
  527. package/.versions/2.2.3/.pi/harnesses/lib/approval-wait.ts +17 -0
  528. package/.versions/2.2.3/.pi/harnesses/lib/bash-policy-analysis.ts +193 -0
  529. package/.versions/2.2.3/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  530. package/.versions/2.2.3/.pi/harnesses/lib/clarification-policy.ts +9 -0
  531. package/.versions/2.2.3/.pi/harnesses/lib/codex-compat.ts +97 -0
  532. package/.versions/2.2.3/.pi/harnesses/lib/codex-contract.ts +259 -0
  533. package/.versions/2.2.3/.pi/harnesses/lib/codex-notification-profile.ts +75 -0
  534. package/.versions/2.2.3/.pi/harnesses/lib/coms-core-io.ts +422 -0
  535. package/.versions/2.2.3/.pi/harnesses/lib/coms-core.ts +738 -0
  536. package/.versions/2.2.3/.pi/harnesses/lib/coms-instruction-receipts.ts +113 -0
  537. package/.versions/2.2.3/.pi/harnesses/lib/coms-observation.ts +74 -0
  538. package/.versions/2.2.3/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
  539. package/.versions/2.2.3/.pi/harnesses/lib/coms-response-read.ts +107 -0
  540. package/.versions/2.2.3/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
  541. package/.versions/2.2.3/.pi/harnesses/lib/context-budget-hub-prompt.ts +124 -0
  542. package/.versions/2.2.3/.pi/harnesses/lib/context-budget-view.ts +112 -0
  543. package/.versions/2.2.3/.pi/harnesses/lib/context-budget.ts +114 -0
  544. package/.versions/2.2.3/.pi/harnesses/lib/context-compaction-policy.js +35 -0
  545. package/.versions/2.2.3/.pi/harnesses/lib/damage-action-hash.ts +28 -0
  546. package/.versions/2.2.3/.pi/harnesses/lib/damage-auto-policy.ts +52 -0
  547. package/.versions/2.2.3/.pi/harnesses/lib/damage-control-presentation.ts +14 -0
  548. package/.versions/2.2.3/.pi/harnesses/lib/damage-control-shared.ts +276 -0
  549. package/.versions/2.2.3/.pi/harnesses/lib/damage-guard-port.ts +25 -0
  550. package/.versions/2.2.3/.pi/harnesses/lib/damage-policy.ts +35 -0
  551. package/.versions/2.2.3/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
  552. package/.versions/2.2.3/.pi/harnesses/lib/damage-result-view.ts +16 -0
  553. package/.versions/2.2.3/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
  554. package/.versions/2.2.3/.pi/harnesses/lib/exact-permission-port.ts +40 -0
  555. package/.versions/2.2.3/.pi/harnesses/lib/execution-trace.ts +45 -0
  556. package/.versions/2.2.3/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  557. package/.versions/2.2.3/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  558. package/.versions/2.2.3/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  559. package/.versions/2.2.3/.pi/harnesses/lib/fleet-bootstrap-channel.ts +148 -0
  560. package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-catalog.ts +30 -0
  561. package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-chat-view.ts +55 -0
  562. package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-event-bridge.ts +82 -0
  563. package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-namespace.ts +2 -0
  564. package/.versions/2.2.3/.pi/harnesses/lib/fleet-codex-policy-snapshot.ts +10 -0
  565. package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/cli-bridge.ts +111 -0
  566. package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/mutations.ts +201 -0
  567. package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/snapshot.ts +417 -0
  568. package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/transition.ts +68 -0
  569. package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/ui.ts +269 -0
  570. package/.versions/2.2.3/.pi/harnesses/lib/fleet-config/view.ts +338 -0
  571. package/.versions/2.2.3/.pi/harnesses/lib/fleet-connection-control.ts +94 -0
  572. package/.versions/2.2.3/.pi/harnesses/lib/fleet-connection-diagnostics.ts +7 -0
  573. package/.versions/2.2.3/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  574. package/.versions/2.2.3/.pi/harnesses/lib/fleet-dashboard-view.ts +174 -0
  575. package/.versions/2.2.3/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  576. package/.versions/2.2.3/.pi/harnesses/lib/fleet-event-source.ts +21 -0
  577. package/.versions/2.2.3/.pi/harnesses/lib/fleet-notification-admission.ts +32 -0
  578. package/.versions/2.2.3/.pi/harnesses/lib/fleet-notification-bootstrap.ts +172 -0
  579. package/.versions/2.2.3/.pi/harnesses/lib/fleet-notification-validation.ts +122 -0
  580. package/.versions/2.2.3/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  581. package/.versions/2.2.3/.pi/harnesses/lib/fleet-panel.ts +34 -0
  582. package/.versions/2.2.3/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
  583. package/.versions/2.2.3/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  584. package/.versions/2.2.3/.pi/harnesses/lib/fleet-selection.ts +24 -0
  585. package/.versions/2.2.3/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  586. package/.versions/2.2.3/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  587. package/.versions/2.2.3/.pi/harnesses/lib/fleet-target-identity.ts +9 -0
  588. package/.versions/2.2.3/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  589. package/.versions/2.2.3/.pi/harnesses/lib/herdr-client.ts +472 -0
  590. package/.versions/2.2.3/.pi/harnesses/lib/herdr-presence.ts +399 -0
  591. package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  592. package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  593. package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  594. package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  595. package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  596. package/.versions/2.2.3/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  597. package/.versions/2.2.3/.pi/harnesses/lib/identical-dialog.ts +27 -0
  598. package/.versions/2.2.3/.pi/harnesses/lib/installation-state.js +62 -0
  599. package/.versions/2.2.3/.pi/harnesses/lib/peer-target.ts +24 -0
  600. package/.versions/2.2.3/.pi/harnesses/lib/policy-roots.js +117 -0
  601. package/.versions/2.2.3/.pi/harnesses/lib/policy-roots.ts +32 -0
  602. package/.versions/2.2.3/.pi/harnesses/lib/process-shared.ts +9 -0
  603. package/.versions/2.2.3/.pi/harnesses/lib/resource-closure.js +26 -0
  604. package/.versions/2.2.3/.pi/harnesses/lib/safe-source-read.js +29 -0
  605. package/.versions/2.2.3/.pi/harnesses/lib/semantic-approval.ts +80 -0
  606. package/.versions/2.2.3/.pi/harnesses/lib/session-target.ts +62 -0
  607. package/.versions/2.2.3/.pi/harnesses/lib/spawned-peers.js +191 -0
  608. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-agentic.js +15 -0
  609. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
  610. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
  611. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
  612. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-json.js +37 -0
  613. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-loader.js +53 -0
  614. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-proactive.js +68 -0
  615. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-triage.js +42 -0
  616. package/.versions/2.2.3/.pi/harnesses/lib/system1/config-v2.js +112 -0
  617. package/.versions/2.2.3/.pi/harnesses/lib/system1/config.js +50 -0
  618. package/.versions/2.2.3/.pi/harnesses/lib/system1/contracts.ts +154 -0
  619. package/.versions/2.2.3/.pi/harnesses/lib/system1/demo.ts +95 -0
  620. package/.versions/2.2.3/.pi/harnesses/lib/system1/jev.ts +503 -0
  621. package/.versions/2.2.3/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
  622. package/.versions/2.2.3/.pi/harnesses/lib/system1/selection.js +11 -0
  623. package/.versions/2.2.3/.pi/harnesses/lib/system1/service.ts +245 -0
  624. package/.versions/2.2.3/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
  625. package/.versions/2.2.3/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
  626. package/.versions/2.2.3/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
  627. package/.versions/2.2.3/.pi/harnesses/lib/target-capabilities.js +7 -0
  628. package/.versions/2.2.3/.pi/harnesses/lib/update-check.ts +227 -0
  629. package/.versions/2.2.3/.pi/harnesses/lib/workspace-context.js +115 -0
  630. package/.versions/2.2.3/.pi/harnesses/lib/workspace-context.ts +22 -0
  631. package/.versions/2.2.3/.pi/harnesses/package-lock.json +2121 -0
  632. package/.versions/2.2.3/.pi/harnesses/package.json +13 -0
  633. package/.versions/2.2.3/.pi/prompts/af-build.md +27 -0
  634. package/.versions/2.2.3/.pi/prompts/af-code-simplify.md +22 -0
  635. package/.versions/2.2.3/.pi/prompts/af-constraints.md +31 -0
  636. package/.versions/2.2.3/.pi/prompts/af-plan.md +17 -0
  637. package/.versions/2.2.3/.pi/prompts/af-review.md +16 -0
  638. package/.versions/2.2.3/.pi/prompts/af-set-hermes-telegram.md +15 -0
  639. package/.versions/2.2.3/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  640. package/.versions/2.2.3/.pi/prompts/af-setup-rules.md +20 -0
  641. package/.versions/2.2.3/.pi/prompts/af-ship.md +17 -0
  642. package/.versions/2.2.3/.pi/prompts/af-spec.md +15 -0
  643. package/.versions/2.2.3/.pi/prompts/af-test.md +19 -0
  644. package/.versions/2.2.3/.pi/skills/bowser/SKILL.md +145 -0
  645. package/.versions/2.2.3/.version +1 -0
  646. package/.versions/2.2.3/agents/architect.md +24 -0
  647. package/.versions/2.2.3/agents/bowser.md +28 -0
  648. package/.versions/2.2.3/agents/builder.md +55 -0
  649. package/.versions/2.2.3/agents/code-reviewer.md +209 -0
  650. package/.versions/2.2.3/agents/deep-researcher.md +32 -0
  651. package/.versions/2.2.3/agents/documenter.md +22 -0
  652. package/.versions/2.2.3/agents/plan-reviewer.md +83 -0
  653. package/.versions/2.2.3/agents/planner.md +107 -0
  654. package/.versions/2.2.3/agents/releaser.md +24 -0
  655. package/.versions/2.2.3/agents/researcher.md +30 -0
  656. package/.versions/2.2.3/agents/security-auditor.md +167 -0
  657. package/.versions/2.2.3/agents/test-engineer.md +153 -0
  658. package/.versions/2.2.3/agents/web-debugger.md +44 -0
  659. package/.versions/2.2.3/agents/web-performance-auditor.md +194 -0
  660. package/.versions/2.2.3/bin/catalog/harness-runtime-closure.json +85 -0
  661. package/.versions/2.2.3/docs/ARCHITECTURE.md +1291 -0
  662. package/.versions/2.2.3/docs/agent-fleet-setup.md +1161 -0
  663. package/.versions/2.2.3/docs/claude-code-coms-bridge.md +147 -0
  664. package/.versions/2.2.3/docs/codex-local-mcp.md +520 -0
  665. package/.versions/2.2.3/docs/codex-session-bridge.md +44 -0
  666. package/.versions/2.2.3/docs/codex-setup.md +183 -0
  667. package/.versions/2.2.3/docs/coms-hermes-bridge.md +188 -0
  668. package/.versions/2.2.3/docs/fleet-native-voice.md +151 -0
  669. package/.versions/2.2.3/docs/getting-started.md +126 -0
  670. package/.versions/2.2.3/docs/npm-install.md +535 -0
  671. package/.versions/2.2.3/docs/pi-extensions.md +450 -0
  672. package/.versions/2.2.3/docs/pi-setup.md +92 -0
  673. package/.versions/2.2.3/docs/skill-anatomy.md +150 -0
  674. package/.versions/2.2.3/install-manifest.json +3227 -0
  675. package/.versions/2.2.3/justfile +246 -0
  676. package/.versions/2.2.3/manifest-meta.json +1099 -0
  677. package/.versions/2.2.3/references/accessibility-checklist.md +160 -0
  678. package/.versions/2.2.3/references/communication-contract.md +26 -0
  679. package/.versions/2.2.3/references/definition-of-done.md +67 -0
  680. package/.versions/2.2.3/references/fleet-coordination-patterns.md +171 -0
  681. package/.versions/2.2.3/references/observability-checklist.md +92 -0
  682. package/.versions/2.2.3/references/orchestration-patterns.md +370 -0
  683. package/.versions/2.2.3/references/performance-checklist.md +236 -0
  684. package/.versions/2.2.3/references/prompting-patterns.md +380 -0
  685. package/.versions/2.2.3/references/security-checklist.md +245 -0
  686. package/.versions/2.2.3/references/testing-patterns.md +235 -0
  687. package/.versions/2.2.3/references/workflow-authoring.md +304 -0
  688. package/.versions/2.2.3/skills/_internal/grilling.md +59 -0
  689. package/.versions/2.2.3/skills/browser-testing-with-devtools/SKILL.md +351 -0
  690. package/.versions/2.2.3/skills/code-review-and-quality/SKILL.md +396 -0
  691. package/.versions/2.2.3/skills/compound-learning/SKILL.md +137 -0
  692. package/.versions/2.2.3/skills/constraint-driven-development/SKILL.md +338 -0
  693. package/.versions/2.2.3/skills/constraint-driven-development/references/floor-guard.md +99 -0
  694. package/.versions/2.2.3/skills/context-engineering/SKILL.md +341 -0
  695. package/.versions/2.2.3/skills/deprecation-and-migration/SKILL.md +247 -0
  696. package/.versions/2.2.3/skills/designing-agents/SKILL.md +394 -0
  697. package/.versions/2.2.3/skills/designing-agents/pi-harness-authoring.md +222 -0
  698. package/.versions/2.2.3/skills/drafting-workflows/SKILL.md +143 -0
  699. package/.versions/2.2.3/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  700. package/.versions/2.2.3/skills/fleet-connect/SKILL.md +29 -0
  701. package/.versions/2.2.3/skills/fleet-connect.zip +0 -0
  702. package/.versions/2.2.3/skills/fleet-native-voice/SKILL.md +103 -0
  703. package/.versions/2.2.3/skills/fleet-native-voice/agents/openai.yaml +4 -0
  704. package/.versions/2.2.3/skills/fleet-native-voice.zip +0 -0
  705. package/.versions/2.2.3/skills/frontend-ui-engineering/SKILL.md +328 -0
  706. package/.versions/2.2.3/skills/git-workflow-and-versioning/SKILL.md +316 -0
  707. package/.versions/2.2.3/skills/idea-refine/SKILL.md +182 -0
  708. package/.versions/2.2.3/skills/idea-refine/examples.md +238 -0
  709. package/.versions/2.2.3/skills/idea-refine/frameworks.md +99 -0
  710. package/.versions/2.2.3/skills/idea-refine/refinement-criteria.md +113 -0
  711. package/.versions/2.2.3/skills/idea-refine/scripts/idea-refine.sh +15 -0
  712. package/.versions/2.2.3/skills/incremental-implementation/SKILL.md +353 -0
  713. package/.versions/2.2.3/skills/incremental-implementation.zip +0 -0
  714. package/.versions/2.2.3/skills/interview-me/SKILL.md +226 -0
  715. package/.versions/2.2.3/skills/orchestration-verification/SKILL.md +182 -0
  716. package/.versions/2.2.3/skills/peer-coms/SKILL.md +90 -0
  717. package/.versions/2.2.3/skills/performance-optimization/SKILL.md +496 -0
  718. package/.versions/2.2.3/skills/planning-and-task-breakdown/SKILL.md +318 -0
  719. package/.versions/2.2.3/skills/planning-and-task-breakdown.zip +0 -0
  720. package/.versions/2.2.3/skills/repository-ai-setup/SKILL.md +135 -0
  721. package/.versions/2.2.3/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  722. package/.versions/2.2.3/skills/repository-ai-setup/references/apply-contract.md +74 -0
  723. package/.versions/2.2.3/skills/repository-ai-setup/references/provenance-template.md +16 -0
  724. package/.versions/2.2.3/skills/repository-ai-setup/references/setup-flow.md +108 -0
  725. package/.versions/2.2.3/skills/repository-ai-setup/references/verify-setup.md +20 -0
  726. package/.versions/2.2.3/skills/repository-ai-setup.zip +0 -0
  727. package/.versions/2.2.3/skills/security-and-hardening/SKILL.md +524 -0
  728. package/.versions/2.2.3/skills/spec-driven-development/SKILL.md +295 -0
  729. package/.versions/2.2.3/skills/spec-driven-development.zip +0 -0
  730. package/.versions/2.2.3/skills/using-agent-skills/SKILL.md +198 -0
  731. package/.versions/2.2.3/vendor/agent-skills-upstream/LICENSE +21 -0
  732. package/.versions/2.2.3/vendor/agent-skills-upstream/README.md +430 -0
  733. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  734. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  735. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  736. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  737. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  738. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  739. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  740. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  741. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  742. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  743. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  744. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  745. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  746. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  747. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  748. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  749. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  750. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  751. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  752. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  753. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  754. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  755. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  756. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  757. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  758. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  759. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  760. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  761. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  762. package/.versions/2.2.3/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  763. package/CHANGELOG.md +19 -0
  764. package/docs/hub-task-continuation.md +23 -0
  765. package/install-manifest.json +1 -1
  766. package/package.json +4 -3
@@ -0,0 +1,212 @@
1
+ // S5c: bounded local observations, never source-side writes or human delivery proof.
2
+ import { setTimeout as delay } from 'node:timers/promises';
3
+ import type { ConversationKey, TargetEpoch } from './fleet-codex-allowlist.ts';
4
+ import { ObservationBridge, type ReadAuthorization } from './fleet-codex-observe.ts';
5
+ import { ObservationStore, ObservationStoreError, epochKey, type Cursor } from './fleet-codex-observation-store.ts';
6
+ import { parseOverviewTargets } from './fleet-codex-overview.ts';
7
+ import { ReadonlyFleetError } from './fleet-codex-readonly.ts';
8
+ type Selector = {
9
+ project: string;
10
+ peer: string;
11
+ };
12
+ type Snapshot = Awaited<ReturnType<ObservationBridge['observe']>>;
13
+ const check = (signal?: AbortSignal) => { if (signal?.aborted)
14
+ throw new ReadonlyFleetError('REQUEST_CANCELLED'); };
15
+ const same = (a: TargetEpoch, b: TargetEpoch) => epochKey(a) === epochKey(b);
16
+ const safeCode = (e: unknown) => e instanceof ReadonlyFleetError || e instanceof ObservationStoreError ? e.code
17
+ : e instanceof Error && (e as Error & {
18
+ code?: string;
19
+ }).code === 'NOT_ALLOWED' ? 'NOT_ALLOWED' : 'IO_ERROR';
20
+ function summary(selector: Selector, s: Snapshot, previous: Cursor | null, reset: string | null) {
21
+ const t = s.transcript, q = s.questionState, w = t.window;
22
+ let status = 'unavailable', reason: string | null = 'SOURCE_UNAVAILABLE', gap = t.partial, advance = false, events = t.entries;
23
+ if (t.status === 'available') {
24
+ if (!w || t.entries.some(e => !e.id)) {
25
+ status = 'unsupported';
26
+ reason = 'CURSOR_METADATA_UNSUPPORTED';
27
+ gap = true;
28
+ }
29
+ else {
30
+ advance = true;
31
+ reason = null;
32
+ if (!previous || previous.leaf === null) {
33
+ status = 'initial';
34
+ }
35
+ else if (w.leaf === previous.leaf && previous.lastEvent === (t.entries.at(-1)?.id ?? null)) {
36
+ status = 'unchanged';
37
+ events = [];
38
+ }
39
+ else if (!w.ancestry.includes(previous.leaf)) {
40
+ status = 'gap';
41
+ reason = 'ANCHOR_UNREACHABLE';
42
+ gap = true;
43
+ }
44
+ else if (previous.lastEvent === null) {
45
+ status = 'advanced';
46
+ }
47
+ else {
48
+ const index = t.entries.findIndex(e => e.id === previous.lastEvent);
49
+ if (index < 0) {
50
+ status = 'gap';
51
+ reason = 'EVENT_WINDOW_GAP';
52
+ gap = true;
53
+ }
54
+ else {
55
+ status = 'advanced';
56
+ events = t.entries.slice(index + 1);
57
+ }
58
+ }
59
+ }
60
+ }
61
+ else {
62
+ events = [];
63
+ gap = true;
64
+ }
65
+ if (events.length > 12 || events.some(e => e.text.length > 256)) {
66
+ gap = true;
67
+ reason = 'OUTPUT_LIMIT';
68
+ }
69
+ const seen = previous?.questions ?? [], pending = q.questions.map(v => v.id), resolved = q.resolved.map(v => v.id);
70
+ const newlySeen = pending.filter(id => !seen.includes(id)), allSeen = q.status === 'available' ? [...new Set([...seen, ...pending, ...resolved])] : seen;
71
+ const questionGap = q.partial || q.status !== 'available' || allSeen.length > 256 || newlySeen.length > 8 || q.questions.length > 4 || q.resolved.length > 8;
72
+ const result = { selector: { ...selector }, status: 'observed' as const, target: s.target, permission: s.permission, observedAt: s.observedAt,
73
+ nonAtomic: true, observationOnly: true, reset, partial: s.partial || gap || questionGap, gap,
74
+ cursor: { revision: previous?.revision ?? null, status, reason, committed: false },
75
+ transcript: { status: t.status, partial: t.partial, reasons: t.reasons },
76
+ events: events.slice(-12).map(e => ({ ...e, text: e.text.slice(0, 256) })),
77
+ questions: { status: q.status, partial: q.partial, reasons: q.reasons, pendingCount: q.pendingCount,
78
+ pending: q.questions.slice(0, 4).map(v => ({ id: v.id, toolCallId: v.toolCallId, preview: v.question.slice(0, 256), detailsRequired: true })),
79
+ resolved: q.resolved.slice(0, 8).map(v => ({ ...v })),
80
+ newQuestionIds: newlySeen.slice(0, 8), gap: questionGap, delivery: 'not_established' },
81
+ permissions:s.permissionState,
82
+ completion: 'not_established' as const };
83
+ const data = { leaf: advance ? w!.leaf : previous?.leaf ?? null, lastEvent: advance ? t.entries.at(-1)?.id ?? null : previous?.lastEvent ?? null,
84
+ questions: allSeen.slice(-256), observedAt: s.observedAt };
85
+ return { result, data, save: advance || q.status === 'available' };
86
+ }
87
+ type TargetResult = ReturnType<typeof summary>['result'] | {
88
+ selector: Selector;
89
+ status: 'error';
90
+ code: string;
91
+ dataReleased: false;
92
+ };
93
+ export class ResyncBridge {
94
+ readonly #observer: Pick<ObservationBridge, 'observe'>;
95
+ readonly #authorization: ReadAuthorization;
96
+ readonly #store: ObservationStore;
97
+ readonly #clock: () => number;
98
+ readonly #sleep: (ms: number, signal?: AbortSignal) => Promise<void>;
99
+ constructor(options: {
100
+ observer: Pick<ObservationBridge, 'observe'>;
101
+ authorization: ReadAuthorization;
102
+ store: ObservationStore;
103
+ clock?: () => number;
104
+ sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
105
+ }) {
106
+ this.#observer = options.observer;
107
+ this.#authorization = options.authorization;
108
+ this.#store = options.store;
109
+ this.#clock = options.clock ?? (() => performance.now());
110
+ this.#sleep = options.sleep ?? (async (ms, signal) => { await delay(ms, undefined, { signal }); });
111
+ }
112
+ async #one(context: ConversationKey, selector: Selector, signal?: AbortSignal): Promise<TargetResult> {
113
+ try {
114
+ check(signal);
115
+ const before = await this.#authorization.checkAllowedReadTarget(context, selector);
116
+ check(signal);
117
+ const old = this.#store.read(context, before.target), s = await this.#observer.observe(context, selector);
118
+ check(signal);
119
+ if (!same(s.target, before.target))
120
+ throw new ReadonlyFleetError('TARGET_CHANGED');
121
+ const built = summary(selector, s, old.cursor, old.reset);
122
+ // A bounded target result is checked BEFORE committing any observation progress.
123
+ if (Buffer.byteLength(JSON.stringify(built.result)) + 32 > 16384)
124
+ throw new ReadonlyFleetError('SUMMARY_LIMIT');
125
+ const guard = async () => { check(signal); const current = await this.#authorization.checkAllowedReadTarget(context, selector); if (!same(current.target, before.target))
126
+ throw new ReadonlyFleetError('TARGET_CHANGED'); check(signal); };
127
+ if (built.save) {
128
+ const saved = await this.#store.save(context, s.target, old.cursor?.revision ?? null, built.data, guard);
129
+ built.result.cursor.revision = saved.revision;
130
+ built.result.cursor.committed = true;
131
+ }
132
+ await guard();
133
+ check(signal);
134
+ return built.result;
135
+ }
136
+ catch (e) {
137
+ check(signal);
138
+ return { selector: { ...selector }, status: 'error' as const, code: safeCode(e), dataReleased: false as const };
139
+ }
140
+ }
141
+ async resync(context: ConversationKey, args: unknown, signal?: AbortSignal) {
142
+ const targets = parseOverviewTargets(args);
143
+ check(signal);
144
+ const results: TargetResult[] = [];
145
+ let next = 0;
146
+ const worker = async () => { while (next < targets.length) {
147
+ check(signal);
148
+ const index = next++;
149
+ results[index] = await this.#one(context, targets[index], signal);
150
+ } };
151
+ // Await every started read before returning a cancellation; never detach source work.
152
+ const outcomes = await Promise.allSettled(Array.from({ length: Math.min(2, targets.length) }, worker));
153
+ check(signal);
154
+ const failed = outcomes.find(v => v.status === 'rejected');
155
+ if (failed?.status === 'rejected')
156
+ throw failed.reason;
157
+ return { scope: 'durable_observation' as const, nonAtomic: true, observationOnly: true, completion: 'not_established' as const,
158
+ partial: results.some(r => r.status === 'error' || r.partial), results };
159
+ }
160
+ async watch(context: ConversationKey, args: unknown, signal?: AbortSignal) {
161
+ if (!args || typeof args !== 'object' || Array.isArray(args) || Object.keys(args).some(k => !['targets', 'durationSeconds'].includes(k)) || !Object.hasOwn(args, 'targets') || !Object.hasOwn(args, 'durationSeconds'))
162
+ throw new ReadonlyFleetError('INVALID_ARGUMENTS');
163
+ const a = args as {
164
+ targets: unknown;
165
+ durationSeconds: unknown;
166
+ };
167
+ if (!Number.isInteger(a.durationSeconds) || (a.durationSeconds as number) < 1 || (a.durationSeconds as number) > 10)
168
+ throw new ReadonlyFleetError('INVALID_ARGUMENTS');
169
+ const parsed = parseOverviewTargets({ targets: a.targets });
170
+ check(signal);
171
+ const start = this.#clock();
172
+ if (!Number.isFinite(start) || start < 0)
173
+ throw new ReadonlyFleetError('CLOCK_INVALID');
174
+ const deadline = start + (a.durationSeconds as number) * 1000, frames: Array<Awaited<ReturnType<ResyncBridge['resync']>>> = [];
175
+ let reason = 'frame_limit', used = 0;
176
+ for (let i = 0; i < 6; i++) {
177
+ check(signal);
178
+ if (97280 - used < 70000) {
179
+ reason = 'output_budget';
180
+ break;
181
+ }
182
+ const frame = await this.resync(context, { targets: parsed }, signal), bytes = Buffer.byteLength(JSON.stringify(frame));
183
+ if (bytes > 70000)
184
+ throw new ReadonlyFleetError('SUMMARY_LIMIT');
185
+ frames.push(frame);
186
+ used += bytes;
187
+ if (frame.results.some(r => r.status === 'error' && r.code.startsWith('CURSOR_'))) {
188
+ reason = 'cursor_error';
189
+ break;
190
+ }
191
+ const remaining = deadline - this.#clock();
192
+ if (remaining <= 0) {
193
+ reason = 'duration';
194
+ break;
195
+ }
196
+ try {
197
+ await this.#sleep(Math.min(2000, remaining), signal);
198
+ }
199
+ catch (e) {
200
+ check(signal);
201
+ throw e;
202
+ }
203
+ check(signal);
204
+ if (this.#clock() >= deadline) {
205
+ reason = 'duration';
206
+ break;
207
+ }
208
+ }
209
+ check(signal);
210
+ return { scope: 'bounded_active_watch' as const, idleWake: false, backgroundWork: false, nonAtomic: true, reason, frames, completion: 'not_established' as const };
211
+ }
212
+ }
@@ -0,0 +1,264 @@
1
+ import {parseWorktreeSelection,type WorktreeSelection} from '../../../harnesses/lib/workspace-context.ts';
2
+ export interface FleetInvocation {
3
+ selection?:WorktreeSelection;
4
+ preview?:boolean;
5
+ recipe: string;
6
+ args: string[];
7
+ warnings?: string[];
8
+ }
9
+
10
+ interface Capabilities {
11
+ browser: boolean;
12
+ voice: boolean;
13
+ allExtensions: boolean;
14
+ rest: string[];
15
+ }
16
+
17
+ function capabilities(args: string[]): Capabilities {
18
+ const rest: string[] = [];
19
+ let browser = false;
20
+ let voice = false;
21
+ let allExtensions = false;
22
+ for (const arg of args) {
23
+ if (arg === "--browser") browser = true;
24
+ else if (arg === "--voice") voice = true;
25
+ else if (arg === "--all-extensions") allExtensions = true;
26
+ else rest.push(arg);
27
+ }
28
+ return { browser, voice, allExtensions, rest };
29
+ }
30
+
31
+ function bool(value: boolean): string {
32
+ return value ? "true" : "false";
33
+ }
34
+
35
+ function requireValue(value: string | undefined, message: string): string {
36
+ if (!value || value.startsWith("--")) throw new Error(message);
37
+ return value;
38
+ }
39
+
40
+ function withoutFlag(args: string[], flag: string): { present: boolean; rest: string[] } {
41
+ return { present: args.includes(flag), rest: args.filter((arg) => arg !== flag) };
42
+ }
43
+
44
+ interface HubParseDefaults {
45
+ defaultAgents?: string;
46
+ forceHerdr?: boolean;
47
+ forcedPeers?: string;
48
+ legacyAgents?: boolean;
49
+ warnings?: string[];
50
+ }
51
+
52
+ function parseHubInvocation(args: string[], defaults: HubParseDefaults = {}): FleetInvocation {
53
+ if (args.some(arg => arg === "--posture" || arg.startsWith("--posture="))) {
54
+ throw new Error("--posture was removed; the Hub has one operator work mode.");
55
+ }
56
+
57
+ let agents = defaults.defaultAgents;
58
+ let peers = defaults.forcedPeers;
59
+ let herdr = defaults.forceHerdr ?? false;
60
+ let noComs = false;
61
+ let browser = false;
62
+ let voice = false;
63
+ let allExtensions = false;
64
+ let dryRun = false;
65
+ let projectSeen = false;
66
+ let agentsSeen = false;
67
+ let peersSeen = false;
68
+ let workModeSeen = false;
69
+ let herdrSeen = false;
70
+ let noComsSeen = false;
71
+ let browserSeen = false;
72
+ let voiceSeen = false;
73
+ let allExtensionsSeen = false;
74
+ let dryRunSeen = false;
75
+ const rest: string[] = [];
76
+ const warnings = [...(defaults.warnings ?? [])];
77
+
78
+ for (let i = 0; i < args.length; i++) {
79
+ const arg = args[i];
80
+ if (arg === "--") {
81
+ rest.push(...args.slice(i));
82
+ break;
83
+ }
84
+ switch (arg) {
85
+ case "--work-mode": {
86
+ if (workModeSeen) throw new Error("--work-mode may only be provided once");
87
+ workModeSeen = true;
88
+ // Deprecated (2026-11-11): one release of tolerance, then the flag goes.
89
+ const value = requireValue(args[++i], "--work-mode requires a value");
90
+ warnings.push(`\`--work-mode ${value}\` is deprecated and ignored: the Hub has one operator work mode.`);
91
+ break;
92
+ }
93
+ case "--agents":
94
+ if (agentsSeen) throw new Error("--agents may only be provided once");
95
+ agentsSeen = true;
96
+ agents = requireValue(args[++i], "--agents requires a native roster name");
97
+ break;
98
+ case "--peers": {
99
+ if (peersSeen) throw new Error("--peers may only be provided once");
100
+ peersSeen = true;
101
+ const value = requireValue(args[++i], "--peers requires a peer preset name");
102
+ if (defaults.forcedPeers && value !== defaults.forcedPeers) {
103
+ throw new Error(`Compatibility team preset ${defaults.forcedPeers} cannot combine with --peers ${value}`);
104
+ }
105
+ peers = value;
106
+ break;
107
+ }
108
+ case "--herdr":
109
+ if (herdrSeen) throw new Error("--herdr may only be provided once");
110
+ herdrSeen = true;
111
+ herdr = true;
112
+ break;
113
+ case "--no-coms":
114
+ case "--solo":
115
+ if (noComsSeen) throw new Error("--no-coms/--solo may only be provided once");
116
+ noComsSeen = true;
117
+ noComs = true;
118
+ if (arg === "--solo") warnings.push("`--solo` is deprecated; use `--no-coms`.");
119
+ break;
120
+ case "--browser":
121
+ if (browserSeen) throw new Error("--browser may only be provided once");
122
+ browserSeen = true;
123
+ browser = true;
124
+ break;
125
+ case "--voice":
126
+ if (voiceSeen) throw new Error("--voice may only be provided once");
127
+ voiceSeen = true;
128
+ voice = true;
129
+ break;
130
+ case "--all-extensions":
131
+ if (allExtensionsSeen) throw new Error("--all-extensions may only be provided once");
132
+ allExtensionsSeen = true;
133
+ allExtensions = true;
134
+ break;
135
+ case "--dry-run":
136
+ if (dryRunSeen) throw new Error("--dry-run may only be provided once");
137
+ dryRunSeen = true;
138
+ dryRun = true;
139
+ break;
140
+ case "--project":
141
+ if (projectSeen) throw new Error("--project may only be provided once");
142
+ projectSeen = true;
143
+ rest.push(arg, requireValue(args[++i], "--project requires a name"));
144
+ break;
145
+ default:
146
+ rest.push(arg);
147
+ }
148
+ }
149
+
150
+ const topology = herdr || peers !== undefined;
151
+ if (dryRun && !topology) throw new Error("--dry-run requires --herdr or --peers");
152
+
153
+ let invocation: FleetInvocation;
154
+ if (topology) {
155
+ const forwarded = [
156
+ ...(agents ? [defaults.legacyAgents ? "--legacy-agents" : "--agents", agents] : []),
157
+ ...(noComs ? ["--no-coms"] : []),
158
+ ...(browser ? ["--browser"] : []),
159
+ ...(voice ? ["--voice"] : []),
160
+ ...(allExtensions ? ["--all-extensions"] : []),
161
+ ...rest,
162
+ ];
163
+ invocation = { recipe: dryRun ? "_fleet-hub-team-dry" : "_fleet-hub-team", args: [peers ?? "base", ...forwarded] };
164
+ } else {
165
+ invocation = {
166
+ recipe: "_fleet-hub",
167
+ args: [
168
+ bool(noComs),
169
+ bool(browser),
170
+ bool(voice),
171
+ bool(allExtensions),
172
+ ...(agents ? ["--agent-team", agents] : []),
173
+ ...rest,
174
+ ],
175
+ };
176
+ }
177
+ if (warnings.length > 0) invocation.warnings = warnings;
178
+ return invocation;
179
+ }
180
+
181
+ export function parseFleetCommand(argv: string[]): FleetInvocation {
182
+ const {rest,selection}=parseWorktreeSelection(argv);
183
+ const boundary=rest.indexOf('--'),end=boundary<0?rest.length:boundary;
184
+ const options=rest.slice(0,end);
185
+ const direct=(options.length===0||options[0].startsWith('--')||options[0]==='hub')&&!options.includes('--herdr')&&!options.includes('--peers')&&!options.includes('--conductor');
186
+ const preview=Boolean(selection&&direct&&options.includes('--dry-run'));
187
+ const effective=preview?rest.filter((arg,index)=>arg!=='--dry-run'||index>=end):rest;
188
+ const invocation=parseFleetCommandBase(effective);
189
+ if(selection&&['_fleet-lifecycle','_fleet-deps'].includes(invocation.recipe))throw Error('--worktree selects a runtime checkout, not an installation target; run lifecycle commands from af without this flag');
190
+ return selection?{...invocation,selection,...(preview?{preview:true}:{})}:invocation;
191
+ }
192
+ function parseFleetCommandBase(argv: string[]): FleetInvocation {
193
+ if (argv.length === 0 || argv[0].startsWith("--")) {
194
+ return parseHubInvocation(argv);
195
+ }
196
+
197
+ const [mode, ...tail] = argv;
198
+ if (mode === "install") {
199
+ throw new Error("just fleet install was removed; use `just fleet setup` for lifecycle setup or `just fleet deps` for runtime dependencies");
200
+ }
201
+ if (mode === "deps") return { recipe: "_fleet-deps", args: tail };
202
+ if (["setup", "doctor"].includes(mode)) return { recipe: "_fleet-lifecycle", args: [mode, ...tail] };
203
+ // `just fleet config` is the terminal twin of the in-session /af-config screen: the read-only inspect report.
204
+ if (mode === "config" || mode === "inspect") return { recipe: "_fleet-lifecycle", args: ["inspect", ...tail] };
205
+ if (mode === "uninstall") return { recipe: "_fleet-lifecycle", args: ["uninstall", ...tail] };
206
+
207
+ // One addressable peer, in a pane of its own unless --here. peer-launch.ts
208
+ // owns the whole flag set (including `--` passthrough to pi), so the tail is
209
+ // forwarded verbatim rather than pre-chewed the way core/hub capabilities are.
210
+ if (mode === "peer") {
211
+ requireValue(tail[0], "fleet peer requires a peer name");
212
+ return { recipe: "_fleet-peer-launch", args: tail };
213
+ }
214
+
215
+ if (mode === "hub") {
216
+ return parseHubInvocation(tail, {
217
+ defaultAgents: "default",
218
+ warnings: ["`just fleet hub` is a compatibility alias; use `just fleet` with canonical flags."],
219
+ });
220
+ }
221
+
222
+ if (mode === "team") {
223
+ const team = requireValue(tail[0], "fleet team requires a team preset");
224
+ const noHub = withoutFlag(tail.slice(1), "--no-hub");
225
+ if (!noHub.present) {
226
+ return parseHubInvocation(noHub.rest, {
227
+ defaultAgents: team === "base" ? undefined : team,
228
+ forceHerdr: true,
229
+ forcedPeers: team,
230
+ legacyAgents: team !== "base",
231
+ warnings: [team === "base"
232
+ ? "`just fleet team base` is a compatibility alias; use `just fleet --herdr`."
233
+ : `\`just fleet team ${team}\` is a compatibility alias; use \`just fleet --agents <roster> --peers ${team}\`.`],
234
+ });
235
+ }
236
+ const dry = withoutFlag(noHub.rest, "--dry-run");
237
+ const c = capabilities(dry.rest);
238
+ if (c.browser || c.allExtensions) {
239
+ throw new Error("--browser/--all-extensions requires the hub; peer capabilities belong in .pi/agents/peers.yaml");
240
+ }
241
+ return {
242
+ recipe: dry.present ? "_fleet-team-up-dry" : "_fleet-team-up",
243
+ args: [team, ...c.rest],
244
+ warnings: [`\`just fleet team ${team} --no-hub\` is a compatibility alias; prefer \`just fleet peer\` or a canonical Hub topology.`],
245
+ };
246
+ }
247
+
248
+ if (mode === "snapshot" || mode === "down" || mode === "resume") {
249
+ const team = requireValue(tail[0], `fleet ${mode} requires a team preset`);
250
+ return { recipe: `_fleet-team-${mode === "snapshot" ? "snapshot" : mode}`, args: [team, ...tail.slice(1)] };
251
+ }
252
+
253
+ if (mode === "conductor") {
254
+ const backend = requireValue(tail[0], "fleet conductor requires hermes");
255
+ if (backend !== "hermes") throw new Error(`Unknown conductor backend: ${backend}`);
256
+ const rest = tail.slice(1);
257
+ const team = rest[0] && !rest[0].startsWith("--") ? rest[0] : "full";
258
+ const afterTeam = rest[0] === team ? rest.slice(1) : rest;
259
+ const dry = withoutFlag(afterTeam, "--dry-run");
260
+ return { recipe: dry.present ? "_fleet-conductor-dry" : "_fleet-conductor", args: [team, ...dry.rest] };
261
+ }
262
+
263
+ throw new Error(`Unknown fleet mode: ${mode}`);
264
+ }
@@ -0,0 +1,107 @@
1
+ import {parseWorktreeSelection,type WorktreeSelection} from "../../../harnesses/lib/workspace-context.ts";
2
+ export interface FlowCommand {
3
+ selection?:WorktreeSelection;
4
+ /** Explicit opt-in; otherwise execute on the caller's current branch. */
5
+ branch?: boolean;
6
+ name: string;
7
+ args: string[];
8
+ allowDirty: boolean;
9
+ dryRun: boolean;
10
+ runId?: string;
11
+ panel?: string;
12
+ rounds?: number;
13
+ apply?: boolean;
14
+ }
15
+
16
+ export interface FlowMaintenanceCommand {
17
+ selection?:WorktreeSelection;
18
+ action: "cleanup" | "merge";
19
+ selector?: string;
20
+ target?: string;
21
+ discard: boolean;
22
+ yes: boolean;
23
+ }
24
+
25
+ const FLOW_NAME = /^[a-z][a-z0-9-]*$/;
26
+ const RUN_ID = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
27
+ const SAFE_REF = /^[A-Za-z0-9][A-Za-z0-9._/-]*$/;
28
+
29
+ function safeRef(value: string): boolean {
30
+ return SAFE_REF.test(value) && !value.includes("..") && !value.includes("//") && !value.includes("@{") && !value.endsWith("/") && !value.endsWith(".");
31
+ }
32
+
33
+ export function parseFlowMaintenanceCommand(argv: string[]): FlowMaintenanceCommand {
34
+ const {rest,selection}=parseWorktreeSelection(argv);const command=parseFlowMaintenanceBase(rest);return selection?{...command,selection}:command;
35
+ }
36
+ function parseFlowMaintenanceBase(argv: string[]): FlowMaintenanceCommand {
37
+ const action = argv[0];
38
+ if (action !== "cleanup" && action !== "merge") throw new Error("Usage: flow <cleanup|merge> [number|flow/branch] [options]");
39
+ let selector: string | undefined, target: string | undefined, discard = false, yes = false;
40
+ for (let i = 1; i < argv.length; i++) {
41
+ const arg = argv[i];
42
+ if (arg === "--discard") {
43
+ if (discard) throw new Error("--discard may only be provided once");
44
+ discard = true;
45
+ } else if (arg === "--yes") {
46
+ if (yes) throw new Error("--yes may only be provided once");
47
+ yes = true;
48
+ } else if (arg === "--target") {
49
+ if (target) throw new Error("--target may only be provided once");
50
+ const value = argv[++i];
51
+ if (!value || value.startsWith("--") || !safeRef(value)) throw new Error("--target requires a safe local branch name");
52
+ target = value;
53
+ } else if (arg.startsWith("--")) throw new Error(`Unknown flow maintenance option: ${arg}`);
54
+ else {
55
+ if (selector) throw new Error("Only one flow branch selector may be provided");
56
+ if (!/^\d+$/.test(arg) && (!arg.startsWith("flow/") || !safeRef(arg))) throw new Error("Selector must be a list number or a full flow/* branch name");
57
+ selector = arg;
58
+ }
59
+ }
60
+ if (action === "cleanup" && target) throw new Error("--target is valid only with flow merge");
61
+ if (action === "merge" && discard) throw new Error("--discard is valid only with flow cleanup");
62
+ return { action, ...(selector ? { selector } : {}), ...(target ? { target } : {}), discard, yes };
63
+ }
64
+
65
+ export function parseFlowCommand(argv: string[]): FlowCommand {
66
+ const {rest,selection}=parseWorktreeSelection(argv);const command=parseFlowBase(rest);return selection?{...command,selection}:command;
67
+ }
68
+ function parseFlowBase(argv: string[]): FlowCommand {
69
+ if (argv.length === 0) throw new Error("Usage: flow <name> [args] [--branch] [--allow-dirty] [--run-id <id>] [--dry-run] [--panel <name>] [--rounds <n>] [--apply]");
70
+ const name = argv[0];
71
+ if (!FLOW_NAME.test(name)) throw new Error(`Invalid flow name: ${name}`);
72
+ let branch = false, allowDirty = false, dryRun = false, apply = false, runId: string | undefined, panel: string | undefined, rounds: number | undefined;
73
+ const args: string[] = [];
74
+ for (let i = 1; i < argv.length; i++) {
75
+ const arg = argv[i];
76
+ if (arg === "--branch") {
77
+ if (branch) throw new Error("--branch may only be provided once");
78
+ branch = true;
79
+ } else if (arg === "--allow-dirty") {
80
+ if (allowDirty) throw new Error("--allow-dirty may only be provided once");
81
+ allowDirty = true;
82
+ } else if (arg === "--dry-run") {
83
+ if (dryRun) throw new Error("--dry-run may only be provided once");
84
+ dryRun = true;
85
+ } else if (arg === "--apply") {
86
+ if (apply) throw new Error("--apply may only be provided once");
87
+ apply = true;
88
+ } else if (arg === "--run-id") {
89
+ if (runId) throw new Error("--run-id may only be provided once");
90
+ const value = argv[++i];
91
+ if (!value || value.startsWith("--") || !RUN_ID.test(value)) throw new Error("--run-id requires a safe identifier");
92
+ runId = value;
93
+ } else if (arg === "--panel") {
94
+ if (panel) throw new Error("--panel may only be provided once");
95
+ const value = argv[++i];
96
+ if (!value || value.startsWith("--")) throw new Error("--panel requires a panel name");
97
+ panel = value;
98
+ } else if (arg === "--rounds") {
99
+ if (rounds !== undefined) throw new Error("--rounds may only be provided once");
100
+ const value = argv[++i];
101
+ if (!value || value.startsWith("--") || !/^\d+$/.test(value)) throw new Error("--rounds requires an integer");
102
+ rounds = Number(value);
103
+ } else if (arg.startsWith("--")) throw new Error(`Unknown flow option: ${arg}`);
104
+ else args.push(arg);
105
+ }
106
+ return { name, args, allowDirty, dryRun, ...(branch ? { branch } : {}), ...(runId ? { runId } : {}), ...(panel ? { panel } : {}), ...(rounds !== undefined ? { rounds } : {}), ...(apply ? { apply } : {}) };
107
+ }