@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
@@ -1,7 +1,7 @@
1
1
  import "../_shared/rolldown-runtime-BGM3D5V3.js";
2
2
  import { join } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
- import { getBuiltinPackageLocations } from "../_shared/startup-0-0-FPPQF42L.js";
4
+ import { getBuiltinPackageLocations } from "../_shared/startup-0-0-OWBJIX35.js";
5
5
  // dist/core/intercom-broker-control.js
6
6
  /** Load `broker/control.ts` from the bundled Intercom package, in the npm package and the standalone binary alike. */
7
7
  async function loadIntercomBrokerControl() {
@@ -22,7 +22,7 @@ function __atomicOnDemandFailed(error, feature) {
22
22
  return (async () => {
23
23
  const root = new URL("../", import.meta.url);
24
24
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
25
- const key = `${root.href}#0.10.20-alpha.1`;
25
+ const key = `${root.href}#0.10.20-alpha.2`;
26
26
  let release = releases.get(key);
27
27
  if (release === undefined) {
28
28
  const current = (async () => {
@@ -50,7 +50,7 @@ function __atomicOnDemandFailed(error, feature) {
50
50
  } catch {
51
51
  // No installation to read, as in a bundle of the package: the release the process runs decides.
52
52
  }
53
- 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;
53
+ 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;
54
54
  if (updatedTo === undefined) throw error;
55
55
  const application = typeof running?.name === "string" ? running.name : "atomic";
56
56
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
@@ -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.20-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.2`;
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.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 intercom.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.2 while this session was running; restart it to keep using intercom.", {
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.20-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.2`;
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.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 intercom.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.2 while this session was running; restart it to keep using intercom.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -1,6 +1,6 @@
1
1
  import "../_shared/rolldown-runtime-BGM3D5V3.js";
2
- import "../_shared/startup-0-5-WN2IYA25.js";
3
- import { clearApiKeyCache } from "../_shared/startup-0-4-ZZXFKE55.js";
2
+ import "../_shared/startup-0-5-DNS6FYS7.js";
3
+ import { clearApiKeyCache } from "../_shared/startup-0-4-6XXL4JMZ.js";
4
4
  // dist/core/model-registry.js
5
5
  /**
6
6
  * Compatibility facade exposed to extensions.
@@ -1,3 +1,3 @@
1
1
  import "../_shared/rolldown-runtime-BGM3D5V3.js";
2
- export { hostStoragePackagesRegistered, registerHostStoragePackages, registerHostStoragePackagesAsync, resolvePackageStorageAdapter } from "../_shared/startup-8-1-QZMXUGHI.js";
2
+ export { hostStoragePackagesRegistered, registerHostStoragePackages, registerHostStoragePackagesAsync, resolvePackageStorageAdapter } from "../_shared/startup-8-1-VXBL37AI.js";
3
3
  //# sourceMappingURL=package-manager-storage-adapters.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.20-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.2`;
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.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.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.2 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.20-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.2`;
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.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.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.2 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -1,4 +1,4 @@
1
- /** Whether `error` is a resume failure the user can act on: a typed resume, workspace or Git-availability error. */
1
+ /** Whether `error` is a resume failure the user can act on. */
2
2
  export declare function isResumeFailure(error: unknown): error is Error;
3
3
  /**
4
4
  * The message to print for `error` when a resume stops on a failure the user can act on, else undefined. A drift error
@@ -1,8 +1,8 @@
1
1
  import "../_shared/rolldown-runtime-BGM3D5V3.js";
2
- import { withFileMutationQueue } from "../_shared/startup-0-0-FPPQF42L.js";
3
- import { isPowerShellToolResult, withResourceAdmission } from "../_shared/startup-0-1-Q7GBLBEL.js";
4
- import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputCapture, createStructuredOutputTool, getPowerShellConfig } from "../_shared/startup-0-2-JNYN24UI.js";
5
- import { BASH_SHELL_PRESENTATION, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createWriteTool } from "../_shared/startup-8-1-QZMXUGHI.js";
2
+ import { withFileMutationQueue } from "../_shared/startup-0-0-OWBJIX35.js";
3
+ import { isPowerShellToolResult, withResourceAdmission } from "../_shared/startup-0-1-DZYE4E5Z.js";
4
+ import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputCapture, createStructuredOutputTool, getPowerShellConfig } from "../_shared/startup-0-2-WFLTE4SC.js";
5
+ import { BASH_SHELL_PRESENTATION, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createWriteTool } from "../_shared/startup-8-1-VXBL37AI.js";
6
6
  import { AgentSessionRuntime, HOST_STARTED_SESSION, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createUnstartedAgentSession } from "../_shared/startup-15-1-WQZBOTMZ.js";
7
7
  export { AgentSessionRuntime, BASH_SHELL_PRESENTATION, HOST_STARTED_SESSION, STRUCTURED_OUTPUT_TOOL_NAME, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createStructuredOutputCapture, createStructuredOutputTool, createUnstartedAgentSession, createWriteTool, getPowerShellConfig, isPowerShellToolResult, withFileMutationQueue, withResourceAdmission };
8
8
  //# sourceMappingURL=sdk.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.20-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.2`;
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.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.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.2 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
package/dist/core/sdk.js CHANGED
@@ -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.20-alpha.1`;
9
+ const key = `${root.href}#0.10.20-alpha.2`;
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.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.", {
30
+ if (running === undefined || running.version === "0.10.20-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.2 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Which process resumed a session (#5135): `atomic --session`, `--resume` and `--continue` claim the session they open
3
- * before they write to it or restore its checkouts, so that two processes never resume one session at once. A claim is
2
+ * Which process owns a live session (#5135): startup and replacement paths claim it before they write to it or restore
3
+ * its checkouts, so that two processes sharing the agent directory never open one session for writing at once. A claim is
4
4
  * a file `session-claims/<session id>.json` under the agent directory, created atomically: it is written in full under
5
5
  * a name of its own, flushed, and then linked into place, which fails when a claim is already there. It names the
6
6
  * holder's host, pid and, where that can be read, when the holder started, so a later process given the same pid is
@@ -22,9 +22,20 @@ export declare function prepareSessionClaim(sessionId: string, options: {
22
22
  export declare function claimSession(sessionId: string, options: {
23
23
  readonly agentDir: string;
24
24
  }): () => void;
25
+ export interface LiveSessionClaimOptions {
26
+ readonly agentDir: string;
27
+ /** Read-only interactive mirror: preserve an existing host claim but never contend with our own engine. */
28
+ readonly mirror?: boolean;
29
+ /** The host may already hold the engine startup session or have just forked this target. */
30
+ readonly hostPid?: number;
31
+ }
32
+ /** Reserve the live writer's claim before it reads and writes the target; its open marker takes over on success. */
33
+ export declare function acquireLiveSessionClaim(sessionId: string, options: LiveSessionClaimOptions): Promise<() => Promise<void>>;
25
34
  /**
26
35
  * Hands the claim this process holds for `sessionId`, if any, to the session's open marker (#5135): the claim then
27
36
  * lasts until the returned function is called, when the session closes. That function never rejects.
28
37
  */
29
38
  export declare function attachSessionClaim(sessionId: string): (() => Promise<void>) | undefined;
39
+ /** Different store handles can hold separate open markers for the same process claim. */
40
+ export declare function holdSessionClaim(sessionId: string): (() => Promise<void>) | undefined;
30
41
  //# sourceMappingURL=session-claims.d.ts.map
@@ -0,0 +1,42 @@
1
+ import type { AgentSessionEventListener } from "./agent-session-types.js";
2
+ export type SessionLoadEvent = {
3
+ readonly loadId: string;
4
+ readonly target: string;
5
+ } & ({
6
+ readonly type: "session_load_started";
7
+ } | {
8
+ readonly type: "session_load_progress";
9
+ readonly message: string;
10
+ readonly historyEntries?: number;
11
+ } | {
12
+ readonly type: "session_load_finished";
13
+ readonly cancelled: boolean;
14
+ } | {
15
+ readonly type: "session_load_failed";
16
+ readonly message: string;
17
+ });
18
+ type SessionLoadListener = (event: SessionLoadEvent) => void;
19
+ export type SessionLoadPhase = (message: string, historyEntries?: number) => void;
20
+ /** Observe SDK opens before the session or runtime exists, including opens that fail. */
21
+ export declare function subscribeToSessionLoads(listener: SessionLoadListener): () => void;
22
+ export declare function isSessionLoadEvent<T extends {
23
+ type?: string;
24
+ }>(event: T): event is T & SessionLoadEvent;
25
+ export declare function replaySessionOpen(owner: object, listener: SessionLoadListener): void;
26
+ /** A wire already sent its startup events; relay only loads that take place after it attaches. */
27
+ export declare function subscribeToLiveSessionLoads(runtime: {
28
+ subscribe?: (listener: AgentSessionEventListener) => () => void;
29
+ }, listener: SessionLoadListener): (() => void) | undefined;
30
+ export declare function historyLoadingMessage(entries: number): string;
31
+ export declare function observeSessionLoadHistory<T>(phase: SessionLoadPhase, run: () => Promise<T>): Promise<T>;
32
+ /** Let a transport or an initial open own the lifecycle around its inner session work. */
33
+ export declare function withSessionLoadPhase<T>(phase: SessionLoadPhase, run: () => Promise<T>): Promise<T>;
34
+ export declare function startSessionLoad(target: string, emit: SessionLoadListener): {
35
+ phase: (message: string, historyEntries?: number) => void;
36
+ finish: (cancelled?: boolean) => void;
37
+ fail: (error: unknown) => void;
38
+ };
39
+ export declare function withSessionLoadEvents<T>(target: string, emit: SessionLoadListener, run: (phase: SessionLoadPhase) => Promise<T>, isCancelled?: (value: T) => boolean): Promise<T>;
40
+ export declare function withInitialSessionLoad<T>(target: string, run: (phase: SessionLoadPhase) => Promise<T>, owner: (value: T) => object): Promise<T>;
41
+ export {};
42
+ //# sourceMappingURL=session-load-events.d.ts.map
@@ -7,6 +7,7 @@ import { type ChatRecordOwner, type SessionChatRecords } from "./storage/session
7
7
  import { SessionConflictError, type SessionJsonValue } from "./storage/session/errors.js";
8
8
  import { SessionKeyDigests } from "./storage/session/key-digests.js";
9
9
  import { MemorySessionStore } from "./storage/session/memory-session-store.js";
10
+ import { type SessionParentRepair } from "./storage/session/parent-links.js";
10
11
  import { type StoredWorktreeSnapshotEntry } from "./storage/session/snapshot-records.js";
11
12
  import type { OversizedSessionEntry, SessionBlob, SessionHistoryPage, SessionHistoryReadOptions, SessionHistoryTotals, SessionRecoveryState, SessionStore } from "./storage/session/types.js";
12
13
  import type { PathContinuation, WorktreeRootMapping, WorktreeSnapshot, WorktreeUnrestored } from "./worktree-snapshot/types.ts";
@@ -58,6 +59,8 @@ export declare class SessionManager {
58
59
  private leafId;
59
60
  private historyIndex;
60
61
  private warnedHistoryLinksFor;
62
+ private importRepairs;
63
+ private historyRepairListener;
61
64
  private historyStartSeq;
62
65
  private answerWindowStart;
63
66
  private branchSettingsVouchedFrom;
@@ -95,6 +98,8 @@ export declare class SessionManager {
95
98
  private recordHeader;
96
99
  private restore;
97
100
  private warnHistoryLinks;
101
+ /** A warning observed while opening the recorded history, available to SDK and RPC clients. */
102
+ getHistoryWarning(): import("./storage/session/parent-links.js").SessionHistoryWarning | undefined;
98
103
  private restoreOpened;
99
104
  private restoreHistory;
100
105
  hasFullHistory(): boolean;
@@ -207,6 +212,7 @@ export declare class SessionManager {
207
212
  private initialize;
208
213
  private storeForNewSession;
209
214
  newSession(options?: NewSessionOptions): Promise<string | undefined>;
215
+ private newHistoryIndex;
210
216
  private _buildIndex;
211
217
  isPersisted(): boolean;
212
218
  /**
@@ -243,7 +249,11 @@ export declare class SessionManager {
243
249
  /** @internal Finalize provisional startup storage after project trust resolves. */
244
250
  rebindStore(store: SessionStore, removeProvisionalRecord: boolean): Promise<void>;
245
251
  openSessionById(sessionId: string, cwdOverride?: string, sessionDirectory?: string, options?: SessionOpenOptions): Promise<SessionManager>;
246
- importFromJsonl(inputPath: string, cwdOverride?: string): Promise<SessionManager>;
252
+ /** History links repaired when this manager imported its session; empty for ordinary opens. */
253
+ getImportRepairs(): readonly SessionParentRepair[];
254
+ importFromJsonl(inputPath: string, cwdOverride?: string, beforeWrite?: (id: string) => Promise<void>): Promise<SessionManager>;
255
+ /** @internal Reports committed repairs to the owning SDK session. */
256
+ bindHistoryRepairs(listener: (repaired: readonly SessionParentRepair[]) => void): void;
247
257
  private _appendEntry;
248
258
  private _appendEntries;
249
259
  private applyAppended;
@@ -459,6 +469,7 @@ export declare class SessionManager {
459
469
  */
460
470
  createBranchedSession(leafId: string, options?: {
461
471
  readonly history?: "tail";
472
+ readonly id?: string;
462
473
  }): Promise<string | undefined>;
463
474
  private installFork;
464
475
  /**
@@ -483,7 +494,7 @@ export declare class SessionManager {
483
494
  private contextBranch;
484
495
  private markForkOrigin;
485
496
  forkTo(cwd: string, sessionDir?: string | SessionStore, options?: NewSessionOptions): Promise<SessionManager>;
486
- static importFromJsonl(inputPath: string, cwd: string, sessionDir?: string | SessionStore): Promise<SessionManager>;
497
+ static importFromJsonl(inputPath: string, cwd: string, sessionDir?: string | SessionStore, beforeWrite?: (id: string) => Promise<void>): Promise<SessionManager>;
487
498
  private static constructWithStore;
488
499
  static create(cwd: string, sessionDir?: string, options?: NewSessionOptions): Promise<SessionManager>;
489
500
  static create(store: SessionStore, cwd: string, options?: NewSessionOptions): Promise<SessionManager>;