@bastani/atomic 0.10.20-alpha.1 → 0.10.20-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js +72 -39
  6. package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -1
  7. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +57 -18
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  9. package/dist/_shared/mode-shared-2QJSCUM6.js +59 -14
  10. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  11. package/dist/_shared/p0-cli-BB45ZQY6.js +2 -2
  12. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  13. package/dist/_shared/p1b-elig-BY2G5BUE.js +6 -3
  14. package/dist/_shared/p1b-elig-BY2G5BUE.js.map +1 -1
  15. package/dist/_shared/runtime-O4KCSG4C.js +4 -4
  16. package/dist/_shared/sdk-5ZFNDXUJ.js +208 -54
  17. package/dist/_shared/sdk-5ZFNDXUJ.js.map +1 -1
  18. package/dist/_shared/session-data-AHTU7IS6.js +14 -7
  19. package/dist/_shared/session-data-AHTU7IS6.js.map +1 -1
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-HXQLSUWM.js +2 -2
  22. package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-FPPQF42L.js → startup-0-0-OWBJIX35.js} +161 -86
  24. package/dist/_shared/startup-0-0-OWBJIX35.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-Q7GBLBEL.js → startup-0-1-DZYE4E5Z.js} +321 -17
  26. package/dist/_shared/startup-0-1-DZYE4E5Z.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-JNYN24UI.js → startup-0-2-WFLTE4SC.js} +113 -6
  28. package/dist/_shared/startup-0-2-WFLTE4SC.js.map +1 -0
  29. package/dist/_shared/startup-0-3-DE2NCS6A.js +47 -23
  30. package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-ZZXFKE55.js → startup-0-4-6XXL4JMZ.js} +37 -13
  32. package/dist/_shared/startup-0-4-6XXL4JMZ.js.map +1 -0
  33. package/dist/_shared/{startup-0-5-WN2IYA25.js → startup-0-5-DNS6FYS7.js} +126 -150
  34. package/dist/_shared/startup-0-5-DNS6FYS7.js.map +1 -0
  35. package/dist/_shared/startup-10-0-O6DAT7U4.js +93 -72
  36. package/dist/_shared/startup-10-0-O6DAT7U4.js.map +1 -1
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +5 -5
  39. package/dist/_shared/startup-15-0-E7RYG5YF.js +6 -6
  40. package/dist/_shared/startup-15-1-WQZBOTMZ.js +289 -122
  41. package/dist/_shared/startup-15-1-WQZBOTMZ.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +263 -145
  43. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  44. package/dist/_shared/{startup-8-1-QZMXUGHI.js → startup-8-1-VXBL37AI.js} +325 -10
  45. package/dist/_shared/startup-8-1-VXBL37AI.js.map +1 -0
  46. package/dist/_shared/storage-command-7MGXLJGZ.js +11 -273
  47. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  48. package/dist/_shared/storage-status-T6FUXRIM.js +4 -4
  49. package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
  50. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  51. package/dist/_shared/team-DOQKICG2.js +2 -2
  52. package/dist/_shared/tree-outline-MUEPK5B7.js +9 -2
  53. package/dist/_shared/tree-outline-MUEPK5B7.js.map +1 -1
  54. package/dist/binary-self-update.js +3 -3
  55. package/dist/builtin/intercom/broker/broker.bundle.mjs +46 -8
  56. package/dist/builtin/intercom/broker/broker.ts +1 -0
  57. package/dist/builtin/intercom/broker/client.ts +5 -1
  58. package/dist/builtin/intercom/broker/departed-children.ts +12 -6
  59. package/dist/builtin/intercom/broker/ended-child-wakes.ts +2 -0
  60. package/dist/builtin/intercom/index.bundle.mjs +130 -264
  61. package/dist/builtin/intercom/message-display.ts +42 -0
  62. package/dist/builtin/intercom/package.json +1 -1
  63. package/dist/builtin/intercom/types.ts +1 -0
  64. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  65. package/dist/builtin/mcp/package.json +1 -1
  66. package/dist/builtin/subagents/package.json +1 -1
  67. package/dist/builtin/subagents/src/extension/index.bundle.mjs +99 -20
  68. package/dist/builtin/web-access/index.bundle.mjs +15 -9
  69. package/dist/builtin/web-access/package.json +1 -1
  70. package/dist/cli/args.js +2 -2
  71. package/dist/cli/auth-cli.code.js +6 -6
  72. package/dist/cli/auth-cli.impl.js +3 -3
  73. package/dist/cli/auth-cli.js +3 -3
  74. package/dist/cli/blueprint-command.code.js +4 -4
  75. package/dist/cli/blueprint-command.impl.js +3 -3
  76. package/dist/cli/blueprint-command.js +3 -3
  77. package/dist/cli/intercom-command.code.js +3 -3
  78. package/dist/cli/intercom-command.impl.js +3 -3
  79. package/dist/cli/intercom-command.js +3 -3
  80. package/dist/cli/list-models.code.js +3 -3
  81. package/dist/cli/list-models.impl.js +3 -3
  82. package/dist/cli/list-models.js +3 -3
  83. package/dist/cli/session-picker.code.js +2 -2
  84. package/dist/cli/session-picker.impl.js +3 -3
  85. package/dist/cli/session-picker.js +3 -3
  86. package/dist/cli/startup-ui.code.js +2 -2
  87. package/dist/cli/startup-ui.impl.js +3 -3
  88. package/dist/cli/startup-ui.js +3 -3
  89. package/dist/cli/storage-command.impl.js +3 -3
  90. package/dist/cli/storage-command.js +3 -3
  91. package/dist/cli/storage-search-session.code.js +2 -2
  92. package/dist/cli/storage-search-session.impl.js +3 -3
  93. package/dist/cli/storage-search-session.js +3 -3
  94. package/dist/cli/team-command.code.js +2 -2
  95. package/dist/cli/team-command.impl.js +3 -3
  96. package/dist/cli/team-command.js +3 -3
  97. package/dist/cli.js +2 -2
  98. package/dist/core/agent-session-runtime.d.ts +14 -3
  99. package/dist/core/agent-session-types.d.ts +5 -1
  100. package/dist/core/debug.impl.js +3 -3
  101. package/dist/core/debug.js +3 -3
  102. package/dist/core/export-html/card-projection.code.js +74 -72
  103. package/dist/core/export-html/card-projection.code.js.map +1 -1
  104. package/dist/core/export-html/card-projection.impl.js +3 -3
  105. package/dist/core/export-html/card-projection.js +3 -3
  106. package/dist/core/export-html/index.code.js +12 -4
  107. package/dist/core/export-html/index.code.js.map +1 -1
  108. package/dist/core/export-html/index.impl.js +3 -3
  109. package/dist/core/export-html/index.js +3 -3
  110. package/dist/core/export-html/json-spans.impl.js +3 -3
  111. package/dist/core/export-html/json-spans.js +3 -3
  112. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  113. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  114. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  115. package/dist/core/export-html/template.js +24 -23
  116. package/dist/core/export-html/tool-renderer.code.js +1 -1
  117. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  118. package/dist/core/export-html/tool-renderer.js +3 -3
  119. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  120. package/dist/core/extensions/jiti-loader.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  122. package/dist/core/extensions/jiti-static-loader.js +3 -3
  123. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  124. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  125. package/dist/core/extensions/loader-host-modules.js +3 -3
  126. package/dist/core/extensions/loader-virtual-modules.js +2 -2
  127. package/dist/core/extensions/runner-context.js +2 -2
  128. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  129. package/dist/core/intercom-broker-control-host.js +3 -3
  130. package/dist/core/intercom-broker-control.code.js +3 -3
  131. package/dist/core/intercom-broker-control.impl.js +3 -3
  132. package/dist/core/intercom-broker-control.js +3 -3
  133. package/dist/core/model-registry.js +2 -2
  134. package/dist/core/package-manager-storage-adapters.code.js +1 -1
  135. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  136. package/dist/core/package-manager-storage-adapters.js +3 -3
  137. package/dist/core/resume/failure.d.ts +1 -1
  138. package/dist/core/sdk.code.js +4 -4
  139. package/dist/core/sdk.impl.js +3 -3
  140. package/dist/core/sdk.js +3 -3
  141. package/dist/core/session-claims.d.ts +13 -2
  142. package/dist/core/session-load-events.d.ts +42 -0
  143. package/dist/core/session-manager-core.d.ts +13 -2
  144. package/dist/core/session-manager-core.js +211 -98
  145. package/dist/core/session-manager-core.js.map +1 -1
  146. package/dist/core/session-manager-errors.d.ts +2 -2
  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 +1 -1
  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.code.js +1 -1
  153. package/dist/core/session-storage.impl.js +3 -3
  154. package/dist/core/session-storage.js +3 -3
  155. package/dist/core/settings-manager.js +2 -2
  156. package/dist/core/storage/index.js +2 -2
  157. package/dist/core/storage/node-sqlite-thread.js +2 -2
  158. package/dist/core/storage/node-sqlite.js +2 -2
  159. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  160. package/dist/core/storage/offline-snapshot-file.js +3 -3
  161. package/dist/core/storage/provider.js +2 -2
  162. package/dist/core/storage/schema-catalog.d.ts +2 -1
  163. package/dist/core/storage/schema-catalog.js +25 -6
  164. package/dist/core/storage/schema-catalog.js.map +1 -1
  165. package/dist/core/storage/selection.js +2 -2
  166. package/dist/core/storage/session/branch-fork-source.code.js +17 -4
  167. package/dist/core/storage/session/branch-fork-source.code.js.map +1 -1
  168. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  169. package/dist/core/storage/session/branch-fork-source.js +3 -3
  170. package/dist/core/storage/session/card-view.impl.js +3 -3
  171. package/dist/core/storage/session/card-view.js +3 -3
  172. package/dist/core/storage/session/child-reader.code.js +3 -3
  173. package/dist/core/storage/session/child-reader.impl.js +3 -3
  174. package/dist/core/storage/session/child-reader.js +3 -3
  175. package/dist/core/storage/session/chunked-resume-projection.code.js +1 -1
  176. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  177. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  178. package/dist/core/storage/session/expanded-child-details.code.js +3 -3
  179. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  180. package/dist/core/storage/session/expanded-child-details.js +3 -3
  181. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  182. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  183. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  184. package/dist/core/storage/session/fork-row-index.js +3 -3
  185. package/dist/core/storage/session/fork-staging.code.js +8 -4
  186. package/dist/core/storage/session/fork-staging.code.js.map +1 -1
  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 +29 -14
  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.d.ts +8 -4
  198. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  199. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  200. package/dist/core/storage/session/memory-session-store.d.ts +3 -3
  201. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  202. package/dist/core/storage/session/memory-session-store.js +3 -3
  203. package/dist/core/storage/session/parent-links.d.ts +122 -0
  204. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  205. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  206. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  207. package/dist/core/storage/session/released-history-files.code.js +3 -3
  208. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  209. package/dist/core/storage/session/released-history-files.js +3 -3
  210. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  211. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  212. package/dist/core/storage/session/session-resume.impl.js +3 -3
  213. package/dist/core/storage/session/session-resume.js +3 -3
  214. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  215. package/dist/core/storage/session/snapshot-cut.js +3 -3
  216. package/dist/core/storage/session/snapshot-history.code.js +5 -6
  217. package/dist/core/storage/session/snapshot-history.code.js.map +1 -1
  218. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  219. package/dist/core/storage/session/snapshot-history.js +3 -3
  220. package/dist/core/storage/session/sql-session-store.d.ts +4 -3
  221. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  222. package/dist/core/storage/session/sql-session-store.js +3 -3
  223. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  224. package/dist/core/storage/session/tree-outline.js +3 -3
  225. package/dist/core/storage/session/tree-presentation.code.js +1 -1
  226. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  227. package/dist/core/storage/session/tree-presentation.js +3 -3
  228. package/dist/core/storage/session/types.d.ts +9 -3
  229. package/dist/core/storage/session/usage-observations.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.impl.js +3 -3
  235. package/dist/core/structured-output/index.js +3 -3
  236. package/dist/core/tasks/task-completion-entry.code.js +1 -1
  237. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  238. package/dist/core/tasks/task-completion-entry.js +3 -3
  239. package/dist/core/tasks/task-file-history.code.js +3 -3
  240. package/dist/core/tasks/task-file-history.impl.js +3 -3
  241. package/dist/core/tasks/task-file-history.js +3 -3
  242. package/dist/core/tasks/task-reference-archive.code.js +5 -5
  243. package/dist/core/tasks/task-reference-archive.js +3 -3
  244. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  245. package/dist/core/tasks/task-reference-identity.js +3 -3
  246. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  247. package/dist/core/tasks/task-reference-stream.js +3 -3
  248. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  249. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  250. package/dist/core/tasks/task-view-source.code.js +1 -1
  251. package/dist/core/tasks/task-view-source.impl.js +3 -3
  252. package/dist/core/tasks/task-view-source.js +3 -3
  253. package/dist/core/tools/read-url.code.js +3 -3
  254. package/dist/core/tools/read-url.impl.js +3 -3
  255. package/dist/core/tools/read-url.js +3 -3
  256. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  257. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  258. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  259. package/dist/core/worktree-snapshot/errors.js +3 -3
  260. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  261. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  262. package/dist/extensions/codemode/execute.code.js +2 -2
  263. package/dist/extensions/codemode/execute.impl.js +3 -3
  264. package/dist/extensions/codemode/execute.js +3 -3
  265. package/dist/extensions/codemode/renderer.code.js +12 -7
  266. package/dist/extensions/codemode/renderer.code.js.map +1 -1
  267. package/dist/extensions/codemode/renderer.impl.js +3 -3
  268. package/dist/extensions/codemode/renderer.js +3 -3
  269. package/dist/extensions/mcp/cli.code.js +2 -2
  270. package/dist/extensions/mcp/cli.impl.js +3 -3
  271. package/dist/extensions/mcp/cli.js +3 -3
  272. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  273. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  274. package/dist/extensions/mcp/cli.lazy.js +3 -3
  275. package/dist/extensions/mcp/runtime.impl.js +3 -3
  276. package/dist/extensions/mcp/runtime.js +3 -3
  277. package/dist/index.d.ts +5 -2
  278. package/dist/index.js +7 -7
  279. package/dist/main-first-time-setup.code.js +2 -2
  280. package/dist/main-first-time-setup.impl.js +3 -3
  281. package/dist/main-first-time-setup.js +3 -3
  282. package/dist/main.js +1 -1
  283. package/dist/modes/index.d.ts +1 -1
  284. package/dist/modes/interactive/components/intercom-wake-notice.d.ts +4 -0
  285. package/dist/modes/interactive/components/notice-line.d.ts +1 -1
  286. package/dist/modes/interactive/components/stored-tree-view.code.js +6 -5
  287. package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -1
  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/tool-block.d.ts +5 -1
  291. package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
  292. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  293. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  294. package/dist/modes/interactive-engine/isolated-runtime.d.ts +3 -3
  295. package/dist/modes/interactive-engine/protocol.d.ts +0 -4
  296. package/dist/modes/rpc/rpc-client-api.d.ts +5 -0
  297. package/dist/modes/rpc/rpc-types.d.ts +23 -5
  298. package/dist/package-manager-cli.code.js +7 -7
  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/12.js +1 -1
  305. package/dist/startup-stages/13.js +2 -1
  306. package/dist/startup-stages/14.js +1 -0
  307. package/dist/startup-stages/4.js +1 -1
  308. package/dist/startup-stages/6.js +1 -1
  309. package/dist/startup-stages/7.js +1 -1
  310. package/dist/startup-stages/8.js +1 -1
  311. package/dist/startup-stages/stages.json +1 -1
  312. package/dist/utils/startup-database-spare.code.js +3 -3
  313. package/dist/utils/startup-database-spare.impl.js +3 -3
  314. package/dist/utils/startup-database-spare.js +3 -3
  315. package/dist/utils/tools-manager.code.js +1 -1
  316. package/dist/utils/tools-manager.impl.js +3 -3
  317. package/dist/utils/tools-manager.js +3 -3
  318. package/docs/.agents/context/DESIGN.md +30 -0
  319. package/docs/changelog.mdx +23 -0
  320. package/docs/docs.json +1 -1
  321. package/docs/guides/subscription-usage.md +3 -3
  322. package/docs/intercom.md +3 -1
  323. package/docs/json.md +3 -3
  324. package/docs/providers.md +2 -0
  325. package/docs/rpc/protocol.md +1 -1
  326. package/docs/sdk.md +2 -0
  327. package/docs/sessions.md +36 -1
  328. package/docs/subagents.md +2 -0
  329. package/package.json +8 -8
  330. package/dist/_shared/startup-0-0-FPPQF42L.js.map +0 -1
  331. package/dist/_shared/startup-0-1-Q7GBLBEL.js.map +0 -1
  332. package/dist/_shared/startup-0-2-JNYN24UI.js.map +0 -1
  333. package/dist/_shared/startup-0-4-ZZXFKE55.js.map +0 -1
  334. package/dist/_shared/startup-0-5-WN2IYA25.js.map +0 -1
  335. package/dist/_shared/startup-8-1-QZMXUGHI.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.10.20-alpha.2] - 2026-11-29
