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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (652) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/README.md +8 -6
  3. package/dist/builtin/intercom/CHANGELOG.md +15 -0
  4. package/dist/builtin/intercom/broker/broker.ts +6 -4
  5. package/dist/builtin/intercom/broker/delivered-message-cache.ts +50 -4
  6. package/dist/builtin/intercom/broker/send-handler.ts +6 -4
  7. package/dist/builtin/intercom/index.bundle.mjs +89 -40
  8. package/dist/builtin/intercom/package.json +2 -2
  9. package/dist/builtin/mcp/package.json +1 -1
  10. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  11. package/dist/builtin/subagents/README.md +9 -4
  12. package/dist/builtin/subagents/package.json +3 -3
  13. package/dist/builtin/subagents/src/extension/index.bundle.mjs +163 -158
  14. package/dist/builtin/web-access/CHANGELOG.md +7 -0
  15. package/dist/builtin/web-access/index.bundle.mjs +53 -15
  16. package/dist/builtin/web-access/package.json +2 -2
  17. package/dist/builtin/workflows/CHANGELOG.md +91 -0
  18. package/dist/builtin/workflows/README.md +5 -10
  19. package/dist/builtin/workflows/builtin/adversarial-verification.js +2 -2
  20. package/dist/builtin/workflows/builtin/{chunk-94f8zfz1.js → chunk-454hz1qt.js} +1 -1
  21. package/dist/builtin/workflows/builtin/{chunk-wf876n16.js → chunk-4bwtzyjq.js} +1 -1
  22. package/dist/builtin/workflows/builtin/{chunk-kb7s3gx2.js → chunk-5eh0brtd.js} +1 -1
  23. package/dist/builtin/workflows/builtin/{chunk-nkj4qhj6.js → chunk-85mx6wcf.js} +7 -7
  24. package/dist/builtin/workflows/builtin/{chunk-3n2bnz64.js → chunk-8kkv04hz.js} +16 -16
  25. package/dist/builtin/workflows/builtin/chunk-8x61e0s7.js +3148 -0
  26. package/dist/builtin/workflows/builtin/{chunk-r97ndfvt.js → chunk-bjva9j5k.js} +1 -1
  27. package/dist/builtin/workflows/builtin/{chunk-a1ar035d.js → chunk-qdd897wm.js} +1 -1
  28. package/dist/builtin/workflows/builtin/{chunk-gyjck9z8.js → chunk-qjqn389g.js} +1 -1
  29. package/dist/builtin/workflows/builtin/{chunk-632fxeb8.js → chunk-x0vvjyzg.js} +1 -1
  30. package/dist/builtin/workflows/builtin/{chunk-ad83gc5p.js → chunk-y45tkftg.js} +11 -18
  31. package/dist/builtin/workflows/builtin/classify-and-act.js +2 -2
  32. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +2 -2
  33. package/dist/builtin/workflows/builtin/generate-and-filter.js +2 -2
  34. package/dist/builtin/workflows/builtin/goal.js +3 -3
  35. package/dist/builtin/workflows/builtin/index.js +11 -11
  36. package/dist/builtin/workflows/builtin/loop-until-done.js +2 -2
  37. package/dist/builtin/workflows/builtin/open-claude-design.js +2 -2
  38. package/dist/builtin/workflows/builtin/ralph.js +3 -3
  39. package/dist/builtin/workflows/builtin/tournament.js +2 -2
  40. package/dist/builtin/workflows/package.json +2 -2
  41. package/dist/builtin/workflows/src/authoring.d.ts +9 -12
  42. package/dist/builtin/workflows/src/durable/journal/conformance.d.ts +12 -0
  43. package/dist/builtin/workflows/src/durable/journal/internal.d.ts +1 -0
  44. package/dist/builtin/workflows/src/durable/journal/lease-expiry.d.ts +2 -0
  45. package/dist/builtin/workflows/src/durable/journal/legacy-journal-tables.d.ts +42 -0
  46. package/dist/builtin/workflows/src/durable/journal/memory-run-journal.d.ts +35 -0
  47. package/dist/builtin/workflows/src/durable/journal/resolution.d.ts +32 -0
  48. package/dist/builtin/workflows/src/durable/journal/sql-run-journal.d.ts +48 -0
  49. package/dist/builtin/workflows/src/durable/journal/sqlite-run-journal.d.ts +7 -0
  50. package/dist/builtin/workflows/src/durable/journal/types.d.ts +95 -0
  51. package/dist/builtin/workflows/src/durable/journal/values.d.ts +5 -0
  52. package/dist/builtin/workflows/src/extension/index.bundle.mjs +29515 -64826
  53. package/dist/builtin/workflows/src/index.js +10767 -45885
  54. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +8 -14
  55. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +4 -20
  56. package/dist/bun/split-loader.js +0 -13
  57. package/dist/bun/split-loader.js.map +1 -1
  58. package/dist/cli/args.d.ts +3 -0
  59. package/dist/cli/args.d.ts.map +1 -1
  60. package/dist/cli/args.js +35 -5
  61. package/dist/cli/args.js.map +1 -1
  62. package/dist/cli/session-picker.d.ts +2 -2
  63. package/dist/cli/session-picker.d.ts.map +1 -1
  64. package/dist/cli/session-picker.js +5 -5
  65. package/dist/cli/session-picker.js.map +1 -1
  66. package/dist/core/agent-session-auto-compaction.d.ts +1 -1
  67. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  68. package/dist/core/agent-session-auto-compaction.js +2 -2
  69. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  70. package/dist/core/agent-session-bash.d.ts +2 -3
  71. package/dist/core/agent-session-bash.d.ts.map +1 -1
  72. package/dist/core/agent-session-bash.js +18 -10
  73. package/dist/core/agent-session-bash.js.map +1 -1
  74. package/dist/core/agent-session-boundaries.d.ts +6 -6
  75. package/dist/core/agent-session-boundaries.d.ts.map +1 -1
  76. package/dist/core/agent-session-boundaries.js +22 -22
  77. package/dist/core/agent-session-boundaries.js.map +1 -1
  78. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  79. package/dist/core/agent-session-compaction.js +3 -2
  80. package/dist/core/agent-session-compaction.js.map +1 -1
  81. package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
  82. package/dist/core/agent-session-custom-message-commit.js +10 -12
  83. package/dist/core/agent-session-custom-message-commit.js.map +1 -1
  84. package/dist/core/agent-session-events.d.ts.map +1 -1
  85. package/dist/core/agent-session-events.js +26 -14
  86. package/dist/core/agent-session-events.js.map +1 -1
  87. package/dist/core/agent-session-export.js +1 -1
  88. package/dist/core/agent-session-export.js.map +1 -1
  89. package/dist/core/agent-session-extension-bindings.d.ts +2 -2
  90. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  91. package/dist/core/agent-session-extension-bindings.js +79 -59
  92. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  93. package/dist/core/agent-session-message-queue.d.ts +2 -2
  94. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  95. package/dist/core/agent-session-message-queue.js +17 -8
  96. package/dist/core/agent-session-message-queue.js.map +1 -1
  97. package/dist/core/agent-session-methods.d.ts +15 -15
  98. package/dist/core/agent-session-methods.d.ts.map +1 -1
  99. package/dist/core/agent-session-methods.js.map +1 -1
  100. package/dist/core/agent-session-models.d.ts +2 -2
  101. package/dist/core/agent-session-models.d.ts.map +1 -1
  102. package/dist/core/agent-session-models.js +59 -42
  103. package/dist/core/agent-session-models.js.map +1 -1
  104. package/dist/core/agent-session-persistent-custom-messages.d.ts +4 -4
  105. package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
  106. package/dist/core/agent-session-persistent-custom-messages.js +16 -17
  107. package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
  108. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  109. package/dist/core/agent-session-prompt.js +63 -23
  110. package/dist/core/agent-session-prompt.js.map +1 -1
  111. package/dist/core/agent-session-retry.d.ts.map +1 -1
  112. package/dist/core/agent-session-retry.js +17 -15
  113. package/dist/core/agent-session-retry.js.map +1 -1
  114. package/dist/core/agent-session-runtime.d.ts +7 -8
  115. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  116. package/dist/core/agent-session-runtime.js +88 -100
  117. package/dist/core/agent-session-runtime.js.map +1 -1
  118. package/dist/core/agent-session-services.d.ts +1 -1
  119. package/dist/core/agent-session-services.d.ts.map +1 -1
  120. package/dist/core/agent-session-services.js +2 -2
  121. package/dist/core/agent-session-services.js.map +1 -1
  122. package/dist/core/agent-session-summary.js +1 -1
  123. package/dist/core/agent-session-summary.js.map +1 -1
  124. package/dist/core/agent-session-tree.d.ts +1 -1
  125. package/dist/core/agent-session-tree.d.ts.map +1 -1
  126. package/dist/core/agent-session-tree.js +8 -7
  127. package/dist/core/agent-session-tree.js.map +1 -1
  128. package/dist/core/agent-session-types.d.ts +2 -0
  129. package/dist/core/agent-session-types.d.ts.map +1 -1
  130. package/dist/core/agent-session-types.js.map +1 -1
  131. package/dist/core/auth-storage-backends.d.ts +2 -0
  132. package/dist/core/auth-storage-backends.d.ts.map +1 -1
  133. package/dist/core/auth-storage-backends.js +12 -0
  134. package/dist/core/auth-storage-backends.js.map +1 -1
  135. package/dist/core/auth-storage.d.ts +5 -0
  136. package/dist/core/auth-storage.d.ts.map +1 -1
  137. package/dist/core/auth-storage.js +46 -12
  138. package/dist/core/auth-storage.js.map +1 -1
  139. package/dist/core/cache-warmer.js +1 -1
  140. package/dist/core/cache-warmer.js.map +1 -1
  141. package/dist/core/compaction/branch-summarization.d.ts +3 -5
  142. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  143. package/dist/core/compaction/branch-summarization.js +6 -10
  144. package/dist/core/compaction/branch-summarization.js.map +1 -1
  145. package/dist/core/compaction/compaction-runner.d.ts +1 -0
  146. package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
  147. package/dist/core/compaction/compaction-runner.js +4 -1
  148. package/dist/core/compaction/compaction-runner.js.map +1 -1
  149. package/dist/core/compaction/pi-summary-fallback.d.ts +2 -1
  150. package/dist/core/compaction/pi-summary-fallback.d.ts.map +1 -1
  151. package/dist/core/compaction/pi-summary-fallback.js +6 -8
  152. package/dist/core/compaction/pi-summary-fallback.js.map +1 -1
  153. package/dist/core/compaction/utils.d.ts +2 -1
  154. package/dist/core/compaction/utils.d.ts.map +1 -1
  155. package/dist/core/compaction/utils.js +32 -7
  156. package/dist/core/compaction/utils.js.map +1 -1
  157. package/dist/core/export-html/index.js +1 -1
  158. package/dist/core/export-html/index.js.map +1 -1
  159. package/dist/core/export-html/template-js/entries-navigation.js +1 -1
  160. package/dist/core/export-html/template.js +1 -1
  161. package/dist/core/extensions/api-types.d.ts +12 -12
  162. package/dist/core/extensions/api-types.d.ts.map +1 -1
  163. package/dist/core/extensions/api-types.js.map +1 -1
  164. package/dist/core/extensions/context-types.d.ts +4 -2
  165. package/dist/core/extensions/context-types.d.ts.map +1 -1
  166. package/dist/core/extensions/context-types.js.map +1 -1
  167. package/dist/core/extensions/extension-work.d.ts +1 -0
  168. package/dist/core/extensions/extension-work.d.ts.map +1 -1
  169. package/dist/core/extensions/extension-work.js +5 -1
  170. package/dist/core/extensions/extension-work.js.map +1 -1
  171. package/dist/core/extensions/index.d.ts +1 -1
  172. package/dist/core/extensions/index.d.ts.map +1 -1
  173. package/dist/core/extensions/index.js +1 -1
  174. package/dist/core/extensions/index.js.map +1 -1
  175. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  176. package/dist/core/extensions/loader-api.js +40 -42
  177. package/dist/core/extensions/loader-api.js.map +1 -1
  178. package/dist/core/extensions/loader-host-modules.d.ts +1 -1
  179. package/dist/core/extensions/loader-host-modules.d.ts.map +1 -1
  180. package/dist/core/extensions/loader-host-modules.js +6 -2
  181. package/dist/core/extensions/loader-host-modules.js.map +1 -1
  182. package/dist/core/extensions/loader-rollback.d.ts.map +1 -1
  183. package/dist/core/extensions/loader-rollback.js +1 -0
  184. package/dist/core/extensions/loader-rollback.js.map +1 -1
  185. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  186. package/dist/core/extensions/loader-virtual-modules.js +1 -0
  187. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  188. package/dist/core/extensions/runner-context.d.ts +1 -0
  189. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  190. package/dist/core/extensions/runner-context.js +10 -3
  191. package/dist/core/extensions/runner-context.js.map +1 -1
  192. package/dist/core/extensions/runner-handlers.d.ts +1 -1
  193. package/dist/core/extensions/runner-handlers.d.ts.map +1 -1
  194. package/dist/core/extensions/runner-handlers.js.map +1 -1
  195. package/dist/core/extensions/runner.d.ts +5 -2
  196. package/dist/core/extensions/runner.d.ts.map +1 -1
  197. package/dist/core/extensions/runner.js +28 -12
  198. package/dist/core/extensions/runner.js.map +1 -1
  199. package/dist/core/extensions/runtime-types.d.ts +7 -7
  200. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  201. package/dist/core/extensions/runtime-types.js.map +1 -1
  202. package/dist/core/extensions/session-events.d.ts +5 -5
  203. package/dist/core/extensions/session-events.d.ts.map +1 -1
  204. package/dist/core/extensions/session-events.js.map +1 -1
  205. package/dist/core/extensions/workflow-events.d.ts +2 -0
  206. package/dist/core/extensions/workflow-events.d.ts.map +1 -1
  207. package/dist/core/extensions/workflow-events.js.map +1 -1
  208. package/dist/core/extensions/workflow-run-control.d.ts +3 -3
  209. package/dist/core/extensions/workflow-run-control.d.ts.map +1 -1
  210. package/dist/core/extensions/workflow-run-control.js +4 -4
  211. package/dist/core/extensions/workflow-run-control.js.map +1 -1
  212. package/dist/core/fast-model-routing.d.ts.map +1 -1
  213. package/dist/core/fast-model-routing.js +1 -0
  214. package/dist/core/fast-model-routing.js.map +1 -1
  215. package/dist/core/intercom-runtime-group.js +1 -1
  216. package/dist/core/intercom-runtime-group.js.map +1 -1
  217. package/dist/core/model-config.d.ts +765 -0
  218. package/dist/core/model-config.d.ts.map +1 -1
  219. package/dist/core/model-config.js +46 -24
  220. package/dist/core/model-config.js.map +1 -1
  221. package/dist/core/model-resolver-defaults.js +5 -5
  222. package/dist/core/model-resolver-defaults.js.map +1 -1
  223. package/dist/core/model-runtime-streaming.d.ts +9 -2
  224. package/dist/core/model-runtime-streaming.d.ts.map +1 -1
  225. package/dist/core/model-runtime-streaming.js +121 -10
  226. package/dist/core/model-runtime-streaming.js.map +1 -1
  227. package/dist/core/model-runtime.d.ts +6 -0
  228. package/dist/core/model-runtime.d.ts.map +1 -1
  229. package/dist/core/model-runtime.js +103 -2
  230. package/dist/core/model-runtime.js.map +1 -1
  231. package/dist/core/provider-attribution.js +1 -1
  232. package/dist/core/provider-attribution.js.map +1 -1
  233. package/dist/core/queued-input-admission.d.ts +20 -0
  234. package/dist/core/queued-input-admission.d.ts.map +1 -0
  235. package/dist/core/queued-input-admission.js +55 -0
  236. package/dist/core/queued-input-admission.js.map +1 -0
  237. package/dist/core/resource-loader-reload.js +1 -1
  238. package/dist/core/resource-loader-reload.js.map +1 -1
  239. package/dist/core/resource-loader-types.d.ts +1 -1
  240. package/dist/core/resource-loader-types.d.ts.map +1 -1
  241. package/dist/core/resource-loader-types.js.map +1 -1
  242. package/dist/core/runtime-credentials.d.ts +1 -0
  243. package/dist/core/runtime-credentials.d.ts.map +1 -1
  244. package/dist/core/runtime-credentials.js +3 -0
  245. package/dist/core/runtime-credentials.js.map +1 -1
  246. package/dist/core/sdk-types.d.ts +4 -0
  247. package/dist/core/sdk-types.d.ts.map +1 -1
  248. package/dist/core/sdk-types.js.map +1 -1
  249. package/dist/core/sdk.d.ts +1 -1
  250. package/dist/core/sdk.d.ts.map +1 -1
  251. package/dist/core/sdk.js +145 -94
  252. package/dist/core/sdk.js.map +1 -1
  253. package/dist/core/session-lifecycle-work.d.ts +3 -0
  254. package/dist/core/session-lifecycle-work.d.ts.map +1 -1
  255. package/dist/core/session-lifecycle-work.js +2 -0
  256. package/dist/core/session-lifecycle-work.js.map +1 -1
  257. package/dist/core/session-manager-archive.d.ts +2 -16
  258. package/dist/core/session-manager-archive.d.ts.map +1 -1
  259. package/dist/core/session-manager-archive.js +8 -109
  260. package/dist/core/session-manager-archive.js.map +1 -1
  261. package/dist/core/session-manager-core.d.ts +53 -51
  262. package/dist/core/session-manager-core.d.ts.map +1 -1
  263. package/dist/core/session-manager-core.js +549 -315
  264. package/dist/core/session-manager-core.js.map +1 -1
  265. package/dist/core/session-manager-entries.d.ts.map +1 -1
  266. package/dist/core/session-manager-entries.js +5 -10
  267. package/dist/core/session-manager-entries.js.map +1 -1
  268. package/dist/core/session-manager-errors.d.ts +10 -0
  269. package/dist/core/session-manager-errors.d.ts.map +1 -0
  270. package/dist/core/session-manager-errors.js +27 -0
  271. package/dist/core/session-manager-errors.js.map +1 -0
  272. package/dist/core/session-manager-list.d.ts +1 -0
  273. package/dist/core/session-manager-list.d.ts.map +1 -1
  274. package/dist/core/session-manager-list.js +23 -25
  275. package/dist/core/session-manager-list.js.map +1 -1
  276. package/dist/core/session-manager-storage.d.ts +3 -12
  277. package/dist/core/session-manager-storage.d.ts.map +1 -1
  278. package/dist/core/session-manager-storage.js +60 -77
  279. package/dist/core/session-manager-storage.js.map +1 -1
  280. package/dist/core/session-manager-types.d.ts +4 -12
  281. package/dist/core/session-manager-types.d.ts.map +1 -1
  282. package/dist/core/session-manager-types.js +2 -1
  283. package/dist/core/session-manager-types.js.map +1 -1
  284. package/dist/core/session-manager-validation.d.ts +3 -0
  285. package/dist/core/session-manager-validation.d.ts.map +1 -1
  286. package/dist/core/session-manager-validation.js +18 -1
  287. package/dist/core/session-manager-validation.js.map +1 -1
  288. package/dist/core/session-manager.d.ts +3 -3
  289. package/dist/core/session-manager.d.ts.map +1 -1
  290. package/dist/core/session-manager.js +3 -3
  291. package/dist/core/session-manager.js.map +1 -1
  292. package/dist/core/session-mutation-queue.d.ts +3 -0
  293. package/dist/core/session-mutation-queue.d.ts.map +1 -0
  294. package/dist/core/session-mutation-queue.js +14 -0
  295. package/dist/core/session-mutation-queue.js.map +1 -0
  296. package/dist/core/session-resume-args.d.ts +4 -0
  297. package/dist/core/session-resume-args.d.ts.map +1 -0
  298. package/dist/core/session-resume-args.js +9 -0
  299. package/dist/core/session-resume-args.js.map +1 -0
  300. package/dist/core/session-storage.d.ts +26 -0
  301. package/dist/core/session-storage.d.ts.map +1 -0
  302. package/dist/core/session-storage.js +171 -0
  303. package/dist/core/session-storage.js.map +1 -0
  304. package/dist/core/session-store-list.d.ts +4 -0
  305. package/dist/core/session-store-list.d.ts.map +1 -0
  306. package/dist/core/session-store-list.js +28 -0
  307. package/dist/core/session-store-list.js.map +1 -0
  308. package/dist/core/settings-manager-basic-accessors.d.ts +0 -1
  309. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  310. package/dist/core/settings-manager-basic-accessors.js +0 -5
  311. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  312. package/dist/core/settings-merge.d.ts.map +1 -1
  313. package/dist/core/settings-merge.js +8 -2
  314. package/dist/core/settings-merge.js.map +1 -1
  315. package/dist/core/settings-schema.d.ts +76 -6
  316. package/dist/core/settings-schema.d.ts.map +1 -1
  317. package/dist/core/settings-schema.js +29 -20
  318. package/dist/core/settings-schema.js.map +1 -1
  319. package/dist/core/storage/database.d.ts +21 -0
  320. package/dist/core/storage/database.d.ts.map +1 -0
  321. package/dist/core/storage/database.js +2 -0
  322. package/dist/core/storage/database.js.map +1 -0
  323. package/dist/core/storage/errors.d.ts +64 -0
  324. package/dist/core/storage/errors.d.ts.map +1 -0
  325. package/dist/core/storage/errors.js +103 -0
  326. package/dist/core/storage/errors.js.map +1 -0
  327. package/dist/core/storage/index.d.ts +10 -0
  328. package/dist/core/storage/index.d.ts.map +1 -0
  329. package/dist/core/storage/index.js +8 -0
  330. package/dist/core/storage/index.js.map +1 -0
  331. package/dist/core/storage/node-sqlite.d.ts +7 -0
  332. package/dist/core/storage/node-sqlite.d.ts.map +1 -0
  333. package/dist/core/storage/node-sqlite.js +202 -0
  334. package/dist/core/storage/node-sqlite.js.map +1 -0
  335. package/dist/core/storage/prefix.d.ts +5 -0
  336. package/dist/core/storage/prefix.d.ts.map +1 -0
  337. package/dist/core/storage/prefix.js +15 -0
  338. package/dist/core/storage/prefix.js.map +1 -0
  339. package/dist/core/storage/provider.d.ts +58 -0
  340. package/dist/core/storage/provider.d.ts.map +1 -0
  341. package/dist/core/storage/provider.js +243 -0
  342. package/dist/core/storage/provider.js.map +1 -0
  343. package/dist/core/storage/run-journal.d.ts +93 -0
  344. package/dist/core/storage/run-journal.d.ts.map +1 -0
  345. package/dist/core/storage/run-journal.js +15 -0
  346. package/dist/core/storage/run-journal.js.map +1 -0
  347. package/dist/core/storage/schema.d.ts +3 -0
  348. package/dist/core/storage/schema.d.ts.map +1 -0
  349. package/dist/core/storage/schema.js +6 -0
  350. package/dist/core/storage/schema.js.map +1 -0
  351. package/dist/core/storage/selection.d.ts +16 -0
  352. package/dist/core/storage/selection.d.ts.map +1 -0
  353. package/dist/core/storage/selection.js +87 -0
  354. package/dist/core/storage/selection.js.map +1 -0
  355. package/dist/core/storage/session/conformance.d.ts +12 -0
  356. package/dist/core/storage/session/conformance.d.ts.map +1 -0
  357. package/dist/core/storage/session/conformance.js +674 -0
  358. package/dist/core/storage/session/conformance.js.map +1 -0
  359. package/dist/core/storage/session/entry-structure.d.ts +4 -0
  360. package/dist/core/storage/session/entry-structure.d.ts.map +1 -0
  361. package/dist/core/storage/session/entry-structure.js +83 -0
  362. package/dist/core/storage/session/entry-structure.js.map +1 -0
  363. package/dist/core/storage/session/errors.d.ts +54 -0
  364. package/dist/core/storage/session/errors.d.ts.map +1 -0
  365. package/dist/core/storage/session/errors.js +95 -0
  366. package/dist/core/storage/session/errors.js.map +1 -0
  367. package/dist/core/storage/session/jsonl-session-store.d.ts +72 -0
  368. package/dist/core/storage/session/jsonl-session-store.d.ts.map +1 -0
  369. package/dist/core/storage/session/jsonl-session-store.js +564 -0
  370. package/dist/core/storage/session/jsonl-session-store.js.map +1 -0
  371. package/dist/core/storage/session/legacy-format.d.ts +20 -0
  372. package/dist/core/storage/session/legacy-format.d.ts.map +1 -0
  373. package/dist/core/storage/session/legacy-format.js +89 -0
  374. package/dist/core/storage/session/legacy-format.js.map +1 -0
  375. package/dist/core/storage/session/legacy-session-store.d.ts +63 -0
  376. package/dist/core/storage/session/legacy-session-store.d.ts.map +1 -0
  377. package/dist/core/storage/session/legacy-session-store.js +239 -0
  378. package/dist/core/storage/session/legacy-session-store.js.map +1 -0
  379. package/dist/core/storage/session/legacy-session-summary.d.ts +11 -0
  380. package/dist/core/storage/session/legacy-session-summary.d.ts.map +1 -0
  381. package/dist/core/storage/session/legacy-session-summary.js +103 -0
  382. package/dist/core/storage/session/legacy-session-summary.js.map +1 -0
  383. package/dist/core/storage/session/memory-session-store.d.ts +33 -0
  384. package/dist/core/storage/session/memory-session-store.d.ts.map +1 -0
  385. package/dist/core/storage/session/memory-session-store.js +120 -0
  386. package/dist/core/storage/session/memory-session-store.js.map +1 -0
  387. package/dist/core/storage/session/scratch-directory.d.ts +2 -0
  388. package/dist/core/storage/session/scratch-directory.d.ts.map +1 -0
  389. package/dist/core/storage/session/scratch-directory.js +5 -0
  390. package/dist/core/storage/session/scratch-directory.js.map +1 -0
  391. package/dist/core/storage/session/session-summary.d.ts +24 -0
  392. package/dist/core/storage/session/session-summary.d.ts.map +1 -0
  393. package/dist/core/storage/session/session-summary.js +79 -0
  394. package/dist/core/storage/session/session-summary.js.map +1 -0
  395. package/dist/core/storage/session/sql-session-store.d.ts +49 -0
  396. package/dist/core/storage/session/sql-session-store.d.ts.map +1 -0
  397. package/dist/core/storage/session/sql-session-store.js +246 -0
  398. package/dist/core/storage/session/sql-session-store.js.map +1 -0
  399. package/dist/core/storage/session/types.d.ts +72 -0
  400. package/dist/core/storage/session/types.d.ts.map +1 -0
  401. package/dist/core/storage/session/types.js +2 -0
  402. package/dist/core/storage/session/types.js.map +1 -0
  403. package/dist/core/storage/session/validation.d.ts +7 -0
  404. package/dist/core/storage/session/validation.d.ts.map +1 -0
  405. package/dist/core/storage/session/validation.js +47 -0
  406. package/dist/core/storage/session/validation.js.map +1 -0
  407. package/dist/core/storage/testing.d.ts +15 -0
  408. package/dist/core/storage/testing.d.ts.map +1 -0
  409. package/dist/core/storage/testing.js +309 -0
  410. package/dist/core/storage/testing.js.map +1 -0
  411. package/dist/core/tasks/completion.d.ts.map +1 -1
  412. package/dist/core/tasks/completion.js +2 -4
  413. package/dist/core/tasks/completion.js.map +1 -1
  414. package/dist/core/tools/bash-session-environment.d.ts.map +1 -1
  415. package/dist/core/tools/bash-session-environment.js +0 -2
  416. package/dist/core/tools/bash-session-environment.js.map +1 -1
  417. package/dist/core/tools/read-url.d.ts.map +1 -1
  418. package/dist/core/tools/read-url.js +6 -1
  419. package/dist/core/tools/read-url.js.map +1 -1
  420. package/dist/core/tools/todos-model.js +3 -3
  421. package/dist/core/tools/todos-model.js.map +1 -1
  422. package/dist/core/tools/todos-mutations.js +2 -2
  423. package/dist/core/tools/todos-mutations.js.map +1 -1
  424. package/dist/core/tools/todos-render.js +1 -1
  425. package/dist/core/tools/todos-render.js.map +1 -1
  426. package/dist/core/tools/todos-storage.js +2 -2
  427. package/dist/core/tools/todos-storage.js.map +1 -1
  428. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  429. package/dist/extensions/codemode/execute.js +14 -1
  430. package/dist/extensions/codemode/execute.js.map +1 -1
  431. package/dist/extensions/codemode/tool.d.ts +1 -1
  432. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  433. package/dist/extensions/codemode/tool.js.map +1 -1
  434. package/dist/extensions/herdr/index.d.ts.map +1 -1
  435. package/dist/extensions/herdr/index.js +6 -8
  436. package/dist/extensions/herdr/index.js.map +1 -1
  437. package/dist/extensions/mcp/client/transports/streamable-http.js +9 -8
  438. package/dist/extensions/mcp/client/transports/streamable-http.js.map +1 -1
  439. package/dist/extensions/mcp/index.js +1 -1
  440. package/dist/extensions/mcp/index.js.map +1 -1
  441. package/dist/extensions/mcp/tools.d.ts.map +1 -1
  442. package/dist/extensions/mcp/tools.js +6 -1
  443. package/dist/extensions/mcp/tools.js.map +1 -1
  444. package/dist/index-extensions.d.ts +1 -1
  445. package/dist/index-extensions.d.ts.map +1 -1
  446. package/dist/index-extensions.js +1 -1
  447. package/dist/index-extensions.js.map +1 -1
  448. package/dist/index.d.ts +4 -1
  449. package/dist/index.d.ts.map +1 -1
  450. package/dist/index.js +4 -1
  451. package/dist/index.js.map +1 -1
  452. package/dist/main-session.d.ts +12 -2
  453. package/dist/main-session.d.ts.map +1 -1
  454. package/dist/main-session.js +151 -53
  455. package/dist/main-session.js.map +1 -1
  456. package/dist/main.d.ts.map +1 -1
  457. package/dist/main.js +97 -42
  458. package/dist/main.js.map +1 -1
  459. package/dist/modes/interactive/components/chat-session-host-actions.d.ts +4 -0
  460. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  461. package/dist/modes/interactive/components/chat-session-host-actions.js +104 -30
  462. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  463. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  464. package/dist/modes/interactive/components/chat-session-host-events.js +1 -0
  465. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  466. package/dist/modes/interactive/components/chat-session-host-state.d.ts +4 -0
  467. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  468. package/dist/modes/interactive/components/chat-session-host-state.js +4 -0
  469. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  470. package/dist/modes/interactive/components/chat-session-host.d.ts +3 -1
  471. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  472. package/dist/modes/interactive/components/chat-session-host.js +18 -5
  473. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  474. package/dist/modes/interactive/components/extension-input.d.ts +1 -1
  475. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
  476. package/dist/modes/interactive/components/extension-input.js +2 -2
  477. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  478. package/dist/modes/interactive/components/host-session-picker.js +1 -1
  479. package/dist/modes/interactive/components/host-session-picker.js.map +1 -1
  480. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  481. package/dist/modes/interactive/components/scoped-models-selector.js +9 -5
  482. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  483. package/dist/modes/interactive/components/session-selector-delete.d.ts +1 -1
  484. package/dist/modes/interactive/components/session-selector-delete.d.ts.map +1 -1
  485. package/dist/modes/interactive/components/session-selector-delete.js.map +1 -1
  486. package/dist/modes/interactive/components/session-selector-list.d.ts +12 -9
  487. package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
  488. package/dist/modes/interactive/components/session-selector-list.js +27 -25
  489. package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
  490. package/dist/modes/interactive/components/session-selector.d.ts +8 -4
  491. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  492. package/dist/modes/interactive/components/session-selector.js +31 -21
  493. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  494. package/dist/modes/interactive/components/tree-selector-component.d.ts +5 -1
  495. package/dist/modes/interactive/components/tree-selector-component.d.ts.map +1 -1
  496. package/dist/modes/interactive/components/tree-selector-component.js +20 -3
  497. package/dist/modes/interactive/components/tree-selector-component.js.map +1 -1
  498. package/dist/modes/interactive/interactive-bash-compact.js +1 -1
  499. package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
  500. package/dist/modes/interactive/interactive-deferred-startup.js +2 -2
  501. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  502. package/dist/modes/interactive/interactive-editor-actions.js +2 -2
  503. package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
  504. package/dist/modes/interactive/interactive-extension-runtime.js +2 -0
  505. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  506. package/dist/modes/interactive/interactive-input-handling.js +14 -6
  507. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  508. package/dist/modes/interactive/interactive-mode-base.d.ts +4 -0
  509. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  510. package/dist/modes/interactive/interactive-mode-base.js +6 -1
  511. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  512. package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
  513. package/dist/modes/interactive/interactive-mode-helpers.js +7 -3
  514. package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
  515. package/dist/modes/interactive/interactive-mode-surface.d.ts +5 -5
  516. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  517. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  518. package/dist/modes/interactive/interactive-model-routing.js +12 -7
  519. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  520. package/dist/modes/interactive/interactive-process-lifecycle.js +8 -2
  521. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  522. package/dist/modes/interactive/interactive-queueing.js +94 -70
  523. package/dist/modes/interactive/interactive-queueing.js.map +1 -1
  524. package/dist/modes/interactive/interactive-selectors.js +2 -2
  525. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  526. package/dist/modes/interactive/interactive-session-routing.js +38 -14
  527. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  528. package/dist/modes/interactive/interactive-session-runtime.js +7 -0
  529. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  530. package/dist/modes/interactive/interactive-slash-commands.js +5 -3
  531. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  532. package/dist/modes/interactive/interactive-tui.d.ts +1 -0
  533. package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
  534. package/dist/modes/interactive/interactive-tui.js +9 -2
  535. package/dist/modes/interactive/interactive-tui.js.map +1 -1
  536. package/dist/modes/interactive/program-status-reporter.d.ts +4 -0
  537. package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -1
  538. package/dist/modes/interactive/program-status-reporter.js +45 -6
  539. package/dist/modes/interactive/program-status-reporter.js.map +1 -1
  540. package/dist/modes/interactive-engine/create-isolated-runtime.d.ts.map +1 -1
  541. package/dist/modes/interactive-engine/create-isolated-runtime.js +8 -1
  542. package/dist/modes/interactive-engine/create-isolated-runtime.js.map +1 -1
  543. package/dist/modes/interactive-engine/engine-args.d.ts.map +1 -1
  544. package/dist/modes/interactive-engine/engine-args.js +11 -4
  545. package/dist/modes/interactive-engine/engine-args.js.map +1 -1
  546. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +2 -1
  547. package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
  548. package/dist/modes/interactive-engine/extension-ui-bridge.js +9 -1
  549. package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
  550. package/dist/modes/interactive-engine/isolated-runtime.d.ts +1 -1
  551. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  552. package/dist/modes/interactive-engine/isolated-runtime.js +99 -74
  553. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  554. package/dist/modes/interactive-engine/protocol.d.ts +4 -0
  555. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  556. package/dist/modes/interactive-engine/protocol.js +39 -1
  557. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  558. package/dist/modes/rpc/rpc-bash-request-owners.js +1 -1
  559. package/dist/modes/rpc/rpc-bash-request-owners.js.map +1 -1
  560. package/dist/modes/rpc/rpc-client-api.d.ts +1 -1
  561. package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
  562. package/dist/modes/rpc/rpc-client-api.js +2 -2
  563. package/dist/modes/rpc/rpc-client-api.js.map +1 -1
  564. package/dist/modes/rpc/rpc-client-process.d.ts +2 -2
  565. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  566. package/dist/modes/rpc/rpc-client-process.js +20 -7
  567. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  568. package/dist/modes/rpc/rpc-client.d.ts +4 -1
  569. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  570. package/dist/modes/rpc/rpc-client.js +6 -2
  571. package/dist/modes/rpc/rpc-client.js.map +1 -1
  572. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  573. package/dist/modes/rpc/rpc-command-handler.js +12 -9
  574. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  575. package/dist/modes/rpc/rpc-provider-auth.js +2 -2
  576. package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
  577. package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
  578. package/dist/modes/rpc/rpc-session-binding.js +10 -0
  579. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  580. package/dist/modes/rpc/rpc-terminal-drain.d.ts.map +1 -1
  581. package/dist/modes/rpc/rpc-terminal-drain.js +11 -2
  582. package/dist/modes/rpc/rpc-terminal-drain.js.map +1 -1
  583. package/dist/modes/rpc/rpc-types.d.ts +6 -2
  584. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  585. package/dist/modes/rpc/rpc-types.js.map +1 -1
  586. package/dist/utils/canonical-path.d.ts +5 -0
  587. package/dist/utils/canonical-path.d.ts.map +1 -0
  588. package/dist/utils/canonical-path.js +26 -0
  589. package/dist/utils/canonical-path.js.map +1 -0
  590. package/dist/utils/paths.d.ts +1 -7
  591. package/dist/utils/paths.d.ts.map +1 -1
  592. package/dist/utils/paths.js +1 -15
  593. package/dist/utils/paths.js.map +1 -1
  594. package/docs/codemode.md +2 -0
  595. package/docs/compaction.md +2 -2
  596. package/docs/custom-provider/oauth.md +2 -2
  597. package/docs/custom-provider/override.md +3 -3
  598. package/docs/custom-provider/registration.md +7 -7
  599. package/docs/custom-provider/streaming.md +1 -1
  600. package/docs/custom-provider.md +5 -5
  601. package/docs/docs.json +7 -2
  602. package/docs/environment-variables.md +10 -2
  603. package/docs/extensions/api-reference.md +40 -19
  604. package/docs/extensions/authoring.md +1 -1
  605. package/docs/extensions/events.md +12 -8
  606. package/docs/extensions.md +2 -2
  607. package/docs/getting-started/installation.md +2 -4
  608. package/docs/json.md +1 -1
  609. package/docs/llama-cpp.md +94 -1
  610. package/docs/models/reference.md +2 -0
  611. package/docs/models-configuration.md +206 -0
  612. package/docs/models.md +11 -1
  613. package/docs/packages/authoring.md +1 -1
  614. package/docs/providers.md +9 -5
  615. package/docs/quickstart.md +2 -1
  616. package/docs/reference/cli.md +7 -3
  617. package/docs/rpc/protocol.md +10 -4
  618. package/docs/sdk/reference.md +16 -14
  619. package/docs/sdk/web-server.md +6 -7
  620. package/docs/sdk.md +67 -27
  621. package/docs/session-format.md +35 -34
  622. package/docs/sessions.md +52 -17
  623. package/docs/settings.md +35 -22
  624. package/docs/storage.md +387 -0
  625. package/docs/subagents.md +19 -6
  626. package/docs/usage.md +5 -2
  627. package/docs/workflows/api-reference.md +88 -62
  628. package/docs/workflows/authoring.md +2 -1
  629. package/docs/workflows/operations.md +32 -174
  630. package/docs/workflows/reliable-design.md +17 -17
  631. package/examples/extensions/bookmark.ts +2 -2
  632. package/examples/extensions/handoff.ts +2 -2
  633. package/examples/extensions/plan-mode/index.ts +15 -13
  634. package/examples/extensions/preset.ts +8 -8
  635. package/examples/extensions/session-name.ts +1 -1
  636. package/examples/extensions/snake.ts +3 -1
  637. package/examples/extensions/space-invaders.ts +3 -1
  638. package/examples/extensions/tic-tac-toe.ts +80 -80
  639. package/examples/sdk/11-sessions.ts +5 -5
  640. package/examples/sdk/13-session-runtime.ts +7 -7
  641. package/examples/sdk/README.md +1 -1
  642. package/npm-shrinkwrap.json +53 -469
  643. package/package.json +17 -9
  644. package/schemas/models.schema.json +62 -29
  645. package/schemas/settings.schema.json +138 -27
  646. package/dist/builtin/workflows/builtin/chunk-x6az1sxp.js +0 -8
  647. package/dist/builtin/workflows/builtin/chunk-ymwq372z.js +0 -11609
  648. package/dist/core/session-manager-migrations.d.ts +0 -11
  649. package/dist/core/session-manager-migrations.d.ts.map +0 -1
  650. package/dist/core/session-manager-migrations.js +0 -80
  651. package/dist/core/session-manager-migrations.js.map +0 -1
  652. package/docs/nvidia-rtx-llama-cpp.md +0 -101
@@ -0,0 +1,206 @@
1
+ ---
2
+ title: Models Configuration
3
+ sidebarTitle: "models.json fields"
4
+ description: Every provider, model, override, and compatibility field accepted in models.json, generated from the schema.
5
+ ---
6
+
7
+ # Models Configuration
8
+
9
+ {/* This file is generated from TypeScript source. Do not edit it manually; run npm run generate:references --workspace=@bastani/atomic. */}
10
+
11
+ This reference lists the fields of `models.json`. See [Custom Models](/models) for examples and the file location (normally `~/.atomic/agent/models.json`).
12
+
13
+ Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json"` to `models.json` for editor validation and completion.
14
+
15
+ ## Providers
16
+
17
+ Each key under `providers` is a provider ID. A built-in provider ID changes that provider. Any other ID adds a provider, which needs `baseUrl` and an `api` at provider or model level.
18
+
19
+ | Field | Type | Default | Description |
20
+ |---|---|---|---|
21
+ | `name` | string | | Display name. |
22
+ | `baseUrl` | string | | API base URL. Also applies to the provider's built-in models. |
23
+ | `apiKey` | string | | Literal key, "$NAME" environment interpolation, or "!command" output. |
24
+ | `api` | string | | API for the provider's models, such as "openai-completions", "openai-responses", "anthropic-messages", or "google-generative-ai". |
25
+ | `oauth` | `"radius"` | | OAuth login flow. Requires baseUrl. |
26
+ | `headers` | object | | Request headers. Values resolve like apiKey. |
27
+ | `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
28
+ | `authHeader` | boolean | `false` | Whether to send the resolved API key as Authorization: Bearer. |
29
+ | `models` | [`object[]`](#models) | | |
30
+ | `modelOverrides` | [object](#model-overrides) | | |
31
+
32
+ ## Models
33
+
34
+ Each `models` entry adds a model to the provider. An entry whose `id` matches an existing model replaces it.
35
+
36
+ | Field | Type | Default | Description |
37
+ |---|---|---|---|
38
+ | `id` | string | | Required. Model ID sent to the API. |
39
+ | `name` | string | | Display name, also matched by --model patterns. |
40
+ | `api` | string | | Overrides the provider api. |
41
+ | `baseUrl` | string | | Overrides the provider baseUrl. |
42
+ | `reasoning` | boolean | `false` | Whether the model supports thinking. |
43
+ | `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
44
+ | `input` | `("text" \| "image" \| "pdf")[]` | `["text"]` | |
45
+ | `inputLimits` | [object](#input-limits) | | |
46
+ | `cost` | object | | |
47
+ | `cost.input` | number | | Required. Input cost in USD per million tokens. |
48
+ | `cost.output` | number | | Required. Output cost in USD per million tokens. |
49
+ | `cost.cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
50
+ | `cost.cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
51
+ | `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
52
+ | `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
53
+ | `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
54
+ | `cost.tiers[].output` | number | | Required. Output cost in USD per million tokens. |
55
+ | `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
56
+ | `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
57
+ | `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Atomic warms only tiers with a known lifetime. |
58
+ | `contextWindow` | number | `128000` | Context window in tokens. |
59
+ | `maxTokens` | number | `16384` | Maximum output tokens. |
60
+ | `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
61
+ | `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
62
+ | `headers` | object | | Request headers. Values resolve like apiKey. |
63
+ | `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
64
+
65
+ ## Model overrides
66
+
67
+ Each `modelOverrides` key is the ID of a built-in or extension model. Unknown IDs are ignored. Object fields, such as `cost`, merge with the model's value field by field; other fields replace it.
68
+
69
+ | Field | Type | Default | Description |
70
+ |---|---|---|---|
71
+ | `name` | string | | Display name, also matched by --model patterns. |
72
+ | `reasoning` | boolean | | Whether the model supports thinking. |
73
+ | `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
74
+ | `input` | `("text" \| "image" \| "pdf")[]` | | |
75
+ | `inputLimits` | [object](#input-limits) | | |
76
+ | `cost` | object | | |
77
+ | `cost.input` | number | | Input cost in USD per million tokens. |
78
+ | `cost.output` | number | | Output cost in USD per million tokens. |
79
+ | `cost.cacheRead` | number | | Cache-read cost in USD per million tokens. |
80
+ | `cost.cacheWrite` | number | | Cache-write cost in USD per million tokens. |
81
+ | `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
82
+ | `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
83
+ | `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
84
+ | `cost.tiers[].output` | number | | Required. Output cost in USD per million tokens. |
85
+ | `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
86
+ | `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
87
+ | `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Atomic warms only tiers with a known lifetime. |
88
+ | `contextWindow` | number | | Context window in tokens. |
89
+ | `maxTokens` | number | | Maximum output tokens. |
90
+ | `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
91
+ | `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
92
+ | `headers` | object | | Request headers. Values resolve like apiKey. |
93
+ | `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
94
+
95
+ ## Input limits
96
+
97
+ See [Image Input Limits](/models/reference#image-input-limits).
98
+
99
+ | Field | Type | Default | Description |
100
+ |---|---|---|---|
101
+ | `maxRequestBytes` | integer | | Maximum serialized provider request size in bytes. |
102
+ | `images` | object | | |
103
+ | `images.resize` | object | | Cache-safe resize profile applied before a new image enters conversation history. |
104
+ | `images.resize.maxWidth` | integer | | |
105
+ | `images.resize.maxHeight` | integer | | |
106
+ | `images.resize.maxBytes` | integer | | Maximum base64-encoded payload size in bytes. |
107
+ | `images.resize.jpegQuality` | integer | | |
108
+ | `images.maxPerMessage` | integer | | Maximum images accepted in one provider message. |
109
+ | `images.maxPerRequest` | integer | | Maximum images accepted across one provider request. |
110
+
111
+ ## Compatibility
112
+
113
+ `compat` describes verified differences from an API's standard request and response behavior. Model values override provider values per field. The fields that apply depend on the model's `api`.
114
+
115
+ ### `openai-completions`
116
+
117
+ | Field | Type | Default | Description |
118
+ |---|---|---|---|
119
+ | `supportsStore` | boolean | | Whether the provider supports the store field. Default: auto-detected from URL. |
120
+ | `supportsDeveloperRole` | boolean | | Whether the provider supports the developer role instead of system. Default: auto-detected from URL. |
121
+ | `supportsReasoningEffort` | boolean | | Whether the provider supports reasoning_effort. Default: auto-detected from URL. |
122
+ | `supportsTemperature` | boolean | `true` | Whether the model accepts the temperature request field. When false, the provider omits temperature and also strips temperature, top_p, and top_k from samplingParams. |
123
+ | `supportsForcedToolChoice` | boolean | `true` | Whether the model accepts forced tool use (tool_choice "required" or a specific function). When false, the provider rejects a forced choice with an error instead of sending a request the model cannot honor. "auto" and "none" are never altered. |
124
+ | `supportsUsageInStreaming` | boolean | `true` | Whether the provider supports stream_options.include_usage for token usage in streaming responses. |
125
+ | `supportsFinishReason` | boolean | `true` | Whether streamed responses include finish_reason. When false, Atomic infers stop or toolUse when the stream ends. |
126
+ | `maxTokensField` | `"max_completion_tokens" \| "max_tokens"` | | Which field to use for max tokens. Default: auto-detected from URL. |
127
+ | `requiresToolResultName` | boolean | | Whether tool results require the name field. Default: auto-detected from URL. |
128
+ | `requiresAssistantAfterToolResult` | boolean | | Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL. |
129
+ | `requiresThinkingAsText` | boolean | | Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL. |
130
+ | `requiresReasoningContentOnAssistantMessages` | boolean | | Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL. |
131
+ | `thinkingFormat` | `"openai" \| "openrouter" \| "deepseek" \| "together" \| "baseten" \| "zai" \| "qwen" \| "chat-template" \| "qwen-chat-template" \| "string-thinking" \| "ant-ling"` | | Format for reasoning or thinking parameters. When omitted, Atomic auto-detects the format from the provider URL. "openai" uses reasoning_effort, "openrouter" uses reasoning.effort, "deepseek" uses thinking.type plus reasoning_effort when supported, "together" uses reasoning.enabled plus reasoning_effort when supported, "baseten" uses configurable chat_template_args plus reasoning_effort when supported, "zai" uses thinking.type, "qwen" uses top-level enable_thinking, "qwen-chat-template" uses chat_template_kwargs.enable_thinking and preserve_thinking, "chat-template" uses configurable chat_template_kwargs, "string-thinking" uses top-level thinking, and "ant-ling" uses reasoning.effort only when the mapped effort is non-null. |
132
+ | `chatTemplateKwargs` | object | | Kwargs sent as chat_template_kwargs when thinkingFormat is "chat-template". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for Atomic-controlled values. |
133
+ | `chatTemplateArgs` | object | | Arguments sent as chat_template_args when thinkingFormat is "baseten". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for Atomic-controlled values. |
134
+ | `openRouterRouting` | object | | OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection. |
135
+ | `vercelGatewayRouting` | object | | Vercel AI Gateway routing preferences. Controls which upstream providers the gateway routes requests to. See https://vercel.com/docs/ai-gateway/models-and-providers/provider-options. |
136
+ | `zaiToolStream` | boolean | `false` | Whether z.ai supports top-level tool_stream for streaming tool call deltas. |
137
+ | `thinkingTokenBudgetField` | `"thinking_token_budget" \| "thinking_budget" \| "thinking_budget_tokens"` | | Top-level request field used to cap reasoning tokens from thinkingBudgets. Reasoning and the answer share max_tokens on these endpoints. "thinking_token_budget" is vLLM, "thinking_budget" is Qwen, DashScope, or SGLang, and "thinking_budget_tokens" is llama.cpp. Off by default and not set on the generated catalog. |
138
+ | `supportsThinkingTokenBudget` | boolean | `false` | Alias for thinkingTokenBudgetField: "thinking_token_budget" (vLLM). Prefer thinkingTokenBudgetField. |
139
+ | `supportsOpenAIGrammarTools` | boolean | `false` | Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
140
+ | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
141
+ | `supportsMidConvoToolAdditions` | boolean | `false` | Whether system messages can introduce additional tools mid-conversation. Requires supportsMidConvoSystemMessages. The generated catalog enables this for capable models. |
142
+ | `supportsStrictMode` | boolean | `false` | Whether the provider supports the strict field in tool definitions. Generated capable models enable it explicitly. |
143
+ | `cacheControlFormat` | `"anthropic"` | | Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content. |
144
+ | `sendSessionAffinityHeaders` | boolean | | Whether to send session-affinity data from options.sessionId. Default: true for OpenRouter endpoints, false otherwise. |
145
+ | `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
146
+ | `supportsLongCacheRetention` | boolean | | Whether the provider supports long prompt cache retention (prompt_cache_retention: "24h" or Anthropic-style cache_control.ttl: "1h", depending on format). Default: auto-detected from provider and URL. |
147
+ | `vllmPriority` | number | | vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog. |
148
+
149
+ ### `openai-responses`
150
+
151
+ Also applies to `azure-openai-responses` and `openai-codex-responses`.
152
+
153
+ | Field | Type | Default | Description |
154
+ |---|---|---|---|
155
+ | `supportsDeveloperRole` | boolean | `true` | Whether the provider supports the developer role instead of system. |
156
+ | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts developer or system messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
157
+ | `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
158
+ | `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: "30m" on GPT-5.6+ and prompt_cache_retention: "24h" on earlier models. |
159
+ | `supportsStrictMode` | boolean | | Whether the provider supports strict JSON-schema function tools. Defaults are API-specific; generated OpenAI models enable it explicitly. |
160
+ | `supportsOpenAIGrammarTools` | boolean | `false` | Whether to emit OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
161
+ | `supportsAdditionalTools` | boolean | `false` | Whether the model supports message-anchored additional_tools input items. |
162
+ | `supportsToolSearch` | boolean | `false` | Whether the model supports client-executed tool search for transcript-anchored additions. |
163
+ | `supportsExplicitPromptCacheMode` | boolean | `false` | Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter. |
164
+ | `supportsMidConvoEffort` | boolean | `false` | Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Only used by the openai-responses API, and ignored with Sign in with ChatGPT on the openai provider. |
165
+ | `supportsMaxOutputTokens` | boolean | `true` | Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it. |
166
+
167
+ ### `anthropic-messages`
168
+
169
+ | Field | Type | Default | Description |
170
+ |---|---|---|---|
171
+ | `supportsEagerToolInputStreaming` | boolean | `true` | Whether the provider accepts per-tool eager_input_streaming. When false, the Anthropic provider omits tools[].eager_input_streaming and sends the legacy fine-grained-tool-streaming-2025-05-14 beta header for tool-enabled requests. |
172
+ | `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports Anthropic long cache retention through cache_control.ttl. |
173
+ | `sendSessionAffinityHeaders` | boolean | | Whether to send x-session-affinity from options.sessionId when caching is enabled. Required for providers like Fireworks that use session affinity for prompt cache routing; requests to the same replica maximize cache hits. Default: true for OpenRouter endpoints, false otherwise. |
174
+ | `sessionAffinityFormat` | `"openrouter"` | | Session-affinity format. openrouter sends x-session-id; when unset, sends x-session-affinity. |
175
+ | `supportsCacheControlOnTools` | boolean | `true` | Whether the provider supports Anthropic-style cache_control markers on tool definitions. When false, cache_control is omitted from tool parameters. Some Anthropic-compatible providers, such as Fireworks, do not support this field on tools and may reject or ignore it. |
176
+ | `supportsTemperature` | boolean | `true` | Whether the model accepts the Anthropic temperature request field. Claude Opus 4.7+ rejects non-default values. |
177
+ | `forceAdaptiveThinking` | boolean | `false` | Whether to force adaptive thinking (thinking.type: adaptive plus output_config.effort) regardless of model ID. Built-in models that require adaptive thinking set this in generated metadata. Custom Anthropic-compatible providers can set this to true for any model whose upstream requires the adaptive format. Set false to opt out on overridden built-in models. |
178
+ | `allowEmptySignature` | boolean | `false` | Whether to replay empty thinking signatures instead of converting thinking to text. |
179
+ | `supportsStrictTools` | boolean | `false` | Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly. |
180
+ | `supportsMidConvoEffort` | boolean | `false` | Whether the exact model transport supports effort-only system messages and thinking binding controls. |
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
+ | `supportsMidConvoToolChanges` | boolean | `false` | Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages. |
183
+ | `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
+ | `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
+ | `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. |
186
+ | `supportsForcedToolChoice` | boolean | `true` | Whether the model accepts forced tool use (tool_choice "any" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request the model is guaranteed to refuse. "auto" and "none" are never altered. |
187
+
188
+ ### `bedrock-converse-stream`
189
+
190
+ | Field | Type | Default | Description |
191
+ |---|---|---|---|
192
+ | `supportsStrictMode` | boolean | `false` | Whether the model supports Bedrock strict tool schemas. |
193
+ | `supportsForcedToolChoice` | boolean | `true` | Whether the model accepts forced tool use (toolChoice "any" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request that is guaranteed to fail. "auto" and "none" are never altered. |
194
+ | `supportsTemperature` | boolean | `true` | Whether the model accepts inferenceConfig.temperature. When false, the provider omits the field. |
195
+
196
+ ### `mistral-conversations`
197
+
198
+ | Field | Type | Default | Description |
199
+ |---|---|---|---|
200
+ | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message. |
201
+
202
+ ### Atomic compatibility aliases
203
+
204
+ | Field | Type | Default | Description |
205
+ |---|---|---|---|
206
+ | `supportsGrammarTools` | boolean | | Atomic alias for supportsOpenAIGrammarTools. The canonical field wins if both are set. |
package/docs/models.md CHANGED
@@ -19,7 +19,7 @@ For editor completion and validation of providers, models, and `compat` fields,
19
19
 
20
20
  ## Where to go next
21
21
 
22
- This page shows minimal and full `models.json` examples you can copy. Every field, override, derived variant, and API compatibility contract lives in the [Model configuration reference](/models/reference).
22
+ This page shows minimal and full `models.json` examples you can copy. [Models Configuration](/models-configuration) lists every provider, model, override, and compatibility field directly from the schema. For extended examples, derived variants, and API behavior, see the [Model configuration guide](/models/reference).
23
23
 
24
24
  For choosing which model to use rather than how to declare one, see [Model selection](/models/model-selection).
25
25
 
@@ -71,6 +71,16 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model:
71
71
 
72
72
  The `apiKey` is required but Ollama ignores it, so any value works.
73
73
 
74
+ To route a built-in provider through a proxy, set only its `baseUrl`. Its models and authentication stay unchanged:
75
+
76
+ ```json
77
+ {
78
+ "providers": {
79
+ "anthropic": { "baseUrl": "https://proxy.example.com/v1" }
80
+ }
81
+ }
82
+ ```
83
+
74
84
  Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so Atomic sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
75
85
 
76
86
  You can set `compat` at the provider level to apply to all models, or at the model level to override a specific model. This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers.
@@ -87,7 +87,7 @@ If no app manifest (`atomic`, or legacy `pi`) is present, Atomic auto-discovers
87
87
 
88
88
  Workflow files import `workflow` from `@bastani/atomic/workflows`, import `Type` from `typebox`, and export the definition returned by `workflow({ ... })`. TypeScript resolves the published `@bastani/atomic/workflows` specifier through the `@bastani/atomic` package.
89
89
 
90
- The host supports `typebox`, `typebox/compile`, `typebox/value`, and legacy `@sinclair/typebox` imports. See [Programmatic usage](/workflows/api-reference#programmatic-usage).
90
+ Workflow files support `typebox`, `typebox/compile`, and `typebox/value`. Use these current imports even when an extension in the same package uses the host's additional schema aliases. See [Programmatic usage](/workflows/api-reference#programmatic-usage).
91
91
 
92
92
  When a package manifest exists, declared resource arrays normally define what loads. Workflows are the exception: if `atomic.workflows` / legacy `pi.workflows` is omitted, Atomic still checks conventional `workflows/` and `workflow/` directories.
93
93
 
package/docs/providers.md CHANGED
@@ -53,6 +53,10 @@ Atomic refreshes a stored OAuth token when fewer than **five minutes** of validi
53
53
 
54
54
  Concurrent sessions sharing `auth.json`, including workflow stages and subagents, coordinate token refresh rather than rotating the same credential independently.
55
55
 
56
+ Running sessions pick up changes to `auth.json` made by another Atomic window, `atomic auth`, or another process's token refresh without restarting. This applies to extension-provided OAuth too. Refresh runs automatically through the shared credential store; a failed refresh is reported as an OAuth error rather than starting a new login flow. Sign in again with `/login <provider>` if the provider has revoked access.
57
+
58
+ If a chat request is rejected with HTTP 401 or an invalid/revoked-token error before any response content arrives, Atomic rereads credentials and retries once only if the effective credential changed. It does not repeatedly retry the same rejected token or replay a partially delivered response. Explicit request credentials and runtime API-key overrides still take precedence over the auth file.
59
+
56
60
  ### Verify Readiness Before a Session
57
61
 
58
62
  Run `atomic auth check --provider <provider>` to verify the effective credential a provider would use without starting a session. You can pass `--model <model>` instead, including a `provider/model` ID, when that is the value your automation already has. The command prints `ready`, `not_ready`, or `invalid`; `--json` adds the resolved provider when one is found, credential type, and reason for a non-ready result.
@@ -82,7 +86,7 @@ OpenAI's image models (`openai-images`, such as `openai-images/gpt-image-2.5-fla
82
86
  - Requires ChatGPT Plus or Pro subscription
83
87
  - Officially endorsed by OpenAI: [Codex for OSS](https://developers.openai.com/community/codex-for-oss)
84
88
 
85
- 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.
89
+ If the Codex backend reports that an OAuth/auth token was invalidated or revoked, Atomic first checks for credentials saved elsewhere as described above. If the rejection 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.
86
90
 
87
91
  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.
88
92
 
@@ -385,10 +389,10 @@ The providers below have additional setup, need additional settings, or can use
385
389
 
386
390
  ### NVIDIA NIM
387
391
 
388
- NVIDIA's built-in default is `nvidia/nemotron-3-ultra-550b-a55b`. Saved and explicit model choices still take precedence. To select this model explicitly:
392
+ NVIDIA's built-in default is `nvidia/nemotron-3.5-super-vl-120b-a12b`. Saved and explicit model choices still take precedence. To select this model explicitly:
389
393
 
390
394
  ```bash
391
- atomic --provider nvidia --model nvidia/nemotron-3-ultra-550b-a55b
395
+ atomic --provider nvidia --model nvidia/nemotron-3.5-super-vl-120b-a12b
392
396
  ```
393
397
 
394
398
  Use `--list-models` or `/model` to check the current catalog and replace a missing saved model. A catalog listing does not verify account access or serving availability.
@@ -562,8 +566,8 @@ export default {
562
566
  extensionFactories: [
563
567
  {
564
568
  name: "cloudflare-gateway-binding",
565
- factory: (pi) => {
566
- pi.registerProvider("cloudflare-ai-gateway", {
569
+ factory: async (pi) => {
570
+ await pi.registerProvider("cloudflare-ai-gateway", {
567
571
  // Placeholder credential: it marks the provider configured and becomes
568
572
  // `cf-aig-authorization: Bearer cloudflare-gateway-binding`. On the plain
569
573
  // binding fetch path, Cloudflare's gateway recognizes and strips it.
@@ -154,7 +154,8 @@ Sessions are saved automatically:
154
154
  atomic -c # Continue most recent session
155
155
  atomic -r # Browse previous sessions
156
156
  atomic --name "my task" # Set session display name at startup
157
- atomic --session <path|id> # Open a specific session
157
+ atomic --session <id|prefix> # Open an exact ID or unique 8-hex UUID prefix
158
+ atomic --import <file> # Import a format-4 JSONL export
158
159
  ```
159
160
 
160
161
  Inside Atomic, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.
@@ -133,13 +133,18 @@ When a print-mode turn correctly finishes by calling an opt-in terminating struc
133
133
  |--------|-------------|
134
134
  | `-c`, `--continue` | Continue the most recent session |
135
135
  | `-r`, `--resume` | Browse and select a session |
136
- | `--session <path\|id>` | Use a session file, exact ID, or unique 8-hex UUID prefix |
136
+ | `--session <id\|prefix>` | Use an exact ID or unique 8-hex UUID prefix |
137
+ | `--import <file>` | Import a format-4 JSONL export into session storage |
137
138
  | `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
138
- | `--fork <path\|id>` | Fork a session file, exact ID, or unique 8-hex UUID prefix into a new session |
139
+ | `--fork <id\|prefix>` | Fork an exact ID or unique 8-hex UUID prefix into a new session |
139
140
  | `--session-dir <dir>` | Custom session storage directory |
141
+ | `--session-store <path>` | Select a SQLite session database; relative paths resolve from the working directory |
142
+ | `--session-prefix <prefix>` | Use a non-default table prefix with `--session-store` |
140
143
  | `--name <name>`, `-n <name>` | Set the session display name |
141
144
  | `--no-session` | Ephemeral mode; do not save |
142
145
 
146
+ See [Choosing a store](/sessions#choosing-a-store) for precedence, prefix rules, and conflicts.
147
+
143
148
  ## Tool Options
144
149
 
145
150
  | Option | Description |
@@ -261,7 +266,6 @@ Every bash execution receives one execution-time snapshot of the active session.
261
266
  | Atomic variable | Exact compatibility alias | Value |
262
267
  |-----------------|---------------------------|-------|
263
268
  | `ATOMIC_SESSION_ID` | `PI_SESSION_ID` | Active session ID |
264
- | `ATOMIC_SESSION_FILE` | `PI_SESSION_FILE` | Active session JSONL path; omitted for unsaved sessions |
265
269
  | `ATOMIC_PROVIDER` | `PI_PROVIDER` | Active model provider; omitted when no model is selected |
266
270
  | `ATOMIC_MODEL` | `PI_MODEL` | Active model ID; omitted when no model is selected |
267
271
  | `ATOMIC_REASONING_LEVEL` | `PI_REASONING_LEVEL` | Active reasoning level |
@@ -157,7 +157,7 @@ Start a fresh session. Can be cancelled by a `session_before_switch` extension e
157
157
 
158
158
  With optional parent session tracking:
159
159
  ```json
160
- {"type": "new_session", "parentSession": "/path/to/parent-session.jsonl"}
160
+ {"type": "new_session", "parentSession": "parent-session-id"}
161
161
  ```
162
162
 
163
163
  Response:
@@ -193,7 +193,7 @@ Response:
193
193
  "isCompacting": false,
194
194
  "steeringMode": "all",
195
195
  "followUpMode": "one-at-a-time",
196
- "sessionFile": "/path/to/session.jsonl",
196
+ "sessionLocation": "/path/to/session.jsonl",
197
197
  "sessionId": "abc123",
198
198
  "sessionName": "my-feature-work",
199
199
  "autoCompactionEnabled": true,
@@ -744,10 +744,16 @@ Response:
744
744
 
745
745
  #### switch_session
746
746
 
747
- Load a different session file. Can be cancelled by a `session_before_switch` extension event handler.
747
+ Load a different session by its exact ID. Can be cancelled by a `session_before_switch` extension event handler. `sessionLocation` in `get_state` is optional display text, not a switch target.
748
+
749
+ ```json
750
+ {"type": "switch_session", "sessionId": "abc123"}
751
+ ```
752
+
753
+ When choosing a session from another project's JSONL store, pass `sessionDirectory` to bind the ID lookup to that directory. IDs may repeat in different project stores; an explicitly selected directory never falls back to another store. `cwdOverride` changes the resumed working directory, not the store used for lookup.
748
754
 
749
755
  ```json
750
- {"type": "switch_session", "sessionPath": "/path/to/session.jsonl"}
756
+ {"type": "switch_session", "sessionId": "abc123", "sessionDirectory": "/path/to/project-sessions"}
751
757
  ```
752
758
 
753
759
  Response:
@@ -555,12 +555,12 @@ const { session } = await createAgentSession({
555
555
 
556
556
  // New persistent session
557
557
  const { session: persisted } = await createAgentSession({
558
- sessionManager: SessionManager.create(process.cwd()),
558
+ sessionManager: await SessionManager.create(process.cwd()),
559
559
  });
560
560
 
561
561
  // Continue most recent
562
562
  const { session: continued, modelFallbackMessage } = await createAgentSession({
563
- sessionManager: SessionManager.continueRecent(process.cwd()),
563
+ sessionManager: await SessionManager.continueRecent(process.cwd()),
564
564
  });
565
565
  if (modelFallbackMessage) {
566
566
  console.log("Note:", modelFallbackMessage);
@@ -568,7 +568,7 @@ if (modelFallbackMessage) {
568
568
 
569
569
  // Open specific file
570
570
  const { session: opened } = await createAgentSession({
571
- sessionManager: SessionManager.open("/path/to/session.jsonl"),
571
+ sessionManager: await SessionManager.open("/path/to/session.jsonl"),
572
572
  });
573
573
 
574
574
  // List sessions
@@ -592,14 +592,14 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
592
592
  const runtime = await createAgentSessionRuntime(createRuntime, {
593
593
  cwd: process.cwd(),
594
594
  agentDir: getAgentDir(),
595
- sessionManager: SessionManager.create(process.cwd()),
595
+ sessionManager: await SessionManager.create(process.cwd()),
596
596
  });
597
597
 
598
598
  // Replace the active session with a fresh one
599
599
  await runtime.newSession();
600
600
 
601
601
  // Replace the active session with another saved session
602
- await runtime.switchSession("/path/to/session.jsonl");
602
+ await runtime.switchSession("session-id");
603
603
 
604
604
  // Replace the active session with a fork from a specific user entry
605
605
  await runtime.fork("entry-id");
@@ -608,10 +608,12 @@ await runtime.fork("entry-id");
608
608
  await runtime.fork("entry-id", { position: "at" });
609
609
  ```
610
610
 
611
+ `SessionManager.create()`, `open()`, `continueRecent()`, `forkFrom()`, and mutations are asynchronous. `SessionManager.inMemory()` returns an explicitly memory-backed manager synchronously. Await a mutation before reading its result or starting dependent work. A resolved write is committed; a failed write rejects with the store's typed error and leaves the failed entry unpublished. New persistent sessions store their header during creation and commit setup entries immediately. There is no `flush` method. Reads remain synchronous.
612
+
611
613
  **SessionManager tree API:**
612
614
 
613
615
  ```typescript
614
- const sm = SessionManager.open("/path/to/session.jsonl");
616
+ const sm = await SessionManager.open("/path/to/session.jsonl");
615
617
 
616
618
  // Session listing
617
619
  const currentProjectSessions = await SessionManager.list(process.cwd());
@@ -627,12 +629,12 @@ const children = sm.getChildren(id); // Direct children of entry
627
629
 
628
630
  // Labels
629
631
  const label = sm.getLabel(id); // Get label for entry
630
- sm.appendLabelChange(id, "checkpoint"); // Set label
632
+ await sm.appendLabelChange(id, "checkpoint"); // Set label
631
633
 
632
634
  // Branching
633
- sm.branch(entryId); // Move leaf to earlier entry
634
- sm.branchWithSummary(id, "Summary..."); // Branch with context summary
635
- sm.createBranchedSession(leafId); // Extract path to new file
635
+ await sm.branch(entryId); // Move leaf to earlier entry
636
+ await sm.branchWithSummary(id, "Summary..."); // Branch with context summary
637
+ await sm.createBranchedSession(leafId); // Extract path to new file
636
638
  ```
637
639
 
638
640
  > See [examples/sdk/11-sessions.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/11-sessions.ts) and [Session Format](/session-format)
@@ -770,7 +772,7 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
770
772
  const runtime = await createAgentSessionRuntime(createRuntime, {
771
773
  cwd: process.cwd(),
772
774
  agentDir: getAgentDir(),
773
- sessionManager: SessionManager.create(process.cwd()),
775
+ sessionManager: await SessionManager.create(process.cwd()),
774
776
  });
775
777
 
776
778
  const mode = new InteractiveMode(runtime, {
@@ -810,7 +812,7 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
810
812
  const runtime = await createAgentSessionRuntime(createRuntime, {
811
813
  cwd: process.cwd(),
812
814
  agentDir: getAgentDir(),
813
- sessionManager: SessionManager.create(process.cwd()),
815
+ sessionManager: await SessionManager.create(process.cwd()),
814
816
  });
815
817
 
816
818
  await runPrintMode(runtime, {
@@ -847,7 +849,7 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
847
849
  const runtime = await createAgentSessionRuntime(createRuntime, {
848
850
  cwd: process.cwd(),
849
851
  agentDir: getAgentDir(),
850
- sessionManager: SessionManager.create(process.cwd()),
852
+ sessionManager: await SessionManager.create(process.cwd()),
851
853
  });
852
854
 
853
855
  await runRpcMode(runtime);
@@ -922,7 +924,7 @@ WorkflowRunNotResumableError
922
924
  WorkflowStageNotFoundError
923
925
  WorkflowStageAmbiguousError
924
926
  WorkflowStageResumeUnsupportedError
925
- WorkflowRunDatabaseError
927
+ WorkflowRunStorageError
926
928
  WorkflowRunControlUnavailableError
927
929
 
928
930
  // Tool factories
@@ -20,7 +20,7 @@ npm install @bastani/atomic
20
20
 
21
21
  Atomic needs Node.js 22.19 or newer and does not require dependency install scripts.
22
22
 
23
- Bun blocks the install scripts of some dependencies, such as `@embedded-postgres/<platform>`, `protobufjs`, and `@google/genai`, and reports them after `bun add @bastani/atomic`. You don't need to add them to `trustedDependencies` in `package.json`: Atomic prepares the embedded Postgres runtime itself the first time it starts it, and it doesn't depend on the other scripts.
23
+ Dependency install scripts are not required. If your package manager reports blocked scripts, you do not need to enable them for Atomic.
24
24
 
25
25
  ## Keep Atomic out of the server bundle
26
26
 
@@ -267,7 +267,7 @@ export async function POST(request: Request): Promise<Response> {
267
267
  const result = await run(reviewWorkflow, { topic }, {
268
268
  cwd: WORKSPACE,
269
269
  signal: abort.signal,
270
- durability: { mode: "memory" },
270
+ journal: { memory: true },
271
271
  adapters: {
272
272
  agentSession: createAgentSessionAdapter({ cwd: WORKSPACE, tools: ["read", "find", "search"] }),
273
273
  },
@@ -298,14 +298,13 @@ export async function POST(request: Request): Promise<Response> {
298
298
 
299
299
  `onStageSessionEvent` receives every stage's session events tagged with its run and stage ids, including stages that switch to a fallback model and stages of nested workflows. Aborting `signal`, here when the client disconnects, cancels the run.
300
300
 
301
- ### Choose workflow durability
301
+ ### Choose workflow storage
302
302
 
303
- By default, `run()` makes workflow state durable by starting a managed local Postgres, so a run can resume after the process exits. Request-scoped servers rarely want that:
303
+ By default, `run()` persists workflow state in the local SQLite journal at `~/.atomic/workflows/journal.sqlite`. Keep it on durable local storage when your service needs restart recovery. If several replicas must inspect or resume each other's runs, have them share a remote SQLite-compatible database through an adapter. See [Sharing storage across hosts](/storage#sharing-storage-across-hosts).
304
304
 
305
- - **`durability: { mode: "memory" }`** keeps state in memory for this call only. No Postgres starts, and the run can't resume after the process exits. Use it when the request owns the run.
306
- - **`durability: { mode: "durable", systemDatabaseUrl }`** stores state in a Postgres database you run, such as a hosted one, and Atomic doesn't start its own. Use it in deployments that need runs to survive restarts. `DBOS_SYSTEM_DATABASE_URL`, when set, overrides the URL.
305
+ Use `journal: { path: "/var/lib/my-service/workflows.sqlite" }` to select a file for a run, or `journal: { memory: true }` for process-local state that cannot survive a restart. Supply a caller-owned async SQLite facade as `{ database, prefix? }`; Atomic does not close it. You can also supply a `RunJournal` instance or `{ adapter, options?, secrets?, prefix? }` for a user-installed driver module.
307
306
 
308
- One process uses one workflow database. See [Choosing the durable backend](/workflows/api-reference#choosing-the-durable-backend) for the full rules, and [Workflows](/workflows) for writing workflow definitions.
307
+ `RunOpts.journal` overrides a non-empty `ATOMIC_WORKFLOW_JOURNAL_PATH`, then `workflows.journal`, then shared top-level `storage`, then the default file. Nearer settings replace whole selections. Relative settings paths resolve against Atomic home. Configuration or storage failures stop the run instead of switching to memory. See [Choosing the durable backend](/workflows/api-reference#choosing-the-durable-backend).
309
308
 
310
309
  ## Secure the endpoint
311
310