@bastani/atomic 0.9.70 → 0.9.71-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/dist/builtin/intercom/package.json +2 -2
  3. package/dist/builtin/mcp/CHANGELOG.md +16 -0
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  6. package/dist/builtin/subagents/package.json +3 -3
  7. package/dist/builtin/subagents/src/extension/index.bundle.mjs +8 -5
  8. package/dist/builtin/web-access/index.bundle.mjs +14750 -6455
  9. package/dist/builtin/web-access/package.json +3 -3
  10. package/dist/builtin/workflows/CHANGELOG.md +20 -0
  11. package/dist/builtin/workflows/package.json +2 -2
  12. package/dist/builtin/workflows/src/extension/index.bundle.mjs +27 -10
  13. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +19 -5
  14. package/dist/builtin/workflows/src/index.js +19 -5
  15. package/dist/builtin/workflows/src/local-worker-entry.mjs +19 -5
  16. package/dist/cli/list-models.d.ts +7 -2
  17. package/dist/cli/list-models.d.ts.map +1 -1
  18. package/dist/cli/list-models.js +22 -50
  19. package/dist/cli/list-models.js.map +1 -1
  20. package/dist/core/agent-session-events.d.ts.map +1 -1
  21. package/dist/core/agent-session-events.js +2 -0
  22. package/dist/core/agent-session-events.js.map +1 -1
  23. package/dist/core/agent-session-message-queue.d.ts +9 -8
  24. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  25. package/dist/core/agent-session-message-queue.js +24 -7
  26. package/dist/core/agent-session-message-queue.js.map +1 -1
  27. package/dist/core/agent-session-methods.d.ts +4 -7
  28. package/dist/core/agent-session-methods.d.ts.map +1 -1
  29. package/dist/core/agent-session-methods.js.map +1 -1
  30. package/dist/core/agent-session-models.d.ts.map +1 -1
  31. package/dist/core/agent-session-models.js +6 -10
  32. package/dist/core/agent-session-models.js.map +1 -1
  33. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  34. package/dist/core/agent-session-prompt.js +9 -8
  35. package/dist/core/agent-session-prompt.js.map +1 -1
  36. package/dist/core/agent-session-retry.d.ts.map +1 -1
  37. package/dist/core/agent-session-retry.js +5 -0
  38. package/dist/core/agent-session-retry.js.map +1 -1
  39. package/dist/core/agent-session-transfer.d.ts.map +1 -1
  40. package/dist/core/agent-session-transfer.js +2 -0
  41. package/dist/core/agent-session-transfer.js.map +1 -1
  42. package/dist/core/agent-session-typed-queue.d.ts +19 -0
  43. package/dist/core/agent-session-typed-queue.d.ts.map +1 -0
  44. package/dist/core/agent-session-typed-queue.js +34 -0
  45. package/dist/core/agent-session-typed-queue.js.map +1 -0
  46. package/dist/core/agent-session-types.d.ts +20 -0
  47. package/dist/core/agent-session-types.d.ts.map +1 -1
  48. package/dist/core/agent-session-types.js.map +1 -1
  49. package/dist/core/agent-session.d.ts +1 -1
  50. package/dist/core/agent-session.d.ts.map +1 -1
  51. package/dist/core/agent-session.js.map +1 -1
  52. package/dist/core/cache-warmer.d.ts.map +1 -1
  53. package/dist/core/cache-warmer.js +2 -0
  54. package/dist/core/cache-warmer.js.map +1 -1
  55. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  56. package/dist/core/compaction/branch-summarization.js +13 -2
  57. package/dist/core/compaction/branch-summarization.js.map +1 -1
  58. package/dist/core/extensions/api-types.d.ts +6 -3
  59. package/dist/core/extensions/api-types.d.ts.map +1 -1
  60. package/dist/core/extensions/api-types.js.map +1 -1
  61. package/dist/core/extensions/index.d.ts +1 -1
  62. package/dist/core/extensions/index.d.ts.map +1 -1
  63. package/dist/core/extensions/index.js.map +1 -1
  64. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  65. package/dist/core/extensions/loader-api.js +6 -2
  66. package/dist/core/extensions/loader-api.js.map +1 -1
  67. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  68. package/dist/core/extensions/loader-virtual-modules.js +2 -0
  69. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  70. package/dist/core/extensions/message-types.d.ts +18 -1
  71. package/dist/core/extensions/message-types.d.ts.map +1 -1
  72. package/dist/core/extensions/message-types.js.map +1 -1
  73. package/dist/core/extensions/runner-registries.d.ts.map +1 -1
  74. package/dist/core/extensions/runner-registries.js +8 -1
  75. package/dist/core/extensions/runner-registries.js.map +1 -1
  76. package/dist/core/extensions/runner.d.ts +1 -0
  77. package/dist/core/extensions/runner.d.ts.map +1 -1
  78. package/dist/core/extensions/runner.js +1 -0
  79. package/dist/core/extensions/runner.js.map +1 -1
  80. package/dist/core/extensions/runtime-types.d.ts +2 -2
  81. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  82. package/dist/core/extensions/runtime-types.js.map +1 -1
  83. package/dist/core/fast-model-variants.d.ts +0 -9
  84. package/dist/core/fast-model-variants.d.ts.map +1 -1
  85. package/dist/core/fast-model-variants.js +0 -14
  86. package/dist/core/fast-model-variants.js.map +1 -1
  87. package/dist/core/model-config.d.ts +14 -0
  88. package/dist/core/model-config.d.ts.map +1 -1
  89. package/dist/core/model-label.d.ts +38 -0
  90. package/dist/core/model-label.d.ts.map +1 -0
  91. package/dist/core/model-label.js +46 -0
  92. package/dist/core/model-label.js.map +1 -0
  93. package/dist/core/model-resolver-initial.d.ts +5 -0
  94. package/dist/core/model-resolver-initial.d.ts.map +1 -1
  95. package/dist/core/model-resolver-initial.js +26 -1
  96. package/dist/core/model-resolver-initial.js.map +1 -1
  97. package/dist/core/model-resolver.d.ts +1 -1
  98. package/dist/core/model-resolver.d.ts.map +1 -1
  99. package/dist/core/model-resolver.js +1 -1
  100. package/dist/core/model-resolver.js.map +1 -1
  101. package/dist/core/model-runtime.d.ts +5 -7
  102. package/dist/core/model-runtime.d.ts.map +1 -1
  103. package/dist/core/model-runtime.js +14 -19
  104. package/dist/core/model-runtime.js.map +1 -1
  105. package/dist/core/model-switch-thinking-level.d.ts +23 -0
  106. package/dist/core/model-switch-thinking-level.d.ts.map +1 -0
  107. package/dist/core/model-switch-thinking-level.js +19 -0
  108. package/dist/core/model-switch-thinking-level.js.map +1 -0
  109. package/dist/core/package-manager-git.d.ts +2 -0
  110. package/dist/core/package-manager-git.d.ts.map +1 -1
  111. package/dist/core/package-manager-git.js +32 -4
  112. package/dist/core/package-manager-git.js.map +1 -1
  113. package/dist/core/package-manager-operations.d.ts.map +1 -1
  114. package/dist/core/package-manager-operations.js +37 -5
  115. package/dist/core/package-manager-operations.js.map +1 -1
  116. package/dist/core/package-manager-types.d.ts +7 -1
  117. package/dist/core/package-manager-types.d.ts.map +1 -1
  118. package/dist/core/package-manager-types.js.map +1 -1
  119. package/dist/core/remote-catalog-provider.d.ts +14 -0
  120. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  121. package/dist/core/remote-catalog-provider.js +73 -0
  122. package/dist/core/remote-catalog-provider.js.map +1 -1
  123. package/dist/core/sdk.d.ts.map +1 -1
  124. package/dist/core/sdk.js +11 -4
  125. package/dist/core/sdk.js.map +1 -1
  126. package/dist/core/skills.js +1 -1
  127. package/dist/core/skills.js.map +1 -1
  128. package/dist/core/storage/index.d.ts +1 -0
  129. package/dist/core/storage/index.d.ts.map +1 -1
  130. package/dist/core/storage/index.js +1 -0
  131. package/dist/core/storage/index.js.map +1 -1
  132. package/dist/core/storage/node-sqlite.d.ts.map +1 -1
  133. package/dist/core/storage/node-sqlite.js +13 -8
  134. package/dist/core/storage/node-sqlite.js.map +1 -1
  135. package/dist/core/storage/write-ahead-log.d.ts +25 -0
  136. package/dist/core/storage/write-ahead-log.d.ts.map +1 -0
  137. package/dist/core/storage/write-ahead-log.js +78 -0
  138. package/dist/core/storage/write-ahead-log.js.map +1 -0
  139. package/dist/core/system-prompt.d.ts.map +1 -1
  140. package/dist/core/system-prompt.js +3 -4
  141. package/dist/core/system-prompt.js.map +1 -1
  142. package/dist/core/tasks/completion.d.ts +3 -2
  143. package/dist/core/tasks/completion.d.ts.map +1 -1
  144. package/dist/core/tasks/completion.js +7 -2
  145. package/dist/core/tasks/completion.js.map +1 -1
  146. package/dist/core/tasks/heartbeat-notice.d.ts +2 -0
  147. package/dist/core/tasks/heartbeat-notice.d.ts.map +1 -1
  148. package/dist/core/tasks/heartbeat-notice.js +8 -4
  149. package/dist/core/tasks/heartbeat-notice.js.map +1 -1
  150. package/dist/core/tasks/heartbeat.d.ts.map +1 -1
  151. package/dist/core/tasks/heartbeat.js +1 -0
  152. package/dist/core/tasks/heartbeat.js.map +1 -1
  153. package/dist/core/tools/tool-definition-wrapper.d.ts +4 -4
  154. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  155. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  156. package/dist/core/tools/write.d.ts.map +1 -1
  157. package/dist/core/tools/write.js +13 -16
  158. package/dist/core/tools/write.js.map +1 -1
  159. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  160. package/dist/extensions/codemode/renderer.js +6 -2
  161. package/dist/extensions/codemode/renderer.js.map +1 -1
  162. package/dist/extensions/llama/huggingface-ui.d.ts +1 -0
  163. package/dist/extensions/llama/huggingface-ui.d.ts.map +1 -1
  164. package/dist/extensions/llama/huggingface-ui.js +13 -4
  165. package/dist/extensions/llama/huggingface-ui.js.map +1 -1
  166. package/dist/extensions/llama/ui.d.ts.map +1 -1
  167. package/dist/extensions/llama/ui.js +3 -0
  168. package/dist/extensions/llama/ui.js.map +1 -1
  169. package/dist/extensions/mcp/client/transports/stdio.d.ts.map +1 -1
  170. package/dist/extensions/mcp/client/transports/stdio.js +13 -2
  171. package/dist/extensions/mcp/client/transports/stdio.js.map +1 -1
  172. package/dist/extensions/mcp/client/transports/streamable-http.d.ts.map +1 -1
  173. package/dist/extensions/mcp/client/transports/streamable-http.js +41 -3
  174. package/dist/extensions/mcp/client/transports/streamable-http.js.map +1 -1
  175. package/dist/extensions/mcp/ui.d.ts +1 -0
  176. package/dist/extensions/mcp/ui.d.ts.map +1 -1
  177. package/dist/extensions/mcp/ui.js +33 -24
  178. package/dist/extensions/mcp/ui.js.map +1 -1
  179. package/dist/index-extensions.d.ts +1 -1
  180. package/dist/index-extensions.d.ts.map +1 -1
  181. package/dist/index-extensions.js.map +1 -1
  182. package/dist/index.d.ts +1 -0
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +1 -0
  185. package/dist/index.js.map +1 -1
  186. package/dist/main-deferred-startup.d.ts +23 -1
  187. package/dist/main-deferred-startup.d.ts.map +1 -1
  188. package/dist/main-deferred-startup.js +28 -0
  189. package/dist/main-deferred-startup.js.map +1 -1
  190. package/dist/main.d.ts.map +1 -1
  191. package/dist/main.js +8 -14
  192. package/dist/main.js.map +1 -1
  193. package/dist/modes/interactive/components/assistant-message.d.ts +1 -3
  194. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  195. package/dist/modes/interactive/components/assistant-message.js +17 -9
  196. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  197. package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
  198. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  199. package/dist/modes/interactive/components/branch-summary-message.js +15 -3
  200. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  201. package/dist/modes/interactive/components/chat-message-renderer.d.ts +4 -0
  202. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  203. package/dist/modes/interactive/components/chat-message-renderer.js +23 -7
  204. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  205. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  206. package/dist/modes/interactive/components/custom-editor.js +7 -0
  207. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  208. package/dist/modes/interactive/components/custom-message.d.ts +5 -2
  209. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  210. package/dist/modes/interactive/components/custom-message.js +12 -2
  211. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  212. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  213. package/dist/modes/interactive/components/footer.js +7 -9
  214. package/dist/modes/interactive/components/footer.js.map +1 -1
  215. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  216. package/dist/modes/interactive/components/login-dialog.js +1 -2
  217. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  218. package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
  219. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
  220. package/dist/modes/interactive/components/markdown-transform.js +2 -1
  221. package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
  222. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  223. package/dist/modes/interactive/components/mermaid.js +2 -1
  224. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  225. package/dist/modes/interactive/components/model-selector.d.ts +9 -1
  226. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  227. package/dist/modes/interactive/components/model-selector.js +46 -16
  228. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  229. package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
  230. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  231. package/dist/modes/interactive/components/oauth-selector.js +13 -4
  232. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  233. package/dist/modes/interactive/components/scoped-models-selector.d.ts +4 -0
  234. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  235. package/dist/modes/interactive/components/scoped-models-selector.js +32 -11
  236. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  237. package/dist/modes/interactive/components/session-selector.d.ts +1 -0
  238. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  239. package/dist/modes/interactive/components/session-selector.js +3 -0
  240. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  241. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  242. package/dist/modes/interactive/components/settings-selector-items.js +6 -5
  243. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  244. package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/settings-selector-submenus.js +2 -0
  246. package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
  247. package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
  248. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  249. package/dist/modes/interactive/components/skill-invocation-message.js +15 -3
  250. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  251. package/dist/modes/interactive/components/task-row.d.ts +1 -0
  252. package/dist/modes/interactive/components/task-row.d.ts.map +1 -1
  253. package/dist/modes/interactive/components/task-row.js +3 -1
  254. package/dist/modes/interactive/components/task-row.js.map +1 -1
  255. package/dist/modes/interactive/components/tree-selector-component.d.ts +1 -0
  256. package/dist/modes/interactive/components/tree-selector-component.d.ts.map +1 -1
  257. package/dist/modes/interactive/components/tree-selector-component.js +3 -0
  258. package/dist/modes/interactive/components/tree-selector-component.js.map +1 -1
  259. package/dist/modes/interactive/components/tree-selector-content.d.ts.map +1 -1
  260. package/dist/modes/interactive/components/tree-selector-content.js +2 -1
  261. package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
  262. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
  263. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  264. package/dist/modes/interactive/components/user-message-selector.js +9 -1
  265. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  266. package/dist/modes/interactive/components/user-message.js +1 -1
  267. package/dist/modes/interactive/components/user-message.js.map +1 -1
  268. package/dist/modes/interactive/interactive-agent-events.js +3 -4
  269. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  270. package/dist/modes/interactive/interactive-autocomplete.js +6 -4
  271. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  272. package/dist/modes/interactive/interactive-editor-actions.js +2 -2
  273. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  274. package/dist/modes/interactive/interactive-extension-context.js +1 -1
  275. package/dist/modes/interactive/interactive-extension-context.js.map +1 -1
  276. package/dist/modes/interactive/interactive-input-handling.js +11 -1
  277. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  278. package/dist/modes/interactive/interactive-mode-base.d.ts +11 -2
  279. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  280. package/dist/modes/interactive/interactive-mode-base.js +11 -2
  281. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  282. package/dist/modes/interactive/interactive-mode-surface.d.ts +4 -1
  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-model-routing.d.ts.map +1 -1
  286. package/dist/modes/interactive/interactive-model-routing.js +18 -4
  287. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  288. package/dist/modes/interactive/interactive-prompt-turn.js +5 -1
  289. package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -1
  290. package/dist/modes/interactive/interactive-queueing.d.ts.map +1 -1
  291. package/dist/modes/interactive/interactive-queueing.js +17 -6
  292. package/dist/modes/interactive/interactive-queueing.js.map +1 -1
  293. package/dist/modes/interactive/interactive-render-chat.js +51 -5
  294. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  295. package/dist/modes/interactive/interactive-slash-commands.js +2 -2
  296. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  297. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  298. package/dist/modes/interactive/interactive-startup.js +9 -12
  299. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  300. package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
  301. package/dist/modes/interactive/interactive-tui.js +6 -5
  302. package/dist/modes/interactive/interactive-tui.js.map +1 -1
  303. package/dist/modes/interactive/theme/global-theme.d.ts +1 -0
  304. package/dist/modes/interactive/theme/global-theme.d.ts.map +1 -1
  305. package/dist/modes/interactive/theme/global-theme.js +3 -0
  306. package/dist/modes/interactive/theme/global-theme.js.map +1 -1
  307. package/dist/modes/interactive/theme/theme.d.ts +1 -1
  308. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  309. package/dist/modes/interactive/theme/theme.js +1 -1
  310. package/dist/modes/interactive/theme/theme.js.map +1 -1
  311. package/dist/modes/interactive/theme/tui-theme.d.ts +5 -0
  312. package/dist/modes/interactive/theme/tui-theme.d.ts.map +1 -1
  313. package/dist/modes/interactive/theme/tui-theme.js +21 -2
  314. package/dist/modes/interactive/theme/tui-theme.js.map +1 -1
  315. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +2 -5
  316. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
  317. package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
  318. package/dist/modes/interactive-engine/isolated-runtime.d.ts +2 -6
  319. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  320. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  321. package/dist/modes/print-mode.d.ts.map +1 -1
  322. package/dist/modes/print-mode.js +39 -14
  323. package/dist/modes/print-mode.js.map +1 -1
  324. package/dist/modes/rpc/rpc-client-api.d.ts +2 -5
  325. package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
  326. package/dist/modes/rpc/rpc-client-api.js.map +1 -1
  327. package/dist/modes/rpc/rpc-command-handler.d.ts +2 -1
  328. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  329. package/dist/modes/rpc/rpc-command-handler.js +11 -4
  330. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  331. package/dist/modes/rpc/rpc-input.d.ts +3 -2
  332. package/dist/modes/rpc/rpc-input.d.ts.map +1 -1
  333. package/dist/modes/rpc/rpc-input.js +5 -1
  334. package/dist/modes/rpc/rpc-input.js.map +1 -1
  335. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  336. package/dist/modes/rpc/rpc-mode.js +45 -16
  337. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  338. package/dist/modes/rpc/rpc-session-binding.d.ts +3 -1
  339. package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
  340. package/dist/modes/rpc/rpc-session-binding.js +5 -1
  341. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  342. package/dist/modes/rpc/rpc-types.d.ts +2 -5
  343. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  344. package/dist/modes/rpc/rpc-types.js.map +1 -1
  345. package/dist/package-manager-cli.d.ts.map +1 -1
  346. package/dist/package-manager-cli.js +26 -4
  347. package/dist/package-manager-cli.js.map +1 -1
  348. package/dist/utils/ansi.d.ts +0 -2
  349. package/dist/utils/ansi.d.ts.map +1 -1
  350. package/dist/utils/ansi.js +0 -5
  351. package/dist/utils/ansi.js.map +1 -1
  352. package/dist/utils/syntax-highlight.d.ts +5 -0
  353. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  354. package/dist/utils/syntax-highlight.js +7 -0
  355. package/dist/utils/syntax-highlight.js.map +1 -1
  356. package/docs/extensions/api-reference.md +21 -7
  357. package/docs/extensions/events.md +2 -0
  358. package/docs/extensions/examples.md +0 -1
  359. package/docs/extensions.md +7 -0
  360. package/docs/keybindings.md +1 -1
  361. package/docs/models/reference.md +8 -6
  362. package/docs/models-configuration.md +1 -0
  363. package/docs/models.md +2 -0
  364. package/docs/packages.md +2 -0
  365. package/docs/providers.md +14 -5
  366. package/docs/rpc/protocol.md +8 -2
  367. package/docs/rpc.md +4 -0
  368. package/docs/sdk.md +2 -0
  369. package/docs/storage.md +2 -0
  370. package/docs/tmux.md +6 -0
  371. package/docs/tui/reference.md +2 -0
  372. package/docs/windows.md +26 -0
  373. package/examples/extensions/README.md +2 -1
  374. package/examples/extensions/preset.ts +2 -0
  375. package/examples/extensions/tools.ts +2 -0
  376. package/npm-shrinkwrap.json +90 -72
  377. package/package.json +14 -15
  378. package/schemas/models.schema.json +4 -0
  379. package/examples/extensions/sandbox/index.ts +0 -323
  380. package/examples/extensions/sandbox/package-lock.json +0 -92
  381. package/examples/extensions/sandbox/package.json +0 -19
