@bastani/atomic 0.10.19-alpha.1 → 0.10.20-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 (331) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/_shared/adapter-open-DXXV6ATH.js +22 -0
  3. package/dist/_shared/adapter-open-DXXV6ATH.js.map +1 -0
  4. package/dist/_shared/dist-KOELCESV.js +2 -2
  5. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  6. package/dist/_shared/lib-4PES5P4V.js +2 -2
  7. package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js +439 -217
  8. package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -1
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +19 -11
  10. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  11. package/dist/_shared/mode-shared-2QJSCUM6.js +9 -9
  12. package/dist/_shared/p0-cli-BB45ZQY6.js +2 -2
  13. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  14. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  15. package/dist/_shared/{sdk-BHX35EPK.js → sdk-5ZFNDXUJ.js} +119 -40
  16. package/dist/_shared/sdk-5ZFNDXUJ.js.map +1 -0
  17. package/dist/_shared/session-data-AHTU7IS6.js +5 -4
  18. package/dist/_shared/session-data-AHTU7IS6.js.map +1 -1
  19. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  20. package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -1
  21. package/dist/_shared/{startup-0-0-4EDVBK5P.js → startup-0-0-FPPQF42L.js} +69 -26
  22. package/dist/_shared/startup-0-0-FPPQF42L.js.map +1 -0
  23. package/dist/_shared/{startup-0-1-H5IXVRXQ.js → startup-0-1-Q7GBLBEL.js} +158 -37
  24. package/dist/_shared/startup-0-1-Q7GBLBEL.js.map +1 -0
  25. package/dist/_shared/{startup-0-2-YZZOC22D.js → startup-0-2-JNYN24UI.js} +40 -6
  26. package/dist/_shared/startup-0-2-JNYN24UI.js.map +1 -0
  27. package/dist/_shared/startup-0-3-DE2NCS6A.js +26 -41
  28. package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -1
  29. package/dist/_shared/{startup-0-4-ZMJV547D.js → startup-0-4-ZZXFKE55.js} +85 -19
  30. package/dist/_shared/startup-0-4-ZZXFKE55.js.map +1 -0
  31. package/dist/_shared/{startup-0-5-HZX3ZPTP.js → startup-0-5-WN2IYA25.js} +112 -15
  32. package/dist/_shared/startup-0-5-WN2IYA25.js.map +1 -0
  33. package/dist/_shared/{startup-10-0-TDQNBDDL.js → startup-10-0-O6DAT7U4.js} +65 -117
  34. package/dist/_shared/startup-10-0-O6DAT7U4.js.map +1 -0
  35. package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
  36. package/dist/_shared/startup-14-0-MLX36RBG.js +8 -5
  37. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  38. package/dist/_shared/{startup-15-0-YUKGAC63.js → startup-15-0-E7RYG5YF.js} +8 -8
  39. package/dist/_shared/{startup-15-0-YUKGAC63.js.map → startup-15-0-E7RYG5YF.js.map} +1 -1
  40. package/dist/_shared/startup-15-1-WQZBOTMZ.js +73 -28
  41. package/dist/_shared/startup-15-1-WQZBOTMZ.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +31 -21
  43. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  44. package/dist/_shared/startup-8-1-QZMXUGHI.js +34 -24
  45. package/dist/_shared/startup-8-1-QZMXUGHI.js.map +1 -1
  46. package/dist/_shared/storage-command-7MGXLJGZ.js +9 -5
  47. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  48. package/dist/_shared/{storage-status-K7PX2RXA.js → storage-status-T6FUXRIM.js} +7 -23
  49. package/dist/_shared/{storage-status-K7PX2RXA.js.map → storage-status-T6FUXRIM.js.map} +1 -1
  50. package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
  51. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  52. package/dist/_shared/team-DOQKICG2.js +3 -2
  53. package/dist/_shared/team-DOQKICG2.js.map +1 -1
  54. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  55. package/dist/binary-self-update.js +47 -18
  56. package/dist/binary-self-update.js.map +1 -1
  57. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  58. package/dist/builtin/intercom/package.json +1 -1
  59. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  60. package/dist/builtin/mcp/package.json +1 -1
  61. package/dist/builtin/subagents/CHANGELOG.md +15 -0
  62. package/dist/builtin/subagents/package.json +1 -1
  63. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  64. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  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 +5 -5
  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 +3 -3
  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 +3 -3
  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-runtime.d.ts +2 -1
  95. package/dist/core/debug.impl.js +3 -3
  96. package/dist/core/debug.js +3 -3
  97. package/dist/core/export-html/card-projection.code.js +1 -1
  98. package/dist/core/export-html/card-projection.impl.js +3 -3
  99. package/dist/core/export-html/card-projection.js +3 -3
  100. package/dist/core/export-html/index.code.js +44 -41
  101. package/dist/core/export-html/index.code.js.map +1 -1
  102. package/dist/core/export-html/index.impl.js +3 -3
  103. package/dist/core/export-html/index.js +3 -3
  104. package/dist/core/export-html/json-spans.impl.js +3 -3
  105. package/dist/core/export-html/json-spans.js +3 -3
  106. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  107. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  108. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  109. package/dist/core/export-html/template.js +12 -25
  110. package/dist/core/export-html/tool-renderer.code.js +1 -1
  111. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  112. package/dist/core/export-html/tool-renderer.js +3 -3
  113. package/dist/core/extensions/context-types.d.ts +3 -0
  114. package/dist/core/extensions/context-types.js.map +1 -1
  115. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  116. package/dist/core/extensions/jiti-loader.js +3 -3
  117. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  118. package/dist/core/extensions/jiti-static-loader.js +3 -3
  119. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  120. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  121. package/dist/core/extensions/loader-host-modules.js +3 -3
  122. package/dist/core/extensions/loader-virtual-modules.js +2 -2
  123. package/dist/core/extensions/runner-context.d.ts +1 -0
  124. package/dist/core/extensions/runner-context.js +17 -1
  125. package/dist/core/extensions/runner-context.js.map +1 -1
  126. package/dist/core/extensions/runner.d.ts +1 -0
  127. package/dist/core/extensions/runtime-types.d.ts +1 -0
  128. package/dist/core/extensions/runtime-types.js.map +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-registry.js +2 -2
  136. package/dist/core/model-runtime-streaming.d.ts +3 -1
  137. package/dist/core/model-runtime.d.ts +2 -0
  138. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  139. package/dist/core/package-manager-storage-adapters.js +3 -3
  140. package/dist/core/sdk.code.js +3 -3
  141. package/dist/core/sdk.impl.js +3 -3
  142. package/dist/core/sdk.js +3 -3
  143. package/dist/core/session-manager-core.d.ts +4 -0
  144. package/dist/core/session-manager-core.js +46 -18
  145. package/dist/core/session-manager-core.js.map +1 -1
  146. package/dist/core/session-manager-history.d.ts +1 -1
  147. package/dist/core/session-manager-list.impl.js +3 -3
  148. package/dist/core/session-manager-list.js +3 -3
  149. package/dist/core/session-manager.code.js +2 -2
  150. package/dist/core/session-manager.impl.js +3 -3
  151. package/dist/core/session-manager.js +3 -3
  152. package/dist/core/session-storage.impl.js +3 -3
  153. package/dist/core/session-storage.js +3 -3
  154. package/dist/core/settings-manager.js +1 -1
  155. package/dist/core/storage/adapter-open.js +3 -0
  156. package/dist/core/storage/adapter-open.js.map +1 -0
  157. package/dist/core/storage/index.js +2 -2
  158. package/dist/core/storage/node-sqlite-thread.js +2 -2
  159. package/dist/core/storage/node-sqlite.js +2 -2
  160. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  161. package/dist/core/storage/offline-snapshot-file.js +3 -3
  162. package/dist/core/storage/prefix.js +1 -0
  163. package/dist/core/storage/prefix.js.map +1 -1
  164. package/dist/core/storage/provider.js +2 -2
  165. package/dist/core/storage/selection.js +2 -2
  166. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  167. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  168. package/dist/core/storage/session/branch-fork-source.js +3 -3
  169. package/dist/core/storage/session/card-view.impl.js +3 -3
  170. package/dist/core/storage/session/card-view.js +3 -3
  171. package/dist/core/storage/session/child-reader.code.js +7 -7
  172. package/dist/core/storage/session/child-reader.code.js.map +1 -1
  173. package/dist/core/storage/session/child-reader.d.ts +1 -0
  174. package/dist/core/storage/session/child-reader.impl.js +3 -3
  175. package/dist/core/storage/session/child-reader.js +3 -3
  176. package/dist/core/storage/session/chunked-resume-projection.code.js +1 -1
  177. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  178. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  179. package/dist/core/storage/session/expanded-child-details.code.js +3 -3
  180. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  181. package/dist/core/storage/session/expanded-child-details.js +3 -3
  182. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  183. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  184. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  185. package/dist/core/storage/session/fork-row-index.js +3 -3
  186. package/dist/core/storage/session/fork-staging.code.js +2 -2
  187. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  188. package/dist/core/storage/session/fork-staging.js +3 -3
  189. package/dist/core/storage/session/fork-window.code.js +5 -4
  190. package/dist/core/storage/session/fork-window.code.js.map +1 -1
  191. package/dist/core/storage/session/fork-window.impl.js +3 -3
  192. package/dist/core/storage/session/fork-window.js +3 -3
  193. package/dist/core/storage/session/history-pages.impl.js +3 -3
  194. package/dist/core/storage/session/history-pages.js +3 -3
  195. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  196. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  197. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  198. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  199. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  200. package/dist/core/storage/session/memory-session-store.js +3 -3
  201. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  202. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  203. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  204. package/dist/core/storage/session/released-history-files.code.js +3 -3
  205. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  206. package/dist/core/storage/session/released-history-files.js +3 -3
  207. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  208. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  209. package/dist/core/storage/session/session-resume.impl.js +3 -3
  210. package/dist/core/storage/session/session-resume.js +3 -3
  211. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  212. package/dist/core/storage/session/snapshot-cut.js +3 -3
  213. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  214. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  215. package/dist/core/storage/session/snapshot-history.js +3 -3
  216. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  217. package/dist/core/storage/session/sql-session-store.d.ts +3 -17
  218. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  219. package/dist/core/storage/session/sql-session-store.js +3 -3
  220. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  221. package/dist/core/storage/session/tree-outline.js +3 -3
  222. package/dist/core/storage/session/tree-presentation.code.js +1 -1
  223. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  224. package/dist/core/storage/session/tree-presentation.js +3 -3
  225. package/dist/core/storage/session/types.d.ts +2 -0
  226. package/dist/core/storage/session/usage-observations.d.ts +27 -0
  227. package/dist/core/storage/session/usage-observations.js +3 -0
  228. package/dist/core/storage/session/usage-observations.js.map +1 -0
  229. package/dist/core/storage/storage-status.code.js +1 -1
  230. package/dist/core/storage/storage-status.impl.js +3 -3
  231. package/dist/core/storage/storage-status.js +3 -3
  232. package/dist/core/storage/team.impl.js +3 -3
  233. package/dist/core/storage/team.js +3 -3
  234. package/dist/core/structured-output/index.code.js +1 -1
  235. package/dist/core/structured-output/index.impl.js +3 -3
  236. package/dist/core/structured-output/index.js +3 -3
  237. package/dist/core/subscription-usage-identity.d.ts +9 -0
  238. package/dist/core/subscription-usage-observations.d.ts +15 -0
  239. package/dist/core/subscription-usage-storage.js +3 -0
  240. package/dist/core/subscription-usage-storage.js.map +1 -0
  241. package/dist/core/subscription-usage.d.ts +20 -3
  242. package/dist/core/tasks/task-completion-entry.code.js +1 -1
  243. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  244. package/dist/core/tasks/task-completion-entry.js +3 -3
  245. package/dist/core/tasks/task-file-history.code.js +3 -3
  246. package/dist/core/tasks/task-file-history.impl.js +3 -3
  247. package/dist/core/tasks/task-file-history.js +3 -3
  248. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  249. package/dist/core/tasks/task-reference-archive.js +3 -3
  250. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  251. package/dist/core/tasks/task-reference-identity.js +3 -3
  252. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  253. package/dist/core/tasks/task-reference-stream.js +3 -3
  254. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  255. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  256. package/dist/core/tasks/task-view-source.impl.js +3 -3
  257. package/dist/core/tasks/task-view-source.js +3 -3
  258. package/dist/core/tools/read-url.code.js +2 -2
  259. package/dist/core/tools/read-url.impl.js +3 -3
  260. package/dist/core/tools/read-url.js +3 -3
  261. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  262. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  263. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  264. package/dist/core/worktree-snapshot/errors.js +3 -3
  265. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  266. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  267. package/dist/extensions/codemode/execute.code.js +2 -2
  268. package/dist/extensions/codemode/execute.impl.js +3 -3
  269. package/dist/extensions/codemode/execute.js +3 -3
  270. package/dist/extensions/codemode/renderer.code.js +2 -2
  271. package/dist/extensions/codemode/renderer.impl.js +3 -3
  272. package/dist/extensions/codemode/renderer.js +3 -3
  273. package/dist/extensions/mcp/cli.code.js +3 -3
  274. package/dist/extensions/mcp/cli.impl.js +3 -3
  275. package/dist/extensions/mcp/cli.js +3 -3
  276. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  277. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  278. package/dist/extensions/mcp/cli.lazy.js +3 -3
  279. package/dist/extensions/mcp/runtime.code.js +1 -1
  280. package/dist/extensions/mcp/runtime.impl.js +3 -3
  281. package/dist/extensions/mcp/runtime.js +3 -3
  282. package/dist/index.d.ts +1 -1
  283. package/dist/index.js +8 -8
  284. package/dist/main-first-time-setup.code.js +2 -2
  285. package/dist/main-first-time-setup.impl.js +3 -3
  286. package/dist/main-first-time-setup.js +3 -3
  287. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  288. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  289. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  290. package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
  291. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  292. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  293. package/dist/modes/interactive-engine/isolated-runtime.d.ts +1 -0
  294. package/dist/modes/interactive-engine/protocol.d.ts +4 -0
  295. package/dist/modes/print-mode.js +1 -1
  296. package/dist/modes/rpc/rpc-client.d.ts +1 -1
  297. package/dist/modes/rpc/rpc-types.d.ts +5 -0
  298. package/dist/package-manager-cli.code.js +6 -6
  299. package/dist/package-manager-cli.impl.js +3 -3
  300. package/dist/package-manager-cli.js +3 -3
  301. package/dist/rpc-entry.js +1 -1
  302. package/dist/startup-files.json +1 -1
  303. package/dist/startup-stages/10.js +1 -1
  304. package/dist/startup-stages/4.js +1 -1
  305. package/dist/startup-stages/6.js +1 -1
  306. package/dist/startup-stages/7.js +1 -1
  307. package/dist/startup-stages/8.js +1 -1
  308. package/dist/utils/startup-database-spare.code.js +3 -3
  309. package/dist/utils/startup-database-spare.impl.js +3 -3
  310. package/dist/utils/startup-database-spare.js +3 -3
  311. package/dist/utils/tools-manager.code.js +1 -1
  312. package/dist/utils/tools-manager.impl.js +3 -3
  313. package/dist/utils/tools-manager.js +3 -3
  314. package/docs/changelog.mdx +31 -3
  315. package/docs/extensions/api-reference.md +6 -0
  316. package/docs/getting-started/installation.md +3 -3
  317. package/docs/guides/subscription-usage.md +28 -82
  318. package/docs/reference/cli.md +4 -2
  319. package/docs/rpc/protocol.md +30 -2
  320. package/docs/sdk/reference.md +26 -1
  321. package/docs/sessions.md +3 -1
  322. package/docs/slash-commands.md +1 -1
  323. package/docs/usage.md +1 -1
  324. package/package.json +8 -8
  325. package/dist/_shared/sdk-BHX35EPK.js.map +0 -1
  326. package/dist/_shared/startup-0-0-4EDVBK5P.js.map +0 -1
  327. package/dist/_shared/startup-0-1-H5IXVRXQ.js.map +0 -1
  328. package/dist/_shared/startup-0-2-YZZOC22D.js.map +0 -1
  329. package/dist/_shared/startup-0-4-ZMJV547D.js.map +0 -1
  330. package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +0 -1
  331. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import "../_shared/startup-0-2-YZZOC22D.js";
