@chankov/agent-fleet 1.0.3 → 1.0.4

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 (310) hide show
  1. package/.pi/harnesses/agent-hub/README.md +25 -11
  2. package/.pi/harnesses/agent-hub/delegate.ts +14 -3
  3. package/.pi/harnesses/agent-hub/index.ts +212 -40
  4. package/.pi/harnesses/agent-hub/package.json +1 -1
  5. package/.pi/harnesses/agent-hub/spawn.ts +25 -3
  6. package/.pi/harnesses/coms/package.json +1 -1
  7. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  8. package/.pi/harnesses/lib/fleet-dashboard-ops.ts +2 -2
  9. package/.pi/harnesses/lib/fleet-detail-view.ts +95 -16
  10. package/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  11. package/.pi/prompts/af-plan.md +6 -5
  12. package/.versions/1.0.4/.pi/agents/dispatch-policy.yaml +32 -0
  13. package/.versions/1.0.4/.pi/agents/model-profiles.yaml +27 -0
  14. package/.versions/1.0.4/.pi/agents/peers.yaml +142 -0
  15. package/.versions/1.0.4/.pi/agents/teams.yaml +41 -0
  16. package/.versions/1.0.4/.pi/damage-control-rules.yaml +297 -0
  17. package/.versions/1.0.4/.pi/extensions/agent-fleet-update-check/README.md +57 -0
  18. package/.versions/1.0.4/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  19. package/.versions/1.0.4/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  20. package/.versions/1.0.4/.pi/extensions/btw/README.md +120 -0
  21. package/.versions/1.0.4/.pi/extensions/btw/index.ts +914 -0
  22. package/.versions/1.0.4/.pi/extensions/btw/package.json +6 -0
  23. package/.versions/1.0.4/.pi/extensions/btw/state.js +179 -0
  24. package/.versions/1.0.4/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  25. package/.versions/1.0.4/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  26. package/.versions/1.0.4/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  27. package/.versions/1.0.4/.pi/extensions/compact-and-continue/README.md +42 -0
  28. package/.versions/1.0.4/.pi/extensions/compact-and-continue/index.ts +120 -0
  29. package/.versions/1.0.4/.pi/extensions/compact-and-continue/package.json +6 -0
  30. package/.versions/1.0.4/.pi/extensions/mcp-bridge/README.md +46 -0
  31. package/.versions/1.0.4/.pi/extensions/mcp-bridge/index.ts +206 -0
  32. package/.versions/1.0.4/.pi/extensions/mcp-bridge/package.json +6 -0
  33. package/.versions/1.0.4/.pi/extensions/package-lock.json +1175 -0
  34. package/.versions/1.0.4/.pi/extensions/package.json +9 -0
  35. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/README.md +205 -0
  36. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/config.ts +198 -0
  37. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  38. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/index.ts +248 -0
  39. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/package.json +6 -0
  40. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  41. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  42. package/.versions/1.0.4/.pi/harnesses/agent-hub/README.md +1170 -0
  43. package/.versions/1.0.4/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  44. package/.versions/1.0.4/.pi/harnesses/agent-hub/artifacts.js +146 -0
  45. package/.versions/1.0.4/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  46. package/.versions/1.0.4/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  47. package/.versions/1.0.4/.pi/harnesses/agent-hub/budget-continuation.ts +73 -0
  48. package/.versions/1.0.4/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  49. package/.versions/1.0.4/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
  50. package/.versions/1.0.4/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  51. package/.versions/1.0.4/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  52. package/.versions/1.0.4/.pi/harnesses/agent-hub/context-window.js +106 -0
  53. package/.versions/1.0.4/.pi/harnesses/agent-hub/delegate.ts +446 -0
  54. package/.versions/1.0.4/.pi/harnesses/agent-hub/docs-lane.js +122 -0
  55. package/.versions/1.0.4/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
  56. package/.versions/1.0.4/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  57. package/.versions/1.0.4/.pi/harnesses/agent-hub/execution-profile.ts +69 -0
  58. package/.versions/1.0.4/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  59. package/.versions/1.0.4/.pi/harnesses/agent-hub/footer.ts +36 -0
  60. package/.versions/1.0.4/.pi/harnesses/agent-hub/helpers.ts +266 -0
  61. package/.versions/1.0.4/.pi/harnesses/agent-hub/hub-state-audit.js +59 -0
  62. package/.versions/1.0.4/.pi/harnesses/agent-hub/index.ts +10171 -0
  63. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  64. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  65. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  66. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  67. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  68. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  69. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  70. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  71. package/.versions/1.0.4/.pi/harnesses/agent-hub/package.json +7 -0
  72. package/.versions/1.0.4/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  73. package/.versions/1.0.4/.pi/harnesses/agent-hub/posture.ts +158 -0
  74. package/.versions/1.0.4/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  75. package/.versions/1.0.4/.pi/harnesses/agent-hub/research-retention.js +34 -0
  76. package/.versions/1.0.4/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  77. package/.versions/1.0.4/.pi/harnesses/agent-hub/return-contract.js +293 -0
  78. package/.versions/1.0.4/.pi/harnesses/agent-hub/return-extract.js +75 -0
  79. package/.versions/1.0.4/.pi/harnesses/agent-hub/review-findings.js +102 -0
  80. package/.versions/1.0.4/.pi/harnesses/agent-hub/run-budget.js +537 -0
  81. package/.versions/1.0.4/.pi/harnesses/agent-hub/run-namespace.js +87 -0
  82. package/.versions/1.0.4/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  83. package/.versions/1.0.4/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  84. package/.versions/1.0.4/.pi/harnesses/agent-hub/session-health.js +110 -0
  85. package/.versions/1.0.4/.pi/harnesses/agent-hub/spawn.ts +388 -0
  86. package/.versions/1.0.4/.pi/harnesses/agent-hub/version.ts +42 -0
  87. package/.versions/1.0.4/.pi/harnesses/ask-user-remote/README.md +53 -0
  88. package/.versions/1.0.4/.pi/harnesses/ask-user-remote/index.ts +532 -0
  89. package/.versions/1.0.4/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  90. package/.versions/1.0.4/.pi/harnesses/coms/README.md +100 -0
  91. package/.versions/1.0.4/.pi/harnesses/coms/index.ts +1767 -0
  92. package/.versions/1.0.4/.pi/harnesses/coms/package.json +7 -0
  93. package/.versions/1.0.4/.pi/harnesses/coms/version.ts +42 -0
  94. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/README.md +124 -0
  95. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/index.ts +536 -0
  96. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/package.json +7 -0
  97. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/version.ts +42 -0
  98. package/.versions/1.0.4/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  99. package/.versions/1.0.4/.pi/harnesses/lib/context-budget-child-prompt.ts +179 -0
  100. package/.versions/1.0.4/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
  101. package/.versions/1.0.4/.pi/harnesses/lib/context-budget-view.ts +107 -0
  102. package/.versions/1.0.4/.pi/harnesses/lib/context-budget.ts +114 -0
  103. package/.versions/1.0.4/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  104. package/.versions/1.0.4/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  105. package/.versions/1.0.4/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  106. package/.versions/1.0.4/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  107. package/.versions/1.0.4/.pi/harnesses/lib/fleet-dashboard-ops.ts +155 -0
  108. package/.versions/1.0.4/.pi/harnesses/lib/fleet-dashboard-view.ts +142 -0
  109. package/.versions/1.0.4/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
  110. package/.versions/1.0.4/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  111. package/.versions/1.0.4/.pi/harnesses/lib/fleet-panel.ts +34 -0
  112. package/.versions/1.0.4/.pi/harnesses/lib/fleet-read-model.ts +131 -0
  113. package/.versions/1.0.4/.pi/harnesses/lib/fleet-selection.ts +24 -0
  114. package/.versions/1.0.4/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  115. package/.versions/1.0.4/.pi/harnesses/lib/herdr-client.ts +472 -0
  116. package/.versions/1.0.4/.pi/harnesses/lib/herdr-presence.ts +399 -0
  117. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  118. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  119. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  120. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  121. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  122. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  123. package/.versions/1.0.4/.pi/harnesses/lib/spawned-peers.js +190 -0
  124. package/.versions/1.0.4/.pi/harnesses/package-lock.json +2039 -0
  125. package/.versions/1.0.4/.pi/harnesses/package.json +10 -0
  126. package/.versions/1.0.4/.pi/prompts/af-build.md +24 -0
  127. package/.versions/1.0.4/.pi/prompts/af-code-simplify.md +22 -0
  128. package/.versions/1.0.4/.pi/prompts/af-plan.md +17 -0
  129. package/.versions/1.0.4/.pi/prompts/af-review.md +16 -0
  130. package/.versions/1.0.4/.pi/prompts/af-set-hermes-telegram.md +15 -0
  131. package/.versions/1.0.4/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  132. package/.versions/1.0.4/.pi/prompts/af-ship.md +17 -0
  133. package/.versions/1.0.4/.pi/prompts/af-spec.md +15 -0
  134. package/.versions/1.0.4/.pi/prompts/af-test.md +19 -0
  135. package/.versions/1.0.4/.pi/skills/bowser/SKILL.md +145 -0
  136. package/.versions/1.0.4/.version +1 -0
  137. package/.versions/1.0.4/agents/architect.md +25 -0
  138. package/.versions/1.0.4/agents/bowser.md +28 -0
  139. package/.versions/1.0.4/agents/builder.md +56 -0
  140. package/.versions/1.0.4/agents/code-reviewer.md +209 -0
  141. package/.versions/1.0.4/agents/deep-researcher.md +33 -0
  142. package/.versions/1.0.4/agents/documenter.md +19 -0
  143. package/.versions/1.0.4/agents/orchestrator.md +21 -0
  144. package/.versions/1.0.4/agents/plan-reviewer.md +84 -0
  145. package/.versions/1.0.4/agents/planner.md +71 -0
  146. package/.versions/1.0.4/agents/releaser.md +25 -0
  147. package/.versions/1.0.4/agents/researcher.md +29 -0
  148. package/.versions/1.0.4/agents/security-auditor.md +168 -0
  149. package/.versions/1.0.4/agents/test-engineer.md +154 -0
  150. package/.versions/1.0.4/agents/web-debugger.md +44 -0
  151. package/.versions/1.0.4/agents/web-performance-auditor.md +194 -0
  152. package/.versions/1.0.4/bin/catalog/harness-runtime-closure.json +38 -0
  153. package/.versions/1.0.4/codex/CONDUCTOR.md +148 -0
  154. package/.versions/1.0.4/docs/ARCHITECTURE.md +375 -0
  155. package/.versions/1.0.4/docs/agent-fleet-setup.md +468 -0
  156. package/.versions/1.0.4/docs/claude-code-coms-bridge.md +128 -0
  157. package/.versions/1.0.4/docs/codex-remote-conductor.md +170 -0
  158. package/.versions/1.0.4/docs/coms-hermes-bridge.md +189 -0
  159. package/.versions/1.0.4/docs/getting-started.md +98 -0
  160. package/.versions/1.0.4/docs/npm-install.md +292 -0
  161. package/.versions/1.0.4/docs/pi-extensions.md +441 -0
  162. package/.versions/1.0.4/docs/pi-setup.md +74 -0
  163. package/.versions/1.0.4/docs/skill-anatomy.md +150 -0
  164. package/.versions/1.0.4/hermes/README.md +347 -0
  165. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  166. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  167. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  168. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  169. package/.versions/1.0.4/hermes/gates/gate-o-capability.md +8 -0
  170. package/.versions/1.0.4/hermes/gates/gate-o-validator-fixtures.json +1 -0
  171. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  172. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  173. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  174. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  175. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  176. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  177. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  178. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  179. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  180. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  181. package/.versions/1.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  182. package/.versions/1.0.4/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  183. package/.versions/1.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  184. package/.versions/1.0.4/hermes/skills/hub-conductor/SKILL.md +84 -0
  185. package/.versions/1.0.4/hermes/skills/hub-liaison/SKILL.md +84 -0
  186. package/.versions/1.0.4/hermes/skills/hub-watchdog/SKILL.md +76 -0
  187. package/.versions/1.0.4/hermes/skills/hub-watchdog/manifest.json +1 -0
  188. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  189. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  190. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  191. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  192. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  193. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  194. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  195. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  196. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  197. package/.versions/1.0.4/hermes/watchdog-tests/__init__.py +0 -0
  198. package/.versions/1.0.4/hooks/coms-stop-hook.mjs +84 -0
  199. package/.versions/1.0.4/install-manifest.json +2745 -0
  200. package/.versions/1.0.4/justfile +272 -0
  201. package/.versions/1.0.4/manifest-meta.json +882 -0
  202. package/.versions/1.0.4/references/accessibility-checklist.md +160 -0
  203. package/.versions/1.0.4/references/definition-of-done.md +67 -0
  204. package/.versions/1.0.4/references/fleet-coordination-patterns.md +151 -0
  205. package/.versions/1.0.4/references/observability-checklist.md +91 -0
  206. package/.versions/1.0.4/references/orchestration-patterns.md +370 -0
  207. package/.versions/1.0.4/references/performance-checklist.md +153 -0
  208. package/.versions/1.0.4/references/prompting-patterns.md +380 -0
  209. package/.versions/1.0.4/references/security-checklist.md +179 -0
  210. package/.versions/1.0.4/references/testing-patterns.md +236 -0
  211. package/.versions/1.0.4/scripts/codex-conductor.ts +41 -0
  212. package/.versions/1.0.4/scripts/codex-remote-control.ts +167 -0
  213. package/.versions/1.0.4/scripts/coms-claude-bridge.ts +411 -0
  214. package/.versions/1.0.4/scripts/coms-cli.ts +484 -0
  215. package/.versions/1.0.4/scripts/coms-hermes-bridge.ts +413 -0
  216. package/.versions/1.0.4/scripts/fleet.ts +185 -0
  217. package/.versions/1.0.4/scripts/hermes-monitor-capability-runner.ts +25 -0
  218. package/.versions/1.0.4/scripts/hermes-monitor-scenario.ts +474 -0
  219. package/.versions/1.0.4/scripts/hermes-watchdog-capability-probe.ts +45 -0
  220. package/.versions/1.0.4/scripts/install-hermes-plugin.sh +180 -0
  221. package/.versions/1.0.4/scripts/lib/claude-bridge-core.ts +210 -0
  222. package/.versions/1.0.4/scripts/lib/codex-conductor.ts +88 -0
  223. package/.versions/1.0.4/scripts/lib/codex-remote-control.ts +480 -0
  224. package/.versions/1.0.4/scripts/lib/coms-envelope.ts +582 -0
  225. package/.versions/1.0.4/scripts/lib/fake-herdr-server.ts +88 -0
  226. package/.versions/1.0.4/scripts/lib/fleet-command.ts +266 -0
  227. package/.versions/1.0.4/scripts/lib/herdr-layout.ts +281 -0
  228. package/.versions/1.0.4/scripts/lib/hermes-bridge-core.ts +241 -0
  229. package/.versions/1.0.4/scripts/lib/hermes-monitor-events.ts +1 -0
  230. package/.versions/1.0.4/scripts/lib/hermes-monitor-herdr.ts +2 -0
  231. package/.versions/1.0.4/scripts/lib/hermes-monitor-model.ts +3 -0
  232. package/.versions/1.0.4/scripts/lib/hermes-monitor-registry.ts +2 -0
  233. package/.versions/1.0.4/scripts/lib/hermes-monitor-socket.ts +2 -0
  234. package/.versions/1.0.4/scripts/lib/hermes-monitor-store.ts +2 -0
  235. package/.versions/1.0.4/scripts/lib/monitor-env.ts +146 -0
  236. package/.versions/1.0.4/scripts/lib/peer-launch.ts +318 -0
  237. package/.versions/1.0.4/scripts/lib/persona-banner.ts +62 -0
  238. package/.versions/1.0.4/scripts/lib/spawn-stagger.ts +101 -0
  239. package/.versions/1.0.4/scripts/lib/team-project.ts +213 -0
  240. package/.versions/1.0.4/scripts/lib/team-snapshot.ts +147 -0
  241. package/.versions/1.0.4/scripts/peer-banner.ts +40 -0
  242. package/.versions/1.0.4/scripts/peer-launch.ts +259 -0
  243. package/.versions/1.0.4/scripts/team-snapshot.ts +237 -0
  244. package/.versions/1.0.4/scripts/team-up.ts +406 -0
  245. package/.versions/1.0.4/skills/_internal/grilling.md +59 -0
  246. package/.versions/1.0.4/skills/browser-testing-with-devtools/SKILL.md +351 -0
  247. package/.versions/1.0.4/skills/code-review-and-quality/SKILL.md +381 -0
  248. package/.versions/1.0.4/skills/compound-learning/SKILL.md +137 -0
  249. package/.versions/1.0.4/skills/context-engineering/SKILL.md +291 -0
  250. package/.versions/1.0.4/skills/deprecation-and-migration/SKILL.md +206 -0
  251. package/.versions/1.0.4/skills/designing-agents/SKILL.md +394 -0
  252. package/.versions/1.0.4/skills/designing-agents/pi-harness-authoring.md +222 -0
  253. package/.versions/1.0.4/skills/frontend-ui-engineering/SKILL.md +328 -0
  254. package/.versions/1.0.4/skills/git-workflow-and-versioning/SKILL.md +316 -0
  255. package/.versions/1.0.4/skills/idea-refine/SKILL.md +182 -0
  256. package/.versions/1.0.4/skills/idea-refine/examples.md +238 -0
  257. package/.versions/1.0.4/skills/idea-refine/frameworks.md +99 -0
  258. package/.versions/1.0.4/skills/idea-refine/refinement-criteria.md +113 -0
  259. package/.versions/1.0.4/skills/idea-refine/scripts/idea-refine.sh +15 -0
  260. package/.versions/1.0.4/skills/incremental-implementation/SKILL.md +298 -0
  261. package/.versions/1.0.4/skills/interview-me/SKILL.md +226 -0
  262. package/.versions/1.0.4/skills/orchestration-verification/SKILL.md +181 -0
  263. package/.versions/1.0.4/skills/peer-coms/SKILL.md +90 -0
  264. package/.versions/1.0.4/skills/performance-optimization/SKILL.md +350 -0
  265. package/.versions/1.0.4/skills/planning-and-task-breakdown/SKILL.md +263 -0
  266. package/.versions/1.0.4/skills/security-and-hardening/SKILL.md +461 -0
  267. package/.versions/1.0.4/skills/spec-driven-development/SKILL.md +256 -0
  268. package/.versions/1.0.4/skills/using-agent-skills/SKILL.md +197 -0
  269. package/.versions/1.0.4/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  270. package/.versions/1.0.4/vendor/agent-skills-upstream/LICENSE +21 -0
  271. package/.versions/1.0.4/vendor/agent-skills-upstream/README.md +11 -0
  272. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  273. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  274. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  275. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  276. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  277. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  278. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  279. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  280. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  281. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  282. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  283. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  284. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  285. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  286. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  287. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  288. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  289. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  290. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  291. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  292. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  293. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  294. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  295. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  296. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  297. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  298. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  299. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  300. package/CHANGELOG.md +7 -0
  301. package/agents/builder.md +1 -0
  302. package/agents/planner.md +1 -1
  303. package/install-manifest.json +3 -3
  304. package/package.json +2 -2
  305. package/skills/_internal/grilling.md +53 -5
  306. package/skills/idea-refine/SKILL.md +2 -2
  307. package/skills/incremental-implementation/SKILL.md +12 -1
  308. package/skills/planning-and-task-breakdown/SKILL.md +14 -5
  309. package/skills/spec-driven-development/SKILL.md +10 -11
  310. package/skills/using-agent-skills/SKILL.md +13 -15
