@bastani/atomic 0.9.21-alpha.1 → 0.9.21-alpha.2

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 (514) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/package.json +1 -1
  4. package/dist/builtin/subagents/CHANGELOG.md +11 -0
  5. package/dist/builtin/subagents/package.json +1 -1
  6. package/dist/builtin/subagents/src/extension/index.bundle.mjs +292 -60
  7. package/dist/builtin/web-access/package.json +1 -1
  8. package/dist/builtin/workflows/CHANGELOG.md +11 -0
  9. package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
  10. package/dist/builtin/workflows/builtin/{chunk-cw86srkf.js → chunk-632fxeb8.js} +1 -1
  11. package/dist/builtin/workflows/builtin/{chunk-w18kbz63.js → chunk-94f8zfz1.js} +1 -1
  12. package/dist/builtin/workflows/builtin/{chunk-kspvwc24.js → chunk-9cm2ckq2.js} +1 -1
  13. package/dist/builtin/workflows/builtin/{chunk-jaj27rqc.js → chunk-a1ar035d.js} +1 -1
  14. package/dist/builtin/workflows/builtin/{chunk-wh19f5ee.js → chunk-d3xhj946.js} +5 -4
  15. package/dist/builtin/workflows/builtin/{chunk-crw7q5g1.js → chunk-gyjck9z8.js} +1 -1
  16. package/dist/builtin/workflows/builtin/{chunk-maqv731g.js → chunk-hj8mh07f.js} +10 -6
  17. package/dist/builtin/workflows/builtin/{chunk-0nrgfbag.js → chunk-kb7s3gx2.js} +1 -1
  18. package/dist/builtin/workflows/builtin/{chunk-73c5tayt.js → chunk-kgn5wz1c.js} +19 -1
  19. package/dist/builtin/workflows/builtin/{chunk-2hak3b7g.js → chunk-nkj4qhj6.js} +1 -1
  20. package/dist/builtin/workflows/builtin/{chunk-bzdvx2xr.js → chunk-r97ndfvt.js} +1 -1
  21. package/dist/builtin/workflows/builtin/{chunk-vkmpdat4.js → chunk-wf876n16.js} +1 -1
  22. package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
  23. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
  24. package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
  25. package/dist/builtin/workflows/builtin/goal.js +4 -4
  26. package/dist/builtin/workflows/builtin/index.js +12 -12
  27. package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
  28. package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
  29. package/dist/builtin/workflows/builtin/ralph.js +4 -4
  30. package/dist/builtin/workflows/builtin/steering-context.js +1 -1
  31. package/dist/builtin/workflows/builtin/tournament.js +3 -3
  32. package/dist/builtin/workflows/package.json +1 -1
  33. package/dist/builtin/workflows/src/extension/index.bundle.mjs +40 -11
  34. package/dist/builtin/workflows/src/index.js +9 -3
  35. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +6 -1
  36. package/dist/cli/auth-command.js +5 -0
  37. package/dist/cli/auth-command.js.map +1 -1
  38. package/dist/cli/credential-print.js +2 -0
  39. package/dist/cli/credential-print.js.map +1 -1
  40. package/dist/cli/experimental/command.js +5 -2
  41. package/dist/cli/experimental/command.js.map +1 -1
  42. package/dist/cli.js +1 -1
  43. package/dist/cli.js.map +1 -1
  44. package/dist/config.d.ts +4 -4
  45. package/dist/config.js +4 -4
  46. package/dist/config.js.map +1 -1
  47. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  48. package/dist/core/agent-session-extension-bindings.js +9 -4
  49. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  50. package/dist/core/agent-session-methods.d.ts +4 -4
  51. package/dist/core/agent-session-methods.d.ts.map +1 -1
  52. package/dist/core/agent-session-methods.js.map +1 -1
  53. package/dist/core/agent-session-prompt.d.ts +4 -4
  54. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  55. package/dist/core/agent-session-prompt.js +38 -15
  56. package/dist/core/agent-session-prompt.js.map +1 -1
  57. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  58. package/dist/core/agent-session-runtime.js +14 -9
  59. package/dist/core/agent-session-runtime.js.map +1 -1
  60. package/dist/core/agent-session-types.d.ts +4 -1
  61. package/dist/core/agent-session-types.d.ts.map +1 -1
  62. package/dist/core/agent-session-types.js.map +1 -1
  63. package/dist/core/agent-session.d.ts +1 -1
  64. package/dist/core/agent-session.d.ts.map +1 -1
  65. package/dist/core/agent-session.js +140 -95
  66. package/dist/core/agent-session.js.map +1 -1
  67. package/dist/core/auth-storage-backends.js +2 -3
  68. package/dist/core/auth-storage-backends.js.map +1 -1
  69. package/dist/core/auth-storage.js +4 -1
  70. package/dist/core/auth-storage.js.map +1 -1
  71. package/dist/core/builtin-resource-loader.js +9 -0
  72. package/dist/core/builtin-resource-loader.js.map +1 -1
  73. package/dist/core/cache-warmer.js +8 -1
  74. package/dist/core/cache-warmer.js.map +1 -1
  75. package/dist/core/compaction/range-planner.js +6 -0
  76. package/dist/core/compaction/range-planner.js.map +1 -1
  77. package/dist/core/execution-model-router.d.ts +13 -3
  78. package/dist/core/execution-model-router.d.ts.map +1 -1
  79. package/dist/core/execution-model-router.js +227 -131
  80. package/dist/core/execution-model-router.js.map +1 -1
  81. package/dist/core/export-html/template-js/entries-navigation.js +16 -6
  82. package/dist/core/export-html/template-js/initialization.js +34 -11
  83. package/dist/core/export-html/template.css +10 -0
  84. package/dist/core/export-html/template.js +50 -17
  85. package/dist/core/extensions/context-types.d.ts +2 -0
  86. package/dist/core/extensions/context-types.d.ts.map +1 -1
  87. package/dist/core/extensions/context-types.js.map +1 -1
  88. package/dist/core/extensions/host-input.js +8 -4
  89. package/dist/core/extensions/host-input.js.map +1 -1
  90. package/dist/core/extensions/reactive-widget.js +1 -0
  91. package/dist/core/extensions/reactive-widget.js.map +1 -1
  92. package/dist/core/extensions/runner-context.d.ts +1 -0
  93. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  94. package/dist/core/extensions/runner-context.js +4 -0
  95. package/dist/core/extensions/runner-context.js.map +1 -1
  96. package/dist/core/extensions/runner.d.ts +1 -0
  97. package/dist/core/extensions/runner.d.ts.map +1 -1
  98. package/dist/core/extensions/runner.js +48 -30
  99. package/dist/core/extensions/runner.js.map +1 -1
  100. package/dist/core/extensions/runtime-types.d.ts +1 -0
  101. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  102. package/dist/core/extensions/runtime-types.js.map +1 -1
  103. package/dist/core/extensions/workflow-activity-hub.js +9 -7
  104. package/dist/core/extensions/workflow-activity-hub.js.map +1 -1
  105. package/dist/core/footer-data-provider.js +24 -23
  106. package/dist/core/footer-data-provider.js.map +1 -1
  107. package/dist/core/keybindings.js +1 -0
  108. package/dist/core/keybindings.js.map +1 -1
  109. package/dist/core/mandatory-resource-loader.js +4 -1
  110. package/dist/core/mandatory-resource-loader.js.map +1 -1
  111. package/dist/core/model-config.js +2 -0
  112. package/dist/core/model-config.js.map +1 -1
  113. package/dist/core/model-registry.js +1 -0
  114. package/dist/core/model-registry.js.map +1 -1
  115. package/dist/core/{model-routing-task.d.ts → model-routing-bytes.d.ts} +1 -4
  116. package/dist/core/model-routing-bytes.d.ts.map +1 -0
  117. package/dist/core/model-routing-bytes.js +33 -0
  118. package/dist/core/model-routing-bytes.js.map +1 -0
  119. package/dist/core/model-routing-candidates.d.ts +42 -0
  120. package/dist/core/model-routing-candidates.d.ts.map +1 -0
  121. package/dist/core/model-routing-candidates.js +309 -0
  122. package/dist/core/model-routing-candidates.js.map +1 -0
  123. package/dist/core/model-routing-constraints.d.ts +4 -0
  124. package/dist/core/model-routing-constraints.d.ts.map +1 -1
  125. package/dist/core/model-routing-constraints.js +13 -1
  126. package/dist/core/model-routing-constraints.js.map +1 -1
  127. package/dist/core/model-routing-debug.d.ts +9 -0
  128. package/dist/core/model-routing-debug.d.ts.map +1 -0
  129. package/dist/core/model-routing-debug.js +14 -0
  130. package/dist/core/model-routing-debug.js.map +1 -0
  131. package/dist/core/model-routing-evals.d.ts +50 -0
  132. package/dist/core/model-routing-evals.d.ts.map +1 -0
  133. package/dist/core/model-routing-evals.js +190 -0
  134. package/dist/core/model-routing-evals.js.map +1 -0
  135. package/dist/core/model-routing-needs.d.ts +75 -0
  136. package/dist/core/model-routing-needs.d.ts.map +1 -0
  137. package/dist/core/model-routing-needs.js +176 -0
  138. package/dist/core/model-routing-needs.js.map +1 -0
  139. package/dist/core/model-runtime-streaming.js +3 -0
  140. package/dist/core/model-runtime-streaming.js.map +1 -1
  141. package/dist/core/model-runtime.js +26 -14
  142. package/dist/core/model-runtime.js.map +1 -1
  143. package/dist/core/models-store.js +2 -3
  144. package/dist/core/models-store.js.map +1 -1
  145. package/dist/core/output-guard.js +1 -0
  146. package/dist/core/output-guard.js.map +1 -1
  147. package/dist/core/package-manager-paths.d.ts +2 -1
  148. package/dist/core/package-manager-paths.d.ts.map +1 -1
  149. package/dist/core/package-manager-paths.js +4 -3
  150. package/dist/core/package-manager-paths.js.map +1 -1
  151. package/dist/core/package-manager.js +1 -0
  152. package/dist/core/package-manager.js.map +1 -1
  153. package/dist/core/resource-loader-assets.d.ts.map +1 -1
  154. package/dist/core/resource-loader-assets.js +9 -7
  155. package/dist/core/resource-loader-assets.js.map +1 -1
  156. package/dist/core/resource-loader-core.js +49 -0
  157. package/dist/core/resource-loader-core.js.map +1 -1
  158. package/dist/core/runtime-credentials.js +2 -1
  159. package/dist/core/runtime-credentials.js.map +1 -1
  160. package/dist/core/session-cwd.js +1 -0
  161. package/dist/core/session-cwd.js.map +1 -1
  162. package/dist/core/session-manager-archive.d.ts.map +1 -1
  163. package/dist/core/session-manager-archive.js +4 -2
  164. package/dist/core/session-manager-archive.js.map +1 -1
  165. package/dist/core/session-manager-core.js +11 -7
  166. package/dist/core/session-manager-core.js.map +1 -1
  167. package/dist/core/session-manager-storage.d.ts +10 -4
  168. package/dist/core/session-manager-storage.d.ts.map +1 -1
  169. package/dist/core/session-manager-storage.js +12 -6
  170. package/dist/core/session-manager-storage.js.map +1 -1
  171. package/dist/core/settings-manager-basic-accessors.d.ts +2 -1
  172. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  173. package/dist/core/settings-manager-basic-accessors.js +21 -0
  174. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  175. package/dist/core/settings-manager-core.js +13 -7
  176. package/dist/core/settings-manager-core.js.map +1 -1
  177. package/dist/core/settings-manager.d.ts +1 -1
  178. package/dist/core/settings-manager.d.ts.map +1 -1
  179. package/dist/core/settings-manager.js.map +1 -1
  180. package/dist/core/settings-storage.js +6 -0
  181. package/dist/core/settings-storage.js.map +1 -1
  182. package/dist/core/settings-types.d.ts +8 -0
  183. package/dist/core/settings-types.d.ts.map +1 -1
  184. package/dist/core/settings-types.js.map +1 -1
  185. package/dist/core/structured-output/index.d.ts.map +1 -1
  186. package/dist/core/structured-output/index.js +4 -1
  187. package/dist/core/structured-output/index.js.map +1 -1
  188. package/dist/core/structured-output/invalid-output.js +1 -0
  189. package/dist/core/structured-output/invalid-output.js.map +1 -1
  190. package/dist/core/tasks/agent-adapter.js +5 -3
  191. package/dist/core/tasks/agent-adapter.js.map +1 -1
  192. package/dist/core/tasks/child-command-owner.js +3 -7
  193. package/dist/core/tasks/child-command-owner.js.map +1 -1
  194. package/dist/core/tasks/completion.js +5 -1
  195. package/dist/core/tasks/completion.js.map +1 -1
  196. package/dist/core/tasks/owner-store.js +12 -8
  197. package/dist/core/tasks/owner-store.js.map +1 -1
  198. package/dist/core/tasks/supervisor.js +14 -35
  199. package/dist/core/tasks/supervisor.js.map +1 -1
  200. package/dist/core/tools/ask-user-question/state/build-questionnaire.js +13 -4
  201. package/dist/core/tools/ask-user-question/state/build-questionnaire.js.map +1 -1
  202. package/dist/core/tools/ask-user-question/state/questionnaire-session.js +11 -1
  203. package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
  204. package/dist/core/tools/ask-user-question/view/components/chat-row-view.js +1 -0
  205. package/dist/core/tools/ask-user-question/view/components/chat-row-view.js.map +1 -1
  206. package/dist/core/tools/ask-user-question/view/components/multi-select-view.js +1 -0
  207. package/dist/core/tools/ask-user-question/view/components/multi-select-view.js.map +1 -1
  208. package/dist/core/tools/ask-user-question/view/components/option-list-view.js +1 -0
  209. package/dist/core/tools/ask-user-question/view/components/option-list-view.js.map +1 -1
  210. package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.js +5 -0
  211. package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.js.map +1 -1
  212. package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.js +2 -0
  213. package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.js.map +1 -1
  214. package/dist/core/tools/ask-user-question/view/components/preview/preview-pane.js +13 -8
  215. package/dist/core/tools/ask-user-question/view/components/preview/preview-pane.js.map +1 -1
  216. package/dist/core/tools/ask-user-question/view/components/submit-picker.js +1 -0
  217. package/dist/core/tools/ask-user-question/view/components/submit-picker.js.map +1 -1
  218. package/dist/core/tools/ask-user-question/view/components/tab-bar.js +1 -0
  219. package/dist/core/tools/ask-user-question/view/components/tab-bar.js.map +1 -1
  220. package/dist/core/tools/ask-user-question/view/components/wrapping-select.js +30 -24
  221. package/dist/core/tools/ask-user-question/view/components/wrapping-select.js.map +1 -1
  222. package/dist/core/tools/ask-user-question/view/dialog-builder.js +5 -0
  223. package/dist/core/tools/ask-user-question/view/dialog-builder.js.map +1 -1
  224. package/dist/core/tools/ask-user-question/view/props-adapter.js +8 -0
  225. package/dist/core/tools/ask-user-question/view/props-adapter.js.map +1 -1
  226. package/dist/core/tools/ask-user-question/view/tab-content-strategy.js +4 -4
  227. package/dist/core/tools/ask-user-question/view/tab-content-strategy.js.map +1 -1
  228. package/dist/core/tools/bash.js +5 -8
  229. package/dist/core/tools/bash.js.map +1 -1
  230. package/dist/core/tools/edit-batch.js +4 -0
  231. package/dist/core/tools/edit-batch.js.map +1 -1
  232. package/dist/core/tools/edit.js +2 -0
  233. package/dist/core/tools/edit.js.map +1 -1
  234. package/dist/core/tools/file-mutation-coordinator.js +9 -0
  235. package/dist/core/tools/file-mutation-coordinator.js.map +1 -1
  236. package/dist/core/tools/find.js +1 -1
  237. package/dist/core/tools/find.js.map +1 -1
  238. package/dist/core/tools/hashline-engine/fs.js +1 -1
  239. package/dist/core/tools/hashline-engine/fs.js.map +1 -1
  240. package/dist/core/tools/hashline-engine/input.js +4 -0
  241. package/dist/core/tools/hashline-engine/input.js.map +1 -1
  242. package/dist/core/tools/hashline-engine/mismatch.js +6 -0
  243. package/dist/core/tools/hashline-engine/mismatch.js.map +1 -1
  244. package/dist/core/tools/hashline-engine/patcher.js +13 -0
  245. package/dist/core/tools/hashline-engine/patcher.js.map +1 -1
  246. package/dist/core/tools/hashline-engine/recovery.js +1 -0
  247. package/dist/core/tools/hashline-engine/recovery.js.map +1 -1
  248. package/dist/core/tools/output-accumulator.js +20 -13
  249. package/dist/core/tools/output-accumulator.js.map +1 -1
  250. package/dist/core/tools/persisted-output-file.js +9 -3
  251. package/dist/core/tools/persisted-output-file.js.map +1 -1
  252. package/dist/core/tools/resource-selectors.js +1 -0
  253. package/dist/core/tools/resource-selectors.js.map +1 -1
  254. package/dist/core/tools/write.js +1 -0
  255. package/dist/core/tools/write.js.map +1 -1
  256. package/dist/core/trust-manager.js +1 -0
  257. package/dist/core/trust-manager.js.map +1 -1
  258. package/dist/core/workflow-stage-admission.js +17 -10
  259. package/dist/core/workflow-stage-admission.js.map +1 -1
  260. package/dist/extensions/llama/client.js +2 -0
  261. package/dist/extensions/llama/client.js.map +1 -1
  262. package/dist/extensions/llama/huggingface-ui.js +17 -9
  263. package/dist/extensions/llama/huggingface-ui.js.map +1 -1
  264. package/dist/extensions/llama/huggingface.js +2 -0
  265. package/dist/extensions/llama/huggingface.js.map +1 -1
  266. package/dist/extensions/llama/ui.js +11 -3
  267. package/dist/extensions/llama/ui.js.map +1 -1
  268. package/dist/index.d.ts +4 -2
  269. package/dist/index.d.ts.map +1 -1
  270. package/dist/index.js +3 -1
  271. package/dist/index.js.map +1 -1
  272. package/dist/modes/interactive/components/armin.js +10 -6
  273. package/dist/modes/interactive/components/armin.js.map +1 -1
  274. package/dist/modes/interactive/components/assistant-message.js +10 -2
  275. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  276. package/dist/modes/interactive/components/atomic-working-status.js +10 -2
  277. package/dist/modes/interactive/components/atomic-working-status.js.map +1 -1
  278. package/dist/modes/interactive/components/bash-execution.js +9 -4
  279. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  280. package/dist/modes/interactive/components/bordered-loader.js +3 -0
  281. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  282. package/dist/modes/interactive/components/branch-summary-message.js +4 -1
  283. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  284. package/dist/modes/interactive/components/chat-message-renderer.js +2 -1
  285. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  286. package/dist/modes/interactive/components/chat-session-host-state.js +63 -31
  287. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  288. package/dist/modes/interactive/components/chat-session-host.js +8 -1
  289. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  290. package/dist/modes/interactive/components/chat-transcript.js +24 -14
  291. package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
  292. package/dist/modes/interactive/components/compaction-boundary-message.js +2 -1
  293. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  294. package/dist/modes/interactive/components/config-selector-list.js +15 -6
  295. package/dist/modes/interactive/components/config-selector-list.js.map +1 -1
  296. package/dist/modes/interactive/components/config-selector.js +7 -1
  297. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  298. package/dist/modes/interactive/components/countdown-timer.js +2 -0
  299. package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
  300. package/dist/modes/interactive/components/custom-editor.js +21 -1
  301. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  302. package/dist/modes/interactive/components/custom-entry.js +4 -1
  303. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  304. package/dist/modes/interactive/components/custom-message.js +9 -1
  305. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  306. package/dist/modes/interactive/components/daxnuts.js +8 -6
  307. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  308. package/dist/modes/interactive/components/dynamic-border.js +1 -0
  309. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  310. package/dist/modes/interactive/components/extension-editor.js +7 -1
  311. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  312. package/dist/modes/interactive/components/extension-input.js +8 -2
  313. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  314. package/dist/modes/interactive/components/extension-selector.js +9 -1
  315. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  316. package/dist/modes/interactive/components/first-time-setup.js +4 -2
  317. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  318. package/dist/modes/interactive/components/footer.js +5 -2
  319. package/dist/modes/interactive/components/footer.js.map +1 -1
  320. package/dist/modes/interactive/components/host-input-form.js +13 -2
  321. package/dist/modes/interactive/components/host-input-form.js.map +1 -1
  322. package/dist/modes/interactive/components/login-dialog.js +9 -3
  323. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  324. package/dist/modes/interactive/components/model-selector.js +24 -12
  325. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  326. package/dist/modes/interactive/components/oauth-selector.js +12 -3
  327. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  328. package/dist/modes/interactive/components/reserved-bottom-overlay.js +11 -2
  329. package/dist/modes/interactive/components/reserved-bottom-overlay.js.map +1 -1
  330. package/dist/modes/interactive/components/scoped-models-selector.js +13 -8
  331. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  332. package/dist/modes/interactive/components/scroll-widget.js +4 -0
  333. package/dist/modes/interactive/components/scroll-widget.js.map +1 -1
  334. package/dist/modes/interactive/components/session-selector-header.js +11 -7
  335. package/dist/modes/interactive/components/session-selector-header.js.map +1 -1
  336. package/dist/modes/interactive/components/session-selector-list.js +25 -12
  337. package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
  338. package/dist/modes/interactive/components/session-selector.js +23 -15
  339. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  340. package/dist/modes/interactive/components/settings-selector-submenus.js +19 -1
  341. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  342. package/dist/modes/interactive/components/settings-selector.js +1 -0
  343. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  344. package/dist/modes/interactive/components/show-images-selector.js +1 -0
  345. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  346. package/dist/modes/interactive/components/skill-invocation-message.js +4 -1
  347. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  348. package/dist/modes/interactive/components/startup-identity.js +8 -3
  349. package/dist/modes/interactive/components/startup-identity.js.map +1 -1
  350. package/dist/modes/interactive/components/task-completion-message.js +2 -0
  351. package/dist/modes/interactive/components/task-completion-message.js.map +1 -1
  352. package/dist/modes/interactive/components/task-detail.js +2 -0
  353. package/dist/modes/interactive/components/task-detail.js.map +1 -1
  354. package/dist/modes/interactive/components/task-inspector.js +22 -12
  355. package/dist/modes/interactive/components/task-inspector.js.map +1 -1
  356. package/dist/modes/interactive/components/task-list.js +2 -0
  357. package/dist/modes/interactive/components/task-list.js.map +1 -1
  358. package/dist/modes/interactive/components/task-live-transcript.js +8 -3
  359. package/dist/modes/interactive/components/task-live-transcript.js.map +1 -1
  360. package/dist/modes/interactive/components/task-navigation.js +5 -2
  361. package/dist/modes/interactive/components/task-navigation.js.map +1 -1
  362. package/dist/modes/interactive/components/task-row.js +2 -0
  363. package/dist/modes/interactive/components/task-row.js.map +1 -1
  364. package/dist/modes/interactive/components/theme-selector.js +2 -0
  365. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  366. package/dist/modes/interactive/components/thinking-selector.js +7 -1
  367. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  368. package/dist/modes/interactive/components/tool-execution.js +25 -10
  369. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  370. package/dist/modes/interactive/components/transcript-follow-indicator.js +1 -0
  371. package/dist/modes/interactive/components/transcript-follow-indicator.js.map +1 -1
  372. package/dist/modes/interactive/components/tree-selector-component.js +7 -3
  373. package/dist/modes/interactive/components/tree-selector-component.js.map +1 -1
  374. package/dist/modes/interactive/components/tree-selector-help.js +1 -0
  375. package/dist/modes/interactive/components/tree-selector-help.js.map +1 -1
  376. package/dist/modes/interactive/components/tree-selector-label-input.js +6 -2
  377. package/dist/modes/interactive/components/tree-selector-label-input.js.map +1 -1
  378. package/dist/modes/interactive/components/tree-selector-list.js +4 -0
  379. package/dist/modes/interactive/components/tree-selector-list.js.map +1 -1
  380. package/dist/modes/interactive/components/trust-selector.js +6 -0
  381. package/dist/modes/interactive/components/trust-selector.js.map +1 -1
  382. package/dist/modes/interactive/components/user-message-selector.js +6 -3
  383. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  384. package/dist/modes/interactive/components/user-message.js +5 -0
  385. package/dist/modes/interactive/components/user-message.js.map +1 -1
  386. package/dist/modes/interactive/components/working-status.js +1 -0
  387. package/dist/modes/interactive/components/working-status.js.map +1 -1
  388. package/dist/modes/interactive/interactive-autocomplete.js +2 -0
  389. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  390. package/dist/modes/interactive/interactive-extension-runtime.js +1 -0
  391. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  392. package/dist/modes/interactive/interactive-mode-base.js +162 -120
  393. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  394. package/dist/modes/interactive/interactive-mode-helpers.js +3 -0
  395. package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
  396. package/dist/modes/interactive/interactive-mode-surface.d.ts +0 -6
  397. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  398. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  399. package/dist/modes/interactive/interactive-resource-disclosure.js +0 -4
  400. package/dist/modes/interactive/interactive-resource-disclosure.js.map +1 -1
  401. package/dist/modes/interactive/interactive-resource-rendering.js +0 -12
  402. package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
  403. package/dist/modes/interactive/interactive-startup-chat-container.js +1 -4
  404. package/dist/modes/interactive/interactive-startup-chat-container.js.map +1 -1
  405. package/dist/modes/interactive/model-catalog-refresh.js +1 -3
  406. package/dist/modes/interactive/model-catalog-refresh.js.map +1 -1
  407. package/dist/modes/interactive/theme/color-utils.d.ts +5 -0
  408. package/dist/modes/interactive/theme/color-utils.d.ts.map +1 -1
  409. package/dist/modes/interactive/theme/color-utils.js +11 -0
  410. package/dist/modes/interactive/theme/color-utils.js.map +1 -1
  411. package/dist/modes/interactive/theme/global-theme.d.ts.map +1 -1
  412. package/dist/modes/interactive/theme/global-theme.js +4 -3
  413. package/dist/modes/interactive/theme/global-theme.js.map +1 -1
  414. package/dist/modes/interactive/theme/theme-class.js +7 -0
  415. package/dist/modes/interactive/theme/theme-class.js.map +1 -1
  416. package/dist/modes/interactive/theme/theme-controller.js +9 -2
  417. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  418. package/dist/modes/interactive-engine/activity-watchdog.js +8 -3
  419. package/dist/modes/interactive-engine/activity-watchdog.js.map +1 -1
  420. package/dist/modes/interactive-engine/engine-custom-ui.js +12 -8
  421. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  422. package/dist/modes/interactive-engine/engine-dialog-host.js +7 -3
  423. package/dist/modes/interactive-engine/engine-dialog-host.js.map +1 -1
  424. package/dist/modes/interactive-engine/engine-health.js +23 -13
  425. package/dist/modes/interactive-engine/engine-health.js.map +1 -1
  426. package/dist/modes/interactive-engine/engine-input-form.js +3 -2
  427. package/dist/modes/interactive-engine/engine-input-form.js.map +1 -1
  428. package/dist/modes/interactive-engine/engine-monitor.js +13 -1
  429. package/dist/modes/interactive-engine/engine-monitor.js.map +1 -1
  430. package/dist/modes/interactive-engine/engine-project-trust.js +2 -1
  431. package/dist/modes/interactive-engine/engine-project-trust.js.map +1 -1
  432. package/dist/modes/interactive-engine/engine-render-service.js +7 -4
  433. package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
  434. package/dist/modes/interactive-engine/engine-session-picker.js +3 -2
  435. package/dist/modes/interactive-engine/engine-session-picker.js.map +1 -1
  436. package/dist/modes/interactive-engine/input-form-host.js +5 -1
  437. package/dist/modes/interactive-engine/input-form-host.js.map +1 -1
  438. package/dist/modes/interactive-engine/isolated-runtime.js +37 -23
  439. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  440. package/dist/modes/interactive-engine/remote-command-catalog.js +4 -3
  441. package/dist/modes/interactive-engine/remote-command-catalog.js.map +1 -1
  442. package/dist/modes/interactive-engine/remote-component.js +24 -12
  443. package/dist/modes/interactive-engine/remote-component.js.map +1 -1
  444. package/dist/modes/interactive-engine/remote-frame-clamp.js +3 -3
  445. package/dist/modes/interactive-engine/remote-frame-clamp.js.map +1 -1
  446. package/dist/modes/interactive-engine/remote-model-catalog.js +5 -4
  447. package/dist/modes/interactive-engine/remote-model-catalog.js.map +1 -1
  448. package/dist/modes/interactive-engine/remote-queue-pause.js +3 -1
  449. package/dist/modes/interactive-engine/remote-queue-pause.js.map +1 -1
  450. package/dist/modes/interactive-engine/remote-renderer.js +24 -13
  451. package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
  452. package/dist/modes/interactive-engine/resource-readiness-error.js +1 -0
  453. package/dist/modes/interactive-engine/resource-readiness-error.js.map +1 -1
  454. package/dist/modes/interactive-engine/session-picker-host.js +5 -1
  455. package/dist/modes/interactive-engine/session-picker-host.js.map +1 -1
  456. package/dist/modes/interactive-engine/terminal-mode-controller.js +2 -1
  457. package/dist/modes/interactive-engine/terminal-mode-controller.js.map +1 -1
  458. package/dist/modes/rpc/queued-writer.js +13 -4
  459. package/dist/modes/rpc/queued-writer.js.map +1 -1
  460. package/dist/modes/rpc/rpc-bash-request-owners.js +2 -1
  461. package/dist/modes/rpc/rpc-bash-request-owners.js.map +1 -1
  462. package/dist/modes/rpc/rpc-client-api.d.ts +8 -4
  463. package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
  464. package/dist/modes/rpc/rpc-client-api.js +10 -3
  465. package/dist/modes/rpc/rpc-client-api.js.map +1 -1
  466. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  467. package/dist/modes/rpc/rpc-client.js +35 -22
  468. package/dist/modes/rpc/rpc-client.js.map +1 -1
  469. package/dist/modes/rpc/rpc-command-handler.js +6 -6
  470. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  471. package/dist/modes/rpc/rpc-event-buffer.js +3 -1
  472. package/dist/modes/rpc/rpc-event-buffer.js.map +1 -1
  473. package/dist/modes/rpc/rpc-generation-buffer.js +1 -3
  474. package/dist/modes/rpc/rpc-generation-buffer.js.map +1 -1
  475. package/dist/modes/rpc/rpc-keybindings-reload.js +4 -1
  476. package/dist/modes/rpc/rpc-keybindings-reload.js.map +1 -1
  477. package/dist/modes/rpc/rpc-output-buffer.js +3 -4
  478. package/dist/modes/rpc/rpc-output-buffer.js.map +1 -1
  479. package/dist/modes/rpc/rpc-pending-requests.js +1 -3
  480. package/dist/modes/rpc/rpc-pending-requests.js.map +1 -1
  481. package/dist/modes/rpc/rpc-provider-auth.js +3 -1
  482. package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
  483. package/dist/modes/rpc/rpc-resource-readiness.js +4 -5
  484. package/dist/modes/rpc/rpc-resource-readiness.js.map +1 -1
  485. package/dist/modes/rpc/rpc-session-binding.js +15 -0
  486. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  487. package/dist/modes/rpc/rpc-terminal-drain.js +3 -0
  488. package/dist/modes/rpc/rpc-terminal-drain.js.map +1 -1
  489. package/dist/modes/rpc/rpc-types.d.ts +10 -1
  490. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  491. package/dist/modes/rpc/rpc-types.js.map +1 -1
  492. package/docs/models/evals.md +883 -39
  493. package/docs/models/model-selection.md +7 -8
  494. package/docs/rpc/examples.md +1 -1
  495. package/docs/rpc/protocol.md +9 -3
  496. package/docs/sdk/structured-decisions.md +1 -1
  497. package/docs/sdk.md +3 -3
  498. package/docs/settings.md +24 -3
  499. package/docs/subagents/reference.md +22 -4
  500. package/docs/subagents.md +2 -0
  501. package/docs/usage.md +3 -3
  502. package/docs/workflows/api-reference.md +1 -1
  503. package/docs/workflows/authoring.md +1 -7
  504. package/docs/workflows/builtins.md +1 -1
  505. package/docs/workflows/reliable-design.md +1 -1
  506. package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
  507. package/examples/extensions/gondolin/package.json +1 -1
  508. package/examples/rpc-client.ts +1 -1
  509. package/examples/rpc-extension-ui.ts +1 -1
  510. package/npm-shrinkwrap.json +70 -33
  511. package/package.json +6 -7
  512. package/dist/core/model-routing-task.d.ts.map +0 -1
  513. package/dist/core/model-routing-task.js +0 -120
  514. package/dist/core/model-routing-task.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.21-alpha.1",