1
+ import "../_shared/startup-0-2-JNYN24UI.js";
2
2
  import "../_shared/startup-0-3-DE2NCS6A.js";
3
3
  import "../core/storage/node-sqlite-file-gate.js";
4
4
  import "../core/storage/write-ahead-log.js";
@@ -1,3 +1,3 @@
1
1
  import "../_shared/startup-8-0-34CBHPZH.js";
2
- import "../_shared/startup-0-4-ZMJV547D.js";
2
+ import "../_shared/startup-0-4-ZZXFKE55.js";
3
3
  import "../core/storage/provider.js";
@@ -1,11 +1,11 @@
1
1
  import "../_shared/rolldown-runtime-BGM3D5V3.js";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { join } from "node:path";
4
- import { parseArgs } from "../_shared/startup-0-1-H5IXVRXQ.js";
4
+ import { parseArgs } from "../_shared/startup-0-1-Q7GBLBEL.js";
5
5
  import { CONFIG_DIR_NAME, ENV_AGENT_DIR, INTERACTIVE_ENGINE_PREWARM_NO_DATABASE, getEnvNames, isPlainInteractiveSessionInvocation, normalizePath, stripBom } from "../_shared/p0-cli-BB45ZQY6.js";
6
6
  import { parseConfigCommand } from "../_shared/config-command-parser-XRBNVMBV.js";