@@ -406,17 +406,31 @@ and visible token totals. Finished/idle/stale rows are hidden by default.
406
406
  its previous task fresh; it is refused for peer/delegate rows, running research, and rows with no previous task.
407
407
  - **`q`** or **Esc** closes the dashboard.
408
408
 
409
- The detail view streams the selected local agent's text, thinking, and tool timeline. Use **`↑`/`↓`**,
410
- **`PgUp`/`PgDn`**, and **End** to navigate/tail; **Enter** expands a selected tool call; **Ctrl+C**
411
- copies the selected entry; and **`m`** replaces the log area with a visible full-screen picker
412
- containing every model currently reported by Pi's available-model registry. Use **`↑`/`↓`**,
413
- **`PgUp`/`PgDn`**, or **Home**/**End**, then **Enter** to apply; **Esc** cancels back to the logs.
414
- Model switching works for local specialists, retained research helpers, and nested delegate roles.
415
- It applies on the next dispatch/continuation and never interrupts
416
- a running child. A coms-backed specialist stores the choice for native fallback runs; external coms
417
- peers control their own model and have no picker. **Esc**/**`q`** returns to the dashboard. Coms peers
418
- have no local transcript and show that explicitly. **`/af-zoom <name|rN>`** opens this same detail
419
- view directly.
409
+ The detail view streams the selected local agent's assistant text, provider-emitted thinking, tool
410
+ arguments, and tool results (including success/error and duration). Normal events request an immediate
411
+ render; a 2-second ticker recovers missed file notifications and advances elapsed time. Use **`v`** to
412
+ switch between scan-friendly **Compact** rows and wrapped **Verbose** output. The choice is preserved
413
+ while drilling into other rows in the same open dashboard.
414
+
415
+ Use **`↑`/`↓`**, **`PgUp`/`PgDn`**, and **Home**/**End** to navigate. Manual movement pauses tail-follow;
416
+ **End** restores it. **Enter** expands a selected tool row in Compact mode and **Ctrl+C** copies the
417
+ selected entry. **`m`** replaces the log area with a full-screen picker containing every model currently
418
+ reported by Pi's available-model registry. Use **`↑`/`↓`**, **`PgUp`/`PgDn`**, or **Home**/**End**, then
419
+ **Enter** to apply; **Esc** cancels back to the logs.
420
+
421
+ Each local run also writes an append-only transcript under `.pi/agent-sessions/transcripts/`. The
422
+ directory/file permissions are owner-only (0700/0600 where the platform supports them), large events
423
+ are chunked, and the live in-memory window is bounded. Common authorization headers, API keys, access
424
+ tokens, passwords, provider tokens, and private-key blocks become `[REDACTED]` **before both persistence
425
+ and display**. This is pattern-based protection, so operators should still avoid deliberately printing
426
+ unknown secret formats.
427
+
428
+ “Thinking” means only text explicitly emitted by the provider/runtime; hidden model reasoning is not
429
+ available, and personas with thinking disabled have no thinking rows. Model switching works for local
430
+ specialists, retained research helpers, and nested delegate roles. It applies on the next dispatch or
431
+ continuation and never interrupts a running child. A coms-backed specialist stores the choice for native
432
+ fallback runs; external coms peers control their own model, have no picker, and have no local transcript.
433
+ **Esc**/**`q`** returns to the dashboard. **`/af-zoom <name|rN>`** opens this same detail view directly.
420
434
 
421
435
  ### Version footer
422
436
 
@@ -36,6 +36,7 @@ import { Type } from "@sinclair/typebox";
36
36
  import { appendFileSync, mkdirSync, writeFileSync } from "fs";
37
37
  import type { ChildProcess } from "child_process";
38
38
  import { spawnPiAgentWithModelFallback, killPiTree } from "./spawn.ts";
39
+ import { redactSecrets } from "../lib/fleet-transcript-store.ts";
39
40
  import { DEFAULT_PROVIDER_LIMITS, createProviderSemaphore, parseProviderLimits } from "./provider-semaphore.js";
40
41
  import {
41
42
  delegateBudgetRefusal,
@@ -157,9 +158,15 @@ export default function (pi: ExtensionAPI) {
157
158
  for (const child of liveChildren) killPiTree(child, "SIGTERM");
158
159
  });
159
160
 
161
+ const redactValue = (value: unknown): unknown => {
162
+ if (typeof value === "string") return redactSecrets(value);
163
+ if (Array.isArray(value)) return value.map(redactValue);
164
+ if (value && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([key, nested]) => [key, redactValue(nested)]));
165
+ return value;
166
+ };
160
167
  const emit = (event: Record<string, unknown>) => {
161
168
  try {
162
- appendFileSync(safePathWithin(config.eventDir, "events.jsonl"), JSON.stringify(event) + "\n", "utf-8");
169
+ appendFileSync(safePathWithin(config.eventDir, "events.jsonl"), JSON.stringify(redactValue(event)) + "\n", { encoding: "utf-8", mode: 0o600 });
163
170
  } catch {}
164
171
  };
165
172
 
@@ -356,9 +363,13 @@ export default function (pi: ExtensionAPI) {
356
363
  },
357
364
  onTextDelta: (delta) => queueDelta("text", delta),
358
365
  onThinkingDelta: (delta) => queueDelta("thinking", delta),
359
- onToolStart: (toolName, argStr) => {
366
+ onToolStart: (toolName, argStr, callId) => {
367
+ flushTimeline();
368
+ emit({ t: "tool_start", id: childId, name: toolName, args: argStr, callId, ts: Date.now() });
369
+ },
370
+ onToolEnd: (toolName, callId, isError, resultText, durationMs) => {
360
371
  flushTimeline();
361
- emit({ t: "tool", id: childId, name: toolName, args: argStr.slice(0, 500) });
372
+ emit({ t: "tool_result", id: childId, name: toolName, output: resultText ?? "", callId, isError: isError === true, durationMs, ts: Date.now() });
362
373
  },
363
374
  onUsage: (usage, source) => {
364
375
  if (source === "message_end") {
@@ -152,7 +152,8 @@ import { createPanelResources } from "../lib/fleet-panel.ts";
152
152
  import { buildFleetRows, fleetTiming, summarise, unionMs, type DelegateInput, type FleetRow, type FleetSource, type PeerInput, type ResearchInput, type SpecialistInput } from "../lib/fleet-read-model.ts";
153
153
  import { attachFleetDashboardTicker, compactWidgetsEnabled, gridColumnsForItems, gridColumnsForSize, liveTimeline, renderCardGrid, resolveFleetKill, resolveFleetRestart } from "../lib/fleet-dashboard-ops.ts";
154
154
  import { dashboardTransition, renderFleetDashboard, FLEET_CHROME_ROWS, type DashboardConfirm } from "../lib/fleet-dashboard-view.ts";
155
- import { detailContent, detailTransition, fleetModelChoices, modelPickerTransition, normalizeFleetDetailInput, renderFleetDetail, renderFleetModelPicker, renderFleetSubstitutionPicker, DETAIL_CHROME_ROWS, type FleetDetailKey, type FleetModelChoice } from "../lib/fleet-detail-view.ts";
155
+ import { detailContent, detailEntryOffsets, detailTransition, fleetModelChoices, modelPickerTransition, normalizeFleetDetailInput, renderFleetDetail, renderFleetModelPicker, renderFleetSubstitutionPicker, DETAIL_CHROME_ROWS, type FleetDetailKey, type FleetModelChoice } from "../lib/fleet-detail-view.ts";
156
+ import { createFleetTranscriptStore, readFleetTranscript, readFleetTranscriptBefore, readFleetTranscriptTail, redactTimelineEvent, type FleetTranscriptRecord, type FleetTranscriptStore } from "../lib/fleet-transcript-store.ts";
156
157
  import { reconcileSelection, type Selection } from "../lib/fleet-selection.ts";
157
158
  import { collectContextBudgetSnapshot, type LivePlane } from "./context-budget-snapshot.ts";
158
159
  import { CONTEXT_BUDGET_CHROME_ROWS, contextBudgetTransition, renderContextBudget, type ContextBudgetViewState } from "../lib/context-budget-view.ts";
@@ -213,10 +214,13 @@ interface AgentDef {
213
214
  // deltas are coalesced into the trailing entry of the same kind; each tool call
214
215
  // is its own entry.
215
216
  interface TimelineEntry {
216
- kind: "text" | "tool" | "thinking";
217
+ kind: "text" | "tool" | "thinking" | "tool-start" | "tool-result";
217
218
  title: string;
218
219
  content: string;
219
220
  timestamp: number;
221
+ callId?: string;
222
+ status?: "success" | "error";
223
+ durationMs?: number;
220
224
  }
221
225
 
222
226
  // A delegate child (or grandchild) of a dispatched specialist, reconstructed
@@ -238,6 +242,7 @@ interface DelegationChild {
238
242
  startedAt: number;
239
243
  elapsed: number;
240
244
  timeline: TimelineEntry[];
245
+ transcriptStore?: FleetTranscriptStore;
241
246
  zoomRender?: (force?: boolean) => void;
242
247
  // The /af-agents-history node for this delegate child, set on its spawn event so
243
248
  // the exit event can close it. Lets a delegating specialist's row subtract the
@@ -295,6 +300,7 @@ interface AgentState {
295
300
  // while a `/af-zoom` overlay is open so the stream parser can refresh it live
296
301
  // (throttled; pass force=true for the final frame).
297
302
  timeline: TimelineEntry[];
303
+ transcriptStore?: FleetTranscriptStore;
298
304
  zoomRender?: (force?: boolean) => void;
299
305
  // The /af-agents-history node for the current dispatch, so delegate children parsed
300
306
  // from the event file can attach to it as the root parent of their subtree.
@@ -337,6 +343,7 @@ interface ResearchState {
337
343
  proc?: ChildProcess;
338
344
  killedByOperator?: boolean;
339
345
  timeline: TimelineEntry[];
346
+ transcriptStore?: FleetTranscriptStore;
340
347
  zoomRender?: (force?: boolean) => void;
341
348
  histEntry?: HistoryEntry;
342
349
  }
@@ -347,6 +354,7 @@ interface Zoomable {
347
354
  def: { name: string };
348
355
  status: string;
349
356
  timeline: TimelineEntry[];
357
+ transcriptStore?: FleetTranscriptStore;
350
358
  zoomRender?: (force?: boolean) => void;
351
359
  }
352
360
 
@@ -859,16 +867,65 @@ function abbrevThinking(level: string): string {
859
867
  return THINKING_ABBREV[level] ?? "";
860
868
  }
861
869
 
862
- // Coalesce a streaming text/thinking delta into the timeline: extend the trailing
863
- // entry when it's the same kind, otherwise start a new one.
864
- function appendTimelineText(timeline: TimelineEntry[], kind: "text" | "thinking", delta: string) {
870
+ const MAX_LIVE_TIMELINE_ENTRIES = 500;
871
+ const MAX_LIVE_ENTRY_CHARS = 64 * 1024;
872
+
873
+ type TimelineTarget = {
874
+ timeline: TimelineEntry[];
875
+ transcriptStore?: FleetTranscriptStore;
876
+ transcriptPending?: TimelineEntry;
877
+ transcriptFlushTimer?: ReturnType<typeof setTimeout>;
878
+ zoomRender?: (force?: boolean) => void;
879
+ };
880
+
881
+ function flushTimelineStore(target: TimelineTarget): void {
882
+ if (target.transcriptFlushTimer) clearTimeout(target.transcriptFlushTimer);
883
+ target.transcriptFlushTimer = undefined;
884
+ if (!target.transcriptPending) return;
885
+ target.transcriptStore?.append(target.transcriptPending as any);
886
+ target.transcriptPending = undefined;
887
+ }
888
+
889
+ /** Redact before both persistence and display, while keeping live memory bounded. */
890
+ function appendTimelineEvent(target: TimelineTarget, event: TimelineEntry): TimelineEntry {
891
+ flushTimelineStore(target);
892
+ const safe = redactTimelineEvent(event) as TimelineEntry;
893
+ target.transcriptStore?.append(safe as any);
894
+ target.timeline.push({ ...safe, content: safe.content.slice(-MAX_LIVE_ENTRY_CHARS) });
895
+ if (target.timeline.length > MAX_LIVE_TIMELINE_ENTRIES) target.timeline.splice(0, target.timeline.length - MAX_LIVE_TIMELINE_ENTRIES);
896
+ return safe;
897
+ }
898
+
899
+ // Coalesce streaming deltas in the bounded live window; the append-only store
900
+ // still receives every redacted delta, so compacting memory cannot lose history.
901
+ function appendTimelineText(target: TimelineTarget, kind: "text" | "thinking", delta: string) {
865
902
  if (!delta) return;
866
- const last = timeline[timeline.length - 1];
867
- if (last && last.kind === kind) {
868
- last.content += delta;
869
- } else {
870
- timeline.push({ kind, title: kind === "text" ? "Assistant" : "Thinking", content: delta, timestamp: Date.now() });
903
+ const safe = redactTimelineEvent({ kind, title: kind === "text" ? "Assistant" : "Thinking", content: delta, timestamp: Date.now() }) as TimelineEntry;
904
+ if (target.transcriptPending?.kind === kind) target.transcriptPending.content += safe.content;
905
+ else {
906
+ flushTimelineStore(target);
907
+ target.transcriptPending = { ...safe };
908
+ }
909
+ if (!target.transcriptFlushTimer) {
910
+ target.transcriptFlushTimer = setTimeout(() => {
911
+ flushTimelineStore(target);
912
+ target.zoomRender?.();
913
+ }, 100);
914
+ try { (target.transcriptFlushTimer as any).unref?.(); } catch {}
915
+ }
916
+ let remaining = safe.content;
917
+ while (remaining) {
918
+ const last = target.timeline[target.timeline.length - 1];
919
+ if (last && last.kind === kind && last.content.length < MAX_LIVE_ENTRY_CHARS) {
920
+ const room = MAX_LIVE_ENTRY_CHARS - last.content.length;
921
+ last.content += remaining.slice(0, room);
922
+ remaining = remaining.slice(room);
923
+ } else {
924
+ target.timeline.push({ ...safe, content: remaining.slice(0, MAX_LIVE_ENTRY_CHARS) });
925
+ remaining = remaining.slice(MAX_LIVE_ENTRY_CHARS);
926
+ }
871
927
  }
928
+ if (target.timeline.length > MAX_LIVE_TIMELINE_ENTRIES) target.timeline.splice(0, target.timeline.length - MAX_LIVE_TIMELINE_ENTRIES);
872
929
  }
873
930
 
874
931
  // ── Zoom overlay (Phase 3) ───────────────────────
@@ -2693,6 +2750,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
2693
2750
  // dirs (delegate children's events + sessions).
2694
2751
  try { rmSync(safePathWithin(sessionDir, "findings"), { recursive: true, force: true }); } catch {}
2695
2752
  try { rmSync(safePathWithin(sessionDir, "delegations"), { recursive: true, force: true }); } catch {}
2753
+ try { rmSync(safePathWithin(sessionDir, "transcripts"), { recursive: true, force: true }); } catch {}
2696
2754
  // Artifacts are NOT ephemeral, and deleting them here is what made a
2697
2755
  // post-mortem record eleven specialist returns and two reviews as NOT
2698
2756
  // RECOVERABLE: the next session's `builder-run1.md` reused the same path as
@@ -3241,6 +3299,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
3241
3299
  startedAt,
3242
3300
  elapsed: 0,
3243
3301
  timeline: [],
3302
+ transcriptStore: createFleetTranscriptStore(safePathWithin(sessionDir, "transcripts", `${safeAgentKey(state.def.name)}-${safeAgentKey(e.id)}.jsonl`)),
3244
3303
  histEntry,
3245
3304
  });