3
+ "version": "0.9.21-alpha.2",
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": [
@@ -6,6 +6,17 @@ 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.21-alpha.2] - 2026-09-26
10
+
11
+ ### Changed
12
+
13
+ - `model: "auto"` routing has a chat model answer fixed questions about the complete task, then the router chooses between a short, evidence-backed list of models without seeing the task, in at most two small requests. The new `modelRouting` setting's `allowedProviders` and `excludedProviders` lists limit which providers are candidates.
14
+ - `model: "auto"` accepts `taskNeeds` so the caller can state the task's kind of work, difficulty, mistake cost, need for images, need for a very large context and whether speed matters, and `modelConstraints.allowedModels` sets the shortlist the router chooses between. `modelConstraints.allowedProviders` and `excludedProviders` skip whole providers and replace the `modelRouting` provider settings for that call. Falling back to the current chat model is silent unless `ATOMIC_MODEL_ROUTING_DEBUG=1`.
15
+
16
+ ### Fixed
17
+
18
+ - The builtin `goal` and `ralph` workflows no longer count a reviewer's `stop_review_loop=true` as approval when the same review calls the patch incorrect, reports `goal_oracle_satisfied: false`, or lists a blocking finding. A run whose reviewers all flag an empty implementation no longer ends `complete` or starts the pull-request stage ([#3295](https://github.com/bastani-inc/atomic/issues/3295)).
19
+
9
20
  ## [0.9.21-alpha.1] - 2026-09-25
