@bastani/atomic 0.9.89 → 0.9.90-alpha.1

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 (868) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +13 -0
  3. package/dist/builtin/intercom/README.md +3 -1
  4. package/dist/builtin/intercom/broker/broker.ts +35 -10
  5. package/dist/builtin/intercom/broker/client.ts +42 -1
  6. package/dist/builtin/intercom/index.bundle.mjs +400 -67
  7. package/dist/builtin/intercom/package.json +1 -1
  8. package/dist/builtin/intercom/skills/intercom/SKILL.md +24 -5
  9. package/dist/builtin/intercom/types.ts +5 -0
  10. package/dist/builtin/mcp/package.json +1 -1
  11. package/dist/builtin/subagents/CHANGELOG.md +27 -0
  12. package/dist/builtin/subagents/README.md +18 -20
  13. package/dist/builtin/subagents/agents/worker.md +1 -1
  14. package/dist/builtin/subagents/package.json +1 -1
  15. package/dist/builtin/subagents/skills/feedback/SKILL.md +2 -2
  16. package/dist/builtin/subagents/skills/qlty/SKILL.md +2 -2
  17. package/dist/builtin/subagents/skills/qlty/references/commands.md +45 -12
  18. package/dist/builtin/subagents/skills/qlty/references/quickstart.md +102 -21
  19. package/dist/builtin/subagents/skills/subagent/SKILL.md +18 -17
  20. package/dist/builtin/subagents/skills/tdd/LICENSE.txt +50 -0
  21. package/dist/builtin/subagents/skills/tdd/SKILL.md +10 -0
  22. package/dist/builtin/subagents/skills/tdd/tests.md +16 -0
  23. package/dist/builtin/subagents/skills/tmux/LICENSE.txt +24 -0
  24. package/dist/builtin/subagents/skills/tmux/SKILL.md +20 -1
  25. package/dist/builtin/subagents/skills/tmux/scripts/find-sessions.sh +19 -10
  26. package/dist/builtin/subagents/skills/tmux/scripts/wait-for-text.sh +231 -19
  27. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1911 -845
  28. package/dist/builtin/web-access/CHANGELOG.md +6 -0
  29. package/dist/builtin/web-access/index.bundle.mjs +158 -34
  30. package/dist/builtin/web-access/package.json +1 -1
  31. package/dist/builtin/workflows/CHANGELOG.md +36 -0
  32. package/dist/builtin/workflows/builtin/{chunk-tjk7jp9a.js → chunk-akmcsx14.js} +1 -1
  33. package/dist/builtin/workflows/builtin/{chunk-913nwrzq.js → chunk-erpybg3c.js} +109 -30
  34. package/dist/builtin/workflows/builtin/{chunk-e07n7en6.js → chunk-wpgpr31s.js} +1 -1
  35. package/dist/builtin/workflows/builtin/goal.js +2 -2
  36. package/dist/builtin/workflows/builtin/index.js +3 -3
  37. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  38. package/dist/builtin/workflows/package.json +1 -1
  39. package/dist/builtin/workflows/skills/bro/SKILL.md +1 -1
  40. package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5_2.md +19 -19
  41. package/dist/builtin/workflows/skills/prompt-engineer/references/claude_haiku_5_5.md +2 -2
  42. package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_5_5.md +3 -3
  43. package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6.md +2 -2
  44. package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_sol.md +2 -2
  45. package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_terra.md +3 -3
  46. package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_2.md +3 -2
  47. package/dist/builtin/workflows/skills/show-me/SKILL.md +2 -2
  48. package/dist/builtin/workflows/skills/skill-creator/scripts/run_eval.py +29 -24
  49. package/dist/builtin/workflows/skills/teach/SKILL.md +8 -8
  50. package/dist/builtin/workflows/skills/unslop/SKILL.md +29 -51
  51. package/dist/builtin/workflows/src/durable/journal/internal.d.ts +10 -5
  52. package/dist/builtin/workflows/src/durable/journal/sharded-run-journal.d.ts +6 -3
  53. package/dist/builtin/workflows/src/durable/journal/sql-run-journal.d.ts +25 -3
  54. package/dist/builtin/workflows/src/extension/index.bundle.mjs +4444 -1356
  55. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +2544 -568
  56. package/dist/builtin/workflows/src/index.js +2467 -549
  57. package/dist/builtin/workflows/src/local-worker-entry.mjs +2544 -568
  58. package/dist/cli/storage-command.d.ts +6 -0
  59. package/dist/cli/storage-command.d.ts.map +1 -1
  60. package/dist/cli/storage-command.js +11 -0
  61. package/dist/cli/storage-command.js.map +1 -1
  62. package/dist/cli/storage-search-database.d.ts +18 -0
  63. package/dist/cli/storage-search-database.d.ts.map +1 -0
  64. package/dist/cli/storage-search-database.js +90 -0
  65. package/dist/cli/storage-search-database.js.map +1 -0
  66. package/dist/cli/storage-search-session.d.ts +5 -0
  67. package/dist/cli/storage-search-session.d.ts.map +1 -0
  68. package/dist/cli/storage-search-session.js +133 -0
  69. package/dist/cli/storage-search-session.js.map +1 -0
  70. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  71. package/dist/core/agent-session-accessors.js +107 -1
  72. package/dist/core/agent-session-accessors.js.map +1 -1
  73. package/dist/core/agent-session-bash.d.ts.map +1 -1
  74. package/dist/core/agent-session-bash.js +2 -0
  75. package/dist/core/agent-session-bash.js.map +1 -1
  76. package/dist/core/agent-session-boundaries.d.ts +2 -0
  77. package/dist/core/agent-session-boundaries.d.ts.map +1 -1
  78. package/dist/core/agent-session-boundaries.js +9 -4
  79. package/dist/core/agent-session-boundaries.js.map +1 -1
  80. package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
  81. package/dist/core/agent-session-custom-message-commit.js +2 -1
  82. package/dist/core/agent-session-custom-message-commit.js.map +1 -1
  83. package/dist/core/agent-session-detached-tools.d.ts +3 -2
  84. package/dist/core/agent-session-detached-tools.d.ts.map +1 -1
  85. package/dist/core/agent-session-detached-tools.js +156 -41
  86. package/dist/core/agent-session-detached-tools.js.map +1 -1
  87. package/dist/core/agent-session-events.d.ts +2 -1
  88. package/dist/core/agent-session-events.d.ts.map +1 -1
  89. package/dist/core/agent-session-events.js +59 -23
  90. package/dist/core/agent-session-events.js.map +1 -1
  91. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  92. package/dist/core/agent-session-extension-bindings.js +53 -4
  93. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  94. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  95. package/dist/core/agent-session-message-queue.js +2 -1
  96. package/dist/core/agent-session-message-queue.js.map +1 -1
  97. package/dist/core/agent-session-methods.d.ts +23 -3
  98. package/dist/core/agent-session-methods.d.ts.map +1 -1
  99. package/dist/core/agent-session-methods.js.map +1 -1
  100. package/dist/core/agent-session-models.d.ts.map +1 -1
  101. package/dist/core/agent-session-models.js +2 -0
  102. package/dist/core/agent-session-models.js.map +1 -1
  103. package/dist/core/agent-session-prompt.d.ts +1 -1
  104. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  105. package/dist/core/agent-session-prompt.js +14 -3
  106. package/dist/core/agent-session-prompt.js.map +1 -1
  107. package/dist/core/agent-session-queue-pause.d.ts +2 -1
  108. package/dist/core/agent-session-queue-pause.d.ts.map +1 -1
  109. package/dist/core/agent-session-queue-pause.js +8 -4
  110. package/dist/core/agent-session-queue-pause.js.map +1 -1
  111. package/dist/core/agent-session-retry.d.ts +7 -3
  112. package/dist/core/agent-session-retry.d.ts.map +1 -1
  113. package/dist/core/agent-session-retry.js +113 -112
  114. package/dist/core/agent-session-retry.js.map +1 -1
  115. package/dist/core/agent-session-runtime.d.ts +15 -0
  116. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  117. package/dist/core/agent-session-runtime.js +26 -0
  118. package/dist/core/agent-session-runtime.js.map +1 -1
  119. package/dist/core/agent-session-services.d.ts +5 -2
  120. package/dist/core/agent-session-services.d.ts.map +1 -1
  121. package/dist/core/agent-session-services.js +6 -6
  122. package/dist/core/agent-session-services.js.map +1 -1
  123. package/dist/core/agent-session-tasks.js.map +1 -1
  124. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  125. package/dist/core/agent-session-tool-registry.js +4 -2
  126. package/dist/core/agent-session-tool-registry.js.map +1 -1
  127. package/dist/core/agent-session-types.d.ts +19 -1
  128. package/dist/core/agent-session-types.d.ts.map +1 -1
  129. package/dist/core/agent-session-types.js.map +1 -1
  130. package/dist/core/agent-session.d.ts +11 -0
  131. package/dist/core/agent-session.d.ts.map +1 -1
  132. package/dist/core/agent-session.js +8 -0
  133. package/dist/core/agent-session.js.map +1 -1
  134. package/dist/core/anthropic-thinking-guard.d.ts +16 -1
  135. package/dist/core/anthropic-thinking-guard.d.ts.map +1 -1
  136. package/dist/core/anthropic-thinking-guard.js +124 -7
  137. package/dist/core/anthropic-thinking-guard.js.map +1 -1
  138. package/dist/core/auth-storage.d.ts +3 -0
  139. package/dist/core/auth-storage.d.ts.map +1 -1
  140. package/dist/core/auth-storage.js +10 -0
  141. package/dist/core/auth-storage.js.map +1 -1
  142. package/dist/core/detached-tool-output.d.ts +4 -0
  143. package/dist/core/detached-tool-output.d.ts.map +1 -0
  144. package/dist/core/detached-tool-output.js +48 -0
  145. package/dist/core/detached-tool-output.js.map +1 -0
  146. package/dist/core/event-loop-monitor.d.ts +4 -1
  147. package/dist/core/event-loop-monitor.d.ts.map +1 -1
  148. package/dist/core/event-loop-monitor.js +84 -159
  149. package/dist/core/event-loop-monitor.js.map +1 -1
  150. package/dist/core/export-html/index.d.ts.map +1 -1
  151. package/dist/core/export-html/index.js +26 -4
  152. package/dist/core/export-html/index.js.map +1 -1
  153. package/dist/core/export-html/saved-agent-cards.d.ts +15 -0
  154. package/dist/core/export-html/saved-agent-cards.d.ts.map +1 -0
  155. package/dist/core/export-html/saved-agent-cards.js +255 -0
  156. package/dist/core/export-html/saved-agent-cards.js.map +1 -0
  157. package/dist/core/export-html/saved-agent-viewer.js +101 -0
  158. package/dist/core/extensions/builtin-subagent-record-writer.d.ts +11 -0
  159. package/dist/core/extensions/builtin-subagent-record-writer.d.ts.map +1 -0
  160. package/dist/core/extensions/builtin-subagent-record-writer.js +33 -0
  161. package/dist/core/extensions/builtin-subagent-record-writer.js.map +1 -0
  162. package/dist/core/extensions/loader-api.d.ts +1 -1
  163. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  164. package/dist/core/extensions/loader-api.js +9 -2
  165. package/dist/core/extensions/loader-api.js.map +1 -1
  166. package/dist/core/extensions/loader-bindings.d.ts +7 -0
  167. package/dist/core/extensions/loader-bindings.d.ts.map +1 -1
  168. package/dist/core/extensions/loader-bindings.js +42 -1
  169. package/dist/core/extensions/loader-bindings.js.map +1 -1
  170. package/dist/core/extensions/loader-core.d.ts.map +1 -1
  171. package/dist/core/extensions/loader-core.js +33 -12
  172. package/dist/core/extensions/loader-core.js.map +1 -1
  173. package/dist/core/extensions/runner-events.d.ts +2 -0
  174. package/dist/core/extensions/runner-events.d.ts.map +1 -1
  175. package/dist/core/extensions/runner-events.js +17 -7
  176. package/dist/core/extensions/runner-events.js.map +1 -1
  177. package/dist/core/extensions/runner.d.ts +6 -2
  178. package/dist/core/extensions/runner.d.ts.map +1 -1
  179. package/dist/core/extensions/runner.js +5 -2
  180. package/dist/core/extensions/runner.js.map +1 -1
  181. package/dist/core/extensions/ui-types.d.ts +4 -0
  182. package/dist/core/extensions/ui-types.d.ts.map +1 -1
  183. package/dist/core/extensions/ui-types.js.map +1 -1
  184. package/dist/core/extensions/workflow-run-control-hub.d.ts +2 -2
  185. package/dist/core/extensions/workflow-run-control-hub.d.ts.map +1 -1
  186. package/dist/core/extensions/workflow-run-control-hub.js +2 -2
  187. package/dist/core/extensions/workflow-run-control-hub.js.map +1 -1
  188. package/dist/core/extensions/workflow-run-control.d.ts +10 -3
  189. package/dist/core/extensions/workflow-run-control.d.ts.map +1 -1
  190. package/dist/core/extensions/workflow-run-control.js.map +1 -1
  191. package/dist/core/first-prompt-model.d.ts +22 -0
  192. package/dist/core/first-prompt-model.d.ts.map +1 -0
  193. package/dist/core/first-prompt-model.js +84 -0
  194. package/dist/core/first-prompt-model.js.map +1 -0
  195. package/dist/core/footer-data-provider.d.ts.map +1 -1
  196. package/dist/core/footer-data-provider.js +11 -7
  197. package/dist/core/footer-data-provider.js.map +1 -1
  198. package/dist/core/fork-replay-pair.d.ts +22 -0
  199. package/dist/core/fork-replay-pair.d.ts.map +1 -0
  200. package/dist/core/fork-replay-pair.js +174 -0
  201. package/dist/core/fork-replay-pair.js.map +1 -0
  202. package/dist/core/fork-replay-wire.d.ts +11 -0
  203. package/dist/core/fork-replay-wire.d.ts.map +1 -0
  204. package/dist/core/fork-replay-wire.js +116 -0
  205. package/dist/core/fork-replay-wire.js.map +1 -0
  206. package/dist/core/messages.d.ts +2 -0
  207. package/dist/core/messages.d.ts.map +1 -1
  208. package/dist/core/messages.js +8 -4
  209. package/dist/core/messages.js.map +1 -1
  210. package/dist/core/model-runtime.d.ts +10 -1
  211. package/dist/core/model-runtime.d.ts.map +1 -1
  212. package/dist/core/model-runtime.js +76 -11
  213. package/dist/core/model-runtime.js.map +1 -1
  214. package/dist/core/package-manager-auto-resources.d.ts.map +1 -1
  215. package/dist/core/package-manager-auto-resources.js +3 -2
  216. package/dist/core/package-manager-auto-resources.js.map +1 -1
  217. package/dist/core/package-manager-resource-files.js +7 -8
  218. package/dist/core/package-manager-resource-files.js.map +1 -1
  219. package/dist/core/project-trust-state.d.ts +90 -0
  220. package/dist/core/project-trust-state.d.ts.map +1 -0
  221. package/dist/core/project-trust-state.js +65 -0
  222. package/dist/core/project-trust-state.js.map +1 -0
  223. package/dist/core/provider-rate-limits.d.ts +6 -0
  224. package/dist/core/provider-rate-limits.d.ts.map +1 -1
  225. package/dist/core/provider-rate-limits.js +43 -0
  226. package/dist/core/provider-rate-limits.js.map +1 -1
  227. package/dist/core/provider-request-admission.d.ts.map +1 -1
  228. package/dist/core/provider-request-admission.js +10 -1
  229. package/dist/core/provider-request-admission.js.map +1 -1
  230. package/dist/core/remote-catalog-provider.d.ts +6 -1
  231. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  232. package/dist/core/remote-catalog-provider.js +22 -1
  233. package/dist/core/remote-catalog-provider.js.map +1 -1
  234. package/dist/core/resolve-config-value.d.ts.map +1 -1
  235. package/dist/core/resolve-config-value.js +5 -2
  236. package/dist/core/resolve-config-value.js.map +1 -1
  237. package/dist/core/resource-loader-core.d.ts.map +1 -1
  238. package/dist/core/resource-loader-core.js +3 -0
  239. package/dist/core/resource-loader-core.js.map +1 -1
  240. package/dist/core/resource-loader-extensions.d.ts +2 -2
  241. package/dist/core/resource-loader-extensions.d.ts.map +1 -1
  242. package/dist/core/resource-loader-extensions.js +6 -4
  243. package/dist/core/resource-loader-extensions.js.map +1 -1
  244. package/dist/core/resource-loader-package-resources.d.ts +1 -0
  245. package/dist/core/resource-loader-package-resources.d.ts.map +1 -1
  246. package/dist/core/resource-loader-package-resources.js +2 -1
  247. package/dist/core/resource-loader-package-resources.js.map +1 -1
  248. package/dist/core/resource-loader-reload.d.ts +1 -1
  249. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  250. package/dist/core/resource-loader-reload.js +3 -2
  251. package/dist/core/resource-loader-reload.js.map +1 -1
  252. package/dist/core/resource-loader-types.d.ts +2 -0
  253. package/dist/core/resource-loader-types.d.ts.map +1 -1
  254. package/dist/core/resource-loader-types.js.map +1 -1
  255. package/dist/core/resume/blueprint/actions.d.ts.map +1 -1
  256. package/dist/core/resume/blueprint/actions.js +15 -15
  257. package/dist/core/resume/blueprint/actions.js.map +1 -1
  258. package/dist/core/resume/blueprint/process.d.ts +6 -1
  259. package/dist/core/resume/blueprint/process.d.ts.map +1 -1
  260. package/dist/core/resume/blueprint/process.js +132 -21
  261. package/dist/core/resume/blueprint/process.js.map +1 -1
  262. package/dist/core/runtime-credentials.d.ts +5 -0
  263. package/dist/core/runtime-credentials.d.ts.map +1 -1
  264. package/dist/core/runtime-credentials.js +34 -0
  265. package/dist/core/runtime-credentials.js.map +1 -1
  266. package/dist/core/sdk-types.d.ts +2 -0
  267. package/dist/core/sdk-types.d.ts.map +1 -1
  268. package/dist/core/sdk-types.js.map +1 -1
  269. package/dist/core/sdk.d.ts +1 -1
  270. package/dist/core/sdk.d.ts.map +1 -1
  271. package/dist/core/sdk.js +187 -32
  272. package/dist/core/sdk.js.map +1 -1
  273. package/dist/core/session-account-model.d.ts +15 -0
  274. package/dist/core/session-account-model.d.ts.map +1 -0
  275. package/dist/core/session-account-model.js +105 -0
  276. package/dist/core/session-account-model.js.map +1 -0
  277. package/dist/core/session-lifecycle-scope.d.ts +5 -0
  278. package/dist/core/session-lifecycle-scope.d.ts.map +1 -1
  279. package/dist/core/session-lifecycle-scope.js.map +1 -1
  280. package/dist/core/session-manager-core.d.ts +21 -2
  281. package/dist/core/session-manager-core.d.ts.map +1 -1
  282. package/dist/core/session-manager-core.js +64 -8
  283. package/dist/core/session-manager-core.js.map +1 -1
  284. package/dist/core/session-manager-history.d.ts +3 -1
  285. package/dist/core/session-manager-history.d.ts.map +1 -1
  286. package/dist/core/session-manager-history.js +19 -5
  287. package/dist/core/session-manager-history.js.map +1 -1
  288. package/dist/core/session-manager-types.d.ts +2 -0
  289. package/dist/core/session-manager-types.d.ts.map +1 -1
  290. package/dist/core/session-manager-types.js.map +1 -1
  291. package/dist/core/session-retry-status.d.ts +22 -0
  292. package/dist/core/session-retry-status.d.ts.map +1 -0
  293. package/dist/core/session-retry-status.js +25 -0
  294. package/dist/core/session-retry-status.js.map +1 -0
  295. package/dist/core/session-worktree-snapshots.d.ts +4 -2
  296. package/dist/core/session-worktree-snapshots.d.ts.map +1 -1
  297. package/dist/core/session-worktree-snapshots.js +8 -4
  298. package/dist/core/session-worktree-snapshots.js.map +1 -1
  299. package/dist/core/settings-manager-core.d.ts +4 -0
  300. package/dist/core/settings-manager-core.d.ts.map +1 -1
  301. package/dist/core/settings-manager-core.js +73 -1
  302. package/dist/core/settings-manager-core.js.map +1 -1
  303. package/dist/core/settings-schema.js +1 -1
  304. package/dist/core/settings-schema.js.map +1 -1
  305. package/dist/core/slash-commands.d.ts +2 -2
  306. package/dist/core/slash-commands.d.ts.map +1 -1
  307. package/dist/core/slash-commands.js +15 -4
  308. package/dist/core/slash-commands.js.map +1 -1
  309. package/dist/core/storage/database.d.ts +14 -2
  310. package/dist/core/storage/database.d.ts.map +1 -1
  311. package/dist/core/storage/database.js.map +1 -1
  312. package/dist/core/storage/dialect.d.ts +13 -0
  313. package/dist/core/storage/dialect.d.ts.map +1 -1
  314. package/dist/core/storage/dialect.js +9 -1
  315. package/dist/core/storage/dialect.js.map +1 -1
  316. package/dist/core/storage/errors.d.ts +23 -1
  317. package/dist/core/storage/errors.d.ts.map +1 -1
  318. package/dist/core/storage/errors.js +28 -5
  319. package/dist/core/storage/errors.js.map +1 -1
  320. package/dist/core/storage/journal-transfer.d.ts.map +1 -1
  321. package/dist/core/storage/journal-transfer.js +90 -5
  322. package/dist/core/storage/journal-transfer.js.map +1 -1
  323. package/dist/core/storage/node-sqlite.d.ts.map +1 -1
  324. package/dist/core/storage/node-sqlite.js +61 -1
  325. package/dist/core/storage/node-sqlite.js.map +1 -1
  326. package/dist/core/storage/session/chunked-resume-projection.d.ts +4 -0
  327. package/dist/core/storage/session/chunked-resume-projection.d.ts.map +1 -0
  328. package/dist/core/storage/session/chunked-resume-projection.js +369 -0
  329. package/dist/core/storage/session/chunked-resume-projection.js.map +1 -0
  330. package/dist/core/storage/session/legacy-session-store.d.ts +5 -0
  331. package/dist/core/storage/session/legacy-session-store.d.ts.map +1 -1
  332. package/dist/core/storage/session/legacy-session-store.js +10 -2
  333. package/dist/core/storage/session/legacy-session-store.js.map +1 -1
  334. package/dist/core/storage/session/memory-session-store.d.ts.map +1 -1
  335. package/dist/core/storage/session/memory-session-store.js +6 -1
  336. package/dist/core/storage/session/memory-session-store.js.map +1 -1
  337. package/dist/core/storage/session/snapshot-generation.d.ts +8 -0
  338. package/dist/core/storage/session/snapshot-generation.d.ts.map +1 -0
  339. package/dist/core/storage/session/snapshot-generation.js +17 -0
  340. package/dist/core/storage/session/snapshot-generation.js.map +1 -0
  341. package/dist/core/storage/session/sql-session-store.d.ts +12 -0
  342. package/dist/core/storage/session/sql-session-store.d.ts.map +1 -1
  343. package/dist/core/storage/session/sql-session-store.js +243 -46
  344. package/dist/core/storage/session/sql-session-store.js.map +1 -1
  345. package/dist/core/storage/sqlite-facade.d.ts +17 -2
  346. package/dist/core/storage/sqlite-facade.d.ts.map +1 -1
  347. package/dist/core/storage/sqlite-facade.js +17 -1
  348. package/dist/core/storage/sqlite-facade.js.map +1 -1
  349. package/dist/core/tasks/agent-adapter.d.ts +13 -2
  350. package/dist/core/tasks/agent-adapter.d.ts.map +1 -1
  351. package/dist/core/tasks/agent-adapter.js +25 -8
  352. package/dist/core/tasks/agent-adapter.js.map +1 -1
  353. package/dist/core/tasks/agent-panel-rules.d.ts +77 -0
  354. package/dist/core/tasks/agent-panel-rules.d.ts.map +1 -0
  355. package/dist/core/tasks/agent-panel-rules.js +88 -0
  356. package/dist/core/tasks/agent-panel-rules.js.map +1 -0
  357. package/dist/core/tasks/agent-panel-source.d.ts +19 -0
  358. package/dist/core/tasks/agent-panel-source.d.ts.map +1 -1
  359. package/dist/core/tasks/agent-panel-source.js +50 -9
  360. package/dist/core/tasks/agent-panel-source.js.map +1 -1
  361. package/dist/core/tasks/command-output.d.ts +17 -2
  362. package/dist/core/tasks/command-output.d.ts.map +1 -1
  363. package/dist/core/tasks/command-output.js +59 -3
  364. package/dist/core/tasks/command-output.js.map +1 -1
  365. package/dist/core/tasks/completion-message.d.ts +8 -3
  366. package/dist/core/tasks/completion-message.d.ts.map +1 -1
  367. package/dist/core/tasks/completion-message.js +14 -10
  368. package/dist/core/tasks/completion-message.js.map +1 -1
  369. package/dist/core/tasks/completion.d.ts +14 -4
  370. package/dist/core/tasks/completion.d.ts.map +1 -1
  371. package/dist/core/tasks/completion.js +58 -17
  372. package/dist/core/tasks/completion.js.map +1 -1
  373. package/dist/core/tasks/contracts.d.ts +10 -1
  374. package/dist/core/tasks/contracts.d.ts.map +1 -1
  375. package/dist/core/tasks/contracts.js +3 -1
  376. package/dist/core/tasks/contracts.js.map +1 -1
  377. package/dist/core/tasks/heartbeat.js +2 -1
  378. package/dist/core/tasks/heartbeat.js.map +1 -1
  379. package/dist/core/tasks/live-elapsed.d.ts +16 -1
  380. package/dist/core/tasks/live-elapsed.d.ts.map +1 -1
  381. package/dist/core/tasks/live-elapsed.js +43 -4
  382. package/dist/core/tasks/live-elapsed.js.map +1 -1
  383. package/dist/core/tasks/owner-store.d.ts +8 -0
  384. package/dist/core/tasks/owner-store.d.ts.map +1 -1
  385. package/dist/core/tasks/owner-store.js +34 -4
  386. package/dist/core/tasks/owner-store.js.map +1 -1
  387. package/dist/core/tasks/session-scope.d.ts +7 -0
  388. package/dist/core/tasks/session-scope.d.ts.map +1 -1
  389. package/dist/core/tasks/session-scope.js +15 -9
  390. package/dist/core/tasks/session-scope.js.map +1 -1
  391. package/dist/core/tasks/supervisor.d.ts +7 -3
  392. package/dist/core/tasks/supervisor.d.ts.map +1 -1
  393. package/dist/core/tasks/supervisor.js +92 -17
  394. package/dist/core/tasks/supervisor.js.map +1 -1
  395. package/dist/core/tasks/task-archive-snapshot.d.ts +7 -0
  396. package/dist/core/tasks/task-archive-snapshot.d.ts.map +1 -0
  397. package/dist/core/tasks/task-archive-snapshot.js +33 -0
  398. package/dist/core/tasks/task-archive-snapshot.js.map +1 -0
  399. package/dist/core/tasks/task-resumer.d.ts +5 -3
  400. package/dist/core/tasks/task-resumer.d.ts.map +1 -1
  401. package/dist/core/tasks/task-resumer.js +37 -13
  402. package/dist/core/tasks/task-resumer.js.map +1 -1
  403. package/dist/core/tasks/task-view-source.d.ts +25 -3
  404. package/dist/core/tasks/task-view-source.d.ts.map +1 -1
  405. package/dist/core/tasks/task-view-source.js +144 -44
  406. package/dist/core/tasks/task-view-source.js.map +1 -1
  407. package/dist/core/tasks/transcript.d.ts +3 -1
  408. package/dist/core/tasks/transcript.d.ts.map +1 -1
  409. package/dist/core/tasks/transcript.js +27 -0
  410. package/dist/core/tasks/transcript.js.map +1 -1
  411. package/dist/core/tools/ask-user-question/view/dialog-builder.d.ts.map +1 -1
  412. package/dist/core/tools/ask-user-question/view/dialog-builder.js +2 -1
  413. package/dist/core/tools/ask-user-question/view/dialog-builder.js.map +1 -1
  414. package/dist/core/tools/bash.d.ts.map +1 -1
  415. package/dist/core/tools/bash.js +2 -1
  416. package/dist/core/tools/bash.js.map +1 -1
  417. package/dist/core/tools/history-protocol.d.ts.map +1 -1
  418. package/dist/core/tools/history-protocol.js +130 -29
  419. package/dist/core/tools/history-protocol.js.map +1 -1
  420. package/dist/core/tools/history-search-position.d.ts +30 -0
  421. package/dist/core/tools/history-search-position.d.ts.map +1 -0
  422. package/dist/core/tools/history-search-position.js +161 -0
  423. package/dist/core/tools/history-search-position.js.map +1 -0
  424. package/dist/core/tools/history-search-wire.d.ts +25 -0
  425. package/dist/core/tools/history-search-wire.d.ts.map +1 -0
  426. package/dist/core/tools/history-search-wire.js +210 -0
  427. package/dist/core/tools/history-search-wire.js.map +1 -0
  428. package/dist/core/tools/resource-selectors.d.ts +7 -1
  429. package/dist/core/tools/resource-selectors.d.ts.map +1 -1
  430. package/dist/core/tools/resource-selectors.js +18 -11
  431. package/dist/core/tools/resource-selectors.js.map +1 -1
  432. package/dist/core/tools/search.d.ts.map +1 -1
  433. package/dist/core/tools/search.js +24 -3
  434. package/dist/core/tools/search.js.map +1 -1
  435. package/dist/core/tools/sqlite-selector-connection.d.ts +3 -0
  436. package/dist/core/tools/sqlite-selector-connection.d.ts.map +1 -1
  437. package/dist/core/tools/sqlite-selector-connection.js +4 -0
  438. package/dist/core/tools/sqlite-selector-connection.js.map +1 -1
  439. package/dist/core/tools/tool-abort-grace.d.ts +13 -0
  440. package/dist/core/tools/tool-abort-grace.d.ts.map +1 -0
  441. package/dist/core/tools/tool-abort-grace.js +72 -0
  442. package/dist/core/tools/tool-abort-grace.js.map +1 -0
  443. package/dist/core/tools/tool-concurrency.d.ts +5 -1
  444. package/dist/core/tools/tool-concurrency.d.ts.map +1 -1
  445. package/dist/core/tools/tool-concurrency.js +36 -6
  446. package/dist/core/tools/tool-concurrency.js.map +1 -1
  447. package/dist/core/workflow-resume.d.ts +1 -1
  448. package/dist/core/workflow-resume.d.ts.map +1 -1
  449. package/dist/core/workflow-resume.js +13 -3
  450. package/dist/core/workflow-resume.js.map +1 -1
  451. package/dist/core/workflow-summary-lifecycle.d.ts.map +1 -1
  452. package/dist/core/workflow-summary-lifecycle.js +8 -2
  453. package/dist/core/workflow-summary-lifecycle.js.map +1 -1
  454. package/dist/core/workspace/errors.d.ts +5 -2
  455. package/dist/core/workspace/errors.d.ts.map +1 -1
  456. package/dist/core/workspace/errors.js +59 -5
  457. package/dist/core/workspace/errors.js.map +1 -1
  458. package/dist/core/worktree-snapshot/blob-store.d.ts +138 -17
  459. package/dist/core/worktree-snapshot/blob-store.d.ts.map +1 -1
  460. package/dist/core/worktree-snapshot/blob-store.js +788 -82
  461. package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
  462. package/dist/core/worktree-snapshot/garbage.d.ts +17 -2
  463. package/dist/core/worktree-snapshot/garbage.d.ts.map +1 -1
  464. package/dist/core/worktree-snapshot/garbage.js +20 -4
  465. package/dist/core/worktree-snapshot/garbage.js.map +1 -1
  466. package/dist/core/worktree-snapshot/index.d.ts +1 -1
  467. package/dist/core/worktree-snapshot/index.d.ts.map +1 -1
  468. package/dist/core/worktree-snapshot/index.js +1 -1
  469. package/dist/core/worktree-snapshot/index.js.map +1 -1
  470. package/dist/core/worktree-snapshot/pool.d.ts.map +1 -1
  471. package/dist/core/worktree-snapshot/pool.js +38 -6
  472. package/dist/core/worktree-snapshot/pool.js.map +1 -1
  473. package/dist/core/worktree-snapshot/shared-clock.d.ts +3 -1
  474. package/dist/core/worktree-snapshot/shared-clock.d.ts.map +1 -1
  475. package/dist/core/worktree-snapshot/shared-clock.js +116 -26
  476. package/dist/core/worktree-snapshot/shared-clock.js.map +1 -1
  477. package/dist/core/worktree-snapshot/types.d.ts +4 -1
  478. package/dist/core/worktree-snapshot/types.d.ts.map +1 -1
  479. package/dist/core/worktree-snapshot/types.js.map +1 -1
  480. package/dist/extensions/llama/huggingface-ui.d.ts.map +1 -1
  481. package/dist/extensions/llama/huggingface-ui.js +2 -2
  482. package/dist/extensions/llama/huggingface-ui.js.map +1 -1
  483. package/dist/extensions/llama/index.d.ts +2 -0
  484. package/dist/extensions/llama/index.d.ts.map +1 -1
  485. package/dist/extensions/llama/index.js +19 -2
  486. package/dist/extensions/llama/index.js.map +1 -1
  487. package/dist/index.d.ts +9 -6
  488. package/dist/index.d.ts.map +1 -1
  489. package/dist/index.js +8 -4
  490. package/dist/index.js.map +1 -1
  491. package/dist/main.d.ts.map +1 -1
  492. package/dist/main.js +74 -15
  493. package/dist/main.js.map +1 -1
  494. package/dist/modes/interactive/components/agent-panel.d.ts +22 -6
  495. package/dist/modes/interactive/components/agent-panel.d.ts.map +1 -1
  496. package/dist/modes/interactive/components/agent-panel.js +80 -23
  497. package/dist/modes/interactive/components/agent-panel.js.map +1 -1
  498. package/dist/modes/interactive/components/assistant-message.d.ts +2 -0
  499. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  500. package/dist/modes/interactive/components/assistant-message.js +11 -0
  501. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  502. package/dist/modes/interactive/components/atomic-working-status.d.ts.map +1 -1
  503. package/dist/modes/interactive/components/atomic-working-status.js +10 -3
  504. package/dist/modes/interactive/components/atomic-working-status.js.map +1 -1
  505. package/dist/modes/interactive/components/bash-execution.d.ts +3 -2
  506. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  507. package/dist/modes/interactive/components/bash-execution.js +7 -7
  508. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  509. package/dist/modes/interactive/components/branch-summary-message.d.ts +6 -0
  510. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  511. package/dist/modes/interactive/components/branch-summary-message.js +12 -7
  512. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  513. package/dist/modes/interactive/components/chat-message-renderer.d.ts +2 -0
  514. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  515. package/dist/modes/interactive/components/chat-message-renderer.js +24 -3
  516. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  517. package/dist/modes/interactive/components/chat-session-host-actions.d.ts +1 -1
  518. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  519. package/dist/modes/interactive/components/chat-session-host-actions.js +16 -10
  520. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  521. package/dist/modes/interactive/components/chat-session-host-events.d.ts +10 -0
  522. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  523. package/dist/modes/interactive/components/chat-session-host-events.js +76 -31
  524. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  525. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts +17 -5
  526. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  527. package/dist/modes/interactive/components/chat-session-host-rendering.js +79 -24
  528. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  529. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
  530. package/dist/modes/interactive/components/chat-session-host-runtime.js +5 -4
  531. package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
  532. package/dist/modes/interactive/components/chat-session-host-state.d.ts +16 -1
  533. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  534. package/dist/modes/interactive/components/chat-session-host-state.js +22 -0
  535. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  536. package/dist/modes/interactive/components/chat-session-host-types.d.ts +8 -2
  537. package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
  538. package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
  539. package/dist/modes/interactive/components/chat-session-host-utils.d.ts +1 -0
  540. package/dist/modes/interactive/components/chat-session-host-utils.d.ts.map +1 -1
  541. package/dist/modes/interactive/components/chat-session-host-utils.js +2 -1
  542. package/dist/modes/interactive/components/chat-session-host-utils.js.map +1 -1
  543. package/dist/modes/interactive/components/chat-session-host.d.ts +35 -9
  544. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  545. package/dist/modes/interactive/components/chat-session-host.js +129 -35
  546. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  547. package/dist/modes/interactive/components/chat-transcript.d.ts +13 -2
  548. package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
  549. package/dist/modes/interactive/components/chat-transcript.js +24 -4
  550. package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
  551. package/dist/modes/interactive/components/compaction-boundary-message.d.ts +6 -0
  552. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
  553. package/dist/modes/interactive/components/compaction-boundary-message.js +12 -7
  554. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  555. package/dist/modes/interactive/components/composer-rule.d.ts +0 -2
  556. package/dist/modes/interactive/components/composer-rule.d.ts.map +1 -1
  557. package/dist/modes/interactive/components/composer-rule.js +4 -6
  558. package/dist/modes/interactive/components/composer-rule.js.map +1 -1
  559. package/dist/modes/interactive/components/countdown-timer.d.ts +5 -9
  560. package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
  561. package/dist/modes/interactive/components/countdown-timer.js +32 -23
  562. package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
  563. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  564. package/dist/modes/interactive/components/custom-editor.js +4 -3
  565. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  566. package/dist/modes/interactive/components/custom-entry.d.ts +6 -0
  567. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  568. package/dist/modes/interactive/components/custom-entry.js +15 -0
  569. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  570. package/dist/modes/interactive/components/custom-message.d.ts +7 -3
  571. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  572. package/dist/modes/interactive/components/custom-message.js +17 -15
  573. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  574. package/dist/modes/interactive/components/footer.d.ts +10 -3
  575. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  576. package/dist/modes/interactive/components/footer.js +37 -45
  577. package/dist/modes/interactive/components/footer.js.map +1 -1
  578. package/dist/modes/interactive/components/heartbeat-block.d.ts.map +1 -1
  579. package/dist/modes/interactive/components/heartbeat-block.js +3 -1
  580. package/dist/modes/interactive/components/heartbeat-block.js.map +1 -1
  581. package/dist/modes/interactive/components/host-input-form.d.ts.map +1 -1
  582. package/dist/modes/interactive/components/host-input-form.js +3 -3
  583. package/dist/modes/interactive/components/host-input-form.js.map +1 -1
  584. package/dist/modes/interactive/components/index.d.ts +1 -1
  585. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  586. package/dist/modes/interactive/components/index.js.map +1 -1
  587. package/dist/modes/interactive/components/input-label.d.ts.map +1 -1
  588. package/dist/modes/interactive/components/input-label.js +4 -5
  589. package/dist/modes/interactive/components/input-label.js.map +1 -1
  590. package/dist/modes/interactive/components/keybinding-hints.d.ts +7 -0
  591. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  592. package/dist/modes/interactive/components/keybinding-hints.js +27 -6
  593. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  594. package/dist/modes/interactive/components/main-composer-keys.d.ts +17 -2
  595. package/dist/modes/interactive/components/main-composer-keys.d.ts.map +1 -1
  596. package/dist/modes/interactive/components/main-composer-keys.js +44 -27
  597. package/dist/modes/interactive/components/main-composer-keys.js.map +1 -1
  598. package/dist/modes/interactive/components/model-selector.d.ts +6 -1
  599. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  600. package/dist/modes/interactive/components/model-selector.js +13 -7
  601. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  602. package/dist/modes/interactive/components/nav-keys.d.ts +7 -2
  603. package/dist/modes/interactive/components/nav-keys.d.ts.map +1 -1
  604. package/dist/modes/interactive/components/nav-keys.js +51 -17
  605. package/dist/modes/interactive/components/nav-keys.js.map +1 -1
  606. package/dist/modes/interactive/components/notice-line.d.ts +8 -0
  607. package/dist/modes/interactive/components/notice-line.d.ts.map +1 -1
  608. package/dist/modes/interactive/components/notice-line.js +6 -1
  609. package/dist/modes/interactive/components/notice-line.js.map +1 -1
  610. package/dist/modes/interactive/components/selector.d.ts +3 -0
  611. package/dist/modes/interactive/components/selector.d.ts.map +1 -1
  612. package/dist/modes/interactive/components/selector.js +30 -7
  613. package/dist/modes/interactive/components/selector.js.map +1 -1
  614. package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
  615. package/dist/modes/interactive/components/session-selector-list.js +11 -11
  616. package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
  617. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  618. package/dist/modes/interactive/components/session-selector.js +2 -2
  619. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  620. package/dist/modes/interactive/components/settings-picker.d.ts +5 -0
  621. package/dist/modes/interactive/components/settings-picker.d.ts.map +1 -1
  622. package/dist/modes/interactive/components/settings-picker.js +36 -2
  623. package/dist/modes/interactive/components/settings-picker.js.map +1 -1
  624. package/dist/modes/interactive/components/settings-selector-submenus.d.ts +10 -0
  625. package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
  626. package/dist/modes/interactive/components/settings-selector-submenus.js +89 -19
  627. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  628. package/dist/modes/interactive/components/settings-selector-types.d.ts +6 -0
  629. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  630. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  631. package/dist/modes/interactive/components/settings-selector.d.ts +7 -0
  632. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  633. package/dist/modes/interactive/components/settings-selector.js +12 -0
  634. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  635. package/dist/modes/interactive/components/skill-invocation-message.d.ts +6 -0
  636. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  637. package/dist/modes/interactive/components/skill-invocation-message.js +12 -7
  638. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  639. package/dist/modes/interactive/components/task-board.d.ts.map +1 -1
  640. package/dist/modes/interactive/components/task-board.js +9 -2
  641. package/dist/modes/interactive/components/task-board.js.map +1 -1
  642. package/dist/modes/interactive/components/task-completion-message.d.ts +10 -3
  643. package/dist/modes/interactive/components/task-completion-message.d.ts.map +1 -1
  644. package/dist/modes/interactive/components/task-completion-message.js +173 -19
  645. package/dist/modes/interactive/components/task-completion-message.js.map +1 -1
  646. package/dist/modes/interactive/components/task-inspector.d.ts +1 -1
  647. package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -1
  648. package/dist/modes/interactive/components/task-inspector.js +28 -19
  649. package/dist/modes/interactive/components/task-inspector.js.map +1 -1
  650. package/dist/modes/interactive/components/task-list.d.ts +7 -3
  651. package/dist/modes/interactive/components/task-list.d.ts.map +1 -1
  652. package/dist/modes/interactive/components/task-list.js +60 -33
  653. package/dist/modes/interactive/components/task-list.js.map +1 -1
  654. package/dist/modes/interactive/components/task-row.d.ts +7 -0
  655. package/dist/modes/interactive/components/task-row.d.ts.map +1 -1
  656. package/dist/modes/interactive/components/task-row.js +25 -11
  657. package/dist/modes/interactive/components/task-row.js.map +1 -1
  658. package/dist/modes/interactive/components/task-transcript-notices.d.ts +16 -0
  659. package/dist/modes/interactive/components/task-transcript-notices.d.ts.map +1 -0
  660. package/dist/modes/interactive/components/task-transcript-notices.js +74 -0
  661. package/dist/modes/interactive/components/task-transcript-notices.js.map +1 -0
  662. package/dist/modes/interactive/components/task-transcript-page.d.ts +11 -6
  663. package/dist/modes/interactive/components/task-transcript-page.d.ts.map +1 -1
  664. package/dist/modes/interactive/components/task-transcript-page.js +48 -21
  665. package/dist/modes/interactive/components/task-transcript-page.js.map +1 -1
  666. package/dist/modes/interactive/components/tool-block-families.d.ts.map +1 -1
  667. package/dist/modes/interactive/components/tool-block-families.js +2 -1
  668. package/dist/modes/interactive/components/tool-block-families.js.map +1 -1
  669. package/dist/modes/interactive/components/tool-execution.d.ts +3 -2
  670. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  671. package/dist/modes/interactive/components/tool-execution.js +23 -9
  672. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  673. package/dist/modes/interactive/components/transcript-block-clicks.d.ts +54 -14
  674. package/dist/modes/interactive/components/transcript-block-clicks.d.ts.map +1 -1
  675. package/dist/modes/interactive/components/transcript-block-clicks.js +151 -16
  676. package/dist/modes/interactive/components/transcript-block-clicks.js.map +1 -1
  677. package/dist/modes/interactive/components/tree-selector-help.d.ts.map +1 -1
  678. package/dist/modes/interactive/components/tree-selector-help.js +25 -30
  679. package/dist/modes/interactive/components/tree-selector-help.js.map +1 -1
  680. package/dist/modes/interactive/components/tree-selector-list.d.ts +4 -0
  681. package/dist/modes/interactive/components/tree-selector-list.d.ts.map +1 -1
  682. package/dist/modes/interactive/components/tree-selector-list.js +21 -21
  683. package/dist/modes/interactive/components/tree-selector-list.js.map +1 -1
  684. package/dist/modes/interactive/components/working-run-meter.d.ts +31 -2
  685. package/dist/modes/interactive/components/working-run-meter.d.ts.map +1 -1
  686. package/dist/modes/interactive/components/working-run-meter.js +81 -10
  687. package/dist/modes/interactive/components/working-run-meter.js.map +1 -1
  688. package/dist/modes/interactive/interactive-agent-events.js +67 -14
  689. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  690. package/dist/modes/interactive/interactive-autocomplete.js +2 -2
  691. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  692. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  693. package/dist/modes/interactive/interactive-deferred-startup.js +10 -4
  694. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  695. package/dist/modes/interactive/interactive-editor-actions.js +4 -1
  696. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  697. package/dist/modes/interactive/interactive-extension-custom-ui.js +13 -3
  698. package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
  699. package/dist/modes/interactive/interactive-extension-runtime.js +4 -2
  700. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  701. package/dist/modes/interactive/interactive-extension-widgets.js +6 -8
  702. package/dist/modes/interactive/interactive-extension-widgets.js.map +1 -1
  703. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  704. package/dist/modes/interactive/interactive-input-handling.js +43 -3
  705. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  706. package/dist/modes/interactive/interactive-mode-base.d.ts +7 -0
  707. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  708. package/dist/modes/interactive/interactive-mode-base.js +9 -2
  709. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  710. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
  711. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  712. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  713. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  714. package/dist/modes/interactive/interactive-mode-helpers.d.ts +5 -0
  715. package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
  716. package/dist/modes/interactive/interactive-mode-helpers.js +9 -0
  717. package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
  718. package/dist/modes/interactive/interactive-mode-surface.d.ts +10 -2
  719. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  720. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  721. package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
  722. package/dist/modes/interactive/interactive-model-routing.js +63 -21
  723. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  724. package/dist/modes/interactive/interactive-prompt-turn.js +1 -1
  725. package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -1
  726. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  727. package/dist/modes/interactive/interactive-render-chat.js +71 -10
  728. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  729. package/dist/modes/interactive/interactive-resource-rendering.js +9 -18
  730. package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
  731. package/dist/modes/interactive/interactive-selectors.js +106 -57
  732. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  733. package/dist/modes/interactive/interactive-session-routing.js +10 -5
  734. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  735. package/dist/modes/interactive/interactive-session-runtime.d.ts +3 -0
  736. package/dist/modes/interactive/interactive-session-runtime.d.ts.map +1 -1
  737. package/dist/modes/interactive/interactive-session-runtime.js +11 -0
  738. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  739. package/dist/modes/interactive/interactive-slash-commands.js +3 -0
  740. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  741. package/dist/modes/interactive/interactive-startup-chat-container.d.ts +5 -1
  742. package/dist/modes/interactive/interactive-startup-chat-container.d.ts.map +1 -1
  743. package/dist/modes/interactive/interactive-startup-chat-container.js +8 -3
  744. package/dist/modes/interactive/interactive-startup-chat-container.js.map +1 -1
  745. package/dist/modes/interactive/interactive-startup-trust.d.ts +2 -0
  746. package/dist/modes/interactive/interactive-startup-trust.d.ts.map +1 -1
  747. package/dist/modes/interactive/interactive-startup-trust.js +21 -0
  748. package/dist/modes/interactive/interactive-startup-trust.js.map +1 -1
  749. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  750. package/dist/modes/interactive/interactive-startup.js +39 -17
  751. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  752. package/dist/modes/interactive/interactive-task-projection.d.ts.map +1 -1
  753. package/dist/modes/interactive/interactive-task-projection.js +11 -1
  754. package/dist/modes/interactive/interactive-task-projection.js.map +1 -1
  755. package/dist/modes/interactive/resume-catalog.d.ts.map +1 -1
  756. package/dist/modes/interactive/resume-catalog.js +1 -0
  757. package/dist/modes/interactive/resume-catalog.js.map +1 -1
  758. package/dist/modes/interactive/theme/theme-controller.d.ts +6 -1
  759. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  760. package/dist/modes/interactive/theme/theme-controller.js +19 -1
  761. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  762. package/dist/modes/interactive-engine/engine-child-liveness.d.ts +2 -0
  763. package/dist/modes/interactive-engine/engine-child-liveness.d.ts.map +1 -1
  764. package/dist/modes/interactive-engine/engine-child-liveness.js +2 -0
  765. package/dist/modes/interactive-engine/engine-child-liveness.js.map +1 -1
  766. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  767. package/dist/modes/interactive-engine/engine-custom-ui.js +54 -4
  768. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  769. package/dist/modes/interactive-engine/engine-render-service.d.ts.map +1 -1
  770. package/dist/modes/interactive-engine/engine-render-service.js +21 -2
  771. package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
  772. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +4 -2
  773. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
  774. package/dist/modes/interactive-engine/extension-ui-bridge.js +4 -0
  775. package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
  776. package/dist/modes/interactive-engine/isolated-runtime.d.ts +39 -3
  777. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  778. package/dist/modes/interactive-engine/isolated-runtime.js +219 -29
  779. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  780. package/dist/modes/interactive-engine/protocol.d.ts +33 -1
  781. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  782. package/dist/modes/interactive-engine/protocol.js +40 -2
  783. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  784. package/dist/modes/interactive-engine/remote-command-catalog.d.ts +2 -2
  785. package/dist/modes/interactive-engine/remote-command-catalog.d.ts.map +1 -1
  786. package/dist/modes/interactive-engine/remote-command-catalog.js +7 -3
  787. package/dist/modes/interactive-engine/remote-command-catalog.js.map +1 -1
  788. package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
  789. package/dist/modes/interactive-engine/remote-component.js +31 -5
  790. package/dist/modes/interactive-engine/remote-component.js.map +1 -1
  791. package/dist/modes/interactive-engine/remote-renderer.d.ts +20 -12
  792. package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -1
  793. package/dist/modes/interactive-engine/remote-renderer.js +100 -34
  794. package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
  795. package/dist/modes/print-mode.d.ts.map +1 -1
  796. package/dist/modes/print-mode.js +4 -1
  797. package/dist/modes/print-mode.js.map +1 -1
  798. package/dist/modes/rpc/agent-panel-bridge.d.ts +7 -0
  799. package/dist/modes/rpc/agent-panel-bridge.d.ts.map +1 -1
  800. package/dist/modes/rpc/agent-panel-bridge.js +119 -114
  801. package/dist/modes/rpc/agent-panel-bridge.js.map +1 -1
  802. package/dist/modes/rpc/rpc-client-process.d.ts +2 -1
  803. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  804. package/dist/modes/rpc/rpc-client-process.js +2 -1
  805. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  806. package/dist/modes/rpc/rpc-client.d.ts +8 -0
  807. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  808. package/dist/modes/rpc/rpc-client.js +5 -1
  809. package/dist/modes/rpc/rpc-client.js.map +1 -1
  810. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  811. package/dist/modes/rpc/rpc-command-handler.js +19 -2
  812. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  813. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  814. package/dist/modes/rpc/rpc-mode.js +4 -2
  815. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  816. package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
  817. package/dist/modes/rpc/rpc-session-binding.js +7 -0
  818. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  819. package/dist/modes/rpc/rpc-types.d.ts +13 -1
  820. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  821. package/dist/modes/rpc/rpc-types.js.map +1 -1
  822. package/dist/utils/interactive-engine-bootstrap.d.ts +3 -0
  823. package/dist/utils/interactive-engine-bootstrap.d.ts.map +1 -1
  824. package/dist/utils/interactive-engine-bootstrap.js +25 -0
  825. package/dist/utils/interactive-engine-bootstrap.js.map +1 -1
  826. package/dist/utils/interactive-engine-env.d.ts +3 -0
  827. package/dist/utils/interactive-engine-env.d.ts.map +1 -1
  828. package/dist/utils/interactive-engine-env.js +1 -0
  829. package/dist/utils/interactive-engine-env.js.map +1 -1
  830. package/dist/utils/shell.d.ts +2 -0
  831. package/dist/utils/shell.d.ts.map +1 -1
  832. package/dist/utils/shell.js +3 -3
  833. package/dist/utils/shell.js.map +1 -1
  834. package/docs/background-tasks.md +32 -37
  835. package/docs/compaction.md +2 -2
  836. package/docs/computer-use.md +2 -0
  837. package/docs/development.md +11 -1
  838. package/docs/environment-variables.md +2 -0
  839. package/docs/extensions/api-reference.md +7 -3
  840. package/docs/extensions/authoring.md +3 -1
  841. package/docs/extensions/events.md +3 -1
  842. package/docs/extensions/ui.md +2 -0
  843. package/docs/guides/resume-on-any-machine.md +3 -1
  844. package/docs/intercom/reference.md +1 -1
  845. package/docs/intercom.md +3 -3
  846. package/docs/keybindings.md +6 -2
  847. package/docs/libraries/tui.md +4 -0
  848. package/docs/providers.md +1 -1
  849. package/docs/rpc/protocol.md +6 -4
  850. package/docs/sdk/reference.md +10 -4
  851. package/docs/sdk.md +5 -2
  852. package/docs/security.md +5 -1
  853. package/docs/session-format.md +1 -1
  854. package/docs/sessions.md +16 -0
  855. package/docs/settings.md +2 -2
  856. package/docs/skills.md +3 -3
  857. package/docs/storage.md +25 -4
  858. package/docs/subagents.md +42 -45
  859. package/docs/tui.md +1 -1
  860. package/docs/usage.md +3 -1
  861. package/docs/workflows/api-reference.md +3 -1
  862. package/docs/workflows/authoring.md +1 -1
  863. package/docs/workflows/operations.md +21 -14
  864. package/docs/workflows.md +1 -1
  865. package/docs/worktree-snapshots.md +10 -8
  866. package/npm-shrinkwrap.json +71 -49
  867. package/package.json +9 -8
  868. package/schemas/settings.schema.json +1 -1