7
- import { previewProcessStorageSelection, previewSessionSettingSelection } from "../_shared/startup-0-2-YZZOC22D.js";
8
- import { parsePackageCommand } from "../_shared/startup-0-0-4EDVBK5P.js";
7
+ import { previewProcessStorageSelection, previewSessionSettingSelection } from "../_shared/startup-0-2-JNYN24UI.js";
8
+ import { parsePackageCommand } from "../_shared/startup-0-0-FPPQF42L.js";
9
9
  // dist/utils/startup-database-spare.js
10
10
  const DIRECT_SUBCOMMANDS = /* @__PURE__ */ new Set([
11
11
  "auth",
@@ -6,7 +6,7 @@ try {
6
6
  } catch (error) {
7
7
  const root = new URL("../", import.meta.url);
8
8
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
9
- const key = `${root.href}#0.10.19-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.1`;
10
10
  let release = releases.get(key);
11
11
  if (release === undefined) {
12
12
  const current = (async () => {
@@ -27,8 +27,8 @@ try {
27
27
  release = current;
28
28
  }
29
29
  const running = await release;
30
- if (running === undefined || running.version === "0.10.19-alpha.1") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.19-alpha.1 while this session was running; restart it to keep using this feature.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.1 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -6,7 +6,7 @@ try {
6
6
  } catch (error) {
7
7
  const root = new URL("../", import.meta.url);
8
8
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
9
- const key = `${root.href}#0.10.19-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.1`;
10
10
  let release = releases.get(key);
11
11
  if (release === undefined) {
12
12
  const current = (async () => {
@@ -27,8 +27,8 @@ try {
27
27
  release = current;
28
28
  }
29
29
  const running = await release;
30
- if (running === undefined || running.version === "0.10.19-alpha.1") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.19-alpha.1 while this session was running; restart it to keep using this feature.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.1 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -1,3 +1,3 @@
1
1
  import "../_shared/rolldown-runtime-BGM3D5V3.js";
2
- export { GIT_RELEASE, detectLinuxLibc, ensureTool, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getToolEnv, getToolPath, parseGitVersion, plainStatMtimeMs, resetGitProvisionStateForTest, resolveGit, resolveGitSync, resolveInstalledGit, withGitProvisionSettingsForTest } from "../_shared/startup-0-1-H5IXVRXQ.js";
2
+ export { GIT_RELEASE, detectLinuxLibc, ensureTool, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getToolEnv, getToolPath, parseGitVersion, plainStatMtimeMs, resetGitProvisionStateForTest, resolveGit, resolveGitSync, resolveInstalledGit, withGitProvisionSettingsForTest } from "../_shared/startup-0-1-Q7GBLBEL.js";
3
3
  //# sourceMappingURL=tools-manager.code.js.map
@@ -6,7 +6,7 @@ try {
6
6
  } catch (error) {
7
7
  const root = new URL("../", import.meta.url);
8
8
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
9
- const key = `${root.href}#0.10.19-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.1`;
10
10
  let release = releases.get(key);
11
11
  if (release === undefined) {
12
12
  const current = (async () => {
@@ -27,8 +27,8 @@ try {
27
27
  release = current;
28
28
  }
29
29
  const running = await release;
30
- if (running === undefined || running.version === "0.10.19-alpha.1") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.19-alpha.1 while this session was running; restart it to keep using this feature.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.1 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -6,7 +6,7 @@ try {
6
6
  } catch (error) {
7
7
  const root = new URL("../", import.meta.url);
8
8
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
9
- const key = `${root.href}#0.10.19-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.1`;
10
10
  let release = releases.get(key);
11
11
  if (release === undefined) {
12
12
  const current = (async () => {
@@ -27,8 +27,8 @@ try {
27
27
  release = current;
28
28
  }
29
29
  const running = await release;
30
- if (running === undefined || running.version === "0.10.19-alpha.1") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.19-alpha.1 while this session was running; restart it to keep using this feature.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.1 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -10,9 +10,32 @@ description: "What's new in Atomic"
10
10
  The publish-release skill regenerates this page as part of preparing the release PR.
11
11
  */}
12
12
 
13
- <Update label="November 28, 2026" description="0.10.19-alpha.1">
13
+ <Update label="November 28, 2026" description="0.10.20-alpha.1">
14
14
 
15
- Atomic makes it easier to check subscription limits, update an archive installation, and keep coding when an edit or model request needs a second try.
15
+ Atomic remembers your subscription usage across sessions and makes long conversations faster and easier to reopen.
16
+
17
+ **Subscription usage**
18
+
19
+ - **See your subscriptions together.** `/usage` shows signed-in subscription accounts in one panel without interrupting your reply. With SQLite or PostgreSQL, Atomic remembers the latest figures across sessions and restarts, and shows `0% used` after a window resets until fresh figures arrive ([#6865](https://github.com/bastani-inc/atomic/pull/6865)).
20
+ - **Know when a usage figure is missing.** CLI JSON, RPC, and SDK reports say whether each account has figures and when Atomic last saw them. The [usage guide](/guides/subscription-usage) shows how to read the reports from a script ([#6865](https://github.com/bastani-inc/atomic/pull/6865), [#6876](https://github.com/bastani-inc/atomic/pull/6876)).
21
+ - **Keep saved usage through a slow sign-in refresh.** Atomic no longer loses your last figures if a refresh finishes after its timeout, and startup no longer overwrites sign-in changes another process just saved ([#6872](https://github.com/bastani-inc/atomic/pull/6872)).
22
+
23
+ **Sessions and background work**
24
+
25
+ - **Resume long sessions faster.** Atomic reads archived history in fewer batches, especially on shared PostgreSQL, while keeping earlier messages available and restoring interrupted subagents ([#6866](https://github.com/bastani-inc/atomic/pull/6866)).
26
+ - **See progress while a session opens.** Slow opens, switches, forks, and reloads show a loading line that matches your theme. Fast loads stay quiet ([#6867](https://github.com/bastani-inc/atomic/pull/6867)).
27
+ - **Open sessions with damaged history.** Atomic warns and starts a separate branch instead of hanging on a broken link. The original entries stay in saved history ([#6868](https://github.com/bastani-inc/atomic/pull/6868)).
28
+ - **Quit without losing background results.** `/quit` closes cleanly even when a finished task is waiting to report back. Its result is available when you reopen the session ([#6870](https://github.com/bastani-inc/atomic/pull/6870)).
29
+
30
+ **Model options**
31
+
32
+ - **Use Low thinking on more Qwen Token Plan models.** Select Low for DeepSeek V4 Flash 0731 or DeepSeek V4 Pro 0813 ([#6864](https://github.com/bastani-inc/atomic/pull/6864)).
33
+
34
+ </Update>
35
+
36
+ <Update label="November 28, 2026" description="0.10.19">
37
+
38
+ Atomic makes subscription limits easier to check, native installs easier to update or roll back, and edits and model replies more reliable.
16
39
 
17
40
  **Breaking change:** The bundled `workflow-files` skill name no longer works. Replace `/skill:workflow-files` with `/skill:workflow`, `skill://workflow-files` with `skill://workflow`, and `workflow-files` with `workflow` in subagent skill lists ([#6854](https://github.com/bastani-inc/atomic/pull/6854)).
18
41
 
@@ -21,9 +44,14 @@ Atomic makes it easier to check subscription limits, update an archive installat
21
44
  - **Check limits without interrupting a reply.** `/usage` shows how much you’ve used, when limits reset, and any credits your provider reports across signed-in accounts. Get the same report with `atomic usage` or `atomic usage --json`, the `get_usage` RPC command, or the SDK’s `getSubscriptionUsage()` ([#6850](https://github.com/bastani-inc/atomic/pull/6850)).
22
45
  - **Keep useful usage figures even when a provider sends a bad duration.** The percentage used and reset time stay visible. The terminal leaves out the unknown length; CLI JSON, RPC, and SDK reports return `null` for it ([#6855](https://github.com/bastani-inc/atomic/pull/6855)).
23
46
 
24
- **Updates, editing, and model fallback**
47
+ **Installation and updates**
25
48
 
49
+ - **Start with the native installer.** The docs now recommend `curl` on macOS and Linux and `irm` in Windows PowerShell. npm and Bun installs remain available but are not recommended for the CLI ([#6861](https://github.com/bastani-inc/atomic/pull/6861)).
26
50
  - **Update archive installs in place.** `atomic update` updates release-archive installs on macOS, Linux, and Windows, and only reports success if the launcher points to the requested release and that version starts. Restart open sessions to use it ([#6843](https://github.com/bastani-inc/atomic/pull/6843), [#6853](https://github.com/bastani-inc/atomic/pull/6853)).
51
+ - **Switch back to an older release.** `atomic update --version` can install an older archive even if it doesn’t contain an installer. If the requested version is too old, Atomic names the earliest supported archive for your platform and leaves your installation unchanged ([#6862](https://github.com/bastani-inc/atomic/pull/6862)).
52
+
53
+ **Editing and model fallback**
54
+
27
55
  - **Apply edits despite indentation differences.** If the target text matches in exactly one place apart from indentation, `edit` uses the file’s indentation for the replacement. If it can’t find a match, it shows the closest lines and what differs ([#6845](https://github.com/bastani-inc/atomic/pull/6845)).
28
56
  - **Get a reply from the backup model.** After a rate-limit error such as HTTP 429, Atomic waits for the previous attempt to finish before asking the backup model, rather than ending the turn without a reply. This fixes the intermittent failure on Windows ([#6848](https://github.com/bastani-inc/atomic/pull/6848)).
29
57
 
@@ -204,6 +204,12 @@ if (usage && usage.tokens !== null && usage.tokens > 100_000) {
204
204
  }
205
205
  ```
206
206
 
207
+ ### ctx.getSubscriptionUsage(options?)
208
+
209
+ Returns the [usage report](/guides/subscription-usage#json-and-sdk-contract) for the session’s configured accounts. By default it checks every account. Pass `accounts` for specific provider IDs, `maxAgeMs: 0` to check again, or `signal` to cancel.
210
+
211
+ Each account has `availability`, either `"available"` or `"unavailable"`. For example, `{ availability: "available", observedAt: "2026-11-28T16:30:00.000Z" }` says figures were available at that time. The existing `status` describes the outcome of the check.
212
+
207
213
  ### ctx.compact()
208
214
 
209
215
  Trigger compaction without awaiting completion. By default it clears the active context window so the agent recovers details from session history; when a compactor model is configured, the compactor's output replaces the context.
@@ -91,15 +91,15 @@ A successful update prints a line like `Updated atomic from 0.10.19-alpha.1 to 0
91
91
  | --- | --- |
92
92
  | Update Atomic and your installed packages | `atomic update --all` |
93
93
  | Include prereleases, which are previews of upcoming stable versions | `atomic update --prerelease` |
94
- | Install a particular release | `atomic update --version 0.10.19-alpha.1`. Use any [published version](https://github.com/bastani-inc/atomic/releases) without a `v` prefix. |
94
+ | Install a particular release | `atomic update --version 0.10.19-alpha.1`. Use a [published version](https://github.com/bastani-inc/atomic/releases) that has an archive for your platform, without a `v` prefix. |
95
95
 
96
- Running `atomic update` without a version won't downgrade a prerelease to an older stable release. To switch back, pass the stable version explicitly.
96
+ Running `atomic update` without a version won't downgrade a prerelease to an older stable release. To switch back, pass the version explicitly (for example, `atomic update --version 0.10.18`). The oldest supported archive is `0.8.30-alpha.1`, or `0.9.11-alpha.11` on Alpine and other musl-based Linux systems.
97
97
 
98
98
  - If the download fails, Atomic keeps the current version. Check your connection and try again. If Atomic keeps reporting a checksum mismatch, report the error and the release you tried to install.
99
99
  - If the update can't confirm the new version, try `atomic update` again. If `atomic` no longer starts or the update fails again, rerun the [release archive installer](#release-archive).
100
100
  - If Atomic says the install directory isn't writable, run the update as the account that owns the installation.
101
101
  - If an update succeeds but `atomic --version` still shows the older version in a new terminal, check which command your shell is using. Run `command -v atomic` on macOS or Linux, or `Get-Command atomic` in PowerShell. Put the updated installation's launcher directory first on `PATH`.
102
- - If your current or requested version doesn't support archive updates, or you unpacked the archive by hand, rerun the [installer](#release-archive). If another tool installed Atomic, use that tool or [configure a custom update command](/reference/cli#custom-update-command).
102
+ - If your current version doesn't support archive updates (including after switching back to `0.10.18`), or you unpacked the archive by hand, rerun the [installer](#release-archive) to move to another version. If another tool installed Atomic, use that tool or [configure a custom update command](/reference/cli#custom-update-command).
103
103
 
104
104
  ### Alpine and musl Linux archives
105
105
 
@@ -4,60 +4,32 @@ sidebarTitle: "Subscription usage"
4
4
  description: "See how much of your AI subscriptions you have used and when the limits reset."
5
5
  ---
6
6
 
7
- Type `/usage` in Atomic to see how much of your subscription allowance is left and when it resets. You can check without interrupting a reply. **Current** marks the account selected in this session. Press `r` to check again, the arrow keys to scroll, or `Esc` to close.
7
+ Type `/usage` to see your signed-in subscription accounts while a reply keeps running. API-key accounts do not appear. Each account shows how much of its allowance you have used and when it resets. If Atomic has no figures yet, the account says **Not available**.
8
8
 
9
9
  ```text
10
10
  Subscription usage
11
11
 
12
- OpenAI Codex · Current · openai-codex
13
- Session (5 h) █████░░░░░░░ 42.5% used Resets in 2 h 14 min · Sat 4:30 PM
14
- Weekly (7 d) ██████████░░ 87% used Resets in 2 d 3 h · Mon 5:16 PM
15
- Reset credits: 1 available
16
- ```
17
-
18
- A usage window is the period a provider's limit covers. In this example, `Session (5 h)` is the provider's five-hour window, not the current Atomic chat. The weekly bar shows 87% used, so 13% is left until the Monday reset. Atomic shows reset times in your terminal's local time.
12
+ Anthropic account 2 · anthropic-2
13
+ Weekly (7 d) ████░░░░░░░░ 37% used Resets in 3 d 20 h · Wed 1:00 PM
19
14
 
20
- Atomic shows only the windows your provider reports for your plan. A full bar means the account has reached that limit. If the provider offers reset credits, the report shows how many are available. Checking usage does not spend them or change settings. For token counts and costs for this Atomic session, use `/session` instead.
21
-
22
- | Sign-in | What you can see |
23
- | --- | --- |
24
- | **OpenAI Codex** (`openai-codex`) | The short and weekly windows, extra model limits, plan, usage credits, and reset credits when reported. |
25
- | **Anthropic Claude** (`anthropic`) | The five-hour and weekly windows, model-specific weekly windows such as Sonnet and Opus, and whether extra usage is on. Anthropic can bill use from tools like Atomic separately from what the Claude plan includes. |
26
- | **Grok** (`xai`) | Weekly credits, per-product use, and monthly use on accounts with monthly billing. |
27
- | **GitHub Copilot** (`github-copilot`) | Premium requests, chat, and completions if your plan reports them. Some of these may be unlimited. |
28
- | **Kimi Code** (`kimi-coding`) | The short and longer limits Kimi reports for your plan, including separate code use when available. |
29
- | **OpenRouter sign-in** (`openrouter`) | The sign-in’s credit cap, amount left, and spending in USD, not a subscription window. |
30
- | **Sign in with ChatGPT for the OpenAI API** (`openai`) | Figures from the account’s last model response. If it did not report subscription windows, Atomic shows the request and token limits instead. For full plan windows, sign in through OpenAI Codex (`openai-codex`). |
31
- | **Meta** | This sign-in does not report subscription usage. |
15
+ OpenAI Codex · openai-codex
16
+ Not available
32
17
 
33
- ### If an account has no usage numbers
18
+ Esc close r refresh
19
+ ```
34
20
 
35
- Read the message below the account name. If a provider’s check fails, other accounts can still show their usage. Where possible, Atomic shows figures from a recent reply and marks them as older.
21
+ New figures can appear while the panel is open. Atomic remembers the last figures it received. If a window has reset since then, it shows `0% used` without guessing the next reset time. Times are local.
36
22
 
37
- | What the report says | What it means and what to do |
38
- | --- | --- |
39
- | API key (`api_key`) | You pay for API use instead of using a subscription allowance. Check the provider’s billing dashboard. |
40
- | No subscription figures (`unsupported`, `no_subscription`) | That provider or account does not make plan figures available to Atomic. Check its own usage page. |
41
- | Not signed in (`not_signed_in`) or sign in again (`sign_in_again`) | There’s no saved sign-in for this account, or the provider rejected it. Use `/login` or `atomic auth login <provider>`. |
42
- | Claude login lacks usage access (`needs_profile_scope`) | A setup token can run models but can’t read usage. Use `/login anthropic` or `atomic auth login anthropic` and complete the full Claude sign-in instead. If you set a setup token in your environment, remove it when switching. |
43
- | No access (`forbidden`) | The provider did not grant this login permission to read its usage. Check the account’s permissions or its usage page. |
44
- | No usage observed yet (`not_observed`) | Send a normal prompt with that ChatGPT sign-in, then reopen `/usage` or press `r`. The standalone CLI can’t read figures from an open session’s last reply; use RPC to check that session from a script. |
45
- | Offline (`offline`) | Atomic did not contact the provider. Turn off offline mode and try again if you want a live check. |
46
- | Too many checks (`rate_limited`) | Wait a little before trying again. |
47
- | Timeout, connection, or provider error (`timeout`, `request_failed`, `http_error`, `malformed`) | The provider was unreachable, too slow, or returned a report Atomic could not read. Press `r` to retry; if it persists, check the provider’s own usage page. |
23
+ Press `r` to check again or `Esc` to close. When the panel shows `↑ ↓ scroll`, use the arrow keys or mouse wheel. The **Fullscreen scrollbar** setting applies to the panel and the chat. Checking usage never spends reset credits. For this chat’s token counts and costs, use `/session` instead.
48
24
 
49
25
  ## Check from a script
50
26
 
51
- Use the text report in a terminal and the JSON report in scripts. Neither starts a chat.
52
-
53
27
  ```bash
54
28
  atomic usage
55
29
  atomic usage --json
56
30
  ```
57
31
 
58
- Add `--offline` to list accounts without contacting providers. If you have not signed in, the text report tells you to run `atomic auth login`. The JSON report is `{"accounts":[]}`.
59
-
60
- `--json` prints one JSON object. The command can succeed even if one account has no figures or a check fails. Read each account's `status` before using its data. To check an open session from an RPC client, send [`get_usage`](/rpc/protocol#get_usage).
32
+ The first command prints a readable report. The second prints one JSON object. Both list all configured accounts, including API keys, without starting a chat. Add `--offline` to check without contacting providers. If there are no accounts, the JSON report is `{"accounts":[]}`. An [RPC client](/rpc/protocol#get_usage) can read the same report from an open session.
61
33
 
62
34
  ```json
63
35
  {
@@ -67,20 +39,12 @@ Add `--offline` to list accounts without contacting providers. If you have not s
67
39
  "name": "OpenAI Codex",
68
40
  "current": true,
69
41
  "status": "ready",
70
- "source": "live",
42
+ "availability": "available",
43
+ "source": "stored",
44
+ "observedAt": "2026-11-28T16:30:00.000Z",
71
45
  "windows": [
72
- { "label": "Session", "usedPercent": 42.5, "durationSeconds": 18000, "resetsAt": "2026-11-28T16:30:00.000Z" },
73
46
  { "label": "Weekly", "usedPercent": 87, "durationSeconds": 604800, "resetsAt": "2026-11-30T17:16:00.000Z" }
74
- ],
75
- "resetCredits": 1
76
- },
77
- {
78
- "provider": "anthropic",
79
- "name": "Anthropic",
80
- "current": false,
81
- "status": "unavailable",
82
- "reason": "needs_profile_scope",
83
- "message": "This login lacks usage access (user:profile). Sign in to Claude again without a setup token."
47
+ ]
84
48
  }
85
49
  ]
86
50
  }
@@ -88,46 +52,28 @@ Add `--offline` to list accounts without contacting providers. If you have not s
88
52
 
89
53
  ### JSON and SDK contract
90
54
 
91
- `atomic usage --json` and the SDK return the same stable `SubscriptionUsageReport` structure. Credentials, tokens and raw provider responses are never part of the report. Fields described as optional are omitted when not reported; missing values do not mean zero. Consumers can ignore new fields or reason codes if added in the future.
55
+ The CLI, RPC, SDK, and extension reports use the same account fields. They never include credentials or raw provider replies.
92
56
 
93
57
  | Field | Meaning |
94
58
  | --- | --- |
95
- | `accounts` | An array of results. It is empty if there are no accounts to check. |
96
- | `provider`, `name`, `current` | `provider` is the account ID, such as `openai-codex`. `name` is the display name. `current` is `true` for the selected account in an open session or the configured default in a standalone report, if known. |
97
- | `status` | `ready` means figures are available. `unavailable` explains why there are no figures. `failed` means the check did not complete. |
98
- | `source`, `observedAt` | For a `ready` account, `live` means a provider usage check supplied the figures. Atomic can reuse those figures briefly. `recent_response` means a live check did not supply figures, so Atomic used a recent reply. `last_request` means the figures came from an ordinary reply without a separate usage check. `observedAt` on `last_request` is when Atomic saw those figures, in UTC. |
99
- | `windows` | The limits the provider reported. Each has a `label` such as `Weekly`, a `usedPercent`, a length in seconds (`durationSeconds`), and a reset time in UTC (`resetsAt`). A percentage of `0` means unused, `100` means full, and some providers report more than `100`. Unknown lengths and reset times are `null`. |
100
- | `rateLimits` | Optional limits from the last OpenAI API request, distinct from subscription windows. Each entry says whether it covers `requests` or `tokens` (`kind`), plus any `limit`, `remaining`, or `resetsAt` the provider reported. |
101
- | `plan`, `resetCredits` | Optional. The provider’s plan name and the number of reset credits still available. |
102
- | `credits`, `extraUsage` | Optional. `credits` describes ordinary usage credits: whether you have any (`available`), whether they’re unlimited (`unlimited`), and how many remain (`balance`). `extraUsage` says whether Claude’s paid extra use is on (`enabled`) and how much of it has been used (`usedPercent`), if known. |
103
- | `creditCap`, `unlimitedWindows` | Optional. The OpenRouter cap (`limit`, or `null` if uncapped), dollars left (`remaining`), how often it resets (`reset`), and dollars used this day, week, or month (`dailyUsed`, `weeklyUsed`, `monthlyUsed`). `unlimitedWindows` lists any limits the provider reports as unlimited. |
104
- | `reason`, `message` | On `unavailable`, `failed`, or `recent_response` results, a code for scripts and a plain explanation for people. |
105
-
106
- The [account message table](#if-an-account-has-no-usage-numbers) explains the codes. If Atomic shows figures from a recent reply, `reason` still explains why the latest check did not return figures.
59
+ | `provider`, `name`, `current` | The account ID, display name, and whether it is selected. |
60
+ | `availability` | `"available"` or `"unavailable"`. An API-key account can be available without any subscription windows. |
61
+ | `status` | The outcome of the check: `"ready"`, `"unavailable"`, or `"failed"`. A report can contain all three. |
62
+ | `observedAt` | When Atomic learned these figures, in UTC. Check it if you need to know how old the figures are. |
63
+ | `source` | `"live"` for a provider check, `"recent_response"` for a reply used as a fallback, `"last_request"` for figures from the last OpenAI API request, or `"stored"` for the last saved figures. |
64
+ | `windows` | The limits the provider reported. An unknown length (`durationSeconds`) or reset time (`resetsAt`) is `null`. |
65
+ | `plan`, `credits`, `resetCredits`, `extraUsage`, `creditCap`, `unlimitedWindows`, `rateLimits` | More details when the provider reports them. `rateLimits` are request or token limits, not subscription windows. |
66
+ | `reason`, `message` | Additional details for scripts that need them. |
107
67
 
108
68
  ## Check from the SDK
109
69
 
110
- Install `@bastani/atomic` and import `getSubscriptionUsage`. It checks all configured accounts by default. Pass `accounts` to check selected IDs, `maxAgeMs: 0` to skip the cache (normally one minute), or `signal` to cancel the whole check. To include accounts registered only on an SDK session, pass `modelRuntime: session.modelRuntime`.
111
-
112
70
  ```typescript
113
71
  import { getSubscriptionUsage } from "@bastani/atomic";
114
72
 
115
- const { accounts } = await getSubscriptionUsage({
116
- accounts: ["openai-codex", "anthropic"],
117
- signal: AbortSignal.timeout(10_000),
118
- });
119
-
120
- const byWeeklyCapacity = accounts.flatMap((account) => {
121
- if (account.status !== "ready" || account.source !== "live") return [];
122
- const weekly = account.windows.find((window) => window.label === "Weekly");
123
- if (!weekly) return [];
124
- return [{ provider: account.provider, remainingPercent: Math.max(0, 100 - weekly.usedPercent) }];
125
- }).sort((a, b) => b.remainingPercent - a.remainingPercent);
126
-
127
- if (byWeeklyCapacity.length) console.table(byWeeklyCapacity);
128
- else console.log("No current weekly usage was reported.");
73
+ const { accounts } = await getSubscriptionUsage({ accounts: ["openai-codex"] });
74
+ for (const account of accounts) {
75
+ if (account.status === "ready") console.log(account.name, account.windows);
76
+ }
129
77
  ```
130
78
 
131
- This example compares weekly limits only. If OpenAI Codex reports 87% used, its row shows `13` under `remainingPercent`. It skips figures from earlier model replies.
132
-
133
- The SDK call rejects if you cancel it or Atomic can't read the saved accounts. A problem with one provider appears in that account's result without rejecting the whole report.
79
+ Omit `accounts` to check all configured accounts. Pass `maxAgeMs: 0` to check again instead of reusing a recent provider check. Extensions can call `ctx.getSubscriptionUsage()` for the accounts in their session.
@@ -252,7 +252,7 @@ Run `atomic update` to update Atomic itself. It prints a reminder that it didn't
252
252
 
253
253
  `--all` and `--models` each select what to update on their own. Passing `--self` and `--extensions` together is the same as `--all`. Pass `--extension` only once.
254
254
 
255
- When updating Atomic itself, add `--force` to reinstall even if you're already on the selected version. For [release archive installs](/getting-started/installation#update-a-release-archive-install), add `--version <release>` to install an exact version or `--prerelease` to include prereleases. Use only one of these two options. Exit and resume any open sessions to use the new version.
255
+ When updating Atomic itself, add `--force` to reinstall even if you're already on the selected version. For [release archive installs](/getting-started/installation#update-a-release-archive-install), add `--version <release>` to switch to that exact version, including an older one, or `--prerelease` to include prereleases. Use only one of these two options. The release must have an archive for your platform. Exit and resume any open sessions to use the selected version.
256
256
 
257
257
  On Windows, `atomic update` supports release archive, npm, and pnpm installs. For other Windows installs, use the tool that installed Atomic or [configure a custom update command](#custom-update-command). If the update warns about Intercom, see [Updating while Intercom is running](/getting-started/installation#updating-while-intercom-is-running).
258
258
 
@@ -368,7 +368,9 @@ The credential print commands emit one configured credential for an external cli
368
368
 
369
369
  ## Subscription usage
370
370
 
371
- Run `atomic usage` for a plain-text report of your signed-in accounts and `atomic usage --json` for the same report as one JSON object. Neither starts a session. A report can contain an unavailable or failed account without failing the command. `atomic usage --offline` lists accounts without contacting providers. See [Check subscription usage](/guides/subscription-usage) for supported accounts, an example, and the JSON fields.
371
+ Run `atomic usage` for a readable report or `atomic usage --json` for the same report as one JSON object. Neither starts a chat. Both include configured API-key accounts. Add `--offline` to see the last known figures without contacting providers.
372
+
373
+ Each account has `availability`, either `"available"` or `"unavailable"`. For example, `{"availability":"available","observedAt":"2026-11-28T16:30:00.000Z"}` says figures were available at that time. The existing `status` still describes the outcome of the check. See [Check subscription usage](/guides/subscription-usage) for a full example.
372
374
 
373
375
  ## MCP commands
374
376
 
@@ -258,12 +258,40 @@ Key fields on `data`:
258
258
 
259
259
  #### get_usage
260
260
 
261
- Read subscription usage without interrupting the current turn. The response `data` is the same [usage report](/guides/subscription-usage#json-and-sdk-contract) as `atomic usage --json`. An optional `provider` selects an account by its Atomic ID. Set `refresh` to `true` to skip the cache.
261
+ Use `get_usage` to show account usage in an app connected to Atomic, without interrupting a reply. Omit `provider` to check all configured accounts, including API keys. Set `refresh` to `true` to check again instead of reusing a recent check.
262
+
263
+ For example, check Codex usage in an offline session that uses Codex:
262
264
 
263
265
  ```json
264
- {"type":"get_usage","id":"report","refresh":true}
266
+ {"id":"report","type":"get_usage","provider":"openai-codex"}
265
267
  ```
266
268
 
269
+ If Atomic has not saved any figures for this account, the reply looks like this:
270
+
271
+ ```json
272
+ {
273
+ "id": "report",
274
+ "type": "response",
275
+ "command": "get_usage",
276
+ "success": true,
277
+ "data": {
278
+ "accounts": [
279
+ {
280
+ "provider": "openai-codex",
281
+ "name": "OpenAI Codex",
282
+ "current": true,
283
+ "status": "unavailable",
284
+ "availability": "unavailable",
285
+ "reason": "offline",
286
+ "message": "Usage checks are off in offline mode."
287
+ }
288
+ ]
289
+ }
290
+ }
291
+ ```
292
+
293
+ `data` has the same [report fields](/guides/subscription-usage#json-and-sdk-contract) as `atomic usage --json`. Each account's `availability` is `"available"` or `"unavailable"`; an API-key account can be available without subscription windows. `success: true` means Atomic returned a report, even when an account has no figures or its check failed. Read the account's `reason` or `message` for details. An error of `Could not read subscription accounts.` with `success: false` means Atomic could not make the report at all.
294
+
267
295
  #### get_messages
268
296
 
269
297
  Return all messages in the active conversation branch.
@@ -6,7 +6,32 @@ description: "Complete API reference for Atomic SDK session options, model scopi
6
6
 
7
7
  ## Subscription usage
8
8
 
9
- Call `getSubscriptionUsage()` to check account limits without starting a session. It returns a `Promise<SubscriptionUsageReport>` with the same fields as `atomic usage --json`. By default it checks every configured account. Pass `accounts` for specific provider IDs, `maxAgeMs: 0` to check again instead of reusing a recent result, or `signal` to cancel. To include accounts added only to an existing SDK session, pass `modelRuntime: session.modelRuntime`. See [the SDK example](/guides/subscription-usage#check-from-the-sdk) for a script that compares weekly limits.
9
+ Use `getSubscriptionUsage()` in a script to see how much of your accounts' allowances you've used, without starting a chat. It returns the same report as `atomic usage --json`, including API-key accounts.
10
+
11
+ ```typescript
12
+ import { getSubscriptionUsage } from "@bastani/atomic";
13
+
14
+ const { accounts } = await getSubscriptionUsage({ accounts: ["openai-codex"] });
15
+ for (const account of accounts) {
16
+ if (account.status !== "ready") {
17
+ console.log(`${account.name}: ${account.message}`);
18
+ continue;
19
+ }
20
+ for (const window of account.windows) {
21
+ console.log(`${account.name}: ${window.label}, ${window.usedPercent}% used`);
22
+ }
23
+ }
24
+ ```
25
+
26
+ Example output: `OpenAI Codex: Weekly, 87% used`.
27
+
28
+ Omit `accounts` to check all configured accounts. Pass `maxAgeMs: 0` to check again instead of reusing a recent check, or pass `signal` to cancel. To use the accounts from an existing SDK session, pass `modelRuntime: session.modelRuntime`.
29
+
30
+ Each account's `availability` is `"available"` or `"unavailable"`. An available API-key account need not have subscription windows. The separate `status` tells you how the check went: `"ready"`, `"unavailable"`, or `"failed"`. A provider that takes too long can return `reason: "timeout"` and a readable `message`, while other accounts still return figures.
31
+
32
+ If the call throws `Could not read subscription accounts.`, Atomic could not make the report at all. A cancelled call throws the reason from the supplied `signal` instead.
33
+
34
+ See [Check subscription usage](/guides/subscription-usage#json-and-sdk-contract) for the report fields.
10
35
 
11
36
  ## Options reference
12
37
 
package/docs/sessions.md CHANGED
@@ -37,6 +37,8 @@ atomic --import <file> # Import an exported JSONL session into storage
37
37
  atomic --export <file> [output] # Convert an exported .jsonl file on disk to HTML
38
38
  ```
39
39
 
40
+ If you see “damaged history links” when opening or importing a session, Atomic keeps loading it and shows the disconnected messages on separate branches. Use `/tree` to find those messages. If you need the original conversation order, open a backup from before the damage.
41
+
40
42
  Inside an interactive session, use these slash commands (see [Slash commands](/slash-commands) for the complete list):
41
43
 
42
44
  | Command | Action |
@@ -71,7 +73,7 @@ Every session binds to its original working directory so tools, `@path` referenc
71
73
  - **Custom IDs and flag conflicts.** `--session-id <id>` opens an existing project-local session with that exact ID in the current directory, or creates a new one (printing a notice on stderr) if none exists. IDs use ASCII letters, digits, `.`, `_`, and `-`, starting and ending with a letter or digit. Combining `--fork` with `--session-id <id>` names the new forked session and fails if that ID already exists. `--fork` cannot be combined with `--session`, `--continue`, `--resume`, or `--no-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`.
72
74
  - **Snapshots on resume.** When a session recorded [worktree snapshots](/worktree-snapshots), `atomic --session <id>` from another directory reopens it directly—reusing a matching local checkout or restoring files into `~/.atomic/agent/worktree-snapshots/` with a one-line notice. Inspect snapshots with `/session snapshot` ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
73
75
  - **Missing working directory.** If the recorded directory is gone and Atomic cannot restore a checkout from a snapshot, start `atomic --session <id>` from the directory you want to use, or select the session with `/resume`. At the interactive prompt, choose **Continue** to use the current directory without changing the saved path, **Fork** to create a separate session in the current directory, or **Cancel** to leave the session alone. Non-interactive modes (`-p`, RPC) and programmatic session switches report a missing-directory error rather than prompting.
74
- - **Fast resume.** Compacted sessions open from the latest compaction boundary instead of loading the entire history upfront. Commands that inspect earlier entries (`/tree`, `/fork`, `/clone`, `/export`, `/share`, and `/session`) page older history on demand. `/session` shows totals immediately and fills in per-model cost and cache stats once that scan finishes. Slow resumes or sessions with 100,000 or more entries print step timings before opening the TUI.
76
+ - **Fast resume.** Compacted sessions open from the latest compaction boundary instead of loading the entire history upfront. Commands that inspect earlier entries (`/tree`, `/fork`, `/clone`, `/export`, `/share`, and `/session`) page older history on demand. `/session` shows totals immediately and fills in per-model cost and cache stats once that scan finishes. When opening a session takes a little longer, Atomic shows what’s loading; set `ATOMIC_REDUCED_MOTION=1` for a still indicator.
75
77
  - **Draft preservation.** Text typed before a startup picker or prompt appears waits as a draft without confirming pickers or `Fork this session? [y/N]`.
76
78
  - **Tool restoration.** Plain resume restores the session's recorded tool selection along with newly available extension tools. Explicitly disabled tools stay off, `--tools +name,-name` adjusts the restored set, and previously used tools that are no longer installed appear under **Missing** in `/tools`.
77
79
 
@@ -16,7 +16,7 @@ Extensions, prompt templates, and skills can add more commands at runtime, so th
16
16
  | `/thinking` | `[level]` | Open the thinking-level selector, or set and persist a specific level directly (such as `off`, `low`, `medium`, `high`). |
17
17
  | `/scoped-models` | *(bare only)* | Enable or disable models included in `Ctrl+P` / `Shift+Ctrl+P` quick cycling. |
18
18
  | `/login` | `[provider]` | Configure subscription, account, or API-key authentication. Passing a provider jumps straight to login, opens the method chooser, or filters the provider list. |
19
- | `/usage` | *(bare only)* | Check [subscription usage](/guides/subscription-usage) without interrupting a reply. Press `r` to refresh or `Esc` to close. |
19
+ | `/usage` | *(bare only)* | Check [subscription usage](/guides/subscription-usage) for your signed-in subscription accounts without interrupting a reply. Press `r` to refresh or `Esc` to close. |
20
20
  | `/logout` | `[provider]` | Remove stored credentials from `~/.atomic/agent/auth.json` (and legacy `~/.pi/agent/auth.json`). Does not clear environment variables, CLI flags, or `models.json` keys. |
21
21
 
22
22
  ## Sessions and context
package/docs/usage.md CHANGED
@@ -90,7 +90,7 @@ Here are the everyday commands you will use most often:
90
90
  | Command | Description |
91
91
  | --- | --- |
92
92
  | `/login [provider]` | Sign in with an OAuth account/subscription or save an API key ([Authentication](/getting-started/authentication)) |
93
- | `/usage` | See [subscription usage](/guides/subscription-usage) for signed-in accounts while your reply keeps running |
93
+ | `/usage` | See [subscription usage](/guides/subscription-usage) for all your subscription accounts while your reply keeps running |
94
94
  | `/logout [provider]` | Remove stored credentials from `~/.atomic/agent/auth.json` (leaves env vars and `models.json` untouched) |
95
95
  | `/model [provider/model]` | Switch models and save the startup default ([Choose a model](/models/choose-a-model)). Exact matches switch immediately; other text pre-filters the picker. Inside the picker, press `←`/`→` to adjust effort level and `Tab` to toggle scoped vs. all models |
96
96
  | `/thinking [level]` | Set the thinking level and save the startup default (rejects levels unsupported by the current model) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.10.19-alpha.1",
3
+ "version": "0.10.20-alpha.1",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -118,13 +118,13 @@
118
118
  "prepack": "node -e \"require('node:fs').existsSync('scripts/split-dist.mjs') && import('./scripts/split-dist.mjs').then(() => import('./scripts/write-startup-files.mjs')).then(() => import('./scripts/write-startup-stages.mjs'))\""
119
119
  },
120
120
  "dependencies": {
121
- "@bastani/atomic-natives": "0.10.19-alpha.1",
122
- "@bastani/atomic-ai": "0.10.19-alpha.1",
123
- "@bastani/atomic-agent-core": "0.10.19-alpha.1",
124
- "@bastani/atomic-codemode": "0.10.19-alpha.1",
125
- "@bastani/atomic-tui": "0.10.19-alpha.1",
126
- "@bastani/atomic-schema": "0.10.19-alpha.1",
127
- "@bastani/atomic-telemetry": "0.10.19-alpha.1",
121
+ "@bastani/atomic-natives": "0.10.20-alpha.1",
122
+ "@bastani/atomic-ai": "0.10.20-alpha.1",
123
+ "@bastani/atomic-agent-core": "0.10.20-alpha.1",
124
+ "@bastani/atomic-codemode": "0.10.20-alpha.1",
125
+ "@bastani/atomic-tui": "0.10.20-alpha.1",
126
+ "@bastani/atomic-schema": "0.10.20-alpha.1",
127
+ "@bastani/atomic-telemetry": "0.10.20-alpha.1",
128
128
  "@silvia-odwyer/photon-node": "0.3.4",
129
129
  "chalk": "6.0.0",
130
130
  "glob": "14.0.6",