@bastani/atomic 0.9.28-alpha.1 → 0.9.28-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/native-client-licenses/NOTICE +2 -0
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/subagents/package.json +1 -1
  6. package/dist/builtin/web-access/package.json +1 -1
  7. package/dist/builtin/workflows/CHANGELOG.md +34 -0
  8. package/dist/builtin/workflows/builtin/{chunk-wz8v67bn.js → chunk-aqv8ny38.js} +257 -259
  9. package/dist/builtin/workflows/builtin/{chunk-f61w0hpm.js → chunk-br4ac9a3.js} +1 -1
  10. package/dist/builtin/workflows/builtin/{chunk-tecnpe8j.js → chunk-p3xmajmj.js} +438 -39
  11. package/dist/builtin/workflows/builtin/chunk-p6jagvyf.js +8 -0
  12. package/dist/builtin/workflows/builtin/goal.js +2 -2
  13. package/dist/builtin/workflows/builtin/index.js +4 -4
  14. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  15. package/dist/builtin/workflows/package.json +1 -1
  16. package/dist/builtin/workflows/src/authoring.d.ts +14 -0
  17. package/dist/builtin/workflows/src/extension/index.bundle.mjs +111102 -110218
  18. package/dist/builtin/workflows/src/index.js +42284 -41141
  19. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +16 -11
  20. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +16 -1
  21. package/dist/cli/args.d.ts.map +1 -1
  22. package/dist/cli/args.js +8 -1
  23. package/dist/cli/args.js.map +1 -1
  24. package/dist/cli/credential-print.d.ts +1 -1
  25. package/dist/cli/credential-print.d.ts.map +1 -1
  26. package/dist/cli/credential-print.js +2 -56
  27. package/dist/cli/credential-print.js.map +1 -1
  28. package/dist/config.d.ts +2 -1
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/config.js +4 -2
  31. package/dist/config.js.map +1 -1
  32. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  33. package/dist/core/agent-session-accessors.js +6 -1
  34. package/dist/core/agent-session-accessors.js.map +1 -1
  35. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  36. package/dist/core/agent-session-compaction.js +20 -3
  37. package/dist/core/agent-session-compaction.js.map +1 -1
  38. package/dist/core/agent-session-events.d.ts.map +1 -1
  39. package/dist/core/agent-session-events.js +2 -1
  40. package/dist/core/agent-session-events.js.map +1 -1
  41. package/dist/core/agent-session-extension-bindings.d.ts +6 -0
  42. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  43. package/dist/core/agent-session-extension-bindings.js +90 -9
  44. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  45. package/dist/core/agent-session-methods.d.ts +3 -1
  46. package/dist/core/agent-session-methods.d.ts.map +1 -1
  47. package/dist/core/agent-session-methods.js.map +1 -1
  48. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  49. package/dist/core/agent-session-prompt.js +14 -1
  50. package/dist/core/agent-session-prompt.js.map +1 -1
  51. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  52. package/dist/core/agent-session-tool-registry.js +1 -0
  53. package/dist/core/agent-session-tool-registry.js.map +1 -1
  54. package/dist/core/agent-session-types.d.ts +2 -0
  55. package/dist/core/agent-session-types.d.ts.map +1 -1
  56. package/dist/core/agent-session-types.js.map +1 -1
  57. package/dist/core/agent-session.d.ts +1 -0
  58. package/dist/core/agent-session.d.ts.map +1 -1
  59. package/dist/core/agent-session.js +6 -1
  60. package/dist/core/agent-session.js.map +1 -1
  61. package/dist/core/bash-executor.d.ts.map +1 -1
  62. package/dist/core/bash-executor.js +22 -4
  63. package/dist/core/bash-executor.js.map +1 -1
  64. package/dist/core/child-session-options.d.ts.map +1 -1
  65. package/dist/core/child-session-options.js +17 -2
  66. package/dist/core/child-session-options.js.map +1 -1
  67. package/dist/core/compaction/classifier-compaction.d.ts +13 -0
  68. package/dist/core/compaction/classifier-compaction.d.ts.map +1 -0
  69. package/dist/core/compaction/classifier-compaction.js +110 -0
  70. package/dist/core/compaction/classifier-compaction.js.map +1 -0
  71. package/dist/core/compaction/compaction-boundary.d.ts.map +1 -1
  72. package/dist/core/compaction/compaction-boundary.js +2 -6
  73. package/dist/core/compaction/compaction-boundary.js.map +1 -1
  74. package/dist/core/compaction/compaction-runner.d.ts +16 -1
  75. package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
  76. package/dist/core/compaction/compaction-runner.js +97 -12
  77. package/dist/core/compaction/compaction-runner.js.map +1 -1
  78. package/dist/core/compaction/compaction-types.d.ts +18 -1
  79. package/dist/core/compaction/compaction-types.d.ts.map +1 -1
  80. package/dist/core/compaction/compaction-types.js +1 -1
  81. package/dist/core/compaction/compaction-types.js.map +1 -1
  82. package/dist/core/compaction/fallback-planner.d.ts +1 -0
  83. package/dist/core/compaction/fallback-planner.d.ts.map +1 -1
  84. package/dist/core/compaction/fallback-planner.js +2 -0
  85. package/dist/core/compaction/fallback-planner.js.map +1 -1
  86. package/dist/core/compaction/index.d.ts +3 -0
  87. package/dist/core/compaction/index.d.ts.map +1 -1
  88. package/dist/core/compaction/index.js +3 -0
  89. package/dist/core/compaction/index.js.map +1 -1
  90. package/dist/core/compaction/model-resolver.d.ts +16 -0
  91. package/dist/core/compaction/model-resolver.d.ts.map +1 -0
  92. package/dist/core/compaction/model-resolver.js +18 -0
  93. package/dist/core/compaction/model-resolver.js.map +1 -0
  94. package/dist/core/compaction/morph-compaction.d.ts +14 -0
  95. package/dist/core/compaction/morph-compaction.d.ts.map +1 -0
  96. package/dist/core/compaction/morph-compaction.js +99 -0
  97. package/dist/core/compaction/morph-compaction.js.map +1 -0
  98. package/dist/core/compaction/pi-summary-fallback.d.ts +34 -0
  99. package/dist/core/compaction/pi-summary-fallback.d.ts.map +1 -0
  100. package/dist/core/compaction/pi-summary-fallback.js +357 -0
  101. package/dist/core/compaction/pi-summary-fallback.js.map +1 -0
  102. package/dist/core/compaction/planner-outcome.d.ts +10 -6
  103. package/dist/core/compaction/planner-outcome.d.ts.map +1 -1
  104. package/dist/core/compaction/planner-outcome.js +11 -4
  105. package/dist/core/compaction/planner-outcome.js.map +1 -1
  106. package/dist/core/compaction/range-planner-diagnostics.d.ts +3 -1
  107. package/dist/core/compaction/range-planner-diagnostics.d.ts.map +1 -1
  108. package/dist/core/compaction/range-planner-diagnostics.js +11 -0
  109. package/dist/core/compaction/range-planner-diagnostics.js.map +1 -1
  110. package/dist/core/compaction/range-planner.d.ts +3 -3
  111. package/dist/core/compaction/range-planner.d.ts.map +1 -1
  112. package/dist/core/compaction/range-planner.js +59 -28
  113. package/dist/core/compaction/range-planner.js.map +1 -1
  114. package/dist/core/compaction/region-trimming.d.ts.map +1 -1
  115. package/dist/core/compaction/region-trimming.js +7 -0
  116. package/dist/core/compaction/region-trimming.js.map +1 -1
  117. package/dist/core/compaction/structured-compaction-input.d.ts +19 -0
  118. package/dist/core/compaction/structured-compaction-input.d.ts.map +1 -0
  119. package/dist/core/compaction/structured-compaction-input.js +70 -0
  120. package/dist/core/compaction/structured-compaction-input.js.map +1 -0
  121. package/dist/core/compaction/transcript-serialization.d.ts +1 -0
  122. package/dist/core/compaction/transcript-serialization.d.ts.map +1 -1
  123. package/dist/core/compaction/transcript-serialization.js +26 -0
  124. package/dist/core/compaction/transcript-serialization.js.map +1 -1
  125. package/dist/core/extensions/api-types.d.ts +2 -2
  126. package/dist/core/extensions/api-types.d.ts.map +1 -1
  127. package/dist/core/extensions/api-types.js.map +1 -1
  128. package/dist/core/extensions/context-types.d.ts +1 -0
  129. package/dist/core/extensions/context-types.d.ts.map +1 -1
  130. package/dist/core/extensions/context-types.js.map +1 -1
  131. package/dist/core/extensions/loader-api.js.map +1 -1
  132. package/dist/core/extensions/loader-virtual-modules.d.ts +3 -4
  133. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  134. package/dist/core/extensions/loader-virtual-modules.js +14 -9
  135. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  136. package/dist/core/extensions/runner-context.d.ts +10 -4
  137. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  138. package/dist/core/extensions/runner-context.js +47 -3
  139. package/dist/core/extensions/runner-context.js.map +1 -1
  140. package/dist/core/extensions/runner.d.ts +10 -3
  141. package/dist/core/extensions/runner.d.ts.map +1 -1
  142. package/dist/core/extensions/runner.js +31 -7
  143. package/dist/core/extensions/runner.js.map +1 -1
  144. package/dist/core/extensions/tool-events.d.ts +1 -1
  145. package/dist/core/extensions/tool-events.js.map +1 -1
  146. package/dist/core/extensions/ts-source-specifiers.d.ts +18 -0
  147. package/dist/core/extensions/ts-source-specifiers.d.ts.map +1 -0
  148. package/dist/core/extensions/ts-source-specifiers.js +142 -0
  149. package/dist/core/extensions/ts-source-specifiers.js.map +1 -0
  150. package/dist/core/extensions/workflow-events.d.ts +49 -0
  151. package/dist/core/extensions/workflow-events.d.ts.map +1 -1
  152. package/dist/core/extensions/workflow-events.js.map +1 -1
  153. package/dist/core/extensions/workflow-run-control-hub.d.ts +16 -4
  154. package/dist/core/extensions/workflow-run-control-hub.d.ts.map +1 -1
  155. package/dist/core/extensions/workflow-run-control-hub.js +72 -1
  156. package/dist/core/extensions/workflow-run-control-hub.js.map +1 -1
  157. package/dist/core/extensions/workflow-run-control.d.ts +11 -3
  158. package/dist/core/extensions/workflow-run-control.d.ts.map +1 -1
  159. package/dist/core/extensions/workflow-run-control.js.map +1 -1
  160. package/dist/core/messages.d.ts +1 -0
  161. package/dist/core/messages.d.ts.map +1 -1
  162. package/dist/core/messages.js +5 -1
  163. package/dist/core/messages.js.map +1 -1
  164. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  165. package/dist/core/remote-catalog-provider.js +3 -0
  166. package/dist/core/remote-catalog-provider.js.map +1 -1
  167. package/dist/core/sdk-exports.d.ts +2 -2
  168. package/dist/core/sdk-exports.js.map +1 -1
  169. package/dist/core/sdk-types.d.ts +3 -0
  170. package/dist/core/sdk-types.d.ts.map +1 -1
  171. package/dist/core/sdk-types.js.map +1 -1
  172. package/dist/core/sdk.d.ts.map +1 -1
  173. package/dist/core/sdk.js +17 -8
  174. package/dist/core/sdk.js.map +1 -1
  175. package/dist/core/session-manager-history.d.ts.map +1 -1
  176. package/dist/core/session-manager-history.js +4 -2
  177. package/dist/core/session-manager-history.js.map +1 -1
  178. package/dist/core/settings-manager-basic-accessors.d.ts +2 -0
  179. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  180. package/dist/core/settings-manager-basic-accessors.js +29 -0
  181. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  182. package/dist/core/settings-manager-core.js.map +1 -1
  183. package/dist/core/settings-merge.d.ts +3 -0
  184. package/dist/core/settings-merge.d.ts.map +1 -1
  185. package/dist/core/settings-merge.js +18 -4
  186. package/dist/core/settings-merge.js.map +1 -1
  187. package/dist/core/settings-storage.js.map +1 -1
  188. package/dist/core/settings-types.d.ts +1 -0
  189. package/dist/core/settings-types.d.ts.map +1 -1
  190. package/dist/core/settings-types.js.map +1 -1
  191. package/dist/core/transcript.d.ts +58 -0
  192. package/dist/core/transcript.d.ts.map +1 -0
  193. package/dist/core/transcript.js +185 -0
  194. package/dist/core/transcript.js.map +1 -0
  195. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  196. package/dist/extensions/codemode/execute.js +14 -1
  197. package/dist/extensions/codemode/execute.js.map +1 -1
  198. package/dist/extensions/codemode/tool.js +2 -2
  199. package/dist/extensions/codemode/tool.js.map +1 -1
  200. package/dist/extensions/herdr/index.d.ts.map +1 -1
  201. package/dist/extensions/herdr/index.js +15 -10
  202. package/dist/extensions/herdr/index.js.map +1 -1
  203. package/dist/extensions/herdr/pane-owner.d.ts +6 -2
  204. package/dist/extensions/herdr/pane-owner.d.ts.map +1 -1
  205. package/dist/extensions/herdr/pane-owner.js +19 -4
  206. package/dist/extensions/herdr/pane-owner.js.map +1 -1
  207. package/dist/extensions/llama/provider.d.ts.map +1 -1
  208. package/dist/extensions/llama/provider.js +19 -8
  209. package/dist/extensions/llama/provider.js.map +1 -1
  210. package/dist/extensions/mcp/cli.js +18 -24
  211. package/dist/extensions/mcp/cli.js.map +1 -1
  212. package/dist/extensions/mcp/client/auth-provider.d.ts +4 -0
  213. package/dist/extensions/mcp/client/auth-provider.d.ts.map +1 -1
  214. package/dist/extensions/mcp/client/auth-provider.js.map +1 -1
  215. package/dist/extensions/mcp/client/oauth/discovery.d.ts +3 -0
  216. package/dist/extensions/mcp/client/oauth/discovery.d.ts.map +1 -1
  217. package/dist/extensions/mcp/client/oauth/discovery.js +8 -5
  218. package/dist/extensions/mcp/client/oauth/discovery.js.map +1 -1
  219. package/dist/extensions/mcp/client/oauth/flow.d.ts +4 -0
  220. package/dist/extensions/mcp/client/oauth/flow.d.ts.map +1 -1
  221. package/dist/extensions/mcp/client/oauth/flow.js +12 -2
  222. package/dist/extensions/mcp/client/oauth/flow.js.map +1 -1
  223. package/dist/extensions/mcp/client/transports/streamable-http.d.ts +3 -0
  224. package/dist/extensions/mcp/client/transports/streamable-http.d.ts.map +1 -1
  225. package/dist/extensions/mcp/client/transports/streamable-http.js +17 -14
  226. package/dist/extensions/mcp/client/transports/streamable-http.js.map +1 -1
  227. package/dist/extensions/mcp/index.d.ts.map +1 -1
  228. package/dist/extensions/mcp/index.js +150 -72
  229. package/dist/extensions/mcp/index.js.map +1 -1
  230. package/dist/extensions/mcp/oauth.d.ts +5 -3
  231. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  232. package/dist/extensions/mcp/oauth.js +36 -10
  233. package/dist/extensions/mcp/oauth.js.map +1 -1
  234. package/dist/extensions/mcp/ui.d.ts +3 -3
  235. package/dist/extensions/mcp/ui.d.ts.map +1 -1
  236. package/dist/extensions/mcp/ui.js +10 -2
  237. package/dist/extensions/mcp/ui.js.map +1 -1
  238. package/dist/index.d.ts +3 -1
  239. package/dist/index.d.ts.map +1 -1
  240. package/dist/index.js +2 -0
  241. package/dist/index.js.map +1 -1
  242. package/dist/main-deferred-startup.d.ts +1 -0
  243. package/dist/main-deferred-startup.d.ts.map +1 -1
  244. package/dist/main-deferred-startup.js +9 -21
  245. package/dist/main-deferred-startup.js.map +1 -1
  246. package/dist/main.d.ts.map +1 -1
  247. package/dist/main.js +8 -6
  248. package/dist/main.js.map +1 -1
  249. package/dist/modes/interactive/components/compaction-boundary-message.d.ts +2 -0
  250. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
  251. package/dist/modes/interactive/components/compaction-boundary-message.js +15 -3
  252. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  253. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  254. package/dist/modes/interactive/components/settings-selector-items.js +43 -0
  255. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  256. package/dist/modes/interactive/components/settings-selector-types.d.ts +6 -0
  257. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  258. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  259. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  260. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  261. package/dist/modes/interactive/interactive-input-handling.js +1 -47
  262. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  263. package/dist/modes/interactive/interactive-mode-base.d.ts +0 -1
  264. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  265. package/dist/modes/interactive/interactive-mode-base.js +0 -1
  266. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  267. package/dist/modes/interactive/interactive-mode-surface.d.ts +0 -1
  268. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  269. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  270. package/dist/modes/interactive/interactive-prompt-restore.d.ts.map +1 -1
  271. package/dist/modes/interactive/interactive-prompt-restore.js +0 -5
  272. package/dist/modes/interactive/interactive-prompt-restore.js.map +1 -1
  273. package/dist/modes/interactive/interactive-prompt-turn.js +6 -4
  274. package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -1
  275. package/dist/modes/interactive/interactive-render-chat.js +13 -6
  276. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  277. package/dist/modes/interactive/interactive-selectors.js +8 -0
  278. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  279. package/dist/modes/interactive/interactive-session-runtime.js +2 -0
  280. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  281. package/dist/modes/interactive/interactive-startup.js +1 -1
  282. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  283. package/dist/modes/rpc/rpc-client-process.d.ts +7 -0
  284. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  285. package/dist/modes/rpc/rpc-client-process.js +20 -3
  286. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  287. package/dist/modes/rpc/rpc-command-timeouts.d.ts.map +1 -1
  288. package/dist/modes/rpc/rpc-command-timeouts.js +1 -0
  289. package/dist/modes/rpc/rpc-command-timeouts.js.map +1 -1
  290. package/dist/utils/ansi.d.ts +8 -0
  291. package/dist/utils/ansi.d.ts.map +1 -1
  292. package/dist/utils/ansi.js +29 -10
  293. package/dist/utils/ansi.js.map +1 -1
  294. package/dist/utils/clipboard.d.ts.map +1 -1
  295. package/dist/utils/clipboard.js +13 -3
  296. package/dist/utils/clipboard.js.map +1 -1
  297. package/dist/utils/credential-redaction.d.ts +2 -0
  298. package/dist/utils/credential-redaction.d.ts.map +1 -0
  299. package/dist/utils/credential-redaction.js +20 -0
  300. package/dist/utils/credential-redaction.js.map +1 -0
  301. package/dist/utils/image-resize-core.d.ts +8 -0
  302. package/dist/utils/image-resize-core.d.ts.map +1 -1
  303. package/dist/utils/image-resize-core.js +1 -0
  304. package/dist/utils/image-resize-core.js.map +1 -1
  305. package/dist/utils/image-resize-worker.js +3 -2
  306. package/dist/utils/image-resize-worker.js.map +1 -1
  307. package/dist/utils/image-resize.d.ts +2 -2
  308. package/dist/utils/image-resize.d.ts.map +1 -1
  309. package/dist/utils/image-resize.js +7 -10
  310. package/dist/utils/image-resize.js.map +1 -1
  311. package/docs/codemode.md +21 -1
  312. package/docs/compaction/reference.md +10 -4
  313. package/docs/compaction.md +40 -8
  314. package/docs/docs.json +1 -0
  315. package/docs/extensions/api-reference.md +4 -0
  316. package/docs/extensions/events.md +2 -2
  317. package/docs/llama-cpp.md +9 -2
  318. package/docs/mcp-servers.md +3 -3
  319. package/docs/models.md +10 -0
  320. package/docs/providers.md +39 -5
  321. package/docs/reference/cli.md +2 -2
  322. package/docs/sdk/reference.md +19 -4
  323. package/docs/sdk/web-server.md +325 -0
  324. package/docs/sdk.md +83 -1
  325. package/docs/security.md +1 -1
  326. package/docs/settings.md +2 -2
  327. package/docs/tools.md +1 -1
  328. package/docs/workflows/api-reference.md +71 -3
  329. package/docs/workflows/builtins.md +4 -0
  330. package/docs/workflows/operations.md +13 -5
  331. package/npm-shrinkwrap.json +32 -32
  332. package/package.json +3 -3
