@bastani/atomic 0.8.25 → 0.8.26-alpha.10

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 (332) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +5 -5
  3. package/dist/builtin/intercom/CHANGELOG.md +60 -0
  4. package/dist/builtin/intercom/index-heavy.ts +1754 -0
  5. package/dist/builtin/intercom/index.ts +374 -1746
  6. package/dist/builtin/intercom/package.json +2 -2
  7. package/dist/builtin/intercom/result-renderers.ts +77 -0
  8. package/dist/builtin/mcp/CHANGELOG.md +64 -0
  9. package/dist/builtin/mcp/index.ts +151 -57
  10. package/dist/builtin/mcp/package.json +3 -3
  11. package/dist/builtin/subagents/CHANGELOG.md +61 -0
  12. package/dist/builtin/subagents/agents/codebase-online-researcher.md +9 -9
  13. package/dist/builtin/subagents/agents/debugger.md +6 -6
  14. package/dist/builtin/subagents/package.json +4 -4
  15. package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +1 -1
  16. package/dist/builtin/subagents/skills/browser/EXAMPLES.md +151 -0
  17. package/dist/builtin/subagents/skills/browser/LICENSE.txt +21 -0
  18. package/dist/builtin/subagents/skills/browser/REFERENCE.md +451 -0
  19. package/dist/builtin/subagents/skills/browser/SKILL.md +170 -0
  20. package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
  21. package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +55 -12
  22. package/dist/builtin/subagents/src/runs/foreground/execution.ts +71 -12
  23. package/dist/builtin/subagents/src/runs/shared/acceptance.ts +2 -1
  24. package/dist/builtin/subagents/src/runs/shared/final-drain.ts +34 -0
  25. package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +416 -7
  26. package/dist/builtin/subagents/src/runs/shared/worktree.ts +2 -2
  27. package/dist/builtin/web-access/CHANGELOG.md +60 -0
  28. package/dist/builtin/web-access/index-heavy.ts +2060 -0
  29. package/dist/builtin/web-access/index.ts +182 -2274
  30. package/dist/builtin/web-access/package.json +2 -2
  31. package/dist/builtin/web-access/result-renderers.ts +364 -0
  32. package/dist/builtin/workflows/CHANGELOG.md +75 -0
  33. package/dist/builtin/workflows/README.md +10 -8
  34. package/dist/builtin/workflows/builtin/deep-research-codebase.ts +11 -8
  35. package/dist/builtin/workflows/builtin/goal.ts +137 -109
  36. package/dist/builtin/workflows/builtin/index.d.ts +2 -0
  37. package/dist/builtin/workflows/builtin/open-claude-design.ts +228 -151
  38. package/dist/builtin/workflows/builtin/ralph.d.ts +2 -0
  39. package/dist/builtin/workflows/builtin/ralph.ts +452 -279
  40. package/dist/builtin/workflows/package.json +2 -2
  41. package/dist/builtin/workflows/skills/create-spec/SKILL.md +14 -0
  42. package/dist/builtin/workflows/skills/research-codebase/SKILL.md +29 -10
  43. package/dist/builtin/workflows/src/extension/index.ts +23 -5
  44. package/dist/builtin/workflows/src/extension/runtime.ts +35 -3
  45. package/dist/builtin/workflows/src/extension/wiring.ts +13 -1
  46. package/dist/builtin/workflows/src/runs/background/status.ts +52 -6
  47. package/dist/builtin/workflows/src/runs/foreground/executor.ts +453 -21
  48. package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +130 -13
  49. package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +402 -8
  50. package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -2
  51. package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +2 -2
  52. package/dist/builtin/workflows/src/shared/persistence-restore.ts +182 -6
  53. package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +76 -6
  54. package/dist/builtin/workflows/src/shared/stage-prompt.ts +33 -2
  55. package/dist/builtin/workflows/src/shared/store-types.ts +31 -0
  56. package/dist/builtin/workflows/src/shared/store.ts +160 -18
  57. package/dist/builtin/workflows/src/shared/types.ts +3 -3
  58. package/dist/builtin/workflows/src/shared/workflow-failures.ts +758 -132
  59. package/dist/builtin/workflows/src/tui/inline-form-overlay.ts +12 -3
  60. package/dist/builtin/workflows/src/tui/inline-form-store.ts +17 -6
  61. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +39 -3
  62. package/dist/builtin/workflows/src/tui/store-widget-installer.ts +74 -74
  63. package/dist/core/agent-session-services.d.ts.map +1 -1
  64. package/dist/core/agent-session-services.js +13 -0
  65. package/dist/core/agent-session-services.js.map +1 -1
  66. package/dist/core/agent-session.d.ts +33 -6
  67. package/dist/core/agent-session.d.ts.map +1 -1
  68. package/dist/core/agent-session.js +157 -182
  69. package/dist/core/agent-session.js.map +1 -1
  70. package/dist/core/atomic-guide-command.d.ts.map +1 -1
  71. package/dist/core/atomic-guide-command.js +11 -9
  72. package/dist/core/atomic-guide-command.js.map +1 -1
  73. package/dist/core/compaction/branch-summarization.d.ts +1 -1
  74. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  75. package/dist/core/compaction/branch-summarization.js +6 -3
  76. package/dist/core/compaction/branch-summarization.js.map +1 -1
  77. package/dist/core/compaction/compaction.d.ts.map +1 -1
  78. package/dist/core/compaction/compaction.js +23 -10
  79. package/dist/core/compaction/compaction.js.map +1 -1
  80. package/dist/core/compaction/context-compaction.d.ts +175 -0
  81. package/dist/core/compaction/context-compaction.d.ts.map +1 -0
  82. package/dist/core/compaction/context-compaction.js +1636 -0
  83. package/dist/core/compaction/context-compaction.js.map +1 -0
  84. package/dist/core/compaction/index.d.ts +1 -0
  85. package/dist/core/compaction/index.d.ts.map +1 -1
  86. package/dist/core/compaction/index.js +1 -0
  87. package/dist/core/compaction/index.js.map +1 -1
  88. package/dist/core/extensions/loader.d.ts.map +1 -1
  89. package/dist/core/extensions/loader.js +7 -0
  90. package/dist/core/extensions/loader.js.map +1 -1
  91. package/dist/core/extensions/types.d.ts +16 -3
  92. package/dist/core/extensions/types.d.ts.map +1 -1
  93. package/dist/core/extensions/types.js.map +1 -1
  94. package/dist/core/footer-data-provider.d.ts.map +1 -1
  95. package/dist/core/footer-data-provider.js +3 -0
  96. package/dist/core/footer-data-provider.js.map +1 -1
  97. package/dist/core/index.d.ts +1 -1
  98. package/dist/core/index.d.ts.map +1 -1
  99. package/dist/core/index.js.map +1 -1
  100. package/dist/core/package-manager.d.ts.map +1 -1
  101. package/dist/core/package-manager.js +14 -7
  102. package/dist/core/package-manager.js.map +1 -1
  103. package/dist/core/resource-loader.d.ts.map +1 -1
  104. package/dist/core/resource-loader.js +17 -0
  105. package/dist/core/resource-loader.js.map +1 -1
  106. package/dist/core/session-manager.d.ts +41 -1
  107. package/dist/core/session-manager.d.ts.map +1 -1
  108. package/dist/core/session-manager.js +146 -7
  109. package/dist/core/session-manager.js.map +1 -1
  110. package/dist/core/slash-commands.d.ts.map +1 -1
  111. package/dist/core/slash-commands.js +1 -1
  112. package/dist/core/slash-commands.js.map +1 -1
  113. package/dist/core/timings.d.ts +9 -0
  114. package/dist/core/timings.d.ts.map +1 -1
  115. package/dist/core/timings.js +28 -1
  116. package/dist/core/timings.js.map +1 -1
  117. package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +5 -5
  118. package/dist/core/tools/ask-user-question/tool/format-answer.d.ts.map +1 -1
  119. package/dist/core/tools/ask-user-question/tool/format-answer.js +5 -5
  120. package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
  121. package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +16 -3
  122. package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts.map +1 -1
  123. package/dist/core/tools/ask-user-question/tool/response-envelope.js +21 -3
  124. package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
  125. package/dist/index.d.ts +4 -3
  126. package/dist/index.d.ts.map +1 -1
  127. package/dist/index.js +3 -2
  128. package/dist/index.js.map +1 -1
  129. package/dist/main.d.ts.map +1 -1
  130. package/dist/main.js +4 -2
  131. package/dist/main.js.map +1 -1
  132. package/dist/modes/index.d.ts +1 -1
  133. package/dist/modes/index.d.ts.map +1 -1
  134. package/dist/modes/index.js.map +1 -1
  135. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  136. package/dist/modes/interactive/components/chat-session-host.js +17 -0
  137. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  138. package/dist/modes/interactive/components/context-compaction-summary-message.d.ts +17 -0
  139. package/dist/modes/interactive/components/context-compaction-summary-message.d.ts.map +1 -0
  140. package/dist/modes/interactive/components/context-compaction-summary-message.js +83 -0
  141. package/dist/modes/interactive/components/context-compaction-summary-message.js.map +1 -0
  142. package/dist/modes/interactive/components/custom-message.d.ts +1 -0
  143. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  144. package/dist/modes/interactive/components/custom-message.js +36 -4
  145. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  146. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  147. package/dist/modes/interactive/components/footer.js +4 -1
  148. package/dist/modes/interactive/components/footer.js.map +1 -1
  149. package/dist/modes/interactive/components/index.d.ts +1 -0
  150. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  151. package/dist/modes/interactive/components/index.js +1 -0
  152. package/dist/modes/interactive/components/index.js.map +1 -1
  153. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  154. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  155. package/dist/modes/interactive/interactive-mode.js +94 -17
  156. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  157. package/dist/modes/rpc/rpc-client.d.ts +13 -8
  158. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  159. package/dist/modes/rpc/rpc-client.js +8 -1
  160. package/dist/modes/rpc/rpc-client.js.map +1 -1
  161. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  162. package/dist/modes/rpc/rpc-mode.js +4 -0
  163. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  164. package/dist/modes/rpc/rpc-types.d.ts +14 -3
  165. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  166. package/dist/modes/rpc/rpc-types.js.map +1 -1
  167. package/dist/utils/git-env.d.ts +10 -0
  168. package/dist/utils/git-env.d.ts.map +1 -0
  169. package/dist/utils/git-env.js +33 -0
  170. package/dist/utils/git-env.js.map +1 -0
  171. package/docs/compaction.md +185 -50
  172. package/docs/custom-provider.md +11 -9
  173. package/docs/extensions.md +46 -42
  174. package/docs/index.md +13 -6
  175. package/docs/json.md +15 -12
  176. package/docs/packages.md +2 -0
  177. package/docs/providers.md +4 -1
  178. package/docs/quickstart.md +18 -11
  179. package/docs/rpc.md +38 -23
  180. package/docs/sdk.md +17 -8
  181. package/docs/session-format.md +26 -13
  182. package/docs/sessions.md +3 -3
  183. package/docs/settings.md +2 -2
  184. package/docs/skills.md +1 -15
  185. package/docs/termux.md +9 -10
  186. package/docs/themes.md +2 -2
  187. package/docs/tmux.md +3 -3
  188. package/docs/tui.md +19 -32
  189. package/docs/usage.md +2 -2
  190. package/docs/workflows.md +60 -16
  191. package/package.json +6 -12
  192. package/dist/builtin/subagents/skills/browser-use/SKILL.md +0 -234
  193. package/dist/builtin/subagents/skills/browser-use/references/cdp-python.md +0 -76
  194. package/dist/builtin/subagents/skills/browser-use/references/multi-session.md +0 -92
  195. package/node_modules/@earendil-works/pi-tui/README.md +0 -779
  196. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +0 -54
  197. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +0 -1
  198. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -632
  199. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +0 -1
  200. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +0 -22
  201. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +0 -1
  202. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -104
  203. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +0 -1
  204. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +0 -22
  205. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +0 -1
  206. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +0 -35
  207. package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +0 -1
  208. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +0 -249
  209. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +0 -1
  210. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +0 -1857
  211. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +0 -1
  212. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +0 -28
  213. package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +0 -1
  214. package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -89
  215. package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +0 -1
  216. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +0 -37
  217. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +0 -1
  218. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +0 -378
  219. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +0 -1
  220. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -31
  221. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +0 -1
  222. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +0 -69
  223. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +0 -1
  224. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +0 -96
  225. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +0 -1
  226. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -644
  227. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +0 -1
  228. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +0 -50
  229. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +0 -1
  230. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +0 -159
  231. package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +0 -1
  232. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +0 -50
  233. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +0 -1
  234. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +0 -185
  235. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +0 -1
  236. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +0 -12
  237. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +0 -1
  238. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -23
  239. package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +0 -1
  240. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +0 -19
  241. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +0 -1
  242. package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -89
  243. package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +0 -1
  244. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +0 -13
  245. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +0 -1
  246. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -51
  247. package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +0 -1
  248. package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +0 -39
  249. package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +0 -1
  250. package/node_modules/@earendil-works/pi-tui/dist/editor-component.js +0 -2
  251. package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +0 -1
  252. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +0 -16
  253. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +0 -1
  254. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +0 -110
  255. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +0 -1
  256. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +0 -23
  257. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +0 -1
  258. package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -32
  259. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +0 -1
  260. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +0 -193
  261. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +0 -1
  262. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +0 -174
  263. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +0 -1
  264. package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +0 -184
  265. package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +0 -1
  266. package/node_modules/@earendil-works/pi-tui/dist/keys.js +0 -1173
  267. package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +0 -1
  268. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +0 -28
  269. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +0 -1
  270. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +0 -44
  271. package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +0 -1
  272. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +0 -3
  273. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +0 -1
  274. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +0 -53
  275. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +0 -1
  276. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +0 -50
  277. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +0 -1
  278. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +0 -361
  279. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +0 -1
  280. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -90
  281. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +0 -1
  282. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +0 -366
  283. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +0 -1
  284. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +0 -113
  285. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +0 -1
  286. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -472
  287. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +0 -1
  288. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +0 -227
  289. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +0 -1
  290. package/node_modules/@earendil-works/pi-tui/dist/tui.js +0 -1106
  291. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +0 -1
  292. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +0 -17
  293. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +0 -1
  294. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +0 -25
  295. package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +0 -1
  296. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -84
  297. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +0 -1
  298. package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -1029
  299. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +0 -1
  300. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +0 -25
  301. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +0 -1
  302. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +0 -96
  303. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +0 -1
  304. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
  305. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
  306. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  307. package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  308. package/node_modules/@earendil-works/pi-tui/package.json +0 -47
  309. package/node_modules/get-east-asian-width/index.d.ts +0 -60
  310. package/node_modules/get-east-asian-width/index.js +0 -30
  311. package/node_modules/get-east-asian-width/license +0 -9
  312. package/node_modules/get-east-asian-width/lookup-data.js +0 -21
  313. package/node_modules/get-east-asian-width/lookup.js +0 -138
  314. package/node_modules/get-east-asian-width/package.json +0 -71
  315. package/node_modules/get-east-asian-width/readme.md +0 -65
  316. package/node_modules/get-east-asian-width/utilities.js +0 -24
  317. package/node_modules/marked/LICENSE.md +0 -44
  318. package/node_modules/marked/README.md +0 -106
  319. package/node_modules/marked/bin/main.js +0 -282
  320. package/node_modules/marked/bin/marked.js +0 -15
  321. package/node_modules/marked/lib/marked.cjs +0 -2211
  322. package/node_modules/marked/lib/marked.cjs.map +0 -7
  323. package/node_modules/marked/lib/marked.d.cts +0 -728
  324. package/node_modules/marked/lib/marked.d.ts +0 -728
  325. package/node_modules/marked/lib/marked.esm.js +0 -2189
  326. package/node_modules/marked/lib/marked.esm.js.map +0 -7
  327. package/node_modules/marked/lib/marked.umd.js +0 -2213
  328. package/node_modules/marked/lib/marked.umd.js.map +0 -7
  329. package/node_modules/marked/man/marked.1 +0 -111
  330. package/node_modules/marked/man/marked.1.md +0 -92
  331. package/node_modules/marked/marked.min.js +0 -69
  332. package/node_modules/marked/package.json +0 -111
