@chankov/agent-fleet 1.0.1 → 1.0.2

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 (316) hide show
  1. package/.pi/extensions/package-lock.json +77 -45
  2. package/.pi/harnesses/agent-hub/README.md +109 -18
  3. package/.pi/harnesses/agent-hub/budget-continuation.ts +73 -0
  4. package/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  5. package/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
  6. package/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  7. package/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  8. package/.pi/harnesses/agent-hub/hub-state-audit.js +18 -0
  9. package/.pi/harnesses/agent-hub/index.ts +988 -422
  10. package/.pi/harnesses/agent-hub/package.json +1 -1
  11. package/.pi/harnesses/agent-hub/posture.ts +72 -17
  12. package/.pi/harnesses/agent-hub/run-budget.js +12 -13
  13. package/.pi/harnesses/agent-hub/spawn.ts +14 -2
  14. package/.pi/harnesses/ask-user-remote/index.ts +59 -4
  15. package/.pi/harnesses/coms/package.json +1 -1
  16. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  17. package/.pi/harnesses/lib/context-budget-child-prompt.ts +179 -0
  18. package/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
  19. package/.pi/harnesses/lib/context-budget-view.ts +107 -0
  20. package/.pi/harnesses/lib/context-budget.ts +114 -0
  21. package/.pi/harnesses/lib/fleet-detail-view.ts +92 -2
  22. package/.pi/harnesses/package-lock.json +73 -80
  23. package/.versions/1.0.2/.pi/agents/dispatch-policy.yaml +32 -0
  24. package/.versions/1.0.2/.pi/agents/model-profiles.yaml +27 -0
  25. package/.versions/1.0.2/.pi/agents/peers.yaml +142 -0
  26. package/.versions/1.0.2/.pi/agents/teams.yaml +41 -0
  27. package/.versions/1.0.2/.pi/damage-control-rules.yaml +297 -0
  28. package/.versions/1.0.2/.pi/extensions/agent-fleet-update-check/README.md +57 -0
  29. package/.versions/1.0.2/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  30. package/.versions/1.0.2/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  31. package/.versions/1.0.2/.pi/extensions/btw/README.md +120 -0
  32. package/.versions/1.0.2/.pi/extensions/btw/index.ts +914 -0
  33. package/.versions/1.0.2/.pi/extensions/btw/package.json +6 -0
  34. package/.versions/1.0.2/.pi/extensions/btw/state.js +179 -0
  35. package/.versions/1.0.2/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  36. package/.versions/1.0.2/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  37. package/.versions/1.0.2/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  38. package/.versions/1.0.2/.pi/extensions/compact-and-continue/README.md +42 -0
  39. package/.versions/1.0.2/.pi/extensions/compact-and-continue/index.ts +120 -0
  40. package/.versions/1.0.2/.pi/extensions/compact-and-continue/package.json +6 -0
  41. package/.versions/1.0.2/.pi/extensions/mcp-bridge/README.md +46 -0
  42. package/.versions/1.0.2/.pi/extensions/mcp-bridge/index.ts +206 -0
  43. package/.versions/1.0.2/.pi/extensions/mcp-bridge/package.json +6 -0
  44. package/.versions/1.0.2/.pi/extensions/package-lock.json +1175 -0
  45. package/.versions/1.0.2/.pi/extensions/package.json +9 -0
  46. package/.versions/1.0.2/.pi/extensions/pi-voice-stt/README.md +205 -0
  47. package/.versions/1.0.2/.pi/extensions/pi-voice-stt/config.ts +198 -0
  48. package/.versions/1.0.2/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  49. package/.versions/1.0.2/.pi/extensions/pi-voice-stt/index.ts +248 -0
  50. package/.versions/1.0.2/.pi/extensions/pi-voice-stt/package.json +6 -0
  51. package/.versions/1.0.2/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  52. package/.versions/1.0.2/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  53. package/.versions/1.0.2/.pi/harnesses/agent-hub/README.md +1156 -0
  54. package/.versions/1.0.2/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  55. package/.versions/1.0.2/.pi/harnesses/agent-hub/artifacts.js +146 -0
  56. package/.versions/1.0.2/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  57. package/.versions/1.0.2/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  58. package/.versions/1.0.2/.pi/harnesses/agent-hub/budget-continuation.ts +73 -0
  59. package/.versions/1.0.2/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  60. package/.versions/1.0.2/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
  61. package/.versions/1.0.2/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  62. package/.versions/1.0.2/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  63. package/.versions/1.0.2/.pi/harnesses/agent-hub/context-window.js +106 -0
  64. package/.versions/1.0.2/.pi/harnesses/agent-hub/delegate.ts +435 -0
  65. package/.versions/1.0.2/.pi/harnesses/agent-hub/docs-lane.js +122 -0
  66. package/.versions/1.0.2/.pi/harnesses/agent-hub/drift-watchdog.js +211 -0
  67. package/.versions/1.0.2/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  68. package/.versions/1.0.2/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  69. package/.versions/1.0.2/.pi/harnesses/agent-hub/footer.ts +35 -0
  70. package/.versions/1.0.2/.pi/harnesses/agent-hub/helpers.ts +266 -0
  71. package/.versions/1.0.2/.pi/harnesses/agent-hub/hub-state-audit.js +73 -0
  72. package/.versions/1.0.2/.pi/harnesses/agent-hub/index.ts +9909 -0
  73. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  74. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  75. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  76. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  77. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  78. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  79. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  80. package/.versions/1.0.2/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  81. package/.versions/1.0.2/.pi/harnesses/agent-hub/package.json +7 -0
  82. package/.versions/1.0.2/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  83. package/.versions/1.0.2/.pi/harnesses/agent-hub/posture.ts +158 -0
  84. package/.versions/1.0.2/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  85. package/.versions/1.0.2/.pi/harnesses/agent-hub/research-retention.js +34 -0
  86. package/.versions/1.0.2/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  87. package/.versions/1.0.2/.pi/harnesses/agent-hub/return-contract.js +293 -0
  88. package/.versions/1.0.2/.pi/harnesses/agent-hub/return-extract.js +75 -0
  89. package/.versions/1.0.2/.pi/harnesses/agent-hub/review-findings.js +102 -0
  90. package/.versions/1.0.2/.pi/harnesses/agent-hub/run-budget.js +539 -0
  91. package/.versions/1.0.2/.pi/harnesses/agent-hub/run-namespace.js +87 -0
  92. package/.versions/1.0.2/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  93. package/.versions/1.0.2/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  94. package/.versions/1.0.2/.pi/harnesses/agent-hub/session-health.js +110 -0
  95. package/.versions/1.0.2/.pi/harnesses/agent-hub/spawn.ts +366 -0
  96. package/.versions/1.0.2/.pi/harnesses/agent-hub/version.ts +42 -0
  97. package/.versions/1.0.2/.pi/harnesses/ask-user-remote/README.md +53 -0
  98. package/.versions/1.0.2/.pi/harnesses/ask-user-remote/index.ts +532 -0
  99. package/.versions/1.0.2/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  100. package/.versions/1.0.2/.pi/harnesses/coms/README.md +100 -0
  101. package/.versions/1.0.2/.pi/harnesses/coms/index.ts +1767 -0
  102. package/.versions/1.0.2/.pi/harnesses/coms/package.json +7 -0
  103. package/.versions/1.0.2/.pi/harnesses/coms/version.ts +42 -0
  104. package/.versions/1.0.2/.pi/harnesses/damage-control-continue/README.md +124 -0
  105. package/.versions/1.0.2/.pi/harnesses/damage-control-continue/index.ts +536 -0
  106. package/.versions/1.0.2/.pi/harnesses/damage-control-continue/package.json +7 -0
  107. package/.versions/1.0.2/.pi/harnesses/damage-control-continue/version.ts +42 -0
  108. package/.versions/1.0.2/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  109. package/.versions/1.0.2/.pi/harnesses/lib/context-budget-child-prompt.ts +179 -0
  110. package/.versions/1.0.2/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
  111. package/.versions/1.0.2/.pi/harnesses/lib/context-budget-view.ts +107 -0
  112. package/.versions/1.0.2/.pi/harnesses/lib/context-budget.ts +114 -0
  113. package/.versions/1.0.2/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  114. package/.versions/1.0.2/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  115. package/.versions/1.0.2/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  116. package/.versions/1.0.2/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  117. package/.versions/1.0.2/.pi/harnesses/lib/fleet-dashboard-ops.ts +155 -0
  118. package/.versions/1.0.2/.pi/harnesses/lib/fleet-dashboard-view.ts +140 -0
  119. package/.versions/1.0.2/.pi/harnesses/lib/fleet-detail-view.ts +133 -0
  120. package/.versions/1.0.2/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  121. package/.versions/1.0.2/.pi/harnesses/lib/fleet-panel.ts +34 -0
  122. package/.versions/1.0.2/.pi/harnesses/lib/fleet-read-model.ts +131 -0
  123. package/.versions/1.0.2/.pi/harnesses/lib/fleet-selection.ts +24 -0
  124. package/.versions/1.0.2/.pi/harnesses/lib/herdr-client.ts +472 -0
  125. package/.versions/1.0.2/.pi/harnesses/lib/herdr-presence.ts +399 -0
  126. package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  127. package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  128. package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  129. package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  130. package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  131. package/.versions/1.0.2/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  132. package/.versions/1.0.2/.pi/harnesses/lib/spawned-peers.js +190 -0
  133. package/.versions/1.0.2/.pi/harnesses/package-lock.json +2039 -0
  134. package/.versions/1.0.2/.pi/harnesses/package.json +10 -0
  135. package/.versions/1.0.2/.pi/prompts/af-build.md +24 -0
  136. package/.versions/1.0.2/.pi/prompts/af-code-simplify.md +22 -0
  137. package/.versions/1.0.2/.pi/prompts/af-plan.md +16 -0
  138. package/.versions/1.0.2/.pi/prompts/af-review.md +16 -0
  139. package/.versions/1.0.2/.pi/prompts/af-set-hermes-telegram.md +15 -0
  140. package/.versions/1.0.2/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  141. package/.versions/1.0.2/.pi/prompts/af-ship.md +17 -0
  142. package/.versions/1.0.2/.pi/prompts/af-spec.md +15 -0
  143. package/.versions/1.0.2/.pi/prompts/af-test.md +19 -0
  144. package/.versions/1.0.2/.pi/skills/bowser/SKILL.md +145 -0
  145. package/.versions/1.0.2/.version +1 -0
  146. package/.versions/1.0.2/agents/architect.md +24 -0
  147. package/.versions/1.0.2/agents/bowser.md +27 -0
  148. package/.versions/1.0.2/agents/builder.md +54 -0
  149. package/.versions/1.0.2/agents/code-reviewer.md +208 -0
  150. package/.versions/1.0.2/agents/deep-researcher.md +32 -0
  151. package/.versions/1.0.2/agents/documenter.md +18 -0
  152. package/.versions/1.0.2/agents/orchestrator.md +20 -0
  153. package/.versions/1.0.2/agents/plan-reviewer.md +83 -0
  154. package/.versions/1.0.2/agents/planner.md +70 -0
  155. package/.versions/1.0.2/agents/releaser.md +24 -0
  156. package/.versions/1.0.2/agents/researcher.md +28 -0
  157. package/.versions/1.0.2/agents/security-auditor.md +167 -0
  158. package/.versions/1.0.2/agents/test-engineer.md +153 -0
  159. package/.versions/1.0.2/agents/web-debugger.md +43 -0
  160. package/.versions/1.0.2/agents/web-performance-auditor.md +193 -0
  161. package/.versions/1.0.2/bin/catalog/harness-runtime-closure.json +38 -0
  162. package/.versions/1.0.2/codex/CONDUCTOR.md +148 -0
  163. package/.versions/1.0.2/docs/ARCHITECTURE.md +369 -0
  164. package/.versions/1.0.2/docs/agent-fleet-setup.md +468 -0
  165. package/.versions/1.0.2/docs/claude-code-coms-bridge.md +128 -0
  166. package/.versions/1.0.2/docs/codex-remote-conductor.md +170 -0
  167. package/.versions/1.0.2/docs/coms-hermes-bridge.md +189 -0
  168. package/.versions/1.0.2/docs/getting-started.md +98 -0
  169. package/.versions/1.0.2/docs/npm-install.md +292 -0
  170. package/.versions/1.0.2/docs/pi-extensions.md +439 -0
  171. package/.versions/1.0.2/docs/pi-setup.md +74 -0
  172. package/.versions/1.0.2/docs/skill-anatomy.md +150 -0
  173. package/.versions/1.0.2/hermes/README.md +347 -0
  174. package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  175. package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  176. package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  177. package/.versions/1.0.2/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  178. package/.versions/1.0.2/hermes/gates/gate-o-capability.md +8 -0
  179. package/.versions/1.0.2/hermes/gates/gate-o-validator-fixtures.json +1 -0
  180. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  181. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  182. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  183. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  184. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  185. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  186. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  187. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  188. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  189. package/.versions/1.0.2/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  190. package/.versions/1.0.2/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  191. package/.versions/1.0.2/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  192. package/.versions/1.0.2/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  193. package/.versions/1.0.2/hermes/skills/hub-conductor/SKILL.md +84 -0
  194. package/.versions/1.0.2/hermes/skills/hub-liaison/SKILL.md +84 -0
  195. package/.versions/1.0.2/hermes/skills/hub-watchdog/SKILL.md +76 -0
  196. package/.versions/1.0.2/hermes/skills/hub-watchdog/manifest.json +1 -0
  197. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  198. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  199. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  200. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  201. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  202. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  203. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  204. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  205. package/.versions/1.0.2/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  206. package/.versions/1.0.2/hermes/watchdog-tests/__init__.py +0 -0
  207. package/.versions/1.0.2/hooks/coms-stop-hook.mjs +84 -0
  208. package/.versions/1.0.2/install-manifest.json +2745 -0
  209. package/.versions/1.0.2/justfile +272 -0
  210. package/.versions/1.0.2/manifest-meta.json +882 -0
  211. package/.versions/1.0.2/references/accessibility-checklist.md +160 -0
  212. package/.versions/1.0.2/references/definition-of-done.md +67 -0
  213. package/.versions/1.0.2/references/fleet-coordination-patterns.md +151 -0
  214. package/.versions/1.0.2/references/observability-checklist.md +91 -0
  215. package/.versions/1.0.2/references/orchestration-patterns.md +370 -0
  216. package/.versions/1.0.2/references/performance-checklist.md +153 -0
  217. package/.versions/1.0.2/references/prompting-patterns.md +380 -0
  218. package/.versions/1.0.2/references/security-checklist.md +179 -0
  219. package/.versions/1.0.2/references/testing-patterns.md +236 -0
  220. package/.versions/1.0.2/scripts/codex-conductor.ts +41 -0
  221. package/.versions/1.0.2/scripts/codex-remote-control.ts +167 -0
  222. package/.versions/1.0.2/scripts/coms-claude-bridge.ts +411 -0
  223. package/.versions/1.0.2/scripts/coms-cli.ts +484 -0
  224. package/.versions/1.0.2/scripts/coms-hermes-bridge.ts +413 -0
  225. package/.versions/1.0.2/scripts/fleet.ts +185 -0
  226. package/.versions/1.0.2/scripts/hermes-monitor-capability-runner.ts +25 -0
  227. package/.versions/1.0.2/scripts/hermes-monitor-scenario.ts +474 -0
  228. package/.versions/1.0.2/scripts/hermes-watchdog-capability-probe.ts +45 -0
  229. package/.versions/1.0.2/scripts/install-hermes-plugin.sh +180 -0
  230. package/.versions/1.0.2/scripts/lib/claude-bridge-core.ts +210 -0
  231. package/.versions/1.0.2/scripts/lib/codex-conductor.ts +88 -0
  232. package/.versions/1.0.2/scripts/lib/codex-remote-control.ts +480 -0
  233. package/.versions/1.0.2/scripts/lib/coms-envelope.ts +582 -0
  234. package/.versions/1.0.2/scripts/lib/fake-herdr-server.ts +88 -0
  235. package/.versions/1.0.2/scripts/lib/fleet-command.ts +266 -0
  236. package/.versions/1.0.2/scripts/lib/herdr-layout.ts +281 -0
  237. package/.versions/1.0.2/scripts/lib/hermes-bridge-core.ts +241 -0
  238. package/.versions/1.0.2/scripts/lib/hermes-monitor-events.ts +1 -0
  239. package/.versions/1.0.2/scripts/lib/hermes-monitor-herdr.ts +2 -0
  240. package/.versions/1.0.2/scripts/lib/hermes-monitor-model.ts +3 -0
  241. package/.versions/1.0.2/scripts/lib/hermes-monitor-registry.ts +2 -0
  242. package/.versions/1.0.2/scripts/lib/hermes-monitor-socket.ts +2 -0
  243. package/.versions/1.0.2/scripts/lib/hermes-monitor-store.ts +2 -0
  244. package/.versions/1.0.2/scripts/lib/monitor-env.ts +146 -0
  245. package/.versions/1.0.2/scripts/lib/peer-launch.ts +318 -0
  246. package/.versions/1.0.2/scripts/lib/persona-banner.ts +62 -0
  247. package/.versions/1.0.2/scripts/lib/spawn-stagger.ts +101 -0
  248. package/.versions/1.0.2/scripts/lib/team-project.ts +213 -0
  249. package/.versions/1.0.2/scripts/lib/team-snapshot.ts +147 -0
  250. package/.versions/1.0.2/scripts/peer-banner.ts +40 -0
  251. package/.versions/1.0.2/scripts/peer-launch.ts +259 -0
  252. package/.versions/1.0.2/scripts/team-snapshot.ts +237 -0
  253. package/.versions/1.0.2/scripts/team-up.ts +406 -0
  254. package/.versions/1.0.2/skills/_internal/grilling.md +11 -0
  255. package/.versions/1.0.2/skills/browser-testing-with-devtools/SKILL.md +351 -0
  256. package/.versions/1.0.2/skills/code-review-and-quality/SKILL.md +381 -0
  257. package/.versions/1.0.2/skills/compound-learning/SKILL.md +137 -0
  258. package/.versions/1.0.2/skills/context-engineering/SKILL.md +291 -0
  259. package/.versions/1.0.2/skills/deprecation-and-migration/SKILL.md +206 -0
  260. package/.versions/1.0.2/skills/designing-agents/SKILL.md +394 -0
  261. package/.versions/1.0.2/skills/designing-agents/pi-harness-authoring.md +222 -0
  262. package/.versions/1.0.2/skills/frontend-ui-engineering/SKILL.md +328 -0
  263. package/.versions/1.0.2/skills/git-workflow-and-versioning/SKILL.md +316 -0
  264. package/.versions/1.0.2/skills/idea-refine/SKILL.md +182 -0
  265. package/.versions/1.0.2/skills/idea-refine/examples.md +238 -0
  266. package/.versions/1.0.2/skills/idea-refine/frameworks.md +99 -0
  267. package/.versions/1.0.2/skills/idea-refine/refinement-criteria.md +113 -0
  268. package/.versions/1.0.2/skills/idea-refine/scripts/idea-refine.sh +15 -0
  269. package/.versions/1.0.2/skills/incremental-implementation/SKILL.md +287 -0
  270. package/.versions/1.0.2/skills/interview-me/SKILL.md +226 -0
  271. package/.versions/1.0.2/skills/orchestration-verification/SKILL.md +181 -0
  272. package/.versions/1.0.2/skills/peer-coms/SKILL.md +90 -0
  273. package/.versions/1.0.2/skills/performance-optimization/SKILL.md +350 -0
  274. package/.versions/1.0.2/skills/planning-and-task-breakdown/SKILL.md +254 -0
  275. package/.versions/1.0.2/skills/security-and-hardening/SKILL.md +461 -0
  276. package/.versions/1.0.2/skills/spec-driven-development/SKILL.md +257 -0
  277. package/.versions/1.0.2/skills/using-agent-skills/SKILL.md +199 -0
  278. package/.versions/1.0.2/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  279. package/.versions/1.0.2/vendor/agent-skills-upstream/LICENSE +21 -0
  280. package/.versions/1.0.2/vendor/agent-skills-upstream/README.md +11 -0
  281. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  282. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  283. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  284. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  285. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  286. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  287. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  288. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  289. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  290. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  291. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  292. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  293. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  294. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  295. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  296. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  297. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  298. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  299. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  300. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  301. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  302. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  303. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  304. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  305. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  306. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  307. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  308. package/.versions/1.0.2/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  309. package/CHANGELOG.md +9 -0
  310. package/README.md +4 -2
  311. package/agents/orchestrator.md +4 -56
  312. package/docs/ARCHITECTURE.md +48 -16
  313. package/docs/agent-fleet-setup.md +33 -2
  314. package/docs/pi-extensions.md +29 -2
  315. package/install-manifest.json +2 -2
  316. package/package.json +2 -2
