@bastani/atomic 0.9.4-alpha.1 → 0.9.4-alpha.11

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 (345) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/dist/builtin/cursor/CHANGELOG.md +24 -0
  3. package/dist/builtin/cursor/package.json +4 -4
  4. package/dist/builtin/intercom/CHANGELOG.md +24 -0
  5. package/dist/builtin/intercom/package.json +2 -2
  6. package/dist/builtin/mcp/CHANGELOG.md +24 -0
  7. package/dist/builtin/mcp/package.json +4 -4
  8. package/dist/builtin/subagents/CHANGELOG.md +52 -0
  9. package/dist/builtin/subagents/agents/code-simplifier.md +2 -2
  10. package/dist/builtin/subagents/agents/codebase-analyzer.md +2 -2
  11. package/dist/builtin/subagents/agents/codebase-locator.md +2 -2
  12. package/dist/builtin/subagents/agents/codebase-online-researcher.md +2 -2
  13. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -2
  14. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +2 -2
  15. package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -2
  16. package/dist/builtin/subagents/agents/debugger.md +1 -1
  17. package/dist/builtin/subagents/agents/worker.md +2 -2
  18. package/dist/builtin/subagents/package.json +4 -4
  19. package/dist/builtin/subagents/src/runs/background/async-execution-chain.ts +11 -1
  20. package/dist/builtin/subagents/src/runs/background/async-execution-single.ts +11 -1
  21. package/dist/builtin/subagents/src/runs/background/async-execution-types.ts +2 -0
  22. package/dist/builtin/subagents/src/runs/background/subagent-runner-step.ts +27 -4
  23. package/dist/builtin/subagents/src/runs/background/subagent-runner-streaming.ts +25 -0
  24. package/dist/builtin/subagents/src/runs/foreground/chain-execution-dynamic-step.ts +1 -0
  25. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +1 -0
  26. package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-step.ts +1 -0
  27. package/dist/builtin/subagents/src/runs/foreground/chain-execution-sequential-step.ts +1 -0
  28. package/dist/builtin/subagents/src/runs/foreground/chain-execution-types.ts +2 -0
  29. package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +3 -1
  30. package/dist/builtin/subagents/src/runs/foreground/execution-attempt.ts +22 -0
  31. package/dist/builtin/subagents/src/runs/foreground/execution-run-sync.ts +15 -5
  32. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +5 -1
  33. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +2 -0
  34. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +4 -1
  35. package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +4 -1
  36. package/dist/builtin/subagents/src/runs/shared/attempt-watchdog.ts +126 -0
  37. package/dist/builtin/subagents/src/runs/shared/model-candidate-filter.ts +53 -0
  38. package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +52 -53
  39. package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +2 -0
  40. package/dist/builtin/subagents/src/shared/model-info.ts +16 -0
  41. package/dist/builtin/subagents/src/shared/types-config.ts +2 -0
  42. package/dist/builtin/subagents/src/slash/slash-commands.ts +2 -2
  43. package/dist/builtin/subagents/src/tui/render-result-compact.ts +3 -2
  44. package/dist/builtin/subagents/src/tui/render-result.ts +3 -3
  45. package/dist/builtin/subagents/src/tui/render-widget-graph.ts +4 -3
  46. package/dist/builtin/subagents/src/tui/render-widget.ts +10 -4
  47. package/dist/builtin/web-access/CHANGELOG.md +24 -0
  48. package/dist/builtin/web-access/package.json +2 -2
  49. package/dist/builtin/workflows/CHANGELOG.md +54 -0
  50. package/dist/builtin/workflows/builtin/deep-research-codebase-utils.ts +24 -22
  51. package/dist/builtin/workflows/builtin/goal-runner.ts +12 -23
  52. package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +4 -4
  53. package/dist/builtin/workflows/builtin/ralph-models.ts +53 -75
  54. package/dist/builtin/workflows/package.json +2 -2
  55. package/dist/builtin/workflows/src/runs/shared/model-fallback-failures.ts +59 -1
  56. package/dist/builtin/workflows/src/tui/keybindings-adapter.ts +4 -0
  57. package/dist/builtin/workflows/src/tui/overlay-adapter.ts +4 -0
  58. package/dist/builtin/workflows/src/tui/stage-chat-view-input.ts +12 -1
  59. package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +2 -0
  60. package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +6 -0
  61. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +4 -0
  62. package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +4 -0
  63. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +8 -9
  64. package/dist/bun/cli.d.ts.map +1 -1
  65. package/dist/bun/cli.js +3 -2
  66. package/dist/bun/cli.js.map +1 -1
  67. package/dist/cli/file-processor.d.ts.map +1 -1
  68. package/dist/cli/file-processor.js +13 -25
  69. package/dist/cli/file-processor.js.map +1 -1
  70. package/dist/cli.d.ts.map +1 -1
  71. package/dist/cli.js +15 -5
  72. package/dist/cli.js.map +1 -1
  73. package/dist/config.d.ts +10 -3
  74. package/dist/config.d.ts.map +1 -1
  75. package/dist/config.js +18 -1
  76. package/dist/config.js.map +1 -1
  77. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  78. package/dist/core/agent-session-auto-compaction.js +8 -1
  79. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  80. package/dist/core/agent-session-events.d.ts.map +1 -1
  81. package/dist/core/agent-session-events.js +16 -8
  82. package/dist/core/agent-session-events.js.map +1 -1
  83. package/dist/core/agent-session-export.d.ts.map +1 -1
  84. package/dist/core/agent-session-export.js +4 -2
  85. package/dist/core/agent-session-export.js.map +1 -1
  86. package/dist/core/agent-session-extension-bindings.d.ts +5 -1
  87. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  88. package/dist/core/agent-session-extension-bindings.js +18 -7
  89. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  90. package/dist/core/agent-session-methods.d.ts +13 -3
  91. package/dist/core/agent-session-methods.d.ts.map +1 -1
  92. package/dist/core/agent-session-methods.js.map +1 -1
  93. package/dist/core/agent-session-prompt.d.ts +2 -0
  94. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  95. package/dist/core/agent-session-prompt.js +15 -2
  96. package/dist/core/agent-session-prompt.js.map +1 -1
  97. package/dist/core/agent-session-retry.d.ts +2 -0
  98. package/dist/core/agent-session-retry.d.ts.map +1 -1
  99. package/dist/core/agent-session-retry.js +66 -7
  100. package/dist/core/agent-session-retry.js.map +1 -1
  101. package/dist/core/agent-session-state.d.ts.map +1 -1
  102. package/dist/core/agent-session-state.js +2 -2
  103. package/dist/core/agent-session-state.js.map +1 -1
  104. package/dist/core/agent-session-tool-hooks.d.ts +7 -1
  105. package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
  106. package/dist/core/agent-session-tool-hooks.js +26 -4
  107. package/dist/core/agent-session-tool-hooks.js.map +1 -1
  108. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  109. package/dist/core/agent-session-tool-registry.js +4 -0
  110. package/dist/core/agent-session-tool-registry.js.map +1 -1
  111. package/dist/core/agent-session-tree.d.ts.map +1 -1
  112. package/dist/core/agent-session-tree.js +3 -1
  113. package/dist/core/agent-session-tree.js.map +1 -1
  114. package/dist/core/agent-session-types.d.ts +4 -0
  115. package/dist/core/agent-session-types.d.ts.map +1 -1
  116. package/dist/core/agent-session-types.js.map +1 -1
  117. package/dist/core/agent-session.d.ts +5 -1
  118. package/dist/core/agent-session.d.ts.map +1 -1
  119. package/dist/core/agent-session.js +5 -0
  120. package/dist/core/agent-session.js.map +1 -1
  121. package/dist/core/async/format.d.ts +3 -0
  122. package/dist/core/async/format.d.ts.map +1 -0
  123. package/dist/core/async/format.js +50 -0
  124. package/dist/core/async/format.js.map +1 -0
  125. package/dist/core/async/job-manager.d.ts +39 -0
  126. package/dist/core/async/job-manager.d.ts.map +1 -0
  127. package/dist/core/async/job-manager.js +254 -0
  128. package/dist/core/async/job-manager.js.map +1 -0
  129. package/dist/core/async/session-manager.d.ts +18 -0
  130. package/dist/core/async/session-manager.d.ts.map +1 -0
  131. package/dist/core/async/session-manager.js +61 -0
  132. package/dist/core/async/session-manager.js.map +1 -0
  133. package/dist/core/async/types.d.ts +23 -0
  134. package/dist/core/async/types.d.ts.map +1 -0
  135. package/dist/core/async/types.js +2 -0
  136. package/dist/core/async/types.js.map +1 -0
  137. package/dist/core/copilot-model-catalog.d.ts +38 -74
  138. package/dist/core/copilot-model-catalog.d.ts.map +1 -1
  139. package/dist/core/copilot-model-catalog.js +177 -68
  140. package/dist/core/copilot-model-catalog.js.map +1 -1
  141. package/dist/core/copilot-model-static-fallbacks.d.ts +43 -0
  142. package/dist/core/copilot-model-static-fallbacks.d.ts.map +1 -0
  143. package/dist/core/copilot-model-static-fallbacks.js +50 -0
  144. package/dist/core/copilot-model-static-fallbacks.js.map +1 -0
  145. package/dist/core/copilot-model-synthesis.d.ts +10 -0
  146. package/dist/core/copilot-model-synthesis.d.ts.map +1 -0
  147. package/dist/core/copilot-model-synthesis.js +89 -0
  148. package/dist/core/copilot-model-synthesis.js.map +1 -0
  149. package/dist/core/extensions/api-types.d.ts +2 -1
  150. package/dist/core/extensions/api-types.d.ts.map +1 -1
  151. package/dist/core/extensions/api-types.js.map +1 -1
  152. package/dist/core/extensions/index.d.ts +1 -1
  153. package/dist/core/extensions/index.d.ts.map +1 -1
  154. package/dist/core/extensions/index.js.map +1 -1
  155. package/dist/core/extensions/loader-core.d.ts.map +1 -1
  156. package/dist/core/extensions/loader-core.js +3 -3
  157. package/dist/core/extensions/loader-core.js.map +1 -1
  158. package/dist/core/extensions/loader-virtual-modules.d.ts +11 -0
  159. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  160. package/dist/core/extensions/loader-virtual-modules.js +79 -11
  161. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  162. package/dist/core/extensions/session-events.d.ts +7 -1
  163. package/dist/core/extensions/session-events.d.ts.map +1 -1
  164. package/dist/core/extensions/session-events.js.map +1 -1
  165. package/dist/core/http-dispatcher.d.ts +2 -0
  166. package/dist/core/http-dispatcher.d.ts.map +1 -1
  167. package/dist/core/http-dispatcher.js +38 -5
  168. package/dist/core/http-dispatcher.js.map +1 -1
  169. package/dist/core/model-registry-builtins.d.ts.map +1 -1
  170. package/dist/core/model-registry-builtins.js +40 -6
  171. package/dist/core/model-registry-builtins.js.map +1 -1
  172. package/dist/core/model-registry.d.ts.map +1 -1
  173. package/dist/core/model-registry.js +4 -3
  174. package/dist/core/model-registry.js.map +1 -1
  175. package/dist/core/model-resolver-defaults.d.ts.map +1 -1
  176. package/dist/core/model-resolver-defaults.js +1 -1
  177. package/dist/core/model-resolver-defaults.js.map +1 -1
  178. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  179. package/dist/core/resource-loader-reload.js +6 -3
  180. package/dist/core/resource-loader-reload.js.map +1 -1
  181. package/dist/core/resource-loader-types.d.ts +6 -0
  182. package/dist/core/resource-loader-types.d.ts.map +1 -1
  183. package/dist/core/resource-loader-types.js.map +1 -1
  184. package/dist/core/session-manager-core.d.ts +2 -12
  185. package/dist/core/session-manager-core.d.ts.map +1 -1
  186. package/dist/core/session-manager-core.js +8 -16
  187. package/dist/core/session-manager-core.js.map +1 -1
  188. package/dist/core/settings-manager-resource-accessors.d.ts +1 -0
  189. package/dist/core/settings-manager-resource-accessors.d.ts.map +1 -1
  190. package/dist/core/settings-manager-resource-accessors.js +11 -0
  191. package/dist/core/settings-manager-resource-accessors.js.map +1 -1
  192. package/dist/core/settings-manager-ui-accessors.d.ts +2 -0
  193. package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
  194. package/dist/core/settings-manager-ui-accessors.js +9 -0
  195. package/dist/core/settings-manager-ui-accessors.js.map +1 -1
  196. package/dist/core/settings-types.d.ts +2 -0
  197. package/dist/core/settings-types.d.ts.map +1 -1
  198. package/dist/core/settings-types.js.map +1 -1
  199. package/dist/core/timings.d.ts +7 -5
  200. package/dist/core/timings.d.ts.map +1 -1
  201. package/dist/core/timings.js +42 -24
  202. package/dist/core/timings.js.map +1 -1
  203. package/dist/core/tools/bash-async-execution.d.ts +25 -0
  204. package/dist/core/tools/bash-async-execution.d.ts.map +1 -0
  205. package/dist/core/tools/bash-async-execution.js +71 -0
  206. package/dist/core/tools/bash-async-execution.js.map +1 -0
  207. package/dist/core/tools/bash-async-jobs.d.ts +10 -0
  208. package/dist/core/tools/bash-async-jobs.d.ts.map +1 -1
  209. package/dist/core/tools/bash-async-jobs.js +18 -2
  210. package/dist/core/tools/bash-async-jobs.js.map +1 -1
  211. package/dist/core/tools/bash-async-output.d.ts +3 -1
  212. package/dist/core/tools/bash-async-output.d.ts.map +1 -1
  213. package/dist/core/tools/bash-async-output.js +4 -1
  214. package/dist/core/tools/bash-async-output.js.map +1 -1
  215. package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
  216. package/dist/core/tools/bash-pty-native.js +2 -2
  217. package/dist/core/tools/bash-pty-native.js.map +1 -1
  218. package/dist/core/tools/bash.d.ts +10 -4
  219. package/dist/core/tools/bash.d.ts.map +1 -1
  220. package/dist/core/tools/bash.js +20 -38
  221. package/dist/core/tools/bash.js.map +1 -1
  222. package/dist/core/tools/read-selectors.d.ts.map +1 -1
  223. package/dist/core/tools/read-selectors.js +19 -1
  224. package/dist/core/tools/read-selectors.js.map +1 -1
  225. package/dist/core/tools/read.d.ts.map +1 -1
  226. package/dist/core/tools/read.js +12 -23
  227. package/dist/core/tools/read.js.map +1 -1
  228. package/dist/core/tools/search-native.d.ts.map +1 -1
  229. package/dist/core/tools/search-native.js +2 -2
  230. package/dist/core/tools/search-native.js.map +1 -1
  231. package/dist/index-extensions.d.ts +1 -1
  232. package/dist/index-extensions.d.ts.map +1 -1
  233. package/dist/index-extensions.js.map +1 -1
  234. package/dist/index.d.ts +1 -1
  235. package/dist/index.d.ts.map +1 -1
  236. package/dist/index.js.map +1 -1
  237. package/dist/main-session.d.ts.map +1 -1
  238. package/dist/main-session.js +14 -5
  239. package/dist/main-session.js.map +1 -1
  240. package/dist/main.d.ts.map +1 -1
  241. package/dist/main.js +56 -32
  242. package/dist/main.js.map +1 -1
  243. package/dist/modes/interactive/components/assistant-message.d.ts +3 -1
  244. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/assistant-message.js +22 -15
  246. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  247. package/dist/modes/interactive/components/chat-message-renderer.d.ts +1 -0
  248. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  249. package/dist/modes/interactive/components/chat-message-renderer.js +5 -5
  250. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  251. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  252. package/dist/modes/interactive/components/chat-session-host-events.js +8 -0
  253. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  254. package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
  255. package/dist/modes/interactive/components/chat-session-host-rendering.js +1 -0
  256. package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
  257. package/dist/modes/interactive/components/user-message.d.ts +6 -2
  258. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  259. package/dist/modes/interactive/components/user-message.js +16 -5
  260. package/dist/modes/interactive/components/user-message.js.map +1 -1
  261. package/dist/modes/interactive/interactive-agent-events.d.ts.map +1 -1
  262. package/dist/modes/interactive/interactive-agent-events.js +6 -1
  263. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  264. package/dist/modes/interactive/interactive-deferred-startup.d.ts +2 -0
  265. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -0
  266. package/dist/modes/interactive/interactive-deferred-startup.js +59 -0
  267. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -0
  268. package/dist/modes/interactive/interactive-editor-actions.d.ts.map +1 -1
  269. package/dist/modes/interactive/interactive-editor-actions.js +1 -0
  270. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  271. package/dist/modes/interactive/interactive-extension-context.d.ts.map +1 -1
  272. package/dist/modes/interactive/interactive-extension-context.js +1 -0
  273. package/dist/modes/interactive/interactive-extension-context.js.map +1 -1
  274. package/dist/modes/interactive/interactive-mode-base.d.ts +3 -0
  275. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  276. package/dist/modes/interactive/interactive-mode-base.js +6 -0
  277. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  278. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
  279. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  280. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  281. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  282. package/dist/modes/interactive/interactive-mode-surface.d.ts +2 -0
  283. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  284. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  285. package/dist/modes/interactive/interactive-mode-types.d.ts +2 -0
  286. package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
  287. package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
  288. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  289. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  290. package/dist/modes/interactive/interactive-mode.js +1 -0
  291. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  292. package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
  293. package/dist/modes/interactive/interactive-model-routing.js +2 -4
  294. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  295. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  296. package/dist/modes/interactive/interactive-render-chat.js +4 -3
  297. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  298. package/dist/modes/interactive/interactive-session-runtime.d.ts.map +1 -1
  299. package/dist/modes/interactive/interactive-session-runtime.js +5 -2
  300. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  301. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  302. package/dist/modes/interactive/interactive-startup.js +11 -1
  303. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  304. package/dist/modes/rpc/rpc-client.d.ts +28 -51
  305. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  306. package/dist/modes/rpc/rpc-client.js +27 -51
  307. package/dist/modes/rpc/rpc-client.js.map +1 -1
  308. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  309. package/dist/modes/rpc/rpc-command-handler.js +19 -0
  310. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  311. package/dist/modes/rpc/rpc-types.d.ts +26 -0
  312. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  313. package/dist/modes/rpc/rpc-types.js.map +1 -1
  314. package/dist/rpc-entry.d.ts +3 -0
  315. package/dist/rpc-entry.d.ts.map +1 -0
  316. package/dist/rpc-entry.js +12 -0
  317. package/dist/rpc-entry.js.map +1 -0
  318. package/dist/utils/image-convert.d.ts +1 -0
  319. package/dist/utils/image-convert.d.ts.map +1 -1
  320. package/dist/utils/image-convert.js +21 -15
  321. package/dist/utils/image-convert.js.map +1 -1
  322. package/dist/utils/image-process.d.ts +18 -0
  323. package/dist/utils/image-process.d.ts.map +1 -0
  324. package/dist/utils/image-process.js +83 -0
  325. package/dist/utils/image-process.js.map +1 -0
  326. package/dist/utils/mime.d.ts.map +1 -1
  327. package/dist/utils/mime.js +41 -0
  328. package/dist/utils/mime.js.map +1 -1
  329. package/dist/utils/module-require.d.ts +11 -0
  330. package/dist/utils/module-require.d.ts.map +1 -0
  331. package/dist/utils/module-require.js +16 -0
  332. package/dist/utils/module-require.js.map +1 -0
  333. package/docs/compaction.md +2 -0
  334. package/docs/development.md +10 -0
  335. package/docs/extensions.md +11 -0
  336. package/docs/models.md +3 -3
  337. package/docs/providers.md +2 -1
  338. package/docs/rpc.md +60 -2
  339. package/docs/sdk.md +1 -1
  340. package/docs/settings.md +4 -1
  341. package/docs/subagents.md +6 -0
  342. package/docs/tools.md +4 -2
  343. package/docs/workflows.md +4 -2
  344. package/npm-shrinkwrap.json +138 -171
  345. package/package.json +19 -12