@@ -7,9 +7,9 @@ description: "Verbatim line compaction, when it runs, planning rungs, and branch
7
7
 
8
8
  LLMs have finite context windows. Atomic reduces older transcript context with **verbatim line compaction** while preserving a configured count of recent context-visible messages. Branch summarization is a separate, lossy feature used when navigating away from a branch.
9
9
 
10
- Compaction runs locally without an external compaction service. It normally asks the active session model to rank lines. If that model cannot rank them because of a rate limit, quota exhaustion, provider error, context overflow, or empty plan, Atomic *borrows* the next model from your configured `fallbackModels` for that planner request.
10
+ Compaction normally uses the model selected by `compactionModel`. If it fails, Atomic borrows the next model from your configured `fallbackModels` for that request. A chat model's policy refusal first triggers pi's summary compaction on the same model, whether selected by `auto`, an explicit chat-model ID, or a `fallbackModels` entry. If that also fails, Atomic continues through the fallback models. Classifier and Morph failures go straight to the fallback models.
11
11
 
12
- **A configured fallback model may therefore receive the compaction transcript**, using that provider's own credentials. Borrowing never changes the session's model or thinking level. The model only selects lines to delete. Atomic reconstructs retained text from the originals, so surviving lines are never rewritten.
12
+ **The selected compaction model and configured fallback models may receive the compaction transcript**, using their own credentials. Borrowing never changes the session's model or thinking level. Line planners select deletions, and Atomic reconstructs surviving lines without rewriting them. The policy-refusal summary fallback is lossy and appears as `summary (pi fallback)`.
13
13
 