@@ -11,9 +11,9 @@
11
11
  }
12
12
  },
13
13
  "node_modules/@hono/node-server": {
14
- "version": "1.19.14",
15
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.14.tgz",
16
- "integrity": "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==",
14
+ "version": "1.19.17",
15
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.17.tgz",
16
+ "integrity": "sha512-dSneS5qhiauZWGDCeK4o695Xd9nUNjviSZCMQrj10eetr8Uln1ucn6bbphOM6UynAMMtNIzZNSpL9vnASJwrPQ==",
17
17
  "license": "MIT",
18
18
  "engines": {
19
19
  "node": ">=18.14.1"
@@ -109,20 +109,20 @@
109
109
  }
110
110
  },
111
111
  "node_modules/body-parser": {
112
- "version": "2.2.2",
113
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
114
- "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
112
+ "version": "2.3.0",
113
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",
114
+ "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",
115
115
  "license": "MIT",
116
116
  "dependencies": {
117
117
  "bytes": "^3.1.2",
118
- "content-type": "^1.0.5",
118
+ "content-type": "^2.0.0",
119
119
  "debug": "^4.4.3",
120
- "http-errors": "^2.0.0",
121
- "iconv-lite": "^0.7.0",
120
+ "http-errors": "^2.0.1",
121
+ "iconv-lite": "^0.7.2",
122
122
  "on-finished": "^2.4.1",
123
- "qs": "^6.14.1",
124
- "raw-body": "^3.0.1",
125
- "type-is": "^2.0.1"
123
+ "qs": "^6.15.2",
124
+ "raw-body": "^3.0.2",
125
+ "type-is": "^2.1.0"
126
126
  },
127
127
  "engines": {
128
128
  "node": ">=18"
@@ -132,6 +132,19 @@
132
132
  "url": "https://opencollective.com/express"
133
133
  }
134
134
  },