@@ -1 +1 @@
1
- {"version":3,"file":"syntax-highlight.js","sourceRoot":"","sources":["../../src/utils/syntax-highlight.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,OAAO,IAAI,MAAM,0BAA0B,CAAC;AAC5C,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,CAAC,MAAM,iCAAiC,CAAC;AAChD,OAAO,GAAG,MAAM,mCAAmC,CAAC;AACpD,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAC1D,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClD,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAC1D,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,UAAU,MAAM,0CAA0C,CAAC;AAClE,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAC1D,OAAO,GAAG,MAAM,mCAAmC,CAAC;AACpD,OAAO,GAAG,MAAM,mCAAmC,CAAC;AACpD,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,GAAG,MAAM,mCAAmC,CAAC;AACpD,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAC1D,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,KAAK,MAAM,qCAAqC,CAAC;AACxD,OAAO,KAAK,MAAM,qCAAqC,CAAC;AACxD,OAAO,UAAU,MAAM,0CAA0C,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,cAAc,GAAG;IACtB,MAAM;IACN,IAAI;IACJ,EAAE;IACF,UAAU;IACV,GAAG;IACH,UAAU;IACV,GAAG;IACH,IAAI;IACJ,CAAC;IACD,MAAM;IACN,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,MAAM;IACN,KAAK;IACL,IAAI;IACJ,MAAM;IACN,IAAI;IACJ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C,QAAQ;QAC5B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;YACrB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,cAAc,EAAE,OAAO,CAAC,cAAc;SACtC,CAAC,CAAC,KAAK;QACT,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC;IAC1D,OAAO,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;AAC7C,CAAC","sourcesContent":["/// <reference path=\"./highlight-js.d.ts\" />\nimport hljs from \"highlight.js/lib/core.js\";\nimport bash from \"highlight.js/lib/languages/bash.js\";\nimport c from \"highlight.js/lib/languages/c.js\";\nimport cpp from \"highlight.js/lib/languages/cpp.js\";\nimport csharp from \"highlight.js/lib/languages/csharp.js\";\nimport dart from \"highlight.js/lib/languages/dart.js\";\nimport go from \"highlight.js/lib/languages/go.js\";\nimport groovy from \"highlight.js/lib/languages/groovy.js\";\nimport java from \"highlight.js/lib/languages/java.js\";\nimport javascript from \"highlight.js/lib/languages/javascript.js\";\nimport kotlin from \"highlight.js/lib/languages/kotlin.js\";\nimport lua from \"highlight.js/lib/languages/lua.js\";\nimport nix from \"highlight.js/lib/languages/nix.js\";\nimport perl from \"highlight.js/lib/languages/perl.js\";\nimport php from \"highlight.js/lib/languages/php.js\";\nimport python from \"highlight.js/lib/languages/python.js\";\nimport ruby from \"highlight.js/lib/languages/ruby.js\";\nimport rust from \"highlight.js/lib/languages/rust.js\";\nimport scala from \"highlight.js/lib/languages/scala.js\";\nimport swift from \"highlight.js/lib/languages/swift.js\";\nimport typescript from \"highlight.js/lib/languages/typescript.js\";\nimport { decodeHtmlEntityAt } from \"./html.ts\";\n\nconst eagerLanguages = {\n\tpython,\n\tjava,\n\tgo,\n\tjavascript,\n\tcpp,\n\ttypescript,\n\tphp,\n\truby,\n\tc,\n\tcsharp,\n\tnix,\n\tbash,\n\trust,\n\tscala,\n\tkotlin,\n\tswift,\n\tdart,\n\tgroovy,\n\tperl,\n\tlua,\n};\n\nfor (const [name, language] of Object.entries(eagerLanguages)) {\n\thljs.registerLanguage(name, language);\n}\n\nlet allLanguagesPromise: Promise<void> | undefined;\n\nexport function loadAllHighlightLanguages(): Promise<void> {\n\tif (!allLanguagesPromise) {\n\t\tallLanguagesPromise = new Promise((resolve) => {\n\t\t\tsetImmediate(() => {\n\t\t\t\tvoid import(\"highlight.js/lib/index.js\").then(\n\t\t\t\t\t() => resolve(),\n\t\t\t\t\t() => {\n\t\t\t\t\t\t// Eager languages and plaintext fallback remain available.\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t}\n\treturn allLanguagesPromise;\n}\n\nexport type HighlightFormatter = (text: string) => string;\nexport type HighlightTheme = Partial<Record<string, HighlightFormatter>>;\n\nexport interface HighlightOptions {\n\tlanguage?: string;\n\tignoreIllegals?: boolean;\n\tlanguageSubset?: string[];\n\ttheme?: HighlightTheme;\n}\n\nconst SPAN_CLOSE = \"</span>\";\nconst HIGHLIGHT_CLASS_PREFIX = \"hljs-\";\n\nfunction getScopeFromSpanTag(tag: string): string | undefined {\n\tconst match = /\\sclass\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/.exec(tag);\n\tconst classValue = match?.[1] ?? match?.[2];\n\tif (!classValue) {\n\t\treturn undefined;\n\t}\n\n\tfor (const className of classValue.split(/\\s+/)) {\n\t\tif (className.startsWith(HIGHLIGHT_CLASS_PREFIX)) {\n\t\t\treturn className.slice(HIGHLIGHT_CLASS_PREFIX.length);\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getScopeFormatter(scope: string, theme: HighlightTheme): HighlightFormatter | undefined {\n\tconst exact = theme[scope];\n\tif (exact) {\n\t\treturn exact;\n\t}\n\n\tconst dotIndex = scope.indexOf(\".\");\n\tif (dotIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dotIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\tconst dashIndex = scope.indexOf(\"-\");\n\tif (dashIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dashIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getActiveFormatter(scopes: Array<string | undefined>, theme: HighlightTheme): HighlightFormatter | undefined {\n\tfor (let i = scopes.length - 1; i >= 0; i--) {\n\t\tconst scope = scopes[i];\n\t\tif (!scope) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst formatter = getScopeFormatter(scope, theme);\n\t\tif (formatter) {\n\t\t\treturn formatter;\n\t\t}\n\t}\n\treturn theme.default;\n}\n\nfunction isSpanOpenTagStart(html: string, index: number): boolean {\n\tif (!html.startsWith(\"<span\", index)) {\n\t\treturn false;\n\t}\n\tconst nextChar = html[index + \"<span\".length];\n\treturn nextChar === \">\" || nextChar === \" \" || nextChar === \"\\t\" || nextChar === \"\\n\" || nextChar === \"\\r\";\n}\n\nexport function renderHighlightedHtml(html: string, theme: HighlightTheme = {}): string {\n\tlet output = \"\";\n\tlet textBuffer = \"\";\n\tconst scopes: Array<string | undefined> = [];\n\n\tconst flushText = () => {\n\t\tif (!textBuffer) {\n\t\t\treturn;\n\t\t}\n\t\tconst formatter = getActiveFormatter(scopes, theme);\n\t\toutput += formatter\n\t\t\t? textBuffer\n\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t.map((line) => (line ? formatter(line) : line))\n\t\t\t\t\t.join(\"\\n\")\n\t\t\t: textBuffer;\n\t\ttextBuffer = \"\";\n\t};\n\n\tlet index = 0;\n\twhile (index < html.length) {\n\t\tif (isSpanOpenTagStart(html, index)) {\n\t\t\tconst tagEndIndex = html.indexOf(\">\", index + 5);\n\t\t\tif (tagEndIndex !== -1) {\n\t\t\t\tflushText();\n\t\t\t\tconst tag = html.slice(index, tagEndIndex + 1);\n\t\t\t\tconst scope = getScopeFromSpanTag(tag);\n\t\t\t\tscopes.push(scope);\n\t\t\t\tindex = tagEndIndex + 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif (html.startsWith(SPAN_CLOSE, index)) {\n\t\t\tflushText();\n\t\t\tif (scopes.length > 0) {\n\t\t\t\tscopes.pop();\n\t\t\t}\n\t\t\tindex += SPAN_CLOSE.length;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] === \"&\") {\n\t\t\tconst decoded = decodeHtmlEntityAt(html, index);\n\t\t\tif (decoded) {\n\t\t\t\ttextBuffer += decoded.text;\n\t\t\t\tindex += decoded.length;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\ttextBuffer += html[index];\n\t\tindex++;\n\t}\n\n\tflushText();\n\treturn output;\n}\n\nexport function highlight(code: string, options: HighlightOptions = {}): string {\n\tconst html = options.language\n\t\t? hljs.highlight(code, {\n\t\t\t\tlanguage: options.language,\n\t\t\t\tignoreIllegals: options.ignoreIllegals,\n\t\t\t}).value\n\t\t: hljs.highlightAuto(code, options.languageSubset).value;\n\treturn renderHighlightedHtml(html, options.theme);\n}\n\nexport function supportsLanguage(name: string): boolean {\n\treturn hljs.getLanguage(name) !== undefined;\n}\n"]}
1
+ {"version":3,"file":"syntax-highlight.js","sourceRoot":"","sources":["../../src/utils/syntax-highlight.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,OAAO,IAAI,MAAM,0BAA0B,CAAC;AAC5C,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,CAAC,MAAM,iCAAiC,CAAC;AAChD,OAAO,GAAG,MAAM,mCAAmC,CAAC;AACpD,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAC1D,OAAO,IAAI,MAA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AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACxC,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC;AACpC,CAAC","sourcesContent":["/// <reference path=\"./highlight-js.d.ts\" />\nimport hljs from \"highlight.js/lib/core.js\";\nimport bash from \"highlight.js/lib/languages/bash.js\";\nimport c from \"highlight.js/lib/languages/c.js\";\nimport cpp from \"highlight.js/lib/languages/cpp.js\";\nimport csharp from \"highlight.js/lib/languages/csharp.js\";\nimport dart from \"highlight.js/lib/languages/dart.js\";\nimport go from \"highlight.js/lib/languages/go.js\";\nimport groovy from \"highlight.js/lib/languages/groovy.js\";\nimport java from \"highlight.js/lib/languages/java.js\";\nimport javascript from \"highlight.js/lib/languages/javascript.js\";\nimport kotlin from \"highlight.js/lib/languages/kotlin.js\";\nimport lua from \"highlight.js/lib/languages/lua.js\";\nimport nix from \"highlight.js/lib/languages/nix.js\";\nimport perl from \"highlight.js/lib/languages/perl.js\";\nimport php from \"highlight.js/lib/languages/php.js\";\nimport python from \"highlight.js/lib/languages/python.js\";\nimport ruby from \"highlight.js/lib/languages/ruby.js\";\nimport rust from \"highlight.js/lib/languages/rust.js\";\nimport scala from \"highlight.js/lib/languages/scala.js\";\nimport swift from \"highlight.js/lib/languages/swift.js\";\nimport typescript from \"highlight.js/lib/languages/typescript.js\";\nimport { decodeHtmlEntityAt } from \"./html.ts\";\n\nconst eagerLanguages = {\n\tpython,\n\tjava,\n\tgo,\n\tjavascript,\n\tcpp,\n\ttypescript,\n\tphp,\n\truby,\n\tc,\n\tcsharp,\n\tnix,\n\tbash,\n\trust,\n\tscala,\n\tkotlin,\n\tswift,\n\tdart,\n\tgroovy,\n\tperl,\n\tlua,\n};\n\nfor (const [name, language] of Object.entries(eagerLanguages)) {\n\thljs.registerLanguage(name, language);\n}\n\nlet allLanguagesPromise: Promise<void> | undefined;\n\nexport function loadAllHighlightLanguages(): Promise<void> {\n\tif (!allLanguagesPromise) {\n\t\tallLanguagesPromise = new Promise((resolve) => {\n\t\t\tsetImmediate(() => {\n\t\t\t\tvoid import(\"highlight.js/lib/index.js\").then(\n\t\t\t\t\t() => resolve(),\n\t\t\t\t\t() => {\n\t\t\t\t\t\t// Eager languages and plaintext fallback remain available.\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t}\n\treturn allLanguagesPromise;\n}\n\nexport type HighlightFormatter = (text: string) => string;\nexport type HighlightTheme = Partial<Record<string, HighlightFormatter>>;\n\nexport interface HighlightOptions {\n\tlanguage?: string;\n\tignoreIllegals?: boolean;\n\tlanguageSubset?: string[];\n\ttheme?: HighlightTheme;\n}\n\nconst SPAN_CLOSE = \"</span>\";\nconst HIGHLIGHT_CLASS_PREFIX = \"hljs-\";\n\nfunction getScopeFromSpanTag(tag: string): string | undefined {\n\tconst match = /\\sclass\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/.exec(tag);\n\tconst classValue = match?.[1] ?? match?.[2];\n\tif (!classValue) {\n\t\treturn undefined;\n\t}\n\n\tfor (const className of classValue.split(/\\s+/)) {\n\t\tif (className.startsWith(HIGHLIGHT_CLASS_PREFIX)) {\n\t\t\treturn className.slice(HIGHLIGHT_CLASS_PREFIX.length);\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getScopeFormatter(scope: string, theme: HighlightTheme): HighlightFormatter | undefined {\n\tconst exact = theme[scope];\n\tif (exact) {\n\t\treturn exact;\n\t}\n\n\tconst dotIndex = scope.indexOf(\".\");\n\tif (dotIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dotIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\tconst dashIndex = scope.indexOf(\"-\");\n\tif (dashIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dashIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getActiveFormatter(scopes: Array<string | undefined>, theme: HighlightTheme): HighlightFormatter | undefined {\n\tfor (let i = scopes.length - 1; i >= 0; i--) {\n\t\tconst scope = scopes[i];\n\t\tif (!scope) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst formatter = getScopeFormatter(scope, theme);\n\t\tif (formatter) {\n\t\t\treturn formatter;\n\t\t}\n\t}\n\treturn theme.default;\n}\n\nfunction isSpanOpenTagStart(html: string, index: number): boolean {\n\tif (!html.startsWith(\"<span\", index)) {\n\t\treturn false;\n\t}\n\tconst nextChar = html[index + \"<span\".length];\n\treturn nextChar === \">\" || nextChar === \" \" || nextChar === \"\\t\" || nextChar === \"\\n\" || nextChar === \"\\r\";\n}\n\nexport function renderHighlightedHtml(html: string, theme: HighlightTheme = {}): string {\n\tlet output = \"\";\n\tlet textBuffer = \"\";\n\tconst scopes: Array<string | undefined> = [];\n\n\tconst flushText = () => {\n\t\tif (!textBuffer) {\n\t\t\treturn;\n\t\t}\n\t\tconst formatter = getActiveFormatter(scopes, theme);\n\t\toutput += formatter\n\t\t\t? textBuffer\n\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t.map((line) => (line ? formatter(line) : line))\n\t\t\t\t\t.join(\"\\n\")\n\t\t\t: textBuffer;\n\t\ttextBuffer = \"\";\n\t};\n\n\tlet index = 0;\n\twhile (index < html.length) {\n\t\tif (isSpanOpenTagStart(html, index)) {\n\t\t\tconst tagEndIndex = html.indexOf(\">\", index + 5);\n\t\t\tif (tagEndIndex !== -1) {\n\t\t\t\tflushText();\n\t\t\t\tconst tag = html.slice(index, tagEndIndex + 1);\n\t\t\t\tconst scope = getScopeFromSpanTag(tag);\n\t\t\t\tscopes.push(scope);\n\t\t\t\tindex = tagEndIndex + 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif (html.startsWith(SPAN_CLOSE, index)) {\n\t\t\tflushText();\n\t\t\tif (scopes.length > 0) {\n\t\t\t\tscopes.pop();\n\t\t\t}\n\t\t\tindex += SPAN_CLOSE.length;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] === \"&\") {\n\t\t\tconst decoded = decodeHtmlEntityAt(html, index);\n\t\t\tif (decoded) {\n\t\t\t\ttextBuffer += decoded.text;\n\t\t\t\tindex += decoded.length;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\ttextBuffer += html[index];\n\t\tindex++;\n\t}\n\n\tflushText();\n\treturn output;\n}\n\nexport function highlight(code: string, options: HighlightOptions = {}): string {\n\tconst html = options.language\n\t\t? hljs.highlight(code, {\n\t\t\t\tlanguage: options.language,\n\t\t\t\tignoreIllegals: options.ignoreIllegals,\n\t\t\t}).value\n\t\t: hljs.highlightAuto(code, options.languageSubset).value;\n\treturn renderHighlightedHtml(html, options.theme);\n}\n\nexport function supportsLanguage(name: string): boolean {\n\treturn hljs.getLanguage(name) !== undefined;\n}\n\n/**\n * Number of registered grammars. It grows when the deferred grammars load, which can change the highlighting of\n * code that embeds another language, such as HTML in a JavaScript template literal.\n */\nexport function getHighlightLanguageCount(): number {\n\treturn hljs.listLanguages().length;\n}\n"]}
@@ -180,7 +180,7 @@ pi.registerCommand("project-status", {
180
180
  Request a graceful shutdown of Atomic.
181
181
 
182
182
  - **Interactive mode:** Deferred until the agent becomes idle (after processing all queued steering and follow-up messages).
183
- - **RPC mode:** Deferred until the next idle state (after completing the current command response, when waiting for the next command).
183
+ - **RPC mode:** Runs when the session is idle and all command responses have been written. An idle request does not need another client command to trigger it. Requests during startup wait for input setup; requests during a turn wait for it to settle. If an extension starts compaction outside a turn, shutdown waits for the next command or turn after compaction finishes.
184
184
  - **Print mode:** No-op. The process exits automatically when all prompts are processed.
185
185
 
186
186
  Emits `session_shutdown` event to all extensions before exiting. Available in all contexts (event handlers, tools, commands, shortcuts).
@@ -795,15 +795,24 @@ Register a custom TUI renderer for messages with your `customType`. The renderer
795
795
 
796
796
  ### pi.registerMarkdownTransformer(transformer)
797
797
 
798
- Register a synchronous, display-only transformer for Markdown in normal user text, assistant text, and thinking blocks. Atomic runs transformers in extension load order. Each extension retains one transformer, so a later call from that extension replaces its prior transformer. Each transformer receives the Markdown returned by the prior transformer, then Atomic renders the final value with its built-in Markdown renderer.
798
+ Register a synchronous, display-only transformer for Markdown before Atomic renders it in interactive mode. Atomic runs transformers in extension load order. Each extension retains one transformer, so a later call from that extension replaces its prior transformer. Each transformer receives the Markdown returned by the prior transformer, then Atomic renders the final value with its built-in Markdown renderer.
799
+
800
+ The optional second argument, `pi.registerMarkdownTransformer(transformer, options)`, takes `options.messageTypes`. By default a transformer runs on normal user text, assistant text, and thinking blocks; `messageTypes` lists the surfaces it runs on instead:
801
+
802
+ | `messageType` | Surface |
803
+ | --- | --- |
804
+ | `"user"`, `"assistant"`, `"assistant-thinking"` | Transcript messages (default) |
805
+ | `"custom"` | Custom messages from `pi.sendMessage()` without a registered message renderer, and expanded skill blocks (their content, without Atomic's header) |
806
+ | `"summary"` | Expanded branch summaries (the summary, without Atomic's header) |
807
+ | `"changelog"` | Atomic's changelog: "What's New" at startup and `/changelog` |
799
808
 
800
809
  The transformer receives the Markdown string and a context with:
801
810
 
802
- - `messageType` — `"user"`, `"assistant"`, or `"assistant-thinking"`
803
- - `isStreaming` — `true` for partial assistant updates; `false` for user, finalized assistant, and restored messages
811
+ - `messageType` — one of the surfaces above
812
+ - `isStreaming` — `true` for partial assistant updates; `false` otherwise
804
813
  - `availableWidth` — exact terminal columns available for the transformed Markdown content
805
- - `messageId` — the session entry id when the message is rendered from the saved session (resume, `/tree`, rebuilds); `undefined` for live messages
806
- - `timestamp` — the session entry's ISO timestamp under the same conditions; `undefined` for live messages
814
+ - `messageId` — the session entry id when the message is rendered from the saved session (resume, `/tree`, rebuilds); `undefined` for live messages and the changelog
815
+ - `timestamp` — the session entry's ISO timestamp under the same conditions; `undefined` for live messages and the changelog
807
816
 
808
817
  Return the transformed Markdown:
809
818
 
@@ -812,9 +821,14 @@ pi.registerMarkdownTransformer((markdown, { messageType, isStreaming }) => {
812
821
  if (isStreaming || messageType === "assistant-thinking") return markdown;
813
822
  return markdown.replaceAll("-->", "→");
814
823
  });
824
+
825
+ // Show :warning: shortcodes in the changelog as a symbol.
826
+ pi.registerMarkdownTransformer((markdown) => markdown.replaceAll(":warning:", "⚠"), {
827
+ messageTypes: ["changelog"],
828
+ });
815
829
  ```
816
830
 
817
- If a transformer throws, Atomic keeps the Markdown produced so far and continues with the next transformer. The hook never changes the original message, session transcript, or model context. It runs for new user messages, assistant streaming updates, restored session messages, and terminal-width changes, so keep transformers synchronous and inexpensive. Isolated-engine rendering does not run host-side display transformers.
831
+ If a transformer throws, Atomic keeps the Markdown produced so far and continues with the next transformer. The hook never changes the original message, session transcript, or model context. It runs for new messages, assistant streaming updates, restored session messages, and terminal-width changes, so keep transformers synchronous and inexpensive. Isolated-engine rendering does not run host-side display transformers.
818
832
 
819
833
  ### pi.registerShortcut(shortcut, options)
820
834
 
@@ -555,6 +555,8 @@ Like `before_provider_headers`, it fires again when Atomic retries a request aft
555
555
 
556
556
  This hook can rewrite provider-level system instructions or remove them entirely. Those payload-level changes are not reflected by `ctx.getSystemPrompt()`, which reports Atomic's system prompt string rather than the final serialized provider payload.
557
557
 
558
+ The payload is the full request. Providers that continue from a previous response (OpenAI Codex over WebSocket, Anthropic message threads) may send only the part that is new since the previous request.
559
+
558
560
  ```typescript
559
561
  pi.on("before_provider_request", (event, ctx) => {
560
562
  console.log(JSON.stringify(event.payload, null, 2));
@@ -68,7 +68,6 @@ All examples in [examples/extensions/](https://github.com/bastani-inc/atomic/tre
68
68
  | **Remote & Sandbox** |||
69
69
  | `ssh.ts` | SSH remote execution | `registerFlag`, `on("user_bash")`, `on("before_agent_start")`, tool operations |
70
70
  | `interactive-shell.ts` | Persistent shell session | `on("user_bash")` |
71
- | `sandbox/` | Sandboxed tool execution | Tool operations |
72
71
  | `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM | Tool operations, built-in tool overrides, `on("user_bash")` |
73
72
  | `subagent/` | Spawn sub-agents | `registerTool`, `exec` |
74
73
  | **Games** |||
@@ -252,6 +252,13 @@ Imports from `node_modules/` are resolved automatically.
252
252
 
253
253
  For distributed Atomic packages installed with `atomic install` (npm or git), runtime deps must be in `dependencies`. Package installation uses production dependency installs by default, so `devDependencies` are not available at runtime; when `npmCommand` is configured, git packages use plain `install` for compatibility with wrappers.
254
254
 
255
+ ### Tool parameter schemas
256
+
257
+ A tool's `parameters` can be a TypeBox schema or any plain JSON Schema object. Atomic validates the model's arguments against it, after coercing loosely typed values (for example a numeric string to a number, `"true"` to `true`, `null` in an optional property dropped):
258
+
259
+ - **TypeBox schemas** are converted and checked by TypeBox, so TypeBox features outside JSON Schema, such as `Type.Refine()` and formats registered with `Format.Set()`, apply. Validation errors use TypeBox's messages.
260
+ - **Plain JSON Schema** (for example an MCP server's tool schema, or a schema from `@earendil-works/pi-schema`'s builders) is coerced and checked by `@earendil-works/pi-schema`. A single value is also wrapped into a one-item array, the `url` and `json-pointer-uri-fragment` formats are checked, and a `$ref` that names nothing rejects only the argument at its place instead of every call. Validation errors use pi-schema's messages, such as `- path: missing` or `- limit: expected number, got string`.
261
+
255
262
  Node.js built-ins (`node:fs`, `node:path`, etc.) are also available.
256
263
 
257
264
  ## Writing an Extension
@@ -113,7 +113,7 @@ Hold Alt while using the mouse wheel to scroll five times as far in fullscreen m
113
113
 
114
114
  Drag with the primary button to select characters, double-click for a word or path, and triple-click for a line. Changing focus or clicking elsewhere clears the selection.
115
115
 
116
- While the main editor has focus, fullscreen transcript bindings take precedence. `home` and `end` stay with the editor; `ctrl+home` and `ctrl+end` jump to the transcript top and bottom. `pageUp` and `pageDown` control the transcript, while their `ctrl` variants control the editor.
116
+ While the main editor has focus, fullscreen transcript bindings take precedence. `home` and `end` stay with the editor; `ctrl+home` and `ctrl+end` jump to the transcript top and bottom. `pageUp` and `pageDown` control the transcript, while their `ctrl` variants control the editor. While an overlay or a scrollable list such as autocomplete, `/settings`, or the model selector has focus, the scrolling actions go to it instead of the transcript, so `tui.select.pageUp` and `tui.select.pageDown` move the list selection.
117
117
 
118
118
  | Key | Editor action | Fullscreen action |
119
119
  |-----|---------------|------------------|
@@ -103,10 +103,11 @@ In `models.json`, `headers` values must be strings. A `null` suppression marker
103
103
  | `compat.supportsMidConvoSystemMessages` | No | model default | Accept system/developer messages after the conversation starts |
104
104
  | `compat.supportsMidConvoToolAdditions` | No | model default | OpenAI Completions: enable Kimi-style tool additions; requires mid-conversation system messages |
105
105
  | `compat.supportsMidConvoToolChanges` | No | model default | Anthropic: enable native tool additions/removals; requires mid-conversation system messages |
106
+ | `compat.supportsMessageThreads` | No | `true` for `anthropic` on `api.anthropic.com`, else `false` | Anthropic: use message threads (beta), so each request with a session sends only the new messages; set `true` for gateways that forward the `thread` field |
106
107
 
107
108
  Current behavior:
108
- - `/model`, `--list-models`, and the interactive footer display entries by model `id`.
109
- - The configured `name` is used for model matching and secondary model detail text. It does not replace the footer/status-bar model id.
109
+ - `/model`, `--list-models`, the interactive footer, status messages, fallback notices, and subagent and workflow labels show a model by its raw `provider/id` (or `id` where the provider is already clear), followed by the reasoning level it runs at, e.g. `anthropic/claude-sonnet-4-5 high`. That is the string `--model provider/id:level` takes.
110
+ - The configured `name` is used for model matching and secondary model detail text, such as the dim column in `/model`. It never replaces the model id.
110
111
  - `input` lists the modalities **Atomic can send**. Possible values are `["text"]`, `["text", "image"]`, and `["text", "image", "pdf"]`.
111
112
 
112
113
  PDF support is a platform capability, not a per-model one. Anthropic documents that ["All active models support PDF processing"](https://platform.claude.com/docs/en/build-with-claude/pdf-support), through the same vision path as images, so upstream metadata includes it on every Claude entry.
@@ -135,7 +136,7 @@ Notes for every row:
135
136
  - Codex's `minimal` UI alias is not a separate API effort, and Codex's client-side `ultra` orchestration preset is not an API reasoning level; neither appears as its own effort in Atomic's selector.
136
137
  - Mid-conversation effort changes are explained in [Changing GPT-6 thinking levels](#changing-gpt-6-thinking-levels).
137
138
  - On Amazon Bedrock, Atomic sends each ID unchanged and sends the selected effort as Bedrock's OpenAI `reasoning_effort` field.
138
- - On GitHub Copilot, requests use Copilot's Responses endpoint, and account policy controls availability. Copilot Fast choices require exact account advertisement, and Codex's Ultrafast tier does not apply. The table lists no Copilot rates.
139
+ - On GitHub Copilot, requests use Copilot's Responses endpoint, and account policy controls availability. Copilot fast models are the exact IDs the account's model list advertises, not derived variants, and Codex's Ultrafast tier does not apply. The table lists no Copilot rates.
139
140
  - Atomic does not synthesize Azure OpenAI Astra entries. Other catalogs are imported as published: OpenRouter publishes `openai/gpt-6-astra` and `openai/gpt-6-astra-pro`, and the Vercel AI Gateway publishes `openai/gpt-6-astra` and `openai/gpt-6-astra-fast`, with their request-wide long-context prices. Vercel owns its suffixed ID, so it remains route-less and does not gain Atomic's first-party fast-route behavior.
140
141
  - On OpenAI Responses, these models use the newer prompt-cache payload. `cacheRetention: "long"` sends `prompt_cache_options.ttl: "30m"` instead of the legacy `prompt_cache_retention: "24h"`; `none` sends explicit mode without a cache key, and `short` sends neither cache option. Earlier Responses models keep the 24-hour field for long retention.
141
142
 
@@ -322,8 +323,9 @@ compaction thresholds, footer/stats, session replay, and RPC/SDK state.
322
323
  }
323
324
  ```
324
325
 
325
- Built-in models take their `contextWindow` from the bundled `pi-ai` catalog. To
326
- change one, use `modelOverrides`:
326
+ Built-in models take their `contextWindow` from the bundled `pi-ai` catalog, and
327
+ GitHub Copilot models discovered from your account's model list take it from that
328
+ list. To change one, use `modelOverrides`:
327
329
 
328
330
  ```json
329
331
  {
@@ -433,7 +435,7 @@ Behavior notes:
433
435
 
434
436
  ## Derived Fast Model Variants
435
437
 
436
- For providers that support fast inference, Atomic adds a second selectable model whose ID is the base model ID plus `-fast` (for example `openai-codex/gpt-5.6-sol-fast`). Derivation runs **after** built-in composition, `models.json` custom models, extension model lists, and `modelOverrides` on those models, so it sees the final catalog. A `modelOverrides` entry keyed on a derived `-fast` ID is then applied to the derived entry itself. See [Providers](/providers#fast-models) for eligibility and what each provider sends upstream.
438
+ When a provider enables fast mode through an API parameter (OpenAI and xAI `service_tier`, Anthropic `speed`), Atomic derives a `<id>-fast` variant that sets that parameter (for example `anthropic/claude-opus-5-fast`). When a provider publishes fast mode as its own model ID (GitHub Copilot), Atomic uses that ID exactly as the provider publishes it, with no derivation; the rest of this section covers derived variants only. Derivation runs **after** built-in composition, `models.json` custom models, extension model lists, and `modelOverrides` on those models, so it sees the final catalog. A `modelOverrides` entry keyed on a derived `-fast` ID is then applied to the derived entry itself. See [Providers](/providers#fast-models) for eligibility and what each provider sends upstream.
437
439
 
438
440
  These rules apply when you write `models.json`:
439
441
 
@@ -180,6 +180,7 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
180
180
  | `supportsMidConvoEffort` | boolean | `false` | Whether the exact model transport supports effort-only system messages and thinking binding controls. |
181
181
  | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt. |
182
182
  | `supportsMidConvoToolChanges` | boolean | `false` | Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages. |
183
+ | `supportsMessageThreads` | boolean | | Whether the endpoint supports Anthropic message threads, which let a request with a session id send only the new messages and continue from the previous reply. Default: true for provider anthropic with a baseUrl whose host is api.anthropic.com, false otherwise. Set true for gateways that forward the thread request field. |
183
184
  | `allowedFallbackModels` | `object[]` | | Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets. |
184
185
  | `enforcesPreservedThinkingBinding` | boolean | `false` | Whether the model runs the Anthropic preserved-thinking conversation check, which rejects a request whose system prompt, tools, or earlier messages changed since a replayed thinking block was produced. When true, the provider sends the thinking-binding-controls-2026-08-01 beta header and thinking.block_binding.prefix_mismatch_behavior: "drop_block", so a changed prefix drops the affected thinking blocks instead of failing the request. |
185
186
  | `delegatesThinkingModelBinding` | boolean | `false` | Whether the API adjudicates thinking-block model binding itself, always dropping a block the target model cannot read. When true, an assistant turn produced by a different model on the same provider and API replays its signed thinking and redacted_thinking blocks unchanged instead of being rewritten into plain text. |
package/docs/models.md CHANGED
@@ -27,6 +27,8 @@ For choosing which model to use rather than how to declare one, see [Model selec
27
27
 
28
28
  Classifier models answer typed questions about JSON state instead of chatting. They do not appear in `/model`. Enable [codemode](/tools#codemode), list them with `models.getAvailableOfType("classifier")`, and call `models.classify(model, { state, questions })`. See [Codemode](/codemode#classify) for question and answer shapes.
29
29
 
30
+ GitHub Copilot offers the text-only `github-copilot/microsoft-decision-1` classifier through its System One endpoint. It uses GitHub Copilot OAuth or `COPILOT_GITHUB_TOKEN`, with a 32,768-token context window.
31
+
30
32
  OpenAI's GPT-6 Luna Decisions classifier is `openai-decisions/gpt-6-luna`. It uses the [Decisions API](https://developers.openai.com/api/docs/guides/decisions), which needs an OpenAI API key. It has no `/login` entry of its own and reuses the first key it finds, in this order: a key saved for `openai-api`, a key saved for `openai`, then `OPENAI_API_KEY`. ChatGPT sign-in on `openai` does not work with it and is skipped, so with only a ChatGPT sign-in the classifier stays unavailable until you save an API key with `/login openai-api` or set `OPENAI_API_KEY`. `openai/gpt-6-luna` always means the chat model.
31
33
 
32
34
  GPT-6 Luna accepts up to 128 image blocks through `images`, alongside the JSON state. Other classifiers reject images unless their catalog input and API support them. Refused answers produce an error result. The endpoint rejects inputs above 922K tokens; very large inputs, currently above roughly 600K tokens, can hit its gateway time limit. These 504 responses are not retried, so reduce the input before trying again.
package/docs/packages.md CHANGED
@@ -59,6 +59,8 @@ atomic update npm:@foo/bar # update one package
59
59
  atomic update --extension npm:@foo/bar
60
60
  ```
61
61
 
62
+ Package updates list each package that changed, with its npm version or git commit, for example `npm:@foo/bar 1.2.0 -> 1.3.0`. When nothing changed they print `Packages are already up to date`; when a warning was printed instead, for example because npm reinstalled an older version from stale registry metadata, they say that no packages were updated. In offline mode they print that package updates were skipped.
63
+
62
64
  These commands manage Atomic packages and `atomic update` can update the Atomic CLI installation. To uninstall Atomic itself, see [Quickstart](/getting-started/installation#uninstall).
63
65
 
64
66
  Self-update installs an exact advertised package/version, so it cannot drift to a newer registry release during installation. Atomic shows any release note supplied by the update service before installing.
package/docs/providers.md CHANGED
@@ -113,14 +113,15 @@ Auto routing excludes Ultrafast unless `modelConstraints.allowedModels` explicit
113
113
 
114
114
  ### Fast models
115
115
 
116
- Fast inference is a model choice, not a mode. Where a provider supports it, Atomic adds a second selectable model whose canonical ID is the base model ID plus `-fast` — for example `openai-codex/gpt-5.6-sol-fast`. It appears in `/model`, in `atomic --list-models`, and in workflow model catalogs alongside its normal sibling, and it is persisted and restored by that exact ID. Select it anywhere you name a model, including with a thinking suffix: `openai-codex/gpt-5.6-sol-fast:medium`.
116
+ Fast inference is a model choice, not a mode. When a provider enables fast mode through an API parameter (OpenAI and xAI `service_tier`, Anthropic `speed`), Atomic derives a second selectable model whose canonical ID is the base model ID plus `-fast` and that sets the parameter — for example `anthropic/claude-opus-5-fast`. When a provider publishes fast mode as its own model ID (GitHub Copilot), Atomic uses that ID exactly as the provider publishes it, with no derivation. Either way the fast model appears in `/model`, in `atomic --list-models`, and in workflow model catalogs alongside its normal sibling, and it is persisted and restored by that exact ID. Select it anywhere you name a model, including with a thinking suffix: `anthropic/claude-opus-5-fast:high`.
117
117
 
118
- Four provider paths produce these variants:
118
+ Three provider paths derive these variants:
119
119
 
120
120
  - First-party OpenAI `openai/*` and OpenAI Codex `openai-codex/*` models that advertise Fast (see [Fast and Ultrafast tiers](#fast-and-ultrafast-tiers)) send the **base** upstream model ID plus the fixed `service_tier: priority`. A renamed provider, proxy, Azure OpenAI, OpenRouter, or generic OpenAI-compatible provider does not receive a synthetic fast variant.
121
121
  - First-party xAI `xai/*` models get a fast variant for every Grok model, such as `xai/grok-4.7-fast`. It sends the **base** upstream model ID with xAI's [Priority Processing](https://docs.x.ai/developers/advanced-api-usage/priority-processing) `service_tier: priority`. xAI has no separate `-fast` model IDs for current Grok models. OpenRouter, Vercel AI Gateway, and renamed or proxied xAI-compatible providers do not receive a synthetic fast variant.
122
122
  - First-party Anthropic `anthropic/*` exposes [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for Claude Opus 5.5, Claude Opus 5, and Claude Opus 4.8: `anthropic/claude-opus-5-5-fast`, `anthropic/claude-opus-5-fast`, and `anthropic/claude-opus-4-8-fast`. Each sends the **base** upstream model ID with `speed: "fast"` and the `fast-mode-2026-02-01` beta header. It works with API keys and Claude subscription logins. Amazon Bedrock, Google Vertex, GitHub Copilot, OpenRouter, and renamed or proxied Anthropic-compatible providers do not receive a synthetic fast variant.
123
- - GitHub Copilot exposes only the real fast sibling IDs the OAuth model catalog advertises for the signed-in account, and only when the corresponding base model exists in Atomic's Copilot catalog. It sends those suffixed IDs verbatim with no OpenAI service-tier field. Copilot fast models require the account catalog metadata obtained through `/login`; a raw `COPILOT_GITHUB_TOKEN` does not provide that metadata.
123
+
124
+ GitHub Copilot publishes fast models as their own IDs in the account's model list. Atomic offers each one under exactly the advertised ID, sends that ID upstream unchanged with no service-tier field, and derives no Copilot `-fast` ID of its own. See [GitHub Copilot](#github-copilot).
124
125
 
125
126
  The selection Atomic records stays the canonical `-fast` identity even when the outbound request carries the base upstream model ID, so sessions, usage rows, fallback attempts, workflow metadata, and subagent labels all keep normal and fast apart. There is no separate `fast` badge anywhere in the UI: the model ID already says it.
126
127
 
@@ -162,12 +163,20 @@ Keys, `ANTHROPIC_AUTH_TOKEN`, and custom authorization headers take precedence.
162
163
 
163
164
  - Press Enter for github.com, or enter your GitHub Enterprise Server domain
164
165
  - A personal access token works either way: save it with `/login github-copilot` → **Use an API key**, or set `COPILOT_GITHUB_TOKEN`. A saved key takes precedence over the environment variable
165
- - Models come from the bundled `pi-ai` GitHub Copilot catalog; an OAuth credential narrows the list to the ids your account can actually use
166
+ - Models come from the bundled `pi-ai` GitHub Copilot catalog plus the models your account's `/models` list offers that the bundled catalog lacks; an OAuth credential narrows the list to the ids your account can actually use
166
167
  - If you get "model not supported", enable it in VS Code: Copilot Chat → model selector → select model → "Enable"
167
168
 
168
169
  Copilot includes `github-copilot/gpt-6.1-sol` and `github-copilot/gpt-6-astra`, for example `atomic --model github-copilot/gpt-6.1-sol:high`. Their context windows and reasoning levels are in [OpenAI built-in models](/models/reference#openai-built-in-models). The OAuth account catalog still controls availability, so a listed model does not guarantee that Copilot has enabled it for your account.
169
170
 
170
- `github-copilot/gpt-6-astra-fast` appears only when the OAuth account catalog advertises that exact fast ID. It sends `gpt-6-astra-fast` unchanged with no `service_tier`, unlike first-party OpenAI's priority route. A raw `COPILOT_GITHUB_TOKEN` cannot supply that fast entitlement.
171
+ Atomic reads the account's model list on every network catalog refresh (at interactive startup, from `/model`, and with `atomic update --models`), for OAuth logins and API keys alike, and caches it in `models-store.json`, so later starts, including `atomic -p` and offline runs, need no network. When a refresh cannot read the list, for example because the host refuses the token, the models cached before stay. A model found this way:
172
+
173
+ - keeps the exact ID the account advertises, which is sent upstream unchanged, and is named by the display name the account's list gives it (the ID when the list gives none); `/model` shows that name in the selected model's `Model Name` line, and in a dim column beside the ID when it adds words the ID lacks
174
+ - is marked `discovered: true` in the catalog; its limits, image input, reasoning efforts and adaptive thinking come from the account's list, and `modelOverrides` adjusts them like any other model
175
+ - does not request 24-hour prompt-cache retention, because some Copilot models reject it and the list does not say which; set `compat.supportsLongCacheRetention` in `modelOverrides` for one that accepts it
176
+ - never replaces a bundled entry with the same ID, which keeps its curated metadata
177
+ - is skipped when the account disables its policy, hides it from the model picker, or does not list tool-call support
178
+
179
+ A Copilot fast model appears only when the account's list advertises its exact ID, and like any discovered model it takes its limits and capabilities from its own entry. It is an ordinary model unless the list names its base model in the entry's `family` field, in which case it pairs with that base as its fast variant. Each refresh also updates the model lists saved with your OAuth login, which decide what the login is offered, so a model the refresh finds is offered at once, and models found with another login are not offered to yours. An API key has no such lists, so after you switch keys the previous key's models stay until the next refresh. If the configured default model, or the fast model of a resumed session, is a Copilot model that is not cached yet, Atomic stops with a message instead of switching models; run `atomic update --models` once with network access.
171
180
 
172
181
  #### Endpoint routing for personal access tokens
173
182
 
@@ -141,12 +141,18 @@ Response:
141
141
  "command": "clear_queue",
142
142
  "success": true,
143
143
  "data": {
144
- "steering": ["Change direction"],
145
- "followUp": ["Summarize when finished"]
144
+ "steering": ["Change direction (rewritten)"],
145
+ "followUp": ["Summarize when finished"],
146
+ "typed": {
147
+ "steering": ["Change direction"],
148
+ "followUp": ["Summarize when finished"]
149
+ }
146
150
  }
147
151
  }
148
152
  ```
149
153
 
154
+ `steering` and `followUp` list each message as queued, after `input` hooks, skills and prompt templates changed it. `typed` lists the same messages, in the same order, as they were submitted. A client that gives the messages back to the user to send again should restore `typed`, so those steps run once more and not twice. `typed` is left out when every message was queued as submitted, and by sessions from before it was added; restore `steering` and `followUp` then.
155
+
150
156
  To implement interactive Esc behavior, send `clear_queue` before `abort`, then restore the returned text in the client editor. `abort` continues queued messages when they remain in the session.
151
157
 
152
158
  #### new_session
package/docs/rpc.md CHANGED
@@ -9,6 +9,10 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over
9
9
 
10
10
  **Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@bastani/atomic` instead of spawning a subprocess. See [`src/core/agent-session.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/rpc/rpc-client.ts).
11
11
 
12
+ An extension can call `ctx.shutdown()` to close an idle RPC session without another client command. Shutdown waits for any active command response and running turn. A request during extension-started compaction outside a turn is processed after the next command or turn once compaction finishes.
13
+
14
+ Closing stdin, `SIGTERM` and `SIGHUP` each start an orderly shutdown that disposes the active runtime before the process exits. Once a shutdown has started, a stdin close or a single signal does not interrupt it, so a client that closes stdin and sends `SIGTERM` together, as a process manager does, lets cleanup finish. A second signal exits at once, with code 143 for `SIGTERM` and 129 for `SIGHUP`. `SIGKILL` always ends the process immediately.
15
+
12
16
  ## Where to go next
13
17
 
14
18
  This page starts RPC mode and walks one client end to end. The rest is split by job:
package/docs/sdk.md CHANGED
@@ -737,6 +737,8 @@ await session.followUp("After you're done, also do this");
737
737
 
738
738
  If the session is idle and already has messages when either is called, it starts a turn to deliver the message instead of leaving it queued. On a session with no messages yet, or after a run was stopped with `abort()`, the message stays queued until the next `prompt()`. A `prompt()` call made while that turn runs must pass `streamingBehavior`, or it fails with "Agent is already processing". Both `steer()` and `followUp()` expand file-based prompt templates but error on extension commands (extension commands cannot be queued). They return `"queued"` if the input was queued (including after an extension transformed it), or `"handled"` if an extension consumed it.
739
739
 
740
+ `clearQueue()` removes the queued steering and follow-up messages and returns them. `steering` and `followUp` hold each message as queued, after `input` hooks, skills and prompt templates changed it. `typed` holds the same messages, in the same order, as they were submitted: give the user those to send again, so the hooks and expansions run once more and not twice. `typed` is left out when every message was queued as submitted.
741
+
740
742
  `pauseQueuedMessages()` synchronously holds existing raw steering/follow-up entries before an abort boundary. Later context-bearing arrivals also stay queued without starting a provider turn. These include trigger-turn custom messages, batches, interrupts, `sendUserMessage()`, and ordinary `prompt()` calls.
741
743
 
742
744
  The hold preserves content blocks, optional data, duplicate identities, raw text, message types, and order within each queue kind. Non-trigger custom messages remain history-only and do not start a turn.
package/docs/storage.md CHANGED
@@ -115,6 +115,8 @@ Atomic does not bundle remote database drivers. Install your chosen SQLite-compa
115
115
 
116
116
  Driver calls may return values or promises. The returned facade follows the rules described above: it queues operations in call order and keeps them outside active transactions, snapshots binary parameters when a call is made, rejects NUL text with `StorageInvalidTextError` before SQL runs, returns safe-range integers as numbers and blobs as `Uint8Array` copies, expires transaction handles when their callback settles, and closes the driver once after draining accepted work. A failed driver call rejects with `StorageUnavailableError`, whose `cause` is the driver error with credentials redacted. A failed rollback rejects with `StorageRollbackError`, and callback failures are preserved. Do not fall back to memory after an opening failure.
117
117
 
118
+ For a local file that several processes share, switch it to the write-ahead log with `switchToWriteAheadLog(exec, busyTimeoutMs)` from `@bastani/atomic/storage`, passing a call that runs SQL on the database, such as `(sql) => database.exec(sql)`, and the connection's busy timeout. SQLite does not wait for another connection's lock while it changes a file's journal mode, so a plain `PRAGMA journal_mode = WAL` fails at once with `SQLITE_BUSY` while another process writes the file or switches it at the same moment. The helper retries the switch until `busyTimeoutMs` has passed, as other statements wait, and throws any other failure at once.
119
+
118
120
  You can also implement `SqliteDatabase` yourself by following the same rules. Either way, run the [conformance suite](#adapter-conformance) against it.
119
121
 
120
122
  ### libSQL / Turso example
package/docs/tmux.md CHANGED
@@ -68,3 +68,9 @@ This affects the default keybindings (`Enter` to submit, `SHIFT+Enter` for newli
68
68
  - A terminal emulator that supports extended keys (Ghostty, Kitty, iTerm2, WezTerm, Windows Terminal)
69
69
 
70
70
  With tmux 3.2 through 3.4, omit `extended-keys-format csi-u`; Atomic still supports tmux's default xterm `modifyOtherKeys` format.
71
+
72
+ ## Known issues
73
+
74
+ | Issue | Affects | Remedy |
75
+ |---|---|---|
76
+ | Text such as `c0c/0c0c/0c0c` appears in the editor at startup ([tmux#4749](https://github.com/tmux/tmux/issues/4749)) | tmux 3.6 | Upgrade tmux. tmux 3.6 forwards the terminal color queries Atomic sends at startup and can pass a split reply on as typed text. Changing Atomic's theme does not help. |
@@ -15,6 +15,7 @@ interface Component {
15
15
  render(width: number): string[];
16
16
  handleInput?(data: string): boolean | void;
17
17
  wantsKeyRelease?: boolean;
18
+ capturesViewportInput?: boolean;
18
19
  invalidate(): void;
19
20
  }
20
21
  ```
@@ -24,6 +25,7 @@ interface Component {
24
25
  | `render(width)` | Return array of strings (one per line). Each line **must not exceed `width`**. |
25
26
  | `handleInput?(data)` | Receive keyboard input when the component has focus. A focused overlay also receives mouse input before the fullscreen viewport. Return `true` when it consumes input; return `false`, `undefined`, or `void` when a matching fullscreen viewport key or overlay mouse event should fall through to viewport handling. Non-overlay focused components leave mouse input with pi-tui so transcript scrolling, scrollbar interaction, and drag selection remain available. |
26
27
  | `wantsKeyRelease?` | If true, component receives key release events (Kitty protocol). Default: false. |
28
+ | `capturesViewportInput?` | If true while the component has focus, fullscreen viewport keys such as PageUp/PageDown go to the component instead of scrolling the transcript, as they do for a focused overlay. `SelectList`, `SettingsList` and the editor with open autocomplete set it; a wrapper around one of them can forward it. Default: false. |
27
29
  | `invalidate()` | Clear cached render state. Called on theme changes. |
28
30
 
29
31
  The installed pi-tui type still permits handlers that return `void`; Atomic treats a missing or `undefined` result as unhandled only for a matching fullscreen viewport key or a mouse event deferred to a focused overlay. Components that mutate state for such an input must return `true` so the viewport does not apply it a second time.
package/docs/windows.md CHANGED
@@ -62,6 +62,22 @@ PowerShell discovery checks these locations in order:
62
62
 
63
63
  Paths copied from Git Bash, MSYS2, Cygwin, or WSL are accepted anywhere Atomic resolves a file path. For example, `/c/Users/name/project/file.ts`, `/cygdrive/c/Users/name/project/file.ts`, and `/mnt/c/Users/name/project/file.ts` resolve as the matching Windows drive path.
64
64
 
65
+ ## Choose a terminal
66
+
67
+ Windows terminals run Atomic through a console host (conhost). Some bundle an up-to-date copy; others use the older one built into Windows, which has bugs that affect Atomic.
68
+
69
+ We recommend [Windows Terminal](https://aka.ms/terminal). It always ships an up-to-date conhost.
70
+
71
+ Last updated: October 2026.
72
+
73
+ | Terminal | Conhost | Status |
74
+ |---|---|---|
75
+ | [Windows Terminal](https://aka.ms/terminal) | Bundled, current | Recommended |
76
+ | [VS Code](https://code.visualstudio.com), [Tabby](https://tabby.sh), [WezTerm](https://wezterm.org) nightly | Bundled, current | Works |
77
+ | [Alacritty](https://alacritty.org) | Built-in, unless `conpty.dll` and `OpenConsole.exe` from Windows Terminal are next to `alacritty.exe` | Works only with those files |
78
+ | WezTerm 20240203 and older | Bundled, old | [Known issues](#known-issues) |
79
+ | Classic console (`cmd.exe` or PowerShell without Windows Terminal), mintty (Git Bash), ConEmu, Cmder, [Hyper](https://hyper.is), Windows OpenSSH | Built-in | [Known issues](#known-issues) |
80
+
65
81
  ## Interactive Startup
66
82
 
67
83
  You can type while Atomic finishes startup. Submitting shows the working indicator; Escape cancels a submission still waiting for resources. If loading fails before the prompt is sent, Atomic restores your exact draft and sends no provider request. Use `/reload` to retry resource loading.
@@ -85,3 +101,13 @@ On native Windows, Atomic registers the `powershell` tool by default when PowerS
85
101
  PowerShell calls are rendered in the transcript with a `PS>` prompt so they are never mistaken for Bash, and truncated PowerShell output is spilled to its own `atomic-powershell-*` temp file rather than the Bash one.
86
102
 
87
103
  The package root exports `createPowerShellTool()`, `createPowerShellToolDefinition()`, `createLocalPowerShellOperations()`, their public option/input/detail types, and `getPowerShellConfig()` for SDK integrations. Factory-created tools expose the current `ATOMIC_*` and legacy `PI_*` session snapshot by default; set `exposeSessionEnvironment: false` to opt out. Executing the default local operations remains Windows-only and requires a resolvable PowerShell executable.
104
+
105
+ ## Known issues
106
+
107
+ These issues come from conhost. Microsoft has fixed them in its source, but has not said when the built-in conhost will get the fixes.
108
+
109
+ | Issue | Affects | Remedy |
110
+ |---|---|---|
111
+ | Opening the external editor (`Ctrl+G`) crashes the session ([microsoft/terminal#17515](https://github.com/microsoft/terminal/issues/17515)) | Built-in conhost | Use a terminal with a current conhost |
112
+ | Text such as `;0;rgb:0000/0000/0000` appears in the prompt, and BEL opens the external editor | Built-in conhost behind another terminal: mintty, Windows OpenSSH | Use a terminal with a current conhost |
113
+ | Fragments such as `79` or `55` appear in the prompt | WezTerm 20240203 | Use WezTerm nightly |
@@ -22,10 +22,11 @@ cp permission-gate.ts ~/.atomic/agent/extensions/
22
22
  | `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
23
23
  | `confirm-destructive.ts` | Confirms before destructive session actions (clear, switch, fork) |
24
24
  | `dirty-repo-guard.ts` | Prevents session changes with uncommitted git changes |
25
- | `sandbox/` | OS-level sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config |
26
25
  | `project-trust.ts` | Demonstrates the `project_trust` event for user/global and CLI extensions |
27
26
  | `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM |
28
27
 
28
+ For isolation setup and limitations, see [Run Atomic in an isolated environment](../../docs/containerization.md).
29
+
29
30
  ### Custom Tools
30
31
 
31
32
  | Extension | Description |
@@ -254,6 +254,8 @@ export default function presetExtension(pi: ExtensionAPI) {
254
254
  container.addChild(new DynamicBorder((str) => theme.fg("accent", str)));
255
255
 
256
256
  return {
257
+ // Let PageUp/PageDown page the list instead of scrolling the fullscreen transcript.
258
+ capturesViewportInput: selectList.capturesViewportInput,
257
259
  render(width: number) {
258
260
  return container.render(width);
259
261
  },
@@ -117,6 +117,8 @@ export default function toolsExtension(pi: ExtensionAPI) {
117
117
  container.addChild(settingsList);
118
118
 
119
119
  const component = {
120
+ // Let PageUp/PageDown page the list instead of scrolling the fullscreen transcript.
121
+ capturesViewportInput: settingsList.capturesViewportInput,
120
122
  render(width: number) {
121
123
  return container.render(width);
122
124
  },