@bastani/atomic 0.10.14-alpha.1 → 0.10.15-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
  6. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
  7. package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
  8. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  9. package/dist/_shared/runtime-O4KCSG4C.js +2 -2
  10. package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
  11. package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
  12. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  13. package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
  14. package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
  15. package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
  16. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
  17. package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
  18. package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
  19. package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
  20. package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
  21. package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
  22. package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
  23. package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
  24. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  25. package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
  26. package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
  27. package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
  28. package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
  29. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  30. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  31. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  32. package/dist/builtin/intercom/package.json +1 -1
  33. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  34. package/dist/builtin/mcp/package.json +1 -1
  35. package/dist/builtin/subagents/package.json +1 -1
  36. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  37. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  38. package/dist/builtin/web-access/package.json +1 -1
  39. package/dist/cli/auth-cli.code.js +1 -1
  40. package/dist/cli/auth-cli.impl.js +3 -3
  41. package/dist/cli/auth-cli.js +3 -3
  42. package/dist/cli/blueprint-command.impl.js +3 -3
  43. package/dist/cli/blueprint-command.js +3 -3
  44. package/dist/cli/intercom-command.code.js +3 -3
  45. package/dist/cli/intercom-command.impl.js +3 -3
  46. package/dist/cli/intercom-command.js +3 -3
  47. package/dist/cli/list-models.impl.js +3 -3
  48. package/dist/cli/list-models.js +3 -3
  49. package/dist/cli/session-picker.code.js +1 -1
  50. package/dist/cli/session-picker.impl.js +3 -3
  51. package/dist/cli/session-picker.js +3 -3
  52. package/dist/cli/startup-ui.code.js +1 -1
  53. package/dist/cli/startup-ui.impl.js +3 -3
  54. package/dist/cli/startup-ui.js +3 -3
  55. package/dist/cli/storage-command.impl.js +3 -3
  56. package/dist/cli/storage-command.js +3 -3
  57. package/dist/cli/storage-search-session.code.js +1 -1
  58. package/dist/cli/storage-search-session.impl.js +3 -3
  59. package/dist/cli/storage-search-session.js +3 -3
  60. package/dist/cli/team-command.code.js +1 -1
  61. package/dist/cli/team-command.impl.js +3 -3
  62. package/dist/cli/team-command.js +3 -3
  63. package/dist/cli.js +2 -2
  64. package/dist/core/compaction/compactor.d.ts +0 -8
  65. package/dist/core/debug.impl.js +3 -3
  66. package/dist/core/debug.js +3 -3
  67. package/dist/core/export-html/card-projection.impl.js +3 -3
  68. package/dist/core/export-html/card-projection.js +3 -3
  69. package/dist/core/export-html/index.code.js +2 -2
  70. package/dist/core/export-html/index.impl.js +3 -3
  71. package/dist/core/export-html/index.js +3 -3
  72. package/dist/core/export-html/json-spans.impl.js +3 -3
  73. package/dist/core/export-html/json-spans.js +3 -3
  74. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  75. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  76. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  77. package/dist/core/export-html/tool-renderer.js +3 -3
  78. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  79. package/dist/core/extensions/jiti-loader.js +3 -3
  80. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  81. package/dist/core/extensions/jiti-static-loader.js +3 -3
  82. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  83. package/dist/core/extensions/loader-host-modules.js +3 -3
  84. package/dist/core/intercom-broker-control-host.code.js +1 -1
  85. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  86. package/dist/core/intercom-broker-control-host.js +3 -3
  87. package/dist/core/intercom-broker-control.code.js +2 -2
  88. package/dist/core/intercom-broker-control.impl.js +3 -3
  89. package/dist/core/intercom-broker-control.js +3 -3
  90. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  91. package/dist/core/package-manager-storage-adapters.js +3 -3
  92. package/dist/core/sdk.code.js +1 -1
  93. package/dist/core/sdk.impl.js +3 -3
  94. package/dist/core/sdk.js +3 -3
  95. package/dist/core/session-manager-core.js +3 -3
  96. package/dist/core/session-manager-list.impl.js +3 -3
  97. package/dist/core/session-manager-list.js +3 -3
  98. package/dist/core/session-manager.impl.js +3 -3
  99. package/dist/core/session-manager.js +3 -3
  100. package/dist/core/session-storage.impl.js +3 -3
  101. package/dist/core/session-storage.js +3 -3
  102. package/dist/core/storage/index.js +2 -2
  103. package/dist/core/storage/node-sqlite-thread.js +2 -2
  104. package/dist/core/storage/node-sqlite.js +2 -2
  105. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  106. package/dist/core/storage/offline-snapshot-file.js +3 -3
  107. package/dist/core/storage/provider.js +2 -2
  108. package/dist/core/storage/selection.js +2 -2
  109. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  110. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  111. package/dist/core/storage/session/branch-fork-source.js +3 -3
  112. package/dist/core/storage/session/card-view.impl.js +3 -3
  113. package/dist/core/storage/session/card-view.js +3 -3
  114. package/dist/core/storage/session/child-reader.code.js +2 -2
  115. package/dist/core/storage/session/child-reader.impl.js +3 -3
  116. package/dist/core/storage/session/child-reader.js +3 -3
  117. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  118. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  119. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  120. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  121. package/dist/core/storage/session/expanded-child-details.js +3 -3
  122. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  123. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  124. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  125. package/dist/core/storage/session/fork-row-index.js +3 -3
  126. package/dist/core/storage/session/fork-staging.code.js +1 -1
  127. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  128. package/dist/core/storage/session/fork-staging.js +3 -3
  129. package/dist/core/storage/session/fork-window.code.js +2 -2
  130. package/dist/core/storage/session/fork-window.impl.js +3 -3
  131. package/dist/core/storage/session/fork-window.js +3 -3
  132. package/dist/core/storage/session/history-pages.impl.js +3 -3
  133. package/dist/core/storage/session/history-pages.js +3 -3
  134. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  135. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  136. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  137. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  138. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  139. package/dist/core/storage/session/memory-session-store.js +3 -3
  140. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  141. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  142. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  143. package/dist/core/storage/session/released-history-files.code.js +1 -1
  144. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  145. package/dist/core/storage/session/released-history-files.js +3 -3
  146. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  147. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  148. package/dist/core/storage/session/session-resume.impl.js +3 -3
  149. package/dist/core/storage/session/session-resume.js +3 -3
  150. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  151. package/dist/core/storage/session/snapshot-cut.js +3 -3
  152. package/dist/core/storage/session/snapshot-history.code.js +2 -2
  153. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  154. package/dist/core/storage/session/snapshot-history.js +3 -3
  155. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  156. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  157. package/dist/core/storage/session/sql-session-store.js +3 -3
  158. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  159. package/dist/core/storage/session/tree-outline.js +3 -3
  160. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  161. package/dist/core/storage/session/tree-presentation.js +3 -3
  162. package/dist/core/storage/storage-status.impl.js +3 -3
  163. package/dist/core/storage/storage-status.js +3 -3
  164. package/dist/core/storage/team.impl.js +3 -3
  165. package/dist/core/storage/team.js +3 -3
  166. package/dist/core/structured-output/index.code.js +1 -1
  167. package/dist/core/structured-output/index.impl.js +3 -3
  168. package/dist/core/structured-output/index.js +3 -3
  169. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  170. package/dist/core/tasks/task-completion-entry.js +3 -3
  171. package/dist/core/tasks/task-file-history.code.js +2 -2
  172. package/dist/core/tasks/task-file-history.impl.js +3 -3
  173. package/dist/core/tasks/task-file-history.js +3 -3
  174. package/dist/core/tasks/task-reference-archive.code.js +2 -2
  175. package/dist/core/tasks/task-reference-archive.js +3 -3
  176. package/dist/core/tasks/task-reference-identity.js +3 -3
  177. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  178. package/dist/core/tasks/task-reference-stream.js +3 -3
  179. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  180. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  181. package/dist/core/tasks/task-view-source.impl.js +3 -3
  182. package/dist/core/tasks/task-view-source.js +3 -3
  183. package/dist/core/tools/read-url.impl.js +3 -3
  184. package/dist/core/tools/read-url.js +3 -3
  185. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  186. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  187. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  188. package/dist/core/worktree-snapshot/errors.js +3 -3
  189. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  190. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  191. package/dist/extensions/codemode/execute.impl.js +3 -3
  192. package/dist/extensions/codemode/execute.js +3 -3
  193. package/dist/extensions/codemode/renderer.impl.js +3 -3
  194. package/dist/extensions/codemode/renderer.js +3 -3
  195. package/dist/extensions/mcp/cli.code.js +1 -1
  196. package/dist/extensions/mcp/cli.impl.js +3 -3
  197. package/dist/extensions/mcp/cli.js +3 -3
  198. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  199. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  200. package/dist/extensions/mcp/cli.lazy.js +3 -3
  201. package/dist/extensions/mcp/runtime.code.js +1 -1
  202. package/dist/extensions/mcp/runtime.impl.js +3 -3
  203. package/dist/extensions/mcp/runtime.js +3 -3
  204. package/dist/index.d.ts +21 -1
  205. package/dist/index.js +2 -2
  206. package/dist/main-first-time-setup.code.js +1 -1
  207. package/dist/main-first-time-setup.impl.js +3 -3
  208. package/dist/main-first-time-setup.js +3 -3
  209. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  210. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  211. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  212. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  213. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  214. package/dist/modes/print-mode.js +1 -1
  215. package/dist/package-manager-cli.code.js +2 -2
  216. package/dist/package-manager-cli.impl.js +3 -3
  217. package/dist/package-manager-cli.js +3 -3
  218. package/dist/startup-files.json +1 -1
  219. package/dist/startup-stages/6.js +1 -1
  220. package/dist/utils/startup-database-spare.code.js +1 -1
  221. package/dist/utils/startup-database-spare.impl.js +3 -3
  222. package/dist/utils/startup-database-spare.js +3 -3
  223. package/dist/utils/tools-manager.impl.js +3 -3
  224. package/dist/utils/tools-manager.js +3 -3
  225. package/docs/background-tasks/reference.md +182 -0
  226. package/docs/background-tasks.md +98 -405
  227. package/docs/build.md +67 -27
  228. package/docs/changelog.mdx +9 -0
  229. package/docs/codemode.md +108 -39
  230. package/docs/compaction/branch-summaries.md +54 -0
  231. package/docs/compaction/custom-compactors.md +161 -0
  232. package/docs/compaction/memory-compaction.md +77 -0
  233. package/docs/compaction/reference.md +86 -38
  234. package/docs/compaction.md +51 -252
  235. package/docs/computer-use.md +169 -321
  236. package/docs/containerization.md +71 -57
  237. package/docs/custom-provider/api-reference.md +119 -25
  238. package/docs/custom-provider/oauth.md +114 -132
  239. package/docs/custom-provider/override.md +37 -27
  240. package/docs/custom-provider/registration.md +107 -83
  241. package/docs/custom-provider/streaming.md +85 -71
  242. package/docs/custom-provider.md +85 -52
  243. package/docs/development.md +39 -29
  244. package/docs/docs.json +76 -63
  245. package/docs/environment-variables.md +94 -44
  246. package/docs/extensions/api-reference.md +86 -43
  247. package/docs/extensions/authoring.md +162 -154
  248. package/docs/extensions/events.md +80 -25
  249. package/docs/extensions/examples.md +90 -85
  250. package/docs/extensions/ui.md +206 -82
  251. package/docs/extensions.md +79 -108
  252. package/docs/getting-started/authentication.md +67 -36
  253. package/docs/getting-started/first-session.md +53 -43
  254. package/docs/getting-started/installation.md +116 -89
  255. package/docs/getting-started/project-instructions.md +48 -34
  256. package/docs/guides/configuration.md +82 -20
  257. package/docs/guides/non-interactive.md +66 -24
  258. package/docs/guides/resume-on-any-machine.md +135 -82
  259. package/docs/guides/team-setup.md +114 -105
  260. package/docs/guides.md +76 -32
  261. package/docs/herdr.md +15 -16
  262. package/docs/how-atomic-works.md +140 -0
  263. package/docs/index.md +58 -44
  264. package/docs/intercom/operations.md +141 -151
  265. package/docs/intercom/reference.md +85 -108
  266. package/docs/intercom.md +84 -145
  267. package/docs/json.md +120 -67
  268. package/docs/keybindings.md +85 -49
  269. package/docs/libraries/agent-core.md +137 -275
  270. package/docs/libraries/ai.md +100 -84
  271. package/docs/libraries/codemode.md +210 -300
  272. package/docs/libraries/schema.md +59 -53
  273. package/docs/libraries/storage-postgres.md +49 -35
  274. package/docs/libraries/telemetry.md +153 -354
  275. package/docs/libraries/tui.md +265 -393
  276. package/docs/libraries.md +42 -26
  277. package/docs/llama-cpp.md +171 -161
  278. package/docs/mcp-servers.md +90 -51
  279. package/docs/models/choose-a-model.md +188 -0
  280. package/docs/models/reference.md +74 -30
  281. package/docs/models.md +153 -88
  282. package/docs/orchestration/migrating-workflows.md +23 -16
  283. package/docs/orchestration/patterns.md +39 -44
  284. package/docs/orchestration.md +65 -26
  285. package/docs/packages/authoring.md +51 -29
  286. package/docs/packages/reference.md +42 -21
  287. package/docs/packages.md +69 -58
  288. package/docs/programmatic.md +118 -24
  289. package/docs/prompt-templates.md +84 -83
  290. package/docs/providers/reference.md +43 -48
  291. package/docs/providers.md +219 -451
  292. package/docs/quickstart.md +140 -120
  293. package/docs/reference/cli.md +135 -97
  294. package/docs/reference.md +20 -18
  295. package/docs/rpc/examples.md +76 -20
  296. package/docs/rpc/extension-ui.md +64 -38
  297. package/docs/rpc/protocol.md +361 -110
  298. package/docs/rpc.md +57 -17
  299. package/docs/sdk/reference.md +409 -534
  300. package/docs/sdk/storage.md +53 -13
  301. package/docs/sdk/structured-decisions.md +82 -56
  302. package/docs/sdk/web-server.md +57 -43
  303. package/docs/sdk.md +106 -84
  304. package/docs/security.md +42 -64
  305. package/docs/session-format.md +62 -38
  306. package/docs/sessions.md +99 -214
  307. package/docs/settings.md +165 -195
  308. package/docs/shell-aliases.md +9 -6
  309. package/docs/skills/authoring.md +69 -48
  310. package/docs/skills/reference.md +51 -20
  311. package/docs/skills.md +99 -148
  312. package/docs/slash-commands.md +129 -0
  313. package/docs/storage/custom-adapters.md +160 -85
  314. package/docs/storage/jsonl.md +81 -66
  315. package/docs/storage/postgres/pgbouncer.md +120 -126
  316. package/docs/storage/postgres/tuning.md +120 -143
  317. package/docs/storage/postgres.md +314 -330
  318. package/docs/storage/sqlite.md +71 -42
  319. package/docs/storage.md +298 -302
  320. package/docs/subagents/authoring.md +55 -38
  321. package/docs/subagents/reference.md +73 -33
  322. package/docs/subagents.md +119 -187
  323. package/docs/terminal-setup.md +50 -38
  324. package/docs/termux.md +67 -41
  325. package/docs/themes/reference.md +23 -19
  326. package/docs/themes.md +142 -127
  327. package/docs/tmux.md +47 -55
  328. package/docs/tools.md +147 -109
  329. package/docs/tui/reference.md +166 -214
  330. package/docs/tui.md +196 -341
  331. package/docs/usage.md +118 -138
  332. package/docs/verification.md +79 -51
  333. package/docs/web-access.md +121 -101
  334. package/docs/windows.md +26 -27
  335. package/docs/worktree-snapshots/reference.md +245 -0
  336. package/docs/worktree-snapshots.md +71 -259
  337. package/package.json +8 -8
  338. package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
  339. package/docs/guides/intercom.md +0 -32
  340. package/docs/guides/orchestration.md +0 -28
  341. package/docs/guides/subagents.md +0 -37