@@ -68,6 +68,16 @@ bun --cwd packages/coding-agent run test -- test/specific.test.ts
68
68
 
69
69
  The file-length gate scans tracked `.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, `.cjs`, and `.rs` files via `git ls-files`, falls back to a recursive walk outside Git, and counts physical lines with a no-final-newline correction. Only generated/vendored path globs (`node_modules`, `dist`, `target`, `binaries`, `.git`, `vendor`, minified bundles, and the bundled third-party `packages/workflows/skills/impeccable/**` skill) plus first-five-line generated markers are excluded; there is no grandfather/baseline allowlist for authored files.
70
70
 
71
+ ## Release shrinkwrap
72
+
73
+ `@bastani/atomic` ships `packages/coding-agent/npm-shrinkwrap.json` for deterministic package-manager installs. Main stays versionless at `0.0.0`; `scripts/cut-release.ts` stamps the real version in an off-main worktree and regenerates the shrinkwrap there before tagging.
74
+
75
+ The shrinkwrap generator is hermetic for Atomic-owned packages. It derives `@bastani/atomic-natives` and generated native optional package entries from local package metadata plus deterministic registry tarball URLs, so release publishing does not depend on npm metadata for native packages that were just published.
76
+
77
+ ```bash
78
+ bun run scripts/generate-coding-agent-shrinkwrap.mjs --check
79
+ ```
80
+
71
81
  ## Project Structure
72
82
 
73
83
  ```
@@ -402,6 +402,17 @@ pi.on("session_start", async (event, ctx) => {
402
402
  });
403
403
  ```
404
404
 
405
+ #### session_info_changed
406
+
407
+ Fired when the current session display name is set via `/name`, RPC, or `pi.setSessionName()`.
408
+
409
+ ```typescript
410
+ pi.on("session_info_changed", async (event, ctx) => {
411
+ // event.name - current normalized name, or undefined if cleared
412
+ ctx.ui.notify(`Session renamed: ${event.name ?? "(none)"}`, "info");
413
+ });
414
+ ```
415
+
405
416
  #### session_before_switch
406
417
 
407
418
  Fired before starting a new session (`/new`) or switching sessions (`/resume`).
package/docs/models.md CHANGED
@@ -271,15 +271,15 @@ Users can select a supported context window independently from thinking level:
271
271
  atomic --model custom/long-context-model --thinking high --context-window 1m
272
272
  ```
273
273
 
274
- In interactive mode, run `/model` and pick a model; when the chosen model exposes more than one window, Atomic immediately prompts for the context window as a follow-up step — a GitHub Copilot CLI-style picker that lists numbered `Default` and `Long context` tiers with their token counts (for example `272k tokens` / `922k tokens` for `github-copilot/gpt-5.5`, or `200k tokens` / `936k tokens` for the Claude/Gemini long-context models) — so you can choose one of the active model's supported budgets. Persisted interactive selections are stored per model under `defaultContextWindows["provider/modelId"]` (raw token counts and compact labels such as `400k` or `1m` are accepted), so a Copilot-specific prompt cap does not leak into Anthropic, Cursor, or other providers. GitHub Copilot long-context requests treat `1m` as a branded budget request and resolve it to the model's largest advertised long-context tier not exceeding the request (for example `936k` for Copilot Claude Opus), while other providers continue to require one of their own exact supported windows or use their natural scalar default. Successful explicit startup selections are recorded as `context_window_change` entries even when the chosen value equals the scalar default, preserving the user's explicit budget choice across future settings changes and resume.
274
+ In interactive mode, run `/model` and pick a model; when the chosen model exposes more than one window, Atomic immediately prompts for the context window as a follow-up step — a GitHub Copilot CLI-style picker that lists numbered `Default` and `Long context` tiers with their token counts (for example `272k tokens` / `922k tokens` for `github-copilot/gpt-5.5`, or `200k tokens` / `936k tokens` for Claude/Gemini long-context models such as `github-copilot/claude-sonnet-5`) — so you can choose one of the active model's supported budgets. Persisted interactive selections are stored per model under `defaultContextWindows["provider/modelId"]` (raw token counts and compact labels such as `400k` or `1m` are accepted), so a Copilot-specific prompt cap does not leak into Anthropic, Cursor, or other providers. GitHub Copilot long-context requests treat `1m` as a branded budget request and resolve it to the model's largest advertised long-context tier not exceeding the request (for example `936k` for Copilot Claude models), while other providers continue to require one of their own exact supported windows or use their natural scalar default. Successful explicit startup selections are recorded as `context_window_change` entries even when the chosen value equals the scalar default, preserving the user's explicit budget choice across future settings changes and resume.
275
275
 
276
276
  Use larger context windows deliberately. Some providers charge more for larger windows, and Atomic preserves each model's default unless the user explicitly opts in through `--context-window`, the `/model` selection flow, per-model `defaultContextWindows`, or the optional global `defaultContextWindow` fallback.
277
277
 
278
278
  #### GitHub Copilot context windows
279
279
 
280
- GitHub Copilot context windows are measured in **input (prompt) tokens**, exactly like every other provider's `contextWindow`, and are derived **dynamically from GitHub's live CAPI model catalog** (`GET {baseUrl}/models`) rather than a hardcoded model list — so models GitHub adds, removes, or retiers are reflected automatically. Atomic fetches the catalog only when you actually have the GitHub Copilot provider authenticated and caches it on disk for 30 minutes.
280
+ GitHub Copilot context windows are measured in **input (prompt) tokens**, exactly like every other provider's `contextWindow`, and are derived **dynamically from GitHub's live CAPI model catalog** (`GET {baseUrl}/models`) rather than a hardcoded model list — so plain Copilot model ids GitHub adds, removes, or retiers are reflected automatically. Atomic fetches the catalog only when you actually have the GitHub Copilot provider authenticated, caches it on disk for 30 minutes, and refreshes the active interactive session's model metadata as soon as that catalog is applied. Dynamic model creation is intentionally limited to picker-enabled, non-disabled `chat` entries with plain, non-namespaced ids; enterprise/org-deployed catalog ids containing `/` (for example `octodemo/Octodemo_Foundry/DeepSeek-V3.2`) are skipped instead of being exposed as `github-copilot/*` models. The same catalog also supplies Copilot output-token caps and selectable thinking levels: when CAPI advertises `capabilities.limits.max_output_tokens`, Atomic uses that live value as the model's `maxTokens` instead of the bundled fallback; when CAPI advertises `capabilities.supports.reasoning_effort` as an array, Atomic hides unsupported thinking levels for both dynamically synthesized Copilot models and bundled `pi-ai` Copilot models. Models that only advertise thinking budgets or a boolean reasoning-effort flag keep their existing thinking-level behavior.
281
281
 
282
- Each selectable Copilot window is a prompt/input budget. Atomic reads `capabilities.limits.max_prompt_tokens` for the full prompt cap and treats `capabilities.limits.max_context_window_tokens` as the model's total context capacity (prompt plus output reserve) and a compatibility fallback only when the prompt cap is absent. Models with tiered pricing expose their per-tier prompt budgets through `billing.token_prices.<tier>.context_max`: the `default` tier becomes the base window and a larger `long_context` tier is offered as a selectable option. For example `github-copilot/gpt-5.5` resolves to a `272k` default / `922k` long window, and the Claude/Gemini long-context models resolve to `200k` default / `936k` long. When the request is a rounded budget such as `1m`, Atomic selects the largest advertised Copilot long-context prompt tier at or below that budget instead of falling back to the base `200k`/`272k` window. Offline, unauthenticated, or non-Copilot sessions leave the built-in scalar window untouched and show no picker.
282
+ Each selectable Copilot window is a prompt/input budget. Atomic reads `capabilities.limits.max_prompt_tokens` for the full prompt cap, `capabilities.limits.max_output_tokens` for the maximum response/output cap, and treats `capabilities.limits.max_context_window_tokens` as the model's total context capacity (prompt plus output reserve) and a compatibility fallback only when the prompt cap is absent. Models with tiered pricing expose their per-tier prompt budgets through `billing.token_prices.<tier>.context_max`: the `default` tier becomes the base window and a larger `long_context` tier is offered as a selectable option. For example `github-copilot/gpt-5.5` resolves to a `272k` default / `922k` long prompt budget, `github-copilot/mai-code-1-flash-picker` advertises a `128k` prompt cap with a `256k` total context window, and `github-copilot/claude-sonnet-5` plus other Claude/Gemini long-context models resolve to `200k` default / `936k` long. When the request is a rounded budget such as `1m`, Atomic selects the largest advertised Copilot long-context prompt tier at or below that budget instead of falling back to the base `200k`/`272k` window. Offline, unauthenticated, or non-Copilot sessions leave the built-in scalar window and output-token cap untouched and show no picker.
283
283
 
284
284
  Selecting the long-context window does two client-side things:
285
285
 
package/docs/providers.md CHANGED
@@ -38,8 +38,9 @@ Anthropic subscription auth is active for Claude Pro/Max accounts. Third-party h
38
38
  ### GitHub Copilot
39
39
 
40
40
  - Press Enter for github.com, or enter your GitHub Enterprise Server domain
41
+ - When using `COPILOT_GITHUB_TOKEN` instead of `/login`, Atomic uses the token's `proxy-ep` when present, honors `COPILOT_API_TARGET` or `GITHUB_COPILOT_BASE_URL` overrides, derives `copilot-api.<tenant>.ghe.com` from `GITHUB_SERVER_URL=*.ghe.com`, derives `https://api.enterprise.githubcopilot.com` from other non-`github.com` server URLs, and otherwise falls back to the public Copilot routing hub `https://api.githubcopilot.com` instead of the account-specific individual endpoint.
41
42
  - If you get "model not supported", enable it in VS Code: Copilot Chat → model selector → select model → "Enable"
42
- - Supported built-in Copilot long-context models, including `github-copilot/gpt-5.5`, `github-copilot/claude-opus-4.8`, and `github-copilot/gemini-3.1-pro-preview`, expose an opt-in long-context choice through `--context-window`, the `/model` selection flow, per-model `defaultContextWindows`, SDK, and RPC controls. The long-context option advertises the model's full context window (for example `1m` or `1.05m` — GitHub's `max_context_window_tokens`), matching how the native `openai/*` and `anthropic/*` providers report these models and what the chat footer shows. GitHub's lower server-side prompt cap (`max_prompt_tokens`, for example `936k` or `922k`) is retained internally as the effective input budget that drives compaction thresholds and overflow recovery, so the branded window is displayed without overrunning the server limit.
43
+ - GitHub Copilot models are populated dynamically from Copilot's live CAPI `/models` catalog when Copilot auth is available. Atomic synthesizes only picker-enabled, non-disabled `chat` entries with plain ids (for example `github-copilot/claude-sonnet-5` and `github-copilot/mai-code-1-flash-picker`); namespaced enterprise deployments containing `/` are skipped rather than exposed as `github-copilot/*` models. Models that advertise long-context limits, such as `github-copilot/gpt-5.5`, `github-copilot/claude-opus-4.8`, and `github-copilot/gemini-3.1-pro-preview`, expose an opt-in long-context choice through `--context-window`, the `/model` selection flow, per-model `defaultContextWindows`, SDK, and RPC controls. The long-context option advertises the model's full context window (for example `1m` or `1.05m` — GitHub's `max_context_window_tokens`), matching how the native `openai/*` and `anthropic/*` providers report these models and what the chat footer shows. GitHub's lower server-side prompt cap (`max_prompt_tokens`, for example `936k` or `922k`) is retained internally as the effective input budget that drives compaction thresholds and overflow recovery, and GitHub's live output cap (`max_output_tokens`) replaces Atomic's bundled `maxTokens` fallback for provider requests. If CAPI advertises `capabilities.supports.reasoning_effort` as an array, Atomic also gates `/model` and thinking-level cycling to only those live levels for both dynamic Copilot models and bundled `pi-ai` Copilot models; budget-only or boolean-only reasoning metadata leaves the existing thinking map untouched. Active interactive sessions refresh from this metadata as soon as the catalog is applied, so a startup fallback model does not keep stale reasoning levels until restart. This lets Atomic display the branded context window, request the catalog-advertised output budget, and avoid offering unsupported Copilot reasoning levels.
43
44
  - Selecting long context sets Atomic's displayed window to the model's full capacity while compaction triggers against the effective prompt-token budget, and makes Copilot requests include `X-GitHub-Api-Version: 2026-06-01`. Atomic does not send a body field, `contextTier`, or model-id variant; GitHub automatically applies the server-side `long_context` tier when prompt tokens exceed the default budget.
44
45
  - Long-context Copilot requests consume more AI credits and require Copilot long-context/usage-based billing entitlement. A prompt that reaches the model's normal prompt cap is compacted and retried automatically. Only when GitHub rejects a prompt *below* that cap — for example because the account lacks the long-context/usage-based billing entitlement and is dropped to a smaller server tier — does Atomic surface a friendly entitlement/server-cap/cost hint rather than silently truncating context.
45
46
  - **Gemini models** (`github-copilot/gemini-3.1-pro-preview`, `github-copilot/gemini-3.5-flash`, …) are served through Copilot's CAPI gateway, which re-translates the OpenAI request into Google's GenAI format and enforces Gemini's stricter `FunctionDeclaration` schema (it rejects a tool-parameter `anyOf`/`oneOf` whose branch is a complex object, returning `400 invalid request body`). Atomic automatically sanitizes outbound tool/function JSON Schemas for these models into the supported subset — resolving object/array-bearing unions to their most expressive branch, converting `const`/literal unions to `enum`, collapsing nullable unions to `nullable`, and dropping non-portable keywords such as `additionalProperties`, `patternProperties`, `format`, and numeric/length bounds. Gemini also serializes array/object tool-call **arguments** as flattened indexed keys (`keywords[0]`, `keywords[1]`, …); Atomic reconstructs these back into proper arrays/objects before validation so tool calls (including `structured_output` and MCP tools) don't fail and loop. Both transforms are transparent and scoped to GitHub Copilot Gemini models only; no configuration is required and other providers/models are unaffected.
package/docs/rpc.md CHANGED
@@ -335,7 +335,7 @@ Unsupported or malformed selections return the standard RPC error response:
335
335
  }
336
336
  ```
337
337
 
338
- Larger provider context windows may consume more credits/cost. For allowlisted GitHub Copilot long-context models (including `github-copilot/gpt-5.5` and `github-copilot/gemini-3.1-pro-preview`), selecting `1m` raises Atomic's local budget and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub applies the long-context billing tier server-side by prompt token count. That tier consumes more Copilot AI credits and requires Copilot long-context/usage-based billing entitlement, otherwise requests over GitHub's server cap are rejected with a friendly hint.
338
+ Larger provider context windows may consume more credits/cost. For catalog-advertised GitHub Copilot long-context models (including `github-copilot/gpt-5.5`, `github-copilot/claude-sonnet-5`, and `github-copilot/gemini-3.1-pro-preview`), selecting `1m` raises Atomic's local budget and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub applies the long-context billing tier server-side by prompt token count. That tier consumes more Copilot AI credits and requires Copilot long-context/usage-based billing entitlement, otherwise requests over GitHub's server cap are rejected with a friendly hint.
339
339
 
340
340
  ### Thinking
341
341
 
@@ -722,6 +722,64 @@ Response:
722
722
  }
723
723
  ```
724
724
 
725
+ #### get_entries
726
+
727
+ Get all session entries in append order (excluding the session header). The session is an append-only tree of entries with stable ids, so an entry id works as a durable cursor: pass the last entry id you have seen as `since` to get only entries strictly after it, even across client restarts. Unlike `get_messages`, this includes pre-compaction history and abandoned branches.
728
+
729
+ ```json
730
+ {"type": "get_entries"}
731
+ ```
732
+
733
+ With a cursor:
734
+ ```json
735
+ {"type": "get_entries", "since": "abc123"}
736
+ ```
737
+
738
+ Response:
739
+ ```json
740
+ {
741
+ "type": "response",
742
+ "command": "get_entries",
743
+ "success": true,
744
+ "data": {
745
+ "entries": [
746
+ {"type": "message", "id": "def456", "parentId": "abc123", "timestamp": "...", "message": {"role": "user", "...": "..."}}
747
+ ],
748
+ "leafId": "def456"
749
+ }
750
+ }
751
+ ```
752
+
753
+ `leafId` is the id of the current leaf entry (`null` for an empty session), so a client can tell in one round trip whether the active branch moved. If `since` does not match any entry id, the response is `success: false`.
754
+
755
+ #### get_tree
756
+
757
+ Get the session as a tree of entries. Each node is `{entry, children, label?, labelTimestamp?}`. A well-formed session has a single root; orphaned entries (broken parent chain) also appear as roots.
758
+
759
+ ```json
760
+ {"type": "get_tree"}
761
+ ```
762
+
763
+ Response:
764
+ ```json
765
+ {
766
+ "type": "response",
767
+ "command": "get_tree",
768
+ "success": true,
769
+ "data": {
770
+ "tree": [
771
+ {
772
+ "entry": {"type": "message", "id": "abc123", "parentId": null, "...": "..."},
773
+ "children": [
774
+ {"entry": {"type": "message", "id": "def456", "parentId": "abc123", "...": "..."}, "children": []}
775
+ ]
776
+ }
777
+ ],
778
+ "leafId": "def456"
779
+ }
780
+ }
781
+ ```
782
+
725
783
  #### get_last_assistant_text
726
784
 
727
785
  Get the text content of the last assistant message.
@@ -984,7 +1042,7 @@ Emitted when the active context-window token budget changes through RPC `set_con
984
1042
  }
985
1043
  ```
986
1044
 
987
- Larger provider context windows may consume more credits/cost. Prefer the model default unless the additional repository/session context is useful for the current task. For allowlisted GitHub Copilot long-context models such as `github-copilot/gpt-5.5` and `github-copilot/gemini-3.1-pro-preview`, a `1m` selection raises Atomic's local budget and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub applies the long-context billing tier server-side by prompt size, consumes more Copilot AI credits, and requires long-context/usage-based billing entitlement.
1045
+ Larger provider context windows may consume more credits/cost. Prefer the model default unless the additional repository/session context is useful for the current task. For catalog-advertised GitHub Copilot long-context models such as `github-copilot/gpt-5.5`, `github-copilot/claude-sonnet-5`, and `github-copilot/gemini-3.1-pro-preview`, a `1m` selection raises Atomic's local budget and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub applies the long-context billing tier server-side by prompt size, consumes more Copilot AI credits, and requires long-context/usage-based billing entitlement.
988
1046
 
989
1047
  ### compaction_start / compaction_end
990
1048
 
package/docs/sdk.md CHANGED
@@ -439,7 +439,7 @@ If no model is provided:
439
439
 
440
440
  Context-window selection is independent from `thinkingLevel`. `contextWindow` accepts a raw token count such as `400_000` or `1_000_000`; for most providers the value must be present in the model's supported context windows (`model.contextWindowOptions` plus the scalar default). GitHub Copilot is the only provider with rounded long-context budget handling: when a tiered Copilot model advertises a long tier below the branded request (for example `936_000` for a `1_000_000` request), Atomic selects the largest advertised Copilot long tier at or below the request instead of falling back to the short tier. Settings lookup first checks the selected model's `defaultContextWindows["provider/modelId"]` entry, then the optional global `defaultContextWindow` fallback; unsupported model-specific settings keep the model default and return `contextWindowWarning`, while unsupported global fallback values are ignored silently as not applicable to the active model. When you pass `contextWindowStrict: true`, an unsupported explicit selection is reported as `contextWindowError` so callers can fail before prompting. A successful explicit `contextWindow` startup option is journaled as a `context_window_change` entry even when it equals the scalar model default, so the user's explicit budget choice survives future settings changes and resume.
441
441
 
442
- At runtime, use `session.getAvailableContextWindows()` to inspect supported values, `session.supportsContextWindowSelection()` to check whether more than one value is selectable, and `session.setContextWindow(tokens, { persistDefault })` to change the active model budget. `setContextWindow()` journals a `context_window_change` entry only when the active value changes. Passing `{ persistDefault: true }` also writes the effective selected budget to `defaultContextWindows["provider/modelId"]` in settings instead of the global fallback, so a Copilot prompt cap such as `936k` does not leak into Anthropic, Cursor, or other providers. Tree navigation replays the target branch's `context_window_change` state into the active model without adding another journal entry or changing settings. Larger provider context windows may consume more credits/cost, so opt into larger values deliberately. For allowlisted GitHub Copilot long-context models (including `github-copilot/gpt-5.5` and `github-copilot/gemini-3.1-pro-preview`), selecting `1m` raises Atomic's local budget to the model's advertised `922k`/`936k` tier and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub applies the long-context tier server-side by prompt token count, consumes more Copilot AI credits, and requires long-context/usage-based billing entitlement.
442
+ At runtime, use `session.getAvailableContextWindows()` to inspect supported values, `session.supportsContextWindowSelection()` to check whether more than one value is selectable, and `session.setContextWindow(tokens, { persistDefault })` to change the active model budget. `setContextWindow()` journals a `context_window_change` entry only when the active value changes. Passing `{ persistDefault: true }` also writes the effective selected budget to `defaultContextWindows["provider/modelId"]` in settings instead of the global fallback, so a Copilot prompt cap such as `936k` does not leak into Anthropic, Cursor, or other providers. Tree navigation replays the target branch's `context_window_change` state into the active model without adding another journal entry or changing settings. Larger provider context windows may consume more credits/cost, so opt into larger values deliberately. For catalog-advertised GitHub Copilot long-context models (including `github-copilot/gpt-5.5`, `github-copilot/claude-sonnet-5`, and `github-copilot/gemini-3.1-pro-preview`), selecting `1m` raises Atomic's local budget to the model's advertised `922k`/`936k` tier and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub applies the long-context tier server-side by prompt token count, consumes more Copilot AI credits, and requires long-context/usage-based billing entitlement.
443
443
 
444
444
  The package root exports the same context-window helpers and types used by the runtime: `parseContextWindowValue()`, `formatContextWindow()`, `validateContextWindowValue()`, `normalizeContextWindowOptions()`, `getModelDefaultContextWindow()`, `getSupportedContextWindows()`, `withContextWindowOptions()`, `selectContextWindow()`, `ContextWindowParseResult`, `ContextWindowSelection`, `ContextWindowSelectionError`, and `ContextWindowSelectionOptions`. Importing from `@bastani/atomic` also includes the `@earendil-works/pi-ai` `Model<Api>` augmentation for `contextWindowOptions` and `defaultContextWindow`, so SDK consumers can use the helper types without importing internal source paths.
445
445
 
package/docs/settings.md CHANGED
@@ -78,6 +78,8 @@ Use `/fast` in interactive mode to edit these settings. Atomic applies fast mode
78
78
  | `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
79
79
  | `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
80
80
  | `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
81
+ | `outputPad` | number | `1` | Horizontal padding for chat message output (user messages, assistant messages, thinking blocks). `0` or `1` |
82
+ | `externalEditor` | string | - | Command for the Ctrl+G external editor; takes precedence over `$VISUAL`/`$EDITOR`. Defaults to Notepad on Windows and `nano` elsewhere |
81
83
  | `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
82
84
  | `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
83
85
 
@@ -248,12 +250,13 @@ When multiple sources specify a session directory, precedence is `--session-dir`
248
250
  "defaultContextWindow": "1m",
249
251
  "defaultContextWindows": {
250
252
  "github-copilot/claude-opus-4.8": "936k",
253
+ "github-copilot/claude-sonnet-5": "936k",
251
254
  "github-copilot/gpt-5.5": "922k"
252
255
  }
253
256
  }
254
257
  ```
255
258
 
256
- Context-window settings are independent of `defaultThinkingLevel`: selecting a larger context window does not change reasoning effort. Interactive users can change the active model's budget through the `/model` selection flow, which prompts for a context window whenever the chosen model supports more than one window and persists the effective selection under `defaultContextWindows["provider/modelId"]`. Atomic treats `defaultContextWindow` as a broad fallback only: if the active model does not support that value, the model's own default is used without a startup warning; targeted `defaultContextWindows` entries still warn when they become unsupported for their exact model. Larger provider context windows can carry higher usage cost. For GitHub Copilot allowlisted long-context models (including `github-copilot/gpt-5.5` and `github-copilot/gemini-3.1-pro-preview`), selecting `1m` raises Atomic's local prompt budget to the largest advertised long-context tier at or below that rounded request (for example `922k` or `936k`) and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub then applies the long-context tier server-side by prompt token count. That tier consumes more Copilot AI credits and requires Copilot long-context/usage-based billing entitlement, otherwise requests over the server cap are rejected with a friendly hint. Custom providers and explicit model overrides can still declare their own selectable `contextWindowOptions`.
259
+ Context-window settings are independent of `defaultThinkingLevel`: selecting a larger context window does not change reasoning effort. Interactive users can change the active model's budget through the `/model` selection flow, which prompts for a context window whenever the chosen model supports more than one window and persists the effective selection under `defaultContextWindows["provider/modelId"]`. Atomic treats `defaultContextWindow` as a broad fallback only: if the active model does not support that value, the model's own default is used without a startup warning; targeted `defaultContextWindows` entries still warn when they become unsupported for their exact model. Larger provider context windows can carry higher usage cost. For catalog-advertised GitHub Copilot long-context models (including dynamically populated plain catalog ids such as `github-copilot/claude-sonnet-5`, while namespaced enterprise deployment ids containing `/` are skipped), selecting `1m` raises Atomic's local prompt budget to the largest advertised long-context tier at or below that rounded request (for example `922k` or `936k`) and sends `X-GitHub-Api-Version: 2026-06-01`; GitHub then applies the long-context tier server-side by prompt token count. That tier consumes more Copilot AI credits and requires Copilot long-context/usage-based billing entitlement, otherwise requests over the server cap are rejected with a friendly hint. Custom providers and explicit model overrides can still declare their own selectable `contextWindowOptions`.
257
260
 
258
261
  ### Markdown
259
262
 
package/docs/subagents.md CHANGED
@@ -175,6 +175,12 @@ Dynamic fanout `collect.outputSchema` validates the collected result array after
175
175
 
176
176
  Agents can define ordered `fallbackModels` for retryable provider or model failures such as rate limits, quota/auth problems, unavailable models, network timeouts, or 5xx errors. Atomic tries the requested primary model first, then configured fallbacks, and finally appends the current user-selected model as the last fallback candidate when available.
177
177
 
178
+ A candidate that cannot serve the current request — for example an HTTP 400/413/422 bad/unprocessable/payload-too-large request, an unsupported tool or parameter, a context-length/context-window overflow, or a `too large` / `invalid_request` error — is treated as request/context incompatible and the chain advances to the next candidate rather than stopping. This means that if none of the configured candidates are applicable to the request, Atomic falls back to the currently selected user model instead of failing outright.
179
+
180
+ Each foreground and background model candidate is bounded by a per-attempt idle watchdog (default 5 minutes without child stdout, stderr, or JSON child events) and an absolute wall-clock cap (default 60 minutes). An in-flight tool execution counts as activity, so a slow, quiet tool call (a long build or test run that streams nothing until it finishes) is not mistaken for a stalled attempt; only the wall-clock cap bounds such attempts. If either watchdog trips, Atomic terminates that child attempt, records a retryable timeout in `modelAttempts`, and continues to the next fallback candidate. The defaults can be overridden with `ATOMIC_SUBAGENT_ATTEMPT_IDLE_TIMEOUT_MS` and `ATOMIC_SUBAGENT_ATTEMPT_TIMEOUT_MS`; `ATOMIC_SUBAGENT_ATTEMPT_KILL_GRACE_MS` controls SIGTERM-to-SIGKILL escalation. Setting the idle or wall-clock variable to `0` (or a negative value) disables that timeout entirely; non-numeric values are ignored and the default applies. The kill-grace period cannot be disabled — `0`, negative, or non-numeric values fall back to its default so escalation always stays bounded.
181
+
182
+ When registry availability shows that a known candidate provider has no configured auth, Atomic records a skipped model attempt before spawning a child. Unknown/custom providers are still attempted, and the current user-selected model appended as the final fallback is never filtered out by this pre-spawn check.
183
+
178
184
  Fallbacks do not retry ordinary task failures, validation failures, tool failures, cancellations, or workflow-code errors. Because a fallback may send the same prompt and context to a different provider, choose models that match your cost, privacy, and data-handling requirements.
179
185
 
180
186
  Each candidate can also carry its own reasoning effort — see [Reasoning levels](#reasoning-levels).
package/docs/tools.md CHANGED
@@ -28,9 +28,11 @@ Before writing, Atomic verifies the current file against the tagged snapshot. If
28
28
 
29
29
  ## `bash` and `bashInterceptor`
30
30
 
31
- The `bash` tool executes shell commands in the session workspace, with optional PTY or background-job handling. When `pty: true` is requested, local execution uses the bundled Rust-backed PTY session so commands see a real terminal, including headless/tool-only and async job calls; if the native PTY package is unavailable, Atomic degrades to normal pipe execution. Set `PI_NO_PTY=1` or `ATOMIC_NO_PTY=1` to force normal pipe execution. Completed foreground results include oh-my-pi-style `timeoutSeconds`, `requestedTimeoutSeconds`, `wallTimeMs`, and non-zero `exitCode` metadata; background jobs use `details.async: { state, jobId, type: "bash" }`, can be polled with `bash({"command":"__atomic_bash_job <id>"})`, can be cancelled with `bash({"command":"__atomic_bash_job_cancel <id>"})`, and preserve overflow output in a temporary `fullOutputPath` when polling output is truncated. `bashInterceptor.enabled` defaults to `false`; interception is not auto-enabled.
31
+ The `bash` tool executes shell commands in the session workspace, with optional PTY or background-job handling. When `pty: true` is requested, local execution uses the bundled Rust-backed PTY session so commands see a real terminal, including headless/tool-only and async job calls; if the native PTY package is unavailable, Atomic degrades to normal pipe execution. Set `PI_NO_PTY=1` or `ATOMIC_NO_PTY=1` to force normal pipe execution. Completed foreground results include oh-my-pi-style `timeoutSeconds`, `requestedTimeoutSeconds`, `wallTimeMs`, and non-zero `exitCode` metadata; background jobs use `details.async: { state, jobId, type: "bash" }`, can be polled with `bash({"command":"__atomic_bash_job <id>"})`, can be cancelled with `bash({"command":"__atomic_bash_job_cancel <id>"})`, and preserve overflow output in a temporary `fullOutputPath` when polling output is truncated.
32
32
 
33
- When explicitly enabled in settings, built-in bash interceptor rules block common shell substitutes for first-class tools (`cat`/`grep`/`find`/in-place `sed`/redirection, etc.) only when the corresponding tool is available. Enabled bash tool calls are also offered to `user_bash` extension handlers before local execution. Atomic checks the original command, the internal-URL-expanded command, configured-prefix forms, `spawnHook`-rewritten commands, and a leading `cd path && command` or `cd path; command`-stripped form only when structured `cwd` was omitted, so interceptors can route commands by effective working directory without overriding explicit `cwd`. The bash schema accepts `cwd`, `env`, `timeout`, `pty`, and `async`; `cwd` and `env` are honored by the local executor, `timeout` defaults to 300s and is clamped to 1..3600s, and normal sessions enable tracked async jobs with bounded retention.
33
+ When a session-managed background bash job completes or fails, Atomic sends an `async-job-result` custom follow-up into the conversation automatically (`display: true`, delivered as a follow-up turn). Small results are inlined, and results whose raw output stays below the persistence threshold remain fully inline even if the formatted follow-up header pushes the message over the preview limit; persisted large results include a preview plus the retained `fullOutputPath` (persisted before the normal polling truncation limit so 12KB–50KB outputs remain recoverable). If the model explicitly polls a completed job with `__atomic_bash_job <id>` before the queued follow-up is delivered, or cancels a job with `__atomic_bash_job_cancel <id>`, Atomic acknowledges the result and suppresses duplicate auto-delivery while keeping the job pollable until normal bounded retention/TTL cleanup. Suppression is tied to the retained job rather than a short timer, so disposed-session jobs cannot later fall back into another session after a long-running command completes. Session delivery attempts are non-blocking across sessions: a live streaming session can defer its own follow-up until the stream boundary without delaying unrelated completed jobs. Session disposal removes that session's pending async delivery handlers; a shared manager remains alive while other live sessions still own active jobs, then cleans up when the last session is disposed. Direct SDK/tool-factory uses only get automatic delivery when they provide an async job manager/delivery handler; otherwise async jobs remain manually pollable.
34
+
35
+ When explicitly enabled in settings, built-in bash interceptor rules block common shell substitutes for first-class tools (`cat`/`grep`/`find`/in-place `sed`/redirection, etc.) only when the corresponding tool is available. Enabled bash tool calls are also offered to `user_bash` extension handlers before local execution. Atomic checks the original command, the internal-URL-expanded command, configured-prefix forms, `spawnHook`-rewritten commands, and a leading `cd path && command` or `cd path; command`-stripped form only when structured `cwd` was omitted, so interceptors can route commands by effective working directory without overriding explicit `cwd`. The bash schema accepts `cwd`, `env`, `timeout`, `pty`, and `async`; `cwd` and `env` are honored by the local executor, `timeout` defaults to 300s and is clamped to 1..3600s, and normal sessions enable tracked async jobs with bounded retention. `bashInterceptor.enabled` defaults to `false`; interception is not auto-enabled.
34
36
 
35
37
  ```json
36
38
  {
package/docs/workflows.md CHANGED
@@ -1814,7 +1814,9 @@ export default workflow({
1814
1814
 
1815
1815
  For lower-level integrations, `@bastani/workflows` also exports `setupGitWorktree({ gitWorktreeDir, baseBranch, cwd })`, returning `{ worktreeRoot, cwd, repositoryRoot, created }` with the same validation, symlink-preserving path handling, and cwd-preservation behavior used by workflow stages.
1816
1816
 
1817
- `fallbackModels` retries transient provider/model failures with the primary `model` first, then each fallback, then the current Atomic-selected model when available. It is for rate limits, quota/auth/provider outages, unavailable models, network timeouts, and 5xx errors — not workflow-code errors, tool failures, validation failures, or cancellations.
1817
+ `fallbackModels` retries transient provider/model failures with the primary `model` first, then each fallback, then the current Atomic-selected model when available. It is for rate limits, quota/auth/provider outages, unavailable models, network timeouts, generic transport errors such as `Connection error.` / `fetch failed`, and 5xx errors — not workflow-code errors, tool failures, validation failures, or cancellations.
1818
+
1819
+ A candidate that is **request/context incompatible** with the current turn — for example an HTTP 400/413/422 bad/unprocessable/payload-too-large request, an unsupported tool or parameter, a context-length/context-window overflow, or a `too large` / `invalid_request` / `bad_request` error — also advances the chain to the next candidate rather than stopping. This ensures that if none of the configured candidates can serve the request, the workflow stage falls back to the currently selected user model instead of hard-failing. Refusals, content-filter/safety blocks, cancellations, and task failures still stop the chain and are never retried on another model.
1818
1820
 
1819
1821
  When a finished stage's session is reattached for a follow-up (for example a post-completion follow-up, or after the CLI is reloaded), the stage resumes on the model the session last settled on — the one that actually worked — instead of replaying the chain from the primary. If that model fails again with a transient/retryable error, the full chain is retried from the primary.
1820
1822
 
@@ -1849,7 +1851,7 @@ A `model`/`fallbackModels` entry may also request a context-window budget with a
1849
1851
  ```ts
1850
1852
  await ctx.task("review", {
1851
1853
  task: "Review the diff",
1852
- model: "anthropic/claude-fable-5:xhigh",
1854
+ model: "anthropic/claude-fable-5:high",
1853
1855
  // The copilot opus fallback runs at its largest advertised (long-context) window.
1854
1856
  // Use (long) for a size-agnostic marker, or a rounded long-tier label like (1m).
1855
1857
  fallbackModels: ["github-copilot/claude-opus-4.8 (long):xhigh", "anthropic/claude-opus-4-8:xhigh"],