135
+ "node_modules/body-parser/node_modules/content-type": {
136
+ "version": "2.1.0",
137
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
138
+ "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
139
+ "license": "MIT",
140
+ "engines": {
141
+ "node": ">=18"
142
+ },
143
+ "funding": {
144
+ "type": "opencollective",
145
+ "url": "https://opencollective.com/express"
146
+ }
147
+ },
135
148
  "node_modules/bytes": {
136
149
  "version": "3.1.2",
137
150
  "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -315,9 +328,9 @@
315
328
  }
316
329
  },
317
330
  "node_modules/es-object-atoms": {
318
- "version": "1.1.1",
319
- "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
320
- "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
331
+ "version": "1.1.2",
332
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
333
+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
321
334
  "license": "MIT",
322
335
  "dependencies": {
323
336
  "es-errors": "^1.3.0"
@@ -406,12 +419,13 @@
406
419
  }
407
420
  },
408
421
  "node_modules/express-rate-limit": {
409
- "version": "8.4.1",
410
- "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.4.1.tgz",
411
- "integrity": "sha512-NGVYwQSAyEQgzxX1iCM978PP9AdO/hW93gMcF6ZwQCm+rFvLsBH6w4xcXWTcliS8La5EPRN3p9wzItqBwJrfNw==",
422
+ "version": "8.6.2",
423
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.6.2.tgz",
424
+ "integrity": "sha512-YH4ru+eOJxQABscKFfRCy9R7x9QFGdezclVMwwgFFndzS2Xnm0uo6B0ABZsLhcpeptGv2qvuJVWlQr9gQZoC3A==",
412
425
  "license": "MIT",
413
426
  "dependencies": {
414
- "ip-address": "10.1.0"
427
+ "debug": "^4.4.3",
428
+ "ip-address": "^10.2.0"
415
429
  },
416
430
  "engines": {
417
431
  "node": ">= 16"
@@ -430,9 +444,9 @@
430
444
  "license": "MIT"
431
445
  },
432
446
  "node_modules/fast-uri": {
433
- "version": "3.1.0",
434
- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
435
- "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
447
+ "version": "3.1.5",
448
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz",
449
+ "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==",
436
450
  "funding": [
437
451
  {
438
452
  "type": "github",
@@ -555,9 +569,9 @@
555
569
  }
556
570
  },
557
571
  "node_modules/hasown": {
558
- "version": "2.0.3",
559
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz",
560
- "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
572
+ "version": "2.0.4",
573
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
574
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
561
575
  "license": "MIT",
562
576
  "dependencies": {
563
577
  "function-bind": "^1.1.2"
@@ -567,9 +581,9 @@
567
581
  }
568
582
  },
569
583
  "node_modules/hono": {
570
- "version": "4.12.15",
571
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.15.tgz",
572
- "integrity": "sha512-qM0jDhFEaCBb4TxoW7f53Qrpv9RBiayUHo0S52JudprkhvpjIrGoU1mnnr29Fvd1U335ZFPZQY1wlkqgfGXyLg==",
584
+ "version": "4.13.3",
585
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.3.tgz",
586
+ "integrity": "sha512-r8AO2mYHoLxSHkgafNeC/BXyb2vWRxD3jem4Ts+ptav8oTG5FIRifAjuJEmZI4bSvvc2ns0GxmIYiZnHqN3mMw==",
573
587
  "license": "MIT",
574
588
  "engines": {
575
589
  "node": ">=16.9.0"
@@ -618,9 +632,9 @@
618
632
  "license": "ISC"
619
633
  },
620
634
  "node_modules/ip-address": {
621
- "version": "10.1.0",
622
- "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",
623
- "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==",
635
+ "version": "10.5.0",
636
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.5.0.tgz",
637
+ "integrity": "sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g==",
624
638
  "license": "MIT",
625
639
  "engines": {
626
640
  "node": ">= 12"
@@ -831,12 +845,13 @@
831
845
  }
832
846
  },
833
847
  "node_modules/qs": {
834
- "version": "6.15.1",
835
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz",
836
- "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==",
848
+ "version": "6.15.3",
849
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",
850
+ "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",
837
851
  "license": "BSD-3-Clause",
838
852
  "dependencies": {
839
- "side-channel": "^1.1.0"
853
+ "es-define-property": "^1.0.1",
854
+ "side-channel": "^1.1.1"
840
855
  },
841
856
  "engines": {
842
857
  "node": ">=0.6"
@@ -973,14 +988,14 @@
973
988
  }
974
989
  },
975
990
  "node_modules/side-channel": {
976
- "version": "1.1.0",
977
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
978
- "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
991
+ "version": "1.1.1",
992
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
993
+ "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
979
994
  "license": "MIT",
980
995
  "dependencies": {
981
996
  "es-errors": "^1.3.0",
982
- "object-inspect": "^1.13.3",
983
- "side-channel-list": "^1.0.0",
997
+ "object-inspect": "^1.13.4",
998
+ "side-channel-list": "^1.0.1",
984
999
  "side-channel-map": "^1.0.1",
985
1000
  "side-channel-weakmap": "^1.0.2"
986
1001
  },
@@ -1063,17 +1078,34 @@
1063
1078
  }
1064
1079
  },
1065
1080
  "node_modules/type-is": {
1066
- "version": "2.0.1",
1067
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
1068
- "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
1081
+ "version": "2.1.0",
1082
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",
1083
+ "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
1069
1084
  "license": "MIT",
1070
1085
  "dependencies": {
1071
- "content-type": "^1.0.5",
1086
+ "content-type": "^2.0.0",
1072
1087
  "media-typer": "^1.1.0",
1073
1088
  "mime-types": "^3.0.0"
1074
1089
  },
1075
1090
  "engines": {
1076
- "node": ">= 0.6"
1091
+ "node": ">= 18"
1092
+ },
1093
+ "funding": {
1094
+ "type": "opencollective",
1095
+ "url": "https://opencollective.com/express"
1096
+ }
1097
+ },
1098
+ "node_modules/type-is/node_modules/content-type": {
1099
+ "version": "2.1.0",
1100
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
1101
+ "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
1102
+ "license": "MIT",
1103
+ "engines": {
1104
+ "node": ">=18"
1105
+ },
1106
+ "funding": {
1107
+ "type": "opencollective",
1108
+ "url": "https://opencollective.com/express"
1077
1109
  }
1078
1110
  },
1079
1111
  "node_modules/typebox": {
@@ -39,6 +39,80 @@ All Hub slash commands, including `/af-handoff`, are registered in both postures
39
39
  runtime capability is unavailable refuses with remediation rather than disappearing. `--no-coms`
40
40
  disables only embedded coms; direct operator work and native dispatch remain available.
41
41
 
42
+ ### Automatic capability surfaces
43
+
44
+ Capability packs load **automatically** from the current request, posture, task tier, pending work,
45
+ and runtime state; there is no activation command. `core` is always present. Orchestrator posture
46
+ always includes `fleet`; explicit delegation/research, acceptance work, an existing coms peer, a
47
+ Herdr pane/watcher request, and explicit or imminent compaction respectively add `fleet`,
48
+ `verification`, `peer`, `workspace`, and `compaction`. A ready coms or Herdr runtime is only
49
+ **readiness**, not intent: its tools and policy remain model-inactive until requested.
50
+
51
+ Ambiguous delegation, peer, or workspace intent provisionally exposes the smallest relevant pack
52
+ and records its reason in the state capsule and `/af-context`. Before that pack's first side effect,
53
+ the Hub asks one focused `ask_user` confirmation. Confirming promotes it for the task; reject or
54
+ cancel removes it and leaves no message, child, or pane behind. Active task packs persist through
55
+ follow-up turns so a workflow does not lose tools. They shrink only through
56
+ `set_task_tier(new_task: true)` (apart from mandatory posture and pending-operation leases), never
57
+ merely because the next message sounds different.
58
+
59
+ `/af-context` separates stable replacement-prompt cost from the volatile state capsule and active
60
+ schemas. Inactive and ready-but-inactive packs cost zero model-visible characters. Provider totals,
61
+ including cache read/write when Pi supplies them, remain authoritative; deterministic character
62
+ figures are regression diagnostics and never invent provider usage.
63
+
64
+ ### Context-pressure and resume recovery
65
+
66
+ Pre-turn surface cost and live conversation pressure are different budgets. `/af-context` separates
67
+ the stable replacement prompt, volatile state capsule, and active tool schemas; user and assistant
68
+ messages plus tool results then accumulate during a turn. A long tool loop can therefore reach the
69
+ model window even while every standing prompt ceiling remains green.
70
+
71
+ The Hub samples live provider usage and projects each finalized tool result before another model
72
+ request:
73
+
74
+ - Below **80%**, pressure is `normal`.
75
+ - At **80%**, pressure becomes `warning`; the compact recovery surface is exposed transiently and
76
+ ordinary work may continue.
77
+ - At **90%**, the Hub aborts the next same-turn provider request, waits until the tool result and
78
+ aborted turn are persisted, and starts one automatic Pi compaction. Only one recovery may run at
79
+ a time. Input received while startup or same-turn recovery is active is retained in memory,
80
+ including images, then replayed once after compaction succeeds.
81
+
82
+ The status line and `/af-context` show the pressure phase, measured usage, both thresholds, episode,
83
+ and last recovery outcome. Persisted pressure diagnostics contain numeric/enumerated metadata only;
84
+ they never include prompts, tool output, credentials, error bodies, or compaction summaries.
85
+
86
+ If automatic recovery reports `failed`, the queued input remains retained. Use Pi's built-in manual
87
+ fallback, or switch to a model with a larger context window:
88
+
89
+ ```text
90
+ /compact Preserve the current goal, decisions, assertions, pending operations, blockers, and next step.
91
+ ```
92
+
93
+ A resumed orchestrator session can also require roster recovery. The Hub persists only the selected
94
+ team name and resolves it again against the current `.pi/agents/teams.yaml` and persona files. If the
95
+ team is missing, renamed, empty, or stale, the Hub preserves orchestrator posture, keeps direct coding
96
+ tools unavailable, and blocks model input rather than inventing a roster or silently downgrading.
97
+ Recover with one of these explicit choices:
98
+
99
+ ```text
100
+ /af-agents-team # select a currently valid team in the live session
101
+ /af-posture operator # explicitly leave delegate-only posture
102
+ just fleet --agents <name> # restart through the public Fleet CLI
103
+ just fleet --posture operator # restart explicitly as an operator
104
+ ```
105
+
106
+ For a direct Pi launch, the roster flag is `--agent-team <name>` and the posture flag is
107
+ `--posture operator`; explicit startup flags take precedence over persisted selections. Fix stale
108
+ team/persona declarations before selecting them.
109
+
110
+ The Pi session JSONL under `~/.pi/agent/sessions/` is the authoritative append-only conversation and
111
+ recovery record. Context overflow or a stale roster does **not** by itself mean that file is corrupt.
112
+ Inspect it through `/session`, resume it through `/resume` or Pi's session flags, and recover through
113
+ compaction or the commands above. Never edit, truncate, reorder, or synthesize JSONL entries to
114
+ recover a session.
115
+
42
116
  ## What it does
43
117
 
44
118
  The whole dispatch loop, end to end:
@@ -70,8 +144,9 @@ Every borrowed idea from another harness passes one test before it lands: *does
70
144
  `agent-hub` is the supported home for the former standalone dispatcher features:
71
145
 
72
146
  - **Dispatcher grid** — a live dashboard of the active, dynamically adjustable native roster from `.pi/agents/teams.yaml`.
147
+ - **Context budget** — `/af-context` opens a separate read-only full-screen diagnostic in either posture. It shows provider totals and cache fields beside named, metadata-only estimates; `loaded-excluded` Pi inputs are discovered but contribute zero to the replacement Hub prompt. Each specialist, research helper, delegate, and peer remains a separate context plane with its own model window. Component token estimates are heuristic/provider-scaled, never exact claims; unavailable peer/provider detail is labelled explicitly and raw prompts, schemas, and conversation text are never retained or displayed.
73
148
  - **Specialist delegation** — `dispatch_agent` sends writable tasks to configured specialists.
74
- - **Research helpers** — `spawn_research` and `/af-research` launch read-only helper agents. Two
149
+ - **Research helpers** — `spawn_research` and `/af-research` launch read-only helper agents. Managed research children use a replacement read-only prompt with `--no-skills` and `--no-context-files`; managed specialists receive a selected context manifest (persona, applicable policy paths, and named skill paths) rather than inherited global skill/context loading. Two
75
150
  `kind: research` personas ship by default: `researcher` (fast `gpt-5.3-codex-spark`) for simple
76
151
  reads and `deep-researcher` (`gpt-5.5` / xhigh) for hard, cross-cutting investigation. The
77
152
  orchestrator routes by persona; each persona's model + thinking level is shown in its catalog.
@@ -320,8 +395,15 @@ and visible token totals. Finished/idle/stale rows are hidden by default.
320
395
 
321
396
  The detail view streams the selected local agent's text, thinking, and tool timeline. Use **`↑`/`↓`**,
322
397
  **`PgUp`/`PgDn`**, and **End** to navigate/tail; **Enter** expands a selected tool call; **Ctrl+C**
323
- copies the selected entry; **Esc**/**`q`** returns to the dashboard. Coms peers have no local
324
- transcript and show that explicitly. **`/af-zoom <name|rN>`** opens this same detail view directly.
398
+ copies the selected entry; and **`m`** replaces the log area with a visible full-screen picker
399
+ containing every model currently reported by Pi's available-model registry. Use **`↑`/`↓`**,
400
+ **`PgUp`/`PgDn`**, or **Home**/**End**, then **Enter** to apply; **Esc** cancels back to the logs.
401
+ Model switching works for local specialists, retained research helpers, and nested delegate roles.
402
+ It applies on the next dispatch/continuation and never interrupts
403
+ a running child. A coms-backed specialist stores the choice for native fallback runs; external coms
404
+ peers control their own model and have no picker. **Esc**/**`q`** returns to the dashboard. Coms peers
405
+ have no local transcript and show that explicitly. **`/af-zoom <name|rN>`** opens this same detail
406
+ view directly.
325
407
 
326
408
  ### Version footer
327
409
 
@@ -475,8 +557,12 @@ task, most of it re-billed stale specialist context).
475
557
  second confirming reads); use for production migrations and security-sensitive work.
476
558
 
477
559
  When a budget is exhausted, `dispatch_agent`/`spawn_research` **refuse** with instructions
478
- to summarize and ask the user; the next user message opens a fresh window. Switch modes
479
- live with `/af-hub-mode fast|standard|strict` (no argument shows the current mode and usage).
560
+ to summarize and ask one localized Yes/No `ask_user` question. **Yes** renews the turn budget
561
+ inside the same tool loop; the user does not type `continue` or run a slash command. A normal
562
+ new user message still opens a fresh turn window. Time blocked in any `ask_user` question is
563
+ excluded from the turn wall clock, so a slow human answer cannot exhaust the next dispatch.
564
+ Switch modes live with `/af-hub-mode fast|standard|strict` (no argument shows the current mode
565
+ and usage).
480
566
  The live switch is deliberately **process/session-local**: it does not mutate another repository,
481
567
  another pane, or the project's override file. A later `session_start` reapplies that repository's
482
568
  configured default. Successful live switches and session-start default application append
@@ -513,19 +599,24 @@ counters are **not** reset by a user message:
513
599
  | clock | 60 min wall | 180 min **active** |
514
600
 
515
601
  Exhausting it is a **hard stop**: the refusal says so, and another user message does not
516
- reopen it. Only `/af-new-task [label]` (or `set_task_tier` with `new_task: true`) opens a
517
- new task window — clearing the counters, the tier, the review-round count, the duplicate
518
- guard, and any external-blocker stop. A successful slash-command reset or
519
- `set_task_tier(new_task: true)` appends an `agent-hub-task-reset` entry with the reset source,
520
- prior counters/active time, and the same allowlisted process/session/pane identity. The status
521
- chip shows both (`… · task 4/18`).
522
-
523
- The reasoning: a task that has burned three full envelopes has not hit a budget problem, it
524
- has outgrown its scope, and re-scoping is the human's call.
525
-
526
- The task clock charges **active time only** — turns that actually ran, each minus the time
527
- the dispatcher sat blocked on `ask_user`. Inter-turn idle costs nothing, because no turn is
528
- open across it. Raw wall clock would bill a lunch break, an overnight pause, and every long
602
+ reopen it. The hub asks one localized Yes/No `ask_user` question. **Yes** opens one audited
603
+ continuation tranche and resumes directly; it resets the task dispatch/research counters,
604
+ active-time clock, review allowance, and the current turn budget while preserving the task
605
+ tier, assertion ledger, capability packs, label, blockers, and accumulated progress. **No**
606
+ (or cancellation) stops. Each accepted tranche appends `agent-hub-budget-continuation` with
607
+ bounded prior usage and allowlisted process/session/pane identity.
608
+
609
+ `set_task_tier` with `new_task: true` remains the lifecycle action for genuinely different work.
610
+ It clears task identity/state as well as counters and appends an `agent-hub-task-reset` audit
611
+ entry. Do not use it merely to continue the same task. The status chip still shows both turn and
612
+ task usage (`… · task 4/18`).
613
+
614
+ The reasoning: three full envelopes still require an explicit human decision, but that decision
615
+ is now a single confirmation rather than a fake new task followed by a second message.
616
+
617
+ Both turn and task clocks charge **active time only** — turns that actually ran, minus the
618
+ time the dispatcher sat blocked on `ask_user`. Inter-turn idle costs nothing, because no turn
619
+ is open across it. Raw wall clock would bill a lunch break, an overnight pause, and every long
529
620
  human answer against the task; at `fast` mode's 45-minute envelope a coffee break would
530
621
  hard-stop a task with two dispatches spent. A false stop is worse than no stop — it teaches
531
622
  people to reset the task window reflexively, and that reset is the one thing that has to
@@ -0,0 +1,73 @@
1
+ import { turnActiveMs } from "./run-budget.js";
2
+
3
+ export type BudgetContinuationKind = "turn" | "task";
4
+ export type BudgetContinuationOutcome = "continue" | "stop";
5
+
6
+ export const BUDGET_CONTINUATION_MARKER = "agent-hub-budget-continuation";
7
+
8
+ export function budgetContinuationContext(kind: BudgetContinuationKind): string {
9
+ return `[[${BUDGET_CONTINUATION_MARKER}:${kind}]]`;
10
+ }
11
+
12
+ export function budgetContinuationKind(context: unknown): BudgetContinuationKind | null {
13
+ if (typeof context !== "string") return null;
14
+ const match = new RegExp(`\\[\\[${BUDGET_CONTINUATION_MARKER}:(turn|task)\\]\\]`).exec(context);
15
+ return (match?.[1] as BudgetContinuationKind | undefined) ?? null;
16
+ }
17
+
18
+ /** Model-facing protocol appended to a budget refusal. */
19
+ export function budgetContinuationInstruction(message: string, kind: BudgetContinuationKind, userLanguage: string): string {
20
+ const scope = kind === "task" ? "same task with one additional task-budget window" : "same task with a fresh turn-budget window";
21
+ return `${message}\n\n` +
22
+ `Do not ask the human to type continue or run a slash command. Call ask_user exactly once, in ${userLanguage}, ` +
23
+ `to ask whether to continue the ${scope}. Put ${budgetContinuationContext(kind)} in the context, summarize ` +
24
+ `what is complete and what the next window will do, and provide exactly two single-select options in this order: ` +
25
+ `(1) Yes — continue, (2) No — stop. Set allowFreeform to false. The first option automatically renews the ` +
26
+ `${kind} budget; after that answer, continue directly in this tool loop without requesting another message. ` +
27
+ `The second option or cancellation stops.`;
28
+ }
29
+
30
+ function optionTitle(option: unknown): string {
31
+ if (typeof option === "string") return option.trim();
32
+ if (!option || typeof option !== "object") return "";
33
+ const title = (option as { title?: unknown }).title;
34
+ return typeof title === "string" ? title.trim() : "";
35
+ }
36
+
37
+ function selectedAnswer(result: unknown): string {
38
+ const response = (result as { details?: { response?: unknown } } | null)?.details?.response;
39
+ const selections = (response as { selections?: unknown } | null)?.selections;
40
+ if (Array.isArray(selections) && typeof selections[0] === "string") return selections[0].trim();
41
+ return "";
42
+ }
43
+
44
+ /**
45
+ * Interpret only a marked, ordered ask_user confirmation. The displayed labels
46
+ * may be translated: option 1 always means continue and every later option
47
+ * means stop. Cancellation is conservative and stops.
48
+ */
49
+ export function budgetContinuationOutcome(
50
+ params: { context?: unknown; options?: unknown },
51
+ result: unknown,
52
+ ): BudgetContinuationOutcome | null {
53
+ if (!budgetContinuationKind(params.context)) return null;
54
+ if ((result as { details?: { cancelled?: unknown } } | null)?.details?.cancelled === true) return "stop";
55
+ if (!Array.isArray(params.options) || params.options.length < 2) return null;
56
+ const options = params.options.map(optionTitle);
57
+ if (!options[0] || options.some(title => !title)) return null;
58
+ const selected = selectedAnswer(result);
59
+ if (!selected) return null;
60
+ const index = options.indexOf(selected);
61
+ if (index < 0) return null;
62
+ return index === 0 ? "continue" : "stop";
63
+ }
64
+
65
+ /** Active turn-budget time excludes both completed and currently-open asks. */
66
+ export function turnBudgetActiveMs(
67
+ turnStartedAt: number,
68
+ now: number,
69
+ completedAskWaitMs = 0,
70
+ openAskWaitMs = 0,
71
+ ): number {
72
+ return turnActiveMs(turnStartedAt, now, Math.max(0, completedAskWaitMs) + Math.max(0, openAskWaitMs));
73
+ }
@@ -0,0 +1,47 @@
1
+ import type { CapabilityPack } from "./capability-packs.ts";
2
+
3
+ export type ConfirmableCapabilityPack = Exclude<CapabilityPack, "core" | "verification" | "compaction">;
4
+ export type CapabilityConfirmationStatus = "pending" | "promoted" | "declined";
5
+ export type CapabilityConfirmationState = Partial<Record<ConfirmableCapabilityPack, CapabilityConfirmationStatus>>;
6
+
7
+ export const CAPABILITY_CONFIRMATION_MARKER = "agent-hub-capability-confirmation";
8
+
9
+ export function capabilityConfirmationContext(pack: ConfirmableCapabilityPack): string {
10
+ return `[[${CAPABILITY_CONFIRMATION_MARKER}:${pack}]]`;
11
+ }
12
+
13
+ export function capabilityConfirmationPack(context: unknown): ConfirmableCapabilityPack | null {
14
+ if (typeof context !== "string") return null;
15
+ const match = new RegExp(`\\[\\[${CAPABILITY_CONFIRMATION_MARKER}:(fleet|peer|workspace)\\]\\]`).exec(context);
16
+ return (match?.[1] as ConfirmableCapabilityPack | undefined) ?? null;
17
+ }
18
+
19
+ export function capabilityConfirmationQuestion(pack: ConfirmableCapabilityPack): { question: string; context: string; options: string[] } {
20
+ return {
21
+ question: `Use the provisional ${pack} capability for this task?`,
22
+ context: `${capabilityConfirmationContext(pack)} Confirm before its first side effect.`,
23
+ options: ["Confirm", "Reject", "Cancel"],
24
+ };
25
+ }
26
+
27
+ export function confirmationOutcome(result: unknown): "promoted" | "declined" | null {
28
+ const value = result as { details?: { cancelled?: unknown; response?: unknown } } | null;
29
+ if (value?.details?.cancelled === true) return "declined";
30
+ const response = value?.details?.response;
31
+ const answer = Array.isArray((response as { selections?: unknown })?.selections)
32
+ ? (response as { selections: unknown[] }).selections.join(" ")
33
+ : typeof (response as { text?: unknown })?.text === "string"
34
+ ? (response as { text: string }).text
35
+ : typeof response === "string" ? response : "";
36
+ if (/^\s*confirm\s*$/i.test(answer)) return "promoted";
37
+ if (/^\s*(reject|cancel)\s*$/i.test(answer)) return "declined";
38
+ return null;
39
+ }
40
+
41
+ export function confirmationGate(state: CapabilityConfirmationState, pack: ConfirmableCapabilityPack, provisional: boolean): { allowed: true } | { allowed: false; status: "ask" | "pending" | "declined"; message: string } {
42
+ const status = state[pack];
43
+ if (status === "declined") return { allowed: false, status: "declined", message: `provisional ${pack} capability was declined for this task; do not perform this side effect.` };
44
+ if (status === "promoted" || !provisional) return { allowed: true };
45
+ if (status === "pending") return { allowed: false, status: "pending", message: `provisional ${pack} capability awaits its single human confirmation; do not repeat the question or side effect.` };
46
+ return { allowed: false, status: "ask", message: `provisional ${pack} capability requires one human confirmation before this side effect; call ask_user with ${JSON.stringify(capabilityConfirmationQuestion(pack))}.` };
47
+ }