@bastani/atomic 0.10.9-alpha.1 → 0.10.10-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 (401) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +211 -155
  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} +145 -58
  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 +85 -114
  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 +37 -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 +71 -138
  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 +60 -87
  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 +235 -243
  297. package/docs/build.md +12 -11
  298. package/docs/codemode.md +60 -51
  299. package/docs/compaction/reference.md +61 -24
  300. package/docs/compaction.md +117 -65
  301. package/docs/computer-use.md +179 -146
  302. package/docs/containerization.md +79 -33
  303. package/docs/custom-provider/api-reference.md +148 -11
  304. package/docs/custom-provider/oauth.md +44 -27
  305. package/docs/custom-provider/override.md +14 -7
  306. package/docs/custom-provider/registration.md +75 -65
  307. package/docs/custom-provider/streaming.md +42 -19
  308. package/docs/custom-provider.md +25 -61
  309. package/docs/development.md +47 -43
  310. package/docs/docs.json +33 -33
  311. package/docs/environment-variables.md +83 -57
  312. package/docs/extensions/api-reference.md +323 -734
  313. package/docs/extensions/authoring.md +186 -269
  314. package/docs/extensions/events.md +308 -375
  315. package/docs/extensions/examples.md +122 -74
  316. package/docs/extensions/ui.md +217 -197
  317. package/docs/extensions.md +152 -259
  318. package/docs/getting-started/authentication.md +27 -14
  319. package/docs/getting-started/first-session.md +25 -26
  320. package/docs/getting-started/installation.md +62 -84
  321. package/docs/getting-started/project-instructions.md +39 -14
  322. package/docs/guides/configuration.md +42 -20
  323. package/docs/guides/intercom.md +17 -13
  324. package/docs/guides/non-interactive.md +29 -16
  325. package/docs/guides/orchestration.md +16 -10
  326. package/docs/guides/resume-on-any-machine.md +54 -49
  327. package/docs/guides/subagents.md +22 -14
  328. package/docs/guides/team-setup.md +37 -26
  329. package/docs/guides.md +22 -21
  330. package/docs/herdr.md +21 -16
  331. package/docs/index.md +16 -17
  332. package/docs/intercom/operations.md +68 -66
  333. package/docs/intercom/reference.md +196 -191
  334. package/docs/intercom.md +103 -92
  335. package/docs/json.md +71 -71
  336. package/docs/keybindings.md +63 -50
  337. package/docs/libraries/agent-core.md +49 -8
  338. package/docs/libraries/ai.md +21 -12
  339. package/docs/libraries/codemode.md +28 -6
  340. package/docs/libraries/schema.md +7 -7
  341. package/docs/libraries/telemetry.md +7 -7
  342. package/docs/libraries/tui.md +74 -94
  343. package/docs/libraries.md +5 -5
  344. package/docs/llama-cpp.md +38 -33
  345. package/docs/mcp-servers.md +96 -90
  346. package/docs/models/reference.md +46 -33
  347. package/docs/models-configuration.md +12 -6
  348. package/docs/models.md +93 -88
  349. package/docs/orchestration/migrating-workflows.md +21 -19
  350. package/docs/orchestration/patterns.md +35 -20
  351. package/docs/orchestration.md +22 -21
  352. package/docs/packages/authoring.md +28 -19
  353. package/docs/packages/reference.md +75 -16
  354. package/docs/packages.md +31 -33
  355. package/docs/programmatic.md +22 -21
  356. package/docs/prompt-templates.md +63 -41
  357. package/docs/providers/reference.md +35 -19
  358. package/docs/providers.md +61 -71
  359. package/docs/quickstart.md +32 -46
  360. package/docs/reference/cli.md +249 -252
  361. package/docs/reference.md +23 -20
  362. package/docs/rpc/examples.md +74 -17
  363. package/docs/rpc/extension-ui.md +79 -62
  364. package/docs/rpc/protocol.md +816 -358
  365. package/docs/rpc.md +75 -151
  366. package/docs/sdk/reference.md +175 -45
  367. package/docs/sdk/structured-decisions.md +92 -62
  368. package/docs/sdk/web-server.md +79 -46
  369. package/docs/sdk.md +237 -195
  370. package/docs/security.md +106 -43
  371. package/docs/session-format.md +96 -59
  372. package/docs/sessions.md +149 -113
  373. package/docs/settings.md +289 -204
  374. package/docs/shell-aliases.md +15 -6
  375. package/docs/skills/authoring.md +17 -9
  376. package/docs/skills/reference.md +23 -21
  377. package/docs/skills.md +104 -97
  378. package/docs/storage.md +140 -242
  379. package/docs/subagents/authoring.md +147 -16
  380. package/docs/subagents/reference.md +100 -30
  381. package/docs/subagents.md +220 -252
  382. package/docs/terminal-setup.md +97 -69
  383. package/docs/termux.md +51 -85
  384. package/docs/themes/reference.md +51 -37
  385. package/docs/themes.md +49 -54
  386. package/docs/tmux.md +38 -21
  387. package/docs/tools.md +198 -147
  388. package/docs/tui/reference.md +64 -32
  389. package/docs/tui.md +38 -66
  390. package/docs/usage.md +76 -78
  391. package/docs/verification.md +25 -25
  392. package/docs/web-access.md +72 -55
  393. package/docs/windows.md +53 -58
  394. package/docs/worktree-snapshots.md +62 -65
  395. package/package.json +8 -8
  396. package/schemas/models.schema.json +51 -0
  397. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  398. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  399. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  400. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  401. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