@@ -1,26 +1,28 @@
1
1
  ---
2
- title: "JSONL setup"
3
- sidebarTitle: "Setup"
4
- description: "Keep sessions as plain JSONL files in a directory on one machine: when to choose it, how to select it, where the files go, how several Atomic processes share it, what it doesn't do, and how to move to SQLite or PostgreSQL."
2
+ title: "JSONL storage"
3
+ sidebarTitle: "JSONL"
4
+ description: "Store Atomic sessions as plain JSONL text files in a local directory: selection options, file layout and sidecars, multi-process concurrency, limitations, and migration."
5
5
  ---
6
6
 
7
- A JSONL store keeps each session as a plain text file in a directory you choose. Each line of the file is one JSON object. The first line describes the session, and each later line is one entry of the conversation. [Session file format](/session-format) describes every field.
7
+ A JSONL store saves each session as one plain text file in a directory you choose. Every line is a JSON object: line 1 is the session header, and each subsequent line is one conversation entry. See [Session file format](/session-format) for the complete schema.
8
8
 
9
- ## When to choose JSONL
9
+ <Note>
10
+ A JSONL store holds **sessions only**. Intercom continues using its own store (local files by default, or top-level `storage` when configured).
11
+ </Note>
10
12
 
11
- Choose JSONL when you want your sessions as ordinary files on one machine:
13
+ ## When to choose JSONL
12
14
 
