@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
@@ -52,10 +52,15 @@ function malformedRunIdMessage(target) {
52
52
  }
53
53
 
54
54
  // dist/builtin/workflows/src/shared/workflow-run-ownership.ts
55
+ var attachmentOwnersKey = Symbol.for("atomic-workflows/run-attachment-owners@1");
56
+ var processState = globalThis;
57
+ var attachmentOwners = processState[attachmentOwnersKey] ?? new WeakMap;
58
+ processState[attachmentOwnersKey] = attachmentOwners;
55
59
  function authoritativeWorkflowChildRunId(stage) {
56
- if (stage === undefined || stage.status === "failed" || stage.status === "skipped") {
60
+ if (stage === undefined)
57
61
  return;
58
- }
62
+ if (stage.status === "failed" || stage.status === "skipped")
63
+ return stage.startedChildRunId;
59
64
  if (stage.status === "completed") {
60
65
  return stage.workflowChild?.runId ?? stage.workflowChildRun?.runId;
61
66
  }
@@ -1611,6 +1616,9 @@ function localTerminalIds(items) {
1611
1616
  const terminals = items.map(itemId).filter((id) => !parents.has(id));
1612
1617
  return terminals.length > 0 ? terminals : items.map(itemId);
1613
1618
  }
1619
+ function isTerminalNonCompletedBoundary(stage) {
1620
+ return stage.status === "failed" || stage.status === "skipped";
1621
+ }
1614
1622
  function projectedToolStatus(tool) {
1615
1623
  if (tool.status === "cached")
1616
1624
  return "completed";
@@ -1777,6 +1785,8 @@ function expandIndexedWorkflowGraph(runById, rootRunId) {
1777
1785
  };
1778
1786
  const visiting = new Set;
1779
1787
  const expandedChildren = new Set;
1788
+ const replacedBoundaries = [];
1789
+ let replacedDepth = 0;
1780
1790
  const expandRun = (run, depth, incomingParentIds) => {
1781
1791
  if (visiting.has(run.id))
1782
1792
  return { stages: [], tools: [], nodes: [], terminalIds: [] };
@@ -1829,7 +1839,13 @@ function expandIndexedWorkflowGraph(runById, rootRunId) {
1829
1839
  boundaryExpansions.set(stage.id, null);
1830
1840
  expandedChildren.add(childRun.id);
1831
1841
  const stageItem = { kind: "stage", stage, sourceIndex: 0 };
1832
- const childExpanded = expandRun(childRun, depth + 1, resolvedParentIdsFor(stageItem));
1842
+ const childParentIds = resolvedParentIdsFor(stageItem);
1843
+ const replaced = isTerminalNonCompletedBoundary(stage);
1844
+ if (replaced)
1845
+ replacedDepth++;
1846
+ const childExpanded = expandRun(childRun, depth + 1, childParentIds);
1847
+ if (replaced)
1848
+ replacedDepth--;
1833
1849
  if (childExpanded.stages.length === 0 || childExpanded.terminalIds.length === 0)
1834
1850
  return;
1835
1851
  boundaryExpansions.set(stage.id, childExpanded);
@@ -1879,6 +1895,13 @@ function expandIndexedWorkflowGraph(runById, rootRunId) {
1879
1895
  }
1880
1896
  const childExpanded = boundaryExpansionFor(item.stage);
1881
1897
  if (childExpanded !== undefined) {
1898
+ if (replacedDepth === 0 && isTerminalNonCompletedBoundary(item.stage))
1899
+ replacedBoundaries.push({
1900
+ ...item.stage,
1901
+ id,
1902
+ parentIds: Object.freeze(resolvedParentIds),
1903
+ workflowGraphTarget: { runId: run.id, stageId: item.stage.id, runName: run.name, depth }
1904
+ });
1882
1905
  stages.push(...childExpanded.stages);
1883
1906
  tools.push(...childExpanded.tools);
1884
1907
  nodes.push(...childExpanded.nodes);
@@ -1920,7 +1943,8 @@ function expandIndexedWorkflowGraph(runById, rootRunId) {
1920
1943
  renderStages: expanded.stages,
1921
1944
  tools: expanded.tools,
1922
1945
  nodes: expanded.nodes,
1923
- targets
1946
+ targets,
1947
+ ...replacedBoundaries.length > 0 ? { replacedBoundaries } : {}
1924
1948
  };
1925
1949
  }
1926
1950
  function sameIds(left, right) {
@@ -2546,6 +2570,9 @@ function createStoreContext(state = createStoreState()) {
2546
2570
  function placeRun(run) {
2547
2571
  const position = runPosition(state, run.id);
2548
2572
  if (position !== undefined) {
2573
+ const previous = state.runs[position].runGeneration;
2574
+ if (previous !== undefined && previous > (run.runGeneration ?? 0))
2575
+ run.runGeneration = previous;
2549
2576
  state.runs[position] = run;
2550
2577
  indexChildRun(state, run);
2551
2578
  return;
@@ -3283,33 +3310,43 @@ function createPromptStoreMethods(context) {
3283
3310
  stage.status = "running";
3284
3311
  delete stage.awaitingInputSince;
3285
3312
  }
3286
- context.bumpAndNotify();
3287
3313
  const entry = state.resolvers.get(promptId);
3288
- if (entry) {
3289
- state.resolvers.delete(promptId);
3290
- entry.resolve(response);
3291
- }
3314
+ state.resolvers.delete(promptId);
3315
+ context.bumpAndNotify();
3316
+ entry?.resolve(response);
3292
3317
  return true;
3293
3318
  },
3294
- awaitStagePendingPrompt(runId, stageId, promptId) {
3295
- return new Promise((resolve, reject) => {
3296
- const run = context.findRun(runId);
3297
- if (!run) {
3298
- reject(new Error(`atomic-workflows: run "${runId}" not found`));
3299
- return;
3300
- }
3301
- const stage = context.findStage(run, stageId);
3302
- if (!stage) {
3303
- reject(new Error(`atomic-workflows: stage "${stageId}" not found on run "${runId}"`));
3304
- return;
3305
- }
3306
- const pending = stage.pendingPrompt;
3307
- if (!pending || pending.id !== promptId) {
3308
- reject(new Error(`atomic-workflows: pending prompt "${promptId}" not registered on stage "${stageId}" in run "${runId}"`));
3309
- return;
3319
+ awaitStagePendingPrompt(runId, stageId, promptId, signal) {
3320
+ if (signal?.aborted)
3321
+ return Promise.reject(signal.reason);
3322
+ const run = context.findRun(runId);
3323
+ if (!run)
3324
+ return Promise.reject(new Error(`atomic-workflows: run "${runId}" not found`));
3325
+ const stage = context.findStage(run, stageId);
3326
+ if (!stage)
3327
+ return Promise.reject(new Error(`atomic-workflows: stage "${stageId}" not found on run "${runId}"`));
3328
+ if (stage.pendingPrompt?.id !== promptId)
3329
+ return Promise.reject(new Error(`atomic-workflows: pending prompt "${promptId}" not registered on stage "${stageId}" in run "${runId}"`));
3330
+ const result = Promise.withResolvers();
3331
+ const abort = () => {
3332
+ if (state.resolvers.get(promptId) === entry)
3333
+ state.resolvers.delete(promptId);
3334
+ result.reject(signal?.reason);
3335
+ };
3336
+ const entry = {
3337
+ promptId,
3338
+ resolve(response) {
3339
+ signal?.removeEventListener("abort", abort);
3340
+ result.resolve(response);
3341
+ },
3342
+ reject(error) {
3343
+ signal?.removeEventListener("abort", abort);
3344
+ result.reject(error);
3310
3345
  }
3311
- state.resolvers.set(promptId, { promptId, resolve, reject });
3312
- });
3346
+ };
3347
+ state.resolvers.set(promptId, entry);
3348
+ signal?.addEventListener("abort", abort, { once: true });
3349
+ return result.promise;
3313
3350
  },
3314
3351
  recordStagePromptAnswer(runId, stageId, prompt, response, options = {}) {
3315
3352
  const run = context.findRun(runId);
@@ -3373,6 +3410,11 @@ function createPromptStoreMethods(context) {
3373
3410
  };
3374
3411
  }
3375
3412
 
3413
+ // dist/builtin/workflows/src/shared/run-generation.ts
3414
+ function generationAtPause(run) {
3415
+ return (run.runGeneration ?? 0) + (run.status === "paused" || run.blockedAt !== undefined ? 0 : 1);
3416
+ }
3417
+
3376
3418
  // dist/builtin/workflows/src/shared/run-visibility.ts
3377
3419
  function isTopLevelWorkflowRun(run) {
3378
3420
  return run.parentRunId === undefined;
@@ -3416,6 +3458,16 @@ function elapsedRunMs(run, now = Date.now()) {
3416
3458
  // dist/builtin/workflows/src/shared/store-run-methods.ts
3417
3459
  function createRunStoreMethods(context) {
3418
3460
  const { state } = context;
3461
+ let lastFinish = 0;
3462
+ const noteFinish = (run, previousStatus, previousSequence) => {
3463
+ if (!isTopLevelWorkflowRun(run) || !TERMINAL_STATUSES.has(run.status)) {
3464
+ delete run.finishSequence;
3465
+ return;
3466
+ }
3467
+ const endedAt = run.endedAt ?? run.startedAt;
3468
+ run.finishSequence ??= previousStatus === undefined ? context.backend?.getWorkflow(run.id)?.finishSequence ?? endedAt : previousSequence ?? Math.max(endedAt, lastFinish + 1);
3469
+ lastFinish = Math.max(lastFinish, run.finishSequence);
3470
+ };
3419
3471
  return {
3420
3472
  runs() {
3421
3473
  return state.runs;
@@ -3448,6 +3500,8 @@ function createRunStoreMethods(context) {
3448
3500
  return null;
3449
3501
  },
3450
3502
  recordRunStart(run) {
3503
+ const previous = context.findRun(run.id);
3504
+ noteFinish(run, previous?.status, previous?.finishSequence);
3451
3505
  context.placeRun(run);
3452
3506
  context.bumpAndNotify({ runId: run.id });
3453
3507
  },
@@ -3456,9 +3510,13 @@ function createRunStoreMethods(context) {
3456
3510
  if (run === undefined)
3457
3511
  return false;
3458
3512
  context.batch(() => {
3513
+ const previousStatus = run.status;
3514
+ const previousSequence = run.finishSequence;
3459
3515
  const edited = edit(run);
3460
- if (edited.run === true)
3516
+ if (edited.run === true) {
3517
+ noteFinish(run, previousStatus, previousSequence);
3461
3518
  context.bumpAndNotify({ runId });
3519
+ }
3462
3520
  for (const stageId of edited.stageIds ?? [])
3463
3521
  context.bumpAndNotify({ runId, stageId });
3464
3522
  for (const toolNodeId of edited.toolNodeIds ?? [])
@@ -3511,8 +3569,16 @@ function createRunStoreMethods(context) {
3511
3569
  if (TERMINAL_STATUSES.has(run.status))
3512
3570
  return false;
3513
3571
  const endedAt = Date.now();
3572
+ const previousStatus = run.status;
3573
+ if (metadata?.runGeneration !== undefined)
3574
+ run.runGeneration = metadata.runGeneration;
3575
+ else if (status === "blocked" && run.status !== "paused" && run.blockedAt === undefined)
3576
+ run.runGeneration = (run.runGeneration ?? 0) + 1;
3514
3577
  run.status = status;
3515
3578
  run.endedAt = endedAt;
3579
+ if (metadata?.finishSequence !== undefined)
3580
+ run.finishSequence = metadata.finishSequence;
3581
+ noteFinish(run, previousStatus);
3516
3582
  if (run.phase !== undefined) {
3517
3583
  run.phase = "ended";
3518
3584
  run.phaseStartedAt = endedAt;
@@ -3570,6 +3636,8 @@ function createRunStoreMethods(context) {
3570
3636
  return false;
3571
3637
  if (TERMINAL_STATUSES.has(run.status))
3572
3638
  return false;
3639
+ if (run.status !== "paused")
3640
+ run.runGeneration = (run.runGeneration ?? 0) + 1;
3573
3641
  run.status = "running";
3574
3642
  run.error = error;
3575
3643
  run.failureKind = metadata.failureKind;
@@ -3608,8 +3676,14 @@ function createRunStoreMethods(context) {
3608
3676
  stages: source.stages.map((stage) => ({ ...stage })),
3609
3677
  toolNodes: source.toolNodes.map((node) => ({ ...node }))
3610
3678
  };
3611
- delete restored.endedAt;
3612
- delete restored.durationMs;
3679
+ delete restored.finishSequence;
3680
+ if (metadata.endedAt === undefined) {
3681
+ delete restored.endedAt;
3682
+ delete restored.durationMs;
3683
+ } else {
3684
+ restored.endedAt = metadata.endedAt;
3685
+ restored.durationMs = elapsedRunMs(restored, metadata.endedAt);
3686
+ }
3613
3687
  restored.failureKind = metadata.failureKind;
3614
3688
  restored.failureCode = metadata.failureCode;
3615
3689
  restored.failureMessage = metadata.failureMessage;
@@ -3669,6 +3743,7 @@ function createRunStoreMethods(context) {
3669
3743
  return false;
3670
3744
  const wasPaused = run.status === "paused";
3671
3745
  if (!wasPaused) {
3746
+ run.runGeneration = generationAtPause(run);
3672
3747
  run.status = "paused";
3673
3748
  run.pausedAt = nextControlTimestamp(pausedAt, run.resumedAt);
3674
3749
  run.resumedAt = undefined;
@@ -3974,6 +4049,10 @@ function createStageStoreMethods(context) {
3974
4049
  existing.replayedFromStageId = stage.replayedFromStageId;
3975
4050
  if (stage.replayed !== undefined)
3976
4051
  existing.replayed = stage.replayed;
4052
+ if ((stage.status === "failed" || stage.status === "skipped") && stage.startedChildRunId !== undefined)
4053
+ existing.startedChildRunId = stage.startedChildRunId;
4054
+ else
4055
+ delete existing.startedChildRunId;
3977
4056
  if (stage.status === "completed") {
3978
4057
  if (stage.workflowChildRun !== undefined)
3979
4058
  existing.workflowChildRun = { ...stage.workflowChildRun };
@@ -40,7 +40,7 @@ import {
40
40
  reviewerFailureText,
41
41
  summarizeReviewConvergence,
42
42
  reverify_consolidated_batch
43
- } from "./chunk-913nwrzq.js";
43
+ } from "./chunk-erpybg3c.js";
44
44
  import {
45
45
  fold_usage
46
46
  } from "./chunk-tgt0s5e5.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  goal_default
3
- } from "./chunk-tjk7jp9a.js";
4
- import"./chunk-913nwrzq.js";
3
+ } from "./chunk-akmcsx14.js";
4
+ import"./chunk-erpybg3c.js";
5
5
  import"./chunk-vw2d8xtd.js";
6
6
  import"./chunk-8y0we065.js";
7
7
  import"./chunk-rpb4eb74.js";
@@ -16,8 +16,8 @@ import {
16
16
  } from "./chunk-0s49sawt.js";
17
17
  import {
18
18
  goal_default
19
- } from "./chunk-tjk7jp9a.js";
20
- import"./chunk-913nwrzq.js";
19
+ } from "./chunk-akmcsx14.js";
20
+ import"./chunk-erpybg3c.js";
21
21
  import"./chunk-8y0we065.js";
22
22
  import {
23
23
  open_claude_design_default
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-wq5etkgr.js";
28
28
  import {
29
29
  ralph_default
30
- } from "./chunk-e07n7en6.js";
30
+ } from "./chunk-wpgpr31s.js";
31
31
  import {
32
32
  tournament_default
33
33
  } from "./chunk-hy8t09wf.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ralph_default
3
- } from "./chunk-e07n7en6.js";
4
- import"./chunk-913nwrzq.js";
3
+ } from "./chunk-wpgpr31s.js";
4
+ import"./chunk-erpybg3c.js";
5
5
  import"./chunk-vw2d8xtd.js";
6
6
  import"./chunk-8y0we065.js";
7
7
  import"./chunk-rpb4eb74.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.89",
3
+ "version": "0.9.90-alpha.1",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -7,7 +7,7 @@ metadata:
7
7
  github-repo: https://github.com/cursor/plugins
8
8
  github-path: pstack/skills/bro
9
9
  github-ref: refs/heads/main
10
- github-tree-sha: 46125561306434d8a1d7745d540d8932ab0cd2a2
10
+ github-tree-sha: 35a90942a7f02e1ebbc2443643179815f2147954
11
11
  disable-model-invocation: true
12
12
  ---
13
13
 
@@ -1,16 +1,16 @@
1
1
  # Claude Fable 5.2 prompting
2
2
 
3
- Distilled from [Anthropic's Fable 5.2 prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-2), checked November 9, 2026. The guide also covers Claude Mythos 5.2, which Anthropic offers with the same capabilities only to organizations verified through its verification programs. For API changes, see [What's new](https://platform.claude.com/docs/en/models/fable-5-2/whats-new-fable-5-2) and the [migration guide](https://platform.claude.com/docs/en/models/fable-5-2/migration-guide). Blocks labeled **Anthropic template** are quoted verbatim from the guide; adapt them to the product and test them. Start with the section that matches the observed behavior.
3
+ Distilled from [Anthropic's Fable 5.2 prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-2), checked November 18, 2026. The guide also covers Claude Mythos 5.2, which Anthropic offers with the same capabilities only to organizations verified through its verification programs. For API changes, see [What's new](https://platform.claude.com/docs/en/models/fable-5-2/whats-new-fable-5-2) and the [Fable 5.2 and Mythos 5.2 migration guide](https://platform.claude.com/docs/en/models/fable-5-2/migration-guide). Blocks labeled **Anthropic template** are quoted verbatim from the guide; adapt them to the product and test them. Start with the section that matches the observed behavior.
4
4
 
5
- Anthropic's positioning: "For most workloads, start with the latest Claude Opus model … and move to Claude Fable 5.2 when your evals on a Claude Opus model at higher effort still don't meet your requirements."
5
+ Anthropic's positioning, from What's new: "For most workloads, start with the latest Claude Opus model … and move to Claude Fable 5.2 when your evals on a Claude Opus model at higher effort still don't meet your requirements."
6
6
 
7
7
  Make system-prompt, notes, and tool-description changes in new conversations only. Fable 5.2 enforces the preserved-thinking prefix check for every account, so a stored conversation resumed with edited `system`, `tools`, or earlier messages can return a 400 error. To change instructions partway through, put them in the newest turn, or append a mid-conversation system message where the platform supports one.
8
8
 
9
9
  ## When effort is uncalibrated or easy requests take too long
10
10
 
11
- Observed behavior: at `high` and above the model "thinks before almost every reply, including a reply to a greeting." An instruction to answer directly without deliberating "didn't stop the model from thinking at `medium` and above." Effort "barely changes how long the model's replies are."
11
+ Observed behavior: at `high` and above the model "thinks before almost every reply, including a reply to a greeting." An instruction to answer directly without deliberating "didn't stop the model from thinking at `medium` and above." "Effort has little effect on the length of assistant turn responses."
12
12
 
13
- Prompt adjustment: start at `high`, the API default, and rerun the effort sweep "instead of carrying over a setting you tuned on Claude Fable 5.1 or Claude Opus 5.5." Use `low` for well-specified, high-volume work such as fast subagents; `medium` for interactive coding, chat, and everyday knowledge work; `high` for hard coding, research, agentic work, and long unattended runs; `xhigh` only "where you've measured a gain"; `max` to measure the ceiling. Move down to `medium` wherever evals show quality holds. Lower effort for easy turns instead of adding "think less" text, and control reply length and tone with the prompt.
13
+ Prompt adjustment: start at `high`, the API default, and rerun the effort sweep "rather than carrying over a setting you tuned on Claude Fable 5.1 or Claude Opus 5.5." Use `low` for quick back-and-forth, well-specified, high-volume work such as fast subagents (on coding evaluations Fable 5.2 does better at `low` than past models did); `medium` for interactive coding, chat, and everyday knowledge work; `high` for hard coding, research, agentic work, and long unattended runs; `xhigh` only "where you've measured a gain"; `max` to measure the ceiling. Move down to `medium` wherever evals show quality holds. Lower effort for easy turns instead of adding "think less" text, and control reply length and tone with the prompt.
14
14
 
15
15
  Caveats: Opus 5.5 defaults to `medium`, so a migrated request that omits `effort` runs one level higher; set it explicitly. Lower effort makes early stops more likely (see the next section). A per-message effort change (beta) keeps the prompt cache and holds until another change replaces it; a new top-level `effort` value starts the cache over.
16
16
 
@@ -39,7 +39,7 @@ Caveats: in Anthropic's replay at `medium`, about half as many sessions ended wi
39
39
 
40
40
  Observed behavior: the model applies approval rules as written. In a simulated test, a rule listing "sending messages to people outside this conversation" among steps needing approval made it hold back roughly half of its routine requests to colleagues and other teams.
41
41
 
42
- Prompt adjustment: when approving, say what you want ("Yes, run the migration on the staging database") instead of "go" or a thumbs-up. In the system prompt, "name the exact actions they cover." Write any exception into the rule itself: a rule that said to get a go-ahead first led the model to take an approved step in about nine tries in ten, while a separate line saying an approved step has its go-ahead barely moved a "never" rule's one in ten.
42
+ Prompt adjustment: when approving, say what you want ("Yes, run the migration on the staging database") instead of "go" or a thumbs-up. In the system prompt, "be specific about the actions you want double-checked," and write any exception into the rule itself (see the caution section below).
43
43
 
44
44
  ## When a coding agent repeats code or reports nearby problems without fixing them
45
45
 
@@ -50,10 +50,10 @@ Prompt adjustment: only where the agent owns the code and should improve its str
50
50
  Anthropic template:
51
51
 
52
52
  ```text
53
- This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it.
53
+ You are the owner and long-term maintainer of this codebase, and its design is up to you.
54
54
  ```
55
55
 
56
- Caveats: with this sentence, Anthropic saw repeated code merged in about half of tries versus under a tenth without it, about 1.5 times the output tokens, unrequested tests and documentation, and a changed existing behavior in one try in six to ten. The closing summary often omitted small changes, so "review the diff and not only the summary." Leave the sentence out where the user owns the code and wants minimal change; a "No drive-by refactors" rule elsewhere in the prompt does not cancel it.
56
+ Caveats: the sentence makes the model much more likely to consolidate duplicated code into one shared function: Anthropic saw it in about 75 percent of runs with the sentence and under 10 percent without. Output tokens rose by about 70 to 80 percent, the model made unrequested changes (many of them new tests and documentation), and in some runs it changed how an existing feature behaves. The closing summary often omitted small changes, so "review the reported diff and the summary." Leave the sentence out where the user owns the code and wants minimal change. A scope rule does not cancel it: with "No drive-by refactors, renames or cleanups" earlier in the same prompt, the model still consolidated duplicated code in more than half of runs.
57
57
 
58
58
  ## When long agentic turns look silent
59
59
 
@@ -79,35 +79,35 @@ Prompt adjustment: first fix the client, not the prompt. Fable 5.2's between-cal
79
79
  Every few tool calls, give the user a one-line update on where things stand.
80
80
  ```
81
81
 
82
- Caveats: the reminder roughly halved the longest silent stretch with no noticeable token increase; leave each reminder in `messages` on later requests, because removing or rewording one invalidates the thinking blocks after it. The opening-and-recap text raised output tokens by roughly 20 percent; use it only where a human is in the loop. Expect several tool calls between updates even with all three. For asynchronous tasks where the user returns for the result, gaps matter less.
82
+ Caveats: the reminder roughly halved the longest silent stretch with no noticeable token increase; leave each reminder in `messages` on later requests, because removing or rewording one invalidates the thinking blocks after it. The opening-and-recap text raised output tokens by roughly 20 percent; use it only where a human is in the loop. Expect several tool calls between updates even with all three. For asynchronous tasks where the user returns for the result, gaps matter less; Anthropic recommends the model for long-running work where nobody needs frequent updates.
83
83
 
84
84
  ## When the agent starts more subagents than the task needs
85
85
 
86
86
  Observed behavior: delegation depends on the harness. With a minimal spawn tool on short tasks the model rarely delegates; with prompts that invite delegation it delegates readily. At `xhigh` and `max` it may use subagents to review its own work.
87
87
 
88
- Prompt adjustment: review standing "delegate" lines in system prompts, skills, and agent files before changing anything else. Rewrite the spawn tool's description only if over-delegation persists: state what a subagent adds to session cost first, then when delegation is and is not worth it, then how to brief the subagent. Anthropic saw about a third less delegation than with a description that mostly listed reasons to delegate, with the same task success. Say less about cost if the model then delegates too little.
88
+ Prompt adjustment: review standing "delegate" lines in system prompts, skills, and agent files before changing anything else. Rewrite the spawn tool's description only if over-delegation persists: state what a subagent adds to session cost first, then when delegation is and is not worth it, then how to brief the subagent. If the model still delegates too much, say more about what a subagent costs and test the change: at `high` effort, a longer description focused on this roughly halved the number of subagents compared to a shorter version. Adapt the description to your requirements and to when it tells the model to delegate.
89
89
 
90
- Caveats: subagents can be a large share of session cost, so "check which model your harness runs subagents on by default."
90
+ Caveats: subagents can be a large share of session cost, so "check which model your subagents use by default." Early testers had good results with Fable 5.2 as the planner and orchestrator for other models.
91
91
 
92
92
  ## When the agent asks for approvals it does not need or holds back routine work
93
93
 
94
- Observed behavior: cautious instructions accumulate in memory, notes, instruction files, and messages between agents, and Fable 5.2 follows them closely, mostly where several agents work together.
94
+ Observed behavior: cautious instructions build up from past sessions through memory, notes, and instruction files, and Fable 5.2 follows them closely and asks for approvals it does not need, mostly where several agents work together.
95
95
 
96
96
  Prompt adjustment:
97
97
 
98
- - Remove notes you no longer need. One stale "never retry" note among a dozen cut retries after a busy tool to about four in ten.
99
- - Name the steps that need no approval. Listing retries raised them from almost none to about half; "a general instruction to act more freely changed nothing." Name retries only for calls that are safe to repeat.
100
- - Check what reviewer agents attach. Even with retries named as needing no approval, a reviewer's "stop at the first error" in context left the model not retrying in about a third of tries.
101
- - Write the exception into the rule (see the approvals section above).
98
+ - Remove notes you no longer need. Memory can hold old instructions such as "never retry" that the model keeps following.
99
+ - Name the steps that need no approval. "Telling the model to act more freely is too vague," so list the routine steps it can take on its own.
100
+ - Check your validation steps. A condition such as "stop and review at the first error" can block autonomous work; remove or narrow the stopping conditions you do not need.
101
+ - Be explicit about exceptions. The model treats an instruction containing "never" as absolute: write "ask for approval before deleting files" instead of "never delete files" when the model should keep responsibility for the action.
102
102
 
103
103
  Caveats: keep your own confirmation step for risky or irreversible actions.
104
104
 
105
- ## When carrying over prompts written for Fable 5.1 or Opus 5.5
105
+ ## When carrying over prompts and harnesses designed for Fable 5.1 or Opus 5.5
106
106
 
107
107
  Review and test these before migrating:
108
108
 
109
109
  - Standing delegation lines (see above).
110
- - A token budget the harness writes into the prompt. Removing a large budget lowered cost with equivalent performance at `high` and `xhigh`. This is prompt text, not the API's task budgets.
110
+ - A token budget shown to the model. Removing a large budget lowered cost with equivalent performance at `high` and `xhigh`. This is prompt text, not the API's task budgets.
111
111
  - Harness code that edits earlier turns. Keep history append-only apart from compaction and context editing; edits invalidate later thinking blocks.
112
112
  - Opus 5.5's "treat that answer as done" chat lines. They reduced thinking on follow-ups, but the model "became far less likely to point out mistakes in its earlier answers." Leave them out where re-examination matters.
113
113
  - Instructions to think less. Remove them and lower effort instead.
@@ -129,11 +129,11 @@ Write for an intelligent but low-context reader. The person reading has not seen
129
129
  Use plain words, and write in clear, understandable full sentences. Do not use a term or abbreviation that you made up during the work. Say what the thing is in a way any reader would understand. Write mostly in the style of ASD-STE100 Simplified Technical English: short sentences, one idea per sentence, active voice, and consistently using the same word for the same thing. Use a paragraph of flowing prose where ideas connect, and keep bullets for lists of separate items. Leave out unnecessary details unless the reader asks and practice concision, but do ensure that your messages have the key context. Aim to make your user-facing text as human-readable and clear as possible.
130
130
  ```
131
131
 
132
- Caveats: Anthropic saw less dense reports with fewer semicolons. Remove old hard style rules before adding it. Add length or required-detail instructions separately.
132
+ Caveats: early testers rated Fable 5.2's writing above Fable 5.1's and similar in clarity to Opus 5.5's. With this text Anthropic saw less dense reports with fewer semicolons, and shorter sentences on workflow automation tasks. Remove old hard style rules before adding it. Add length or required-detail instructions separately.
133
133
 
134
134
  ## When requests are refused
135
135
 
136
- Fable 5.2's classifiers return `stop_reason: "refusal"` with a category: `cyber`, `bio`, `frontier_llm`, `reasoning_extraction`, or `general_harms`. If prompts, skills, or tool descriptions ask the model to write its reasoning in the response, remove those instructions; read summarized thinking blocks instead. Server-side fallback does not retry `reasoning_extraction` refusals. For legitimate cybersecurity or life-sciences work that classifiers block, Anthropic points to its verification programs. Do not add prompt text to work around safeguards.
136
+ Fable 5.2's classifiers return `stop_reason: "refusal"` with a category: `cyber`, `bio`, `frontier_llm`, `reasoning_extraction`, `general_harms`, or `null` when the refusal maps to no named category. If prompts, skills, or tool descriptions ask the model to write its reasoning in the response, remove those instructions; read summarized thinking blocks instead. Server-side fallback does not retry `reasoning_extraction` refusals. For legitimate cybersecurity or life-sciences work that classifiers block, Anthropic points to its verification programs. Do not add prompt text to work around safeguards.
137
137
 
138
138
  ## Validate in this order
139
139
 
@@ -1,10 +1,10 @@
1
1
  # Claude Haiku 5.5 prompting
2
2
 
3
- Distilled from [Anthropic's Haiku 5.5 prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5), checked November 9, 2026. For API changes, see [What's new](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5) and the [migration guide](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide). Anthropic says existing Haiku 4.5 prompts should perform well unchanged. The snippets below are adaptations, not verbatim source quotations, except blocks labeled **Anthropic template**. Use the section matching the observed behavior, not every snippet at once. Add system-prompt text to new conversations only: a request that sends thinking blocks back after `system` changed can return a 400 error. To change instructions partway through, put them in the newest turn, or append a mid-conversation system message where the platform supports one.
3
+ Distilled from [Anthropic's Haiku 5.5 prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5), checked November 18, 2026. For API changes, see [What's new](https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5) and the [migration guide](https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide). Anthropic says existing Haiku 4.5 prompts should perform well unchanged. The snippets below are adaptations, not verbatim source quotations, except blocks labeled **Anthropic template**. Use the section matching the observed behavior, not every snippet at once. Add system-prompt text to new conversations only: a request that sends thinking blocks back after `system` changed can return a 400 error. To change instructions partway through, put them in the newest turn, or append a mid-conversation system message where the platform supports one.
4
4
 
5
5
  ## Use effort to control thinking
6
6
 
7
- Effort replaces Haiku 4.5's thinking-budget approach; evaluate it rather than carrying an old budget over. Start at medium for most work, including agentic coding. Low suits chat, short tool tasks, and simple high-volume requests; high suits knowledge work, longer agent tasks, and strict instruction following. Evaluate xhigh and max only when measured quality gains justify their cost, and compare Sonnet 5.5 on the same cases.
7
+ Effort replaces Haiku 4.5's thinking-budget approach; evaluate it rather than carrying an old budget over. A request that still sets `budget_tokens` returns a 400 error on Haiku 5.5. Start at medium for most work, including agentic coding. Low suits chat, short tool tasks, and simple high-volume requests; high suits knowledge work, longer agent tasks, and strict instruction following. Evaluate xhigh and max only when measured quality gains justify their cost, and compare Sonnet 5.5 on the same cases.
8
8
 
9
9
  Asking the model to answer directly does not reliably reduce thinking; lower effort instead. Thinking is on by default. At low effort, long agent prompts more often skip searches, stop early, or omit checks. Make one targeted adjustment at a time rather than accumulating blanket instructions.
10
10
 
@@ -1,6 +1,6 @@
1
1
  # Claude Opus 5.5 prompting
2
2
 
3
- Distilled from [Anthropic's Opus 5.5 prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5) and [migration guide](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide), checked November 9, 2026. Existing Opus 5 prompts are a useful baseline, but its thinking-disabled advice and default effort do not carry over. The snippets below are adaptations, not verbatim source quotations. Use the section matching the observed behavior, not every snippet at once.
3
+ Distilled from [Anthropic's Opus 5.5 prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5) and [migration guide](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide), checked November 18, 2026. Existing Opus 5 prompts are a useful baseline, but its thinking-disabled advice and default effort do not carry over. The snippets below are adaptations, not verbatim source quotations. Use the section matching the observed behavior, not every snippet at once.
4
4
 
5
5
  ## When an unattended run stops after reporting progress
6
6
 
@@ -22,7 +22,7 @@ Bound automatic continuations to two or three before review. Observe already-run
22
22
 
23
23
  ## When tool loops are silent or updates are vague
24
24
 
25
- If the client hides progress output, a prompt cannot fix that. Otherwise ask for a sparse, concrete cadence:
25
+ First check that the client receives the updates. On Opus 5.5 the notes the model writes between tool calls arrive as progress-update `thinking` blocks, not `text` blocks, and their text is empty at the default `thinking.display`. A client that renders only `text` blocks looks silent during a long agentic turn. Anthropic's guide sets `display: "updates"` (beta) to receive a short summary of each note; this is request configuration, not prompt wording. If the client still hides progress output, a prompt cannot fix that. Otherwise ask for a sparse, concrete cadence:
26
26
 
27
27
  ```text
28
28
  Before the first tool call, briefly state what you are checking. During long work, report material findings and what you will do next. End with the result of the whole task, its validation, and any unresolved limitation. Keep updates factual and short.
@@ -108,7 +108,7 @@ These exclusions are examples, not universal taste rules. Select only those that
108
108
 
109
109
  ## Thinking, history, tool, and refusal notes
110
110
 
111
- - Thinking is always on. To reduce it, lower effort before adding "don't think" instructions. Remove prompts that ask the model to reproduce its reasoning in the response; a short explanation of the answer or a summary of the actions taken is still fine. At `xhigh` or `max`, the migration guide suggests a `max_tokens` of at least 64k as a starting point.
111
+ - Thinking is always on. To reduce it, lower effort before adding "don't think" instructions. Remove prompts that ask the model to reproduce its reasoning in the response; a short explanation of the answer or a summary of the actions taken is still fine. At `xhigh` or `max`, the migration guide suggests a `max_tokens` of at least 64k as a starting point; for long agentic coding turns, the prompting guide reports that 128,000, the model's maximum, worked well in Anthropic's testing. Thinking counts toward `max_tokens` even when it is not returned.
112
112
  - Keep history append-only and put stable instructions first. Append turn-scoped reminders instead of rewriting earlier copies. Changing the top-level `effort` between requests invalidates the prompt cache; a per-message effort change (beta) keeps it, and "holds for every later turn until another one replaces it."
113
113
  - The model decides whether to call a tool, so state clearly in the prompt when each tool applies. A strict argument schema constrains the arguments, not whether a call happens.
114
114
  - Requests to reproduce reasoning in the response can be declined with the `reasoning_extraction` category, which server-side fallback returns instead of retrying. Do not reword requests to get around safeguards.
@@ -1,8 +1,8 @@
1
1
  # GPT-6 family prompting and migration
2
2
 
3
- Use this reference when targeting `gpt-6-astra` or `gpt-6-luna` (or an existing `gpt-6-sol` integration), migrating a prompt to the GPT-6 family, or diagnosing early stops, excessive verification, under-delegation, or writing-style drift. Guidance checked on November 9, 2026 against [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model). The prompt blocks labeled **OpenAI template** are quoted verbatim from that guide. Start from them, then edit the wording to fit the product's approval gates and house style.
3
+ Use this reference when targeting `gpt-6-astra` or `gpt-6-luna` (or an existing `gpt-6-sol` integration), migrating a prompt to the GPT-6 family, or diagnosing early stops, excessive verification, under-delegation, or writing-style drift. Guidance checked on November 18, 2026 against [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra). The prompt blocks labeled **OpenAI template** are quoted verbatim from that guide. Start from them, then edit the wording to fit the product's approval gates and house style.
4
4
 
5
- OpenAI's guide lists four current models: GPT-6 Astra ("Highest intelligence"), GPT-6.1 Sol ("Balanced speed, cost, and intelligence"), GPT-6.1 Terra ("Fast and efficient"), and GPT-6 Luna ("Fastest and most cost-effective"). "If you already use `gpt-6-sol`, review the migration guidance before switching to GPT-6.1 Sol." OpenAI offers the templates below as a starting point for the whole family, but the behaviors they address were observed on Astra. Evaluate them on the chosen model and workload. See [Sol and Luna differences](#sol-and-luna-differences) before choosing effort or a tool-calling API. For `gpt-6.1-sol` and `gpt-6.1-terra`, start with [gpt_6_1_sol.md](gpt_6_1_sol.md) or [gpt_6_1_terra.md](gpt_6_1_terra.md), which link back here for the shared templates. For `gpt-6.2-astra` and `gpt-6.2-sol`, use [gpt_6_2.md](gpt_6_2.md).
5
+ OpenAI's guide covers four current models: "Use GPT-6 Astra for the most demanding work, GPT-6.1 Sol for complex work at lower cost, GPT-6.1 Terra for visual reasoning and writing, or GPT-6 Luna for focused, high-volume tasks." When switching from `gpt-6-sol` to `gpt-6.1-sol`, the guide says to use `low` if the current reasoning effort is `none` and to move Chat Completions requests that call functions to the Responses API. OpenAI offers the templates below as a starting point for the whole family, but the behaviors they address were observed on Astra. Evaluate them on the chosen model and workload. See [Sol and Luna differences](#sol-and-luna-differences) before choosing effort or a tool-calling API. For `gpt-6.1-sol` and `gpt-6.1-terra`, start with [gpt_6_1_sol.md](gpt_6_1_sol.md) or [gpt_6_1_terra.md](gpt_6_1_terra.md), which link back here for the shared templates. For `gpt-6.2-astra` and `gpt-6.2-sol`, use [gpt_6_2.md](gpt_6_2.md).
6
6
 
7
7
  ## When it asks before doing authorized work
8
8
 
@@ -1,6 +1,6 @@
1
1
  # GPT-6.1 Sol prompting and migration
2
2
 
3
- Use this reference when targeting `gpt-6.1-sol` or migrating from `gpt-6-sol`. Distilled from the GPT-6.1 Sol section, limitations, and migration checklist of [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model#gpt-61-sol) and the [model page](https://developers.openai.com/api/docs/models/gpt-6.1-sol), checked November 9, 2026. OpenAI describes Sol 6.1 as delivering near-Astra performance at a lower cost for complex coding, computer use, and professional work. Compare models on your own tasks; this positioning is not a measured improvement for your workload. For GPT-6.1 Terra, see [gpt_6_1_terra.md](gpt_6_1_terra.md); for GPT-6.2 Astra and Sol, see [gpt_6_2.md](gpt_6_2.md).
3
+ Use this reference when targeting `gpt-6.1-sol` or migrating from `gpt-6-sol`. Distilled from the limitations and migration checklist of [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-61-sol) and the [model page](https://developers.openai.com/api/docs/models/gpt-6.1-sol), first checked November 9, 2026 and rechecked November 18, 2026, when the guide had folded its per-model sections into the model pages. The model page describes Sol 6.1 as "Near-Astra performance for complex work at a lower cost." Compare models on your own tasks; this positioning is not a measured improvement for your workload. For GPT-6.1 Terra, see [gpt_6_1_terra.md](gpt_6_1_terra.md); for GPT-6.2 Astra and Sol, see [gpt_6_2.md](gpt_6_2.md).
4
4
 
5
5
  The source separates Sol 6.1 specifications and migration guidance from shared prompt templates. Those templates address behavior observed with Astra, not independently established Sol 6.1 behavior. Apply them only to failures you observe on Sol 6.1. The snippets below are adaptations, not verbatim OpenAI quotations.
6
6
 
@@ -59,7 +59,7 @@ Per OpenAI's migration checklist, Sol 6.1 supports Chat Completions, but tool ca
59
59
 
60
60
  The official guide also describes shared GPT-6 async tool calling, mid-turn steering, and changing reasoning effort while preserving the prompt cache. These require application support. Do not assume Atomic or another host implements each feature because a prompt names it. Check the relevant [async tool calling](https://developers.openai.com/api/docs/guides/async-tool-calling), [steering](https://developers.openai.com/api/docs/guides/steering), or [reasoning configuration](https://developers.openai.com/api/docs/guides/reasoning#change-reasoning-mid-conversation) contract before relying on it.
61
61
 
62
- For application migration details, consult the source's [API and model parameters checklist](https://developers.openai.com/api/docs/guides/latest-model#gpt-6-astra-update-api-and-model-parameters). It covers unsupported sampling and logprob parameters during reasoning, cache configuration changes, and feature compatibility. Those are host changes, not extra prompt instructions. The guide's Fast mode, Ultrafast mode, data-residency, and monitoring statements, including those that name Sol 6.1, are availability and API details, not prompting recommendations.
62
+ For application migration details, consult the source's [API and model parameters checklist](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-6-astra-update-api-and-model-parameters). It covers unsupported sampling and logprob parameters during reasoning, cache configuration changes, and feature compatibility. Those are host changes, not extra prompt instructions. The guide's Fast mode, Ultrafast mode, data-residency, and monitoring statements, including those that name Sol 6.1, are availability and API details, not prompting recommendations.
63
63
 
64
64
  ## Validate one adjustment
65
65
 
@@ -1,6 +1,6 @@
1
1
  # GPT-6.1 Terra prompting and migration
2
2
 
3
- Use this reference when targeting `gpt-6.1-terra` or migrating from GPT-5.6 Terra. Distilled from the GPT-6.1 Terra section and migration checklist of [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model#gpt-61-terra), the [model page](https://developers.openai.com/api/docs/models/gpt-6.1-terra), the [GPT-6.1 Terra announcement](https://openai.com/index/introducing-gpt-6-1-terra), and [A model guide for the GPT-6 family](https://openai.com/index/practical-guide-building-gpt-6/), first checked October 26, 2026 and rechecked November 9, 2026.
3
+ Use this reference when targeting `gpt-6.1-terra` or migrating from GPT-5.6 Terra. Distilled from the migration checklist of [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-61-terra), the [model page](https://developers.openai.com/api/docs/models/gpt-6.1-terra), the [GPT-6.1 Terra announcement](https://openai.com/index/introducing-gpt-6-1-terra), and [A model guide for the GPT-6 family](https://openai.com/index/practical-guide-building-gpt-6/), first checked October 26, 2026 and rechecked November 18, 2026. The guide no longer has a Terra section; its facts now live on the model page.
4
4
 
5
5
  The guide's shared prompt templates address behavior observed with GPT-6 Astra, not independently established Terra behavior. OpenAI gives no Terra-specific prompt wording. Apply the shared templates only to failures you observe on Terra. The snippets below are adaptations, not verbatim OpenAI quotations.
6
6
 
@@ -27,7 +27,7 @@ Replace the placeholders with the actual task. A request to read or extract does
27
27
 
28
28
  ## Choosing reasoning effort
29
29
 
30
- Terra supports `none`, `low`, `medium` (default), `high`, `xhigh`, and `max`. OpenAI's advice is to start with `medium` and increase effort only if the quality improvement is worth the added time and tokens. Unlike GPT-6 Astra and GPT-6.1 Sol, Terra supports `none`.
30
+ Terra supports `none`, `low`, `medium` (default), `high`, `xhigh`, and `max`. Start at the default `medium` and raise effort only when the measured quality gain is worth the added time and tokens. Unlike GPT-6 Astra and GPT-6.1 Sol, Terra supports `none`.
31
31
 
32
32
  The family model guide maps effort to work type across GPT-6 models: `low` for routine tasks such as extracting facts or making small edits, `medium` for work requiring judgment such as planning or comparing options, `high` for difficult debugging, deeper analysis, or careful review, and `xhigh` or `max` to test when `high` falls short, kept only if the improvement justifies the time and cost. The sources do not describe how sensitive Terra is to effort, so measure it rather than assuming the Sol and Luna behavior in the [GPT-6 family reference](gpt_6.md#sol-and-luna-differences) applies.
33
33
 
@@ -39,7 +39,7 @@ OpenAI's migration advice is specific: compare both models on representative ima
39
39
 
40
40
  Run the unchanged prompt on both models first. Measure task success, answer correctness on your images, completion of screen workflows, tool behavior, latency, tokens, and cost per successful task. Change the prompt only for a regression you can point to, and retest after each change.
41
41
 
42
- Two host changes are not prompt fixes. If the application calls tools through Chat Completions, move those requests to the Responses API; Terra supports Chat Completions only for requests without tools. When effort is not `none`, sampling and logprob parameters must be removed; see the source's [API and model parameters checklist](https://developers.openai.com/api/docs/guides/latest-model#gpt-6-astra-update-api-and-model-parameters).
42
+ Two host changes are not prompt fixes. If the application calls tools through Chat Completions, move those requests to the Responses API; Terra supports Chat Completions only for requests without tools. When effort is not `none`, sampling and logprob parameters must be removed; see the source's [API and model parameters checklist](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-6-astra-update-api-and-model-parameters).
43
43
 
44
44
  ## Computer use and screen work
45
45
 
@@ -1,6 +1,6 @@
1
1
  # GPT-6.2 Astra and Sol prompting and migration
2
2
 
3
- Use this reference when targeting `gpt-6.2-astra` or `gpt-6.2-sol`, or migrating from GPT-6.1 Sol, GPT-6 Astra, or GPT-6 Sol. Distilled from [OpenAI's GPT-6.2 guide](https://developers.openai.com/api/docs/guides/latest-model), the [GPT-6.2 Astra](https://developers.openai.com/api/docs/models/gpt-6.2-astra) and [GPT-6.2 Sol](https://developers.openai.com/api/docs/models/gpt-6.2-sol) model pages, and the [keep the prefix unchanged](https://developers.openai.com/api/docs/guides/keep-prefix-unchanged) guide, checked November 17, 2026. For GPT-6.1 Sol, see [gpt_6_1_sol.md](gpt_6_1_sol.md); for GPT-6.1 Terra, see [gpt_6_1_terra.md](gpt_6_1_terra.md).
3
+ Use this reference when targeting `gpt-6.2-astra` or `gpt-6.2-sol`, or migrating from GPT-6.1 Sol, GPT-6 Astra, or GPT-6 Sol. Distilled from [OpenAI's GPT-6.2 guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6.2-astra), the [GPT-6.2 Astra](https://developers.openai.com/api/docs/models/gpt-6.2-astra) and [GPT-6.2 Sol](https://developers.openai.com/api/docs/models/gpt-6.2-sol) model pages, and the [keep the prefix unchanged](https://developers.openai.com/api/docs/guides/keep-prefix-unchanged) guide, checked November 18, 2026. For GPT-6.1 Sol, see [gpt_6_1_sol.md](gpt_6_1_sol.md); for GPT-6.1 Terra, see [gpt_6_1_terra.md](gpt_6_1_terra.md).
4
4
 
5
5
  OpenAI offers the guide's prompts as a starting point for the whole GPT-6.2 family and says they address behaviors seen on GPT-6.2 Astra and Sol. Its behavior list is written for Astra. Apply a template only to a failure you observe on your model and workload. The snippets below are adaptations, not verbatim OpenAI quotations.
6
6
 
@@ -23,7 +23,7 @@ Replace the placeholders with the actual task. A review-only request does not au
23
23
 
24
24
  ## When migrating effort
25
25
 
26
- Both models reject reasoning effort `none`. OpenAI's migration checklist recommends `medium` for a new integration and `low` in place of an existing `none` or `minimal`. OpenAI's Codex catalog lists `low`, `medium`, `high`, `xhigh`, and `max` for both. A prompt cannot enable an unsupported effort or replace the request configuration.
26
+ Both models reject reasoning effort `none`. OpenAI's migration checklist recommends `medium` for a new integration and `low` in place of an existing `none` or `minimal`. OpenAI's Codex catalog lists `low`, `medium`, `high`, `xhigh`, and `max` for both. A prompt cannot enable an unsupported effort or replace the request configuration. Both models support Chat Completions, but tool calling requires the Responses API.
27
27
 
28
28
  Keep the prompt fixed while comparing efforts. Measure completion, correctness, tool behavior, latency, tokens, and cost. OpenAI notes that higher effort can help the model persist through final checks on long tasks; treat that as a hypothesis to test, not a default.
29
29
 
@@ -84,6 +84,7 @@ If the interface needs a particular look, name the imagery and typography, inclu
84
84
  Starting with GPT-6.2, the API drops reasoning items when it detects changes to earlier conversation history, a model downgrade, or a change of end user or organization. Without them, quality can decline and the model may repeat earlier work. Edits to the prefix also cut prompt-cache reuse from the changed point onward.
85
85
 
86
86
  - Append new or changed instructions as a new message instead of editing an earlier system or developer message.
87
+ - Put reusable instructions in a `developer` message as the first item of `input`. Starting with GPT-6.2, the Responses API appends the top-level `instructions` field after `input`, so text there is not part of a cacheable prefix; keep `instructions` for guidance that applies only to the current request.
87
88
  - Leave the request's `tools` parameter and the order of its definitions unchanged. To add tools mid-conversation, append an `additional_tools` input item with the `developer` role and a `tools` array, and replay it at its original position on later requests; to narrow which tools a turn may call, use `tool_choice` with `allowed_tools`. Changing the `tools` list itself is a prefix change. See OpenAI's [keep the prefix unchanged](https://developers.openai.com/api/docs/guides/keep-prefix-unchanged) table.
88
89
  - Change reasoning effort or output format mid-conversation through the API's configuration updates, not by editing the original request.
89
90
  - Shorten long tool output before it first reaches the model rather than truncating it afterwards.