package/docs/sessions.md CHANGED
@@ -1,101 +1,59 @@
1
1
  ---
2
- title: Sessions
3
- description: Save, resume, search, branch, and manage conversation sessions in Atomic.
2
+ title: "Manage sessions"
3
+ sidebarTitle: "Sessions"
4
+ description: "Resume, search, name, branch, fork, share, and export conversation sessions in Atomic."
4
5
  ---
5
6
 
6
- # Sessions
7
+ Atomic saves every conversation as an append-only tree in a local SQLite database (`~/.atomic/workflows/journal.sqlite` by default). You can resume past work, jump back to earlier turns, and branch without losing history. For branch summaries and context clearing, see [Context and compaction](/compaction#branch-summarization).
7
8
 
8
- Atomic persists conversations as append-only trees so you can resume work, jump to earlier turns, and branch without losing history. For branch summarization and context clearing, see [Compaction](/compaction#branch-summarization).
9
-
10
- ## Session storage
9
+ ## Session commands
11
10
 
12
- Sessions auto-save to the local SQLite database at `~/.atomic/workflows/journal.sqlite` (`session_` tables).
11
+ Start, resume, fork, or import sessions from the command line:
13
12
 
14
13
  ```bash
15
- atomic -c # Continue the most recent session
16
- atomic -r # Pick a past session interactively
17
- atomic --no-session # Ephemeral run with no resumable session
18
- atomic --name "my task" # Set display name at startup
14
+ atomic -c # Continue the most recent session in this folder
15
+ atomic -r # Open the interactive session picker
16
+ atomic --no-session # Run without saving a resumable session
17
+ atomic --name "my task" # Set a display name at startup
19
18
  atomic --session <id|prefix> # Open by exact ID or unique 8-hex UUID prefix
20
- atomic --import <file> # Import a JSONL export into storage
19
+ atomic --session-id <id> # Start a new project-local session with an exact ID
21
20
  atomic --fork <id|prefix> # Fork by exact ID or unique 8-hex UUID prefix
21
+ atomic --import <file> # Import a format-4 JSONL export into storage
22
22
  ```
23
23
 
24
- - **Legacy sessions.** Under the default SQLite store, earlier JSONL sessions in `~/.atomic/agent/sessions` (formats 1 through 3 and older format-4 files) still appear in `/resume` and `--continue`. Opening one imports a copy into SQLite without modifying the original file. If sync conflict copies exist, the newest message wins. Unopened files over 32 KiB display an estimated summary until opened. Selecting a custom store shows only that store.
25
- - **UUID prefixes and exact IDs.** `--session` and `--fork` accept a full UUID or a unique 8-hex prefix. Atomic searches the current project first and then all projects, and it lists matches on a collision. `--session-id` always uses an exact project-local ID.
26
- - **Project trust and resume hints.** Project-local storage settings apply after project trust approval. New conversations switch before saving, while resumed conversations stay in their original store. Keep generated `--session-dir`, `--session-store`, or `--session-prefix` flags when reopening non-default stores, such as `atomic --session-store "/data/project A/sessions.sqlite" --session-prefix project_ --session <id>`.
27
- - **Import and export.** `--import <file>` or `/import <file>` imports a JSONL export verbatim, including [worktree snapshots](/worktree-snapshots) written by `/export <file>.jsonl`. Import upgrades older supported formats automatically and raises `SessionExistsError` if the ID already exists. Combine `--import` with `--no-session` to inspect a file without saving it. `--import` cannot be paired with `--session`, `--fork`, `--session-id`, `-c`, or `-r`. Empty imported IDs reopen through `atomic --session ""` or the picker.
28
- - **Ephemeral runs (`--no-session`).** Nothing is saved to a resumable store. Idle released sessions, such as released subagents, temporarily page history to private files in your agent directory and remove them on exit; stale files left after a crash are cleaned up on a later startup on the same host. See [Releasing idle sessions](/sdk#releasing-idle-sessions).
29
- - **Session stats (`/session`).** Displays the session ID, message count, tokens, and cost. Counts update after each completed message, and per-model cost and cache breakdowns appear once history matches totals.
30
-
31
- ### Choosing a store
32
-
33
- Configure `sessions.storage` (session-only) or `storage` (shared default) in `settings.json`:
34
-
35
- ```json
36
- { "sessions": { "storage": { "dir": "sessions" } } }
37
- ```
38
-
39
- Supported store objects are `{ "path": "sessions.sqlite" }` for SQLite, `{ "dir": "sessions" }` for JSONL, `{ "memory": true }` for ephemeral runs, or a database [adapter](/storage#selecting-an-adapter). Legacy `sessionDir` has been removed.
40
-
41
- Store selection follows this precedence order, from highest to lowest:
42
-
43
- 1. SDK `sessionStore`
44
- 2. `--no-session`
45
- 3. `--session-dir` or `--session-store`
46
- 4. `--storage` or `--storage-file`
47
- 5. `ATOMIC_SESSIONS_STORAGE` or `ATOMIC_CODING_AGENT_SESSION_DIR`
48
- 6. `ATOMIC_STORAGE`
49
- 7. `sessions.storage`
50
- 8. `storage`
51
- 9. Default SQLite
52
-
53
- Each selection replaces lower-precedence settings as a whole object rather than merging fields. Settings, JSON flags, and JSON environment variables resolve relative paths from [storage home](/storage#storage-home). `--session-dir`, `--session-store`, and `ATOMIC_CODING_AGENT_SESSION_DIR` resolve relative paths from `cwd`.
54
-
55
- `--session-store` conflicts with `--session-dir` and `--no-session`. `--session-prefix` requires `--session-store` and must match `[A-Za-z_][A-Za-z0-9_]*` without starting with `sqlite_`. Invalid or unavailable stores always raise a typed error instead of falling back to memory. See [Selecting storage per process](/storage#selecting-storage-per-process).
56
-
57
- From the SDK, pass `sessionStore` with `{ kind: "sqlite", path }`, `{ kind: "jsonl", dir }`, or `{ kind: "memory" }`. Passing an explicit `sessionManager` bypasses store selection:
58
-
59
- ```ts
60
- const { session } = await createAgentSession({
61
- sessionStore: { kind: "sqlite", path: "/data/sessions.sqlite" },
62
- });
63
- ```
64
-
65
- See [Session format](/session-format) for JSONL schemas and the `SessionManager` API.
66
-
67
- ## Session commands
24
+ Inside an interactive session, use these slash commands:
68
25
 
69
26
  | Command | Action |
70
27
  | --- | --- |
71
- | `/resume [id]` | Open the session picker, or resume directly by exact ID or unique 8-hex prefix |
28
+ | `/resume [id]` | Open the session picker, or resume directly by exact ID or unique 8-hex UUID prefix |
72
29
  | `/new` | Start a fresh session |
73
30
  | `/name <name>` | Set the display name |
74
- | `/session [snapshot]` | Show session ID, counts, tokens, and cost; pass `snapshot` to inspect worktree snapshots and diff them against the current tree |
75
- | `/tree` | Navigate and branch within the session tree |
31
+ | `/session [snapshot]` | Show session ID, message counts, tokens, and cost; pass `snapshot` to inspect worktree snapshots and diff them against the current tree |
32
+ | `/tree` | Navigate and branch inside the session tree |
76
33
  | `/fork` | Copy history up to a chosen user message into a new session |
77
34
  | `/clone` | Duplicate the active branch into a new session |
78
- | `/compact [instructions]` | Clear context, or compact with `compactionModel`; see [Compaction](/compaction) |
79
- | `/export [file]` | Export to HTML by default, or to a format-4 `.jsonl` file with inline snapshots when the path ends in `.jsonl` (use `atomic storage export` for raw backups without extension renderers) |
35
+ | `/compact [instructions]` | Clear context, or compact with `compactionModel`; see [Context and compaction](/compaction) |
36
+ | `/export [file]` | Export to HTML by default, or export the **active branch** to a format-4 `.jsonl` file (with inline worktree snapshots) when the path ends in `.jsonl` (case-insensitive). Wrap paths containing spaces in matching `'...'` or `"..."` quotes; unclosed quotes return an error. Use `atomic storage export` for raw backups of every branch across sessions. |
80
37
  | `/import <file>` | Import and resume a session from a format-4 JSONL file |
81
- | `/share` | Upload an HTML export as a private GitHub gist |
38
+ | `/share` | Export the session as `session.jsonl` and upload it as a secret GitHub gist (`gh gist create --public=false`). Requires the GitHub CLI (`gh`) installed and logged in (`gh auth login`). Omits worktree snapshot blobs and session tool-output blobs, and cancels automatically if you switch sessions during upload. |
82
39
 
83
40
  ## Resuming and deleting sessions
84
41
 
85
- Run `/resume` or `atomic -r` to open the **Resume** picker. Run `/resume <id>` with an exact ID or unique 8-hex prefix (without flags) to jump straight into a session.
42
+ Run `/resume` or `atomic -r` to open the **Resume** picker. Run `/resume <id>` with an exact session ID or unique 8-hex UUID prefix to jump directly into that session.
86
43
 
87
- Every session binds to its original working directory so tools, `@path` references, and project configuration resolve there:
44
+ Every session binds to its original working directory so tools, `@path` references, and project settings resolve there:
88
45
 
89
46
  | Entry point | Working directory |
90
47
  | --- | --- |
91
- | `--continue` | Current directory |
92
- | `--resume`, `/resume`, `--session` | Session's recorded directory |
48
+ | `--continue` (`-c`) | Current directory |
49
+ | `--resume` (`-r`), `/resume`, `--session` | Session's recorded directory |
93
50
  | `--fork`, or choosing to fork a cross-directory `--session` | Current directory (new session) |
94
51
 
95
- - **Snapshots on resume.** If a session recorded [worktree snapshots](/worktree-snapshots), `atomic --session <id>` from another directory reopens it directly. Atomic reuses its checkout when it still matches, or restores into `~/.atomic/agent/worktree-snapshots/` with a one-line notice. When exact restoration fails, Atomic opens the closest state and reports what is missing. Inspect snapshots with `/session snapshot` ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
96
- - **Missing working directory.** When a session's folder no longer exists, interactive mode offers **Continue** (run in `cwd` without saving the new path), **Fork** (copy into `cwd` as a new session), or **Cancel**. Print mode, RPC mode, and out-of-process `ctx.switchSession()` reject with `MissingSessionCwdError`. At CLI startup in interactive mode, choose **Fork** instead of **Continue**, or open from an existing directory through `/resume` where **Continue** works.
97
- - **Fast resume and progress.** Compacted sessions open from the latest compaction boundary plus lightweight state metadata, and JSONL stores cache a rebuildable `.idx` sidecar. `/tree`, `/fork`, `/clone`, `/export`, `/share`, and `/session` read older entries on demand, one page at a time. `/session` shows totals immediately and fills in per-model cost, cache hit rate, and wasted cache cost once that scan finishes, while `history://` covers the full session.
98
- - **Extension state on fast resume.** Extensions start on the same resident window instead of loading full history. Entries saved with `atomic.appendEntry()` on the active branch stay available in `getBranch()` and `getEntries()`, and extensions can read older entries through `ctx.sessionManager.readHistory()`. Slow resumes or sessions with 100,000 or more entries print step timings before opening the TUI.
52
+ - **Session IDs and prefix matching.** `--session` and `--fork` check for an exact, case-sensitive session ID match first. If none matches, an 8-character hexadecimal prefix (case-insensitive, such as `019f6a2e`) matches UUID-backed sessions only, never custom non-UUID IDs. Atomic checks the current project first, then all projects, and lists matching sessions on a collision. Any other hex-and-hyphen fragment (such as 6 or 12 characters, or `019f6a2e-1234`) is rejected as malformed rather than not found.
53
+ - **Custom IDs and flag conflicts.** `--session-id <id>` sets an exact project-local ID matching ASCII letters, digits, `.`, `_`, and `-`, starting and ending with a letter or digit. `--fork` cannot be combined with `--session`, `--continue`, `--resume`, or `--no-session`, though you can combine `--fork` with `--session-id <id>` to name the forked session. `--session-id` cannot be combined with `--session`, `--continue`, or `--resume`. `--import` cannot be combined with `--session`, `--fork`, `--session-id`, `--continue`, or `--resume` (combining `--import` with `--no-session` inspects the file without saving it). Conflicting flags exit with code `1`.
54
+ - **Snapshots on resume.** When a session recorded [worktree snapshots](/worktree-snapshots), `atomic --session <id>` from another directory reopens it directly. Atomic reuses a matching local checkout or restores the files into `~/.atomic/agent/worktree-snapshots/` with a one-line notice. When exact restoration fails, Atomic opens the closest state and reports what is missing. Inspect snapshots with `/session snapshot` ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
55
+ - **Missing working directory.** When a session's directory no longer exists, interactive mode offers **Continue** (run in `cwd` without saving the new path), **Fork** (copy into `cwd` as a new session), or **Cancel**. Print mode, RPC mode, and extension calls to `ctx.switchSession()` in interactive mode reject with `MissingSessionCwdError`. At CLI startup in interactive mode, choose **Fork** instead of **Continue**, or open from an existing directory through `/resume` where **Continue** works.
56
+ - **Fast resume and progress.** Compacted sessions open from the latest compaction boundary instead of loading the full history upfront. Commands that inspect older entries (`/tree`, `/fork`, `/clone`, `/export`, `/share`, and `/session`) read earlier history on demand in pages. `/session` shows totals immediately and fills in per-model cost, cache hit rate, and wasted cache cost once that scan finishes, while `history://` covers the full session. Extensions start with the active context window (including `atomic.appendEntry()` records on the active branch) and can read older entries through `ctx.sessionManager.readHistory()`. Slow resumes or sessions with 100,000 or more entries print step timings before opening the TUI.
99
57
  - **Draft preservation.** Text typed before a startup picker or prompt appears waits as a draft without confirming pickers or `Fork this session? [y/N]`.
100
58
  - **Tool restoration.** Plain resume restores the session's recorded tool selection along with newly available extension tools. Tools explicitly disabled through `--tools`, `--no-tools`, `--exclude-tools`, or `setActiveTools` stay off, and `--tools +name,-name` adjusts the restored set. Missing previously used tools appear below startup resources and under **Missing** in `/tools`. Forked subagents keep their own configured tools subject to parent restrictions.
101
59
 
@@ -104,13 +62,27 @@ Every session binds to its original working directory so tools, `@path` referenc
104
62
  When you reopen an interactive session (`--session`, `-c`, `-r`, or `/resume`) after an abrupt exit or session switch, the transcript renders first and recovery runs visibly:
105
63
 
106
64
  - Running background subagents relaunch and reconnect to Intercom. Paused, quit, completed, and failed children stay as they were, and forked sessions never relaunch original children (see [Run control](/subagents#run-control)).
107
- - Undelivered user or peer messages replay in a turn (`Replaying N interrupted deliveries`). Messages from gone peers post one non-turn-starting notice. Messages that cannot deliver because Intercom is unreachable or a relaunched subagent has not reconnected yet wait until the next resume.
65
+ - Undelivered user or peer messages replay in a turn (`Replaying N interrupted deliveries`). Messages from gone peers post one notice without starting a turn. Messages that cannot deliver because Intercom is unreachable or a relaunched subagent has not reconnected yet wait until the next resume.
108
66
  - Unseen background task results render as cards without starting a turn, followed by a recovery summary line.
109
67
  - Non-interactive runs (`atomic -p`) leave interrupted work pending until the next interactive resume.
110
68
 
111
- ### Picker keys
69
+ ### Session picker search and shortcuts
70
+
71
+ Each row in the **Resume** picker shows the session name or first message, age, message count, folder (in all-folders scope), and summary.
112
72
 
113
- Each row displays the session name or first message, age, message count, folder in all-folders scope, and summary. Bottom hints show active keys (`space preview · enter resume · type to search · esc cancel`, plus `? keys` or `f1 keys` while searching):
73
+ Type to filter sessions using three query modes:
74
+
75
+ - **Word tokens (default).** Space-separated words match with logical AND (case-insensitive). Each word checks for a literal substring match first across name, title, ID, detail, summary, message text, and folder. If no literal match is found, it falls back to fuzzy matching across metadata fields only (name, title, detail, summary, and folder, never message bodies or IDs).
76
+ - **Exact phrases.** Wrap multiple words in double quotes (`"auth token refresh"`) for case-insensitive phrase matching across all fields with normalized whitespace. An unclosed quote falls back to whitespace-separated word tokens.
77
+ - **Regular expressions.** Prefix a query with `re:` (such as `re:error\s+50[23]`) for case-insensitive JavaScript regex matching. An invalid regex returns no matches.
78
+
79
+ Press `Ctrl+S` to cycle through three sort modes:
80
+
81
+ - **Threaded (default).** Groups forked sessions under their parent session, ordered by most recent activity.
82
+ - **Recent.** Flat list ordered by most recent modification time.
83
+ - **Relevance.** Ranked by match quality (name matches first, then text matches, then fuzzy matches), tie-broken by modification time.
84
+
85
+ Bottom hints display active shortcuts (`space preview · enter resume · type to search · esc cancel`, plus `? keys` or `f1 keys` while searching):
114
86
 
115
87
  | Key | Action |
116
88
  | --- | --- |
@@ -119,52 +91,27 @@ Each row displays the session name or first message, age, message count, folder
119
91
  | Type / `Esc` | Filter list or clear search; a second `Esc` closes the picker |
120
92
  | `Space` | Toggle preview when search is empty |
121
93
  | `Tab` | Toggle current folder vs. all folders |
122
- | `Ctrl+P` / `Ctrl+S` / `Ctrl+N` | Toggle paths, sort mode, or named-only filter |
94
+ | `Ctrl+P` / `Ctrl+S` / `Ctrl+N` | Toggle paths, sort mode (`threaded`, `recent`, `relevance`), or named-only filter |
123
95
  | `Ctrl+R` | Rename session |
124
- | `Ctrl+D`, then `Enter` | Delete session (`trash` CLI for JSONL when available, record delete for database stores; the active session cannot be deleted) |
96
+ | `Ctrl+D`, then `Enter` | Delete session with confirmation (`trash` CLI for JSONL when available, record delete for database stores; the active session cannot be deleted) |
97
+ | `Ctrl+Backspace` | Delete selected session when the search box is empty |
125
98
  | `Ctrl+C` | Close picker from any state |
126
99
 
127
100
  ### Session summaries
128
101
 
129
- Once the agent goes idle, Atomic generates a one-line `session_summary` using the session's active model. This runs for saved interactive and RPC sessions, and never runs for `--no-session`, `-p`, JSON mode, tiny sessions, or internal sessions.
102
+ Once the agent goes idle, Atomic generates a one-line `session_summary` using the session's active model. Summaries run for saved interactive and RPC sessions, and skip `--no-session`, `-p`, JSON mode, internal sessions, and sessions with fewer than 4 entries on the active branch.
130
103
 
131
- Generation is best-effort, cancels on new input or exit, counts toward session usage, and retires on a later branch summary. Disable it with `"sessionSummary": { "enabled": false }`.
104
+ Summary generation feeds up to 4,000 tokens of recent conversation, caps the stored line at 160 characters (truncated with `...`), counts toward session usage, cancels on new input or exit, and retires on a later branch summary. Disable summaries with `"sessionSummary": { "enabled": false }`.
132
105
 
133
106
  ### Internal sessions
134
107
 
135
- Sessions marked **internal** are hidden from `/resume`, `atomic -r`, `-c`, and the `history://sessions` list, while remaining openable by session ID. A fresh subagent's own session is internal, whereas a `context: "fork"` subagent's session is a fork of its parent and appears in normal listings.
136
-
137
- When an 8-character ID prefix passed to `--session` or `--fork` matches both a listed session and internal sessions, such as its subagents' sessions created around the same time, Atomic selects the listed session.
138
-
139
- ## Recalling earlier work
140
-
141
- The agent can inspect past project sessions from any session or subagent using read-only `history://` URLs with `read` and `search`. These URLs work across SQLite, JSONL, memory, and custom stores:
142
-
143
- | URL | Returns |
144
- | --- | --- |
145
- | `history://sessions` | Recent project sessions, newest first (`?limit=N` up to 200, `?offset=N`; add `?project=all` or `?project=<dir>` only when asked to search other projects). Uncached JSONL and legacy sessions may show estimated counts. |
146
- | `history://sessions/<id>` | Full transcript, or an outline with counts and `:N-M` turn links for sessions with more than 2,000 entries, oversized bodies, or cold JSONL files. Lines over 4,000 characters split cleanly. |
147
- | `history://sessions/<id>:N-M` | 1-based entry ranges (`:N`, `:N+C`, `:N-M,P-Q`; `:raw` omits the heading). |
148
-
149
- - **Search behavior.** Searching `history://sessions` or `history://` scans the newest 25 sessions per page, excludes the current session (search it through its own ID URL), and caps output at 10 matches per session. Extra matches include a `?cursor=<seq>.<match>` continuation. Multi-line patterns match across up to 16 KiB or 256 entries, with the same window for lookbehind, and matches crossing that boundary note the cutoff. After compaction, the boundary message gives the exact session URL and range to recover earlier details ([Context cleared](/compaction#context-cleared)).
150
- - **Budgets and continuations.** Every `history://` call enforces roughly a 40 KB output cap, a fixed entry cap, and a 3-second nominal time budget. When a call stops early, it returns a `continue with` URL containing `cursor`, `after=<activityMs>.<createdMs>[.<id>]`, and an optional `session=<id>`. Pass that URL unchanged; list continuations expire after 1 minute.
151
- - **Indexing and storage.** SQLite, libSQL, and PostgreSQL build a trigram index on first search. PostgreSQL installs `pg_trgm` during `atomic storage migrate` or on open when permissions allow. Multi-line patterns scan linearly. The index roughly doubles text-heavy session storage and clears automatically when sessions are deleted or rewritten (`VACUUM` or `VACUUM FULL` reclaims space). Never edit active JSONL files in place outside Atomic's storage APIs.
152
-
153
- ### Searching a stored session in the background
154
-
155
- Run a read-only CLI search against a local unprefixed SQLite session database without creating indexes, updating indexes, or taking writer locks:
156
-
157
- ```json
158
- {"command":"atomic storage search-session ./sessions.sqlite my-session 'connection refused'","wait":{"kind":"background"}}
159
- ```
160
-
161
- The command syntax is `atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]`. Session IDs must use ASCII `[A-Za-z0-9_-]`, and an optional numeric cursor such as `6` or `6.2` resumes an earlier scan.
108
+ Sessions marked **internal** are hidden from `/resume`, `atomic -r`, `-c`, and `history://sessions`, while remaining openable by exact session ID. A fresh subagent's own session is internal, whereas a `context: "fork"` subagent's session is a fork of its parent and appears in normal listings.
162
109
 
163
- This command writes no `-wal` or `-shm` files on cleanly closed databases, stops cleanly if the session's write revision changes mid-scan, and pairs with `bash({ action: "wait", id })` and `kill({ id })`. For JSONL, memory, remote stores, or multi-session listings, use `read` and `search` on `history://`.
110
+ When an 8-character ID prefix passed to `--session` or `--fork` matches both a listed session and internal sessions (such as subagent sessions created around the same time), Atomic selects the listed session.
164
111
 
165
112
  ## Naming sessions
166
113
 
167
- Set a readable name with `/name <name>` interactively or `--name` / `-n` at startup:
114
+ Set a display name interactively with `/name <name>` or at startup with `--name` / `-n`:
168
115
 
169
116
  ```bash
170
117
  atomic --name "Refactor auth module"
@@ -173,9 +120,9 @@ atomic --name "CI audit" -p "Review this build failure"
173
120
 
174
121
  ## Branching with `/tree`
175
122
 
176
- Every session entry carries `id` and `parentId`. `/tree` lets you jump to any entry and branch in place:
123
+ Every session entry carries `id` and `parentId`. Run `/tree` to jump to any earlier entry and start a new branch in place:
177
124
 
178
- <p align="center"><img src="images/tree-view.png" alt="Tree View" width="600" /></p>
125
+ <p align="center"><img src="images/tree-view.png" alt="Atomic terminal UI showing the interactive Session Tree panel opened by /tree, listing user messages, assistant replies, and tool calls with keyboard filter shortcuts and an inline search bar." width="600" /></p>
179
126
 
180
127
  ```text
181
128
  ├─ user: "Hello, can you help..."
@@ -189,13 +136,16 @@ Every session entry carries `id` and `parentId`. `/tree` lets you jump to any en
189
136
 
190
137
  ### Tree controls
191
138
 
139
+ Type anywhere in `/tree` to filter entries through the inline search bar.
140
+
192
141
  | Key | Action |
193
142
  | --- | --- |
194
143
  | `↑` / `↓` | Move selection |
195
144
  | `←` / `→` | Page up or down |
196
145
  | `Ctrl+←` / `Ctrl+→` or `Alt+←` / `Alt+→` | Fold, unfold, or jump between branches |
197
146
  | `Shift+L` / `Shift+T` | Set or clear a bookmark label, or toggle label timestamps |
198
- | `Ctrl+O` | Cycle filter (`default`, `no-tools`, `user-only`, `labeled-only`, `all`; default set by `treeFilterMode`) |
147
+ | `Ctrl+O` / `Shift+Ctrl+O` | Cycle filter forward or backward (`default`, `no-tools`, `user-only`, `labeled-only`, `all`; default set by `treeFilterMode`) |
148
+ | `Ctrl+D` / `Ctrl+T` / `Ctrl+U` / `Ctrl+L` / `Ctrl+A` | Jump directly to `default`, `no-tools`, `user-only`, `labeled-only`, or `all` filter |
199
149
  | `Enter` / `Esc` | Select entry or cancel |
200
150
 
201
151
  ### Selection behavior
@@ -204,7 +154,7 @@ Every session entry carries `id` and `parentId`. `/tree` lets you jump to any en
204
154
  - **Assistant, tool, or compaction entry.** Moves the active leaf to that entry with an empty editor to continue from there.
205
155
  - Navigation persists immediately, so quitting or resuming before sending a message stays on the chosen branch. Pressing `Esc` during branch-summary generation cancels it and reopens `/tree`.
206
156
 
207
- ## `/tree`, `/fork`, and `/clone`
157
+ ## Compare `/tree`, `/fork`, and `/clone` {#tree-fork-and-clone}
208
158
 
209
159
  | Feature | `/tree` | `/fork` | `/clone` |
210
160
  | --- | --- | --- | --- |
@@ -215,12 +165,98 @@ Every session entry carries `id` and `parentId`. `/tree` lets you jump to any en
215
165
 
216
166
  `/fork` and `/clone` copy the active path, including worktree snapshots, into a new session.
217
167
 
218
- `atomic --fork <id>`, missing-cwd **Fork**, and same-store SDK `forkTo` copy all branches. Cross-store forks copy only current context without retired turns or private task records, and reopening warns `Parent history is in its original store or is no longer available.`. For full portable backups, use `atomic storage export` and `atomic storage import`.
168
+ `atomic --fork <id>`, missing-cwd **Fork**, and same-store SDK `forkTo()` copy all branches. Cross-store forks copy only current context without retired turns or private task records, and reopening warns `Parent history is in its original store or is no longer available.`. For full portable backups of all branches, use `atomic storage export` and `atomic storage import`.
219
169
 
220
170
  ## Branch summaries
221
171
 
222
172
  When `/tree` switches away from a branch, Atomic can optionally summarize the abandoned branch. You can choose no summary, the default summary, or custom focus instructions. When `branchSummary.skipPrompt` is enabled, Atomic skips the prompt and defaults to no summary. See [Branch summaries](/compaction#branch-summaries).
223
173
 
224
- ## Session format
174
+ ## Recalling earlier work
175
+
176
+ The agent can inspect past project sessions from any session or subagent using read-only `history://` URLs with `read` and `search`. These URLs work across SQLite, JSONL, memory, and custom stores:
177
+
178
+ | URL | Returns |
179
+ | --- | --- |
180
+ | `history://sessions` | Recent project sessions, newest first (`?limit=N` up to 200, default 25; `?offset=N`; add `?project=all` or `?project=<dir>` only when searching other projects). Uncached JSONL and legacy sessions may show estimated counts. |
181
+ | `history://sessions/<id>` | Full transcript, or an outline with counts and `:N-M` turn links for sessions with more than 2,000 entries, oversized bodies, or cold JSONL files. Lines over 4,000 characters split cleanly. |
182
+ | `history://sessions/<id>:N-M` | 1-based entry ranges (`:N`, `:N+C`, `:N-M,P-Q`; `:raw` omits the heading). |
183
+
184
+ - **Search behavior.** Searching `history://sessions` or `history://` scans the newest 25 sessions per page, excludes the current session (search the current session through its own ID URL), skips `custom` and `worktree_snapshot` entries, and caps output at 10 matches per session. Extra matches include a `?cursor=<seq>.<match>` continuation. Multi-line patterns match across up to 16,384 characters or 256 entries, with the same window for lookbehind, and matches crossing that boundary note the cutoff. After compaction, the boundary message gives the exact session URL and range to recover earlier details ([Context cleared](/compaction#context-cleared)).
185
+ - **Budgets and continuations.** Every `history://` call enforces a 40,000-byte output cap, a 250,000-entry scan cap, and a 3-second nominal time budget. When a call stops early, it returns a `continue with` URL containing `cursor`, `after=<activityMs>.<createdMs>[.<id>]`, and an optional `session=<id>`. Pass that URL unchanged; list continuations expire after 60 seconds.
186
+ - **Indexing and storage.** SQLite, libSQL, and PostgreSQL build a trigram index on first search. PostgreSQL installs `pg_trgm` during `atomic storage migrate` or on open when permissions allow. Multi-line patterns scan linearly. The index roughly doubles text-heavy session storage and clears automatically when sessions are deleted or rewritten (`VACUUM` or `VACUUM FULL` reclaims disk space). Never edit active JSONL files in place outside Atomic's storage APIs.
187
+
188
+ ### Searching a stored session in the background
189
+
190
+ Run a read-only CLI search against an existing, unprefixed local SQLite session file without creating indexes, updating indexes, or taking writer locks:
191
+
192
+ ```bash
193
+ atomic storage search-session ./sessions.sqlite my-session 'connection refused'
194
+ ```
195
+
196
+ The full command syntax is `atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]`. The command requires an existing local SQLite file (it refuses `:memory:`, URLs, and UNC paths). Session IDs must use ASCII `[A-Za-z0-9_-]` (periods `.` are not accepted here, unlike `--session-id`), and an optional numeric cursor such as `6` or `6.2` resumes an earlier scan.
197
+
198
+ This command writes no `-wal` or `-shm` files on cleanly closed databases and stops cleanly if the session's write revision changes mid-scan. Agents can also run it through `bash` with `wait: { kind: "background" }` and monitor it with `bash({ action: "wait", id })` or cancel it with `kill({ id })`. For JSONL, memory, remote stores, or multi-session listings, use `read` and `search` on `history://`.
199
+
200
+ ## Session storage
201
+
202
+ Sessions auto-save to `~/.atomic/workflows/journal.sqlite` unless you configure a different store.
203
+
204
+ - **Legacy sessions.** Under the default SQLite store, earlier JSONL sessions in `~/.atomic/agent/sessions` (formats 1 through 3 and older format-4 files) still appear in `/resume` and `--continue`. Opening one imports a copy into SQLite without modifying the original file. If sync conflict copies exist, the newest message wins. Unopened files over 32 KiB display an estimated summary until opened. Selecting a custom store shows only that store.
205
+ - **Project trust and resume hints.** Project-local storage settings apply after project trust approval. New conversations switch before saving, while resumed conversations stay in their original store. Keep generated `--session-dir`, `--session-store`, or `--session-prefix` flags when reopening non-default stores, such as `atomic --session-store "/data/project A/sessions.sqlite" --session-prefix project_ --session <id>`.
206
+ - **Import and export.** `--import <file>` or `/import <file>` imports a JSONL export verbatim, including [worktree snapshots](/worktree-snapshots) written by `/export <file>.jsonl`. Import upgrades older supported formats automatically and raises `SessionExistsError` if the ID already exists. Empty imported IDs reopen through `atomic --session ""` or the picker.
207
+ - **Ephemeral runs (`--no-session`).** Nothing is saved to a resumable store. When an idle subagent is unloaded from memory during `--no-session`, its history is temporarily saved to a private file in your agent directory and removed on exit; stale files left after a crash are cleaned up on a later startup on the same host. See [Releasing idle sessions](/sdk#releasing-idle-sessions).
208
+ - **Session stats (`/session`).** Displays the session ID, message count, tokens, and cost. Counts update after each completed message, and per-model cost and cache breakdowns appear once history matches totals.
209
+
210
+ ### Choosing a store
211
+
212
+ Configure `sessions.storage` (sessions only) or top-level `storage` (shared default for sessions and Intercom) in `settings.json`:
213
+
214
+ ```json
215
+ {
216
+ "sessions": {
217
+ "storage": { "dir": "sessions" }
218
+ }
219
+ }
220
+ ```
221
+
222
+ Supported store objects:
223
+
224
+ - `{ "path": "sessions.sqlite" }`: local SQLite database. Works in both `sessions.storage` and `storage`.
225
+ - `{ "dir": "sessions" }`: JSONL directory store. Allowed **only** in `sessions.storage` and `ATOMIC_SESSIONS_STORAGE`. Passing `"dir"` in top-level `storage`, `--storage`, `--storage-file`, or `ATOMIC_STORAGE` fails with `StorageConfigError`.
226
+ - `{ "memory": true }`: ephemeral in-memory store.
227
+ - `{}` (empty object): selects the default session SQLite file (`<storageHome>/workflows/journal.sqlite`) in `sessions.storage` (overriding any shared `storage`), or `<storageHome>/storage.sqlite` in top-level `storage`.
228
+ - Database [adapter](/storage#selecting-an-adapter): PostgreSQL, Turso/libSQL, or a custom adapter module.
229
+
230
+ Legacy `sessionDir` has been removed.
231
+
232
+ Store selection follows this precedence order, from highest to lowest:
233
+
234
+ 1. SDK `sessionStore`
235
+ 2. SDK `createAgentSession({ storage })`
236
+ 3. `--session-store`, `--no-session`, or `--session-dir`
237
+ 4. `--storage` or `--storage-file`
238
+ 5. `ATOMIC_SESSIONS_STORAGE` or `ATOMIC_CODING_AGENT_SESSION_DIR`
239
+ 6. `ATOMIC_STORAGE`
240
+ 7. `ATOMIC_PROFILE=ci`
241
+ 8. `sessions.storage` in `settings.json`
242
+ 9. `storage` in `settings.json`
243
+ 10. Default local SQLite (`~/.atomic/workflows/journal.sqlite`)
244
+
245
+ Each selection replaces lower-precedence settings as a whole object rather than merging fields. Settings, JSON flags, and JSON environment variables resolve relative paths from [storage home](/storage#storage-home). `--session-dir`, `--session-store`, and `ATOMIC_CODING_AGENT_SESSION_DIR` resolve relative paths from `cwd`.
246
+
247
+ Flag validation rules:
248
+
249
+ - `--session-store` conflicts with `--session-dir` and `--no-session`.
250
+ - Combining a non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` with `ATOMIC_SESSIONS_STORAGE`, `--storage`, or `--storage-file` fails startup with `StorageConfigError` (`conflicting-overrides`).
251
+ - `--session-prefix` requires `--session-store` and must match `[A-Za-z_][A-Za-z0-9_]*` without starting with `sqlite_` (case-insensitive, so `SQLITE_` is also rejected). On PostgreSQL, prefixes must be lowercase ASCII and at most 24 characters.
252
+ - Invalid CLI storage flags exit cleanly with `Error: ...` (exit code `1`). Invalid or unavailable stores always raise a typed error instead of falling back to memory. See [Selecting storage per process](/storage#selecting-storage-per-process).
253
+
254
+ From the SDK, pass `sessionStore` with `{ kind: "sqlite", path }`, `{ kind: "jsonl", dir }`, or `{ kind: "memory" }`. Passing an explicit `sessionManager` bypasses store selection:
255
+
256
+ ```typescript
257
+ const { session } = await createAgentSession({
258
+ sessionStore: { kind: "sqlite", path: "/data/sessions.sqlite" },
259
+ });
260
+ ```
225
261
 
226
- Sessions record messages, model, thinking, and context-window changes, labels, active `compaction` boundaries, branch summaries, and extension entries. Retired `context_compaction` records parse safely as no-ops. See [Session format](/session-format) for file format details and `SessionManager` APIs.
262
+ See [Session file format](/session-format) for JSONL schemas, entry types, and the `SessionManager` API.