14
14
  ## On this page and its reference
15
15
 
@@ -19,8 +19,9 @@ This page covers the concepts and normal use of compaction and branch summarizat
19
19
 
20
20
  | Mechanism | Trigger | Model output | Durable result |
21
21
  |---|---|---|---|
22
- | Verbatim compaction | `/compact`, RPC `compact`, or automatic threshold/overflow recovery | Bare `start,end` deletion records (one per line) | A `CompactionEntry` whose `summary` is mechanically reconstructed transcript text |
23
- | Planner fallback borrowing | Any terminal planner outcome on the current planner model | Same deletion records, from a configured `fallbackModels` entry | The same `"planned"` boundary, with `details.plannerModel` naming the borrowed model |
22
+ | Verbatim compaction | `/compact`, RPC `compact`, or automatic threshold/overflow recovery | Per-message `id:start,end` deletion records | Retained transcript text reconstructed from the originals |
23
+ | Planner fallback borrowing | A failed selected compaction model | Same deletion records, from a configured `fallbackModels` entry | Retained text with the borrowed model recorded |
24
+ | Policy-refusal summary fallback | A chat provider refuses compaction under its policy | Pi's summary compaction on the same model | A summary boundary labeled `summary (pi fallback)` |
24
25
  | Fresh context window | Load-bearing compaction after every configured model failed | *(none — no model call)* | A `CompactionEntry` with `details.rung: "fresh"` |
25
26
  | Branch summarization | Optional `/tree` navigation | Generated summary prose | A `BranchSummaryEntry` |
