@bastani/atomic 0.9.16-alpha.3 → 0.9.16-alpha.5

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 (405) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +11 -6
  3. package/dist/builtin/intercom/CHANGELOG.md +15 -0
  4. package/dist/builtin/intercom/README.md +6 -4
  5. package/dist/builtin/intercom/broker/broker.ts +34 -8
  6. package/dist/builtin/intercom/broker/client.ts +13 -0
  7. package/dist/builtin/intercom/broker/pending-question-index.ts +50 -0
  8. package/dist/builtin/intercom/broker/send-handler.ts +8 -0
  9. package/dist/builtin/intercom/index.bundle.mjs +2359 -1466
  10. package/dist/builtin/intercom/package.json +2 -2
  11. package/dist/builtin/intercom/skills/intercom/SKILL.md +20 -19
  12. package/dist/builtin/mcp/index.bundle.mjs +2132 -1321
  13. package/dist/builtin/mcp/package.json +2 -2
  14. package/dist/builtin/subagents/CHANGELOG.md +11 -0
  15. package/dist/builtin/subagents/README.md +3 -3
  16. package/dist/builtin/subagents/package.json +3 -3
  17. package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
  18. package/dist/builtin/subagents/src/extension/index.bundle.mjs +3059 -1861
  19. package/dist/builtin/web-access/index.bundle.mjs +2113 -1302
  20. package/dist/builtin/web-access/package.json +2 -2
  21. package/dist/builtin/workflows/CHANGELOG.md +20 -0
  22. package/dist/builtin/workflows/README.md +1 -1
  23. package/dist/builtin/workflows/builtin/goal-ledger.ts +54 -10
  24. package/dist/builtin/workflows/builtin/goal-runner.ts +57 -12
  25. package/dist/builtin/workflows/package.json +2 -2
  26. package/dist/builtin/workflows/src/extension/index.bundle.mjs +13948 -12304
  27. package/dist/builtin/workflows/src/index.bundle.mjs +2642 -1526
  28. package/dist/bun/split-loader.js +2 -1
  29. package/dist/bun/split-loader.js.map +1 -1
  30. package/dist/cli/args.d.ts.map +1 -1
  31. package/dist/cli/args.js +6 -1
  32. package/dist/cli/args.js.map +1 -1
  33. package/dist/cli/file-processor.d.ts.map +1 -1
  34. package/dist/cli/file-processor.js +2 -1
  35. package/dist/cli/file-processor.js.map +1 -1
  36. package/dist/config-package-identity.d.ts +22 -0
  37. package/dist/config-package-identity.d.ts.map +1 -0
  38. package/dist/config-package-identity.js +74 -0
  39. package/dist/config-package-identity.js.map +1 -0
  40. package/dist/config.d.ts.map +1 -1
  41. package/dist/config.js +7 -11
  42. package/dist/config.js.map +1 -1
  43. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  44. package/dist/core/agent-session-auto-compaction.js +64 -28
  45. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  46. package/dist/core/agent-session-compaction.d.ts +2 -0
  47. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  48. package/dist/core/agent-session-compaction.js +25 -5
  49. package/dist/core/agent-session-compaction.js.map +1 -1
  50. package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
  51. package/dist/core/agent-session-custom-message-commit.js +12 -0
  52. package/dist/core/agent-session-custom-message-commit.js.map +1 -1
  53. package/dist/core/agent-session-events.d.ts.map +1 -1
  54. package/dist/core/agent-session-events.js +2 -0
  55. package/dist/core/agent-session-events.js.map +1 -1
  56. package/dist/core/agent-session-export.d.ts +3 -1
  57. package/dist/core/agent-session-export.d.ts.map +1 -1
  58. package/dist/core/agent-session-export.js +22 -2
  59. package/dist/core/agent-session-export.js.map +1 -1
  60. package/dist/core/agent-session-message-queue.d.ts +3 -0
  61. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  62. package/dist/core/agent-session-message-queue.js +10 -0
  63. package/dist/core/agent-session-message-queue.js.map +1 -1
  64. package/dist/core/agent-session-methods.d.ts +15 -9
  65. package/dist/core/agent-session-methods.d.ts.map +1 -1
  66. package/dist/core/agent-session-methods.js.map +1 -1
  67. package/dist/core/agent-session-models.d.ts +8 -13
  68. package/dist/core/agent-session-models.d.ts.map +1 -1
  69. package/dist/core/agent-session-models.js +53 -19
  70. package/dist/core/agent-session-models.js.map +1 -1
  71. package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
  72. package/dist/core/agent-session-post-tool-compaction.js +12 -0
  73. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  74. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  75. package/dist/core/agent-session-prompt.js +3 -1
  76. package/dist/core/agent-session-prompt.js.map +1 -1
  77. package/dist/core/agent-session-tool-registry.js +3 -3
  78. package/dist/core/agent-session-tool-registry.js.map +1 -1
  79. package/dist/core/agent-session-transfer.d.ts.map +1 -1
  80. package/dist/core/agent-session-transfer.js +1 -0
  81. package/dist/core/agent-session-transfer.js.map +1 -1
  82. package/dist/core/agent-session-tree.d.ts.map +1 -1
  83. package/dist/core/agent-session-tree.js +1 -1
  84. package/dist/core/agent-session-tree.js.map +1 -1
  85. package/dist/core/agent-session-types.d.ts +3 -0
  86. package/dist/core/agent-session-types.d.ts.map +1 -1
  87. package/dist/core/agent-session-types.js.map +1 -1
  88. package/dist/core/agent-session.d.ts +2 -0
  89. package/dist/core/agent-session.d.ts.map +1 -1
  90. package/dist/core/agent-session.js +2 -0
  91. package/dist/core/agent-session.js.map +1 -1
  92. package/dist/core/auth-storage-backends.d.ts.map +1 -1
  93. package/dist/core/auth-storage-backends.js +10 -6
  94. package/dist/core/auth-storage-backends.js.map +1 -1
  95. package/dist/core/auth-storage.d.ts.map +1 -1
  96. package/dist/core/auth-storage.js +4 -3
  97. package/dist/core/auth-storage.js.map +1 -1
  98. package/dist/core/builtin-packages.d.ts.map +1 -1
  99. package/dist/core/builtin-packages.js +2 -1
  100. package/dist/core/builtin-packages.js.map +1 -1
  101. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  102. package/dist/core/compaction/branch-summarization.js +6 -0
  103. package/dist/core/compaction/branch-summarization.js.map +1 -1
  104. package/dist/core/compaction/compaction-runner.d.ts +3 -1
  105. package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
  106. package/dist/core/compaction/compaction-runner.js +30 -4
  107. package/dist/core/compaction/compaction-runner.js.map +1 -1
  108. package/dist/core/compaction/compaction-types.d.ts +3 -1
  109. package/dist/core/compaction/compaction-types.d.ts.map +1 -1
  110. package/dist/core/compaction/compaction-types.js.map +1 -1
  111. package/dist/core/compaction/range-planner.d.ts +3 -1
  112. package/dist/core/compaction/range-planner.d.ts.map +1 -1
  113. package/dist/core/compaction/range-planner.js +11 -1
  114. package/dist/core/compaction/range-planner.js.map +1 -1
  115. package/dist/core/compaction/session-summarization.d.ts.map +1 -1
  116. package/dist/core/compaction/session-summarization.js +6 -0
  117. package/dist/core/compaction/session-summarization.js.map +1 -1
  118. package/dist/core/extensions/api-types.d.ts +8 -3
  119. package/dist/core/extensions/api-types.d.ts.map +1 -1
  120. package/dist/core/extensions/api-types.js.map +1 -1
  121. package/dist/core/extensions/index.d.ts +2 -2
  122. package/dist/core/extensions/index.d.ts.map +1 -1
  123. package/dist/core/extensions/index.js +1 -1
  124. package/dist/core/extensions/index.js.map +1 -1
  125. package/dist/core/extensions/loader-api.d.ts +5 -1
  126. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  127. package/dist/core/extensions/loader-api.js +124 -36
  128. package/dist/core/extensions/loader-api.js.map +1 -1
  129. package/dist/core/extensions/loader-core.d.ts.map +1 -1
  130. package/dist/core/extensions/loader-core.js +18 -4
  131. package/dist/core/extensions/loader-core.js.map +1 -1
  132. package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
  133. package/dist/core/extensions/loader-runtime.js +10 -2
  134. package/dist/core/extensions/loader-runtime.js.map +1 -1
  135. package/dist/core/extensions/session-events.d.ts +11 -2
  136. package/dist/core/extensions/session-events.d.ts.map +1 -1
  137. package/dist/core/extensions/session-events.js.map +1 -1
  138. package/dist/core/extensions/tool-events.d.ts +13 -3
  139. package/dist/core/extensions/tool-events.d.ts.map +1 -1
  140. package/dist/core/extensions/tool-events.js +3 -0
  141. package/dist/core/extensions/tool-events.js.map +1 -1
  142. package/dist/core/extensions/types.d.ts +1 -1
  143. package/dist/core/extensions/types.d.ts.map +1 -1
  144. package/dist/core/extensions/types.js +1 -1
  145. package/dist/core/extensions/types.js.map +1 -1
  146. package/dist/core/extensions/ui-types.d.ts +2 -2
  147. package/dist/core/extensions/ui-types.js.map +1 -1
  148. package/dist/core/footer-data-provider.d.ts +1 -1
  149. package/dist/core/footer-data-provider.js +1 -1
  150. package/dist/core/footer-data-provider.js.map +1 -1
  151. package/dist/core/keybindings.d.ts +17 -16
  152. package/dist/core/keybindings.d.ts.map +1 -1
  153. package/dist/core/keybindings.js +23 -6
  154. package/dist/core/keybindings.js.map +1 -1
  155. package/dist/core/model-config.d.ts.map +1 -1
  156. package/dist/core/model-config.js +2 -1
  157. package/dist/core/model-config.js.map +1 -1
  158. package/dist/core/model-resolver-initial.d.ts +1 -0
  159. package/dist/core/model-resolver-initial.d.ts.map +1 -1
  160. package/dist/core/model-resolver-initial.js +9 -5
  161. package/dist/core/model-resolver-initial.js.map +1 -1
  162. package/dist/core/models-store.d.ts.map +1 -1
  163. package/dist/core/models-store.js +2 -1
  164. package/dist/core/models-store.js.map +1 -1
  165. package/dist/core/package-manager-git.d.ts.map +1 -1
  166. package/dist/core/package-manager-git.js +2 -1
  167. package/dist/core/package-manager-git.js.map +1 -1
  168. package/dist/core/package-manager-manifest.d.ts.map +1 -1
  169. package/dist/core/package-manager-manifest.js +2 -1
  170. package/dist/core/package-manager-manifest.js.map +1 -1
  171. package/dist/core/package-manager-npm.d.ts.map +1 -1
  172. package/dist/core/package-manager-npm.js +4 -3
  173. package/dist/core/package-manager-npm.js.map +1 -1
  174. package/dist/core/package-manager-operations.d.ts.map +1 -1
  175. package/dist/core/package-manager-operations.js +2 -1
  176. package/dist/core/package-manager-operations.js.map +1 -1
  177. package/dist/core/package-manager-resource-collector.d.ts.map +1 -1
  178. package/dist/core/package-manager-resource-collector.js +2 -1
  179. package/dist/core/package-manager-resource-collector.js.map +1 -1
  180. package/dist/core/package-manager-resource-files.d.ts.map +1 -1
  181. package/dist/core/package-manager-resource-files.js +7 -2
  182. package/dist/core/package-manager-resource-files.js.map +1 -1
  183. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  184. package/dist/core/remote-catalog-provider.js +2 -1
  185. package/dist/core/remote-catalog-provider.js.map +1 -1
  186. package/dist/core/resource-loader-context-files.d.ts.map +1 -1
  187. package/dist/core/resource-loader-context-files.js +3 -2
  188. package/dist/core/resource-loader-context-files.js.map +1 -1
  189. package/dist/core/sdk-exports.d.ts +5 -3
  190. package/dist/core/sdk-exports.d.ts.map +1 -1
  191. package/dist/core/sdk-exports.js +4 -2
  192. package/dist/core/sdk-exports.js.map +1 -1
  193. package/dist/core/sdk.d.ts.map +1 -1
  194. package/dist/core/sdk.js +7 -3
  195. package/dist/core/sdk.js.map +1 -1
  196. package/dist/core/session-manager-core.d.ts +2 -2
  197. package/dist/core/session-manager-core.d.ts.map +1 -1
  198. package/dist/core/session-manager-core.js +4 -4
  199. package/dist/core/session-manager-core.js.map +1 -1
  200. package/dist/core/session-manager-entries.d.ts +2 -2
  201. package/dist/core/session-manager-entries.d.ts.map +1 -1
  202. package/dist/core/session-manager-entries.js +4 -3
  203. package/dist/core/session-manager-entries.js.map +1 -1
  204. package/dist/core/session-manager-storage.d.ts.map +1 -1
  205. package/dist/core/session-manager-storage.js +4 -2
  206. package/dist/core/session-manager-storage.js.map +1 -1
  207. package/dist/core/session-manager-types.d.ts +2 -0
  208. package/dist/core/session-manager-types.d.ts.map +1 -1
  209. package/dist/core/session-manager-types.js.map +1 -1
  210. package/dist/core/settings-diagnostics.d.ts +4 -0
  211. package/dist/core/settings-diagnostics.d.ts.map +1 -0
  212. package/dist/core/settings-diagnostics.js +12 -0
  213. package/dist/core/settings-diagnostics.js.map +1 -0
  214. package/dist/core/settings-manager-basic-accessors.d.ts +4 -0
  215. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  216. package/dist/core/settings-manager-basic-accessors.js +23 -0
  217. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  218. package/dist/core/settings-manager-core.d.ts.map +1 -1
  219. package/dist/core/settings-manager-core.js +10 -2
  220. package/dist/core/settings-manager-core.js.map +1 -1
  221. package/dist/core/settings-storage.d.ts.map +1 -1
  222. package/dist/core/settings-storage.js +10 -3
  223. package/dist/core/settings-storage.js.map +1 -1
  224. package/dist/core/settings-types.d.ts +2 -0
  225. package/dist/core/settings-types.d.ts.map +1 -1
  226. package/dist/core/settings-types.js.map +1 -1
  227. package/dist/core/skills.d.ts.map +1 -1
  228. package/dist/core/skills.js +51 -33
  229. package/dist/core/skills.js.map +1 -1
  230. package/dist/core/slash-commands.d.ts.map +1 -1
  231. package/dist/core/slash-commands.js +3 -2
  232. package/dist/core/slash-commands.js.map +1 -1
  233. package/dist/core/system-prompt.d.ts.map +1 -1
  234. package/dist/core/system-prompt.js +11 -2
  235. package/dist/core/system-prompt.js.map +1 -1
  236. package/dist/core/tools/ask-user-question/config.d.ts.map +1 -1
  237. package/dist/core/tools/ask-user-question/config.js +2 -1
  238. package/dist/core/tools/ask-user-question/config.js.map +1 -1
  239. package/dist/core/tools/bash.d.ts +13 -1
  240. package/dist/core/tools/bash.d.ts.map +1 -1
  241. package/dist/core/tools/bash.js +9 -5
  242. package/dist/core/tools/bash.js.map +1 -1
  243. package/dist/core/tools/index.d.ts +21 -5
  244. package/dist/core/tools/index.d.ts.map +1 -1
  245. package/dist/core/tools/index.js +45 -13
  246. package/dist/core/tools/index.js.map +1 -1
  247. package/dist/core/tools/powershell.d.ts +83 -0
  248. package/dist/core/tools/powershell.d.ts.map +1 -0
  249. package/dist/core/tools/powershell.js +89 -0
  250. package/dist/core/tools/powershell.js.map +1 -0
  251. package/dist/core/usage-totals.d.ts.map +1 -1
  252. package/dist/core/usage-totals.js +2 -1
  253. package/dist/core/usage-totals.js.map +1 -1
  254. package/dist/extensions/llama/client.d.ts +6 -0
  255. package/dist/extensions/llama/client.d.ts.map +1 -1
  256. package/dist/extensions/llama/client.js +12 -0
  257. package/dist/extensions/llama/client.js.map +1 -1
  258. package/dist/extensions/llama/index.d.ts.map +1 -1
  259. package/dist/extensions/llama/index.js +2 -0
  260. package/dist/extensions/llama/index.js.map +1 -1
  261. package/dist/extensions/llama/provider.d.ts +3 -1
  262. package/dist/extensions/llama/provider.d.ts.map +1 -1
  263. package/dist/extensions/llama/provider.js +25 -8
  264. package/dist/extensions/llama/provider.js.map +1 -1
  265. package/dist/index-extensions.d.ts +2 -2
  266. package/dist/index-extensions.d.ts.map +1 -1
  267. package/dist/index-extensions.js +1 -1
  268. package/dist/index-extensions.js.map +1 -1
  269. package/dist/index.d.ts +4 -3
  270. package/dist/index.d.ts.map +1 -1
  271. package/dist/index.js +4 -3
  272. package/dist/index.js.map +1 -1
  273. package/dist/main-stdio.d.ts.map +1 -1
  274. package/dist/main-stdio.js +4 -2
  275. package/dist/main-stdio.js.map +1 -1
  276. package/dist/main.d.ts.map +1 -1
  277. package/dist/main.js +10 -3
  278. package/dist/main.js.map +1 -1
  279. package/dist/migrations-config-values.d.ts.map +1 -1
  280. package/dist/migrations-config-values.js +2 -1
  281. package/dist/migrations-config-values.js.map +1 -1
  282. package/dist/migrations.d.ts.map +1 -1
  283. package/dist/migrations.js +5 -4
  284. package/dist/migrations.js.map +1 -1
  285. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  286. package/dist/modes/interactive/components/footer.js +2 -1
  287. package/dist/modes/interactive/components/footer.js.map +1 -1
  288. package/dist/modes/interactive/components/model-selector.d.ts +2 -2
  289. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  290. package/dist/modes/interactive/components/model-selector.js +27 -16
  291. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  292. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  293. package/dist/modes/interactive/components/settings-selector-items.js +67 -14
  294. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  295. package/dist/modes/interactive/components/settings-selector-submenus.d.ts +7 -1
  296. package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
  297. package/dist/modes/interactive/components/settings-selector-submenus.js +38 -3
  298. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  299. package/dist/modes/interactive/components/settings-selector-types.d.ts +5 -1
  300. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  301. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  302. package/dist/modes/interactive/components/thinking-selector.d.ts +15 -6
  303. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  304. package/dist/modes/interactive/components/thinking-selector.js +65 -27
  305. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  306. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  307. package/dist/modes/interactive/external-editor.js +2 -1
  308. package/dist/modes/interactive/external-editor.js.map +1 -1
  309. package/dist/modes/interactive/interactive-agent-events.js +2 -0
  310. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  311. package/dist/modes/interactive/interactive-auth-login.d.ts +1 -1
  312. package/dist/modes/interactive/interactive-auth-login.d.ts.map +1 -1
  313. package/dist/modes/interactive/interactive-auth-login.js +9 -1
  314. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  315. package/dist/modes/interactive/interactive-autocomplete.js +9 -0
  316. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  317. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  318. package/dist/modes/interactive/interactive-deferred-startup.js +2 -0
  319. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  320. package/dist/modes/interactive/interactive-editor-actions.js +11 -10
  321. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  322. package/dist/modes/interactive/interactive-input-handling.js +6 -0
  323. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  324. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -0
  325. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  326. package/dist/modes/interactive/interactive-mode-deps.js +1 -0
  327. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  328. package/dist/modes/interactive/interactive-mode-surface.d.ts +7 -0
  329. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  330. package/dist/modes/interactive/interactive-mode-surface.js +0 -1
  331. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  332. package/dist/modes/interactive/interactive-mode-types.d.ts +3 -0
  333. package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
  334. package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
  335. package/dist/modes/interactive/interactive-model-routing.d.ts +16 -1
  336. package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
  337. package/dist/modes/interactive/interactive-model-routing.js +62 -3
  338. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  339. package/dist/modes/interactive/interactive-render-chat.js +18 -0
  340. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  341. package/dist/modes/interactive/interactive-selectors.js +10 -8
  342. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  343. package/dist/modes/interactive/interactive-slash-commands.js +6 -5
  344. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  345. package/dist/modes/interactive/interactive-startup.js +9 -1
  346. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  347. package/dist/modes/interactive/theme/theme-parse.d.ts.map +1 -1
  348. package/dist/modes/interactive/theme/theme-parse.js +2 -1
  349. package/dist/modes/interactive/theme/theme-parse.js.map +1 -1
  350. package/dist/modes/json-event.d.ts +15 -18
  351. package/dist/modes/json-event.d.ts.map +1 -1
  352. package/dist/modes/json-event.js +21 -17
  353. package/dist/modes/json-event.js.map +1 -1
  354. package/dist/modes/rpc/rpc-client-api.d.ts +4 -0
  355. package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
  356. package/dist/modes/rpc/rpc-client-api.js +3 -0
  357. package/dist/modes/rpc/rpc-client-api.js.map +1 -1
  358. package/dist/utils/frontmatter.d.ts.map +1 -1
  359. package/dist/utils/frontmatter.js +2 -1
  360. package/dist/utils/frontmatter.js.map +1 -1
  361. package/dist/utils/management-http.d.ts +2 -0
  362. package/dist/utils/management-http.d.ts.map +1 -1
  363. package/dist/utils/management-http.js +11 -7
  364. package/dist/utils/management-http.js.map +1 -1
  365. package/dist/utils/shell.d.ts +3 -0
  366. package/dist/utils/shell.d.ts.map +1 -1
  367. package/dist/utils/shell.js +41 -10
  368. package/dist/utils/shell.js.map +1 -1
  369. package/dist/utils/syntax-highlight.d.ts +1 -0
  370. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  371. package/dist/utils/syntax-highlight.js +61 -1
  372. package/dist/utils/syntax-highlight.js.map +1 -1
  373. package/dist/utils/text.d.ts +8 -0
  374. package/dist/utils/text.d.ts.map +1 -0
  375. package/dist/utils/text.js +9 -0
  376. package/dist/utils/text.js.map +1 -0
  377. package/docs/changelog.mdx +1 -1
  378. package/docs/compaction.md +16 -3
  379. package/docs/containerization.md +17 -0
  380. package/docs/custom-provider.md +1 -1
  381. package/docs/environment-variables.md +3 -3
  382. package/docs/extensions.md +22 -5
  383. package/docs/index.md +12 -10
  384. package/docs/intercom.md +5 -3
  385. package/docs/keybindings.md +1 -1
  386. package/docs/llama-cpp.md +1 -1
  387. package/docs/models.md +2 -0
  388. package/docs/quickstart.md +80 -9
  389. package/docs/rpc.md +24 -1
  390. package/docs/sdk.md +11 -0
  391. package/docs/settings.md +16 -7
  392. package/docs/skills.md +3 -2
  393. package/docs/subagents.md +7 -0
  394. package/docs/termux.md +1 -1
  395. package/docs/usage.md +4 -3
  396. package/docs/windows.md +33 -3
  397. package/docs/workflows.md +20 -10
  398. package/examples/extensions/border-status-editor.ts +1 -1
  399. package/examples/extensions/git-checkpoint.ts +1 -1
  400. package/examples/extensions/notify.ts +1 -1
  401. package/examples/extensions/titlebar-spinner.ts +1 -1
  402. package/examples/rpc-extension-ui.ts +1 -1
  403. package/examples/sdk/README.md +1 -1
  404. package/npm-shrinkwrap.json +73 -65
  405. package/package.json +11 -13
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.16-alpha.3",
3
+ "version": "0.9.16-alpha.5",
4
4
  "private": true,