3246
3305
  return;
@@ -3248,7 +3307,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
3248
3307
  const child = state.delegations.get(e.id);
3249
3308
  if (!child) return;
3250
3309
  if (e.t === "timeline") {
3251
- appendTimelineText(child.timeline, e.kind === "thinking" ? "thinking" : "text", e.delta || "");
3310
+ appendTimelineText(child, e.kind === "thinking" ? "thinking" : "text", e.delta || "");
3252
3311
  if (e.kind !== "thinking") {
3253
3312
  const trailing = child.timeline[child.timeline.length - 1];
3254
3313
  if (trailing?.kind === "text") {
@@ -3259,20 +3318,32 @@ APIs, commands, structure), say so in your final response so the docs can be upd
3259
3318
  } else if (e.t === "model_fallback") {
3260
3319
  child.model = e.to || child.model;
3261
3320
  child.lastWork = `model fallback: ${e.from || "override"} → ${e.to || "original"}`;
3262
- child.timeline.push({
3321
+ appendTimelineEvent(child, {
3263
3322
  kind: "text",
3264
3323
  title: "Model fallback",
3265
3324
  content: `${e.from || "override"} failed before work began; retrying with ${e.to || "original"}. ${e.reason || ""}`.trim(),
3266
3325
  timestamp: Date.now(),
3267
3326
  });
3268
3327
  child.zoomRender?.();
3269
- } else if (e.t === "tool") {
3328
+ } else if (e.t === "tool" || e.t === "tool_start") {
3270
3329
  child.toolCount++;
3271
- child.timeline.push({
3272
- kind: "tool",
3330
+ appendTimelineEvent(child, {
3331
+ kind: "tool-start",
3273
3332
  title: `Tool: ${e.name || "tool"}`,
3274
3333
  content: e.args || "",
3275
- timestamp: Date.now(),
3334
+ timestamp: e.ts || Date.now(),
3335
+ ...(e.callId ? { callId: e.callId } : {}),
3336
+ });
3337
+ child.zoomRender?.();
3338
+ } else if (e.t === "tool_result") {
3339
+ appendTimelineEvent(child, {
3340
+ kind: "tool-result",
3341
+ title: `Result: ${e.name || "tool"}`,
3342
+ content: e.output || "",
3343
+ timestamp: e.ts || Date.now(),
3344
+ ...(e.callId ? { callId: e.callId } : {}),
3345
+ status: e.isError ? "error" : "success",
3346
+ ...(typeof e.durationMs === "number" ? { durationMs: e.durationMs } : {}),
3276
3347
  });
3277
3348
  child.zoomRender?.();
3278
3349
  } else if (e.t === "usage") {
@@ -3324,7 +3395,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
3324
3395
  }
3325
3396
  if (dirty) updateWidget();
3326
3397
  };
3327
- const timer = setInterval(drain, 1000);
3398
+ const timer = setInterval(drain, 2000);
3328
3399
  try { (timer as any).unref?.(); } catch {}
3329
3400
  let watcher: fs.FSWatcher | null = null;
3330
3401
  try { watcher = fs.watch(dir, () => drain()); } catch {}
@@ -3607,7 +3678,9 @@ ${externalBlockedProtocol()}
3607
3678
  state.runCount++;
3608
3679
  state.killedByOperator = false;
3609
3680
  state.restarting = false;
3681
+ flushTimelineStore(state);
3610
3682
  state.timeline = [];
3683
+ state.transcriptStore = createFleetTranscriptStore(safePathWithin(sessionDir, "transcripts", `${safeAgentKey(state.def.name)}-run${state.runCount}.jsonl`));
3611
3684
  state.delegationsWatcher?.close();
3612
3685
  state.delegationsWatcher = undefined;
3613
3686
  state.delegations = undefined;
@@ -3643,7 +3716,7 @@ ${externalBlockedProtocol()}
3643
3716
  state.elapsed = Date.now() - startTime;
3644
3717
  state.status = opts?.idle ? "idle" : exitCode === 0 ? "done" : "error";
3645
3718
  state.lastWork = output.split("\n").filter((l: string) => l.trim()).pop() || "";
3646
- if (output.trim()) appendTimelineText(state.timeline, "text", output);
3719
+ if (output.trim()) appendTimelineText(state, "text", output);
3647
3720
  updateWidget();
3648
3721
  state.zoomRender?.(true);
3649
3722
  historyEnd(histEntry, state.status);
@@ -3806,7 +3879,8 @@ ${externalBlockedProtocol()}
3806
3879
  if (delegationActive) {
3807
3880
  const delegationDir = safePathWithin(sessionDir, "delegations", agentKey);
3808
3881
  try { rmSync(delegationDir, { recursive: true, force: true }); } catch {}
3809
- mkdirSync(delegationDir, { recursive: true });
3882
+ mkdirSync(delegationDir, { recursive: true, mode: 0o700 });
3883
+ try { chmodSync(delegationDir, 0o700); } catch {}
3810
3884
  extensions.push(delegateExtPath!);
3811
3885
  effectiveTools = `${state.def.tools},delegate`;
3812
3886
  delegateEnv = {
@@ -3958,29 +4032,40 @@ ${externalBlockedProtocol()}
3958
4032
  void monitorStart?.then(task => monitorBridge?.appendOutputFor(task, delta));
3959
4033
  fullText += delta;
3960
4034
  state.lastWork = fullText.split("\n").filter((l: string) => l.trim()).pop() || "";
3961
- appendTimelineText(state.timeline, "text", delta);
4035
+ appendTimelineText(state, "text", delta);
3962
4036
  updateWidget();
3963
4037
  state.zoomRender?.();
3964
4038
  },
3965
4039
  onThinkingDelta: (delta) => {
3966
4040
  if (!wantThinking) return;
3967
- appendTimelineText(state.timeline, "thinking", delta);
4041
+ appendTimelineText(state, "thinking", delta);
3968
4042
  state.zoomRender?.();
3969
4043
  },
3970
- onToolStart: (toolName, argStr) => {
4044
+ onToolStart: (toolName, argStr, callId) => {
3971
4045
  state.toolCount++;
3972
- state.timeline.push({
3973
- kind: "tool",
4046
+ appendTimelineEvent(state, {
4047
+ kind: "tool-start",
3974
4048
  title: `Tool: ${toolName}`,
3975
4049
  content: argStr,
3976
4050
  timestamp: Date.now(),
4051
+ ...(callId ? { callId } : {}),
3977
4052
  });
3978
4053
  updateWidget();
3979
4054
  state.zoomRender?.();
3980
4055
  const violation = driftMonitor?.onToolStart(toolName, argStr);
3981
4056
  if (violation) escalateDrift(violation);
3982
4057
  },
3983
- onToolEnd: (toolName, _id, isError) => {
4058
+ onToolEnd: (toolName, callId, isError, resultText, durationMs) => {
4059
+ appendTimelineEvent(state, {
4060
+ kind: "tool-result",
4061
+ title: `Result: ${toolName}`,
4062
+ content: resultText ?? "",
4063
+ timestamp: Date.now(),
4064
+ ...(callId ? { callId } : {}),
4065
+ status: isError ? "error" : "success",
4066
+ ...(durationMs == null ? {} : { durationMs }),
4067
+ });
4068
+ state.zoomRender?.();
3984
4069
  const violation = driftMonitor?.onToolEnd(toolName, isError);
3985
4070
  if (violation) escalateDrift(violation);
3986
4071
  },
@@ -4324,7 +4409,9 @@ ${externalBlockedProtocol()}
4324
4409
  state.elapsed = 0;
4325
4410
  state.lastWork = "";
4326
4411
  state.killedByOperator = false;
4412
+ flushTimelineStore(state);
4327
4413
  state.timeline = [];
4414
+ state.transcriptStore = createFleetTranscriptStore(safePathWithin(sessionDir, "transcripts", `research-r${state.id}-turn${state.turnCount}.jsonl`));
4328
4415
  updateResearchWidget();
4329
4416
 
4330
4417
  const histEntry = historyStart("research", `Research r${state.id}`);
@@ -4380,26 +4467,39 @@ ${externalBlockedProtocol()}
4380
4467
  onTextDelta: (delta) => {
4381
4468
  fullText += delta;
4382
4469
  state.lastWork = fullText.split("\n").filter((l: string) => l.trim()).pop() || "";
4383
- appendTimelineText(state.timeline, "text", delta);
4470
+ appendTimelineText(state, "text", delta);
4384
4471
  updateResearchWidget();
4385
4472
  state.zoomRender?.();
4386
4473
  },
4387
4474
  onThinkingDelta: (delta) => {
4388
4475
  if (!wantThinking) return;
4389
- appendTimelineText(state.timeline, "thinking", delta);
4476
+ appendTimelineText(state, "thinking", delta);
4390
4477
  state.zoomRender?.();
4391
4478
  },
4392
- onToolStart: (toolName, argStr) => {
4479
+ onToolStart: (toolName, argStr, callId) => {
4393
4480
  state.toolCount++;
4394
- state.timeline.push({
4395
- kind: "tool",
4481
+ appendTimelineEvent(state, {
4482
+ kind: "tool-start",
4396
4483
  title: `Tool: ${toolName}`,
4397
4484
  content: argStr,
4398
4485
  timestamp: Date.now(),
4486
+ ...(callId ? { callId } : {}),
4399
4487
  });
4400
4488
  updateResearchWidget();
4401
4489
  state.zoomRender?.();
4402
4490
  },
4491
+ onToolEnd: (toolName, callId, isError, resultText, durationMs) => {
4492
+ appendTimelineEvent(state, {
4493
+ kind: "tool-result",
4494
+ title: `Result: ${toolName}`,
4495
+ content: resultText ?? "",
4496
+ timestamp: Date.now(),
4497
+ ...(callId ? { callId } : {}),
4498
+ status: isError ? "error" : "success",
4499
+ ...(durationMs == null ? {} : { durationMs }),
4500
+ });
4501
+ state.zoomRender?.();
4502
+ },
4403
4503
  onUsage: (usage) => {
4404
4504
  state.contextTokens = (usage.input || 0) + (usage.cacheRead || 0) + (usage.cacheWrite || 0);
4405
4505
  if (researchWindow.window > 0) {
@@ -7007,22 +7107,80 @@ ${externalBlockedProtocol()}
7007
7107
  return normalizeFleetDetailInput(data, key);
7008
7108
  }
7009
7109
 
7010
- async function openFleetDetail(row: FleetRow, ctx: any): Promise<void> {
7110
+ async function openFleetDetail(row: FleetRow, ctx: any, initialVerbose = false): Promise<boolean> {
7011
7111
  const target = row.kind === "research" ? researchStates.get(parseResearchHandle(row.key)!) : row.kind === "delegate" ? findDelegationChild(row.key)?.child : agentStates.get(row.key);
7012
7112
  const resources = createPanelResources();
7013
7113
  let detailRow = row;
7014
7114
  let modelPicker: { choices: FleetModelChoice[]; index: number; scrollOffset: number } | null = null;
7015
- let scrollOffset = 0, selectedIndex = 0, expandedIndex: number | null = null, followTail = true, lastRender = 0;
7016
- const timeline = () => liveTimeline(target);
7115
+ let scrollOffset = 0, selectedIndex = 0, expandedIndex: number | null = null, followTail = true, verbose = initialVerbose, lastRender = 0;
7116
+ const transcriptPath = target?.transcriptStore?.path;
7117
+ let transcriptRecords: FleetTranscriptRecord[] | null = transcriptPath
7118
+ ? readFleetTranscriptTail(transcriptPath, { limit: 2000 }).records
7119
+ : null;
7120
+ const compactRecords = (records: readonly FleetTranscriptRecord[]): TimelineEntry[] => {
7121
+ const entries: TimelineEntry[] = [];
7122
+ for (const { event } of records) {
7123
+ const current = event as TimelineEntry;
7124
+ const last = entries[entries.length - 1];
7125
+ const merge = last && last.kind === current.kind
7126
+ && (current.kind === "text" || current.kind === "thinking" || (last.callId && last.callId === current.callId));
7127
+ if (merge && last.content.length < MAX_LIVE_ENTRY_CHARS) {
7128
+ const room = MAX_LIVE_ENTRY_CHARS - last.content.length;
7129
+ last.content += current.content.slice(0, room);
7130
+ if (current.content.length > room) entries.push({ ...current, content: current.content.slice(room) });
7131
+ } else entries.push({ ...current });
7132
+ }
7133
+ return entries;
7134
+ };
7135
+ const timeline = () => transcriptRecords ? compactRecords(transcriptRecords) : [...liveTimeline(target)] as TimelineEntry[];
7136
+ const syncTranscriptTail = () => {
7137
+ if (!transcriptPath || !transcriptRecords || !followTail) return;
7138
+ const after = transcriptRecords[transcriptRecords.length - 1]?.endOffset ?? 0;
7139
+ const page = readFleetTranscript(transcriptPath, { after, limit: 500 });
7140
+ if (page.records.length > 0) transcriptRecords.push(...page.records);
7141
+ if (transcriptRecords.length > 2000) transcriptRecords.splice(0, transcriptRecords.length - 2000);
7142
+ };
7143
+ const loadOlderTranscript = () => {
7144
+ if (!transcriptPath || !transcriptRecords) return 0;
7145
+ const before = transcriptRecords[0]?.startOffset ?? 0;
7146
+ if (before <= 0) return 0;
7147
+ const older = readFleetTranscriptBefore(transcriptPath, { before, limit: 500 }).records;
7148
+ transcriptRecords.unshift(...older);
7149
+ if (transcriptRecords.length > 2000) transcriptRecords.splice(2000);
7150
+ return compactRecords(older).length;
7151
+ };
7152
+ const loadNewerTranscript = (): number => {
7153
+ if (!transcriptPath || !transcriptRecords) return 0;
7154
+ const after = transcriptRecords[transcriptRecords.length - 1]?.endOffset ?? 0;
7155
+ const newer = readFleetTranscript(transcriptPath, { after, limit: 500 }).records;
7156
+ if (newer.length === 0) return 0;
7157
+ transcriptRecords.push(...newer);
7158
+ const overflow = Math.max(0, transcriptRecords.length - 2000);
7159
+ const removed = overflow > 0 ? compactRecords(transcriptRecords.slice(0, overflow)).length : 0;
7160
+ if (overflow > 0) transcriptRecords.splice(0, overflow);
7161
+ return removed;
7162
+ };
7163
+ const reloadTranscriptTail = () => {
7164
+ if (!transcriptPath) return;
7165
+ transcriptRecords = readFleetTranscriptTail(transcriptPath, { limit: 2000 }).records;
7166
+ };
7017
7167
  try { await ctx.ui.custom((tui: any, theme: any, _kb: any, done: () => void) => {
7018
7168
  if (target) target.zoomRender = (force?: boolean) => { const now = Date.now(); if (force || now - lastRender > 80) { lastRender = now; tui.requestRender(); } };
7169
+ resources.every(2000, () => tui.requestRender());
7019
7170
  return {
7020
7171
  render: (w: number) => {
7021
7172
  const body = bodyRows(tui.terminal?.rows, DETAIL_CHROME_ROWS);
7022
7173
  if (modelPicker) return renderFleetModelPicker(detailRow.name, modelPicker.choices, modelPicker, w, body, theme);
7174
+ syncTranscriptTail();
7023
7175
  const entries = timeline();
7024
- if (followTail) scrollOffset = Math.max(0, detailContent(entries, w, expandedIndex).length - body);
7025
- return renderFleetDetail(detailRow, entries, scrollOffset, w, body, theme, expandedIndex);
7176
+ if (followTail) {
7177
+ selectedIndex = Math.max(0, entries.length - 1);
7178
+ scrollOffset = Math.max(0, detailContent(entries, w, expandedIndex, verbose, selectedIndex).length - body);
7179
+ }
7180
+ const liveRow = detailRow.status === "running" && detailRow.startedAt != null
7181
+ ? { ...detailRow, elapsed: Date.now() - detailRow.startedAt }
7182
+ : detailRow;
7183
+ return renderFleetDetail(liveRow, entries, scrollOffset, w, body, theme, expandedIndex, verbose, selectedIndex);
7026
7184
  },
7027
7185
  handleInput: async (data: string) => {
7028
7186
  const input = matchedFleetDetailInput(data);
@@ -7041,10 +7199,22 @@ ${externalBlockedProtocol()}
7041
7199
  tui.requestRender();
7042
7200
  return;
7043
7201
  }
7044
- const entries = timeline();
7045
- const state = { scrollOffset, selectedIndex, expandedIndex, followTail };
7046
- const action = detailTransition(input, state, entries, body, detailContent(entries, tui.terminal?.columns ?? 80, expandedIndex).length);
7047
- ({ scrollOffset, selectedIndex, expandedIndex, followTail } = state);
7202
+ if ((input === "\u001b[A" || input === "k" || input === "\u001b[5~" || input === "\u001b[H") && scrollOffset === 0) {
7203
+ const added = loadOlderTranscript();
7204
+ selectedIndex += added;
7205
+ }
7206
+ if (input === "\u001b[F") reloadTranscriptTail();
7207
+ let entries = timeline();
7208
+ if (!followTail && (input === "\u001b[B" || input === "j" || input === "\u001b[6~") && selectedIndex >= entries.length - 1) {
7209
+ selectedIndex = Math.max(0, selectedIndex - loadNewerTranscript());
7210
+ entries = timeline();
7211
+ }
7212
+ const width = tui.terminal?.columns ?? 80;
7213
+ const state = { scrollOffset, selectedIndex, expandedIndex, followTail, verbose };
7214
+ const content = detailContent(entries, width, expandedIndex, verbose, selectedIndex);
7215
+ const offsets = detailEntryOffsets(entries, width, expandedIndex, verbose);
7216
+ const action = detailTransition(input, state, entries, body, content.length, offsets);
7217
+ ({ scrollOffset, selectedIndex, expandedIndex, followTail, verbose } = state);
7048
7218
  if (action === "close") done();
7049
7219
  else if (action === "copy") {
7050
7220
  const item = entries[selectedIndex];
@@ -7062,6 +7232,7 @@ ${externalBlockedProtocol()}
7062
7232
  dispose: () => resources.dispose(),
7063
7233
  };
7064
7234
  }, FULLSCREEN_OVERLAY); } finally { resources.dispose(); if (target) target.zoomRender = undefined; }
7235
+ return verbose;
7065
7236
  }
7066
7237
  async function restartFleetRow(selected: FleetRow, ctx: any): Promise<void> {
7067
7238
  if (modelWorkBlockedByRosterRecovery(ctx)) return;
@@ -7112,6 +7283,7 @@ ${externalBlockedProtocol()}
7112
7283
  const selection: Selection = { index: 0 };
7113
7284
  let scrollOffset = 0;
7114
7285
  let filtering = false;
7286
+ let detailVerbose = false;
7115
7287
  let confirm: DashboardConfirm = null;
7116
7288
  let substitutionPicker: FleetSubstitutionPickerState | null = startSubstitution
7117
7289
  ? { stage: "source", choices: substitutionSourceChoices(), index: 0, scrollOffset: 0 }
@@ -7192,7 +7364,7 @@ ${externalBlockedProtocol()}
7192
7364
  else substitutionPicker = { stage: "source", choices, index: 0, scrollOffset: 0 };
7193
7365
  } else if (intent && typeof intent === "object" && "open" in intent) {
7194
7366
  const selected = rows.find(r => r.key === intent.open) ?? rows[selection.index];
7195
- if (selected) await openFleetDetail(selected, ctx);
7367
+ if (selected) detailVerbose = await openFleetDetail(selected, ctx, detailVerbose);
7196
7368
  } else if (intent && typeof intent === "object" && "kill" in intent) {
7197
7369
  const selected = rows.find(r => r.key === intent.kill);
7198
7370
  if (!selected) ctx.ui.notify("Selected fleet row no longer exists.", "warning");
@@ -3,5 +3,5 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
- "version": "1.0.3"
6
+ "version": "1.0.4"
7
7
  }
@@ -91,8 +91,8 @@ export interface SpawnPiAgentCallbacks {
91
91
  onTextDelta?(delta: string): void;
92
92
  onThinkingDelta?(delta: string): void;
93
93
  onToolStart?(toolName: string, argStr: string, toolCallId?: string): void;
94
- /** isError is present only when the event stream carries an error flag. */
95
- onToolEnd?(toolName: string, toolCallId?: string, isError?: boolean): void;
94
+ /** Result text is the complete textual tool payload; duration is measured in the parent process. */
95
+ onToolEnd?(toolName: string, toolCallId?: string, isError?: boolean, resultText?: string, durationMs?: number): void;
96
96
  onUsage?(usage: PiUsage, source: "message_end" | "agent_end"): void;
97
97
  }
98
98
 
@@ -233,7 +233,20 @@ export function spawnPiAgent(
233
233
  deadlineTimer = setTimeout(() => terminate("turn_timeout"), turnDeadlineMs);
234
234
  }
235
235
 
236
+ const toolStarts = new Map<string, number>();
236
237
  const toolId = (event: any) => String(event.toolCallId ?? event.tool_call_id ?? event.id ?? "");
238
+ const toolResultText = (result: any): string => {
239
+ const content = result?.content ?? result;
240
+ if (typeof content === "string") return content;
241
+ if (!Array.isArray(content)) {
242
+ try { return content == null ? "" : JSON.stringify(content); } catch { return String(content ?? ""); }
243
+ }
244
+ return content.map((item: any) => {
245
+ if (typeof item === "string") return item;
246
+ if (item?.type === "text" && typeof item.text === "string") return item.text;
247
+ try { return JSON.stringify(item); } catch { return String(item ?? ""); }
248
+ }).filter(Boolean).join("\n");
249
+ };
237
250
  const handleEvent = (event: any) => {
238
251
  if (event.type === "message_update") {
239
252
  const delta = event.assistantMessageEvent;
@@ -245,6 +258,7 @@ export function spawnPiAgent(
245
258
  try { argStr = event.args != null ? JSON.stringify(event.args) : ""; } catch {}
246
259
  const id = toolId(event);
247
260
  const name = event.toolName || "tool";
261
+ if (id && !toolStarts.has(id)) toolStarts.set(id, Date.now());
248
262
  cbs.onToolStart?.(name, argStr, id || undefined);
249
263
  if (timeoutMs != null && id && watchedTools.has(name) && !calls.has(id)) {
250
264
  const startedAt = Date.now();
@@ -258,7 +272,15 @@ export function spawnPiAgent(
258
272
  if (call) { clearTimeout(call.timer); calls.delete(id); }
259
273
  }
260
274
  const rawIsError = event.isError ?? event.is_error ?? event.result?.isError ?? event.result?.is_error;
261
- cbs.onToolEnd?.(event.toolName || "tool", id || undefined, typeof rawIsError === "boolean" ? rawIsError : undefined);
275
+ const startedAt = id ? toolStarts.get(id) : undefined;
276
+ if (id) toolStarts.delete(id);
277
+ cbs.onToolEnd?.(
278
+ event.toolName || "tool",
279
+ id || undefined,
280
+ typeof rawIsError === "boolean" ? rawIsError : undefined,
281
+ toolResultText(event.result),
282
+ startedAt == null ? undefined : Math.max(0, Date.now() - startedAt),
283
+ );
262
284
  } else if (event.type === "message_end") {
263
285
  if (event.message?.role === "assistant"
264
286
  && (event.message.stopReason === "error" || event.message.stopReason === "aborted")) {
@@ -3,5 +3,5 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
- "version": "1.0.3"
6
+ "version": "1.0.4"
7
7
  }
@@ -3,5 +3,5 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
- "version": "1.0.3"
6
+ "version": "1.0.4"
7
7
  }
@@ -144,11 +144,11 @@ export function compactWidgetsEnabled(viewMode: "compact" | "off"): boolean {
144
144
 
145
145
  type PanelResources = ReturnType<typeof createPanelResources>;
146
146
 
147
- /** Register the 1s elapsed/status ticker and return a disposer that tears it down. */
147
+ /** Register the 2s recovery/elapsed ticker; live events request immediate renders. */
148
148
  export function attachFleetDashboardTicker(
149
149
  resources: PanelResources,
150
150
  requestRender: () => void,
151
- intervalMs = 1000,
151
+ intervalMs = 2000,
152
152
  ): () => void {
153
153
  resources.every(intervalMs, requestRender);
154
154
  return () => resources.dispose();