10
21
 
11
22
  ### Changed
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  adversarial_verification_default
3
- } from "./chunk-jaj27rqc.js";
3
+ } from "./chunk-a1ar035d.js";
4
4
  import"./chunk-2377r57g.js";
5
5
  import"./chunk-n1910xc4.js";
6
- import"./chunk-crw7q5g1.js";
7
- import"./chunk-kspvwc24.js";
6
+ import"./chunk-gyjck9z8.js";
7
+ import"./chunk-9cm2ckq2.js";
8
8
  export {
9
9
  adversarial_verification_default as default
10
10
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  stableArtifactRoot
7
7
  } from "./chunk-rc5ec5xx.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  score_progress,
7
7
  classify_trend
@@ -178,7 +178,7 @@ var SCOPE_DISCIPLINE_CONTRACT = keepContext([
178
178
  `));
179
179
  var EVIDENCE_CLOSURE_POLICY = [
180
180
  "Convergence flag (stop_review_loop):",
181
- "- stop_review_loop is the single authoritative convergence signal; the harness trusts it without recomputing approval from findings, priorities, or requirements_traceability.",
181
+ "- stop_review_loop is the convergence signal. The harness does not recompute approval from requirements_traceability, but it does not count stop_review_loop=true as approval when the same review says the patch is incorrect, reports goal_oracle_satisfied=false, or lists a blocking finding.",
182
182
  "- Derive stop_review_loop=false while any objective-relevant blocking work remains: a P0/P1/P2 finding, a required_by_objective finding at any priority including P3, or an unproven implementation/validation requirement.",
183
183
  "- Derive stop_review_loop=true when independent verification proves implementation and validation and only non-blocking items remain: consistent_with_objective P3 items, beyond_objective/contradicts_objective observations, an authorized post-approval PR/MR/review action, or reviewer quorum. Never hold it false for those items.",
184
184
  "- If the bounded loop ends first, preserve unresolved findings and remaining work for a human rather than relabeling them."
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  parse_rubric,
7
7
  normalize_criteria,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  keepContext,
7
7
  REVIEWER_CALIBRATION_RULES,
@@ -24,7 +24,7 @@ import {
24
24
  EVIDENCE_CLOSURE_POLICY,
25
25
  WORKTREE_DISCIPLINE_CONTRACT,
26
26
  REVIEW_CODE_DELTA_CONTRACT
27
- } from "./chunk-kspvwc24.js";
27
+ } from "./chunk-9cm2ckq2.js";
28
28
  import {
29
29
  VERIFICATION_SCALE
30
30
  } from "./chunk-n1910xc4.js";
@@ -33,12 +33,13 @@ import {
33
33
  record_convergence,
34
34
  convergence_escalation_evidence,
35
35
  finalActionRemaining,
36
+ stopReviewLoopContradictions,
36
37
  consolidateFindingsBatch,
37
38
  parseFailureDiagnostics,
38
39
  reviewerFailureText,
39
40
  summarizeReviewConvergence,
40
41
  reverify_consolidated_batch
41
- } from "./chunk-73c5tayt.js";
42
+ } from "./chunk-kgn5wz1c.js";
42
43
  import {
43
44
  fold_usage
44
45
  } from "./chunk-tgt0s5e5.js";
@@ -52,7 +53,7 @@ import { dirname, join } from "node:path";
52
53
  import { Type } from "typebox";
53
54
  // dist/builtin/workflows/builtin/ralph-review-gate.ts
54
55
  function reviewDecisionApproved(decision) {
55
- return decision.stop_review_loop === true && decision.reviewer_error == null;
56
+ return decision.stop_review_loop === true && decision.reviewer_error == null && stopReviewLoopContradictions(decision).length === 0;
56
57
  }
57
58
 
58
59
  // dist/builtin/workflows/builtin/ralph-core.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withSteeringPropagationContext2
3
- } from "./chunk-kspvwc24.js";
3
+ } from "./chunk-9cm2ckq2.js";
4
4
 
5
5
  // dist/builtin/workflows/src/authoring/workflow.ts
6
6
  import { basename } from "node:path";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  keepContext,
7
7
  REVIEWER_CALIBRATION_RULES,
@@ -24,19 +24,21 @@ import {
24
24
  EVIDENCE_CLOSURE_POLICY,
25
25
  WORKTREE_DISCIPLINE_CONTRACT,
26
26
  REVIEW_CODE_DELTA_CONTRACT
27
- } from "./chunk-kspvwc24.js";
27
+ } from "./chunk-9cm2ckq2.js";
28
28
  import {
29
29
  workflowArtifactDirectoryPath,
30
30
  ensureWorkflowArtifactDirectory,
31
31
  record_convergence,
32
32
  convergence_escalation_evidence,
33
33
  finalActionRemaining,
34
+ stopReviewLoopContradictions,
35
+ contradictedStopReviewLoopGap,
34
36
  consolidateFindingsBatch,
35
37
  parseFailureDiagnostics,
36
38
  reviewerFailureText,
37
39
  summarizeReviewConvergence,
38
40
  reverify_consolidated_batch
39
- } from "./chunk-73c5tayt.js";
41
+ } from "./chunk-kgn5wz1c.js";
40
42
  import {
41
43
  VERIFICATION_SCALE
42
44
  } from "./chunk-n1910xc4.js";
@@ -321,7 +323,7 @@ function reduceGoalDecision(ledger, turnReviews, options) {
321
323
  ...summary,
322
324
  turn: options.turn,
323
325
  decision: "complete",
324
- reason: `Reviewer quorum met: ${completeVotes}/${options.reviewQuorum} reviewers independently reported stop_review_loop=true with no reviewer execution errors.`,
326
+ reason: `Reviewer quorum met: ${completeVotes}/${options.reviewQuorum} reviewers independently reported stop_review_loop=true with a correct patch, a satisfied goal oracle, no blocking findings, and no reviewer execution errors.`,
325
327
  complete_votes: completeVotes,
326
328
  review_quorum: options.reviewQuorum
327
329
  }
@@ -459,7 +461,7 @@ function parsedReviewDecisionFromResult(result, reviewer) {
459
461
  };
460
462
  }
461
463
  function reviewApproved(decision) {
462
- return decision.stop_review_loop === true && decision.reviewer_error == null;
464
+ return decision.stop_review_loop === true && decision.reviewer_error == null && stopReviewLoopContradictions(decision).length === 0;
463
465
  }
464
466
  function reviewerErrorDecision(message) {
465
467
  return {
@@ -492,6 +494,7 @@ function blockerFromReviewDecision(decision) {
492
494
  function reviewDecisionToRecord(args) {
493
495
  const blocker = blockerFromReviewDecision(args.decision);
494
496
  const approved = reviewApproved(args.decision);
497
+ const contradictions = args.decision.stop_review_loop === true ? stopReviewLoopContradictions(args.decision) : [];
495
498
  const hasFinalActionRemaining = args.allowFinalActionRemaining && finalActionRemaining(args.decision.requirements_traceability);
496
499
  const verificationGap = args.decision.verification_remaining.trim();
497
500
  const traceabilityGaps = args.decision.requirements_traceability.filter((entry) => entry.status !== "proven").map((entry) => `${entry.status}: ${entry.requirement} — ${entry.evidence}`);
@@ -499,7 +502,8 @@ function reviewDecisionToRecord(args) {
499
502
  ...args.decision.findings.map((finding) => `[${finding.objective_alignment}] ${finding.title}: ${finding.body}`),
500
503
  ...traceabilityGaps,
501
504
  ...approved || verificationGap.length === 0 ? [] : [verificationGap],
502
- ...args.decision.reviewer_error == null ? [] : [`${args.decision.reviewer_error.kind}: ${args.decision.reviewer_error.message}`]
505
+ ...args.decision.reviewer_error == null ? [] : [`${args.decision.reviewer_error.kind}: ${args.decision.reviewer_error.message}`],
506
+ ...contradictions.length === 0 ? [] : [contradictedStopReviewLoopGap(contradictions)]
503
507
  ];
504
508
  const nextAction = approved ? hasFinalActionRemaining ? "pull-request" : "finish" : blocker === null ? "implementation" : "blocked";
505
509
  const convergenceDecision = summarizeReviewConvergence({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  scoring_prompt_reads,
7
7
  build_scoring_prompt
@@ -10476,6 +10476,24 @@ function findingBlocksClosure(finding) {
10476
10476
  return true;
10477
10477
  return priority <= MAX_BLOCKING_PRIORITY;
10478
10478
  }
10479
+ function stopReviewLoopContradictions(verdict) {
10480
+ const contradictions = [];
10481
+ if (verdict.overall_correctness !== "patch is correct") {
10482
+ contradictions.push(`overall_correctness is "${verdict.overall_correctness}"`);
10483
+ }
10484
+ if (verdict.goal_oracle_satisfied === false) {
10485
+ contradictions.push("goal_oracle_satisfied is false");
10486
+ }
10487
+ for (const finding of verdict.findings) {
10488
+ if (findingBlocksClosure(finding)) {
10489
+ contradictions.push(`blocking finding "${finding.title}"`);
10490
+ }
10491
+ }
10492
+ return contradictions;
10493
+ }
10494
+ function contradictedStopReviewLoopGap(contradictions) {
10495
+ return `stop_review_loop=true was not counted as approval because the same review reports ${contradictions.join("; ")}`;
10496
+ }
10479
10497
  function findingConsolidationKey(finding) {
10480
10498
  const normalizedTitle = finding.title.replace(/^\s*\[P[0-3]\]\s*/iu, "").toLowerCase().replace(/\s+/gu, " ").trim();
10481
10499
  return `${finding.code_location?.absolute_file_path ?? ""}::${normalizedTitle}`;
@@ -10696,4 +10714,4 @@ async function reverify_consolidated_batch(ctx, input) {
10696
10714
  return apply_reverify_results(input.batch, audits);
10697
10715
  }
10698
10716
 
10699
- export { workflowArtifactDirectoryPath, ensureWorkflowArtifactDirectory, createWorkflowArtifactDirectory, record_convergence, convergence_escalation_evidence, finalActionRemaining, consolidateFindingsBatch, parseFailureDiagnostics, reviewerFailureText, summarizeReviewConvergence, reverify_consolidated_batch };
10717
+ export { workflowArtifactDirectoryPath, ensureWorkflowArtifactDirectory, createWorkflowArtifactDirectory, record_convergence, convergence_escalation_evidence, finalActionRemaining, stopReviewLoopContradictions, contradictedStopReviewLoopGap, consolidateFindingsBatch, parseFailureDiagnostics, reviewerFailureText, summarizeReviewConvergence, reverify_consolidated_batch };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
 
6
6
  // dist/builtin/workflows/builtin/open-claude-design.ts
7
7
  import { Type as Type2 } from "typebox";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  stableArtifactRoot
7
7
  } from "./chunk-rc5ec5xx.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-crw7q5g1.js";
4
+ } from "./chunk-gyjck9z8.js";
5
5
  import {
6
6
  parse_rubric,
7
7
  normalize_criteria,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  DEFAULT_ACTION_CATEGORIES2,
3
3
  classify_and_act_default
4
- } from "./chunk-bzdvx2xr.js";
5
- import"./chunk-crw7q5g1.js";
6
- import"./chunk-kspvwc24.js";
4
+ } from "./chunk-r97ndfvt.js";
5
+ import"./chunk-gyjck9z8.js";
6
+ import"./chunk-9cm2ckq2.js";
7
7
  export {
8
8
  DEFAULT_ACTION_CATEGORIES2 as DEFAULT_ACTION_CATEGORIES,
9
9
  classify_and_act_default as default
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  fan_out_and_synthesize_default
3
- } from "./chunk-cw86srkf.js";
4
- import"./chunk-crw7q5g1.js";
5
- import"./chunk-kspvwc24.js";
3
+ } from "./chunk-632fxeb8.js";
4
+ import"./chunk-gyjck9z8.js";
5
+ import"./chunk-9cm2ckq2.js";
6
6
  export {
7
7
  fan_out_and_synthesize_default as default
8
8
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  generate_and_filter_default
3
- } from "./chunk-0nrgfbag.js";
3
+ } from "./chunk-kb7s3gx2.js";
4
4
  import"./chunk-2377r57g.js";
5
5
  import"./chunk-n1910xc4.js";
6
- import"./chunk-crw7q5g1.js";
7
- import"./chunk-kspvwc24.js";
6
+ import"./chunk-gyjck9z8.js";
7
+ import"./chunk-9cm2ckq2.js";
8
8
  export {
9
9
  generate_and_filter_default as default
10
10
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  goal_default
3
- } from "./chunk-maqv731g.js";
4
- import"./chunk-73c5tayt.js";
3
+ } from "./chunk-hj8mh07f.js";
4
+ import"./chunk-kgn5wz1c.js";
5
5
  import"./chunk-2377r57g.js";
6
6
  import"./chunk-z0d03ktm.js";
7
7
  import"./chunk-n1910xc4.js";
8
- import"./chunk-crw7q5g1.js";
9
- import"./chunk-kspvwc24.js";
8
+ import"./chunk-gyjck9z8.js";
9
+ import"./chunk-9cm2ckq2.js";
10
10
  export {
11
11
  goal_default as default
12
12
  };
@@ -1,36 +1,36 @@
1
- import"./chunk-crw7q5g1.js";
2
- import"./chunk-kspvwc24.js";
1
+ import"./chunk-gyjck9z8.js";
2
+ import"./chunk-9cm2ckq2.js";
3
3
  import"./chunk-n1910xc4.js";
4
4
  import"./chunk-2377r57g.js";
5
5
  import {
6
6
  adversarial_verification_default
7
- } from "./chunk-jaj27rqc.js";
7
+ } from "./chunk-a1ar035d.js";
8
8
  import {
9
9
  classify_and_act_default
10
- } from "./chunk-bzdvx2xr.js";
10
+ } from "./chunk-r97ndfvt.js";
11
11
  import {
12
12
  fan_out_and_synthesize_default
13
- } from "./chunk-cw86srkf.js";
13
+ } from "./chunk-632fxeb8.js";
14
14
  import {
15
15
  generate_and_filter_default
16
- } from "./chunk-0nrgfbag.js";
17
- import"./chunk-73c5tayt.js";
16
+ } from "./chunk-kb7s3gx2.js";
17
+ import"./chunk-kgn5wz1c.js";
18
18
  import"./chunk-z0d03ktm.js";
19
19
  import {
20
20
  goal_default
21
- } from "./chunk-maqv731g.js";
21
+ } from "./chunk-hj8mh07f.js";
22
22
  import {
23
23
  open_claude_design_default
24
- } from "./chunk-2hak3b7g.js";
24
+ } from "./chunk-nkj4qhj6.js";
25
25
  import {
26
26
  loop_until_done_default
27
- } from "./chunk-w18kbz63.js";
27
+ } from "./chunk-94f8zfz1.js";
28
28
  import {
29
29
  ralph_default
30
- } from "./chunk-wh19f5ee.js";
30
+ } from "./chunk-d3xhj946.js";
31
31
  import {
32
32
  tournament_default
33
- } from "./chunk-vkmpdat4.js";
33
+ } from "./chunk-wf876n16.js";
34
34
  export {
35
35
  adversarial_verification_default as adversarialVerification,
36
36
  classify_and_act_default as classifyAndAct,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  loop_until_done_default
3
- } from "./chunk-w18kbz63.js";
3
+ } from "./chunk-94f8zfz1.js";
4
4
  import"./chunk-z0d03ktm.js";
5
5
  import"./chunk-n1910xc4.js";
6
- import"./chunk-crw7q5g1.js";
7
- import"./chunk-kspvwc24.js";
6
+ import"./chunk-gyjck9z8.js";
7
+ import"./chunk-9cm2ckq2.js";
8
8
  export {
9
9
  loop_until_done_default as default
10
10
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  open_claude_design_default
3
- } from "./chunk-2hak3b7g.js";
4
- import"./chunk-crw7q5g1.js";
5
- import"./chunk-kspvwc24.js";
3
+ } from "./chunk-nkj4qhj6.js";
4
+ import"./chunk-gyjck9z8.js";
5
+ import"./chunk-9cm2ckq2.js";
6
6
  export {
7
7
  open_claude_design_default as default
8
8
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ralph_default
3
- } from "./chunk-wh19f5ee.js";
4
- import"./chunk-73c5tayt.js";
3
+ } from "./chunk-d3xhj946.js";
4
+ import"./chunk-kgn5wz1c.js";
5
5
  import"./chunk-2377r57g.js";
6
6
  import"./chunk-z0d03ktm.js";
7
7
  import"./chunk-n1910xc4.js";
8
- import"./chunk-crw7q5g1.js";
9
- import"./chunk-kspvwc24.js";
8
+ import"./chunk-gyjck9z8.js";
9
+ import"./chunk-9cm2ckq2.js";
10
10
  export {
11
11
  ralph_default as default
12
12
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withSteeringPropagationContext2
3
- } from "./chunk-kspvwc24.js";
3
+ } from "./chunk-9cm2ckq2.js";
4
4
  export {
5
5
  withSteeringPropagationContext2 as withSteeringPropagationContext
6
6
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  tournament_default
3
- } from "./chunk-vkmpdat4.js";
3
+ } from "./chunk-wf876n16.js";
4
4
  import"./chunk-2377r57g.js";
5
5
  import"./chunk-n1910xc4.js";
6
- import"./chunk-crw7q5g1.js";
7
- import"./chunk-kspvwc24.js";
6
+ import"./chunk-gyjck9z8.js";
7
+ import"./chunk-9cm2ckq2.js";
8
8
  export {
9
9
  tournament_default as default
10
10
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.21-alpha.1",
3
+ "version": "0.9.21-alpha.2",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -94631,7 +94631,7 @@ var SCOPE_DISCIPLINE_CONTRACT = keepContext([
94631
94631
  `));