26
27
 
@@ -43,10 +44,10 @@ Atomic serializes the compactable part of the conversation into role-tagged line
43
44
  [Assistant]: The off-by-one error is fixed.
44
45
  ```
45
46
 
46
- The planner sees the same text numbered as `N→content` and returns only one-based, inclusive line ranges as bare records:
47
+ The planner receives messages with their role and an array of lines. It returns inclusive per-message deletion ranges. For example, this deletes lines 2 through 5 of message 1:
47
48
 
48
49
  ```text
49
- 2,5
50
+ 1:2,5
50
51
  ```
51
52
 
52
53
  The model selects lines to delete; it does not rewrite retained text. Retained non-marker lines stay byte-identical and in their original order.
@@ -86,6 +87,37 @@ Protection includes the tags and survives repeated compaction, even if the plann
86
87
 
87
88
  Results report protected ranges as `keptRanges`.
88
89
 
90
+ ## Compaction model
91
+
92
+ Use `/settings` → **Compaction model** to choose Auto, a chat model, a registered classifier, or Morph without changing your chat model. Auto uses the current session model. The selector saves to project settings when a project override already exists; otherwise it saves globally.
93
+
94
+ You can also set `compactionModel` in `~/.atomic/agent/settings.json` or a trusted project's `.atomic/settings.json`:
95
+
96
+ ```json
97
+ {
98
+ "compactionModel": "auto",
99
+ "fallbackModels": ["openai-codex/gpt-6.1-sol"]
100
+ }
101
+ ```
102
+
103
+ The default, `auto`, or an empty value uses the current session model, including Anthropic models. An exact registered chat-model ID selects that model just for compaction. Registered classifiers and Morph compactors are also selectable. Project settings cannot select `morph/*`; choose Morph globally instead.
104
+
105
+ An explicit compaction model can send the compactable transcript to a different provider, using that provider's credentials. Choose only providers permitted to receive your conversation. Changing `compactionModel` does not affect branch summaries.
106
+
107
+ For classifier compaction, log in with `/login typesafe`, then set `"compactionModel": "typesafe/jev-latest"`. The classifier scores groups of transcript lines; Atomic removes lower-scored groups without rewriting the rest. Protected lines and the recent tail are not sent for scoring. If scoring fails, Atomic tries your fallback models. Group boundaries can make the retained fraction differ from the requested compression ratio.
108
+
109
+ For Morph compaction, use `/login morph` or set `MORPH_API_KEY`, then choose `morph/morph-compactor` in the global selector or settings file. Without a credential, the selector marks Morph as `requires /login morph`. Morph receives the compactable transcript, including serialized thinking, but not the recent tail. Atomic reconstructs surviving lines from the originals and preserves `<keepContext>` spans. Morph is not a chat-model choice.
110
+
111
+ The compaction card shows the backend and model that produced the result, such as `classifier · typesafe/jev-latest` or `morph · morph/morph-compactor`. A policy-refusal summary appears as `summary (pi fallback)`.
112
+
113
+ ### Troubleshooting policy refusals
114
+
115
+ If you see "This request was blocked as it seems to violate Anthropic's Terms of Service", or a refusal about reverse engineering or duplicating model outputs, the provider refused that compaction request. Atomic does not retry policy refusals as transient errors. For any chat compaction model, including `auto`, it tries pi's summary compaction on the same model. That summary retries recoverable rate-limit, server, overload, and transport errors according to `settings.retry`, just like the planner. If the summary also fails or is refused, Atomic continues through `fallbackModels`.
116
+
117
+ Classifier and Morph refusals skip the summary fallback and go directly to the next configured model. Anthropic remains a supported compactor. To keep verbatim compaction when a model refuses deletion planning, choose another `compactionModel`, such as a chat model, classifier, or Morph. Adding a `fallbackModels` entry gives Atomic another verbatim planner if the same-model summary fails.
118
+
119
+ If every attempt fails, manual `/compact` leaves your context unchanged. Overflow recovery and post-tool preflight may instead clear older context as described below.
120
+
89
121
  ## Parameters
90
122
 
91
123
  Moved to [Compaction reference](/compaction/reference#parameters).
@@ -117,7 +149,7 @@ Threshold decisions and recovery use the canonical session projection. When Atom
117
149
 
118
150
  Atomic uses the session's reasoning level unless a fallback entry specifies its own level. The provider controls the planner's output limit.
119
151
 
120
- `settings.retry` controls retries within one model. If planning fails, Atomic tries configured `settings.fallbackModels` in order, using each model's own credentials. Unavailable credentials do not prevent trying later models. Borrowing does not change the chat model, thinking level, or model-selection events.
152
+ `settings.retry` controls recoverable-error retries within one chat model, including a policy-refusal summary fallback. Policy refusals are not retried. If compaction fails, Atomic tries configured `settings.fallbackModels` in order, using each model's own credentials and skipping the selected compaction model if listed again. Unavailable credentials do not prevent trying later models. Borrowing does not change the chat model, thinking level, or model-selection events.
121
153
 
122
154
  When every configured model is exhausted, what happens depends on how much the caller can afford to lose:
123
155
 
@@ -262,7 +294,7 @@ When prompted, choose one of:
262
294
  2. summarize with the default prompt
263
295
  3. summarize with custom focus instructions
264
296
 
265
- Branch summaries are separate from `/compact`: branch navigation can generate summary prose (optionally with focus instructions), while Verbatim Compaction lets a model select numbered line ranges and reconstructs retained text mechanically.
297
+ Branch summaries are separate from `/compact`: branch navigation generates summary prose, while normal verbatim compaction selects per-message line ranges and reconstructs retained text mechanically. A chat compaction policy refusal can trigger pi's summary compaction as described above.
266
298
 
267
299
  Use the [Compaction reference](/compaction/reference) for extension hooks and saved formats.
268
300
 
package/docs/docs.json CHANGED
@@ -161,6 +161,7 @@
161
161
  "pages": [
162
162
  "programmatic",
163
163
  "sdk",
164
+ "sdk/web-server",
164
165
  "rpc",
165
166
  "rpc/extension-ui",
166
167
  "rpc/examples",
@@ -18,6 +18,10 @@ UI methods for user interaction. See [Custom UI](/extensions/ui#custom-ui) for f
18
18
 
19
19
  `false` in print mode (`-p`) and JSON mode. `true` in interactive and RPC mode. In RPC mode, dialog methods (`select`, `confirm`, `input`, `editor`) work via the extension UI sub-protocol, and fire-and-forget methods (`notify`, `setStatus`, `setWidget`, `setTitle`, `setEditorText`) emit requests to the client. Some TUI-specific methods are no-ops or return defaults (see [RPC mode](/rpc/extension-ui#extension-ui-protocol)).
20
20
 
21
+ ### ctx.isPresentationOnly
22
+
23
+ `true` in the local presentation host when the isolated interactive engine owns execution. Keep UI registration active, but skip background execution and durable recovery in lifecycle hooks in this context to avoid starting the same work in both processes. Normal SDK, print, RPC, and engine contexts leave this flag false or unset.
24
+
21
25
  ### ctx.cwd
22
26
 
23
27
  Current working directory.
@@ -849,9 +849,9 @@ export default function (pi: ExtensionAPI) {
849
849
  }
850
850
  ```
851
851
 
852
- Frames are ordinary objects with a `{ epoch: string, revision: number }` cursor. Revisions increase within an epoch; lifecycle publication may leave gaps between activity revisions. A new publisher starts a new epoch and an `unavailable` snapshot. Never compare revision numbers across epochs. A `ready` snapshot has a `roots` array, including an empty array when known empty. `recovering` and `unavailable` snapshots omit `roots`. Subsequent snapshots replace all prior knowledge. Changes replace a complete root, not increment counters. Removals contain `rootRunId`. Root summaries include `state`, `reason`, execution/wait counts, and `needsAttention`.
852
+ Frames are ordinary objects with a `{ epoch: string, revision: number }` cursor. Revisions increase within an epoch; lifecycle publication may leave gaps between activity revisions. A new publisher starts a new epoch and an `unavailable` snapshot. Never compare revision numbers across epochs. A `ready` snapshot has a `roots` array, including an empty array when known empty. `recovering` and `unavailable` snapshots omit `roots`. Subsequent snapshots replace all prior knowledge. Changes replace a complete root, not increment counters. Removals contain `rootRunId`. Root summaries include `state`, `reason`, execution/wait counts, and `needsAttention`. Roots published by the workflows extension also carry an optional `graph: { nodes }`. It holds the root's expanded workflow graph, including the nodes of nested child workflows. Each node is a `stage` or `tool` node with `id`, `runId`, `nodeId`, `name`, `status`, `parentIds`, `depth`, and `executionOrder` when it is known. Tool nodes add their `ordinal`. Stages waiting on a prompt add `pendingPrompt` (`id`, `kind`, `message`, `choices`, `createdAt`). Prompts raised by a run rather than a stage appear in `graph.runPrompts`, each with the same fields plus its `runId`. A node status change publishes a `changed` frame. Treat `graph` as optional, because other publishers may omit it.
853
853
 
854
- The workflows extension also calls `pi.registerWorkflowRunControl(control)` to back `session.workflows`, the typed pause, quit, and resume API for SDK hosts (see [Workflow run control](/sdk#workflow-run-control)). The registration is released with the extension generation, and only the most recent registration is active.
854
+ The workflows extension also calls `pi.registerWorkflowRunControl(control)` with a `WorkflowRunControl` to back `session.workflows`, the typed pause, quit, and resume API for SDK hosts (see [Workflow run control](/sdk#workflow-run-control)). SDK hosts follow this same activity stream through `session.workflows.observe(observer)`. The registration is released with the extension generation, and only the most recent registration is active.
855
855
 
856
856
  Providers call `pi.registerWorkflowActivityPublisher()` and retain its returned `WorkflowActivityPublisher`. Its methods are `publishSnapshot({ availability: "ready", roots })`, `publishSnapshot({ availability: "recovering" | "unavailable" })`, `publishChanged(root)`, `publishRemoved(rootRunId)`, `publishLifecycle(event)`, `publishHeartbeat(event)`, and `dispose()`. Lifecycle input includes `type: "workflow_lifecycle"` and the envelope except `cursor`, which the host supplies. Heartbeat input includes `type: "workflow_heartbeat"`. IDs, names, timestamps, zero counts and optional attribution are preserved. Roots are keyed by `rootRunId`; duplicate snapshot IDs use the last value at the first insertion position. Removing an absent ID is permitted. Changes do not turn an unknown source into `ready`; publish a snapshot to establish readiness.
857
857
 
package/docs/llama-cpp.md CHANGED
@@ -70,11 +70,18 @@ Each llama model uses the router-reported loaded context (`meta.n_ctx`, then tra
70
70
 
71
71
  ## Classification
72
72
 
73
- Every model listed for chat is also listed as a classifier model with the same ID and the `llama-cpp-classify` API. Classifier models answer typed `choice`, `bool`, and `score` questions about JSON state, like TypeSafe's Jev models, so a local model can make `model: "auto"` routing decisions. Classifier models never appear in `/model`.
73
+ Classifier models answer typed `choice`, `bool`, and `score` questions about JSON state, like TypeSafe's Jev models, so a local model can make `model: "auto"` routing decisions. Extensions can call `ctx.modelRegistry.classify()` and codemode scripts can call `models.classify()`; see [Classifier models](/models#use-classifier-models). Atomic lists llama.cpp models as classifiers in two ways:
74
+
75
+ - **Decision models** such as Julia-1, Laya, Kev, lev, and OpenJev answer natively through llama.cpp's `/v1/systemone` endpoint with the `typesafe-system-one` API. Decision-only models do not appear in `/model`.
76
+ - **Chat models** are also listed as classifiers with the same ID and the `llama-cpp-classify` API, which reads answers from next-token probabilities as described below.
77
+
78
+ llama.cpp 0.6.0 and later report decision models through `architecture.output_modalities` containing `decisions`. Atomic recognizes these models even when sleeping or unloaded, without loading them during discovery. Unloaded presets are selectable only when router autoload is enabled. Older servers omit this metadata, so their models use the chat-model fallback.
79
+
80
+ ### Chat models as classifiers
74
81
 
75
82
  The model does not generate an answer. Each question becomes one chat prompt: the state, every question of the request, the state again, and then the question with its answers under single-token labels. Labels are letters for a choice (up to 62 options), `Yes`/`No` for a bool, and digits for a score (up to 10 levels). Atomic reads the probabilities of the labels as the next token and normalizes them. A choice returns every option's probability and a confidence of `(n * peak - 1) / (n - 1)`; a score returns the expected level.
76
83
 
77
- - An explicit [`routerModel`](/settings#routermodel) resolves a classifier before a chat model, so `routerModel: "llama.cpp/<id>"` routes with the classifier, not the chat model. A routing shortlist with more than 62 models fails on the classifier, and routing switches to the current chat model. The **Router model** picker lists each llama.cpp model twice, once as a classifier and once as a chat model; both rows save the same ID.
84
+ - An explicit [`routerModel`](/settings#routermodel) resolves a classifier before a chat model, so `routerModel: "llama.cpp/<id>"` routes with the classifier, not the chat model. A routing shortlist with more than 62 models fails on the chat-model classifier, and routing switches to the current chat model. The **Router model** picker lists each chat-capable llama.cpp model twice, once as a classifier and once as a chat model; both rows save the same ID. Decision-only models have only a classifier row.
78
85
  - The `structured_output` tool and `generateStructuredOutput()` resolve the chat model first when a chat and a classifier model share an ID, so naming `llama.cpp/<id>` there keeps using the chat model.
79
86
  - Raw label probabilities are usually overconfident. The `temperature` option of SDK `classify()` calls divides the label logits before normalizing; values above 1 soften the distribution. It changes no answer.
80
87
  - Questions run one after another. Everything before the final question is the same for all questions of a request, so the server's prompt cache evaluates it once. The state appears twice, so it needs twice its size in context.
@@ -80,7 +80,7 @@ Installed [packages](/packages/authoring#mcp-servers) and extensions can contrib
80
80
 
81
81
  ## Manage servers
82
82
 
83
- `/mcp` opens a server manager with connection state, tool count, exposure, and source. Select a server to inspect tools and connection details, sign in or out, reconnect, enable or disable it, or change exposure. Servers that need attention appear first.
83
+ `/mcp` opens a server manager with connection state, tool count, exposure, and source, even while startup connections are pending. Select a server to inspect tools and connection details, sign in or out, reconnect, enable or disable it, or change exposure. Servers that need attention appear first. Enable, disable, and reconnect run in the background; the manager updates live and you can keep navigating or close it while they finish.
84
84
 
85
85
  | Command | Action |
86
86
  | --- | --- |
@@ -108,7 +108,7 @@ atomic mcp logout <server>
108
108
 
109
109
  `add` replaces an existing entry of the same name. `add` and `remove` accept `--local` (`-l`) for the project file. For stdio, use repeatable `--env KEY=VALUE` and `--cwd`. For HTTP, use repeatable `--header KEY=VALUE`, `--bearer-token-env-var NAME`, and `--oauth-client-id`, `--oauth-client-secret`, `--oauth-callback-port`, or `--oauth-client-name`. Both transports accept `--exposure` and `--description`. Run `atomic mcp --help` for usage.
110
110
 
111
- `list` connects to enabled servers and reports state, tools, and errors; it exits with status 1 for invalid configuration or an enabled server that is not connected. `--json` produces a machine-readable report. Login waits up to 300 seconds by default; `--timeout` changes that browser-login budget, not the server request timeout. A running session uses new credentials on its next turn.
111
+ `list` connects to enabled servers and reports state, tools, and errors; it exits with status 1 for invalid configuration or an enabled server that is not connected. `--json` produces a machine-readable report. Login gives up after 300 seconds by default; `--timeout` limits the whole sign-in, including requests to the authorization server, but not the MCP server request timeout. A running session uses new credentials on its next turn.
112
112
 
113
113
  ## Find and call tools
114
114
 
@@ -165,7 +165,7 @@ MCP Apps resources (`ui://` URIs or `text/html;profile=mcp-app`) are omitted bec
165
165
 
166
166
  ## Authentication
167
167
 
168
- For a remote OAuth server, configure its URL and run `/mcp login my-server`, or select **Sign in** in `/mcp`. Atomic opens the authorization page and displays a clickable URL. If the browser runs on another machine, paste the complete URL it was redirected to into the sign-in prompt. Treat authorization and redirect URLs as sensitive.
168
+ For a remote OAuth server, configure its URL and run `/mcp login my-server`, or select **Sign in** in `/mcp`. Atomic opens the authorization page and displays a clickable URL. If the browser runs on another machine, paste the complete URL it was redirected to into the sign-in prompt. Press Esc to cancel a sign-in at any step; requests to the authorization server time out after 15 seconds. Treat authorization and redirect URLs as sensitive.
169
169
 
170
170
  Atomic registers OAuth clients as `atomic`, stores credentials in `~/.atomic/agent/mcp-auth.json`, and refreshes tokens when they expire or are rejected. A successful sign-in reconnects the server. If additional scope is required, sign in again. `/mcp logout my-server` or `atomic mcp logout my-server` deletes stored credentials. Old adapter credential files are not imported; sign in through the native client.
171
171
 
package/docs/models.md CHANGED
@@ -21,6 +21,16 @@ This page shows minimal and full `models.json` examples you can copy. Every fiel
21
21
 
22
22
  For choosing which model to use rather than how to declare one, see [Model selection](/models/model-selection).
23
23
 
24
+ ## Use classifier models
25
+
26
+ 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.
27
+
28
+ OpenAI's `gpt-6-luna` classifier uses the [Decisions API](https://developers.openai.com/api/docs/guides/decisions) and requires `OPENAI_API_KEY`. Sign in with ChatGPT credentials do not work with it. While `openai` uses `/login` credentials, the classifier is not listed as available, even if the environment key is set. Log out of `openai` to use the API key.
29
+
30
+ 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.
31
+
32
+ TypeSafe Jev and Cloudflare Clef classifiers are also available through their providers. [Local llama.cpp models](/llama-cpp#classification) support native decision models and a next-token-probability fallback for chat models.
33
+
24
34
  ## Table of Contents
25
35
 
26
36
  - [Minimal Example](/models#minimal-example)
package/docs/providers.md CHANGED
@@ -14,6 +14,8 @@ This page is provider setup: subscriptions, API keys, provider-specific configur
14
14
  - [Auth File](#auth-file)
15
15
  - [Provider Specific Config](#provider-specific-config)
16
16
  - [llama.cpp](#llama-cpp)
17
+ - [TypeSafe Jev](#typesafe-jev)
18
+ - [Morph compaction](#morph-compaction)
17
19
  - [Stop Reasons](/providers/reference#stop-reasons)
18
20
  - [Resolution Order](/providers/reference#resolution-order)
19
21
  - [Custom Providers](#custom-providers)
@@ -63,6 +65,8 @@ Run `/login openai`, then choose **API key** or **Sign in with ChatGPT**. The Ch
63
65
 
64
66
  Complete the browser callback, or paste the full callback URL into the login dialog on a remote machine. If your browser cannot reach `127.0.0.1:1455`, copy the final URL from its address bar, including `code`, `state`, and `client_id`, and paste it into Atomic. Atomic creates a global device identity on first use of this sign-in; project settings do not override it. A saved subscription credential does not verify model entitlement or remaining usage.
65
67
 
68
+ Apps using `@bastani/pi-ai` directly can pass `{ agentName: "my-app" }` as the fourth argument to `models.login()` to set the OpenAI ChatGPT name hint or Codex browser-login originator. ChatGPT sign-in keeps `Atomic` as its default name.
69
+
66
70
  ### OpenAI Codex
67
71
 
68
72
  - Requires ChatGPT Plus or Pro subscription
@@ -70,6 +74,8 @@ Complete the browser callback, or paste the full callback URL into the login dia
70
74
 
71
75
  If the Codex backend reports that an OAuth/auth token was invalidated or revoked, retry the request once in case the rejection is transient. If it persists, run `/logout` and select **OpenAI ChatGPT Plus/Pro**, then run `/login`, authenticate that subscription again, and retry the request. Atomic displays these recovery steps with the provider error; it does not automatically delete the stored credential or repeatedly retry a definitive authentication rejection.
72
76
 
77
+ For Codex requests, `models.json` headers or per-request SDK headers can override `originator` and `User-Agent`. The transport still supplies the authenticated bearer token and ChatGPT account ID.
78
+
73
79
  GPT-6-Astra is selectable as `openai-codex/gpt-6-astra`. Atomic also derives the canonical `openai-codex/gpt-6-astra-fast` choice. The fast choice sends upstream model `gpt-6-astra` with `service_tier: priority` and keeps the first-party Codex transport identity described below. Access can still depend on the account, rollout, and minimum client policy even though Atomic lists the model.
74
80
 
75
81
  GPT-6 Sol and GPT-6 Luna are selectable as `openai/gpt-6-sol`, `openai/gpt-6-luna`, `openai-codex/gpt-6-sol`, and `openai-codex/gpt-6-luna`. Each has a derived `-fast` choice, such as `openai-codex/gpt-6-sol-fast`, that sends the base upstream model with `service_tier: priority`. Copilot's bundled catalog and account policy determine which Sol models are available; fast siblings require an exact advertised ID.
@@ -126,6 +132,8 @@ Anthropic subscription auth is active for Claude Pro/Max accounts. Third-party h
126
132
 
127
133
  Run `/login anthropic` and choose subscription authentication. **Browser login (default)** uses a local callback and still accepts a pasted redirect URL. Choose **Copy code login (headless)** when your browser runs on another machine: complete sign-in in that browser, then paste the `code#state` value Anthropic displays into Atomic. This method does not need a reachable local callback.
128
134
 
135
+ Browser login tries loopback port `53692` first and uses a free port if it is unavailable. For SSH or container port forwarding, forward `53692` when it is free; otherwise use **Copy code login (headless)** or paste the final redirect URL.
136
+
129
137
  For gateway-issued Anthropic bearer credentials, set `ANTHROPIC_AUTH_TOKEN` without `ANTHROPIC_API_KEY` or `ANTHROPIC_OAUTH_TOKEN`. A populated bearer token counts as configured Anthropic authentication, so `/model`, saved/default selection, cycling, RPC catalogs, and isolated model pickers keep Anthropic models available. Atomic sends it as `Authorization: Bearer …` for normal turns, branch summaries, and Verbatim Compaction without replacing caller-supplied custom headers.
130
138
 
131
139
  Claude Opus 5 is available from the bundled/dynamic Anthropic and Amazon Bedrock catalogs. With bearer-only Anthropic auth, select the exact `anthropic/claude-opus-5-*` entry through `/model`; Bedrock uses its catalog-advertised inference profile. `xhigh` appears only when the chosen entry advertises it. Bedrock requests retain adaptive thinking, prompt caching, and AWS validation/error details from the provider runtime.
@@ -186,6 +194,8 @@ Run `/login meta`, then select **Sign in with Meta** to open the device authoriz
186
194
 
187
195
  Radius is a dynamic `pi-messages` gateway. `/login radius` stores OAuth tokens in `auth.json`; its model catalog refreshes independently and is cached in `models-store.json`. API-key authentication is also available through `/login radius` or `RADIUS_API_KEY`. Custom Radius gateways can be declared in `models.json` with `"oauth": "radius"` and the gateway `baseUrl`.
188
196
 
197
+ Once a fetched or cached Radius catalog is available, it replaces the bundled defaults. Models disabled by your organization no longer appear; an empty gateway catalog leaves no Radius models to select. Ask your organization owner to enable models if the list is empty.
198
+
189
199
  ## API Keys
190
200
 
191
201
  ### Environment Variables or Auth File
@@ -230,6 +240,7 @@ Catalog failures preserve the last usable models for each provider. See [catalog
230
240
  | Radius | `RADIUS_API_KEY` | `radius` |
231
241
  | Hugging Face | `HF_TOKEN` | `huggingface` |
232
242
  | TypeSafe Jev | `TYPESAFE_API_KEY` | `typesafe` |
243
+ | Morph | `MORPH_API_KEY` | `morph` |
233
244
  | Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
234
245
  | Together AI | `TOGETHER_API_KEY` | `together` |
235
246
  | Baseten | `BASETEN_API_KEY` | `baseten` |
@@ -348,7 +359,7 @@ Use `--list-models` or `/model` to check the current catalog and replace a missi
348
359
 
349
360
  ### Azure
350
361
 
351
- Use the `azure` provider for OpenAI Responses models and Azure Foundry Chat Completions, including `azure/deepseek-v4-pro`:
362
+ Use the `azure` provider for OpenAI Responses models and Microsoft Foundry Chat Completions models, including `azure/deepseek-v4-pro`. The provider ID `azure` is the key in `auth.json`, `models.json`, and `settings.json`, and the prefix in model references:
352
363
 
353
364
  ```bash
354
365
  atomic --model azure/deepseek-v4-pro:high
@@ -356,8 +367,6 @@ atomic --model azure/deepseek-v4-pro:high
356
367
 
357
368
  DeepSeek V4 Pro supports `low`, `medium`, and `high` reasoning effort. Azure OpenAI models keep the `azure-openai-responses` API ID; Chat Completions models use `openai-completions`.
358
369
 
359
- Custom Azure deployments in `models.json` or extension registrations default to the Responses API when no API is specified and the model ID is not in the catalog. Set `api: "openai-completions"` at the provider or model level to use Chat Completions.
360
-
361
370
  ```bash
362
371
  export AZURE_OPENAI_API_KEY=...
363
372
  export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
@@ -372,10 +381,25 @@ export AZURE_OPENAI_API_VERSION=2024-02-01
372
381
  export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o
373
382
  ```
374
383
 
375
- `AZURE_OPENAI_API_VERSION` configures Responses requests. Chat Completions uses the normalized `/openai/v1` endpoint.
384
+ `AZURE_OPENAI_API_VERSION` configures Responses requests and defaults to `v1`. Chat Completions uses the normalized `/openai/v1` endpoint.
376
385
 
377
386
  Deployment names default to model IDs. Set `AZURE_OPENAI_DEPLOYMENT_NAME_MAP` when your deployments have different names; it applies to both APIs without changing the model ID shown in sessions.
378
387
 
388
+ Custom Azure deployments in `models.json` or extension registrations default to the Responses API when no API is specified and the model ID is not in the catalog. Set `api: "openai-completions"` at the provider or model level to use Chat Completions, for example for a Foundry model that Atomic does not include. Custom models require a `baseUrl`; `AZURE_OPENAI_BASE_URL` and `AZURE_OPENAI_RESOURCE_NAME` take priority over it when set:
389
+
390
+ ```json
391
+ {
392
+ "providers": {
393
+ "azure": {
394
+ "baseUrl": "https://your-resource.services.ai.azure.com",
395
+ "models": [
396
+ { "id": "your-deployment", "api": "openai-completions" }
397
+ ]
398
+ }
399
+ }
400
+ }
401
+ ```
402
+
379
403
  The former provider name `azure-openai-responses` remains accepted in model selections, saved sessions, and SDK lookups. Startup renames that provider in `auth.json`, `settings.json`, and `models.json`, including legacy Pi configuration paths. Existing `azure` entries win on collisions. Project configuration is migrated only after the project is trusted; session files are not rewritten. Use `azure` in new configuration.
380
404
 
381
405
  ### Amazon Bedrock
@@ -411,6 +435,8 @@ us.openai.gpt-6-astra
411
435
 
412
436
  Select them under the single `amazon-bedrock` provider. Atomic passes the chosen ID unchanged to Bedrock Converse and sends the selected `low`, `medium`, `high`, `xhigh`, or `max` setting as the OpenAI `reasoning_effort` field. The unprefixed ID is Codex's direct/Mantle entry; `global.` and `us.` are Bedrock Runtime inference profiles. Bedrock does not advertise Astra Fast, so Atomic derives no fast sibling for these models. AWS's public region and pricing pages did not list Astra when this catalog entry was added. Availability can vary by account and region, and Atomic records zero catalog cost until AWS publishes an authoritative rate.
413
437
 
438
+ Other Bedrock GPT models receive the selected thinking level as `reasoning.effort`; `minimal` maps to `low`. GPT-oss uses `reasoning_effort` and maps `minimal` to `low` and `xhigh` or `max` to `high`. For a custom application inference profile, give the model a recognizable GPT name in `models.json` so the reasoning setting is sent.
439
+
414
440
  Prompt caching is enabled automatically for Claude models whose ID contains a recognizable model name (base models and system-defined inference profiles). For application inference profiles (whose ARNs don't contain the model name), set `AWS_BEDROCK_FORCE_CACHE=1` to enable cache points:
415
441
 
416
442
  ```bash
@@ -570,7 +596,7 @@ For router-mode discovery, load/unload management, and Hugging Face downloads wi
570
596
 
571
597
  ## TypeSafe Jev
572
598
 
573
- `typesafe/jev-latest` is the built-in TypeSafe classifier. Name it explicitly in `routerModel`, `structured_output`, or `generateStructuredOutput()` when you want it. An unset or `auto` router uses the current chat model; saved credentials do not select a classifier. Jev is never an execution `auto` candidate, chat `--model`, or `/model` choice. Any other classifier works the same way only when the current model registry lists it. A models.dev listing does not register a classifier.
599
+ `typesafe/jev-latest` is the built-in TypeSafe classifier. Name it explicitly in `compactionModel`, `routerModel`, `structured_output`, or `generateStructuredOutput()` when you want it. An unset or `auto` compaction model or router uses the current chat model; saved credentials do not select a classifier. Jev is never an execution `auto` candidate, chat `--model`, or `/model` choice. Any other classifier works the same way only when the current model registry lists it. A models.dev listing does not register a classifier. See [Compaction model](/compaction#compaction-model) for verbatim classifier compaction.
574
600
 
575
601
  Use `/login typesafe` to save an API key under `typesafe` in `auth.json`, or set `TYPESAFE_API_KEY` in Atomic's process environment. Stored credentials take precedence over the environment key. `/logout typesafe` removes the saved TypeSafe credential; an environment key remains active until you unset it. Jev appears in `/login` but not `/model`, because it only makes structured decisions. Do not put the key in prompts, decision state, or `settings.json`.
576
602
 
@@ -582,6 +608,14 @@ Routers send one classify request for a registered classifier and can repair a m
582
608
 
583
609
  HTTP 401 means check the key saved through `/login typesafe` or `TYPESAFE_API_KEY`, 422 means check the question/state contract, and 429 or 529 means wait before retrying explicitly. Configured credentials do not verify access or quota. See [TypeSafe's API](https://docs.typesafe.ai/api.md) and [Choice reference](https://docs.typesafe.ai/primitives/choice.md).
584
610
 
611
+ ## Morph compaction
612
+
613
+ Use `/login morph` to save a Morph API key under `morph` in `~/.atomic/agent/auth.json`, or set `MORPH_API_KEY` in Atomic's process environment. Stored credentials take precedence over the environment key. Do not put the key in prompts or `settings.json`.
614
+
615
+ Then choose `morph/morph-compactor` through `/settings` → **Compaction model**, or set `"compactionModel": "morph/morph-compactor"` in global settings. Without credentials, the selector marks it as `requires /login morph`. Morph receives the compactable transcript, including serialized thinking; the preserved recent tail is not sent. Atomic retains the original surviving lines and enforces `<keepContext>` protection. Choose Morph only if it is permitted to receive your transcript.
616
+
617
+ Morph is a compactor, not a chat model. It does not appear in `/model` or automatic model routing. Project settings cannot select `morph/*`. Missing credentials, HTTP errors, policy refusals, or unusable results advance directly to your configured fallback models without a Morph summary request. `/logout morph` removes the saved credential; an environment key remains active until you unset it. See [Compaction model](/compaction#compaction-model).
618
+
585
619
  ## Custom Providers
586
620
 
587
621
  **Via models.json:** Add Ollama, LM Studio, vLLM, or any provider that speaks a supported API (OpenAI Completions, OpenAI Responses, Anthropic Messages, Google Generative AI). See [Custom models](/models).
@@ -144,14 +144,14 @@ When a print-mode turn correctly finishes by calling an opt-in terminating struc
144
144
 
145
145
  | Option | Description |
146
146
  |--------|-------------|
147
- | `--tools <list>`, `-t <list>` | Allowlist tool names or `*` patterns; keeps MCP tools unless an entry starts with `mcp__` |
147
+ | `--tools <list>`, `-t <list>` | Allowlist tool names or `*` patterns, or modify defaults with only `+name`/`-name` entries; an allowlist keeps MCP tools unless an entry starts with `mcp__` |
148
148
  | `--exclude-tools <list>`, `-xt <list>` | Exclude tool names or `*` patterns, including MCP tools and Intercom |
149
149
  | `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
150
150
  | `--no-tools`, `-nt` | Disable every tool, including Intercom, even with `--tools` |
151
151
 
152
152
  Default built-in tools: `read`, `bash`, `kill`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, plus `powershell` on native Windows when a PowerShell executable is available. `ls` remains available but is not a default. `defaultTools` selects initial coding tools without narrowing extension/custom tools. `--tools` selects an explicit allowlist; `--exclude-tools` subtracts from it. `--no-builtin-tools` suppresses coding defaults when no allowlist is given. The bundled Intercom extension remains loaded with `--no-extensions`, but its tool follows the allowlist, exclusions, and `--no-tools` like other extension tools.
153
153
 
154
- To add opt-in [codemode](/tools#codemode) or [tool search](/tools#tool_search) alongside defaults, use `"defaultTools": ["+codemode", "+tool_search"]` in settings. With `--tools`, include their names and every other tool you want available.
154
+ To add opt-in [codemode](/tools#codemode) or [tool search](/tools#tool_search) alongside defaults, use `atomic --tools +codemode,+tool_search` for one invocation, or `"defaultTools": ["+codemode", "+tool_search"]` in settings. `atomic --tools +codemode,-write` keeps the other defaults and disables `write`. Modifier entries take exact names, not `*` patterns, and cannot be mixed with plain allowlist entries. Use `--exclude-tools` for pattern exclusions. On `/reload`, modifiers apply to the reloaded `defaultTools` setting too, so tools removed with `-name` stay removed. Modifiers do not narrow extension/custom tools or filter MCP exposure; `--no-tools` still disables every tool.
155
155
 
156
156
  ### MCP tools
157
157
 
@@ -180,9 +180,9 @@ Specify which tools to expose by name:
180
180
  - Built-in tool names enabled by default: `read`, `bash`, `kill`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`
181
181
  - `find` discovers filesystem paths by glob; `search` searches file contents with regex patterns across files, directories, globs, and internal URLs.
182
182
  - `builtins` selects shipped packages independently of tools: keys are `workflows`, `subagents`, `mcp`, `web-access`, and `intercom`. Omitted, `{}`, and omitted keys enable packages. A `false` value removes that package's extensions and resources, including on reload; `true` enables it.
183
- - `tools` is an allowlist of coding, extension, and custom tool names. `tools: []` exposes none, including Intercom.
183
+ - `tools` accepts an allowlist of coding, extension, and custom tool names or `*` patterns. `tools: []` exposes none, including Intercom. A list containing only `+name`/`-name` entries instead changes the resolved defaults, for example `tools: ["+codemode", "-write"]`. Modifiers take exact names, cannot be mixed with plain entries, and apply to reloaded defaults too. Invalid lists throw. Extension/custom tools and MCP exposure retain their default behavior with modifiers.
184
184
  - `excludedTools` removes matching names from the registry and active selection. Exclusions win over `tools`; unknown names are ignored.
185
- - `noTools: "all"` exposes no tools, even with a nonempty `tools` allowlist. It does not remove package resources or authorize services.
185
+ - `noTools: "all"` exposes no tools, even with a nonempty `tools` allowlist or modifiers. It does not remove package resources or authorize services.
186
186
  - `noTools: "builtin"` suppresses coding-tool defaults when `tools` is omitted, keeping extension/custom tools except exclusions. An explicit `tools` list still wins over this mode.
187
187
  - Configured `defaultTools` selects initial coding tools when `tools` and `noTools` are omitted. Plain names replace the defaults; modifier-only lists such as `["-bash", "+ls"]` change the defaults, and project modifier-only lists layer over the global selection. Extension/custom tools retain their own activation behavior. See [defaultTools](/settings#tools).
188
188
 
@@ -298,7 +298,7 @@ Use `defineTool()` for standalone definitions and arrays like `customTools: [myT
298
298
 
299
299
  Custom tools passed via `customTools` are combined with extension-registered tools. Extensions loaded by the ResourceLoader can also register tools via `pi.registerTool()`.
300
300
 
301
- If you pass `tools`, include each custom or extension tool name you want enabled, for example `tools: ["read", "bash", "my_tool"]`. Use `excludedTools` to remove a custom or extension tool by name from the final exposed set.
301
+ If you pass a plain-name `tools` allowlist, include each custom or extension tool name you want enabled, for example `tools: ["read", "bash", "my_tool"]`. Modifier-only lists retain default activation and can enable inactive registered tools with `+name`. Use `excludedTools` to remove a custom or extension tool by name from the final exposed set.
302
302
 
303
303
  `ToolDefinition.constrainedSampling` is part of the public SDK and survives `defineTool()`, `customTools`, tool wrappers, session/staged inspection, and isolated execution. Use `{ type: "json_schema", strict: "prefer" | "require" }`, `{ type: "grammar", variants: { openai_lark?: string, openai_regex?: string } }`, or `false`. `prefer` can fall back; `require` fails when the active model cannot enforce strict JSON Schema. Grammar constraints require one required string parameter and capable model metadata. Public inspection preserves optional-property identity exactly: an omitted key stays absent, an explicitly present `undefined` stays present, and `false` or a config object remains unchanged. The exported `ConstrainedSamplingConfig` type and [extension reference](/extensions/authoring#constrained-sampling) define the exact shape. Typed RPC clients receive the four model capability flags through optional `ModelInfo.compat`; see [RPC](/rpc/protocol#get_available_models).
304
304
 
@@ -845,12 +845,27 @@ generateDiffString
845
845
  generateUnifiedPatch
846
846
  type EditDiffResult
847
847
 
848
+ // Session output
849
+ createTranscript
850
+ type Transcript
851
+ type TranscriptOptions
852
+ type TranscriptPart
853
+
848
854
  // Session management
849
855
  SessionManager
850
856
  SettingsManager
851
857
 
852
- // Workflow run control (session.workflows)
858
+ // Workflow run control and observation (session.workflows)
853
859
  type SessionWorkflows
860
+ type WorkflowRunControl
861
+ type WorkflowActivityFrame
862
+ type WorkflowActivityObserver
863
+ type WorkflowActivitySubscription
864
+ type WorkflowRootActivity
865
+ type WorkflowRootGraph
866
+ type WorkflowGraphNode
867
+ type WorkflowGraphNodePrompt
868
+ type WorkflowGraphRunPrompt
854
869
  type WorkflowRunSummary
855
870
  type WorkflowRunDetail
856
871
  type WorkflowRunControlOutcome