5
5
  "description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
6
6
  "contributors": [
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@bastani/atomic": "*",
34
- "@earendil-works/pi-tui": "^0.84.2"
34
+ "@earendil-works/pi-tui": "^0.84.3"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@bastani/atomic": {
@@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.9.16-alpha.5] - 2026-08-26
10
+
11
+ ### Changed
12
+
13
+ - Raised the public `workflow` tool request deadline from 30 seconds to two minutes. Timed-out requests still return `WORKFLOW_TIMEOUT` with `timeoutMs: 120000`, abort cancellable work, discard late settlement, and never retry. Mutating actions keep the unknown-outcome warning that tells callers to inspect workflow status before retrying ([#2654](https://github.com/bastani-inc/atomic/issues/2654)).
14
+ - Agent guidance now treats "no budget" as the default for workflow runs. A `budget` is passed on `run`/`resume` only when the operator asked for a limit, and only the fields they named; otherwise the field is omitted so the workflow declaration and config resolve normally.
15
+ - Agent guidance now assumes the existing 15-minute heartbeat cadence and does not shorten, lengthen, or disable it unless the operator asks. Heartbeats are documented as periodic alignment checks rather than failure signals, so a progressing run is not interrupted, re-capped, or polled in response to one.
16
+
17
+ ### Fixed
18
+
19
+ - Fixed running durable `ctx.tool` message blocks showing a trailing `●` after the tool call header; running and completed calls now use the same marker-free `$ <tool-name>` presentation while other tool-state markers remain unchanged.
20
+ - Fixed a completed `ctx.task` leaving the root raw `running` with no active stage or tool and no path to the next budget boundary. The durable task-result checkpoint now fails closed, duration is rechecked after that checkpoint, quit/interrupt can abort a never-settling persist, a checkpoint created after its signal is already aborted settles without an unobserved rejection, an active task-checkpoint control — including one owned by an expanded child run — is not diagnosed as a stranded root, bulk interrupt forwards an injected tool-control registry, cancellation settles the DBOS write queue, and a terminal-only stage checkpoint replays the complete `WorkflowTaskResult` — the exact persisted text including schema-backed `maxOutput` truncation, structured output including `null`, generated worktree artifacts, warnings, session, and model metadata — without rerunning the task. A workflow that catches a task-tail quit rejection and returns outputs still stays paused. Exact-id quit or interrupt of a nested task tail now quits the aggregate root so the parent snapshot and durable handle do not stay raw `running`. Exact `/workflow status <id>` uses the live tool-control registry so a task tail is not reported as stranded. Same-process DBOS hydration rejects unknown checkpoint history instead of replaying around it ([#2650](https://github.com/bastani-inc/atomic/issues/2650)).
21
+ - Fixed raised-budget resume of a blocked workflow when parallel stages shared a completed `ctx.tool` parent. Fresh-ID continuations translate tool parent identities during fail-closed topology validation, preserve cached root-level tool siblings without a false mismatch, reject a replayed tool whose restored parents disagree with the continuation graph or cannot be translated, and keep a blocked source retryable after that rejection without dropping recorded prompt answers, pending-prompt descriptors, or its BLOCKED notice. The local source kill remains process-only until settlement: a mismatch leaves no terminal session entry so the durable blocked row stays reload-recoverable, while a successful continuation durably retires the superseded source so reload cannot resurrect it ([#2639](https://github.com/bastani-inc/atomic/issues/2639)).
22
+ - Fresh-ID continuations reuse the source `ctx.tool` checkpoint, including `failureMode: "return"` success and `return_failure` outcomes. A later hop reuses that result when the intermediate run republishes it; that write is best-effort. To re-run a completed return-mode callback, start a new run or change the tool name or args ([#2639](https://github.com/bastani-inc/atomic/issues/2639)).
23
+ - Fixed ordinary in-process subagents stealing the parent session's workflow store binding. Subagent children retain bundled workflow definitions as resources without loading the workflows extension or exposing its tool, and the extension factory rejects admitted child sessions as a second boundary. Full `/reload` also recovers a live store displaced by an older generation, including stage, job, cancellation, tool-control, and prompt owners, merges retained parent history, and remounts the `BACKGROUND` panel. New session scopes remain isolated.
24
+ - Fixed simultaneous post-task budget exhaustion in `ctx.parallel(..., { failFast: false })` being replaced by a generic aggregate failure after every task had already persisted a complete result. Budget-only parallel failures now retain the engine-owned resumable `budget_exceeded` classification, select the earliest authored exhausted task as the deterministic completed resume frontier, and replay all completed task results under a raised budget without rerunning their models; mixed ordinary failures retain the existing aggregate-failure behavior.
25
+ - Fixed workflow name resolution racing past an in-flight `/workflow reload`: a run dispatched immediately after a reload could resolve against the pre-reload registry and execute the old module (observed live as reload generation N applying only after the run had started). Resolution now awaits any in-flight discovery before resolving names; a reload that fails while a registry already exists still surfaces through the reload's own caller, and resolution proceeds on the retained registry instead of throwing. ([#2667](https://github.com/bastani-inc/atomic/pull/2667) by [@uppifyagency](https://github.com/uppifyagency))
26
+ - Fixed Goal losing its ledger, orchestrator receipt, and review artifacts when a durable resume continued under a fresh run ID. Goal now checkpoints the complete artifact directory, reloads exact turn-bearing ledger state from a durable sidecar without truncating records or fabricating reducer turns, keeps the model-visible ledger free of internal turn numbers, avoids duplicating replayed receipts and reviews, and scopes artifact ownership to the run's own identity plus its continuation chain. Fresh-ID continuation chains retain and report the original referenced owner correctly, and retention pruning protects that owner while any continuation remains live without allowing incidental quoted paths to pin failed runs forever.
27
+ - Fixed a missing Goal reviewer `reads` artifact being reported as malformed structured reviewer output. Missing referenced files now remain explicit reviewer execution failures attributed to the `reads` contract, while completed unstructured reviewer responses continue to use the existing parse-failure path.
28
+
9
29
  ## [0.9.16-alpha.2] - 2026-08-23
10
30
 
11
31
  ### Added
@@ -677,7 +677,7 @@ Raw stage-chat prompt answer replay is live-memory only. `StageSnapshot.promptAn
677
677
  ```json
678
678
  {
679
679
  "name": "workflow",
680
- "description": "Run named builtin, project, user, or package workflows; custom definitions may import reusable project/package workflows or builtin definitions from @bastani/workflows/builtin and nest them with ctx.workflow(...), including deeper composition within the configured maxDepth; when workflow execution fits but another shape would better achieve the task, author a custom TypeScript workflow({...}) inline with normal coding tools, reload it, and run it; after successfully creating and reloading a newly authored custom workflow, report the folder containing its generated code as 'Custom workflow created. You can inspect its code at: <workflow-folder-path>'; do this only for newly created custom workflows, never builtin or pre-existing workflows; discover with list/get/inputs/models, list session runs with status (no runId; statusFilter narrows the list), inspect status/stages/stage details, send prompt answers or steering only while the root workflow is nonterminal, pause/resume/interrupt/quit runs, and reload workflow resources. For action 'run' and 'resume', budget accepts per-field duration, token, cost, and warning overrides; fields resolve over the workflow declaration and config, and 0 disables a field. For primitive prompt answers, use booleans or the documented confirm labels, exact case-insensitive select labels or 1-based indexes, and text strings for input/editor; an invalid answer remains pending and returns guidance instead of choosing a default. For large stage handoffs, write context to files/artifacts, pass paths via reads, and prompt downstream agents to 'Read the file at <path>...' instead of injecting large previous text. Wrap critical parts of run inputs and steering messages in <keepContext>...</keepContext> so compaction preserves them verbatim in the stages that inherit them; tag role constraints, prohibitions, must-hold criteria, and identifiers, not background or bulk reference material. For transcripts, prefer status/stages/stage to get sessionFile/transcriptPath, quote the exact path without rewriting separators (Windows backslashes are valid), then search it with rg/grep and read small ranges; transcript is path-only by default when sessionFile/transcriptPath exists, explicit tail/limit returns bounded previews, and missing transcript paths fall back to a small preview. Use action 'models' to inspect models in the configured catalog; the result is a configured-auth snapshot showing what's present in the registry with configured authentication, not proof of credentials, entitlements, OAuth freshness, or live provider access. When authoring a workflow that should dynamically select a model, first call workflow({ action: 'models' }) to inspect the configured catalog, then select from the returned provider/id entries considering the isCurrent marker and available thinking levels.",
680
+ "description": "Run named builtin, project, user, or package workflows; custom definitions may import reusable project/package workflows or builtin definitions from @bastani/workflows/builtin and nest them with ctx.workflow(...), including deeper composition within the configured maxDepth; when workflow execution fits but another shape would better achieve the task, author a custom TypeScript workflow({...}) inline with normal coding tools, reload it, and run it; after successfully creating and reloading a newly authored custom workflow, report the folder containing its generated code as 'Custom workflow created. You can inspect its code at: <workflow-folder-path>'; do this only for newly created custom workflows, never builtin or pre-existing workflows; discover with list/get/inputs/models, list session runs with status (no runId; statusFilter narrows the list), inspect status/stages/stage details, send prompt answers or steering only while the root workflow is nonterminal, pause/resume/interrupt/quit runs, and reload workflow resources. For action 'run' and 'resume', budget accepts per-field duration, token, cost, and warning overrides; fields resolve over the workflow declaration and config, and 0 disables a field. Pass budget only when the user asked for a limit; otherwise omit it entirely and inherit the declaration and config rather than inventing a cap. For primitive prompt answers, use booleans or the documented confirm labels, exact case-insensitive select labels or 1-based indexes, and text strings for input/editor; an invalid answer remains pending and returns guidance instead of choosing a default. For large stage handoffs, write context to files/artifacts, pass paths via reads, and prompt downstream agents to 'Read the file at <path>...' instead of injecting large previous text. Wrap critical parts of run inputs and steering messages in <keepContext>...</keepContext> so compaction preserves them verbatim in the stages that inherit them; tag role constraints, prohibitions, must-hold criteria, and identifiers, not background or bulk reference material. For transcripts, prefer status/stages/stage to get sessionFile/transcriptPath, quote the exact path without rewriting separators (Windows backslashes are valid), then search it with rg/grep and read small ranges; transcript is path-only by default when sessionFile/transcriptPath exists, explicit tail/limit returns bounded previews, and missing transcript paths fall back to a small preview. Use action 'models' to inspect models in the configured catalog; the result is a configured-auth snapshot showing what's present in the registry with configured authentication, not proof of credentials, entitlements, OAuth freshness, or live provider access. When authoring a workflow that should dynamically select a model, first call workflow({ action: 'models' }) to inspect the configured catalog, then select from the returned provider/id entries considering the isCurrent marker and available thinking levels.",
681
681
  "parameters": {
682
682
  "workflow": "string (optional) — workflow ID or normalized name",
683
683
  "inputs": "object (optional) — key/value map of workflow inputs",
@@ -1,9 +1,10 @@
1
1
  import { randomUUID } from "node:crypto";
2
- import { writeFile } from "node:fs/promises";
3
- import { join } from "node:path";
4
- import { createWorkflowArtifactDirectory } from "../src/shared/workflow-artifacts.js";
2
+ import { readFile, rename, rm, writeFile } from "node:fs/promises";
3
+ import { dirname, join } from "node:path";
5
4
  import { LEDGER_FILENAME, type GoalLedger, type GoalLifecycleEvent } from "./goal-types.js";
6
5
 
6
+ const LEDGER_STATE_FILENAME = "goal-ledger-state.json";
7
+
7
8
  type ModelVisibleGoalLedger = Omit<
8
9
  GoalLedger,
9
10
  "turns" | "receipts" | "reviews" | "blockers" | "decisions" | "lifecycle"
@@ -39,6 +40,10 @@ function modelVisibleLedger(ledger: GoalLedger): ModelVisibleGoalLedger {
39
40
  };
40
41
  }
41
42
 
43
+ function goalLedgerStatePath(ledgerPath: string): string {
44
+ return join(dirname(ledgerPath), LEDGER_STATE_FILENAME);
45
+ }
46
+
42
47
  export function appendLifecycleEvent(
43
48
  ledger: GoalLedger,
44
49
  event: GoalLifecycleEvent["event"],
@@ -54,13 +59,40 @@ export function appendLifecycleEvent(
54
59
  });
55
60
  }
56
61
 
62
+ /**
63
+ * Restore only lossless authoritative state. A model-visible legacy ledger has
64
+ * no turn fields, so treating it as fresh is safer than fabricating reducer state.
65
+ *
66
+ * A sidecar that cannot be parsed is treated as absent for the same reason: the
67
+ * authoritative file is published by atomic rename below, so unparsable content
68
+ * means a torn write from before that guarantee (or a foreign file). Starting
69
+ * fresh loses recorded turns; throwing here would instead make the whole
70
+ * continuation unable to start.
71
+ */
72
+ async function readExistingGoalLedger(ledgerPath: string): Promise<GoalLedger | undefined> {
73
+ let contents: string;
74
+ try {
75
+ contents = await readFile(goalLedgerStatePath(ledgerPath), "utf8");
76
+ } catch (error) {
77
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return undefined;
78
+ throw error;
79
+ }
80
+ try {
81
+ return JSON.parse(contents) as GoalLedger;
82
+ } catch {
83
+ return undefined;
84
+ }
85
+ }
57
86
  export async function createGoalLedger(
58
87
  objective: string,
59
- acceptanceCriteria = objective,
60
- runId?: string,
88
+ acceptanceCriteria: string,
89
+ artifactDir: string,
61
90
  ): Promise<{ ledger: GoalLedger; ledgerPath: string; artifactDir: string }> {
91
+ const ledgerPath = join(artifactDir, LEDGER_FILENAME);
92
+ const existing = await readExistingGoalLedger(ledgerPath);
93
+ if (existing !== undefined) return { ledger: existing, ledgerPath, artifactDir };
94
+
62
95
  const goalId = randomUUID();
63
- const artifactDir = await createWorkflowArtifactDirectory(runId);
64
96
  const now = new Date().toISOString();
65
97
  const ledger: GoalLedger = {
66
98
  goal_id: goalId,
@@ -79,7 +111,6 @@ export async function createGoalLedger(
79
111
  convergence: [],
80
112
  };
81
113
  appendLifecycleEvent(ledger, "created", "Goal created.", 0);
82
- const ledgerPath = join(artifactDir, LEDGER_FILENAME);
83
114
  await writeGoalLedger(ledgerPath, ledger);
84
115
  return { ledger, ledgerPath, artifactDir };
85
116
  }
@@ -89,7 +120,20 @@ export async function writeGoalLedger(
89
120
  ledger: GoalLedger,
90
121
  ): Promise<void> {
91
122
  ledger.updated_at = new Date().toISOString();
92
- await writeFile(ledgerPath, `${JSON.stringify(modelVisibleLedger(ledger), null, 2)}\n`, {
93
- encoding: "utf8",
94
- });
123
+ const visibleContents = `${JSON.stringify(modelVisibleLedger(ledger), null, 2)}\n`;
124
+ const stateContents = `${JSON.stringify(ledger, null, 2)}\n`;
125
+ const statePath = goalLedgerStatePath(ledgerPath);
126
+ // The sidecar is the authoritative resume state, so it is published by a
127
+ // complete same-directory write followed by an atomic rename. Overwriting it
128
+ // in place leaves a partial file readable when a write is interrupted, and
129
+ // the next continuation would then start from nothing.
130
+ const pendingStatePath = `${statePath}.${randomUUID()}.tmp`;
131
+ await writeFile(pendingStatePath, stateContents, { encoding: "utf8" });
132
+ try {
133
+ await rename(pendingStatePath, statePath);
134
+ } catch (error) {
135
+ await rm(pendingStatePath, { force: true });
136
+ throw error;
137
+ }
138
+ await writeFile(ledgerPath, visibleContents, { encoding: "utf8" });
95
139
  }
@@ -1,5 +1,15 @@
1
1
  import { join } from "node:path";
2
- import type { WorkflowParallelOptions, WorkflowTaskOptions, WorkflowTaskResult, WorkflowTaskStep } from "../src/shared/types.js";
2
+ import type {
3
+ WorkflowParallelOptions,
4
+ WorkflowTaskOptions,
5
+ WorkflowTaskResult,
6
+ WorkflowTaskStep,
7
+ WorkflowToolPrimitive,
8
+ } from "../src/shared/types.js";
9
+ import {
10
+ ensureWorkflowArtifactDirectory,
11
+ workflowArtifactDirectoryPath,
12
+ } from "../src/shared/workflow-artifacts.js";
3
13
  import { fold_usage } from "./verification-usage.js";
4
14
  import {
5
15
  convergence_escalation_evidence,
@@ -26,6 +36,7 @@ import { formatReviewReport, renderFinalReport } from "./goal-reports.js";
26
36
  import {
27
37
  parsedReviewDecisionFromResult,
28
38
  reviewDecisionToRecord,
39
+ reviewerErrorDecision,
29
40
  } from "./goal-review.js";
30
41
  import { reviewerFailureText } from "./review-convergence.js";
31
42
  import { consolidateFindingsBatch } from "./review-convergence.js";
@@ -73,10 +84,22 @@ function normalizeBranchInput(
73
84
  type GoalRunnerContext = {
74
85
  readonly inputs: GoalWorkflowInputs;
75
86
  readonly runId?: string;
87
+ readonly tool: WorkflowToolPrimitive;
76
88
  task(name: string, options: WorkflowTaskOptions): Promise<WorkflowTaskResult>;
77
89
  parallel(steps: readonly WorkflowTaskStep[], options: WorkflowParallelOptions): Promise<WorkflowTaskResult[]>;
78
90
  };
79
91
 
92
+ type GoalArtifactContext = Pick<GoalRunnerContext, "runId" | "tool">;
93
+
94
+ export async function createGoalArtifactDirectory(ctx: GoalArtifactContext): Promise<string> {
95
+ const artifactDir = await ctx.tool(
96
+ "artifact-root",
97
+ { workflow: "goal" },
98
+ async () => workflowArtifactDirectoryPath(ctx.runId),
99
+ );
100
+ return ensureWorkflowArtifactDirectory(artifactDir);
101
+ }
102
+
80
103
  type GoalWorkflowOptions = {
81
104
  readonly createPr: boolean;
82
105
  readonly workflowStartCwd: string;
@@ -120,7 +143,8 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
120
143
  const reviewQuorum = DEFAULT_REVIEW_QUORUM;
121
144
  const blockerThreshold = Math.min(DEFAULT_BLOCKER_THRESHOLD, maxTurns);
122
145
  const comparisonBaseBranch = normalizeBranchInput(inputs.base_branch, "origin/main");
123
- const { ledger, ledgerPath, artifactDir } = await createGoalLedger(objective, acceptanceCriteria, ctx.runId);
146
+ const artifactDir = await createGoalArtifactDirectory(ctx);
147
+ const { ledger, ledgerPath } = await createGoalLedger(objective, acceptanceCriteria, artifactDir);
124
148
 
125
149
  let latestReviews: ReviewRecord[] = [];
126
150
  let latestReviewArtifactPaths: string[] = [];
@@ -188,13 +212,18 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
188
212
 
189
213
  previousOrchestratorSessionFile = orchestrator.sessionFile;
190
214
  ledger.turns = turn;
191
- ledger.receipts.push({
192
- turn,
193
- stage: orchestrator.name ?? orchestrator.stageName,
194
- artifact_path: orchestratorReceiptPath,
195
- summary: `Orchestrator receipt artifact: ${orchestratorReceiptPath}`,
196
- });
197
- appendLifecycleEvent(ledger, "receipt_recorded", "Orchestrator receipt recorded.", turn);
215
+ const receiptAlreadyRecorded = ledger.receipts.some(
216
+ (receipt) => receipt.turn === turn && receipt.artifact_path === orchestratorReceiptPath,
217
+ );
218
+ if (!receiptAlreadyRecorded) {
219
+ ledger.receipts.push({
220
+ turn,
221
+ stage: orchestrator.name ?? orchestrator.stageName,
222
+ artifact_path: orchestratorReceiptPath,
223
+ summary: `Orchestrator receipt artifact: ${orchestratorReceiptPath}`,
224
+ });
225
+ appendLifecycleEvent(ledger, "receipt_recorded", "Orchestrator receipt recorded.", turn);
226
+ }
198
227
  await writeGoalLedger(ledgerPath, ledger);
199
228
 
200
229
  const reviewerStep = (
@@ -238,6 +267,7 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
238
267
 
239
268
  let reviewResults: WorkflowTaskResult[];
240
269
  let reviewerBatchFailed = false;
270
+ let reviewerExecutionDiagnostic: string | undefined;
241
271
  try {
242
272
  reviewResults = await ctx.parallel(reviewerSteps, {
243
273
  task: objective,
@@ -246,11 +276,15 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
246
276
  });
247
277
  } catch (err) {
248
278
  reviewerBatchFailed = true;
279
+ const failure = reviewerFailureText(err);
280
+ reviewerExecutionDiagnostic = failure.includes("referenced artifact does not exist")
281
+ ? `Reviewer execution failed while resolving its reads contract: ${failure}`
282
+ : `Reviewer execution failed before producing a decision: ${failure}`;
249
283
  reviewResults = [
250
284
  {
251
285
  name: "reviewer-error",
252
286
  stageName: "reviewer-error",
253
- text: reviewerFailureText(err),
287
+ text: failure,
254
288
  },
255
289
  ];
256
290
  }
@@ -258,7 +292,13 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
258
292
  latestReviews = await Promise.all(reviewResults.map(async (result) => {
259
293
  const reviewerName = result.name ?? result.stageName;
260
294
  const normalizedReviewerName = reviewerName.replace(/-\d+$/u, "");
261
- const parsed = parsedReviewDecisionFromResult(result, reviewerName);
295
+ const parsed = reviewerBatchFailed
296
+ ? {
297
+ decision: reviewerErrorDecision(reviewerExecutionDiagnostic ?? "Reviewer execution failed."),
298
+ parsed: false,
299
+ diagnostics: [reviewerExecutionDiagnostic ?? "Reviewer execution failed."],
300
+ }
301
+ : parsedReviewDecisionFromResult(result, reviewerName);
262
302
  const reviewArtifactPath = join(
263
303
  artifactDir,
264
304
  `review-${artifactSafeName(normalizedReviewerName)}.json`,
@@ -332,7 +372,12 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
332
372
  usage: fold_usage([orchestrator, ...reviewResults, ...reverifyResults]),
333
373
  }));
334
374
  }
335
- ledger.reviews.push(...latestReviews);
375
+ const newReviews = latestReviews.filter(
376
+ (review) => !ledger.reviews.some(
377
+ (recorded) => recorded.turn === review.turn && recorded.reviewer === review.reviewer,
378
+ ),
379
+ );
380
+ ledger.reviews.push(...newReviews);
336
381
  // Consolidated round artifact leads so the next orchestrator turn plans the full findings batch first.
337
382
  latestReviewArtifactPaths = [latestReviewReportPath, ...latestReviews.map((review) => review.artifact_path)];
338
383
  appendLifecycleEvent(
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.16-alpha.3",
3
+ "version": "0.9.16-alpha.5",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "peerDependencies": {
85
85
  "@bastani/atomic": "*",
86
- "@earendil-works/pi-tui": "^0.84.2"
86
+ "@earendil-works/pi-tui": "^0.84.3"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@bastani/atomic": {