6
+
7
+ Atomic makes sessions safer to open, import, and restore, and gives apps and scripts a way to show progress while they wait.
8
+
9
+ **Opening and restoring sessions**
10
+
11
+ - **Show session loading progress in apps and scripts.** The SDK, RPC, and CLI JSON now report when a load starts, makes progress, and ends. Read JSON records by their `type`, since loading events can appear before the session header ([#6877](https://github.com/bastani-inc/atomic/pull/6877)).
12
+ - **Keep your current session if another process holds the one you want.** Atomic refuses to open a session that is already in use instead of letting two processes write to it ([#6883](https://github.com/bastani-inc/atomic/pull/6883)).
13
+ - **Recover damaged history without losing messages.** Atomic reconnects broken history links to the previous saved entry and fixes repeated IDs on import. Imports tell you what was repaired ([#6878](https://github.com/bastani-inc/atomic/pull/6878)).
14
+ - **Restore several optional checkouts at once.** One checkout no longer gets skipped when several are restored together ([#6885](https://github.com/bastani-inc/atomic/pull/6885)).
15
+
16
+ **Subscription usage**
17
+
18
+ - **See how to scroll in `/usage`.** The footer always shows the arrow-key hint, even when the list fits on screen ([#6881](https://github.com/bastani-inc/atomic/pull/6881)).
19
+
20
+ **Reading the conversation**
21
+
22
+ - **See the rest of long messages and notices.** Intercom messages, subagent wake notices and resume results show a short preview. When something is left out, press `Ctrl+O` or your own expand shortcut to see it all ([#6890](https://github.com/bastani-inc/atomic/pull/6890)).
23
+ - **No repeated thinking-drop notices.** Resuming a session with broken history links no longer shows the same notice twice ([#6888](https://github.com/bastani-inc/atomic/pull/6888)).
24
+ - **Less setup work on Windows.** Opening a session no longer redoes Intercom's database setup after another session finished setting up the same database ([#6886](https://github.com/bastani-inc/atomic/issues/6886), [#6889](https://github.com/bastani-inc/atomic/pull/6889)).
25
+
26
+ ### Added
27
+
28
+ - The SDK, RPC, and CLI JSON output report when a session is loading and when it finishes or fails ([#6877](https://github.com/bastani-inc/atomic/pull/6877)).
29
+
30
+ ### Fixed
31
+
32
+ - `/usage` always shows how to scroll, even when the list already fits on screen ([#6849](https://github.com/bastani-inc/atomic/issues/6849), [#6881](https://github.com/bastani-inc/atomic/pull/6881)).
33
+ - Switching sessions now refuses to open a session that another Atomic process is using, without leaving your current session ([#6883](https://github.com/bastani-inc/atomic/pull/6883)).
34
+ - Atomic automatically fixes broken history links and duplicate entry IDs when it writes or imports sessions, keeping the messages and reporting what changed. An entry whose earlier link is broken is placed after the entry recorded just before it, including when opening an older session without rewriting it. A repeated entry ID no longer disconnects the messages that followed its earlier occurrence ([#6878](https://github.com/bastani-inc/atomic/pull/6878)).
35
+ - Restoring several optional checkouts at once no longer occasionally skips one ([#6884](https://github.com/bastani-inc/atomic/issues/6884), [#6885](https://github.com/bastani-inc/atomic/pull/6885)).
36
+ - Intercom messages, subagent wake notices, and resume results now show short previews. When a message, notice, or tool result leaves something out, press `Ctrl+O` or your own expand shortcut to see the rest ([#6890](https://github.com/bastani-inc/atomic/pull/6890)).
37
+ - Thinking-drop notices no longer repeat after resuming a session with broken history links ([#6888](https://github.com/bastani-inc/atomic/pull/6888)).
38
+ - Intercom no longer repeats SQLite setup when sessions finish setting up the same database after it ([#6886](https://github.com/bastani-inc/atomic/issues/6886), [#6889](https://github.com/bastani-inc/atomic/pull/6889)).
39
+
5
40
  ## [0.10.20-alpha.1] - 2026-11-28
6
41
 
7
42
  Atomic remembers your subscription usage across sessions and makes long conversations faster and easier to reopen.
@@ -31842,7 +31842,7 @@ function __atomicOnDemandFailed(error, feature) {
31842
31842
  return (async () => {
31843
31843
  const root = new URL("../", import.meta.url);
31844
31844
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
31845
- const key = `${root.href}#0.10.20-alpha.1`;
31845
+ const key = `${root.href}#0.10.20-alpha.2`;
31846
31846
  let release = releases.get(key);
31847
31847
  if (release === undefined) {
31848
31848
  const current = (async () => {
@@ -31870,7 +31870,7 @@ function __atomicOnDemandFailed(error, feature) {
31870
31870
  } catch {
31871
31871
  // No installation to read, as in a bundle of the package: the release the process runs decides.
31872
31872
  }
31873
- const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.1" ? installed : running !== undefined && running.version !== "0.10.20-alpha.1" ? "0.10.20-alpha.1" : undefined;
31873
+ const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.2" ? installed : running !== undefined && running.version !== "0.10.20-alpha.2" ? "0.10.20-alpha.2" : undefined;
31874
31874
  if (updatedTo === undefined) throw error;
31875
31875
  const application = typeof running?.name === "string" ? running.name : "atomic";
31876
31876
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
@@ -40,7 +40,7 @@ function __atomicOnDemandFailed(error, feature) {
40
40
  return (async () => {
41
41
  const root = new URL("../", import.meta.url);
42
42
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
43
- const key = `${root.href}#0.10.20-alpha.1`;
43
+ const key = `${root.href}#0.10.20-alpha.2`;
44
44
  let release = releases.get(key);
45
45
  if (release === undefined) {
46
46
  const current = (async () => {
@@ -68,7 +68,7 @@ function __atomicOnDemandFailed(error, feature) {
68
68
  } catch {
69
69
  // No installation to read, as in a bundle of the package: the release the process runs decides.
70
70
  }
71
- const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.1" ? installed : running !== undefined && running.version !== "0.10.20-alpha.1" ? "0.10.20-alpha.1" : undefined;
71
+ const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.2" ? installed : running !== undefined && running.version !== "0.10.20-alpha.2" ? "0.10.20-alpha.2" : undefined;
72
72
  if (updatedTo === undefined) throw error;
73
73
  const application = typeof running?.name === "string" ? running.name : "atomic";
74
74
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
@@ -5131,7 +5131,7 @@ function __atomicOnDemandFailed(error, feature) {
5131
5131
  return (async () => {
5132
5132
  const root = new URL("../", import.meta.url);
5133
5133
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
5134
- const key = `${root.href}#0.10.20-alpha.1`;
5134
+ const key = `${root.href}#0.10.20-alpha.2`;
5135
5135
  let release = releases.get(key);
5136
5136
  if (release === undefined) {
5137
5137
  const current = (async () => {
@@ -5159,7 +5159,7 @@ function __atomicOnDemandFailed(error, feature) {
5159
5159
  } catch {
5160
5160
  // No installation to read, as in a bundle of the package: the release the process runs decides.
5161
5161
  }
5162
- const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.1" ? installed : running !== undefined && running.version !== "0.10.20-alpha.1" ? "0.10.20-alpha.1" : undefined;
5162
+ const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.2" ? installed : running !== undefined && running.version !== "0.10.20-alpha.2" ? "0.10.20-alpha.2" : undefined;
5163
5163
  if (updatedTo === undefined) throw error;
5164
5164
  const application = typeof running?.name === "string" ? running.name : "atomic";
5165
5165
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
@@ -1,16 +1,16 @@
1
1
  import { __name } from "./rolldown-runtime-BGM3D5V3.js";
2
2
  import { APP_NAME, APP_TITLE, CHANGELOG_URL, CONFIG_DIR_NAME, UpdatedInstallError, VERSION, VERSION_ADOPTION_ENDPOINT, canonicalizePathAsync, createChildProcessEnvironment, createModuleRequire, detectInstallChangeAsync, engineHeapRuntimeArgsForHost, findHelperExecutableAsync, getAgentDir, getAuthPath, getChangelogPath, getCwdRelativePath, getDebugLogPath, getDocsPath, getShareViewerUrl, helperLaunchAsync, isBunBinary, isModuleLoadFailure, loadOnDemand, markLifecycleTiming, missingHelperOptions, processCompileCacheDeferral, setDebugSetting, shortenHomePath, updatedInstallError } from "./p0-cli-BB45ZQY6.js";
3
- import { BUILTIN_SLASH_COMMANDS, BUNDLED_EXTENSION_SLASH_COMMANDS, CountdownTimer, DynamicBorder, MissingSessionCwdError, NO_QUEUED_MESSAGES, TrustDecisionSelector, asyncScope, carryRowSource, chatPosition, chatReceipt, deduplicateDiagnostics, fetchSubscriptionUsage, findProviderDefaultModel, formatAppendRecoveryNotice, formatMissingSessionCwdPrompt, formatNoModelsAvailableMessage, getEngineSessionStats, getMissingSessionCwdOptions, getPiUserAgent, isGitUnavailableError, isInstallTelemetryEnabled, isInteractiveEngineResourceReadinessError, isPathInside, isTrustDecision, isUnknownModel, keepDroppedQueuedMessages, markEventLoopShutdown, markEventLoopStartupComplete, noteRowSource, noteSavedSeq, onSessionProviderRequestDispatched, parseSlashCommand, placeTranscriptFrame, projectTrustWarningVisible, queuedMessagesUnderWay, quitAsInteractiveApp, raceWithAbortSignal, readSubscriptionCredential, recordStartupThinkingLevel, rowSource, safeTrustChoiceIndex, savedRowKey, savedSeqOf, sessionParent, setDeprecationWarningSink, setMarkitDiagnosticSink, shouldRenderEngineDiagnosticAsChatError, takeQueuedMessagesDroppedAt, usageCostBreakdown, userMessageOrigin, yieldToEventLoop, yieldToTimerTurn } from "./startup-0-0-FPPQF42L.js";
4
- import { ExtensionInputComponent, ExtensionSelectorComponent, ReopenedCompletionHeaders, cancelInitialBinding, codexAccountId, createCustomMessage, ensurePngTranscoder, ensureTool, formatResumeTimings, formatToolStatus, getBuiltinExtensionEntryLabel, getPromptCacheTtlMs as getPromptCacheTtlMs$1, initialBindScope, isOfflineModeEnabled, isVerbatimCompactionMessage, isWorkspaceError, latestResumeTimings, normalizeMessageContent, normalizeModelFailureSignal, observedOpenAiDirectUsage, observedSubscriptionUsage, prewarmModelApi, readHostInputFormRequest, registerInitialBindings, stripVerbatimCompactionPrefix, subscriptionBearer, subscriptionCredentialKey, taskPromptHost, thinkingLevelForModelSwitch, usageObservationStore, withHistoryLoadObserver } from "./startup-0-1-Q7GBLBEL.js";
3
+ import { BUILTIN_SLASH_COMMANDS, BUNDLED_EXTENSION_SLASH_COMMANDS, CountdownTimer, DynamicBorder, MissingSessionCwdError, NO_QUEUED_MESSAGES, TrustDecisionSelector, acquireLiveSessionClaim, asyncScope, carryRowSource, chatPosition, chatReceipt, deduplicateDiagnostics, fetchSubscriptionUsage, findProviderDefaultModel, formatAppendRecoveryNotice, formatMissingSessionCwdPrompt, formatNoModelsAvailableMessage, getEngineSessionStats, getMissingSessionCwdOptions, getPiUserAgent, isInstallTelemetryEnabled, isInteractiveEngineResourceReadinessError, isPathInside, isTrustDecision, isUnknownModel, keepDroppedQueuedMessages, markEventLoopShutdown, markEventLoopStartupComplete, noteRowSource, noteSavedSeq, onSessionProviderRequestDispatched, parseSlashCommand, placeTranscriptFrame, projectTrustWarningVisible, queuedMessagesUnderWay, quitAsInteractiveApp, raceWithAbortSignal, readSubscriptionCredential, recordStartupThinkingLevel, rowSource, safeTrustChoiceIndex, savedRowKey, savedSeqOf, setDeprecationWarningSink, setMarkitDiagnosticSink, shouldRenderEngineDiagnosticAsChatError, takeQueuedMessagesDroppedAt, usageCostBreakdown, userMessageOrigin, yieldToEventLoop, yieldToTimerTurn } from "./startup-0-0-OWBJIX35.js";
4
+ import { ExtensionInputComponent, ExtensionSelectorComponent, ReopenedCompletionHeaders, cancelInitialBinding, codexAccountId, createCustomMessage, describeSessionParentRepairs, ensurePngTranscoder, ensureTool, formatResumeTimings, formatToolStatus, getBuiltinExtensionEntryLabel, getPromptCacheTtlMs as getPromptCacheTtlMs$1, initialBindScope, isOfflineModeEnabled, isVerbatimCompactionMessage, latestResumeTimings, normalizeMessageContent, normalizeModelFailureSignal, observedOpenAiDirectUsage, observedSubscriptionUsage, prewarmModelApi, readHostInputFormRequest, registerInitialBindings, sessionParent, stripVerbatimCompactionPrefix, subscriptionBearer, subscriptionCredentialKey, taskPromptHost, thinkingLevelForModelSwitch, usageObservationStore } from "./startup-0-1-DZYE4E5Z.js";
5
5
  import { KeybindingsManager as KeybindingsManager$1, OVERLAY_ACTIVE_ROW_MARKER, Theme, clickableKeyTextHint, consumeStartupInput, formatKeyText, getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, isNavHelpKey, keyDisplayText, keyHint, keyText, keyTextHint, loadAllHighlightLanguages, navEntryKeyParts, onThemeChange, recordTimeSinceReset, refreshCustomThemes, renderNavKeyOverlay, setRegisteredThemes, slashCommandHint, stopThemeWatcher, theme } from "./p2-shell-main-B2WIALFD.js";
6
6
  import { ProjectTrustStore, failureDebugFields, getProjectTrustPathAsync, hasTrustRequiringProjectResourcesAsync, reportDebugAsync } from "./p1b-elig-BY2G5BUE.js";
7
- import { WorkingRunMeter, compactionMeta, findExactModelReferenceMatch, getPowerShellConfigAsync, killSupervisedProcessTrees, killTrackedDetachedChildren, readUsageAccountKey, runInProgress, sessionLifetime, showStartupInput, showStartupSelector, taskTranscriptSource, usageCredentialToken } from "./startup-0-2-JNYN24UI.js";
7
+ import { WorkingRunMeter, compactionMeta, findExactModelReferenceMatch, getPowerShellConfigAsync, isSessionLoadEvent, killSupervisedProcessTrees, killTrackedDetachedChildren, observeSessionLoadHistory, readUsageAccountKey, runInProgress, sessionLifetime, showStartupInput, showStartupSelector, taskTranscriptSource, usageCredentialToken } from "./startup-0-2-WFLTE4SC.js";
8
8
  import { AtomicWorkedStatusComponent, AtomicWorkingLoader, DEFAULT_WORKING_MESSAGE, buildContextEntries, getOwnerTaskStore, isResumeFailure, parseGitUrl, resolveModelScopeFromModels, resolveModelScopeWithDiagnostics, sessionEntryToDisplayMessages, watchAtomicWorkingClock, watchOwnerTaskStoreBinding } from "./startup-0-3-DE2NCS6A.js";
9
- import { SESSION_HISTORY_SCAN_ENTRIES, findDecisionError, isDecisionConfigError, isRpcRequestAcceptedFailure, isRpcTransportFailure } from "./settings-startup-HXQLSUWM.js";
10
- import { readAhead } from "./startup-8-0-34CBHPZH.js";
11
- import { CredentialSynchronizationError, DefaultPackageManager, chunkedToolResult, chunkedToolResultEntry, findInitialModel, firstSubagentAttempt, getSkillCatalog, isOAuthLoginCancelled, resolveRestoredModelReference, uncachedCopilotModelHint } from "./startup-0-5-WN2IYA25.js";
12
- import { SessionLoadingStatus, formatModelLabel } from "./startup-0-4-ZZXFKE55.js";
13
- import { ENGINE_SHUTDOWN_GRACE_MS, FooterDataProvider, appendBoundedStderr, compareWorktreeSnapshot, currentWorktreeSnapshots, describeExportedSnapshots, describeLastCapture, describeSnapshotExport, describeWorktreeRestoreStatus, describeWorktreeSnapshot, dismissedAgentPanelItems, ownerTaskViewSource, sourceError, subscribeAgentPanel, worktreeRestoreNotices } from "./startup-8-1-QZMXUGHI.js";
9
+ import { SESSION_HISTORY_SCAN_ENTRIES, SessionAlreadyOpenError, findDecisionError, isDecisionConfigError, isRpcRequestAcceptedFailure, isRpcTransportFailure } from "./settings-startup-HXQLSUWM.js";
10
+ import { createSessionId, readAhead } from "./startup-8-0-34CBHPZH.js";
11
+ import { CredentialSynchronizationError, DefaultPackageManager, chunkedToolResult, chunkedToolResultEntry, findInitialModel, firstSubagentAttempt, getSkillCatalog, isOAuthLoginCancelled, resolveRestoredModelReference, uncachedCopilotModelHint } from "./startup-0-5-DNS6FYS7.js";
12
+ import { SessionLoadingStatus, formatModelLabel } from "./startup-0-4-6XXL4JMZ.js";
13
+ import { ENGINE_SHUTDOWN_GRACE_MS, FooterDataProvider, appendBoundedStderr, compareWorktreeSnapshot, currentWorktreeSnapshots, describeExportedSnapshots, describeLastCapture, describeSnapshotExport, describeWorktreeRestoreStatus, describeWorktreeSnapshot, dismissedAgentPanelItems, ownerTaskViewSource, sourceError, subscribeAgentPanel, worktreeRestoreNotices } from "./startup-8-1-VXBL37AI.js";
14
14
  import { tryExecuteSessionSlashCommand } from "./startup-15-0-E7RYG5YF.js";
15
15
  import { SessionManager } from "./startup-10-0-O6DAT7U4.js";
16
16
  import { IsolatedInteractiveRuntime, SessionImportFileNotFoundError, parseSkillBlock, sessionCloseReason } from "./startup-15-1-WQZBOTMZ.js";
@@ -13234,7 +13234,7 @@ function withSessionLoading(mode, label, run) {
13234
13234
  const status = new SessionLoadingStatus(() => mode.ui.requestRender(), label);
13235
13235
  dock.addChild(status);
13236
13236
  status.begin();
13237
- return withHistoryLoadObserver((entries) => status.phase(`Reading ${entries.toLocaleString()} history entries`), async () => {
13237
+ return observeSessionLoadHistory(status.phase, async () => {
13238
13238
  try {
13239
13239
  return await run(status.phase);
13240
13240
  } finally {
@@ -18145,6 +18145,14 @@ function precedingDropCount(mode, notes) {
18145
18145
  if (notes.earlier) return notes.earlier.drops;
18146
18146
  if (notes.summarizedParent === void 0) return 0;
18147
18147
  const manager = mode.sessionManager;
18148
+ if (manager?.getHistoryWarning()) {
18149
+ const branch = manager.getBranch(notes.summarizedParent);
18150
+ const previous = branch.findLast((entry) => entry.type === "message" && entry.message.role === "assistant");
18151
+ if (previous?.type === "message" && previous.message.role === "assistant") return countDroppedThinkingBlocks(previous.message);
18152
+ if (manager.hasFullHistory()) return 0;
18153
+ const first = branch[0];
18154
+ return first && (first.parentId == null || manager.getEntrySeq(first.id) === 1) ? 0 : void 0;
18155
+ }
18148
18156
  const getEntry = (id) => manager?.getEntry(id);
18149
18157
  const positionOf = (id) => manager?.getEntrySeq(id);
18150
18158
  let entry = getEntry(notes.summarizedParent);
@@ -19210,7 +19218,7 @@ function canArmMaxDeferralCap(host, controller) {
19210
19218
  }
19211
19219
  function isPromptStreamingEvent(event) {
19212
19220
  if (!event) return false;
19213
- return event.type === "message_start" && event.message?.role === "assistant" || event.type === "message_update" || event.type === "tool_execution_start";
19221
+ return event.type === "message_start" && typeof event.message !== "string" && event.message?.role === "assistant" || event.type === "message_update" || event.type === "tool_execution_start";
19214
19222
  }
19215
19223
  function startBackgroundWarmup(host, controller) {
19216
19224
  clearQuietTimer(controller);
@@ -25286,6 +25294,7 @@ InteractiveModeBase.prototype.handleEvent = function(event) {
25286
25294
  return result;
25287
25295
  };
25288
25296
  async function handleAgentEvent(event, call) {
25297
+ if (isSessionLoadEvent(event)) return;
25289
25298
  if ("parentToolCallId" in event && event.parentToolCallId && event.type.startsWith("tool_execution_")) return;
25290
25299
  if (!this.isInitialized) {
25291
25300
  const startup = {
@@ -26965,7 +26974,7 @@ var UsageSelector = class {
26965
26974
  this.viewport.setScrollbar(this.options.scrollbar?.() ?? "hidden");
26966
26975
  const rowCount = this.viewport.render(inner).length;
26967
26976
  const bodyHeight = Math.min(rowCount, capacity);
26968
- const keys = `${theme.bold("Esc")} close ${theme.bold("r")} refresh${rowCount > capacity ? ` ${theme.bold("↑ ↓")} scroll` : ""}`;
26977
+ const keys = `${theme.bold("↑ ↓")} scroll ${theme.bold("Esc")} close ${theme.bold("r")} refresh`;
26969
26978
  const head = [
26970
26979
  ...this.border.render(width),
26971
26980
  `${pad}${truncateToWidth(theme.bold("Subscription usage"), inner)}`,
@@ -27700,7 +27709,11 @@ InteractiveModeBase.prototype.handleResumeSession = async function(sessionId, op
27700
27709
  projectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),
27701
27710
  history: "tail",
27702
27711
  onProgress
27703
- }));
27712
+ })).catch((failure) => {
27713
+ if (!(failure instanceof SessionAlreadyOpenError)) throw failure;
27714
+ this.showError(failure.message);
27715
+ return { cancelled: true };
27716
+ });
27704
27717
  if (!result.cancelled) finishMissingCwdResume(this, `Resumed session in ${error.issue.fallbackCwd}`);
27705
27718
  return result;
27706
27719
  }
@@ -27722,12 +27735,12 @@ function finishMissingCwdResume(mode, status) {
27722
27735
  showSessionNotices(mode, mode.runtimeHost.takeResumeNotices());
27723
27736
  mode.startSessionRecovery("resume");
27724
27737
  }
27725
- async function forkIntoActiveStore(mode, source, cwd) {
27738
+ async function forkIntoActiveStore(mode, source, cwd, id) {
27726
27739
  const store = mode.sessionManager.getSessionStore();
27727
- if ("exportPath" in source) return SessionManager.forkFrom(source.exportPath, cwd, store);
27740
+ if ("exportPath" in source) return SessionManager.forkFrom(source.exportPath, cwd, store, { id });
27728
27741
  const stored = await mode.sessionManager.openSessionById(source.sessionId, void 0, source.sessionDirectory);
27729
27742
  try {
27730
- return await stored.forkTo(cwd, store);
27743
+ return await stored.forkTo(cwd, store, { id });
27731
27744
  } finally {
27732
27745
  if (stored.getSessionStore() !== store) await stored.getSessionStore().close();
27733
27746
  }
@@ -27738,20 +27751,25 @@ async function forkIntoActiveStore(mode, source, cwd) {
27738
27751
  */
27739
27752
  InteractiveModeBase.prototype.switchToForkedSession = async function(source, cwd, options) {
27740
27753
  const { result, forkId } = await withSessionLoading(this, "Forking session", async (onProgress) => {
27741
- const fork = await forkIntoActiveStore(this, source, cwd);
27742
- const forkId = fork.getSessionId();
27743
- const result = await this.runtimeHost.switchSession(forkId, {
27744
- withSession: options?.withSession,
27745
- projectTrustContextFactory: (forkCwd) => this.createProjectTrustContext(forkCwd),
27746
- history: "tail",
27747
- onProgress,
27748
- startedSession: fork
27749
- });
27750
- if (result.cancelled) await this.sessionManager.deleteSession(forkId);
27751
- return {
27752
- result,
27753
- forkId
27754
- };
27754
+ const forkId = createSessionId();
27755
+ const releaseClaim = this.sessionManager.isPersisted() ? await acquireLiveSessionClaim(forkId, { agentDir: this.runtimeHost.services.agentDir }) : void 0;
27756
+ try {
27757
+ const fork = await forkIntoActiveStore(this, source, cwd, forkId);
27758
+ const result = await this.runtimeHost.switchSession(forkId, {
27759
+ withSession: options?.withSession,
27760
+ projectTrustContextFactory: (forkCwd) => this.createProjectTrustContext(forkCwd),
27761
+ history: "tail",
27762
+ onProgress,
27763
+ startedSession: fork
27764
+ });
27765
+ if (result.cancelled) await this.sessionManager.deleteSession(forkId);
27766
+ return {
27767
+ result,
27768
+ forkId
27769
+ };
27770
+ } finally {
27771
+ await releaseClaim?.();
27772
+ }
27755
27773
  });
27756
27774
  if (!result.cancelled) finishMissingCwdResume(this, `Forked into new session ${forkId} in ${cwd}`);
27757
27775
  return result;
@@ -28255,28 +28273,43 @@ InteractiveModeBase.prototype.handleImportCommand = async function(text) {
28255
28273
  return;
28256
28274
  }
28257
28275
  const importStartedAt = (/* @__PURE__ */ new Date()).toISOString();
28258
- const finishSuccessfulImport = () => {
28276
+ const finishSuccessfulImport = (repaired = []) => {
28259
28277
  this.renderCurrentSessionState();
28260
28278
  if (this.firstRunNoticeVisible) this.clearFirstRunOnboardingUi();
28261
28279
  this.showStatus(`Session imported from: ${inputPath}`);
28262
- showSessionNotices(this, [...worktreeRestoreNotices(this.sessionManager, importStartedAt), ...this.runtimeHost.takeResumeNotices()]);
28280
+ const summary = describeSessionParentRepairs(repaired);
28281
+ showSessionNotices(this, [
28282
+ ...summary === void 0 ? [] : [{
28283
+ type: "info",
28284
+ message: summary
28285
+ }],
28286
+ ...worktreeRestoreNotices(this.sessionManager, importStartedAt),
28287
+ ...this.runtimeHost.takeResumeNotices()
28288
+ ]);
28263
28289
  };
28264
28290
  try {
28265
28291
  InteractiveModeBase.prototype.clearWorkingLoader.call(this);
28266
- if ((await withSessionLoading(this, "Importing session", () => this.runtimeHost.importFromJsonl(inputPath))).cancelled) {
28292
+ const result = await withSessionLoading(this, "Importing session", () => this.runtimeHost.importFromJsonl(inputPath));
28293
+ if (result.cancelled) {
28267
28294
  this.showStatus("Import cancelled");
28268
28295
  return;
28269
28296
  }
28270
- finishSuccessfulImport();
28297
+ finishSuccessfulImport(result.repaired);
28271
28298
  } catch (error) {
28272
28299
  if (error instanceof MissingSessionCwdError) switch (await this.promptForMissingSessionCwd(error)) {
28273
- case "continue":
28274
- if ((await withSessionLoading(this, "Importing session", () => this.runtimeHost.importFromJsonl(inputPath, error.issue.fallbackCwd))).cancelled) {
28300
+ case "continue": {
28301
+ const result = await withSessionLoading(this, "Importing session", () => this.runtimeHost.importFromJsonl(inputPath, error.issue.fallbackCwd)).catch((failure) => {
28302
+ if (!(failure instanceof SessionAlreadyOpenError)) throw failure;
28303
+ this.showError(failure.message);
28304
+ return { cancelled: true };
28305
+ });
28306
+ if (result.cancelled) {
28275
28307
  this.showStatus("Import cancelled");
28276
28308
  return;
28277
28309
  }
28278
- finishSuccessfulImport();
28310
+ finishSuccessfulImport(result.repaired);
28279
28311
  return;
28312
+ }
28280
28313
  case "fork":
28281
28314
  if ((await this.switchToForkedSession({ exportPath: inputPath }, error.issue.fallbackCwd)).cancelled) this.showStatus("Import cancelled");
28282
28315
  return;
@@ -28288,7 +28321,7 @@ InteractiveModeBase.prototype.handleImportCommand = async function(text) {
28288
28321
  this.showError(`Failed to import session: ${error.message}`);
28289
28322
  return;
28290
28323
  }
28291
- if (isWorkspaceError(error) || isGitUnavailableError(error)) {
28324
+ if (isResumeFailure(error)) {
28292
28325
  this.showError(error.message);
28293
28326
  return;
28294
28327
  }
@@ -28851,7 +28884,7 @@ function __atomicOnDemandFailed(error, feature) {
28851
28884
  return (async () => {
28852
28885
  const root = new URL("../", import.meta.url);
28853
28886
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
28854
- const key = `${root.href}#0.10.20-alpha.1`;
28887
+ const key = `${root.href}#0.10.20-alpha.2`;
28855
28888
  let release = releases.get(key);
28856
28889
  if (release === undefined) {
28857
28890
  const current = (async () => {
@@ -28879,7 +28912,7 @@ function __atomicOnDemandFailed(error, feature) {
28879
28912
  } catch {
28880
28913
  // No installation to read, as in a bundle of the package: the release the process runs decides.
28881
28914
  }
28882
- const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.1" ? installed : running !== undefined && running.version !== "0.10.20-alpha.1" ? "0.10.20-alpha.1" : undefined;
28915
+ const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.2" ? installed : running !== undefined && running.version !== "0.10.20-alpha.2" ? "0.10.20-alpha.2" : undefined;
28883
28916
  if (updatedTo === undefined) throw error;
28884
28917
  const application = typeof running?.name === "string" ? running.name : "atomic";
28885
28918
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {