@bastani/atomic 0.10.9 → 0.10.10-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +226 -163
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  10. package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
  11. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  12. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
  13. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
  14. package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  16. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  17. package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
  18. package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
  19. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
  22. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
  24. package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
  26. package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +150 -62
  28. package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
  29. package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
  30. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
  33. package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
  34. package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
  43. package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
  44. package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
  45. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  46. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  49. package/dist/builtin/intercom/README.md +87 -116
  50. package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
  51. package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
  52. package/dist/builtin/intercom/group.ts +7 -3
  53. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  54. package/dist/builtin/intercom/package.json +1 -1
  55. package/dist/builtin/mcp/README.md +61 -27
  56. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  57. package/dist/builtin/mcp/package.json +1 -1
  58. package/dist/builtin/subagents/CHANGELOG.md +8 -0
  59. package/dist/builtin/subagents/README.md +74 -141
  60. package/dist/builtin/subagents/package.json +1 -1
  61. package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
  62. package/dist/builtin/web-access/CHANGELOG.md +9 -0
  63. package/dist/builtin/web-access/README.md +61 -88
  64. package/dist/builtin/web-access/index.bundle.mjs +387 -351
  65. package/dist/builtin/web-access/package.json +1 -1
  66. package/dist/cli/args.js +2 -2
  67. package/dist/cli/auth-cli.code.js +4 -4
  68. package/dist/cli/auth-cli.impl.js +3 -3
  69. package/dist/cli/auth-cli.js +3 -3
  70. package/dist/cli/blueprint-command.code.js +2 -2
  71. package/dist/cli/blueprint-command.impl.js +3 -3
  72. package/dist/cli/blueprint-command.js +3 -3
  73. package/dist/cli/intercom-command.code.js +3 -3
  74. package/dist/cli/intercom-command.impl.js +3 -3
  75. package/dist/cli/intercom-command.js +3 -3
  76. package/dist/cli/list-models.code.js +3 -3
  77. package/dist/cli/list-models.impl.js +3 -3
  78. package/dist/cli/list-models.js +3 -3
  79. package/dist/cli/session-picker.code.js +2 -2
  80. package/dist/cli/session-picker.impl.js +3 -3
  81. package/dist/cli/session-picker.js +3 -3
  82. package/dist/cli/startup-ui.code.js +2 -2
  83. package/dist/cli/startup-ui.impl.js +3 -3
  84. package/dist/cli/startup-ui.js +3 -3
  85. package/dist/cli/storage-command.impl.js +3 -3
  86. package/dist/cli/storage-command.js +3 -3
  87. package/dist/cli/storage-search-session.code.js +2 -2
  88. package/dist/cli/storage-search-session.impl.js +3 -3
  89. package/dist/cli/storage-search-session.js +3 -3
  90. package/dist/cli/team-command.code.js +2 -2
  91. package/dist/cli/team-command.impl.js +3 -3
  92. package/dist/cli/team-command.js +3 -3
  93. package/dist/cli.js +2 -2
  94. package/dist/core/agent-session-methods.d.ts +4 -1
  95. package/dist/core/agent-session-methods.js.map +1 -1
  96. package/dist/core/agent-session.d.ts +3 -0
  97. package/dist/core/compaction/compactor.d.ts +20 -14
  98. package/dist/core/compaction/errors.d.ts +120 -0
  99. package/dist/core/compaction/index.d.ts +1 -0
  100. package/dist/core/compaction/model-resolver.d.ts +2 -2
  101. package/dist/core/debug.impl.js +3 -3
  102. package/dist/core/debug.js +3 -3
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  111. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  112. package/dist/core/export-html/tool-renderer.code.js +1 -1
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/api-types.d.ts +1 -1
  116. package/dist/core/extensions/api-types.js.map +1 -1
  117. package/dist/core/extensions/index.d.ts +1 -1
  118. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  119. package/dist/core/extensions/jiti-loader.js +3 -3
  120. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.js +3 -3
  122. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  123. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  124. package/dist/core/extensions/loader-host-modules.js +3 -3
  125. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  126. package/dist/core/extensions/provider-types.d.ts +18 -6
  127. package/dist/core/extensions/provider-types.js.map +1 -1
  128. package/dist/core/extensions/runner-context.js +1 -1
  129. package/dist/core/intercom-broker-control-host.code.js +1 -1
  130. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  131. package/dist/core/intercom-broker-control-host.js +3 -3
  132. package/dist/core/intercom-broker-control.code.js +3 -3
  133. package/dist/core/intercom-broker-control.impl.js +3 -3
  134. package/dist/core/intercom-broker-control.js +3 -3
  135. package/dist/core/model-config.d.ts +40 -0
  136. package/dist/core/model-registry.js +1 -1
  137. package/dist/core/model-resolver-scope.d.ts +4 -4
  138. package/dist/core/model-runtime.d.ts +1 -1
  139. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  140. package/dist/core/package-manager-storage-adapters.js +3 -3
  141. package/dist/core/provider-composer-internal.d.ts +11 -2
  142. package/dist/core/sdk.code.js +3 -3
  143. package/dist/core/sdk.impl.js +3 -3
  144. package/dist/core/sdk.js +3 -3
  145. package/dist/core/session-manager-core.js +5 -5
  146. package/dist/core/session-manager-list.impl.js +3 -3
  147. package/dist/core/session-manager-list.js +3 -3
  148. package/dist/core/session-manager.code.js +1 -1
  149. package/dist/core/session-manager.impl.js +3 -3
  150. package/dist/core/session-manager.js +3 -3
  151. package/dist/core/session-storage.impl.js +3 -3
  152. package/dist/core/session-storage.js +3 -3
  153. package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
  154. package/dist/core/storage/index.js +2 -2
  155. package/dist/core/storage/node-sqlite-thread.js +2 -2
  156. package/dist/core/storage/node-sqlite.js +2 -2
  157. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  158. package/dist/core/storage/offline-snapshot-file.js +3 -3
  159. package/dist/core/storage/provider.js +2 -2
  160. package/dist/core/storage/selection.js +2 -2
  161. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  162. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  163. package/dist/core/storage/session/branch-fork-source.js +3 -3
  164. package/dist/core/storage/session/card-view.impl.js +3 -3
  165. package/dist/core/storage/session/card-view.js +3 -3
  166. package/dist/core/storage/session/child-reader.code.js +3 -3
  167. package/dist/core/storage/session/child-reader.impl.js +3 -3
  168. package/dist/core/storage/session/child-reader.js +3 -3
  169. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  170. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  171. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  172. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  173. package/dist/core/storage/session/expanded-child-details.js +3 -3
  174. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  175. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  176. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  177. package/dist/core/storage/session/fork-row-index.js +3 -3
  178. package/dist/core/storage/session/fork-staging.code.js +2 -2
  179. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  180. package/dist/core/storage/session/fork-staging.js +3 -3
  181. package/dist/core/storage/session/fork-window.code.js +3 -3
  182. package/dist/core/storage/session/fork-window.impl.js +3 -3
  183. package/dist/core/storage/session/fork-window.js +3 -3
  184. package/dist/core/storage/session/history-pages.impl.js +3 -3
  185. package/dist/core/storage/session/history-pages.js +3 -3
  186. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  187. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  188. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  189. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  190. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  191. package/dist/core/storage/session/memory-session-store.js +3 -3
  192. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  193. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  194. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  195. package/dist/core/storage/session/released-history-files.code.js +3 -3
  196. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  197. package/dist/core/storage/session/released-history-files.js +3 -3
  198. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  199. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  200. package/dist/core/storage/session/session-resume.impl.js +3 -3
  201. package/dist/core/storage/session/session-resume.js +3 -3
  202. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  203. package/dist/core/storage/session/snapshot-cut.js +3 -3
  204. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  205. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  206. package/dist/core/storage/session/snapshot-history.js +3 -3
  207. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  208. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  209. package/dist/core/storage/session/sql-session-store.js +3 -3
  210. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  211. package/dist/core/storage/session/tree-outline.js +3 -3
  212. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  213. package/dist/core/storage/session/tree-presentation.js +3 -3
  214. package/dist/core/storage/storage-status.impl.js +3 -3
  215. package/dist/core/storage/storage-status.js +3 -3
  216. package/dist/core/storage/team.impl.js +3 -3
  217. package/dist/core/storage/team.js +3 -3
  218. package/dist/core/structured-output/index.code.js +1 -1
  219. package/dist/core/structured-output/index.impl.js +3 -3
  220. package/dist/core/structured-output/index.js +3 -3
  221. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  222. package/dist/core/tasks/task-completion-entry.js +3 -3
  223. package/dist/core/tasks/task-file-history.code.js +3 -3
  224. package/dist/core/tasks/task-file-history.impl.js +3 -3
  225. package/dist/core/tasks/task-file-history.js +3 -3
  226. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  227. package/dist/core/tasks/task-reference-archive.js +3 -3
  228. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  229. package/dist/core/tasks/task-reference-identity.js +3 -3
  230. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  231. package/dist/core/tasks/task-reference-stream.js +3 -3
  232. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  233. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  234. package/dist/core/tasks/task-view-source.impl.js +3 -3
  235. package/dist/core/tasks/task-view-source.js +3 -3
  236. package/dist/core/tools/read-url.code.js +2 -2
  237. package/dist/core/tools/read-url.impl.js +3 -3
  238. package/dist/core/tools/read-url.js +3 -3
  239. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  240. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  241. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  242. package/dist/core/worktree-snapshot/errors.js +3 -3
  243. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  244. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  245. package/dist/extensions/codemode/execute.code.js +1 -1
  246. package/dist/extensions/codemode/execute.impl.js +3 -3
  247. package/dist/extensions/codemode/execute.js +3 -3
  248. package/dist/extensions/codemode/renderer.code.js +2 -2
  249. package/dist/extensions/codemode/renderer.impl.js +3 -3
  250. package/dist/extensions/codemode/renderer.js +3 -3
  251. package/dist/extensions/mcp/cli.code.js +2 -2
  252. package/dist/extensions/mcp/cli.impl.js +3 -3
  253. package/dist/extensions/mcp/cli.js +3 -3
  254. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  255. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  256. package/dist/extensions/mcp/cli.lazy.js +3 -3
  257. package/dist/extensions/mcp/runtime.code.js +1 -1
  258. package/dist/extensions/mcp/runtime.impl.js +3 -3
  259. package/dist/extensions/mcp/runtime.js +3 -3
  260. package/dist/index-extensions.d.ts +1 -1
  261. package/dist/index.d.ts +8 -1
  262. package/dist/index.js +7 -7
  263. package/dist/main-first-time-setup.code.js +2 -2
  264. package/dist/main-first-time-setup.impl.js +3 -3
  265. package/dist/main-first-time-setup.js +3 -3
  266. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
  267. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  268. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  269. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  270. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  271. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  272. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  273. package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
  274. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  275. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  276. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  277. package/dist/modes/print-mode.js +1 -1
  278. package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
  279. package/dist/modes/rpc/rpc-types.d.ts +29 -2
  280. package/dist/package-manager-cli.code.js +5 -5
  281. package/dist/package-manager-cli.impl.js +3 -3
  282. package/dist/package-manager-cli.js +3 -3
  283. package/dist/rpc-entry.js +1 -1
  284. package/dist/startup-files.json +1 -1
  285. package/dist/startup-stages/5.js +1 -1
  286. package/dist/startup-stages/7.js +1 -1
  287. package/dist/startup-stages/8.js +1 -2
  288. package/dist/startup-stages/9.js +2 -1
  289. package/dist/utils/native-module.d.ts +44 -0
  290. package/dist/utils/startup-database-spare.code.js +3 -3
  291. package/dist/utils/startup-database-spare.impl.js +3 -3
  292. package/dist/utils/startup-database-spare.js +3 -3
  293. package/dist/utils/tools-manager.code.js +1 -1
  294. package/dist/utils/tools-manager.impl.js +3 -3
  295. package/dist/utils/tools-manager.js +3 -3
  296. package/docs/background-tasks.md +238 -243
  297. package/docs/build.md +21 -15
  298. package/docs/changelog.mdx +1 -1
  299. package/docs/codemode.md +68 -51
  300. package/docs/compaction/reference.md +65 -26
  301. package/docs/compaction.md +118 -66
  302. package/docs/computer-use.md +179 -146
  303. package/docs/containerization.md +87 -33
  304. package/docs/custom-provider/api-reference.md +152 -13
  305. package/docs/custom-provider/oauth.md +45 -28
  306. package/docs/custom-provider/override.md +14 -7
  307. package/docs/custom-provider/registration.md +77 -67
  308. package/docs/custom-provider/streaming.md +42 -19
  309. package/docs/custom-provider.md +26 -62
  310. package/docs/development.md +81 -42
  311. package/docs/docs.json +54 -38
  312. package/docs/environment-variables.md +92 -64
  313. package/docs/extensions/api-reference.md +326 -735
  314. package/docs/extensions/authoring.md +186 -269
  315. package/docs/extensions/events.md +308 -375
  316. package/docs/extensions/examples.md +122 -74
  317. package/docs/extensions/ui.md +217 -197
  318. package/docs/extensions.md +189 -259
  319. package/docs/getting-started/authentication.md +27 -14
  320. package/docs/getting-started/first-session.md +25 -26
  321. package/docs/getting-started/installation.md +62 -84
  322. package/docs/getting-started/project-instructions.md +39 -14
  323. package/docs/guides/configuration.md +62 -20
  324. package/docs/guides/intercom.md +20 -12
  325. package/docs/guides/non-interactive.md +31 -16
  326. package/docs/guides/orchestration.md +17 -9
  327. package/docs/guides/resume-on-any-machine.md +63 -52
  328. package/docs/guides/subagents.md +26 -14
  329. package/docs/guides/team-setup.md +49 -27
  330. package/docs/guides.md +30 -23
  331. package/docs/herdr.md +22 -17
  332. package/docs/index.md +24 -17
  333. package/docs/intercom/operations.md +90 -66
  334. package/docs/intercom/reference.md +219 -192
  335. package/docs/intercom.md +111 -92
  336. package/docs/json.md +73 -71
  337. package/docs/keybindings.md +74 -48
  338. package/docs/libraries/agent-core.md +52 -9
  339. package/docs/libraries/ai.md +90 -63
  340. package/docs/libraries/codemode.md +31 -8
  341. package/docs/libraries/schema.md +12 -9
  342. package/docs/libraries/storage-libsql.md +92 -0
  343. package/docs/libraries/storage-postgres.md +119 -0
  344. package/docs/libraries/telemetry.md +42 -9
  345. package/docs/libraries/tui.md +74 -94
  346. package/docs/libraries.md +25 -8
  347. package/docs/llama-cpp.md +38 -33
  348. package/docs/mcp-servers.md +140 -88
  349. package/docs/models/reference.md +53 -36
  350. package/docs/models-configuration.md +19 -13
  351. package/docs/models.md +102 -87
  352. package/docs/orchestration/migrating-workflows.md +22 -20
  353. package/docs/orchestration/patterns.md +36 -21
  354. package/docs/orchestration.md +24 -21
  355. package/docs/packages/authoring.md +29 -18
  356. package/docs/packages/reference.md +77 -16
  357. package/docs/packages.md +34 -34
  358. package/docs/programmatic.md +28 -21
  359. package/docs/prompt-templates.md +65 -41
  360. package/docs/providers/reference.md +36 -20
  361. package/docs/providers.md +78 -76
  362. package/docs/quickstart.md +42 -54
  363. package/docs/reference/cli.md +256 -254
  364. package/docs/reference.md +30 -23
  365. package/docs/rpc/examples.md +121 -17
  366. package/docs/rpc/extension-ui.md +86 -63
  367. package/docs/rpc/protocol.md +817 -358
  368. package/docs/rpc.md +78 -152
  369. package/docs/sdk/reference.md +309 -73
  370. package/docs/sdk/storage.md +614 -0
  371. package/docs/sdk/structured-decisions.md +168 -65
  372. package/docs/sdk/web-server.md +80 -46
  373. package/docs/sdk.md +168 -215
  374. package/docs/security.md +117 -44
  375. package/docs/session-format.md +127 -76
  376. package/docs/sessions.md +155 -113
  377. package/docs/settings.md +293 -205
  378. package/docs/shell-aliases.md +15 -6
  379. package/docs/skills/authoring.md +17 -9
  380. package/docs/skills/reference.md +23 -21
  381. package/docs/skills.md +148 -97
  382. package/docs/storage.md +172 -260
  383. package/docs/subagents/authoring.md +148 -15
  384. package/docs/subagents/reference.md +105 -29
  385. package/docs/subagents.md +247 -250
  386. package/docs/terminal-setup.md +97 -69
  387. package/docs/termux.md +51 -85
  388. package/docs/themes/reference.md +51 -37
  389. package/docs/themes.md +52 -55
  390. package/docs/tmux.md +38 -21
  391. package/docs/tools.md +209 -147
  392. package/docs/tui/reference.md +64 -32
  393. package/docs/tui.md +38 -66
  394. package/docs/usage.md +94 -86
  395. package/docs/verification.md +25 -25
  396. package/docs/web-access.md +106 -54
  397. package/docs/windows.md +55 -57
  398. package/docs/worktree-snapshots.md +82 -74
  399. package/examples/sdk/11-sessions.ts +4 -4
  400. package/package.json +8 -8
  401. package/schemas/models.schema.json +58 -7
  402. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  403. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  404. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  405. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  406. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
@@ -1,13 +1,12 @@
1
1
  ---
2
- title: Worktree snapshots
3
- description: Capture and restore Git repository state so sessions resume cleanly on any machine.
2
+ title: "Worktree snapshots"
3
+ sidebarTitle: "Worktree snapshots"
4
+ description: "How Atomic automatically saves and restores Git checkout state, handles exclusions and partial restores, and cleans up old worktrees."
4
5
  ---
5
6
 
6
- # Worktree snapshots
7
-
8
7
  Atomic records the state of each Git checkout a session modifies. You can resume a session on another machine, or after a local checkout is deleted or reset, with the same repository files.
9
8
 
10
- For cross-machine setup, shared storage, and environment blueprints, see [Resume on any machine](/guides/resume-on-any-machine).
9
+ For cross-machine setup, shared storage, and environment blueprints, see [Resume sessions on any machine](/guides/resume-on-any-machine).
11
10
 
12
11
  ## What a snapshot holds
13
12
 
@@ -16,52 +15,41 @@ For each repository root a session changes, a snapshot records:
16
15
  - `root`: the checkout path on the recording machine (informational).
17
16
  - `remotes`: configured remote fetch URLs with embedded credentials stripped.
18
17
  - `branch` and `head`: the active branch name (or `null` when detached) and `HEAD` commit.
19
- - `tree`: the Git tree of the working copy, built through a private index so your own index, branch, and files are untouched.
20
- - A patch chain: a binary delta against `head`, followed by incremental deltas against earlier snapshots, restarting from `head` every `snapshots.fullEvery` snapshots or when `HEAD` changes.
18
+ - `tree`: the Git tree of the working copy, built through a private index so your own index, branch, and files stay untouched.
19
+ - A patch chain: a binary delta against `head`, followed by incremental deltas against earlier snapshots, restarting from `head` every `snapshots.fullEvery` snapshots (default `10`) or when `HEAD` changes.
21
20
  - A bundle of commits reachable from `HEAD` but not from any remote-tracking ref, so unpushed commits travel with the session.
22
21
  - `omitted`: paths or commits left out of the snapshot and why.
23
22
  - `filters`: conversion settings on the recording host (`core.autocrlf`, `core.eol`, and `.gitattributes` filter drivers such as Git LFS).
24
- - `envHash`: a SHA-256 hash of root lockfiles and toolchain files (`package-lock.json`, `Cargo.lock`, `.devcontainer/devcontainer.json`, `.nvmrc`, and similar) to detect when dependencies need rebuilding.
23
+ - `envHash`: a SHA-256 hash of these 24 root-relative lockfiles and toolchain files to detect when dependencies need rebuilding: `.devcontainer.json`, `.devcontainer/Dockerfile`, `.devcontainer/devcontainer.json`, `.mise.toml`, `.node-version`, `.nvmrc`, `.python-version`, `.tool-versions`, `Cargo.lock`, `Gemfile.lock`, `Pipfile.lock`, `bun.lock`, `bun.lockb`, `composer.lock`, `flake.lock`, `go.sum`, `mise.toml`, `npm-shrinkwrap.json`, `package-lock.json`, `pnpm-lock.yaml`, `poetry.lock`, `rust-toolchain`, `rust-toolchain.toml`, `uv.lock`, and `yarn.lock`. Other files such as `requirements.txt`, `build.gradle`, and `pom.xml` are not included in `envHash`.
25
24
 
26
- Patches and bundles are stored once by content hash in the session's database (`snapshot_blobs` table). Payloads over 1 MiB split into rows of at most 1 MiB, so every backend supports files up to `snapshots.maxFileBytes`. Machines sharing one database read the same blobs automatically.
25
+ Patches and bundles are stored once by content hash in the session's database (`snapshot_blobs` table). Payloads over 1 MiB split into rows of at most 1 MiB, so every SQL backend supports files up to `snapshots.maxFileBytes` (default 5 MiB). Machines sharing one database read the same blobs automatically.
27
26
 
28
27
  **What "the same tree" means.** A restore reproduces the repository's Git content so the restored worktree's Git tree ID matches `tree` and every file blob matches. Host-specific worktree encodings are not copied. For example, a source checkout with `core.autocrlf=true` and CRLF files restores with LF files and identical Git content, accompanied by a filter warning.
29
28
 
30
29
  ## When snapshots are taken
31
30
 
32
- Atomic captures snapshots at the end of any turn that ran `bash`, `edit`, `write`, `powershell`, or an extension tool declaring `writesFiles: true`. It captures the session's working directory along with the directories of files targeted by `edit` and `write`.
33
-
34
- If `HEAD`, the working tree, and the omitted-file list are all unchanged, Atomic records a reference to the previous snapshot instead of creating a new one. Adding a newly omitted file, such as a new `.env.local`, writes a new snapshot listing it in `omitted` so restores warn about it.
35
-
36
- ### Unpushed-commit omission caching
31
+ Snapshots require a Git checkout with at least one commit and a SQL database store (local SQLite, PostgreSQL, or Turso/libSQL; see [Storage backends](/storage)). Directories outside Git repositories, in-memory sessions, JSONL directory stores, and custom stores without blob tables record nothing. A new session in a blob-less store reports `blob-store-unsupported` once; a transient store failure reports `blob-store-failed` once without failing the turn.
37
32
 
38
- When unpushed commits are left out of a snapshot (because a commit modifies a deny-listed path or the bundle exceeds `snapshots.maxSnapshotBytes`), Atomic remembers that omission per checkout for the lifetime of the running process so repeated turns do not re-bundle large unpushed histories.
39
-
40
- Atomic re-bundles unpushed commits and re-checks them against the deny list when any of these happen:
41
-
42
- - The list of unpushed commits changes, including after pushing commits or when a remote branch moves back (such as a force push) and exposes newly unpushed commits.
43
- - A new Atomic process starts.
44
- - The repository is repacked with `git gc` or `git repack`.
45
- - Git packing settings (`core.compression`, `core.bigFileThreshold`, `pack.*`, `core.attributesFile`, or `attr.tree`) or delta-compression rules (such as `-delta` in `.gitattributes` or Git attributes files) change.
46
- - `snapshots.maxSnapshotBytes` is raised above the bundle size.
47
-
48
- ### Subagents, storage, and capture edge cases
33
+ Atomic captures snapshots at the end of any turn that ran `bash`, `edit`, `write`, `powershell`, or an extension tool declaring `writesFiles: true`. It captures the session's working directory along with the directories of files targeted by `edit` and `write`.
49
34
 
35
+ - **Unchanged trees.** If `HEAD`, the working tree, and the omitted-file list are all unchanged, Atomic records a reference to the previous snapshot instead of creating a new one. Adding a newly omitted file, such as a new `.env.local`, writes a new snapshot listing it in `omitted` so restores warn about it.
50
36
  - **Subagent snapshots.** A subagent's session lives in its parent's store and captures snapshots of its own when backed by a database. When multiple subagents finish file-writing turns in the same checkout while a capture is already running, they share the next snapshot.
37
+ - **Unpushed-commit omission reuse.** When unpushed commits are omitted because a commit touches a deny-listed secret or the bundle exceeds `snapshots.maxSnapshotBytes` (default 50 MiB), Atomic caches that omission for the running process so later turns avoid re-bundling large unpushed histories. Atomic re-checks and re-bundles automatically if the set of unpushed commits changes (including after pushing or a force push), a new Atomic process starts, the repository is repacked (`git gc` or `git repack`), Git packing or attributes settings change, or `snapshots.maxSnapshotBytes` is raised above the bundle size.
51
38
  - **Private capture index.** Captures share a private Git index per checkout under `~/.atomic/agent/worktree-snapshots/capture-index/` so unchanged files are not re-read on later turns. Deleting that directory is safe; the next capture rebuilds it automatically.
52
- - **Git and storage requirements.** Captures use Atomic's resolved Git binary (including a provisioned portable copy). Directories outside Git repositories, in-memory sessions, and stores without blob tables (such as JSONL directories or database-less adapters) record nothing. A new session in a blob-less store reports `blob-store-unsupported` once; a transient store failure reports `blob-store-failed` once without failing the turn.
53
39
  - **Unreadable paths.** If a path cannot be read because of permissions or a looping symlink, capture skips that checkout and reports `unreadable-path` without failing the turn. Fix the path or add it to `.atomic/snapshot-ignore` to resume capturing.
54
40
 
55
41
  ## What is left out
56
42
 
57
43
  Atomic excludes the following from snapshots:
58
44
 
59
- - **Git-ignored files.** Files matched by `.gitignore`, `.git/info/exclude`, or global excludes are skipped unless explicitly staged with `git add -f`.
60
- - **Project snapshot excludes.** Rules in `.atomic/snapshot-ignore` at the repository root match using `.gitignore` syntax and respect the repository's `core.ignorecase` setting.
61
- - **Built-in secret deny list.** `.env*`, `*.pem`, `*.key`, `*.p12`, `*.pfx`, `credentials`, `credentials.json`, `.netrc`, `_netrc`, `.git-credentials`, `.pgpass`, plus SSH key files: any extensionless `id_*` file and any file starting with `id_rsa`, `id_ed25519`, `id_ecdsa`, `id_dsa`, `id_mldsa`, or `id_xmss` regardless of suffix (such as `id_rsa.bak`), except `.pub` public keys and certificates. Other `id_*` files with extensions, such as `id_utils.ts`, are kept unless they carry a denied extension like `.pem` or `.key`.
62
- - **Untracked and oversized files.** Untracked files when `snapshots.includeUntracked` is `false`, files larger than `snapshots.maxFileBytes`, and files pushing the snapshot past `snapshots.maxSnapshotBytes`.
45
+ - **Built-in secret deny list (cannot be overridden).** `.env*`, `*.pem`, `*.key`, `*.p12`, `*.pfx`, `credentials`, `credentials.json`, `.netrc`, `_netrc`, `.git-credentials`, `.pgpass`, plus SSH key files: any extensionless `id_*` file and any file starting with `id_rsa`, `id_ed25519`, `id_ecdsa`, `id_dsa`, `id_mldsa`, or `id_xmss` regardless of suffix (such as `id_rsa.bak`), except `.pub` public keys and certificates. Other `id_*` files with extensions, such as `id_utils.ts`, are kept unless they carry a denied extension like `.pem` or `.key`.
46
+ - Built-in deny rules match **case-insensitively at any directory depth** and run **before** `.atomic/snapshot-ignore` and Git staging. You cannot un-deny a built-in pattern with a `!` negation rule in `.atomic/snapshot-ignore` or with `git add -f`.
47
+ - Because `.env*` matches at any depth, non-secret template files such as `.env.example` or `.env.template` are also excluded and cannot be re-included with `!.env.example`.
48
+ - **Git-ignored files.** Files matched by `.gitignore`, `.git/info/exclude`, or global excludes are skipped unless explicitly staged with `git add -f` (staging overrides `.gitignore`, not the built-in secret deny list).
49
+ - **Project snapshot excludes.** Rules in `.atomic/snapshot-ignore` at the repository root use `.gitignore` syntax and respect the repository's `core.ignorecase` setting.
50
+ - **Untracked and oversized files.** Untracked files when `snapshots.includeUntracked` is `false`, files larger than `snapshots.maxFileBytes` (default 5 MiB), and files pushing the snapshot past `snapshots.maxSnapshotBytes` (default 50 MiB).
63
51
  - **Nested repositories.** Untracked Git repositories inside the checkout appear in `omitted` as `nested-repository`.
64
- - **Submodule contents.** Snapshots record only each submodule's checked-out commit and do not check submodules out on restore. Uncommitted submodule changes appear as `submodule-changes`, unpushed submodule commits as `unpushed-submodule-commit`, and submodules that time out after 10 seconds as `submodule-unchecked`. Commit and push submodule work to preserve it.
52
+ - **Submodule contents.** When `.gitmodules` is present, snapshots record only each submodule's checked-out commit and do not check submodules out on restore. Uncommitted submodule changes appear as `submodule-changes`, unpushed submodule commits as `unpushed-submodule-commit`, and submodules that time out after 10 seconds as `submodule-unchecked`. Commit and push submodule work to preserve it.
65
53
 
66
54
  Tracked files that are ignored or denied keep their `HEAD` content in the snapshot, and local edits to them are listed in `omitted`.
67
55
 
@@ -69,24 +57,36 @@ Tracked files that are ignored or denied keep their `HEAD` content in the snapsh
69
57
 
70
58
  ## Settings
71
59
 
72
- Configure `snapshots.*` options in `~/.atomic/agent/settings.json` or `.atomic/settings.json`. See [Snapshots settings](/settings#snapshots) for the full table of keys and defaults (`snapshots.enabled`, `includeUntracked`, `maxFileBytes`, `maxSnapshotBytes`, `fullEvery`, `autoCollect`, `collectIntervalSeconds`, `graceSeconds`, and `pool.maxIdlePerRepository`).
60
+ Configure `snapshots.*` options in `~/.atomic/agent/settings.json` or `.atomic/settings.json`:
73
61
 
74
- In the SDK, pass `createAgentSession({ snapshots })` to override settings for one session. Invalid values fail fast with `WorkspaceConfigError` before running Git commands.
62
+ | Setting | Default | Meaning |
63
+ | --- | --- | --- |
64
+ | `snapshots.enabled` | `true` | Capture worktree snapshots after file-writing turns |
65
+ | `snapshots.includeUntracked` | `true` | Include non-ignored untracked files |
66
+ | `snapshots.maxFileBytes` | `5242880` (5 MiB) | Largest individual file captured (positive integer) |
67
+ | `snapshots.maxSnapshotBytes` | `52428800` (50 MiB) | Largest total snapshot or unpushed bundle size (positive integer) |
68
+ | `snapshots.fullEvery` | `10` | Restart patch chain from `HEAD` after this many incremental snapshots |
69
+ | `snapshots.autoCollect` | `true` | Run background snapshot garbage collection |
70
+ | `snapshots.collectIntervalSeconds` | `3600` (1 hour) | Minimum interval between automatic garbage collection runs |
71
+ | `snapshots.graceSeconds` | `3600` (1 hour) | Protect newly written blobs for this many seconds (`0` disables grace window) |
72
+ | `snapshots.pool.maxIdlePerRepository` | `2` | Maximum clean idle restored worktrees kept per repository |
73
+
74
+ See [Snapshots settings](/settings#snapshots) for full schema notes. In the SDK, pass `createAgentSession({ snapshots })` to override settings for one session. Invalid values fail immediately with `WorkspaceConfigError` before running Git commands.
75
75
 
76
76
  ## Resuming
77
77
 
78
78
  When you resume a session, Atomic checks every checkout the session recorded a snapshot for, not only its working directory.
79
79
 
80
- If a finished subagent stored in the same session store captured a checkout later than the parent session did, Atomic adopts that newer subagent capture as the checkout's latest snapshot. Captures compare by recording timestamp, with the parent session winning ties. Partly restored checkouts keep their pinned snapshot, and named subagent worktrees stay separate.
80
+ If a finished subagent stored in the same session store captured a checkout later than the parent session did, Atomic adopts that newer subagent capture as the checkout's latest snapshot. Captures compare by recording timestamp, with the parent session winning ties. Partly restored checkouts keep their original restore target, and named subagent worktrees stay separate.
81
81
 
82
82
  For each checkout, Atomic applies these rules in order:
83
83
 
84
84
  - **In-place resume.** If the tree matches and `HEAD` is the recorded commit or a descendant of it, the session resumes in place. If the active checkout changed locally since its snapshot but is still the same checkout on this machine (holding the snapshot commit, the session's [snapshot ref](#snapshot-refs-in-your-repository), or a local Atomic restore), the session continues there without overwriting your files.
85
85
  - **Return to original checkout.** If an earlier resume moved the session into a restored worktree and no new work was saved there, Atomic returns to the original checkout once it is available again on this machine.
86
86
  - **Automatic restore.** If another checkout drifted, or the active checkout is missing, belongs to a different clone, or has no commits, Atomic restores the snapshot into a fresh worktree under `~/.atomic/agent/worktree-snapshots/worktrees/` and prints a one-line notice. Your existing checkouts are never modified.
87
- - **Non-blocking secondary checkouts.** A checkout outside the session's working directory never stops a resume. If it cannot be checked or restored, Atomic skips it with a warning and builds [blueprints](/guides/resume-on-any-machine) for every restored worktree.
87
+ - **Non-blocking secondary checkouts.** Secondary checkouts outside the session's working directory restore concurrently (up to 4 at a time) and never stop a resume. If one cannot be checked or restored, Atomic skips it with a warning and builds [blueprints](/guides/resume-on-any-machine) for every restored worktree.
88
88
 
89
- ### Degraded restores
89
+ ### Partial (degraded) restores
90
90
 
91
91
  A resume always opens the session with its full conversation. When a snapshot cannot be restored exactly (for example because unpushed commits touched denied files, a remote is unreachable, a blob is missing, or a patch fails to apply), Atomic restores the closest reachable state in order:
92
92
 
@@ -94,24 +94,26 @@ A resume always opens the session with its full conversation. When a snapshot ca
94
94
  2. Otherwise, the closest commit fetchable from recorded remotes: the pushed base of the unpushed bundle, then earlier snapshots of the same checkout (nearest first), then the tip of the recorded branch (or default branch when detached).
95
95
  3. Otherwise, Atomic skips the restore and continues in the session's recorded directory without writing to it, or in the directory where the resume started if the recorded directory is absent. Missing Git or a missing snapshot record also ends here.
96
96
 
97
- Each degraded or unrestored checkout emits one notice listing what was restored, what is missing, and how to fix it (such as pushing missing commits and resuming again). The outcome is stored on the session entry (`restore.degraded` or `unrestored`) and displayed by `/session snapshot`.
97
+ Each partial or unrestored checkout emits one notice listing what was restored, what is missing, and how to fix it (such as pushing missing commits and resuming again). The outcome is stored on the session entry (`restore.degraded` or `unrestored`) and displayed by `/session snapshot`.
98
98
 
99
99
  Only three errors refuse a resume: an unreadable session, a snapshot failing security validation (`invalid-snapshot`), or a non-empty restore target (`unsafe-target`). Working directories reached through symlinks are matched by their resolved physical path.
100
100
 
101
- ### Snapshots restored only partly
101
+ <div id="snapshots-restored-only-partly" />
102
+
103
+ ### Recovering from a partial restore
102
104
 
103
- A partly restored snapshot remains the checkout's restore target for 30 days, and garbage collection keeps its blobs and patch chain until one of three events occurs: a later resume restores it completely, you release it with `discardDegradedRestore` (see [SDK](#sdk)), or 30 days pass since the partial restore.
105
+ When a snapshot restores only partly, Atomic keeps trying to restore the full original snapshot for 30 days, and garbage collection retains its blobs and patch chain until one of three things happens: a later resume restores it completely, you clear the target with `discardDegradedRestore()` (see [SDK](#sdk)), or 30 days pass since the partial restore.
104
106
 
105
- Each turn captured in a partly restored worktree records its actual tree and links back to the original snapshot via `degradedFrom`, so partial restores never overwrite the original target.
107
+ Each turn captured in a partly restored worktree records its actual tree and links back to the original snapshot in `degradedFrom`, so work done in a partial restore never overwrites the original target.
106
108
 
107
- On a later resume, Atomic tries to restore the original snapshot again:
109
+ On a later resume, Atomic retries restoring the original snapshot:
108
110
 
109
- - **Full restore succeeds.** If you edited files in the partly restored worktree, Atomic applies those edits on top as a single patch, shows an info notice, and records a new snapshot immediately. Once that new snapshot saves, the pin ends.
111
+ - **Full restore succeeds.** If you edited files in the partly restored worktree, Atomic applies those edits on top as a single patch, shows an info notice, and records a new snapshot immediately. Once saved, Atomic stops retrying the older target.
110
112
  - **Carried-over edits conflict.** Atomic leaves the restored worktree at the original snapshot, saves your conflicting edits under `refs/atomic/degraded-work/<snapshot>`, keeps them in snapshot storage until discarded or 30 days pass, and prints a `git diff ... | git apply --3way` command so you can merge them manually.
111
- - **Carried-over edits are unavailable.** If the partial-restore edits cannot be read on this machine (for example, unpushed commits made there), Atomic reports them, leaves them in the partial worktree, and clears the original pin.
112
- - **Full restore still fails.** Atomic restores the partly restored worktree's latest snapshot so your new work is preserved, warns that the original is still unreachable, and keeps the pin active.
113
+ - **Carried-over edits are unavailable.** If the partial-restore edits cannot be read on this machine (for example, unpushed commits made there), Atomic reports them, leaves them in the partial worktree, and clears the original target.
114
+ - **Full restore still fails.** Atomic restores the partly restored worktree's latest snapshot so your new work stays intact, warns that the original is still unreachable, and keeps retrying on later resumes.
113
115
 
114
- After 30 days, the next resume warns that the original snapshot is no longer retained, promotes the partial worktree's latest snapshot to the restore target, and drops `degradedFrom` on the next capture.
116
+ After 30 days, the next resume warns that the original snapshot is no longer retained, promotes the partial worktree's latest snapshot to the active target, and clears `degradedFrom` on the next capture.
115
117
 
116
118
  ### Restored worktrees
117
119
 
@@ -121,17 +123,11 @@ Only checkouts sharing the same repository remotes share a pool. Checkouts witho
121
123
 
122
124
  A worktree stays associated with the session it was restored for after that session closes so resuming it again continues in the same directory. If another session later takes over that worktree, the original session gets a fresh worktree on its next resume.
123
125
 
124
- #### Leases and pool locks
125
-
126
- An open session refreshes its worktree lease every 10 seconds. If a process stops refreshing (for example after sleeping or stalling), it keeps the worktree for 90 seconds after its last refresh (30 seconds until stale, plus a 60-second grace window) before another machine sharing the pool can claim or remove it.
127
-
128
- On shared filesystems where host clocks may disagree, Atomic measures lease and lock ages against the filesystem's own clock using a short-lived probe file. On all platforms, Atomic advances the sampled filesystem time with monotonic elapsed time through probe cleanup and ignores wall-clock jumps.
126
+ #### Worktree leases
129
127
 
130
- On the same host, a worktree held by a still-running session process is never reclaimed. Both Linux and Windows record the holder's process start time on leases (Linux through `/proc`, Windows through the native module with a PowerShell fallback), so a reused PID after a reboot or container restart never keeps a stale worktree on either OS. Only macOS and other platforms without a process start-time reader fall back to a 24-hour cap without a refresh.
128
+ An open session refreshes its worktree lease every 10 seconds. On the same host, a worktree held by a running session process is never reclaimed (Linux and Windows check both PID and process start time so reused PIDs after a reboot do not block reuse; macOS falls back to a 24-hour cap without a refresh). If a process stalls or stops refreshing on another host sharing the pool, the worktree remains reserved for 90 seconds after the last refresh before another machine can claim or remove it.
131
129
 
132
- Before recording a snapshot or continuing in a pooled worktree, a session verifies it still holds the lease. If another session claimed the worktree meanwhile, Atomic skips the snapshot and warns with `pooled-worktree-lost` so you know to resume into a fresh worktree.
133
-
134
- On Windows, pool and seed lock acquisition retries temporary `EPERM` errors for up to 10 seconds before failing. Contended pool locks wait up to 60 seconds (120 seconds when parking a seed) and respond to cancellation.
130
+ Before saving a snapshot or continuing in a pooled worktree, Atomic verifies that the session still holds the lease. If another session claimed the worktree meanwhile, Atomic skips the snapshot and warns with `pooled-worktree-lost` so you can stop editing there and run `/resume` to open a fresh worktree.
135
131
 
136
132
  #### Idle reuse, eviction, and set-aside worktrees
137
133
 
@@ -139,7 +135,7 @@ When restoring a repository, Atomic reuses an idle pooled worktree if one matche
139
135
 
140
136
  When idle worktrees for one repository exceed `snapshots.pool.maxIdlePerRepository`, Atomic removes the oldest clean idle ones. Any worktree with unrecorded edits or excluded files (such as `.env`) is preserved.
141
137
 
142
- If Atomic is killed mid-blueprint build, that worktree is marked set-aside under `~/.atomic/agent/worktree-snapshots/pool/set-aside/` so no session reuses it while build processes might still run (see [Start the first turn while the build runs](/guides/resume-on-any-machine#start-the-first-turn-while-the-build-runs)). Atomic deletes set-aside pooled worktrees on a later restore once no user process has an open file or working directory inside them (checked via `/proc` on Linux and `lsof` on macOS). When a non-dumpable process prevents verification, or for non-pooled worktrees, check with `lsof +D <path>` and delete the directory manually.
138
+ If Atomic is killed mid-blueprint build, that worktree is marked set-aside under `~/.atomic/agent/worktree-snapshots/pool/set-aside/` so no session reuses it while build processes might still run (see [Start the first turn while the build runs](/guides/resume-on-any-machine#start-the-first-turn-while-the-build-runs)). Atomic deletes set-aside pooled worktrees on a later restore once no user process has an open file or working directory inside them. If another user's or protected process prevents checking open files, or for non-pooled worktrees, inspect with `lsof +D <path>` and delete the directory manually.
143
139
 
144
140
  #### Shared object stores, SSH, LFS, and interrupted restores
145
141
 
@@ -170,7 +166,7 @@ Set `ATOMIC_TIMING=1` to print the same summary to stderr during `atomic --sessi
170
166
 
171
167
  ### Moving a session as a file
172
168
 
173
- `/export session.jsonl` embeds each snapshot patch and bundle inline once and reports the included size. `--import session.jsonl` and `/import` verify every blob hash and store the blobs in the target database before saving the session. `/share` omits snapshot blobs from the gist.
169
+ [`/export`](/sessions#session-commands) `session.jsonl` embeds each snapshot patch and bundle inline once and reports the included size. `--import session.jsonl` and `/import` verify every blob hash and store the blobs in the target database before saving the session. `/share` omits snapshot blobs from the gist. For bulk multi-branch backups across stores, see [Exporting and importing sessions](/storage#exporting-and-importing-sessions).
174
170
 
175
171
  ## Snapshot refs in your repository
176
172
 
@@ -186,13 +182,13 @@ Snapshot refs sit outside `refs/heads` and `refs/tags`, so `git push`, `git push
186
182
 
187
183
  Snapshot commits appear in `git for-each-ref` and `git log --all` titled `Atomic worktree snapshot`. Exclude them from `git log --all` with:
188
184
 
189
- ```sh
185
+ ```bash
190
186
  git log --exclude='refs/atomic/*' --all
191
187
  ```
192
188
 
193
189
  Sessions deleted on another machine or via `SessionStore.delete()` can leave local refs behind. Remove all Atomic snapshot refs in a repository with:
194
190
 
195
- ```sh
191
+ ```bash
196
192
  git for-each-ref --format='delete %(refname)' refs/atomic/snapshots/ | git update-ref --stdin
197
193
  ```
198
194
 
@@ -200,15 +196,17 @@ git for-each-ref --format='delete %(refname)' refs/atomic/snapshots/ | git updat
200
196
 
201
197
  Snapshot blobs live in one shared table per database and are garbage-collected automatically when no retained session needs them:
202
198
 
203
- - **Retained snapshots.** For every branch of every session (including internal sessions), Atomic keeps the latest snapshot of each checkout on that branch. Deleting a session releases its snapshots. A partly restored snapshot remains retained for up to 30 days (see [Snapshots restored only partly](#snapshots-restored-only-partly)). Unfinished workflow runs kept in the database from earlier releases retain their snapshots until removed.
199
+ - **Retained snapshots.** For every branch of every session (including internal sessions), Atomic keeps the latest snapshot of each checkout on that branch. Deleting a session releases its snapshots. A partly restored snapshot remains retained for up to 30 days (see [Recovering from a partial restore](#snapshots-restored-only-partly)). Unfinished workflow runs kept in the database from earlier releases retain their snapshots until removed.
204
200
  - **Background schedule.** When `snapshots.autoCollect` is `true`, Atomic runs collection in the background 10 seconds after an interactive or RPC session starts and 10 seconds after it closes, at most once per `snapshots.collectIntervalSeconds` per database (measured on the database clock). Collection runs in short batches so the UI stays responsive, aborts cleanly when the last store on the database closes, and resumes later if interrupted.
205
- - **Grace window.** Blobs stored or reused within `snapshots.graceSeconds` (default one hour) are never deleted, protecting captures in progress. Reusing an earlier patch resets its age; if a blob is collected before its snapshot commits, Atomic retries storing it or reports `blobs-collected` without recording a broken snapshot. Raise `snapshots.graceSeconds` if `blobs-collected` repeats.
201
+ - **Grace window.** Blobs stored or reused within `snapshots.graceSeconds` (default 1 hour) are never deleted, protecting captures in progress. Reusing an earlier patch resets its age; if a blob is collected before its snapshot commits, Atomic retries storing it or reports `blobs-collected` without recording a broken snapshot. Raise `snapshots.graceSeconds` if `blobs-collected` repeats.
206
202
  - **Failures and disk space.** Collection errors never fail an active session; they are recorded in the `snapshot_collection` table (`finished_at`, `deleted`, `error_code`) and retried after the configured interval. SQLite reuses freed space internally without shrinking the file; run `VACUUM` while no Atomic process uses the database to reclaim disk space.
207
203
 
208
- To trigger collection immediately from code, call `collectSnapshotGarbage`. If a large legacy chunk-table migration was deferred for free-space checks, the result includes `pendingChunkMove`; see [Size limits](/storage#size-limits) for the offline migration command.
204
+ To trigger collection immediately from code, call `collectSnapshotGarbage()`. For older local SQLite databases that need offline chunk-table migration, see [Size limits](/storage#size-limits).
209
205
 
210
206
  ## SDK
211
207
 
208
+ Open a `SqliteDatabase` handle with `openNodeSqliteDatabase()`, `openPostgresDatabase()`, or `openLibsqlDatabase()` (see [SDK session storage](/sdk/storage) and [SDK and local SQLite API](/storage#sdk-and-local-sqlite-api)), then open a `SqlSnapshotBlobStore` on that database:
209
+
212
210
  ```typescript
213
211
  import {
214
212
  captureWorktreeSnapshot,
@@ -217,16 +215,25 @@ import {
217
215
  SqlSnapshotBlobStore,
218
216
  type WorkspaceBinding,
219
217
  } from "@bastani/atomic";
220
-
221
- const blobs = await SqlSnapshotBlobStore.open(database);
222
- const capture = await captureWorktreeSnapshot(process.cwd(), { blobs });
223
- if (capture.status === "captured" || capture.status === "unchanged") {
224
- const binding: WorkspaceBinding = capture.binding; // { remotes, head, tree, envHash }
225
- const path = await restoreWorktreeSnapshot(capture.snapshot, { blobs });
226
- await verifyWorktree(binding, path);
218
+ import { openNodeSqliteDatabase } from "@bastani/atomic/storage";
219
+
220
+ const database = await openNodeSqliteDatabase("./sessions.sqlite");
221
+ try {
222
+ // Pass the same table prefix as your sessions when using a prefix (positional string).
223
+ const blobs = await SqlSnapshotBlobStore.open(database, "project_");
224
+ const capture = await captureWorktreeSnapshot(process.cwd(), { blobs });
225
+ if (capture.status === "captured" || capture.status === "unchanged") {
226
+ const binding: WorkspaceBinding = capture.binding; // { remotes, head, tree, envHash }
227
+ const path = await restoreWorktreeSnapshot(capture.snapshot, { blobs });
228
+ await verifyWorktree(binding, path);
229
+ }
230
+ } finally {
231
+ await database.close();
227
232
  }
228
233
  ```
229
234
 
235
+ `SqlSnapshotBlobStore.open(database, prefix?)` takes `prefix` as an optional positional string (unlike `SqlSessionStore.open(database, { prefix })`, which takes an options object). `SqlSnapshotBlobStore` does not own `database` and has no `close()` method; close your caller-owned `database` in a `finally` block after snapshot operations and any running garbage collection finish.
236
+
230
237
  ### Capture, restore, and verification
231
238
 
232
239
  - `captureWorktreeSnapshot(dir, { settings?, previous?, blobs?, signal? })`: resolves to `captured`, `unchanged`, `disabled`, or `unavailable` with a typed `GitUnavailableError` or `WorkspaceSnapshotError`.
@@ -240,14 +247,14 @@ if (capture.status === "captured" || capture.status === "unchanged") {
240
247
 
241
248
  ### Session resume and partial restores
242
249
 
243
- - `openSessionInWorktree(sessionManager, { settings, storeDir?, signal?, beforeRecord?, pendingMappings?, keepInPlace?, cannotRestore?, fallbackCwd?, skipMissingRecords? })`: checks every recorded checkout and restores drifted or missing ones without running blueprints, resolving `{ sessionManager, notices, unrestored, missingRecords }`. `resumeSessionWorktree` performs the same restore without reopening the session. For standard SDK resume with blueprints, pass `sessionManager` directly to `createAgentSession({ sessionManager })`.
244
- - `discardDegradedRestore(sessionManager, { settings, root?, signal? })`: records each partly restored worktree (or only `root`) without `degradedFrom` so it becomes the active restore target and releases the pinned snapshot on the next collection.
245
- - `degradedRestorePin(sessionManager, root)`: returns `{ snapshotId, since, base?, lapsed, work?, kept? }` for a pinned checkout, or `undefined` when unpinned.
250
+ - `openSessionInWorktree(sessionManager, { settings, storeDir?, signal?, beforeRecord?, pendingMappings?, keepInPlace?, cannotRestore?, fallbackCwd?, skipMissingRecords? })`: checks every recorded checkout and restores drifted or missing ones without running blueprints, resolving `{ sessionManager, notices, unrestored, missingRecords }`. `resumeSessionWorktree` performs the same restore without reopening the session. For standard SDK resume with blueprints, pass `sessionManager` directly to `createAgentSession({ sessionManager })` (see [Worktree snapshots in the SDK](/sdk#worktree-snapshots)).
251
+ - `discardDegradedRestore(sessionManager, { settings, root?, signal? })`: records each partly restored worktree (or only `root`) without `degradedFrom` so it becomes the active restore target and releases the original snapshot on the next collection.
252
+ - `degradedRestorePin(sessionManager, root)`: returns `{ snapshotId, since, base?, lapsed, work?, kept? }` for a checkout with an active partial-restore target, or `undefined` otherwise.
246
253
  - `withWorktreeRestoreNotices(notices, work)` and `currentWorktreeRestoreNotices()`: scope `worktree_restore` system prompt notices across sessions opened inside `work`.
247
254
 
248
- ### Reading snapshots from windowed sessions
255
+ ### Reading older snapshots on demand
249
256
 
250
- Sessions opened at the default tail window hold only the snapshot records needed for resume. Use `sessionManager.readWorktreeSnapshotPages()` and `sessionManager.loadWorktreeSnapshotRecords()` to inspect older snapshots on demand:
257
+ Sessions opened at the default tail window load only the snapshot records needed for resume into memory. Use `sessionManager.readWorktreeSnapshotPages()` and `sessionManager.loadWorktreeSnapshotRecords()` (see [SessionManager API](/session-format#sessionmanager-api)) to inspect older snapshots on demand:
251
258
 
252
259
  ```typescript
253
260
  const session = await SessionManager.open(store, sessionId);
@@ -261,7 +268,7 @@ const records = await session.loadWorktreeSnapshotRecords(ids);
261
268
 
262
269
  ### Garbage collection
263
270
 
264
- - `collectSnapshotGarbage(blobs, { graceSeconds?, signal? })`: deletes eligible unreferenced blobs from a `SqlSnapshotBlobStore` (default `graceSeconds` is `DEFAULT_BLOB_GRACE_SECONDS`, one hour) and resolves `{ deleted, pendingChunkMove? }`. Rejects non-SQL stores with `blob-store-unsupported`.
271
+ - `collectSnapshotGarbage(blobs, { graceSeconds?, signal? })`: deletes eligible unreferenced blobs from a `SqlSnapshotBlobStore` (default `graceSeconds` is `DEFAULT_BLOB_GRACE_SECONDS`, 1 hour) and resolves `{ deleted, pendingChunkMove? }`. Rejects non-SQL stores with `blob-store-unsupported`.
265
272
  - `scheduleSnapshotCollection(blobs, settings, { onFailure?, delayMs? })`: starts background collection when `settings.autoCollect` is enabled and due (sessions pass `SNAPSHOT_COLLECTION_SESSION_DELAY_MS`). Never rejects after validating settings; resolves with `collected`, `skipped`, `interrupted`, or `failed`, and does not keep an idle process alive.
266
273
  - `runningSnapshotCollection(blobs)`: returns a promise settling when the current process's active collection finishes, or `undefined` if none is running.
267
274
 
@@ -291,6 +298,7 @@ Match errors by class or `code`, never by message text. Use `isRetryableWorkspac
291
298
  | `WorkspaceRestoreError` | `tree-mismatch` | The materialized worktree tree differs from the snapshot | `target`, `expectedTree`, `actualTree` | Check `.gitattributes` filters on this host, then retry |
292
299
  | `WorkspaceRestoreError` | `unsafe-target` | `into` is non-empty (`not-empty`), or `removeRestoredWorktree` received a non-restored path (`not-restored`) | `target`, `reason` | Pass a new or empty directory, or omit `into` |
293
300
  | `WorkspaceRestoreError` | `unwritable-path` | A restore or removal could not write a directory or file | `target`, `snapshotId`, `cause` | Free disk space or fix directory permissions, then retry |
301
+ | `WorkspaceRestoreError` | `path-too-long` | On Windows, a restored worktree path or Git directory exceeds Git for Windows path limits. Nothing is written. | `snapshotId`, `target`, `limit`, `agentDir` | Set `ATOMIC_CODING_AGENT_DIR` to a shorter path ([Long paths on Windows](/guides/resume-on-any-machine#long-paths-on-windows)) |
294
302
  | `WorkspaceRestoreError` | `invalid-snapshot` | A snapshot record has unsafe remotes or malformed IDs or hashes | `snapshotId`, `field`, `reason` (`unsafe-remote`, `invalid-object-id`, `invalid-snapshot-id`, `invalid-blob-hash`) | Restore only trusted storage records or re-export on the recording machine |
295
303
  | `WorkspaceDriftError` | `tree-drift` | A checkout drifted from its snapshot and could not be restored | `root`, `expectedHead`, `actualHead`, `expectedTree`, `actualTree`, `snapshotId`, `reason?`, `restoreCode?`, `cause?` | Follow `hint` |
296
304
  | `WorkspaceCollectionError` | `collection-failed` | Database garbage collection failed (`retryable: true`; retained blobs are untouched) | `table`, `phase` (`claim`, `index`, `sweep`, `record`), `deleted`, `cause` | Check database permissions, disk space, and locks; drop broken triggers or views if hinted ([Size limits](/storage#size-limits)) |
@@ -11,14 +11,14 @@ const { session: inMemory } = await createAgentSession({
11
11
  sessionManager: SessionManager.inMemory(),
12
12
  });
13
13
  console.log("In-memory session:", inMemory.sessionFile ?? "(none)");
14
- inMemory.dispose();
14
+ await inMemory.dispose();
15
15
 
16
16
  // New persistent session
17
17
  const { session: newSession } = await createAgentSession({
18
18
  sessionManager: await SessionManager.create(process.cwd()),
19
19
  });
20
20
  console.log("New session file:", newSession.sessionFile);
21
- newSession.dispose();
21
+ await newSession.dispose();
22
22
 
23
23
  // Continue most recent session (or create new if none)
24
24
  const { session: continued, modelFallbackMessage } = await createAgentSession({
@@ -26,7 +26,7 @@ const { session: continued, modelFallbackMessage } = await createAgentSession({
26
26
  });
27
27
  if (modelFallbackMessage) console.log("Note:", modelFallbackMessage);
28
28
  console.log("Continued session:", continued.sessionFile);
29
- continued.dispose();
29
+ await continued.dispose();
30
30
 
31
31
  // List and open specific session
32
32
  const sessions = await SessionManager.list(process.cwd());
@@ -40,7 +40,7 @@ if (sessions.length > 0) {
40
40
  sessionManager: await SessionManager.open(sessions[0].path),
41
41
  });
42
42
  console.log(`\nOpened: ${opened.sessionId}`);
43
- opened.dispose();
43
+ await opened.dispose();
44
44
  }
45
45
 
46
46
  // Custom session directory (no cwd encoding)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.10.9",
3
+ "version": "0.10.10-alpha.2",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -118,13 +118,13 @@
118
118
  "prepack": "node -e \"require('node:fs').existsSync('scripts/split-dist.mjs') && import('./scripts/split-dist.mjs').then(() => import('./scripts/write-startup-files.mjs')).then(() => import('./scripts/write-startup-stages.mjs'))\""
119
119
  },
120
120
  "dependencies": {
121
- "@bastani/atomic-natives": "0.10.9",
122
- "@bastani/atomic-ai": "0.10.9",
123
- "@bastani/atomic-agent-core": "0.10.9",
124
- "@bastani/atomic-codemode": "0.10.9",
125
- "@bastani/atomic-tui": "0.10.9",
126
- "@bastani/atomic-schema": "0.10.9",
127
- "@bastani/atomic-telemetry": "0.10.9",
121
+ "@bastani/atomic-natives": "0.10.10-alpha.2",
122
+ "@bastani/atomic-ai": "0.10.10-alpha.2",
123
+ "@bastani/atomic-agent-core": "0.10.10-alpha.2",
124
+ "@bastani/atomic-codemode": "0.10.10-alpha.2",
125
+ "@bastani/atomic-tui": "0.10.10-alpha.2",
126
+ "@bastani/atomic-schema": "0.10.10-alpha.2",
127
+ "@bastani/atomic-telemetry": "0.10.10-alpha.2",
128
128
  "@silvia-odwyer/photon-node": "0.3.4",
129
129
  "chalk": "6.0.0",
130
130
  "glob": "14.0.6",
@@ -72,6 +72,20 @@
72
72
  "minLength": 1,
73
73
  "description": "Display name, also matched by --model patterns."
74
74
  },
75
+ "type": {
76
+ "anyOf": [
77
+ {
78
+ "type": "string",
79
+ "const": "chat"
80
+ },
81
+ {
82
+ "type": "string",
83
+ "const": "compactor"
84
+ }
85
+ ],
86
+ "default": "chat",
87
+ "description": "Model kind: \"chat\" (default) or \"compactor\" for a dedicated remote compaction endpoint."
88
+ },
75
89
  "api": {
76
90
  "type": "string",
77
91
  "minLength": 1,
@@ -82,10 +96,14 @@
82
96
  "minLength": 1,
83
97
  "description": "Overrides the provider baseUrl."
84
98
  },
99
+ "endpointPath": {
100
+ "type": "string",
101
+ "description": "Endpoint path appended to baseUrl for compactor requests (default \"/compact\"). Set to \"\" to POST directly to baseUrl. Applies only to compactor models."
102
+ },
85
103
  "reasoning": {
86
104
  "type": "boolean",
87
105
  "default": false,
88
- "description": "Whether the model supports thinking."
106
+ "description": "Whether the model supports thinking. Applies only to chat models."
89
107
  },
90
108
  "thinkingLevelMap": {
91
109
  "$ref": "#/$defs/ThinkingLevelMap",
@@ -118,13 +136,18 @@
118
136
  "type": "number",
119
137
  "exclusiveMinimum": 0,
120
138
  "default": 128000,
121
- "description": "Context window in tokens."
139
+ "description": "Context window in tokens. Applies only to chat models."
122
140
  },
123
141
  "maxTokens": {
124
142
  "type": "number",
125
143
  "exclusiveMinimum": 0,
126
144
  "default": 16384,
127
- "description": "Maximum output tokens."
145
+ "description": "Maximum output tokens. Defaults to 16384 for chat models. When omitted on compactor models, defaults to 32000 estimated tokens, capped at 50% of the automatic trigger."
146
+ },
147
+ "timeoutMs": {
148
+ "type": "number",
149
+ "exclusiveMinimum": 0,
150
+ "description": "Wall-clock timeout in milliseconds for one compactor request (default 120000). Applies only to compactor models."
128
151
  },
129
152
  "samplingParams": {
130
153
  "type": "object",
@@ -181,6 +204,13 @@
181
204
  },
182
205
  "description": "samplingParams per thinking level, merged over samplingParams."
183
206
  },
207
+ "compactionParams": {
208
+ "type": "object",
209
+ "patternProperties": {
210
+ "^.*$": {}
211
+ },
212
+ "description": "API-specific request-body parameters merged into { messages, query, model } for compactor requests. Omit to let the remote API use its own defaults. Applies only to compactor models."
213
+ },
184
214
  "headers": {
185
215
  "type": "object",
186
216
  "patternProperties": {
@@ -208,9 +238,18 @@
208
238
  "minLength": 1,
209
239
  "description": "Display name, also matched by --model patterns."
210
240
  },
241
+ "baseUrl": {
242
+ "type": "string",
243
+ "minLength": 1,
244
+ "description": "Overrides the model baseUrl."
245
+ },
246
+ "endpointPath": {
247
+ "type": "string",
248
+ "description": "Endpoint path appended to baseUrl for compactor requests (default \"/compact\"). Set to \"\" to POST directly to baseUrl. Applies only to compactor models."
249
+ },
211
250
  "reasoning": {
212
251
  "type": "boolean",
213
- "description": "Whether the model supports thinking."
252
+ "description": "Whether the model supports thinking. Applies only to chat models."
214
253
  },
215
254
  "thinkingLevelMap": {
216
255
  "$ref": "#/$defs/ThinkingLevelMap",
@@ -293,12 +332,17 @@
293
332
  "contextWindow": {
294
333
  "type": "number",
295
334
  "exclusiveMinimum": 0,
296
- "description": "Context window in tokens."
335
+ "description": "Context window in tokens. Applies only to chat models."
297
336
  },
298
337
  "maxTokens": {
299
338
  "type": "number",
300
339
  "exclusiveMinimum": 0,
301
- "description": "Maximum output tokens."
340
+ "description": "Maximum output tokens. On compactor models, sets the upper bound on compacted output in estimated tokens, capped at 50% of the automatic trigger."
341
+ },
342
+ "timeoutMs": {
343
+ "type": "number",
344
+ "exclusiveMinimum": 0,
345
+ "description": "Wall-clock timeout in milliseconds for one compactor request (default 120000). Applies only to compactor models."
302
346
  },
303
347
  "samplingParams": {
304
348
  "type": "object",
@@ -355,6 +399,13 @@
355
399
  },
356
400
  "description": "samplingParams per thinking level, merged over samplingParams."
357
401
  },
402
+ "compactionParams": {
403
+ "type": "object",
404
+ "patternProperties": {
405
+ "^.*$": {}
406
+ },
407
+ "description": "API-specific request-body parameters merged into { messages, query, model } for compactor requests. Omit to let the remote API use its own defaults. Applies only to compactor models."
408
+ },
358
409
  "headers": {
359
410
  "type": "object",
360
411
  "patternProperties": {
@@ -1164,7 +1215,7 @@
1164
1215
  "const": "state-image-urls"
1165
1216
  }
1166
1217
  ],
1167
- "description": "How the service takes classifier images. \"assets\" sends TypeSafe's assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. \"images\" sends Clef's images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. \"state-image-urls\" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat models only."
1218
+ "description": "How the service takes classifier images. \"assets\" sends TypeSafe's assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. \"images\" sends Clef's images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. \"state-image-urls\" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat and compactor models."
1168
1219
  },
1169
1220
  "sendImageOptInHeader": {
1170
1221
  "type": "boolean",