@@ -16,6 +16,9 @@ import type {
16
16
  RunStatus,
17
17
  StageStatus,
18
18
  WorkflowFailureKind,
19
+ WorkflowFailureCode,
20
+ WorkflowFailureRecoverability,
21
+ WorkflowFailureDisposition,
19
22
  WorkflowNotice,
20
23
  WorkflowChildRunRef,
21
24
  } from "./store-types.js";
@@ -43,9 +46,55 @@ function cannotPause(status: StageStatus): boolean {
43
46
 
44
47
  export interface RunEndMetadata {
45
48
  readonly failureKind?: WorkflowFailureKind;
49
+ readonly failureCode?: WorkflowFailureCode;
50
+ readonly failureRecoverability?: WorkflowFailureRecoverability;
51
+ readonly failureDisposition?: WorkflowFailureDisposition;
46
52
  readonly failureMessage?: string;
47
53
  readonly failedStageId?: string;
48
54
  readonly resumable?: boolean;
55
+ readonly retryAfterMs?: number;
56
+ }
57
+
58
+ export interface RunBlockedMetadata extends RunEndMetadata {
59
+ readonly failureRecoverability: "recoverable";
60
+ readonly failedStageId: string;
61
+ readonly resumable: true;
62
+ readonly blockedAt?: number;
63
+ }
64
+
65
+ function clearRunFailureMetadata(run: RunSnapshot): void {
66
+ delete run.error;
67
+ delete run.failureKind;
68
+ delete run.failureCode;
69
+ delete run.failureRecoverability;
70
+ delete run.failureDisposition;
71
+ delete run.failureMessage;
72
+ delete run.failedStageId;
73
+ delete run.resumable;
74
+ delete run.retryAfterMs;
75
+ delete run.blockedAt;
76
+ }
77
+
78
+ function clearStaleBlockedRunMetadata(run: RunSnapshot, metadata: RunEndMetadata | undefined): void {
79
+ if (metadata?.failureKind === undefined) delete run.failureKind;
80
+ if (metadata?.failureCode === undefined) delete run.failureCode;
81
+ if (metadata?.failureRecoverability === undefined) delete run.failureRecoverability;
82
+ if (metadata?.failureDisposition === undefined) delete run.failureDisposition;
83
+ if (metadata?.failureMessage === undefined) delete run.failureMessage;
84
+ if (metadata?.failedStageId === undefined) delete run.failedStageId;
85
+ if (metadata?.resumable === undefined) delete run.resumable;
86
+ if (metadata?.retryAfterMs === undefined) delete run.retryAfterMs;
87
+ }
88
+
89
+ function applyRunEndMetadata(run: RunSnapshot, metadata: RunEndMetadata): void {
90
+ if (metadata.failureKind !== undefined) run.failureKind = metadata.failureKind;
91
+ if (metadata.failureCode !== undefined) run.failureCode = metadata.failureCode;
92
+ if (metadata.failureRecoverability !== undefined) run.failureRecoverability = metadata.failureRecoverability;
93
+ if (metadata.failureDisposition !== undefined) run.failureDisposition = metadata.failureDisposition;
94
+ if (metadata.retryAfterMs !== undefined) run.retryAfterMs = metadata.retryAfterMs;
95
+ if (metadata.failureMessage !== undefined) run.failureMessage = metadata.failureMessage;
96
+ if (metadata.failedStageId !== undefined) run.failedStageId = metadata.failedStageId;
97
+ if (metadata.resumable !== undefined) run.resumable = metadata.resumable;
49
98
  }
50
99
 
51
100
  export type StagePromptAnswerSource = "workflow_ui" | "workflow_tool";
@@ -95,6 +144,12 @@ export interface Store {
95
144
  error?: string,
96
145
  metadata?: RunEndMetadata,
97
146
  ): boolean;
147
+ /**
148
+ * Record an active, recoverable workflow failure without ending the run.
149
+ * The run remains resumable/running and carries failure metadata for status,
150
+ * persistence restore, and continuation decisions.
151
+ */
152
+ recordRunBlocked(runId: string, error: string, metadata: RunBlockedMetadata): boolean;
98
153
  /**
99
154
  * Remove a run from live workflow history/status. Any pending HIL prompt
100
155
  * waiter is rejected because the workflow will not resume through that path.
@@ -151,6 +206,16 @@ export interface Store {
151
206
  ): boolean;
152
207
  /** Wait for a stage/node-scoped HIL prompt to resolve. */
153
208
  awaitStagePendingPrompt(runId: string, stageId: string, promptId: string): Promise<unknown>;
209
+ /**
210
+ * Record a live-only draft for an active stage-local input/editor prompt.
211
+ * Draft text may contain secrets and must never be copied into snapshots,
212
+ * status output, logs, notifications, or persisted metadata.
213
+ */
214
+ recordStagePromptDraft(runId: string, stageId: string, promptId: string, text: string): boolean;
215
+ /** Return a live-only draft for an active stage-local input/editor prompt, if present. */
216
+ getStagePromptDraft(runId: string, stageId: string, promptId: string): string | undefined;
217
+ /** Clear a live-only draft for a stage-local prompt. */
218
+ clearStagePromptDraft(runId: string, stageId: string, promptId: string): boolean;
154
219
  /**
155
220
  * Return the live-only prompt answer record for a completed prompt stage, if
156
221
  * still available. The returned value may contain secrets and must never be
@@ -239,6 +304,7 @@ export function createStore(): Store {
239
304
  const _notices: WorkflowNotice[] = [];
240
305
  const _listeners: Set<(snap: StoreSnapshot) => void> = new Set();
241
306
  const _stagePromptAnswers = new Map<string, PromptAnswerRecord>();
307
+ const _stagePromptDrafts = new Map<string, string>();
242
308
  let _version = 0;
243
309
 
244
310
  /**
@@ -285,16 +351,36 @@ export function createStore(): Store {
285
351
  return JSON.stringify([runId, stageId]);
286
352
  }
287
353
 
288
- function rejectStagePrompt(stage: StageSnapshot, reason: string): void {
354
+ function stagePromptDraftKey(runId: string, stageId: string, promptId: string): string {
355
+ return JSON.stringify([runId, stageId, promptId]);
356
+ }
357
+
358
+ function stageHasActiveTextPrompt(
359
+ runId: string,
360
+ stageId: string,
361
+ promptId: string,
362
+ ): { prompt: PendingPrompt } | undefined {
363
+ const run = findRun(runId);
364
+ if (!run || TERMINAL_STATUSES.has(run.status)) return undefined;
365
+ const stage = findStage(run, stageId);
366
+ if (!stage || isTerminalStageStatus(stage.status)) return undefined;
367
+ const prompt = stage.pendingPrompt;
368
+ if (!prompt || prompt.id !== promptId) return undefined;
369
+ if (prompt.kind !== "input" && prompt.kind !== "editor") return undefined;
370
+ return { prompt };
371
+ }
372
+
373
+ function rejectStagePrompt(runId: string, stage: StageSnapshot, reason: string): void {
289
374
  const prompt = stage.pendingPrompt;
290
375
  if (!prompt) return;
291
376
  stage.pendingPrompt = undefined;
377
+ _stagePromptDrafts.delete(stagePromptDraftKey(runId, stage.id, prompt.id));
292
378
  rejectPrompt(prompt.id, reason);
293
379
  }
294
380
 
295
- function rejectAllStagePrompts(run: RunSnapshot, reason: string): void {
381
+ function rejectAllStagePrompts(runId: string, run: RunSnapshot, reason: string): void {
296
382
  for (const stage of run.stages) {
297
- rejectStagePrompt(stage, reason);
383
+ rejectStagePrompt(runId, stage, reason);
298
384
  }
299
385
  }
300
386
 
@@ -417,6 +503,10 @@ export function createStore(): Store {
417
503
  existing.result = stage.result;
418
504
  existing.error = stage.error;
419
505
  existing.failureKind = stage.failureKind;
506
+ existing.failureCode = stage.failureCode;
507
+ existing.failureRecoverability = stage.failureRecoverability;
508
+ existing.failureDisposition = stage.failureDisposition;
509
+ existing.retryAfterMs = stage.retryAfterMs;
420
510
  existing.failureMessage = stage.failureMessage;
421
511
  existing.skippedReason = stage.skippedReason;
422
512
  if (stage.replayKey !== undefined) existing.replayKey = stage.replayKey;
@@ -427,7 +517,7 @@ export function createStore(): Store {
427
517
  if (stage.workflowChild !== undefined) existing.workflowChild = structuredClone(stage.workflowChild);
428
518
  delete existing.awaitingInputSince;
429
519
  delete existing.inputRequest;
430
- rejectStagePrompt(existing, `atomic-workflows: stage ${stage.id} ended before prompt resolved`);
520
+ rejectStagePrompt(runId, existing, `atomic-workflows: stage ${stage.id} ended before prompt resolved`);
431
521
  _version++;
432
522
  notify();
433
523
  },
@@ -454,17 +544,26 @@ export function createStore(): Store {
454
544
  run.pausedAt = undefined;
455
545
  }
456
546
  run.durationMs = elapsedRunMs(run, run.endedAt);
457
- if (status === "completed" && result !== undefined) {
458
- run.result = result;
459
- }
460
- if ((status === "failed" || status === "killed") && error !== undefined) {
461
- run.error = error;
462
- }
463
- if (metadata !== undefined) {
464
- if (metadata.failureKind !== undefined) run.failureKind = metadata.failureKind;
465
- if (metadata.failureMessage !== undefined) run.failureMessage = metadata.failureMessage;
466
- if (metadata.failedStageId !== undefined) run.failedStageId = metadata.failedStageId;
467
- if (metadata.resumable !== undefined) run.resumable = metadata.resumable;
547
+ const wasBlocked = run.blockedAt !== undefined || run.failureDisposition === "active_blocked";
548
+ delete run.blockedAt;
549
+ if (status === "completed") {
550
+ if (result !== undefined) {
551
+ run.result = result;
552
+ }
553
+ clearRunFailureMetadata(run);
554
+ } else {
555
+ if (wasBlocked && error === undefined) delete run.error;
556
+ if ((status === "failed" || status === "killed") && error !== undefined) {
557
+ run.error = error;
558
+ }
559
+ if (wasBlocked) clearStaleBlockedRunMetadata(run, metadata);
560
+ if (metadata !== undefined) applyRunEndMetadata(run, metadata);
561
+ if (run.failureDisposition === "active_blocked") delete run.failureDisposition;
562
+ if (status === "killed") {
563
+ run.failureRecoverability = "non_recoverable";
564
+ run.failureDisposition = "terminal_killed";
565
+ run.resumable = false;
566
+ }
468
567
  }
469
568
  // Abandon any waiting HIL prompt — workflow body never resumed past
470
569
  // it, but the awaiter promise must reject so the executor's catch
@@ -474,7 +573,27 @@ export function createStore(): Store {
474
573
  run.pendingPrompt = undefined;
475
574
  rejectPrompt(pending.id, `atomic-workflows: run ${runId} ended before prompt resolved`);
476
575
  }
477
- rejectAllStagePrompts(run, `atomic-workflows: run ${runId} ended before prompt resolved`);
576
+ rejectAllStagePrompts(runId, run, `atomic-workflows: run ${runId} ended before prompt resolved`);
577
+ _version++;
578
+ notify();
579
+ return true;
580
+ },
581
+
582
+ recordRunBlocked(runId: string, error: string, metadata: RunBlockedMetadata): boolean {
583
+ const run = findRun(runId);
584
+ if (!run) return false;
585
+ if (TERMINAL_STATUSES.has(run.status)) return false;
586
+ run.status = "running";
587
+ run.error = error;
588
+ run.failureKind = metadata.failureKind;
589
+ run.failureCode = metadata.failureCode;
590
+ run.failureRecoverability = metadata.failureRecoverability;
591
+ run.failureDisposition = metadata.failureDisposition;
592
+ run.failureMessage = metadata.failureMessage;
593
+ run.failedStageId = metadata.failedStageId;
594
+ run.resumable = metadata.resumable;
595
+ run.blockedAt = metadata.blockedAt ?? Date.now();
596
+ if (metadata.retryAfterMs !== undefined) run.retryAfterMs = metadata.retryAfterMs;
478
597
  _version++;
479
598
  notify();
480
599
  return true;
@@ -488,7 +607,7 @@ export function createStore(): Store {
488
607
  if (pending) {
489
608
  rejectPrompt(pending.id, `atomic-workflows: run ${runId} was removed before prompt resolved`);
490
609
  }
491
- rejectAllStagePrompts(run, `atomic-workflows: run ${runId} was removed before prompt resolved`);
610
+ rejectAllStagePrompts(runId, run, `atomic-workflows: run ${runId} was removed before prompt resolved`);
492
611
  for (const stage of run.stages) {
493
612
  _stagePromptAnswers.delete(stagePromptAnswerKey(runId, stage.id));
494
613
  }
@@ -599,6 +718,7 @@ export function createStore(): Store {
599
718
  if (!stage) return false;
600
719
  const pending = stage.pendingPrompt;
601
720
  if (!pending || pending.id !== promptId) return false;
721
+ _stagePromptDrafts.delete(stagePromptDraftKey(runId, stageId, promptId));
602
722
  if (options.recordAnswer !== false) {
603
723
  _stagePromptAnswers.set(stagePromptAnswerKey(runId, stageId), {
604
724
  runId,
@@ -654,6 +774,21 @@ export function createStore(): Store {
654
774
  });
655
775
  },
656
776
 
777
+ recordStagePromptDraft(runId: string, stageId: string, promptId: string, text: string): boolean {
778
+ if (stageHasActiveTextPrompt(runId, stageId, promptId) === undefined) return false;
779
+ _stagePromptDrafts.set(stagePromptDraftKey(runId, stageId, promptId), text);
780
+ return true;
781
+ },
782
+
783
+ getStagePromptDraft(runId: string, stageId: string, promptId: string): string | undefined {
784
+ if (stageHasActiveTextPrompt(runId, stageId, promptId) === undefined) return undefined;
785
+ return _stagePromptDrafts.get(stagePromptDraftKey(runId, stageId, promptId));
786
+ },
787
+
788
+ clearStagePromptDraft(runId: string, stageId: string, promptId: string): boolean {
789
+ return _stagePromptDrafts.delete(stagePromptDraftKey(runId, stageId, promptId));
790
+ },
791
+
657
792
  getStagePromptAnswer(runId: string, stageId: string): PromptAnswerRecord | undefined {
658
793
  return _stagePromptAnswers.get(stagePromptAnswerKey(runId, stageId));
659
794
  },
@@ -896,7 +1031,13 @@ export function createStore(): Store {
896
1031
  },
897
1032
 
898
1033
  clear(): void {
899
- if (_runs.length === 0 && _notices.length === 0 && _resolvers.size === 0 && _stagePromptAnswers.size === 0) return;
1034
+ if (
1035
+ _runs.length === 0 &&
1036
+ _notices.length === 0 &&
1037
+ _resolvers.size === 0 &&
1038
+ _stagePromptAnswers.size === 0 &&
1039
+ _stagePromptDrafts.size === 0
1040
+ ) return;
900
1041
  _runs.length = 0;
901
1042
  _notices.length = 0;
902
1043
  // Reject any outstanding HIL waiters so background promises terminate
@@ -907,6 +1048,7 @@ export function createStore(): Store {
907
1048
  }
908
1049
  _resolvers.clear();
909
1050
  _stagePromptAnswers.clear();
1051
+ _stagePromptDrafts.clear();
910
1052
  _version++;
911
1053
  notify();
912
1054
  },
@@ -6,7 +6,7 @@
6
6
  import type {
7
7
  AgentSession,
8
8
  AgentSessionEvent,
9
- CompactionResult,
9
+ ContextCompactionResult,
10
10
  CreateAgentSessionOptions,
11
11
  ModelCycleResult,
12
12
  PromptOptions,
@@ -19,7 +19,7 @@ import type * as AuthoringContract from "./authoring-contract.js";
19
19
 
20
20
  export type { TSchema };
21
21
 
22
- export type { AgentSessionEvent, CompactionResult, ModelCycleResult, PromptOptions };
22
+ export type { AgentSessionEvent, ContextCompactionResult, ModelCycleResult, PromptOptions };
23
23
 
24
24
  export type WorkflowModelValue = NonNullable<CreateAgentSessionOptions["model"]> | string;
25
25
  export type WorkflowModelUsage = AuthoringContract.WorkflowModelUsage;
@@ -308,7 +308,7 @@ export interface StageContext {
308
308
  ): Promise<{ editorText?: string; cancelled: boolean }>;
309
309
 
310
310
  /** Compaction. */
311
- compact(customInstructions?: string): Promise<CompactionResult>;
311
+ compact(): Promise<ContextCompactionResult>;
312
312
  abortCompaction(): void;
313
313
 
314
314
  /** Abort current operation. */