13
- - You can read, search, or compare a session with any text tool.
14
- - You can back up or copy the directory like any other folder.
15
- - You can delete a session by deleting its file.
15
+ Choose JSONL when you want sessions as ordinary plain-text files on a single machine:
16
16
 
17
- Otherwise, keep the default [local SQLite](/storage/sqlite) store. To share sessions between machines, use [PostgreSQL](/storage/postgres).
17
+ - Inspect, grep, or diff sessions with standard text tools.
18
+ - Copy or back up the folder like any regular directory.
19
+ - Delete individual sessions by deleting their files.
18
20
 
19
- A JSONL store holds sessions only. Intercom keeps using the store it would use without it.
21
+ For most single-machine workflows, keep the default [local SQLite](/storage/sqlite) store (which adds worktree snapshots and zero-copy forks). To share sessions across machines, use [PostgreSQL](/storage/postgres).
20
22
 
21
23
  ## Select a JSONL store
22
24
 
23
- Add `sessions.storage` to `~/.atomic/agent/settings.json`, or to a trusted project's `.atomic/settings.json`:
25
+ Configure `sessions.storage` in `~/.atomic/agent/settings.json` or a trusted project's `.atomic/settings.json`:
24
26
 
25
27
  ```json
26
28
  {
@@ -30,28 +32,28 @@ Add `sessions.storage` to `~/.atomic/agent/settings.json`, or to a trusted proje
30
32
  }
31
33
  ```
32
34
 
33
- You can select the same store in other ways:
35
+ You can also select a JSONL directory from the environment or CLI:
34
36
 
35
- | Where | What to set | A relative path starts from |
37
+ | Source | Setting / flag | Relative path resolves from |
36
38
  | --- | --- | --- |
37
- | Settings | `sessions.storage` set to `{ "dir": "<directory>" }` | The [storage home](/storage#storage-home) |
38
- | Environment | `ATOMIC_SESSIONS_STORAGE='{"dir":"<directory>"}'` | The storage home |
39
- | Environment | `ATOMIC_CODING_AGENT_SESSION_DIR=<directory>` | The current directory |
40
- | Command line | `atomic --session-dir <directory>` | The current directory |
39
+ | Settings | `sessions.storage` set to `{ "dir": "<directory>" }` | [Storage home](/storage#storage-home) |
40
+ | Environment | `ATOMIC_SESSIONS_STORAGE='{"dir":"<directory>"}'` | [Storage home](/storage#storage-home) |
41
+ | Environment | `ATOMIC_CODING_AGENT_SESSION_DIR=<directory>` | Current working directory |
42
+ | Command line | `atomic --session-dir <directory>` | Current working directory |
41
43
 
42
- Use an absolute path to avoid surprises. Atomic creates the directory if it is missing. From the SDK, pass `sessionStore: { kind: "jsonl", dir }`, as [SDK session storage](/sdk/storage) shows.
44
+ Use an absolute path to avoid path-resolution surprises. Atomic creates the directory automatically if it does not exist. From the SDK, pass `sessionStore: { kind: "jsonl", dir }` (see [SDK session storage](/sdk/storage)).
43
45
 
44
- Rules for these settings:
46
+ Validation rules:
45
47
 
46
- - `"dir"` works only in `sessions.storage` and `ATOMIC_SESSIONS_STORAGE`. In top-level `storage`, `--storage`, `--storage-file`, or `ATOMIC_STORAGE`, it fails with `StorageConfigError`.
47
- - `--session-dir` can't be combined with `--session-store` or `--no-session`.
48
- - A non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` can't be combined with `ATOMIC_SESSIONS_STORAGE`, `--storage`, or `--storage-file`. Atomic stops at startup with `StorageConfigError` (`conflicting-overrides`).
48
+ - `{ "dir": "..." }` is valid only in `sessions.storage` and `ATOMIC_SESSIONS_STORAGE`. Using it in top-level `storage`, `--storage`, `--storage-file`, or `ATOMIC_STORAGE` fails with `StorageConfigError`.
49
+ - `--session-dir` cannot be combined with `--session-store` or `--no-session`.
50
+ - A non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` cannot be combined with `ATOMIC_SESSIONS_STORAGE`, `--storage`, or `--storage-file` (`StorageConfigError` with reason `conflicting-overrides`).
49
51
 
50
- When several of these are set, the one higher in [the precedence list](/storage#which-selection-wins) wins. Run `atomic storage status` in your project to see which store Atomic uses and where the choice came from.
52
+ When multiple options are set, see [Which selection wins](/storage#which-selection-wins). Run `atomic storage status` in your project directory to inspect the active store.
51
53
 
52
54
  ## Where the files go
53
55
 
54
- Every session file sits directly in the directory you chose:
56
+ Session files sit directly inside the directory you selected:
55
57
 
56
58
  ```text
57
59
  /home/me/atomic-sessions/
@@ -59,59 +61,72 @@ Every session file sits directly in the directory you chose:
59
61
  2026-11-26T10-02-14-512Z_9f1c03ab…41d0b2.jsonl
60
62
  ```
61
63
 
62
- A file's name is the time the session was created, with `:` and `.` replaced by `-`, then `_`, then the SHA-256 hash of the session ID in hex. Sessions from every project share the directory. The first line of each file records the project's working directory (`cwd`), which is how `/resume` finds the sessions of the current project.
64
+ Filenames combine the creation timestamp (`:` and `.` replaced with `-`), `_`, and the hex SHA-256 hash of the session ID. Sessions from all projects share the same directory; line 1 records `cwd`, which `/resume` uses to filter sessions for the current project.
63
65
 
64
- Atomic can also put these next to the session files:
66
+ Alongside `.jsonl` files, Atomic maintains these sidecars and folders:
65
67
 
66
- - **`.session.lock` and `.session.lock.*`.** `.session.lock` is a folder present while any Atomic process is writing. Persistent `.session.lock.*` files next to it hold operating-system advisory locks for coordinating concurrent writers. See [Several Atomic processes](#several-atomic-processes).
67
- - **Backups before compaction.** Before Atomic [compacts](/compaction) a session, it saves a copy beside the file, named `<session file>.<timestamp>.<label>.bak`. Atomic never deletes these, so remove old ones yourself.
68
- - **`tool-results/`.** Long tool output saved in files. Atomic deletes a `tool-results/` folder once its newest file is more than 30 days old.
68
+ | Entry | Purpose |
69
+ | --- | --- |
70
+ | `<session>.jsonl.idx` | Index sidecar that accelerates reopening and history reads (verified against the `.jsonl` file on cold load). Deleting via `/resume` (`Ctrl+D`) removes it automatically; if you delete a `.jsonl` file manually, remove its `.idx` file too (orphaned `.idx` files are otherwise ignored). |
71
+ | `.atomic-chat-<sha256>` | Sidecar files storing reader-only chat metadata (such as subagent child records) outside the main conversation file. |
72
+ | `.session.lock` and `.session.lock.*` | Lock directory and striped OS advisory lock files coordinating concurrent writers. |
73
+ | `<session>.<timestamp>.<label>.bak` | Pre-[compaction](/compaction) backup saved before writing a compaction boundary. Never auto-deleted—prune old backups yourself. |
74
+ | `tool-results/` | Overflow files for long tool output. Deleted automatically once the newest file in `tool-results/` is over 30 days old. |
69
75
 
70
- To delete a session, delete its `.jsonl` file, or select it in `/resume`, press `Ctrl+D`, and confirm. Atomic moves the file to the trash when the `trash` command is installed.
76
+ To delete a session, select it in `/resume` and press `Ctrl+D` (moves to trash when a `trash` command is installed), or delete its `.jsonl` and `.jsonl.idx` files directly.
71
77
 
72
78
  ## Several Atomic processes
73
79
 
74
- Several Atomic processes on one machine can use the same directory at once:
80
+ Multiple Atomic processes on one machine can safely share the same JSONL directory at the same time:
75
81
 
76
- - **Operating-system advisory locks and per-session-file locking.** Writers coordinate through OS advisory locks (`flock` on Unix, `LockFileEx` on Windows) while holding the `.session.lock` folder together as a group so older Atomic versions remain excluded. Writes to different session files run concurrently across a fixed set of striped lock files, while writes to the same session file stay serialized. If a writer process is killed, the operating system releases its advisory locks immediately and the next writer cleans up `.session.lock` right away instead of waiting for the 10-second stale window.
77
- - **Durable grouped writes.** Saves that queue up while another save holds the lock are written together under one lock, and every save waits until its bytes are synced to disk before it is acknowledged. A new, forked, or replaced session file is synced before it is linked or renamed into place, and its folder is synced after. On macOS this uses plain `fsync(2)`, matching the default local SQLite store (`fullfsync` off) and the standalone binary; Linux uses `fdatasync(2)` and Windows uses `FlushFileBuffers` (NTFS journals directory entries, so Windows skips the directory sync).
78
- - **Files kept open while writing.** While a session is being written, Atomic keeps its file open between saves and closes it soon after the last one. On Windows, Atomic closes each file after it writes, because Windows won't delete or replace an open file.
82
+ - **Parallel across sessions, serialized per session.** Writers coordinate through operating-system advisory locks striped across 32 lock files (while also maintaining `.session.lock` for compatibility with older Atomic releases). Writes to different session files proceed concurrently, while writes to the same session file wait in order. If a writer process crashes or is killed, the OS releases its lock immediately so the next writer proceeds without waiting out a 10-second stale timeout.
83
+ - **Crash-safe grouped saves.** Saves queued behind an active write are batched together under one lock, and every save waits until its bytes are synced to disk before being acknowledged. New, forked, or replaced session files are synced before being renamed into place.
84
+ - **File handles during writes.** On Unix/macOS, Atomic keeps an active session file open between rapid saves and closes it once writes pause. On Windows, Atomic closes each file immediately after writing so other operations can delete or replace it.
79
85
 
80
- Keep the directory on a local disk of one machine. Don't share it between machines through a network drive or a cloud-synced folder.
86
+ <Warning>
87
+ Keep a JSONL directory on a local disk of a single machine. Do **not** share it across machines over a network drive (NFS/SMB) or cloud-synced folder.
88
+ </Warning>
81
89
 
82
90
  ## What JSONL doesn't do
83
91
 
84
- Compared with local SQLite, a JSONL store:
92
+ Compared with local SQLite or PostgreSQL, a JSONL directory store:
85
93
 
86
- - **Can't be shared between machines.** Use [PostgreSQL](/storage/postgres) for that.
87
- - **Copies forks.** In SQLite and PostgreSQL, a fork [shares its parent's history](/storage#shared-history-forks). In JSONL, a fork writes a new file with a full copy of that history, so forking a long session takes longer and uses more disk.
88
- - **Records no worktree snapshots.** [Worktree snapshots](/worktree-snapshots) need a SQL database store.
89
- - **Keeps subagents on this machine.** Subagents launched from a session in a JSONL store can't be [resumed on another machine](/guides/resume-on-any-machine).
94
+ - **Cannot be shared across machines.** Use [PostgreSQL](/storage/postgres) for multi-machine access.
95
+ - **Writes full copies on fork.** Unlike SQLite and PostgreSQL [shared-history forks](/storage#shared-history-forks), JSONL forks duplicate the full parent file on disk.
96
+ - **Does not record worktree snapshots.** [Worktree snapshots](/worktree-snapshots) require a SQL database store.
97
+ - **Cannot resume subagents on another machine.** Subagents launched from a JSONL store stay tied to the local machine (see [Resume on any machine](/guides/resume-on-any-machine)).
90
98
 
91
99
  ## Move to SQLite or PostgreSQL
92
100
 
93
- Export the sessions while the JSONL store is still selected. If you select it with `--session-dir`, set `ATOMIC_SESSIONS_STORAGE` for this one command instead, because `atomic storage export` doesn't take `--session-dir`:
94
-
95
- ```bash
96
- ATOMIC_SESSIONS_STORAGE='{"dir":"/home/me/atomic-sessions"}' atomic storage export ~/moved
97
- ```
98
-
99
- Then stop selecting the JSONL store. Remove `sessions.storage` from your settings, and unset `ATOMIC_SESSIONS_STORAGE` and `ATOMIC_CODING_AGENT_SESSION_DIR`.
100
-
101
- To move the sessions into the default local SQLite store, import them:
102
-
103
- ```bash
104
- atomic storage import ~/moved
105
- ```
106
-
107
- To move them into PostgreSQL, [set up the database](/storage/postgres#set-up-the-database), join it, and import into it by name:
108
-
109
- ```bash
110
- (umask 077; printf 'Runtime password: '; read -rs password; printf '\n'; printf '%s' "$password" > ~/atomic-db-password)
111
- atomic storage join 'postgresql://atomic_runtime@db.example.com:5432/atomic' --password-file ~/atomic-db-password
112
- rm ~/atomic-db-password # atomic storage join keeps its own copy
113
- jq .storage ~/.atomic/agent/settings.json > new-storage.json
114
- atomic storage import ~/moved --storage-file new-storage.json
115
- ```
116
-
117
- Import leaves the JSONL files in place. Delete the directory once you have checked the sessions in their new store. See [Exporting and importing sessions](/storage#exporting-and-importing-sessions) for what an export holds.
101
+ <Steps>
102
+ <Step title="Export your JSONL sessions">
103
+ Run `atomic storage export` while the JSONL store is still selected. If you normally select it with `--session-dir`, pass `ATOMIC_SESSIONS_STORAGE` for this command instead (`atomic storage export` does not accept `--session-dir`):
104
+
105
+ ```bash
106
+ ATOMIC_SESSIONS_STORAGE='{"dir":"/home/me/atomic-sessions"}' atomic storage export ~/moved
107
+ ```
108
+ </Step>
109
+ <Step title="Stop selecting the JSONL store">
110
+ Remove `sessions.storage` from your settings, and unset `ATOMIC_SESSIONS_STORAGE` and `ATOMIC_CODING_AGENT_SESSION_DIR`.
111
+ </Step>
112
+ <Step title="Import into SQLite or PostgreSQL">
113
+ **Into default local SQLite:**
114
+
115
+ ```bash
116
+ atomic storage import ~/moved
117
+ ```
118
+
119
+ **Into PostgreSQL** (after completing [Set up the database](/storage/postgres#set-up-the-database)):
120
+
121
+ ```bash
122
+ (umask 077; printf 'Runtime password: '; read -rs password; printf '\n'; printf '%s' "$password" > ~/atomic-db-password)
123
+ atomic storage join 'postgresql://atomic_runtime@db.example.com:5432/atomic' --password-file ~/atomic-db-password
124
+ rm ~/atomic-db-password # atomic storage join keeps its own copy
125
+ jq .storage ~/.atomic/agent/settings.json > new-storage.json
126
+ atomic storage import ~/moved --storage-file new-storage.json
127
+ ```
128
+ </Step>
129
+ <Step title="Verify and clean up">
130
+ Confirm your sessions appear in `/resume` and `atomic storage status` shows the new store. Import leaves the original JSONL files untouched—delete the directory once you verify everything migrated. See [Exporting and importing sessions](/storage#exporting-and-importing-sessions) for details.
131
+ </Step>
132
+ </Steps>