94632
94632
  var EVIDENCE_CLOSURE_POLICY = [
94633
94633
  "Convergence flag (stop_review_loop):",
94634
- "- stop_review_loop is the single authoritative convergence signal; the harness trusts it without recomputing approval from findings, priorities, or requirements_traceability.",
94634
+ "- stop_review_loop is the convergence signal. The harness does not recompute approval from requirements_traceability, but it does not count stop_review_loop=true as approval when the same review says the patch is incorrect, reports goal_oracle_satisfied=false, or lists a blocking finding.",
94635
94635
  "- Derive stop_review_loop=false while any objective-relevant blocking work remains: a P0/P1/P2 finding, a required_by_objective finding at any priority including P3, or an unproven implementation/validation requirement.",
94636
94636
  "- Derive stop_review_loop=true when independent verification proves implementation and validation and only non-blocking items remain: consistent_with_objective P3 items, beyond_objective/contradicts_objective observations, an authorized post-approval PR/MR/review action, or reviewer quorum. Never hold it false for those items.",
94637
94637
  "- If the bounded loop ends first, preserve unresolved findings and remaining work for a human rather than relabeling them."
@@ -96509,6 +96509,24 @@ function findingBlocksClosure(finding) {
96509
96509
  return true;
96510
96510
  return priority <= MAX_BLOCKING_PRIORITY;
96511
96511
  }
96512
+ function stopReviewLoopContradictions(verdict) {
96513
+ const contradictions = [];
96514
+ if (verdict.overall_correctness !== "patch is correct") {
96515
+ contradictions.push(`overall_correctness is "${verdict.overall_correctness}"`);
96516
+ }
96517
+ if (verdict.goal_oracle_satisfied === false) {
96518
+ contradictions.push("goal_oracle_satisfied is false");
96519
+ }
96520
+ for (const finding of verdict.findings) {
96521
+ if (findingBlocksClosure(finding)) {
96522
+ contradictions.push(`blocking finding "${finding.title}"`);
96523
+ }
96524
+ }
96525
+ return contradictions;
96526
+ }
96527
+ function contradictedStopReviewLoopGap(contradictions) {
96528
+ return `stop_review_loop=true was not counted as approval because the same review reports ${contradictions.join("; ")}`;
96529
+ }
96512
96530
  function findingConsolidationKey(finding) {
96513
96531
  const normalizedTitle = finding.title.replace(/^\s*\[P[0-3]\]\s*/iu, "").toLowerCase().replace(/\s+/gu, " ").trim();
96514
96532
  return `${finding.code_location?.absolute_file_path ?? ""}::${normalizedTitle}`;
@@ -96762,7 +96780,7 @@ function reduceGoalDecision(ledger, turnReviews, options) {
96762
96780
  ...summary,
96763
96781
  turn: options.turn,
96764
96782
  decision: "complete",
96765
- reason: `Reviewer quorum met: ${completeVotes}/${options.reviewQuorum} reviewers independently reported stop_review_loop=true with no reviewer execution errors.`,
96783
+ reason: `Reviewer quorum met: ${completeVotes}/${options.reviewQuorum} reviewers independently reported stop_review_loop=true with a correct patch, a satisfied goal oracle, no blocking findings, and no reviewer execution errors.`,
96766
96784
  complete_votes: completeVotes,
96767
96785
  review_quorum: options.reviewQuorum
96768
96786
  }
@@ -96900,7 +96918,7 @@ function parsedReviewDecisionFromResult(result, reviewer) {
96900
96918
  };
96901
96919
  }
96902
96920
  function reviewApproved(decision) {
96903
- return decision.stop_review_loop === true && decision.reviewer_error == null;
96921
+ return decision.stop_review_loop === true && decision.reviewer_error == null && stopReviewLoopContradictions(decision).length === 0;
96904
96922
  }
96905
96923
  function reviewerErrorDecision(message) {
96906
96924
  return {
@@ -96933,6 +96951,7 @@ function blockerFromReviewDecision(decision) {
96933
96951
  function reviewDecisionToRecord(args) {
96934
96952
  const blocker = blockerFromReviewDecision(args.decision);
96935
96953
  const approved = reviewApproved(args.decision);
96954
+ const contradictions = args.decision.stop_review_loop === true ? stopReviewLoopContradictions(args.decision) : [];
96936
96955
  const hasFinalActionRemaining = args.allowFinalActionRemaining && finalActionRemaining(args.decision.requirements_traceability);
96937
96956
  const verificationGap = args.decision.verification_remaining.trim();
96938
96957
  const traceabilityGaps = args.decision.requirements_traceability.filter((entry) => entry.status !== "proven").map((entry) => `${entry.status}: ${entry.requirement} — ${entry.evidence}`);
@@ -96940,7 +96959,8 @@ function reviewDecisionToRecord(args) {
96940
96959
  ...args.decision.findings.map((finding) => `[${finding.objective_alignment}] ${finding.title}: ${finding.body}`),
96941
96960
  ...traceabilityGaps,
96942
96961
  ...approved || verificationGap.length === 0 ? [] : [verificationGap],
96943
- ...args.decision.reviewer_error == null ? [] : [`${args.decision.reviewer_error.kind}: ${args.decision.reviewer_error.message}`]
96962
+ ...args.decision.reviewer_error == null ? [] : [`${args.decision.reviewer_error.kind}: ${args.decision.reviewer_error.message}`],
96963
+ ...contradictions.length === 0 ? [] : [contradictedStopReviewLoopGap(contradictions)]
96944
96964
  ];
96945
96965
  const nextAction = approved ? hasFinalActionRemaining ? "pull-request" : "finish" : blocker === null ? "implementation" : "blocked";
96946
96966
  const convergenceDecision = summarizeReviewConvergence({
@@ -99150,7 +99170,7 @@ import { dirname as dirname7, join as join19 } from "node:path";
99150
99170
  import { Type as Type19 } from "typebox";
99151
99171
  // dist/builtin/workflows/builtin/ralph-review-gate.ts
99152
99172
  function reviewDecisionApproved(decision) {
99153
- return decision.stop_review_loop === true && decision.reviewer_error == null;
99173
+ return decision.stop_review_loop === true && decision.reviewer_error == null && stopReviewLoopContradictions(decision).length === 0;
99154
99174
  }
99155
99175
 
99156
99176
  // dist/builtin/workflows/builtin/ralph-core.ts
@@ -109393,7 +109413,9 @@ import { createStructuredOutputCapture, runCallback as runCallback2 } from "@bas
109393
109413
  import {
109394
109414
  AutoRoutingInferenceError,
109395
109415
  convertToLlm,
109396
- parseModelConstraints
109416
+ isModelRoutingDebugEnabled,
109417
+ parseModelConstraints,
109418
+ setsProviders
109397
109419
  } from "@bastani/atomic";
109398
109420
 
109399
109421
  // dist/builtin/workflows/src/runs/shared/model-fallback-candidates.ts
@@ -110134,6 +110156,7 @@ function stripWorkflowOnlyOptions(options, defaultSessionDir, meta, pendingStage
110134
110156
  fallbackModels: _fallbackModels,
110135
110157
  fallbackThinkingLevels: _fallbackThinkingLevels,
110136
110158
  modelConstraints: _modelConstraints,
110159
+ taskNeeds: _taskNeeds,
110137
110160
  inheritedModelConstraints: _inheritedModelConstraints,
110138
110161
  routerSelection: _routerSelection,
110139
110162
  context,
@@ -110988,7 +111011,9 @@ class StageSessionController {
110988
111011
  stageName: this.opts.stageName,
110989
111012
  constraints,
110990
111013
  signal: this.startupWait.signal,
110991
- selection: options?.routerSelection
111014
+ selection: options?.routerSelection,
111015
+ ...options?.taskNeeds ? { taskNeeds: options.taskNeeds } : {},
111016
+ ...setsProviders(parseModelConstraints(options?.modelConstraints)) ? { overrideProviderSettings: true } : {}
110992
111017
  });
110993
111018
  } catch (error) {
110994
111019
  this.startupWait.signal.throwIfAborted();
@@ -110996,7 +111021,8 @@ class StageSessionController {
110996
111021
  if (!(error instanceof AutoRoutingInferenceError) || error.currentModelRoute === undefined)
110997
111022
  throw error;
110998
111023
  this.modelRoute = error.currentModelRoute;
110999
- this.modelCatalog?.recordWarning?.(`workflows: stage auto routing failed; running "${this.opts.stageName}" on the current chat model ${this.modelRoute.modelOverride}.`);
111024
+ if (isModelRoutingDebugEnabled())
111025
+ this.modelCatalog?.recordWarning?.(`workflows: stage auto routing failed; running "${this.opts.stageName}" on the current chat model ${this.modelRoute.modelOverride}.`);
111000
111026
  }
111001
111027
  this.modelRoute.assertCurrent();
111002
111028
  this.meta.stageOptions = { ...options, model: this.modelRoute.modelOverride };
@@ -116349,6 +116375,7 @@ function workflowModelCatalogFromContext(ctx, resolveLiveContext) {
116349
116375
  ctx: {
116350
116376
  model: current.model,
116351
116377
  getRouterModel: () => current.getRouterModel(),
116378
+ ...current.getModelRouting ? { getModelRouting: () => current.getModelRouting() } : {},
116352
116379
  modelRegistry: {
116353
116380
  getAvailable: () => registry.getAvailable(),
116354
116381
  getAll: () => registry.getAll(),
@@ -116364,7 +116391,9 @@ function workflowModelCatalogFromContext(ctx, resolveLiveContext) {
116364
116391
  agent: { name: input.stageName, description: "Workflow stage" },
116365
116392
  constraints: input.constraints,
116366
116393
  signal: input.signal,
116367
- selection: input.selection
116394
+ selection: input.selection,
116395
+ ...input.taskNeeds ? { taskNeeds: input.taskNeeds } : {},
116396
+ ...input.overrideProviderSettings ? { overrideProviderSettings: true } : {}
116368
116397
  });
116369
116398
  },
116370
116399
  listModels: async () => {
@@ -122051,7 +122080,7 @@ var DEFAULT_PROMPT_GUIDANCE = [
122051
122080
  - Before launching, share a brief duration estimate without confidence labels. Estimates are not guarantees or budgets.
122052
122081
  - Preserve inherited budget limits and approval gates without asking for a budget before each launch. Pass \`budget\` only for limits the user stated; omission inherits and zero disables only its field. Never convert an estimate into a cap.
122053
122082
  - Heartbeat cadence is 15 minutes by default. Keep that interval unless the user explicitly asks for a different cadence. A heartbeat is a periodic alignment check: re-read the objective, judge whether the run is still on goal, and continue a progressing run when no intervention is needed. Use workflow pause, resume, or quit when run control is useful, and ask the user when a decision is needed.
122054
- - Wrap critical parts of the \`inputs\` you pass — objective, prompt, acceptance criteria — in \`<keepContext>\` / \`</keepContext>\`. Tagged text survives compaction verbatim regardless of the compression ratio, and stages inherit it because workflows inject your inputs into their prompts. A long stage is compacted repeatedly, and compaction ranks lines individually: a verbose restated objective outlives the one line that bounds it, so a stage can end up executing a coherent but unbounded version of what you asked for. Decide this per launch rather than tagging everything — tag role constraints, prohibitions, must-hold criteria, and identifiers such as a target branch, worktree path, or issue number; leave background, quoted issue text, and reference material untagged and pass bulk through files and \`reads\`. Protected lines count against the keep target rather than raising it, so an over-tagged input makes the evidence stages need compress harder. \`model: "auto"\` stages also route on an excerpt of about 9 KB (roughly 1,200 words) that keeps only the beginning, the end, and the protected spans, so state the objective in the first or last lines of an input or inside a short tagged span, keep tagged spans to a few lines, and put bulky material in the middle.
122083
+ - Wrap critical parts of the \`inputs\` you pass — objective, prompt, acceptance criteria — in \`<keepContext>\` / \`</keepContext>\`. Tagged text survives compaction verbatim regardless of the compression ratio, and stages inherit it because workflows inject your inputs into their prompts. A long stage is compacted repeatedly, and compaction ranks lines individually: a verbose restated objective outlives the one line that bounds it, so a stage can end up executing a coherent but unbounded version of what you asked for. Decide this per launch rather than tagging everything — tag role constraints, prohibitions, must-hold criteria, and identifiers such as a target branch, worktree path, or issue number; leave background, quoted issue text, and reference material untagged and pass bulk through files and \`reads\`. Protected lines count against the keep target rather than raising it, so an over-tagged input makes the evidence stages need compress harder.
122055
122084
  - Tag steering the same way. An Intercom \`send\` amendment is authoritative and stages must carry it forward, but it arrives late in an already-long session and is exactly one short message competing with the whole transcript; \`<keepContext>\` around the requirement keeps it from being compacted away before the stage acts on it.
122056
122085
  - In interactive chat, named workflow launches run in the background. Run \`/workflow connect <run>\` to see agents working and chat with and steer each stage. Inspection and control calls (\`status\`, \`stages\`, \`stage\`, \`transcript\`, \`answer\`, \`pause\`, \`resume\`, \`quit\`) remain available while work runs.
122057
122086
  - At lifecycle updates, revise the estimate only when new evidence materially changes the remaining path; at completion, report actual elapsed time against the estimate and note the main bottleneck for future scheduling. Do not add confidence labels or scores to duration estimates.
@@ -122089,7 +122118,7 @@ var DEFAULT_PROMPT_GUIDANCE = [
122089
122118
  - Prefer \`ctx.tool(name, args, fn)\` for workflow-owned TypeScript operations with side effects, such as filesystem writes, network mutations, and external API actions. It creates a tracked, non-attachable durable graph node before invoking \`fn\`; it may be used before, between, after, or without model stages. A completed \`ctx.tool\` call is durably checkpointed with its serializable result, so resume replays that result without rerunning \`fn\`. For checks that may fail during a bounded repair loop, opt into \`failureMode: "return"\`, branch on the typed outcome, and pass only the needed error fields to the repair stage or artifact yourself; Atomic does not inject failure evidence into later prompts. Retries do not bound a hung callback, so every \`ctx.tool\` callback that starts a child process or performs network I/O MUST set an explicit positive finite \`timeoutMs\` and forward the supplied \`signal\` to cancellable work. A timeout applies per attempt, aborts that attempt's signal, and gives retries a fresh deadline and signal. Cancellation and storage faults still throw. Keep pure computation and side-effect-free transformations as ordinary TypeScript. Do not wrap agent-stage internals or every function call indiscriminately; this rule applies to side effects orchestrated directly by the workflow definition.
122090
122119
  - Pass large stage context through files/artifacts and \`reads\` with an explicit \`Read the file at <path>...\` prompt rather than large \`previous\` payloads or injected session history.
122091
122120
  - Wrap critical stage-prompt content in \`<keepContext>\` / \`</keepContext>\`. Tagged content survives compression verbatim regardless of the compression ratio, and every line of the span including the tag lines is protected. A long-running stage will be compacted, and compaction ranks lines individually: an objective is verbose and restated while the constraint that narrows it is usually one line, so the constraint is the cheaper deletion and what survives reads as broader permission than intended. Tag role constraints that bound a stage to part of the work, acceptance criteria and immutable contracts, explicit prohibitions, and identifiers a stage must not lose such as a target branch, worktree path, or run ID. Do not tag bulk context: protected lines count against the keep target rather than raising it, so a large protected span makes the surrounding transcript compress harder — tag the constraint, not the material it applies to.
122092
- - Structure \`model: "auto"\` stage prompts for the model router. Routing sees an excerpt of about 9 KB (roughly 1,200 words): the beginning, the end, and every \`<keepContext>\` span, with cuts marked \`[... truncated ...]\`; the stage still receives the full prompt. Put the stage's role and objective in the first or last lines or a short tagged span, place artifact reads, issue text, and prior-stage output in the middle, and keep tagged spans brief — spans that alone exceed the excerpt are cut through the middle.
122121
+ - For \`model: "auto"\` stages, a chat model reads the prompt to answer the routing questions. Set \`taskNeeds\` (work, difficulty, mistakeCost, needsImages, longContext, latencySensitive) with everything you can judge so routing does not have to infer it. To skip whole providers because the user asked, set \`modelConstraints.allowedProviders\` or \`excludedProviders\`, which replace the user's \`modelRouting\` provider settings for that stage. To choose the contenders yourself, list them in \`modelConstraints.allowedModels\`; prefer the user's subscription models (for example ChatGPT/Codex, GitHub Copilot, a Claude subscription, or a coding or token plan) over pay-per-token API models, unless the user asked for API models or has no subscription models.
122093
122122
  - Separate implementation/review acceptance from explicitly authorized final actions such as PR/MR/review creation, release tagging, deployment, or publication. Stop implementation loops once acceptance is proven and carry a remaining final action separately.
122094
122123
  - A model stage sees its local prompt, artifacts, tools, and reads, not the graph name or surrounding implementation. State the concrete action, evidence, and success criteria directly.`
122095
122124
  ];