@@ -45,14 +45,14 @@ Each of the session's top-level workflow runs has a row in the [agent panel](/ba
45
45
  ✗ deploy stage build failed failed · 41m
46
46
  ```
47
47
 
48
- The row shows the run's state, stage progress, elapsed time and available token totals. A waiting question or a failure's reason replaces the progress display. Narrow terminals omit the stage bar and tokens before shortening the task text. Press ↓ on an empty prompt, select the run and press Enter to open its graph. A finished run's row stays until you have opened the run, from the panel, `/tasks`, F2 or `/workflows`. `x` pressed twice stops a run gracefully; it stays resumable.
48
+ The row shows the run's state, stage progress, elapsed time and available token totals. A waiting question or a failure's reason replaces the progress display. Narrow terminals omit the stage bar and tokens before shortening the task text. Press ↓ on an empty prompt, select the run and press Enter to open its graph. A finished run's row stays until you have opened the run, from the panel, `/tasks`, F2 or `/workflows`. A paused run, or one blocked on a failed stage, is listed like a paused subagent: its row stays while another subagent, workflow run or background shell runs, and leaves once nothing does, until you resume the run. `x` pressed twice stops a run gracefully; it stays resumable.
49
49
 
50
50
  Stage progress includes nested child workflows and updates as stages appear:
51
51
 
52
52
  - The numerator counts completed, failed, and skipped stages.
53
53
  - The denominator counts currently materialized stages, not future work.
54
54
  - Expanded children replace their workflow boundary; neither the boundary nor durable tool nodes add to the stage count.
55
- - Failed, skipped, missing, or invalid child expansions retain their boundary summary.
55
+ - If a child started, its stages and tools remain inspectable in the parent graph even when its boundary fails or is skipped. This includes nested work on local workers and separate worker hosts. A stage ID listed for the boundary itself still selects the boundary for inspection and control. If the child never started, has no nodes, or an older record cannot identify it, the graph shows the boundary summary instead.
56
56
 
57
57
  `single`/`chain` uses the same count.
58
58
 
@@ -166,23 +166,24 @@ Neither command takes flags; confirmations happen inline.
166
166
 
167
167
  Surface behavior:
168
168
 
169
- - **Graph vs. stage chat** - `/workflows` opens the graph (or ↓ to the run in the agent panel), and `/workflows <run-id> <stage>` opens a stage's chat directly. In the graph, press Enter on a stage to open its chat. On a failed stage, Enter opens its failure detail; press `t` there for its chat.
170
- - **Run state** - The graph header puts the run's state before its stage counts and colors the ORCHESTRATOR pill to match: `↑ blocked`, followed by the exit reason when the workflow gave one and shortened to fit; `❚❚ paused`; or `○ quit`. A running run shows no state, including one you resumed. `↑ N` counts blocked stages. The stage switcher (`/`), the workflow tool's `status` action, and the `/workflows` list show the same state.
169
+ - **Graph vs. stage chat** - `/workflows` opens the graph (or ↓ to the run in the agent panel), and `/workflows <run-id> <stage>` opens a stage's chat directly. In the graph, press Enter on a stage to open its chat. If a provider request failed and is being retried, reopening keeps the error in the transcript. The token arrow stays `↑` until the retry starts receiving a reply (`↓`). A chat that stayed open counts the failed reply it saw; a reopened chat starts its count from the request context, which omits that failed attempt. On a failed stage, Enter opens its failure detail; press `t` there for its chat.
170
+ - **Live stage borders** - A running stage pulses in the theme’s warning colour (usually yellow); a stage waiting for input pulses in its info colour. Focus a stage to hold its border at full brightness. With colour off, read the status inside the card.
171
+ - **Run state** - The graph header puts the run's state before its stage counts and colors the ORCHESTRATOR pill to match: `↑ blocked`, followed by the exit reason when the workflow gave one and shortened to fit; `❚❚ paused`; or `○ quit`. A running run shows no state, including one you resumed. `↑ N` counts blocked stages, and `◌ N` the stages [suspended](#suspended-stages) with their session released. The stage switcher (`/`), the workflow tool's `status` action, and the `/workflows` list show the same state.
171
172
  - **Going back** - In an attached stage chat, `←` on an empty prompt (or at the start of a typed prompt, preserving the draft) returns to the graph. On a pending question (`ask_user_question` or a choice, yes/no or input prompt), `←` or `Backspace` (at the start of an input) returns to the graph and leaves the question pending; `↑↓` moves between answers on a choice or yes/no prompt. On a choice or yes/no prompt card, `esc` closes the card back to the stage's `Answer <stage>…` composer without leaving; Enter on the empty composer reopens the card, and typing text and pressing Enter answers the pending question. On an `ask_user_question` dialog, `esc` cancels the question. When a stage dialog is stacked over a mounted custom component, `esc` cancels that dialog and returns to the component. The graph has no prompt: `esc` goes back one level (it closes a stage's failure detail, a tool detail or the `?` overlay first), and at the top it returns to where you opened the graph from, such as main chat or the `/workflows` list. `←` only moves to a previous sibling. It does nothing at the leftmost node or inside a detail; only Esc goes back. A custom question widget owns every key; `ctrl+c` closes the workflow view from it. `ctrl+x` does not navigate. See [Keybindings](/keybindings#navigation).
172
- - **Graph keys** - The hint line under the graph lists exactly the keys that work on the focused node, in this order: `esc back · ↵ open stage chat · ↑↓←→ move · x stop stage · p pause run · q quit run · / stages · f filter: all · ? keys · h hide`. `?` lists them all. Enter opens a running, waiting or completed stage's chat (the hint reads `↵ open stage chat`) and a failed stage's failure detail (`↵ open failure detail`). `x` then `x` again within 3 seconds stops the focused running stage so it can be resumed from its stage chat. `p` pauses the run while it runs; while the run is paused or blocked, `r resume run` takes its place. `q` then `q` again within 3 seconds quits the run gracefully, keeping it resumable; after the first press the hint reads `q again to quit <name>`. On a completed or failed stage, `d` opens its detail. `/` finds a stage, and `f` cycles a status filter (all, running, stopped, completed, failed) that dims the nodes it doesn't match without moving anything. A stopped stage or run shows `◼` in a muted colour; a failed one shows a red `✗`. The workflow tool's `status` header counts killed and cancelled runs under `◼`, and failed runs under `✗`.
173
+ - **Graph keys** - The hint line under the graph lists exactly the keys that work on the focused node, in this order: `esc back · ↵ open stage chat · ↑↓←→ move · x stop stage · p pause run · q quit run · / stages · f filter: all · ? keys · h hide`. `?` lists them all. Enter opens a running, waiting or completed stage's chat (the hint reads `↵ open stage chat`) and a failed stage's failure detail (`↵ open failure detail`). `x` then `x` again within 3 seconds stops the focused running stage so it can be resumed from its stage chat. `p` pauses the run while it runs; while the run is paused or blocked, `r resume run` takes its place. `q` then `q` again within 3 seconds quits the run gracefully, keeping it resumable; after the first press the hint reads `q again to quit <name>`. On a completed or failed stage, `d` opens its detail. `/` finds a stage, and `f` cycles a status filter (all, running, stopped, completed, failed) that dims the nodes it doesn't match without moving anything. A stopped stage or run shows `◼` in a muted colour; a failed one shows a red `✗`. A suspended stage shows `◌` in its node card, the stage switcher and the stage strip, the same mark as a [released subagent](/subagents#released-subagents) in the chat, `/tasks` and the agent panel. The mark is dim except on a selected row, where it uses the selection colours. A paused stage shows `❚❚`. The workflow tool's `status` header counts killed and cancelled runs under `◼`, and failed runs under `✗`.
173
174
  - **Stage details** - A failed stage's detail shows the stage, elapsed time and a short reason, with `r retry from stage · f fork from stage · t transcript · l logs · esc back`. `r` retries in place, keeping completed work, keeps focus on the same stage and reports another failure. A completed stage's detail reads `✓ <name> · completed in <time> · <tokens>`, with `f fork from stage · t transcript · l logs · esc back`. `f` asks `New run from <stage>? enter confirm · esc cancel` (naming completed tool steps that will run again and warning if the source run must first stop resumably) and then starts and opens a new run from that stage; the source run is unchanged. `t` opens the transcript; `l` toggles the error log, including error codes, hints and causes. Long reasons and logs are truncated.
174
- - **Stage input label** - An attached stage chat has heavy accent composer rules naming the stage and its state or elapsed time (`stage · <name> · <state/time>`), and its empty prompt reads `Message <stage>…` (`Answer <stage>…` while the stage waits on a question). A subagent's chat opened from `/tasks` or the agent panel uses `<name> · <task> · <state/time>`, with `Message <name>…` or `Answer <name>…`. Awaiting-input prompt cards and mounted questions also identify their owning stage (`[stage: name]`). Long labels truncate with `…`.
175
+ - **Stage input label** - An attached stage chat has accent-coloured composer rules naming the stage and its state or elapsed time (`stage · <name> · <state/time>`), and its empty prompt reads `Message <stage>…` (`Answer <stage>…` while the stage waits on a question). A subagent's chat opened from `/tasks` or the agent panel uses `<name> · <task> · <state/time>`, with `Message <name>…` or `Answer <name>…`. Awaiting-input prompt cards and mounted questions also identify their owning stage (`[stage: name]`). Long labels truncate with `…`.
175
176
  - **Draft preservation** - Leaving a stage or opening another run preserves unsent composer and prompt drafts and keeps pending custom questions unresolved so they reappear when you attach again.
176
177
  - **Queued-message survival** - Detaching preserves queued steering and follow-up text. Reattach to see the pending messages; the graph shows their count as `✉ N queued`. Queues also survive model fallback and eligible post-mortem reopening. Custom session adapters must publish `queue_update` snapshots and expose pre-attachment queues as described in [authoring](/workflows/authoring#stage-follow-on-user-messages).
177
178
  - **Reserved keys** - `ctrl+d` does not navigate workflow surfaces and keeps its ordinary editor or prompt behavior where applicable; `q` quits a run only in the graph and remains printable in text-owning prompts. In a stage chat with a prompt, `esc` only interrupts a running stage; in the graph it closes the stage switcher, a detail or the `?` overlay, then goes back to where the graph was opened from. `ctrl+c` closes the workflow view. In the graph, `h` hides it and returns to the view that opened it.
178
179
  - **Wheel and trackpad** - While the workflow graph is active, vertical wheel/trackpad gestures pan it up and down, and horizontal gestures pan wide graphs left and right when the terminal exposes horizontal wheel events. Focused graph and stage-chat overlays receive those gestures through the fullscreen application route, so scrolling stays inside the active workflow surface instead of falling through to terminal or main-chat scrollback.
179
180
  - **Stage chat scrolling** - An attached stage chat scrolls like the main transcript: the wheel follows `fullscreenWheelScrollLines`, Alt+wheel scrolls five times as far, `fullscreenScrollbar` controls its scrollbar, `ctrl+home` and `ctrl+end` jump to the top and the latest message, `ctrl+up` and `ctrl+down` jump between prompts, and the half-page bindings work once you bind them. Scrolled up, its last row shows **↓ jump to bottom**, or **↓ N new messages** once new output arrives. A `/tasks` transcript opened from a stage chat behaves the same way and follows the stage's Ctrl+T and Ctrl+O. See [Keybindings](/keybindings#tui-fullscreen-viewport).
180
- - **Selection and copying** - Graph panning, stage scrolling, click-to-attach, and drag or multi-click selection work without a separate selection mode. Copy uses OSC 52; if the terminal blocks it, use its Shift/Option modifier-drag bypass. `ctrl+t` retains the host thinking toggle, not a workflow action.
181
+ - **Selection and copying** - Graph panning, stage scrolling, click-to-attach, and drag or multi-click selection work without a separate selection mode. A click on a key in the graph's hint line, a stage chat's hint row or the stage switcher presses that key. Copy uses OSC 52; if the terminal blocks it, use its Shift/Option modifier-drag bypass. `ctrl+t` retains the host thinking toggle, not a workflow action.
181
182
  - **Tool and node detail** - Attached stage chats match main chat's tool-detail expansion behavior while keeping expansion state local to the workflow UI context. Press Ctrl+O (the configurable `app.tools.expand` binding) to expand every visible workflow node and tool card, including single, parallel, and nested subagent progress, current tool activity, and artifact paths; press it again to collapse them. The toggle works for active, completed, and archived stage views, including at the supported 40-column terminal minimum. A mounted prompt, custom question, or other input-owning overlay keeps the key instead of changing it.
182
183
  - **Footer context** - An attached live stage chat shows its own current folder and Git branch and shows the live extension status lines that the stage's own session sets, such as the MCP server indicator, never the main chat's. Branch changes trigger a repaint through the host's cached footer provider. As in the main chat, the line with the stage's model, reasoning level, folder and branch shows only while the stage's agent is idle. While it works, the model line is hidden and the separate hint line lists its live keys, including the interrupt key. The compact `/tasks` sheet keeps the conversation visible; detail, transcript and input pages remain fullscreen.
183
184
  - **Working indicator** - Stage chat shows `∀` during accepted prompt startup and active work, including retained-session follow-ups. Retry, fallback, compaction, cancellation, and errors take precedence. `NO_COLOR` removes foreground colors; `ATOMIC_REDUCED_MOTION=1` makes the indicator static.
184
185
  - **Background progress** - The agent panel below the main prompt shows background subagents, shells and workflow runs. Close the graph to return to it; `/tasks` also lists the session's background work.
185
- - **Run control** - Use `pause` and `resume` for resumable live work. Pause holds a stage's queued steering and follow-up items in place without dequeuing them or starting continuation; `resume` releases those items once in their existing per-queue order, but queue release alone does not start a model turn. `resume` on a non-paused run reopens the saved snapshot or overlay. Use `quit` to pause a live run gracefully while preserving it for a later resume. In a run's graph, `p` pauses the run, `r` resumes a paused or blocked run, and `q` twice quits it. The workflow tool's `stageId` pauses or resumes one stage and also targets tool nodes.
186
+ - **Run control** - Use `pause` and `resume` for resumable live work. Pause holds a stage's queued steering and follow-up items in place without dequeuing them or starting continuation; `resume` releases those items once in their existing per-queue order, but queue release alone does not start a model turn. `resume` on a non-paused run reopens the saved snapshot or overlay. Use `quit` to pause a live run gracefully while preserving it for a later resume. In a run's graph, `p` pauses the run, `r` continues paused, resumably blocked and recoverably failed runs (including an explicit failed exit with `resumable: true`), and `q` twice quits it. The workflow tool's `stageId` pauses or resumes one stage and also targets tool nodes.
186
187
  - **Rediscovery** - Use `/reload` after adding, editing, installing, or removing workflow resources or package manifest workflow entries and you want Atomic to rediscover them in-process ([Reloading workflow resources](/workflows/operations#reloading-workflow-resources)).
187
188
  - **Status listing** - `/workflows` and the workflow tool's `status` action list all retained active and terminal top-level runs; implementation-owned nested child runs are flattened into their parent workflow rather than listed separately.
188
189
  - **Status times** - The workflow tool's run detail displays `started` and `ended` in the system local timezone as `HH:mm:ss`. If they differ from your expected clock, check the timezone of the machine or container running Atomic and any inherited `TZ` environment setting. Elapsed durations and raw timestamps in structured results are unchanged.
@@ -271,9 +272,9 @@ Control behavior:
271
272
  - `stage` returns details and the persisted `sessionFile` for an exact stage ID/name or a unique bare UUID prefix, including nested child stages in the expanded graph. Partial names do not resolve. Ambiguous names or UUID prefixes report collisions.
272
273
  - Local and retained/durable `stages` listings use the same expanded graph as `stage` and `transcript`: pass the listed ID back unchanged with that listing's `runId`. Valid nested boundaries are replaced by their descendants; missing, empty, or invalid children retain an inspectable boundary summary. Detail/transcript results identify the actual owning run and local stage ID.
273
274
  - Intercom's slash-separated `target` is a messaging address, not a `workflow` `stageId`. An Intercom stage row also includes its owning `runId` and local `stageId`; pass that pair to `stage` or `transcript`, or use the expanded ID from `workflow stages` with the root run ID.
274
- - `transcript` is reference-first with a small preview by default: it returns metadata, transcript paths, and up to 5 recent entries. For targeted lookup, quote the exact `sessionFile`/`transcriptPath` value without changing platform separators (preserve Windows backslashes), search it with `rg` or `grep`, then read only small surrounding ranges. Text results include JSON-escaped `sessionFileJson`/`transcriptPathJson` lines for copy-safe path literals. Pass explicit `tail` or `limit` to override the 5-entry preview; `tail` overrides `limit`; `includeToolOutput` includes captured snapshot tool output in snapshot transcript results.
275
+ - `transcript` returns the transcript path without inlining rows when a path exists. For a live stage, a path-only result or a zero-entry preview counts resident messages without reading saved entries. A nonempty preview counts the transcript rows, including any restored provider errors. Without a path, the default preview includes up to 5 recent entries. For targeted lookup, quote the exact `sessionFile`/`transcriptPath` value without changing platform separators (preserve Windows backslashes), search it with `rg` or `grep`, then read only small surrounding ranges. Text results include JSON-escaped `sessionFileJson`/`transcriptPathJson` lines for copy-safe path literals. Pass explicit `tail` or `limit` to request a preview; `tail` overrides `limit`; `includeToolOutput` includes captured snapshot tool output in snapshot transcript results.
275
276
  - `answer` responds only to a pending primitive or structured human-input prompt. It accepts `promptId` plus `response`, `text`, or `message`, preserves prompt-kind validation, and never sends stage chat, steers, resumes, or starts a model turn.
276
- - Send free-form updates through ordinary Intercom to `workflow:<rootRunId>/<segment>[/<segment>...]`; `*` matches one segment and `**` any depth. Use `intercom list` inside the invocation group to see live, pending, and possible future targets. Atomic delivers immediately to live stages and queues matching future stages, delivering them before their first model turn. `workflow:<rootRunId>/**` remains sticky for every future descendant until root termination; narrower name and pattern sends reach every future match. Valid paths outside the known set still queue, with no warning, and settle undeliverable at terminal only if never delivered. Use `ask` once the target has a reply-capable live session. Use the workflow tool's `resume` action only for paused workflow control. While an interrupted run waits to be resumed, the background subagents its stages launched are addressable as well: sends to them wait in the broker, not in the run's journal, and are delivered once after the resumed stage restores the subagent. If another session resumes the run, senders waiting for a subagent are told so and should send again there. If the run ends before the stage restores a subagent, the held sends return `Session not found`.
277
+ - Send free-form updates through ordinary Intercom to `workflow:<rootRunId>/<segment>[/<segment>...]`; `*` matches one segment and `**` any depth. Use `intercom list` inside the invocation group to see live, pending, and possible future targets. Atomic delivers immediately to live stages and queues matching future stages, delivering them before their first model turn. `workflow:<rootRunId>/**` remains sticky for every future descendant until root termination; narrower name and pattern sends reach every future match. Valid paths outside the known set still queue, with no warning, and settle undeliverable at terminal only if never delivered. Use `ask` once the target has a reply-capable live session. Use the workflow tool's `resume` action only for paused workflow control. While an interrupted run waits to be resumed, the background subagents its stages launched are addressable as well: sends to them wait in the broker, not in the run's journal, and are delivered once after the resumed stage restores the subagent. If another session resumes the run, senders waiting for a subagent are told so and should send again there. If the run ends before the stage restores a subagent, the held sends return `Session not found`. A session keeps these targets for the 32 workflow invocations it finished most recently, so a message to a stage of one of them still gets that run's own answer. An older finished invocation's targets no longer resolve, and its stages are reached from `/workflows`. An invocation that runs again gets its targets back and counts from its latest finish; a refused resume does not change its place. Deleting the invocation from its journal removes its targets. If an older Intercom broker reports that it retires routes only when their connection closes, run `atomic intercom restart` before transferring a nested run to another host.
277
278
  - `pause` and `quit` can target one top-level run or `all: true`; `stageId` cannot be combined with `all: true`. Stage-scoped `pause` controls can target a visible nested child stage from the expanded graph. Atomic routes stage controls to the owning nested run internally.
278
279
  - `pause` and `quit` can also name one in-flight `ctx.tool` node with `stageId`, by expanded node id, local `tool:<argsHash>` id, or tool name. Both mean the same thing for a tool: abort that single call now. Tool nodes stay non-attachable — this is an abort control, not a chat target. Identifiers resolve exactly first and then uniquely; a name shared by two tool nodes (or by a stage and a tool) returns the same ambiguity diagnostic stages get, listing each match as `<name> (tool)`.
279
280
  - Aborting one tool node leaves every sibling stage and sibling tool node running and does not pause the run. The node becomes `cancelled`, writes no replayable checkpoint, and re-runs on a later resume. Whether the run itself survives is ordinary author control flow: an awaited `ctx.tool` that is aborted rejects, exactly as it would for any other failure, unless the workflow catches it. A node that has already settled reports that it is not running rather than silently succeeding.
@@ -295,7 +296,7 @@ Use `/workflows <run-id>` to open the interactive graph, then select a stage to
295
296
 
296
297
  ### Suspended stages
297
298
 
298
- A stage whose model called a long-running tool that supports it (a CI wait, a deployment, a `bash` or `powershell` `wait` on a background task without `budgetMs`, or `ask_user_question`) does not keep its session while it waits. Once the call has run longer than the stage's `releaseWhenWaiting` threshold (60 seconds by default), Atomic saves the stage's conversation and its pending call, closes the session, and frees the stage's slot for other stages. `status` and `stages` show the stage as `suspended` and say what it waits on (`suspended (tool: wait_ci)` for the tool calls, `suspended (between turns)` after `stage.release()` or for a stage the workflow holds unused), and the JSON `stages` result carries its `wait`; a stage waiting for a human answer reads `awaiting_input (released)`. In the stage's chat, the call it waits on shows as pending, not as interrupted, and shows its result once the stage reopens. A stage still released when its run ends leaves `suspended`; `statusFilter: "suspended"` lists the runs that have such a stage. When the results arrive, Atomic reopens the same session from the session store and the stage continues the same turn. Short calls, and tools that do not support it, run inline as before.
299
+ A stage whose model called a long-running tool that supports it (a CI wait, a deployment, a `bash` or `powershell` `wait` on a background task without `budgetMs`, or `ask_user_question`) does not keep its session while it waits. Once the call has run longer than the stage's `releaseWhenWaiting` threshold (60 seconds by default), Atomic saves the stage's conversation and its pending call, closes the session, and frees the stage's slot for other stages. `status` and `stages` show the stage as `suspended` and say what it waits on (`suspended (tool: wait_ci)` for the tool calls, `suspended (between turns)` after `stage.release()` or for a stage the workflow holds unused), and the JSON `stages` result carries its `wait`; a stage waiting for a human answer reads `awaiting_input (released)`. The workflow's card in the chat, expanded, marks a suspended stage with the dim `◌` waiting mark a [released subagent](/subagents#released-subagents) has, and a paused stage with `⏸`. In the stage's chat, the call it waits on shows as pending, not as interrupted, and shows its result once the stage reopens. A stage still released when its run ends leaves `suspended`; `statusFilter: "suspended"` lists the runs that have such a stage. When the results arrive, Atomic reopens the same session from the session store and the stage continues the same turn. Short calls, and tools that do not support it, run inline as before.
299
300
 
300
301
  A stage waiting on its model's `ask_user_question` also stays `awaiting_input`; answer it in the stage's chat as usual. The same threshold releases a stage whose readiness question waits on you (the stage stays `awaiting_input` and reopens with your answer), and a finished stage the workflow keeps without using it, for example while it waits for a child workflow (the stage is `suspended` until it is messaged or rehydrated). See [`releaseWhenWaiting`](/workflows/api-reference#releasewhenwaiting).
301
302
 
@@ -307,7 +308,7 @@ Controls work on a suspended stage:
307
308
  - While a stage's conversation waits on a tool call's result, nothing starts a new turn on its session: a notification such as a finished subagent's, steering and follow-ups wait, and join the turn the result continues, and a compaction leaves the waiting call's turn in the conversation. If the conversation has moved past a waiting call anyway, for example because the model kept working, Atomic cancels that call and drops its late result instead of failing the stage: the stage keeps its own result, including a captured `structured_output`, and the run goes on. A result that arrives while the stage's session is still running waits for that run to settle first. A dropped call, and a stage prompt or retry that was not sent because the session waits on a result, are recorded in the [debug log](/development#debugging) as `stale-detached-call` and `stage-input-held-for-detached-results`.
308
309
  - `quit`, or a crash of the Atomic process, stops the wait. Resuming the run reopens the stage and starts the pending tool call again with the same call id and arguments, then continues the turn; a call whose result was saved before the stop is not started again, and the turn continues from that result. It does not send the stage's prompt again, also for a stage that waited between turns. A tool call can therefore run more than once across a restart.
309
310
  - If the session store the run resumes with does not hold a waiting stage's session, resume fails with `StageRehydrationError` (`session-not-found`) before changing anything, for a run that stopped with Atomic and for one that failed or is blocked alike. Resume with the session storage the run was started with; `atomic storage status` shows which one this process selects. On a machine that uses local-only storage and is not joined to shared storage, run `atomic team join <url> --token-file <path>` first (see [Team and CI setup](/guides/team-setup)); joining sets the team database but keeps sessions in a local store, so also select the session storage that holds the waiting stage's session. A child workflow, including one a worker pool runs, checks its own waiting stages when it starts again: a missing session fails the child with the same error before it does any work, and the pool does not retry it until the root is resumed, when the child checks again. The error's `rootRunId` names the run to resume; a worker pool keeps its children's sessions in a store that run's journal selects, so resume it with the journal storage it was started with, on the machine that ran a local pool.
310
- - If the session store is unreachable when the results arrive, Atomic saves the results with the stage's wait and tries to reopen the session, and to save the results into it, three times over a few seconds. When the store is still unreachable, the run is blocked, not failed, with `StageRehydrationError` (`session-unavailable`). Make the store reachable, then resume the run: the stage continues its turn from the saved results and the tool does not run again.
311
+ - If the session store is unreachable when the results arrive, Atomic saves the results with the stage's wait and tries to reopen the session, and to save the results into it, three times over a few seconds. When the store is still unreachable, the live run shows `↑ blocked`, not failed, with `StageRehydrationError` (`session-unavailable`). Make the store reachable, then press `r` in the graph to request a resume. If the run can resume, the stage continues its turn from the saved results and the tool does not run again. This block does not send a chat notice.
311
312
  - If the reopened session returns from the turn without saving the results, the stage fails with `StageRehydrationError` (`results-not-saved`) instead of completing, and the results stay saved with its wait. Resuming the run continues the turn from them.
312
313
  - If Atomic cannot save a record of a stage's wait to the run's journal after three attempts, the stage carries on and the run logs the reason once; the stage's `waitRecordFailure` shows it (`StageWaitRecordError`, `wait-record-unavailable`). Until its next record is saved, a resume after a crash starts the stage from its previous record, which can run a finished tool call again.
313
314
 
@@ -357,9 +358,13 @@ Resuming several stages can make partial progress. Inspect status after an ackno
357
358
 
358
359
  These are distinct operations. *Resuming workflow execution* (`r` in the graph, `/resume`, or the workflow tool's `resume` action) is for paused, interrupted, recoverably failed, or unfinished durable work; it may replay checkpoints, continue an incomplete stage, and dispatch remaining DAG work. *Opening a post-mortem chat* reopens one terminal agent stage's retained conversation for follow-up only — it never resumes, retries, rewinds, or otherwise changes workflow execution.
359
360
 
361
+ If you resume a failed workflow while its stage chat is open, the pane follows the resumed stage. Your draft stays in the composer, and new messages go to the resumed stage in the same conversation. If a chat turn is still running on a stage the resume needs, Atomic names the stage and refuses the resume. Wait for that turn to finish or press Esc in its chat, then resume again.
362
+
360
363
  Any eligible terminal agent stage with a valid retained session opens as an interactive post-mortem chat through the explicit user-driven TUI path: completed-workflow inspection, or `/workflows` followed by stage selection, including restored/replayed durable snapshots after a restart. A nested stage selected in the graph is resolved through the expanded graph and routed to the child run that owns the stage while the overlay remains rooted on the requested graph; the resolved owner is preserved when sibling child workflows reuse the same local stage ID.
361
364
 
362
- Atomic disposes the live session of each completed stage whose conversation is saved, so a long run or a long-lived session does not hold every finished stage in memory. A stage run with `ctx.task`, `ctx.chain` or `ctx.parallel` is released as soon as it completes, a stage run with `ctx.stage` once the workflow no longer holds its stage context, and every remaining completed stage when the run ends, whether it completed, failed, or was cancelled. Resuming a failed run replays its completed stages from the saved run and does not need their live sessions. A stage context the workflow still holds keeps its session, so `ctx.stage` can prompt it again. Attaching to such a stage or messaging it reopens the saved conversation first, which takes a moment, without rerunning the workflow. While the session that ran the workflow is open, the released stage also stays in the Intercom session list under its previous name as `closed · reply: post-mortem only`: an ask to it reopens the saved conversation, runs one turn with the question, and returns that turn's final answer (or a failure if the conversation cannot be reopened), and a plain send is delivered to the session that ran the workflow. Once that session ends or is replaced, the Intercom entry is gone; reopen the stage from its graph with `/workflows`. A stage with a mounted chat (visible or hidden), queued or in-flight messages, an active turn, compaction or retry keeps its live session while that lasts, and is released as soon as the last of them ends. A stage you reopen by attaching, by messaging it, or with an Intercom ask is released the same way once its chat is closed and its turn has ended; the next attach, message or ask reopens it from its saved transcript, and it keeps its Intercom name. So memory holds only the stages you are actually using. A completed stage with no saved transcript keeps its live session until the session that ran the workflow is replaced or shut down. The saved transcript, result, and run record are never removed.
365
+ Atomic disposes the live session of each completed stage whose conversation is saved, so a long run or a long-lived session does not hold every finished stage in memory. A stage run with `ctx.task`, `ctx.chain` or `ctx.parallel` is released as soon as it completes, a stage run with `ctx.stage` once the workflow no longer holds its stage context, and every remaining completed stage when the run ends, whether it completed, failed, or was cancelled. Resuming a failed run replays its completed stages from the saved run and does not need their live sessions. A stage context the workflow still holds keeps its session, so `ctx.stage` can prompt it again. This also applies after a resume: releasing the failed attempt's context does not close the resumed stage. Attaching to such a stage or messaging it reopens the saved conversation first, which takes a moment, without rerunning the workflow. While the session that ran the workflow is open, the released stage also stays in the Intercom session list under its previous name as `closed · reply: post-mortem only`: an ask to it reopens the saved conversation, runs one turn with the question, and returns that turn's final answer (or a failure if the conversation cannot be reopened), and a plain send is delivered to the session that ran the workflow. Once that session ends or is replaced, the Intercom entry is gone; reopen the stage from its graph with `/workflows`. A stage with a mounted chat (visible or hidden), queued or in-flight messages, an active turn, compaction or retry keeps its live session while that lasts, and is released as soon as the last of them ends. A stage you reopen by attaching, by messaging it, or with an Intercom ask is released the same way once its chat is closed and its turn has ended; the next attach, message or ask reopens it from its saved transcript, and it keeps its Intercom name. So memory holds only the stages you are actually using. A completed stage with no saved transcript keeps its live session until the session that ran the workflow is replaced or shut down. The saved transcript, result, and run record are never removed.
366
+
367
+ If you resume an SDK run with a different `stageControlRegistry`, you can clear the old registry without closing the resumed stage’s chat or cancelling its pending question. Inspecting a completed run keeps questions in an open stage chat answerable. Intercom asks to the same released stage are answered in order, and its listed ID remains usable after the reply.
363
368
 
364
369
  Intercom and the stage chat opened from the graph own stage communication. The workflow tool has no free-form message action; start a new workflow if tracked work remains after a terminal root.
365
370
 
@@ -616,6 +621,8 @@ Only runs with usable durable checkpoints or pending prompts can resume. Deleted
616
621
 
617
622
  Only valid current-format journal records are selectable. Unsupported or malformed records are not reinterpreted.
618
623
 
624
+ You can resume a failed run by ID as soon as the failure appears. If its previous attempt is still saving in this session, resume waits for that save before retrying; you do not need to start a new run.
625
+
619
626
  Selecting a paused, resumable failed, blocked, or crash-recovery target from the current project re-dispatches the workflow with its cached inputs and the **original workflow id**. Every nested invocation validates and reuses its durable boundary and child identity before dispatch. Previously completed `ctx.tool`, `ctx.ui`, stage/task/chain/parallel items, and child boundaries replay from checkpoints instead of executing again; only incomplete work continues.
620
627
 
621
628
  Workflow resume is project-scoped. Resuming a run from another project in `/resume` asks: `Workflow run found in different project: <cwd>. Fork it into the current directory?` Choosing Yes forks the whole run into the current directory with the same mechanism as a stage fork: a new run ID copies saved checkpoints and stage conversation history in one step and continues incomplete work there. Completed side effects replay from their saved results; the source run remains unchanged. Choosing No cancels without creating a run. The workflow definition must remain available in the current or original project. SDK, workflow-tool, and headless resume calls do not prompt: use the workflow tool's `fork` action or `forkRun` instead, or reopen the original project to resume the original run.
@@ -632,7 +639,7 @@ Older compatible tool checkpoints still replay their cached output without rerun
632
639
 
633
640
  Fresh completed inspection does not currently persist the workflow's declared root output. Live `run()` results still expose the declared output, and this output-persistence limit does not block durable tool topology or read-only graph inspection.
634
641
 
635
- Targets resolve across top-level live, resumable durable, and completed entries as one namespace using full UUIDs or unique 8-hex prefixes. Exact loadable paused live targets retain direct in-session precedence. Prefixes require successful catalog discovery and reject collisions. A root appearing in both resumable and read-only history remains resumable. Nested child runs remain excluded from this top-level resume namespace.
642
+ Targets resolve across top-level live and stored runs using full UUIDs or unique 8-hex prefixes. A stored run that cannot resume is not a missing run. Exact loadable paused live targets retain direct in-session precedence. Interactive `/resume <prefix>` also checks chat sessions. If the prefix matches more than one entry, it lists the matching IDs and starts nothing, even when only one run can resume. Use its full ID to select it. If the run changes after it is listed, the picker asks you to refresh. Reopen `/resume` and select the current attempt; the old selection will not retry a newer failure or block. A root appearing in both resumable and read-only history remains resumable. Nested child runs remain excluded from this top-level resume namespace.
636
643
 
637
644
  The non-interactive `workflow` surface reads the journal for explicit IDs. `resume` loads the definition, revalidates eligibility, then claims and dispatches the run. `status`, `stages`, `stage`, and `transcript` read a missing-local root without dispatching it. `status` without a run ID remains session-local.
638
645
 
package/docs/workflows.md CHANGED
@@ -90,7 +90,7 @@ configureProviderRequestBudget("openai-2", { maxRequests: 30, intervalMs: 60_000
90
90
 
91
91
  Each budget limits starts in a rolling time window. OpenAI, Anthropic, Azure, Mistral, pi-messages, and explicit Codex SSE transports count HTTP attempts, including their internal retries. Other transports count model-stream starts; their own internal retries are not counted separately. Budgets do not limit tokens or simultaneous streams.
92
92
 
93
- Waiting for a budget slot does not consume an OpenAI or Anthropic SDK HTTP timeout. Workflow and structured-output time limits still include that wait.
93
+ Waiting for a budget slot does not consume an OpenAI or Anthropic SDK HTTP timeout. Workflow and structured-output time limits still include that wait. Cancelling a request, or reaching its caller's deadline, ends the wait: a request whose cancellation or deadline has come due is never sent, even when its slot opens in the same moment.
94
94
 
95
95
  Pass `undefined` as the second argument to remove a budget, for example `configureProviderRequestBudget("openai-1", undefined)`. Configure budgets on each process start; do not put this setup behind a replay-cached `ctx.tool` call.
96
96
 
@@ -61,7 +61,7 @@ Tracked files that are denied or ignored keep their `HEAD` content in the snapsh
61
61
  | `snapshots.maxFileBytes` | number | `5242880` | Largest file captured, in bytes |
62
62
  | `snapshots.maxSnapshotBytes` | number | `52428800` | Largest total of captured file content, and largest unpushed-commit bundle, in bytes |
63
63
  | `snapshots.fullEvery` | number | `10` | Restart the patch chain from `HEAD` after this many snapshots |
64
- | `snapshots.autoCollect` | boolean | `true` | Delete snapshot content nothing retains when a session closes or a workflow run finishes. See [Retention and collection](#retention-and-collection) |
64
+ | `snapshots.autoCollect` | boolean | `true` | Delete snapshot content nothing retains, in the background of an interactive session, after a session closes, and when a workflow run finishes. See [Retention and collection](#retention-and-collection) |
65
65
  | `snapshots.collectIntervalSeconds` | number | `3600` | Shortest time between two automatic collections of one database, in seconds |
66
66
  | `snapshots.graceSeconds` | number | `3600` | Content stored or reused less than this many seconds ago is never collected; `0` turns this protection off |
67
67
  | `snapshots.pool.maxIdlePerRepository` | number | `2` | Idle restored worktrees kept per repository; see [Restored worktrees](#restored-worktrees) |
@@ -111,7 +111,7 @@ Only checkouts of one repository share these worktrees: checkouts whose remotes
111
111
 
112
112
  A worktree belongs to the session it was restored for, also after that session closes, so resuming the session again continues in it as it left it. A session never continues in a worktree that another session now holds or owns: it gets a fresh worktree instead, as if its old one were gone. Worktrees that workflow runs restore, that the SDK restores into a directory you chose, and that earlier versions of Atomic restored keep their own paths and are never part of this.
113
113
 
114
- A session holds its worktree through a lease that its process refreshes every 10 seconds. A process that stops refreshing it, because it was suspended, the machine slept, or the host was overloaded, keeps its worktree for 90 seconds after its last refresh: 30 seconds before the lease is stale, and a 60-second grace period after that. Only then can a session on another machine sharing the pool reuse or remove the worktree. Machines sharing a pool, as on a network filesystem, may have clocks that disagree. Atomic measures every lease's age by the clock of the filesystem that holds the pool: each process finds how far that clock runs from its own by writing a short-lived `.clock-*.probe` file next to the lease, stamps its refreshes in the filesystem's clock, and judges other leases by it. A session on a machine whose clock runs minutes behind keeps its worktree, and one on a machine whose clock runs days ahead loses it 90 seconds after its last refresh, like any other. The per-worktree and per-repository locks, the restore crash-record locks and the seed locks are judged the same way, each stale 30 seconds after its last refresh. On the same machine, a worktree whose session process still runs is never reused or removed, however long it was suspended; once that process ends, the 90-second rule applies. On Linux the lease names when its process started, so a later process that got the same process ID, as after a reboot or a container restart, never keeps the worktree. Where that cannot be read, as on macOS and Windows, a process with the lease's ID keeps the worktree for at most 24 hours without a refresh. Reusing, removing and taking a worktree again happen under a per-worktree lock. Each change checks that the process still holds that lock and that the worktree's record is the one it checked, and removing a worktree first takes its record and moves it aside, so a process suspended long enough to lose the lock changes nothing another session holds when it continues. Before it records a snapshot, and before a resume continues in a worktree, a session checks that it still holds it. When another session took the worktree meanwhile, the session records no snapshot of it, and its warning `pooled-worktree-lost` says to stop changing files there. Its next resume restores the session's latest snapshot into a fresh worktree. A session that cannot take the lease of its worktree when it resumes restores fresh in the same way, and never continues in a worktree it does not hold.
114
+ A session holds its worktree through a lease that its process refreshes every 10 seconds. A process that stops refreshing it, because it was suspended, the machine slept, or the host was overloaded, keeps its worktree for 90 seconds after its last refresh: 30 seconds before the lease is stale, and a 60-second grace period after that. Only then can a session on another machine sharing the pool reuse or remove the worktree. Machines sharing a pool, as on a network filesystem, may have clocks that disagree. Atomic measures every lease's age by the clock of the filesystem that holds the pool: each process finds how far that clock runs from its own by writing a short-lived `.clock-*.probe` file next to the lease, stamps its refreshes in the filesystem's clock, and judges other leases by it. On Windows, when the native bindings are already loaded, Atomic checks that the name still identifies the probe it created, and holds deletion rights through measurement and cleanup where the filesystem permits it. Otherwise the reading uses ordinary file operations without loading or installing a package. Pool records are created and written by the runtime with its normal permissions. A scanner can open a temporary record. If its removal is briefly refused after publication, Atomic retries only when both the temporary and published names still identify the file it pinned before publication. A Windows filesystem-time reading counts cleanup time without treating a change to the reader’s wall clock as elapsed time. Other platforms keep the ordinary clock estimate. A lock refresh never waits to retry another probe's deletion. A later reading also tries to remove abandoned probes older than ten minutes; a file still in use may remain. A session on a machine whose clock runs minutes behind keeps its worktree, and one on a machine whose clock runs days ahead loses it 90 seconds after its last refresh, like any other. The per-worktree and per-repository locks, the restore crash-record locks and the seed locks are judged the same way, each stale 30 seconds after its last refresh. On the same machine, a worktree whose session process still runs is never reused or removed, however long it was suspended; once that process ends, the 90-second rule applies. On Linux the lease names when its process started, so a later process that got the same process ID, as after a reboot or a container restart, never keeps the worktree. Where that cannot be read, as on macOS and Windows, a process with the lease's ID keeps the worktree for at most 24 hours without a refresh. Reusing, removing and taking a worktree again happen under a per-worktree lock. Each change checks that the process still holds that lock and that the worktree's record is the one it checked, and removing a worktree first takes its record and moves it aside, so a process suspended long enough to lose the lock changes nothing another session holds when it continues. Before it records a snapshot, and before a resume continues in a worktree, a session checks that it still holds it. When another session took the worktree meanwhile, the session records no snapshot of it, and its warning `pooled-worktree-lost` says to stop changing files there. Its next resume restores the session's latest snapshot into a fresh worktree. A session that cannot take the lease of its worktree when it resumes restores fresh in the same way, and never continues in a worktree it does not hold.
115
115
 
116
116
  Before restoring into a new worktree, a resume reuses an idle worktree of the same repository when it can: one no open session holds and that is still exactly as its session's latest snapshot recorded it, with nothing snapshots leave out, such as an untracked file or an ignored `.env`. Atomic resets its tracked files to the snapshot being resumed and keeps its ignored files, such as `node_modules`, `target` or `.venv`, so the blueprint's `maintenance` steps have little to rebuild. Worktrees last restored for the same environment are tried first, then the most recently released. The worktree then belongs to the resuming session; its previous session gets a fresh worktree on its next resume, with nothing lost, because the reused worktree held only what its snapshot recorded. A worktree with unrecorded changes is never reused. When no worktree can be reused, or the reset fails or does not verify, the resume restores into a new worktree as before. Cancelling a claim before its reset changes any files gives the untouched worktree back to its previous owner, with its dependencies and build output kept. An interruption partway through the reset leaves it marked; it is never reused, and Atomic removes it on a later restore. Once the reset finishes, Atomic completes the ownership update even if cancellation arrives. `/session snapshot` lists a reused worktree as `(claimed)`.
117
117
 
@@ -201,11 +201,11 @@ Snapshot content (patches and bundles of unpushed commits) is stored once per co
201
201
 
202
202
  Sessions and workflow runs that share one database share one blob table, and a collection keeps what either of them needs.
203
203
 
204
- **When collection runs.** With `snapshots.autoCollect` on, Atomic collects in the background when a session closes and when a root workflow run finishes. Each database is collected at most once per `snapshots.collectIntervalSeconds` after its last finished collection, across every Atomic process that uses it, measured on the database's clock. Pooled workers' runs never start a collection. Collection reads an index of snapshot references, not the full session or workflow history, and deletes content in small batches. If the process exits or is killed partway, a later trigger resumes after about two minutes. Committed batches stay committed; a batch cut short rolls back.
204
+ **When collection runs.** With `snapshots.autoCollect` on, Atomic collects in the background 10 seconds (`SNAPSHOT_COLLECTION_SESSION_DELAY_MS`) after an interactive session (the TUI or RPC mode) has started, 10 seconds after a session closes, and when a root workflow run finishes. The delay keeps collection from competing with starting a session or opening the next one; a process that ends sooner leaves the collection to a later one. Each database is collected at most once per `snapshots.collectIntervalSeconds` after its last finished collection, across every Atomic process that uses it, measured on the database's clock. Pooled workers' runs never start a collection. Collection reads an index of snapshot references, not the full session or workflow history, and works in short steps that leave the interface responsive: it finds the snapshots each session retains a bounded number of snapshot entries at a time, and deletes content in small batches. Each batch is one short write transaction, and nothing else in the process runs while it holds the write lock, so another connection your process opens to the same database can write during a collection without waiting for it. If the process exits or is killed partway, a later trigger resumes after about two minutes. Committed batches stay committed; a batch cut short rolls back.
205
205
 
206
206
  Collection timers do not keep an otherwise idle process running. When the last session or workflow journal that Atomic opened on a database closes, Atomic aborts collection at its next batch boundary and closes the database before the awaited close resolves. Closing waits only for that interruption and database cleanup, never for the remaining collection. A remote connection or the batch already in progress may keep the process alive until cleanup finishes. While another process holds the database's write lock, collection waits on unref'd timers and gives up after about two minutes.
207
207
 
208
- **Databases written before the index existed.** The first collection indexes what such a database already holds, once, in short steps in the background, and deletes nothing until that is done. A database that shares its blob table with sessions or runs written by an older Atomic is indexed the same way the next time it is collected. An index an older Atomic wrote gains the references it lacks, such as those of queued workflow work, the same way.
208
+ **Databases written before the index existed.** The first collection indexes what such a database already holds, once, in short steps in the background, and deletes nothing until that is done. A database that shares its blob table with sessions or runs written by an older Atomic is indexed the same way the next time it is collected. An index an older Atomic wrote gains the references it lacks, such as those of queued workflow work, the same way. An Atomic from before 0.9.88 that shares the database can index session entries without the pins of partly restored worktrees: by finishing an interrupted rebuild, or by installing its own triggers again after some went missing, even a single one, when it also empties the index and indexes every entry its way. On an index this Atomic installed, it recognises both and indexes those entries again before it deletes anything. Atomic 0.9.88 and 0.9.89 cannot tell, so until this Atomic's rebuild is done they read the session index as another version's: one of them that collects meanwhile removes the index and rebuilds it itself, which holds the database while it removes it, instead of trusting entries the older Atomic indexed. Two cases leave nothing this Atomic can recognise. In the first, Atomic 0.9.88 or 0.9.89 installed or rebuilt the session index, the older Atomic indexed some of it, during that rebuild or after it installed again a trigger that went missing, and the index was finished before this Atomic next collected. In the second, session index triggers went missing and the older Atomic installed them again before this Atomic opened the database: this Atomic rebuilds that index, but Atomic 0.9.88 and 0.9.89 trust it.
209
209
 
210
210
  **Grace window.** Content stored or reused less than `snapshots.graceSeconds` ago (one hour by default) is never deleted, so a capture that has stored its content but not yet recorded the snapshot is safe. A capture that builds on an earlier snapshot restarts that snapshot's age before reusing its content; if the content is already gone, the capture records a full snapshot instead. What the rules above keep is kept whatever its age, so `0` only removes the protection of content nothing references yet, such as a capture's content before its snapshot is recorded or its work is queued. A session, a workflow checkpoint and queued pool work never record a snapshot whose content is gone. If a collection deletes a capture's content before the snapshot is recorded, Atomic stores the content again, or captures once more. If that fails too, nothing is recorded: the session warns with `blobs-collected`, a workflow checkpoint is committed without the snapshot, and pooled work is queued without one, as when its dispatch capture is unavailable. The capture fails with this clear error instead of recording a snapshot that cannot be restored. If the warning repeats, raise `snapshots.graceSeconds`.
211
211
 
@@ -213,7 +213,9 @@ Collection timers do not keep an otherwise idle process running. When the last s
213
213
 
214
214
  **Disk space.** SQLite reuses the space of deleted content for new content but does not shrink the file. Run `VACUUM` on the database while no Atomic process uses it to return the space to the operating system.
215
215
 
216
- To collect immediately, for example after deleting many sessions, call `collectSnapshotGarbage` from the SDK (see below).
216
+ To collect immediately, for example after deleting many sessions, call `collectSnapshotGarbage` from the SDK (see below). Its `deleted` list contains only the hashes removed in that pass.
217
+
218
+ A concurrent fork can leave an unused patch for the next collection. For example, snapshot A uses a patch that snapshot B supersedes. A fork through B defers deletion of A’s otherwise eligible patch only if it copies A’s record after collection checks which sessions record that patch but before collection tries to delete it. The next collection can reclaim it if it still meets the grace period and nothing retains it. A fork through A still needs the patch, so collection keeps it on both passes.
217
219
 
218
220
  ## SDK
219
221
 
@@ -246,8 +248,8 @@ if (capture.status === "captured" || capture.status === "unchanged") {
246
248
  - `isHeadOnlyAdvance(driftError, signal?)` resolves `true` when a `WorkspaceDriftError` from `verifyWorktree` only moved `HEAD` forward over the recorded tree, the case resume continues in place.
247
249
  - `canonicalizeWorktreePath(path)` resolves the symbolic links in the existing part of a path and keeps the rest, the form snapshot roots are compared in.
248
250
  - `removeRestoredWorktree(path, { storeDir?, onWarning?, signal? })` removes a worktree a restore created, for rolling back a restore of several checkouts. It refuses any other path, including a regular file.
249
- - `collectSnapshotGarbage(blobs, { graceSeconds?, signal? })` deletes, from a `SqlSnapshotBlobStore`, every blob no retained snapshot needs (see [Retention and collection](#retention-and-collection)) that was stored or reused at least `graceSeconds` ago (default `DEFAULT_BLOB_GRACE_SECONDS`, one hour, on the database's clock), and resolves with the hashes it deleted. `sqlSessionStore.snapshotBlobs` and `sqlRunJournal.snapshotBlobs` are such stores. Any other store, or none, rejects with `WorkspaceSnapshotError` (`blob-store-unsupported`) before anything is read. The returned promise keeps your process running until the collection ends. An aborted collection rejects with the signal's reason; what it deleted stays deleted.
250
- - `scheduleSnapshotCollection(blobs, settings, { onFailure? })` starts the automatic collection that sessions and workflow runs use, when `settings.autoCollect` is set and one is due for the database. Invalid `settings` throw `WorkspaceConfigError` (`invalid-setting`) before any storage is touched. Otherwise it resolves with the outcome (`collected`, `skipped` with a reason, `interrupted` when the storage closed, or its last store was released, first, or `failed` with the error) and never rejects. `onFailure` receives each kind of failure once per process; by default it becomes a process warning. The collection does not keep your process running; if it has nothing else to do, it exits after the batch in progress.
251
+ - `collectSnapshotGarbage(blobs, { graceSeconds?, signal? })` deletes eligible blobs from a `SqlSnapshotBlobStore` and resolves with the hashes deleted in that pass. A blob must have been stored or reused at least `graceSeconds` ago (default `DEFAULT_BLOB_GRACE_SECONDS`, one hour, on the database's clock). See [Retention and collection](#retention-and-collection) for what is kept, including when a session forks during collection. `sqlSessionStore.snapshotBlobs` and `sqlRunJournal.snapshotBlobs` are such stores. Any other store, or none, rejects with `WorkspaceSnapshotError` (`blob-store-unsupported`) before anything is read. The returned promise keeps your process running until the collection ends. An aborted collection rejects with the signal's reason; what it deleted stays deleted.
252
+ - `scheduleSnapshotCollection(blobs, settings, { onFailure?, delayMs? })` starts the automatic collection that sessions and workflow runs use, when `settings.autoCollect` is set and one is due for the database. With `delayMs`, the collection waits that many milliseconds before it reads the database, on a timer that does not keep your process running; sessions pass `SNAPSHOT_COLLECTION_SESSION_DELAY_MS`. Closing the storage during the wait ends the collection at once, `interrupted`. Invalid `settings`, or a `delayMs` that is not a non-negative integer, throw `WorkspaceConfigError` (`invalid-setting`) before any storage is touched. Otherwise it resolves with the outcome (`collected`, `skipped` with a reason, `interrupted` when the storage closed, or its last store was released, first, or `failed` with the error) and never rejects. `onFailure` receives each kind of failure once per process; by default it becomes a process warning. The collection does not keep your process running; if it has nothing else to do, it exits after the batch in progress.
251
253
  - `runningSnapshotCollection(blobs)` returns the automatic collection this process is running for that database, as a promise that settles when it ends and never rejects, or `undefined` when none is running. Asking for it keeps your process running until the collection ends. Close a database you opened yourself only after it settles if you want the collection to finish: closing it earlier makes the next batch fail, and the collection resolves `interrupted`. When the last store Atomic opened on a database closes, Atomic stops the collection itself.
252
254
 
253
255
  ## Errors
@@ -275,4 +277,4 @@ Every error except `GitUnavailableError` extends `WorkspaceError`, the family th
275
277
  | `WorkspaceRestoreError` | `unwritable-path` | A restore or `removeRestoredWorktree` could not write a directory or file it needs, for example because the disk is full or the directory is read-only | `target`, `snapshotId`; `cause` holds the filesystem error | Free space on that volume, or make the path and its parent writable, then retry |
276
278
  | `WorkspaceRestoreError` | `invalid-snapshot` | A snapshot or binding record has a value Atomic never writes: a remote starting with `-`, holding control characters or credentials, naming a Git remote helper, or using another scheme than `https`, `http`, `ssh`, `git` or `file`, or a malformed commit, tree, blob hash, or id | `snapshotId` (when the id itself is valid), `field`, `reason` (`unsafe-remote`, `invalid-object-id`, `invalid-snapshot-id`, `invalid-blob-hash`) | Restore only sessions and runs from storage you trust, or export the session again on the machine that recorded it |
277
279
  | `WorkspaceDriftError` | `tree-drift` | A checkout no longer matches the snapshot work would resume from, and it could not be restored | `root`, `expectedHead`, `actualHead`, `expectedTree`, `actualTree`, `snapshotId`; with `reason: "restore-failed"`, `restoreCode` and the failure as `cause` | Follow the hint: after a failed restore it is the failure's own fix |
278
- | `WorkspaceCollectionError` | `collection-failed` | Collecting unreferenced snapshot content failed in the database; nothing a retained snapshot needs was deleted. `retryable: true` | `table`, `phase` (`claim`, `index`, `sweep`, `record`), `deleted` (blobs deleted before the failure); `cause` holds the storage error | Check that the database is writable, has free space and is not locked by a stopped process. Collection retries after `snapshots.collectIntervalSeconds`, or call `collectSnapshotGarbage` |
280
+ | `WorkspaceCollectionError` | `collection-failed` | Collecting unreferenced snapshot content failed in the database; nothing a retained snapshot needs was deleted. `retryable: true` | `table`, `phase` (`claim`, `index`, `sweep`, `record`), `deleted` (blobs deleted before the failure); `cause` holds the storage error, and `summary` ends with the database's own reason | Check that the database is writable, has free space and is not locked by a stopped process. When the hint names a trigger or view that refers to a missing table, fix or drop it: SQLite renames no table while one exists, which stops the move of the snapshot chunk table to its new layout ([Size limits](/storage#size-limits)). Collection retries after `snapshots.collectIntervalSeconds`, or call `collectSnapshotGarbage` |
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.89",
3
+ "version": "0.9.90-alpha.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bastani/atomic",
9
- "version": "0.9.89",
9
+ "version": "0.9.90-alpha.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@bastani/atomic-natives": "0.9.89",
13
- "@bastani/atomic-ai": "0.9.89",
14
- "@bastani/atomic-agent-core": "0.9.89",
15
- "@bastani/atomic-codemode": "0.9.89",
16
- "@bastani/atomic-tui": "0.9.89",
12
+ "@bastani/atomic-natives": "0.9.90-alpha.1",
13
+ "@bastani/atomic-ai": "0.9.90-alpha.1",
14
+ "@bastani/atomic-agent-core": "0.9.90-alpha.1",
15
+ "@bastani/atomic-codemode": "0.9.90-alpha.1",
16
+ "@bastani/atomic-tui": "0.9.90-alpha.1",
17
17
  "@modelcontextprotocol/ext-apps": "^2.0.4",
18
18
  "@modelcontextprotocol/sdk": "1.32.2",
19
19
  "@mozilla/readability": "^0.6.0",
@@ -40,6 +40,7 @@
40
40
  "proper-lockfile": "4.1.2",
41
41
  "quickjs-wasi": "3.6.3",
42
42
  "semver": "7.8.5",
43
+ "stream-json": "3.9.0",
43
44
  "turndown": "^7.2.5",
44
45
  "typebox": "1.3.27",
45
46
  "undici": "8.12.3",
@@ -429,26 +430,26 @@
429
430
  }
430
431
  },
431
432
  "node_modules/@bastani/atomic-agent-core": {
432
- "version": "0.9.89",
433
- "resolved": "https://registry.npmjs.org/@bastani/atomic-agent-core/-/atomic-agent-core-0.9.89.tgz",
433
+ "version": "0.9.90-alpha.1",
434
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-agent-core/-/atomic-agent-core-0.9.90-alpha.1.tgz",
434
435
  "license": "MIT",
435
436
  "dependencies": {
436
- "@bastani/atomic-ai": "0.9.89",
437
- "@bastani/atomic-schema": "0.9.89"
437
+ "@bastani/atomic-ai": "0.9.90-alpha.1",
438
+ "@bastani/atomic-schema": "0.9.90-alpha.1"
438
439
  },
439
440
  "engines": {
440
441
  "node": ">=22.19.0"
441
442
  }
442
443
  },
443
444
  "node_modules/@bastani/atomic-ai": {
444
- "version": "0.9.89",
445
- "resolved": "https://registry.npmjs.org/@bastani/atomic-ai/-/atomic-ai-0.9.89.tgz",
445
+ "version": "0.9.90-alpha.1",
446
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-ai/-/atomic-ai-0.9.90-alpha.1.tgz",
446
447
  "license": "MIT",
447
448
  "dependencies": {
448
449
  "@anthropic-ai/sdk": "0.129.0",
449
450
  "@aws-sdk/client-bedrock-runtime": "3.1127.0",
450
- "@bastani/atomic-schema": "0.9.89",
451
- "@bastani/atomic-telemetry": "0.9.89",
451
+ "@bastani/atomic-schema": "0.9.90-alpha.1",
452
+ "@bastani/atomic-telemetry": "0.9.90-alpha.1",
452
453
  "@google/genai": "2.32.0",
453
454
  "@smithy/node-http-handler": "4.13.0",
454
455
  "http-proxy-agent": "9.1.0",
@@ -526,8 +527,8 @@
526
527
  }
527
528
  },
528
529
  "node_modules/@bastani/atomic-codemode": {
529
- "version": "0.9.89",
530
- "resolved": "https://registry.npmjs.org/@bastani/atomic-codemode/-/atomic-codemode-0.9.89.tgz",
530
+ "version": "0.9.90-alpha.1",
531
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-codemode/-/atomic-codemode-0.9.90-alpha.1.tgz",
531
532
  "license": "MIT",
532
533
  "dependencies": {
533
534
  "quickjs-wasi": "3.6.3"
@@ -537,18 +538,18 @@
537
538
  }
538
539
  },
539
540
  "node_modules/@bastani/atomic-natives": {
540
- "version": "0.9.89",
541
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.89.tgz",
541
+ "version": "0.9.90-alpha.1",
542
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.90-alpha.1.tgz",
542
543
  "license": "MIT",
543
544
  "optionalDependencies": {
544
- "@bastani/atomic-natives-darwin-arm64": "0.9.89",
545
- "@bastani/atomic-natives-darwin-x64": "0.9.89",
546
- "@bastani/atomic-natives-linux-arm64-gnu": "0.9.89",
547
- "@bastani/atomic-natives-linux-arm64-musl": "0.9.89",
548
- "@bastani/atomic-natives-linux-x64-gnu": "0.9.89",
549
- "@bastani/atomic-natives-linux-x64-musl": "0.9.89",
550
- "@bastani/atomic-natives-win32-arm64-msvc": "0.9.89",
551
- "@bastani/atomic-natives-win32-x64-msvc": "0.9.89"
545
+ "@bastani/atomic-natives-darwin-arm64": "0.9.90-alpha.1",
546
+ "@bastani/atomic-natives-darwin-x64": "0.9.90-alpha.1",
547
+ "@bastani/atomic-natives-linux-arm64-gnu": "0.9.90-alpha.1",
548
+ "@bastani/atomic-natives-linux-arm64-musl": "0.9.90-alpha.1",
549
+ "@bastani/atomic-natives-linux-x64-gnu": "0.9.90-alpha.1",
550
+ "@bastani/atomic-natives-linux-x64-musl": "0.9.90-alpha.1",
551
+ "@bastani/atomic-natives-win32-arm64-msvc": "0.9.90-alpha.1",
552
+ "@bastani/atomic-natives-win32-x64-msvc": "0.9.90-alpha.1"
552
553
  },
553
554
  "engines": {
554
555
  "bun": ">=1.4.2",
@@ -556,8 +557,8 @@
556
557
  }
557
558
  },
558
559
  "node_modules/@bastani/atomic-natives-darwin-arm64": {
559
- "version": "0.9.89",
560
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.89.tgz",
560
+ "version": "0.9.90-alpha.1",
561
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.90-alpha.1.tgz",
561
562
  "license": "MIT",
562
563
  "os": [
563
564
  "darwin"
@@ -568,8 +569,8 @@
568
569
  "optional": true
569
570
  },
570
571
  "node_modules/@bastani/atomic-natives-darwin-x64": {
571
- "version": "0.9.89",
572
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.89.tgz",
572
+ "version": "0.9.90-alpha.1",
573
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.90-alpha.1.tgz",
573
574
  "license": "MIT",
574
575
  "os": [
575
576
  "darwin"
@@ -580,8 +581,8 @@
580
581
  "optional": true
581
582
  },
582
583
  "node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
583
- "version": "0.9.89",
584
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.89.tgz",
584
+ "version": "0.9.90-alpha.1",
585
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.90-alpha.1.tgz",
585
586
  "license": "MIT",
586
587
  "os": [
587
588
  "linux"
@@ -595,8 +596,8 @@
595
596
  "optional": true
596
597
  },
597
598
  "node_modules/@bastani/atomic-natives-linux-arm64-musl": {
598
- "version": "0.9.89",
599
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.89.tgz",
599
+ "version": "0.9.90-alpha.1",
600
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.90-alpha.1.tgz",
600
601
  "license": "MIT",
601
602
  "os": [
602
603
  "linux"
@@ -610,8 +611,8 @@
610
611
  "optional": true
611
612
  },
612
613
  "node_modules/@bastani/atomic-natives-linux-x64-gnu": {
613
- "version": "0.9.89",
614
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.89.tgz",
614
+ "version": "0.9.90-alpha.1",
615
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.90-alpha.1.tgz",
615
616
  "license": "MIT",
616
617
  "os": [
617
618
  "linux"
@@ -625,8 +626,8 @@
625
626
  "optional": true
626
627
  },
627
628
  "node_modules/@bastani/atomic-natives-linux-x64-musl": {
628
- "version": "0.9.89",
629
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.89.tgz",
629
+ "version": "0.9.90-alpha.1",
630
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.90-alpha.1.tgz",
630
631
  "license": "MIT",
631
632
  "os": [
632
633
  "linux"
@@ -640,8 +641,8 @@
640
641
  "optional": true
641
642
  },
642
643
  "node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
643
- "version": "0.9.89",
644
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.89.tgz",
644
+ "version": "0.9.90-alpha.1",
645
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.90-alpha.1.tgz",
645
646
  "license": "MIT",
646
647
  "os": [
647
648
  "win32"
@@ -652,8 +653,8 @@
652
653
  "optional": true
653
654
  },
654
655
  "node_modules/@bastani/atomic-natives-win32-x64-msvc": {
655
- "version": "0.9.89",
656
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.89.tgz",
656
+ "version": "0.9.90-alpha.1",
657
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.90-alpha.1.tgz",
657
658
  "license": "MIT",
658
659
  "os": [
659
660
  "win32"
@@ -664,24 +665,24 @@
664
665
  "optional": true
665
666
  },
666
667
  "node_modules/@bastani/atomic-schema": {
667
- "version": "0.9.89",
668
- "resolved": "https://registry.npmjs.org/@bastani/atomic-schema/-/atomic-schema-0.9.89.tgz",
668
+ "version": "0.9.90-alpha.1",
669
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-schema/-/atomic-schema-0.9.90-alpha.1.tgz",
669
670
  "license": "MIT",
670
671
  "engines": {
671
672
  "node": ">=22.19.0"
672
673
  }
673
674
  },
674
675
  "node_modules/@bastani/atomic-telemetry": {
675
- "version": "0.9.89",
676
- "resolved": "https://registry.npmjs.org/@bastani/atomic-telemetry/-/atomic-telemetry-0.9.89.tgz",
676
+ "version": "0.9.90-alpha.1",
677
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-telemetry/-/atomic-telemetry-0.9.90-alpha.1.tgz",
677
678
  "license": "MIT",
678
679
  "engines": {
679
680
  "node": ">=22.19.0"
680
681
  }
681
682
  },
682
683
  "node_modules/@bastani/atomic-tui": {
683
- "version": "0.9.89",
684
- "resolved": "https://registry.npmjs.org/@bastani/atomic-tui/-/atomic-tui-0.9.89.tgz",
684
+ "version": "0.9.90-alpha.1",
685
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-tui/-/atomic-tui-0.9.90-alpha.1.tgz",
685
686
  "license": "MIT",
686
687
  "dependencies": {
687
688
  "get-east-asian-width": "1.7.0",
@@ -3936,6 +3937,27 @@
3936
3937
  "node": ">= 0.8"
3937
3938
  }
3938
3939
  },
3940
+ "node_modules/stream-chain": {
3941
+ "version": "4.4.2",
3942
+ "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-4.4.2.tgz",
3943
+ "integrity": "sha512-6WQtf7XW70N8/IXV4DfpTswi0VHTahsB0nO5UlLGp5HarJN+Q7VHT5HvBMlH9x0x77e+kJFnQkhkCdvFkwv2Vw==",
3944
+ "license": "BSD-3-Clause",
3945
+ "funding": {
3946
+ "url": "https://github.com/sponsors/uhop"
3947
+ }
3948
+ },
3949
+ "node_modules/stream-json": {
3950
+ "version": "3.9.0",
3951
+ "resolved": "https://registry.npmjs.org/stream-json/-/stream-json-3.9.0.tgz",
3952
+ "integrity": "sha512-kL2w6owYCdzCRApK9/9HI7Vgrd+0iWE5tTGc8P/AS2AdPoHcFTQwUek66sbMpfaX73lgHvDN+u1AoRC/dzB1Hw==",
3953
+ "license": "BSD-3-Clause",
3954
+ "dependencies": {
3955
+ "stream-chain": "^4.4.2"
3956
+ },
3957
+ "funding": {
3958
+ "url": "https://github.com/sponsors/uhop"
3959
+ }
3960
+ },
3939
3961
  "node_modules/string_decoder": {
3940
3962
  "version": "1.1.1",
3941
3963
  "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.89",
3
+ "version": "0.9.90-alpha.1",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -78,8 +78,8 @@
78
78
  "start:fast": "bun run bundle:dev && bun dist-dev/cli.js",
79
79
  "build:binary": "bun run clean && bun run build && bun build --target=bun --format=cjs --minify-syntax --external mupdf --external=*native-modifiers.js ./dist/bun/cli.js --outfile dist/app.js && bun build --target=bun --format=cjs --external mupdf ./src/utils/image-resize-worker.ts --outfile dist/image-resize-worker.js && bun run build:codemode-worker && bun build --compile --bytecode --format=cjs --external mupdf --no-compile-autoload-dotenv --no-compile-autoload-bunfig --compile-autoload-package-json ./dist/bun/split-loader.js --outfile dist/atomic && bun run copy-binary-assets && bun run assert-binary-assets",
80
80
  "build:codemode-worker": "bun build --target=bun --format=esm ./src/extensions/codemode/worker.ts --outfile dist/codemode-worker.js && node ../../scripts/package-files.mjs copy ../../node_modules/quickjs-wasi/quickjs.wasm dist/",
81
- "copy-assets": "node ../../scripts/package-files.mjs copy src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && node ../../scripts/package-files.mjs copy src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && node ../../scripts/package-files.mjs copy src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && node ../../scripts/package-files.mjs copy src/core/export-html/vendor/*.js dist/core/export-html/vendor/ && bun run copy-builtin-packages",
82
- "copy-binary-assets": "node ../../scripts/package-files.mjs copy package.json dist/ && node ../../scripts/package-files.mjs copy README.md dist/ && node ../../scripts/package-files.mjs copy CHANGELOG.md dist/ && node ../../scripts/package-files.mjs copy src/modes/interactive/theme/*.json dist/theme/ && node ../../scripts/package-files.mjs copy src/modes/interactive/assets/*.png dist/assets/ && node ../../scripts/package-files.mjs copy src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/export-html/ && node ../../scripts/package-files.mjs copy src/core/export-html/vendor/*.js dist/export-html/vendor/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-modifiers.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-module-path.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-platform.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/native/win32/prebuilds/win32-* dist/native/win32/prebuilds/ && node ../../scripts/package-files.mjs copy docs dist/ && node ../../scripts/package-files.mjs copy examples dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/ && bun run copy-builtin-packages",
81
+ "copy-assets": "node ../../scripts/package-files.mjs copy src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && node ../../scripts/package-files.mjs copy src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && node ../../scripts/package-files.mjs copy src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js src/core/export-html/saved-agent-viewer.js dist/core/export-html/ && node ../../scripts/package-files.mjs copy src/core/export-html/vendor/*.js dist/core/export-html/vendor/ && bun run copy-builtin-packages",
82
+ "copy-binary-assets": "node ../../scripts/package-files.mjs copy package.json dist/ && node ../../scripts/package-files.mjs copy README.md dist/ && node ../../scripts/package-files.mjs copy CHANGELOG.md dist/ && node ../../scripts/package-files.mjs copy src/modes/interactive/theme/*.json dist/theme/ && node ../../scripts/package-files.mjs copy src/modes/interactive/assets/*.png dist/assets/ && node ../../scripts/package-files.mjs copy src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js src/core/export-html/saved-agent-viewer.js dist/export-html/ && node ../../scripts/package-files.mjs copy src/core/export-html/vendor/*.js dist/export-html/vendor/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-modifiers.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-module-path.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-platform.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/native/win32/prebuilds/win32-* dist/native/win32/prebuilds/ && node ../../scripts/package-files.mjs copy docs dist/ && node ../../scripts/package-files.mjs copy examples dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/ && bun run copy-builtin-packages",
83
83
  "copy-builtin-packages": "bun run scripts/copy-builtin-packages.ts",
84
84
  "copy-builtin-workflows": "bun run copy-builtin-packages",
85
85
  "assert-binary-assets": "bun run scripts/assert-pi-runtime-assets.ts --app dist/app.js",
@@ -91,11 +91,11 @@
91
91
  "prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
92
92
  },
93
93
  "dependencies": {
94
- "@bastani/atomic-natives": "0.9.89",
95
- "@bastani/atomic-ai": "0.9.89",
96
- "@bastani/atomic-agent-core": "0.9.89",
97
- "@bastani/atomic-codemode": "0.9.89",
98
- "@bastani/atomic-tui": "0.9.89",
94
+ "@bastani/atomic-natives": "0.9.90-alpha.1",
95
+ "@bastani/atomic-ai": "0.9.90-alpha.1",
96
+ "@bastani/atomic-agent-core": "0.9.90-alpha.1",
97
+ "@bastani/atomic-codemode": "0.9.90-alpha.1",
98
+ "@bastani/atomic-tui": "0.9.90-alpha.1",
99
99
  "@modelcontextprotocol/ext-apps": "^2.0.4",
100
100
  "@modelcontextprotocol/sdk": "1.32.2",
101
101
  "@mozilla/readability": "^0.6.0",
@@ -122,6 +122,7 @@
122
122
  "proper-lockfile": "4.1.2",
123
123
  "quickjs-wasi": "3.6.3",
124
124
  "semver": "7.8.5",
125
+ "stream-json": "3.9.0",
125
126
  "turndown": "^7.2.5",
126
127
  "typebox": "1.3.27",
127
128
  "undici": "8.12.3",