@bastani/atomic 0.10.15 → 0.10.16-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 (351) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/__atomic_timers/index.js +112 -0
  3. package/dist/__atomic_timers/index.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/http-YFAPTIZD.js +20 -22
  7. package/dist/_shared/http-YFAPTIZD.js.map +1 -1
  8. package/dist/_shared/lib-4PES5P4V.js +2 -2
  9. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +55 -25
  10. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  11. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +13 -14
  12. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  13. package/dist/_shared/mode-shared-2QJSCUM6.js +16 -17
  14. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  15. package/dist/_shared/p0-cli-BB45ZQY6.js +23 -37
  16. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  17. package/dist/_shared/p1a-prewarm-XIU57JHF.js +6 -5
  18. package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
  19. package/dist/_shared/{p1b-elig-TVB5CBLL.js → p1b-elig-BY2G5BUE.js} +28 -36
  20. package/dist/_shared/p1b-elig-BY2G5BUE.js.map +1 -0
  21. package/dist/_shared/runtime-O4KCSG4C.js +4 -4
  22. package/dist/_shared/sdk-OHKMDJ74.js +382 -45
  23. package/dist/_shared/sdk-OHKMDJ74.js.map +1 -1
  24. package/dist/_shared/session-data-AHTU7IS6.js +3 -3
  25. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  26. package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -1
  27. package/dist/_shared/{startup-0-0-Q3MWKUK4.js → startup-0-0-ERMIDHQT.js} +296 -382
  28. package/dist/_shared/startup-0-0-ERMIDHQT.js.map +1 -0
  29. package/dist/_shared/{startup-0-1-M6OWAYHH.js → startup-0-1-RTASI3HG.js} +430 -102
  30. package/dist/_shared/startup-0-1-RTASI3HG.js.map +1 -0
  31. package/dist/_shared/{startup-0-2-2HUMCPKX.js → startup-0-2-YZZOC22D.js} +8109 -7962
  32. package/dist/_shared/startup-0-2-YZZOC22D.js.map +1 -0
  33. package/dist/_shared/{startup-0-3-4ZYBYQNM.js → startup-0-3-DE2NCS6A.js} +130 -83
  34. package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -0
  35. package/dist/_shared/startup-0-4-ZMJV547D.js +7 -7
  36. package/dist/_shared/{startup-0-5-YDW47QX6.js → startup-0-5-HZX3ZPTP.js} +411 -85
  37. package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +1 -0
  38. package/dist/_shared/startup-10-0-TDQNBDDL.js +42 -29
  39. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
  40. package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
  41. package/dist/_shared/startup-14-0-MLX36RBG.js +11 -10
  42. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  43. package/dist/_shared/startup-15-0-YUKGAC63.js +9 -8
  44. package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
  45. package/dist/_shared/startup-15-1-4S7FLMNG.js +24 -16
  46. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  47. package/dist/_shared/startup-8-0-34CBHPZH.js +40 -19
  48. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  49. package/dist/_shared/startup-8-1-LZFXSD3Z.js +129 -92
  50. package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -1
  51. package/dist/_shared/storage-command-7MGXLJGZ.js +6 -4
  52. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  53. package/dist/_shared/storage-status-K7PX2RXA.js +7 -6
  54. package/dist/_shared/storage-status-K7PX2RXA.js.map +1 -1
  55. package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
  56. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  57. package/dist/_shared/team-DOQKICG2.js +4 -3
  58. package/dist/_shared/team-DOQKICG2.js.map +1 -1
  59. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  60. package/dist/builtin/intercom/index.bundle.mjs +1 -2
  61. package/dist/builtin/intercom/package.json +1 -1
  62. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  63. package/dist/builtin/mcp/package.json +1 -1
  64. package/dist/builtin/subagents/CHANGELOG.md +6 -0
  65. package/dist/builtin/subagents/package.json +1 -1
  66. package/dist/builtin/subagents/src/extension/index.bundle.mjs +102 -42
  67. package/dist/builtin/web-access/index.bundle.mjs +1 -2
  68. package/dist/builtin/web-access/package.json +1 -1
  69. package/dist/cli/args.js +2 -2
  70. package/dist/cli/auth-cli.code.js +6 -6
  71. package/dist/cli/auth-cli.impl.js +3 -3
  72. package/dist/cli/auth-cli.js +3 -3
  73. package/dist/cli/blueprint-command.code.js +7 -6
  74. package/dist/cli/blueprint-command.code.js.map +1 -1
  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 +2 -2
  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 +1 -1
  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.d.ts +1 -0
  99. package/dist/core/debug.code.js +1 -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 +1 -1
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  111. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  112. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/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.js +1 -1
  124. package/dist/core/http-dispatcher.d.ts +2 -1
  125. package/dist/core/intercom-broker-control-host.code.js +1 -1
  126. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  127. package/dist/core/intercom-broker-control-host.js +3 -3
  128. package/dist/core/intercom-broker-control.code.js +3 -3
  129. package/dist/core/intercom-broker-control.impl.js +3 -3
  130. package/dist/core/intercom-broker-control.js +3 -3
  131. package/dist/core/lock-takeover.d.ts +2 -0
  132. package/dist/core/model-config.d.ts +28 -0
  133. package/dist/core/model-registry.js +1 -1
  134. package/dist/core/model-runtime-streaming.d.ts +3 -2
  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/provider-rate-limits.d.ts +17 -10
  138. package/dist/core/provider-request-admission.d.ts +16 -0
  139. package/dist/core/resume/blueprint/barrier.d.ts +6 -6
  140. package/dist/core/resume/blueprint/build.d.ts +3 -1
  141. package/dist/core/resume/blueprint/ledger.d.ts +3 -2
  142. package/dist/core/resume/blueprint/resume.d.ts +2 -1
  143. package/dist/core/retry-policy.d.ts +3 -1
  144. package/dist/core/sdk.code.js +3 -3
  145. package/dist/core/sdk.impl.js +3 -3
  146. package/dist/core/sdk.js +3 -3
  147. package/dist/core/session-manager-core.js +6 -6
  148. package/dist/core/session-manager-list.impl.js +3 -3
  149. package/dist/core/session-manager-list.js +3 -3
  150. package/dist/core/session-manager-types.d.ts +1 -1
  151. package/dist/core/session-manager.code.js +2 -2
  152. package/dist/core/session-manager.impl.js +3 -3
  153. package/dist/core/session-manager.js +3 -3
  154. package/dist/core/session-open-markers.js +1 -1
  155. package/dist/core/session-storage.impl.js +3 -3
  156. package/dist/core/session-storage.js +3 -3
  157. package/dist/core/settings-duration.d.ts +3 -0
  158. package/dist/core/settings-manager-resource-accessors.d.ts +2 -1
  159. package/dist/core/settings-schema.d.ts +1 -0
  160. package/dist/core/storage/index.js +2 -2
  161. package/dist/core/storage/node-sqlite-file-gate.js +7 -6
  162. package/dist/core/storage/node-sqlite-file-gate.js.map +1 -1
  163. package/dist/core/storage/node-sqlite-thread.js +2 -2
  164. package/dist/core/storage/node-sqlite.js +2 -2
  165. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  166. package/dist/core/storage/offline-snapshot-file.js +3 -3
  167. package/dist/core/storage/prefix.js +3 -0
  168. package/dist/core/storage/prefix.js.map +1 -1
  169. package/dist/core/storage/provider.js +2 -2
  170. package/dist/core/storage/selection.js +2 -2
  171. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  172. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  173. package/dist/core/storage/session/branch-fork-source.js +3 -3
  174. package/dist/core/storage/session/card-view.impl.js +3 -3
  175. package/dist/core/storage/session/card-view.js +3 -3
  176. package/dist/core/storage/session/child-reader.code.js +24 -7
  177. package/dist/core/storage/session/child-reader.code.js.map +1 -1
  178. package/dist/core/storage/session/child-reader.impl.js +3 -3
  179. package/dist/core/storage/session/child-reader.js +3 -3
  180. package/dist/core/storage/session/chunked-resume-projection.code.js +1 -1
  181. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  182. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  183. package/dist/core/storage/session/expanded-child-details.code.js +3 -3
  184. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  185. package/dist/core/storage/session/expanded-child-details.js +3 -3
  186. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  187. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  188. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  189. package/dist/core/storage/session/fork-row-index.js +3 -3
  190. package/dist/core/storage/session/fork-staging.code.js +1 -1
  191. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  192. package/dist/core/storage/session/fork-staging.js +3 -3
  193. package/dist/core/storage/session/fork-window.code.js +4 -4
  194. package/dist/core/storage/session/fork-window.impl.js +3 -3
  195. package/dist/core/storage/session/fork-window.js +3 -3
  196. package/dist/core/storage/session/history-pages.impl.js +3 -3
  197. package/dist/core/storage/session/history-pages.js +3 -3
  198. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  199. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  200. package/dist/core/storage/session/jsonl-session-store.d.ts +2 -2
  201. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  202. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  203. package/dist/core/storage/session/memory-session-store.d.ts +2 -2
  204. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  205. package/dist/core/storage/session/memory-session-store.js +3 -3
  206. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  207. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  208. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  209. package/dist/core/storage/session/released-history-files.code.js +4 -4
  210. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  211. package/dist/core/storage/session/released-history-files.js +3 -3
  212. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  213. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  214. package/dist/core/storage/session/session-resume.impl.js +3 -3
  215. package/dist/core/storage/session/session-resume.js +3 -3
  216. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  217. package/dist/core/storage/session/snapshot-cut.js +3 -3
  218. package/dist/core/storage/session/snapshot-history.code.js +4 -4
  219. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  220. package/dist/core/storage/session/snapshot-history.js +3 -3
  221. package/dist/core/storage/session/sql-session-store.d.ts +13 -4
  222. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  223. package/dist/core/storage/session/sql-session-store.js +3 -3
  224. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  225. package/dist/core/storage/session/tree-outline.js +3 -3
  226. package/dist/core/storage/session/tree-presentation.code.js +1 -1
  227. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  228. package/dist/core/storage/session/tree-presentation.js +3 -3
  229. package/dist/core/storage/session/types.d.ts +20 -2
  230. package/dist/core/storage/sqlite-facade.js +14 -13
  231. package/dist/core/storage/sqlite-facade.js.map +1 -1
  232. package/dist/core/storage/storage-status.impl.js +3 -3
  233. package/dist/core/storage/storage-status.js +3 -3
  234. package/dist/core/storage/team.impl.js +3 -3
  235. package/dist/core/storage/team.js +3 -3
  236. package/dist/core/structured-output/index.impl.js +3 -3
  237. package/dist/core/structured-output/index.js +3 -3
  238. package/dist/core/tasks/heartbeat.d.ts +1 -0
  239. package/dist/core/tasks/task-completion-entry.code.js +1 -1
  240. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  241. package/dist/core/tasks/task-completion-entry.js +3 -3
  242. package/dist/core/tasks/task-file-history.code.js +3 -3
  243. package/dist/core/tasks/task-file-history.impl.js +3 -3
  244. package/dist/core/tasks/task-file-history.js +3 -3
  245. package/dist/core/tasks/task-reference-archive.code.js +3 -3
  246. package/dist/core/tasks/task-reference-archive.js +3 -3
  247. package/dist/core/tasks/task-reference-identity.js +3 -3
  248. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  249. package/dist/core/tasks/task-reference-stream.js +3 -3
  250. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  251. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  252. package/dist/core/tasks/task-view-source.impl.js +3 -3
  253. package/dist/core/tasks/task-view-source.js +3 -3
  254. package/dist/core/tools/ask-user-question/ask-user-question.d.ts +1 -1
  255. package/dist/core/tools/history-session.d.ts +2 -0
  256. package/dist/core/tools/read-url.code.js +3 -3
  257. package/dist/core/tools/read-url.impl.js +3 -3
  258. package/dist/core/tools/read-url.js +3 -3
  259. package/dist/core/worktree-snapshot/blob-store.js +5 -6
  260. package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
  261. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  262. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  263. package/dist/core/worktree-snapshot/errors.js +3 -3
  264. package/dist/core/worktree-snapshot/git.d.ts +2 -0
  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 +6 -5
  268. package/dist/extensions/codemode/execute.code.js.map +1 -1
  269. package/dist/extensions/codemode/execute.impl.js +3 -3
  270. package/dist/extensions/codemode/execute.js +3 -3
  271. package/dist/extensions/codemode/renderer.code.js +1 -1
  272. package/dist/extensions/codemode/renderer.impl.js +3 -3
  273. package/dist/extensions/codemode/renderer.js +3 -3
  274. package/dist/extensions/mcp/cli.code.js +8 -4
  275. package/dist/extensions/mcp/cli.code.js.map +1 -1
  276. package/dist/extensions/mcp/cli.impl.js +3 -3
  277. package/dist/extensions/mcp/cli.js +3 -3
  278. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  279. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  280. package/dist/extensions/mcp/cli.lazy.js +3 -3
  281. package/dist/extensions/mcp/runtime.impl.js +3 -3
  282. package/dist/extensions/mcp/runtime.js +3 -3
  283. package/dist/index.js +6 -6
  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 +3 -3
  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/startup-shell-eligibility.js +1 -1
  294. package/dist/package-manager-cli.code.js +7 -7
  295. package/dist/package-manager-cli.impl.js +3 -3
  296. package/dist/package-manager-cli.js +3 -3
  297. package/dist/rpc-entry.js +1 -1
  298. package/dist/startup-files.json +1 -1
  299. package/dist/startup-stages/10.js +1 -1
  300. package/dist/startup-stages/11.js +1 -1
  301. package/dist/startup-stages/12.js +1 -1
  302. package/dist/startup-stages/13.js +1 -0
  303. package/dist/startup-stages/2.js +2 -6
  304. package/dist/startup-stages/3.js +6 -1
  305. package/dist/startup-stages/4.js +1 -1
  306. package/dist/startup-stages/5.js +12 -1
  307. package/dist/startup-stages/6.js +8 -4
  308. package/dist/startup-stages/7.js +4 -3
  309. package/dist/startup-stages/8.js +1 -5
  310. package/dist/startup-stages/9.js +5 -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/dist/utils/windows-cwd.js +3 -3
  319. package/dist/utils/windows-cwd.js.map +1 -1
  320. package/docs/changelog.mdx +2 -10
  321. package/docs/codemode.md +5 -2
  322. package/docs/compaction/branch-summaries.md +1 -1
  323. package/docs/compaction/custom-compactors.md +1 -1
  324. package/docs/custom-provider/api-reference.md +1 -1
  325. package/docs/custom-provider/registration.md +3 -0
  326. package/docs/custom-provider/streaming.md +1 -1
  327. package/docs/environment-variables.md +2 -2
  328. package/docs/guides/resume-on-any-machine.md +1 -0
  329. package/docs/libraries/ai.md +4 -2
  330. package/docs/libraries/codemode.md +1 -1
  331. package/docs/models/choose-a-model.md +1 -1
  332. package/docs/models-configuration.md +5 -2
  333. package/docs/models.md +32 -0
  334. package/docs/providers.md +33 -1
  335. package/docs/sdk/structured-decisions.md +4 -2
  336. package/docs/sessions.md +1 -1
  337. package/docs/settings.md +78 -16
  338. package/docs/storage/postgres/tuning.md +1 -0
  339. package/docs/subagents/reference.md +2 -1
  340. package/docs/tools.md +4 -3
  341. package/docs/worktree-snapshots/reference.md +2 -0
  342. package/docs/worktree-snapshots.md +4 -0
  343. package/package.json +9 -9
  344. package/schemas/models.schema.json +21 -0
  345. package/schemas/settings.schema.json +14 -1
  346. package/dist/_shared/p1b-elig-TVB5CBLL.js.map +0 -1
  347. package/dist/_shared/startup-0-0-Q3MWKUK4.js.map +0 -1
  348. package/dist/_shared/startup-0-1-M6OWAYHH.js.map +0 -1
  349. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +0 -1
  350. package/dist/_shared/startup-0-3-4ZYBYQNM.js.map +0 -1
  351. package/dist/_shared/startup-0-5-YDW47QX6.js.map +0 -1
@@ -5,7 +5,7 @@ import { type StorageDialect } from "../dialect.js";
5
5
  import { type ForkDetachOptions, type ForkDetachReport } from "./fork-detach.js";
6
6
  import { SqlSessionSearchIndex } from "./session-search-index.js";
7
7
  import { type SqlSessionChatRecords } from "./sql-chat-records.js";
8
- import type { ChildDisplayLaunch, ForkArchiveSource, OversizedSessionEntry, SessionBlob, SessionBranchPageCut, SessionCompactionPoint, SessionCwdMatcher, SessionEntriesPage, SessionEntriesQuery, SessionEntryRange, SessionEntrySizes, SessionForkSeed, SessionForkStream, SessionListQuery, SessionOpenMarker, SessionOpenMarkerAge, SessionOpenMarkerStore, SessionRecordHeader, SessionResume, SessionScanOptions, SessionScanPage, SessionSnapshot, SessionSnapshotCut, SessionStore, SessionStoredEntry, SessionSummary, SessionTail, SessionTaskReferenceDuplicatePage, SessionTaskReferenceDuplicateQuery, SessionTreeOutlineEntry, SessionWriteOptions, SessionWriteResult, StorageDescriptor } from "./types.js";
8
+ import type { ChildDisplayLaunch, ForkArchiveSource, OversizedSessionEntry, SessionBlob, SessionBranchPageCut, SessionBranchSnapshotMetadata, SessionCompactionPoint, SessionCwdMatcher, SessionEntriesPage, SessionEntriesQuery, SessionEntryRange, SessionEntrySizes, SessionForkSeed, SessionForkStream, SessionListQuery, SessionOpenMarker, SessionOpenMarkerAge, SessionOpenMarkerStore, SessionRecordHeader, SessionResume, SessionScanOptions, SessionScanPage, SessionSnapshot, SessionSnapshotCut, SessionStore, SessionStoredEntry, SessionSummary, SessionTail, SessionTaskReferenceDuplicatePage, SessionTaskReferenceDuplicateQuery, SessionTreeOutlineEntry, SessionWriteOptions, SessionWriteResult, StorageDescriptor } from "./types.js";
9
9
  /**
10
10
  * The newest sessions schema this build reads and writes. Version 2 stores long entries in chunks (#4954), which a build
11
11
  * that knows only version 1 would read as stubs. A database stays at version 1, which older builds still open, until
@@ -129,6 +129,7 @@ export declare class SqlSessionStore implements SessionStore {
129
129
  get chatRecords(): SqlSessionChatRecords | undefined;
130
130
  private readonly entryByteLength;
131
131
  private chunkRowids?;
132
+ private captureHeadings;
132
133
  /** Session ids of each recently listed scope, valid while the store's change token is unchanged. */
133
134
  private readonly scopes;
134
135
  /** Listed summaries of sessions that still exist at the cached version; never more than the store holds. */
@@ -139,6 +140,8 @@ export declare class SqlSessionStore implements SessionStore {
139
140
  */
140
141
  private listing;
141
142
  private readonly resumeIndexes;
143
+ /** A just-opened session's exact prefix may be forked even if the source appended before the fork took its locks. */
144
+ private lastForkCut?;
142
145
  private readonly forkStagingTable;
143
146
  /** The generation each recently read session's row held at a revision: see `generation`. */
144
147
  private readonly generations;
@@ -158,6 +161,7 @@ export declare class SqlSessionStore implements SessionStore {
158
161
  readonly prefix?: string;
159
162
  readonly cwdMatcher?: SessionCwdMatcher;
160
163
  }): Promise<SqlSessionStore>;
164
+ static buildCaptureHeadingIndex(database: SqliteDatabase, prefix?: string): Promise<boolean>;
161
165
  private static openWithCatalog;
162
166
  /**
163
167
  * Removes, in a bounded number of short transactions, the staged rows of clones that stopped mid-copy and whose lease
@@ -476,9 +480,8 @@ export declare class SqlSessionStore implements SessionStore {
476
480
  */
477
481
  private sharedForkDonor;
478
482
  /**
479
- * A fork with shared history of the donor's whole view as it stands (#6560): its segments, its lineage and its
480
- * session row, whose summary is the donor's in a generation of its own, and no row of any entry. Undefined, for
481
- * the fork to read the donor's rows, when the donor's resume index does not cover its watermark.
483
+ * A fork with shared history of an exact complete-session cut (#6560): its segments, its lineage and its session
484
+ * row, whose summary is the donor's at the chosen cut in a generation of its own, and no row of any entry.
482
485
  */
483
486
  private writeSharedPrefixFork;
484
487
  /**
@@ -708,6 +711,9 @@ export declare class SqlSessionStore implements SessionStore {
708
711
  readonly limit?: number;
709
712
  readonly backward?: boolean;
710
713
  }): Promise<{
714
+ items: never[];
715
+ } | {
716
+ lastSeq: number;
711
717
  items: {
712
718
  readonly seq: number;
713
719
  readonly bytes: number;
@@ -716,8 +722,11 @@ export declare class SqlSessionStore implements SessionStore {
716
722
  readonly epoch: string;
717
723
  }[];
718
724
  } | {
725
+ lastSeq: number;
719
726
  items: SessionStoredEntry[];
720
727
  }>;
728
+ /** Compare finished subagents' captures without opening or reading their conversations. */
729
+ readBranchSnapshotMetadata(sessionIds: readonly string[]): Promise<Map<string, SessionBranchSnapshotMetadata | null>>;
721
730
  /**
722
731
  * The snapshot entries of the session's resume index, read with the index and nothing else: no entry is read, and an
723
732
  * index that does not cover the session as it stands is not rebuilt here (#5554).
@@ -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.15`;
9
+ const key = `${root.href}#0.10.16-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.15") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.15 while this session was running; restart it to keep using session storage.", {
30
+ if (running === undefined || running.version === "0.10.16-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using session storage.", {
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.15`;
9
+ const key = `${root.href}#0.10.16-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.15") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.15 while this session was running; restart it to keep using session storage.", {
30
+ if (running === undefined || running.version === "0.10.16-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using session storage.", {
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.15`;
9
+ const key = `${root.href}#0.10.16-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.15") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.15 while this session was running; restart it to keep using /tree.", {
30
+ if (running === undefined || running.version === "0.10.16-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
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.15`;
9
+ const key = `${root.href}#0.10.16-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.15") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.15 while this session was running; restart it to keep using /tree.", {
30
+ if (running === undefined || running.version === "0.10.16-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -1,5 +1,5 @@
1
1
  import "../../../_shared/rolldown-runtime-BGM3D5V3.js";
2
- import { read, readValue, skip, stringValue } from "../../../_shared/startup-0-5-YDW47QX6.js";
2
+ import { read, readValue, skip, stringValue } from "../../../_shared/startup-0-5-HZX3ZPTP.js";
3
3
  // dist/core/storage/session/tree-presentation.js
4
4
  var FoldMatches = class FoldMatches {
5
5
  tail = "";
@@ -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.15`;
9
+ const key = `${root.href}#0.10.16-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.15") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.15 while this session was running; restart it to keep using /tree.", {
30
+ if (running === undefined || running.version === "0.10.16-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
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.15`;
9
+ const key = `${root.href}#0.10.16-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.15") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.15 while this session was running; restart it to keep using /tree.", {
30
+ if (running === undefined || running.version === "0.10.16-alpha.1") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -1,5 +1,5 @@
1
1
  import type { Usage } from "@bastani/atomic-ai/compat";
2
- import type { CompactionEntry, LabelEntry, SessionEntry, SessionWorkflowMetadata } from "../../session-manager-types.ts";
2
+ import type { CompactionEntry, LabelEntry, SessionEntry, SessionWorkflowMetadata, WorktreeSnapshotEntry } from "../../session-manager-types.ts";
3
3
  import type { SnapshotBlobStore } from "../../worktree-snapshot/types.ts";
4
4
  export declare const SESSION_FORMAT_VERSION = 4;
5
5
  /** Yield between archive pages, including in browser-backed custom stores. */
@@ -80,6 +80,10 @@ export interface SessionHistoryPage {
80
80
  readonly current?: string;
81
81
  };
82
82
  }
83
+ /** A sparse page may also certify the current history watermark from the same read. */
84
+ export interface SessionSelectedPage extends SessionHistoryPage {
85
+ readonly lastSeq?: number;
86
+ }
83
87
  export interface SessionHistoryReadOptions {
84
88
  /** Order in which pages are visited. The entries within each page always remain chronological. */
85
89
  readonly direction?: "forward" | "backward";
@@ -285,6 +289,14 @@ export interface SessionChildReadCut {
285
289
  readonly seqs: readonly number[];
286
290
  readonly aliases: Readonly<Record<string, SessionChildAliases>>;
287
291
  }
292
+ export interface SessionBranchSnapshotMetadata {
293
+ readonly epoch: string;
294
+ readonly lastSeq: number;
295
+ readonly records: SessionSnapshotCut["records"];
296
+ readonly entries: readonly (Pick<WorktreeSnapshotEntry, "root" | "snapshotId" | "timestamp" | "restore"> & {
297
+ readonly capture: boolean;
298
+ })[];
299
+ }
288
300
  /** Where a session's `worktree_snapshot` entries are, as the store's index of its history locates them (#5554). */
289
301
  export interface SessionSnapshotCut {
290
302
  readonly epoch: string;
@@ -626,6 +638,12 @@ export interface SessionStore {
626
638
  deferChildRecords: true;
627
639
  }): Promise<SessionResume>;
628
640
  readChildCatalogCut?(sessionId: string): Promise<SessionChildReadCut>;
641
+ /**
642
+ * Active-branch restore mappings and capture candidates from one history cut per session, in branch order.
643
+ * A store can retain only the newest capture per recorded root (ties go to the later entry). A null value means
644
+ * the session does not exist; an omitted id requires the ordinary history reader.
645
+ */
646
+ readBranchSnapshotMetadata?(sessionIds: readonly string[]): Promise<ReadonlyMap<string, SessionBranchSnapshotMetadata | null>>;
629
647
  /**
630
648
  * Where the session's snapshot entries are, from the index the store keeps of its history, without reading an entry:
631
649
  * with `leafSeq`, only those on the branch from that sequence to the root. Undefined when that index does not cover
@@ -645,7 +663,7 @@ export interface SessionStore {
645
663
  readSelectedPage?(sessionId: string, seqs: readonly number[], epoch: string, options?: {
646
664
  readonly limit?: number;
647
665
  readonly backward?: boolean;
648
- }): Promise<SessionHistoryPage>;
666
+ }): Promise<SessionSelectedPage>;
649
667
  /** A local navigation from a stale manager may select a branch as of its original sequence watermark. */
650
668
  /** Read the branch a forked child needs at its captured entry, with the current labels for copied targets. */
651
669
  readForkWindow?(sessionId: string, entryId: string, options?: {
@@ -1,3 +1,4 @@
1
+ import { setLongTimeoutAt } from "../../__atomic_timers/index.js";
1
2
  import { sqliteDialect } from "./dialect.js";
2
3
  import { largestValueBytes, payloadTooLargeKind, StorageConfigError, StorageError, StorageInvalidTextError, StoragePayloadTooLargeError, StorageRollbackError, StorageTransactionClosedError, StorageTransientError, StorageUnavailableError, StoreClosedError, } from "./errors.js";
3
4
  import { MAX_SEQUENCE_REQUEST_STATEMENTS, offerFinish, offerSequences, } from "./statement-sequence.js";
@@ -507,7 +508,7 @@ class LaneQueue {
507
508
  normal = [];
508
509
  priority = [];
509
510
  running = false;
510
- /** When the running operation started, as `Date.now()`. */
511
+ /** When the running operation started, as `performance.now()`. */
511
512
  runningSince = 0;
512
513
  idle = [];
513
514
  watchdog;
@@ -544,10 +545,10 @@ class LaneQueue {
544
545
  return;
545
546
  }
546
547
  this.running = true;
547
- this.runningSince = Date.now();
548
+ this.runningSince = performance.now();
548
549
  // Started on a later microtask, as a promise chain starts it, never inside the call that queued it.
549
550
  void operation.run().finally(() => {
550
- clearTimeout(this.watchdog);
551
+ this.watchdog?.clear();
551
552
  this.watchdog = undefined;
552
553
  this.watchdogBound = undefined;
553
554
  this.running = false;
@@ -569,22 +570,22 @@ class LaneQueue {
569
570
  // A priority call queued behind ordinary ones brings the planned check forward to its own, shorter bound.
570
571
  if (bound === this.watchdogBound)
571
572
  return;
572
- clearTimeout(this.watchdog);
573
+ this.watchdog?.clear();
573
574
  this.watchdog = undefined;
574
575
  this.watchdogBound = bound;
575
576
  if (bound === undefined)
576
577
  return;
577
- this.watchdog = setTimeout(() => {
578
+ this.watchdog = setLongTimeoutAt(() => {
578
579
  this.watchdog = undefined;
579
580
  this.watchdogBound = undefined;
580
- const ran = Date.now() - this.runningSince;
581
+ const ran = performance.now() - this.runningSince;
581
582
  const failing = this.priority.splice(0);
582
583
  if (ran >= STORAGE_QUEUED_CALL_MAX_WAIT_MS)
583
584
  failing.push(...this.normal.splice(0));
584
585
  for (const waiting of failing)
585
586
  waiting.fail(this.stalled(ran));
586
587
  this.watch();
587
- }, Math.max(0, this.runningSince + bound - Date.now()));
588
+ }, this.runningSince + bound);
588
589
  // A stuck operation ahead of the queue never keeps the process alive on its own.
589
590
  this.watchdog.unref();
590
591
  }
@@ -620,7 +621,7 @@ class ScopeQueue {
620
621
  clock = 0;
621
622
  idle = [];
622
623
  watchdog;
623
- /** When the planned check runs, as `Date.now()`, or undefined when none is planned. */
624
+ /** When the planned check runs, as `performance.now()`, or undefined when none is planned. */
624
625
  watchdogAt;
625
626
  stalled;
626
627
  constructor(stalled, maxReads = Number.POSITIVE_INFINITY) {
@@ -678,7 +679,7 @@ class ScopeQueue {
678
679
  if (call.started !== undefined || this.calls.some((other) => this.waitsFor(call, other)))
679
680
  continue;
680
681
  call.started = this.clock++;
681
- call.runningSince = Date.now();
682
+ call.runningSince = performance.now();
682
683
  // Started on a later microtask, as a promise chain starts it, never inside the call that queued it.
683
684
  void call.run().finally(() => {
684
685
  this.calls.splice(this.calls.indexOf(call), 1);
@@ -720,15 +721,15 @@ class ScopeQueue {
720
721
  at = Math.min(at ?? Number.POSITIVE_INFINITY, since + ScopeQueue.bound(call));
721
722
  if (at === this.watchdogAt)
722
723
  return;
723
- clearTimeout(this.watchdog);
724
+ this.watchdog?.clear();
724
725
  this.watchdog = undefined;
725
726
  this.watchdogAt = at;
726
727
  if (at === undefined)
727
728
  return;
728
- this.watchdog = setTimeout(() => {
729
+ this.watchdog = setLongTimeoutAt(() => {
729
730
  this.watchdog = undefined;
730
731
  this.watchdogAt = undefined;
731
- const now = Date.now();
732
+ const now = performance.now();
732
733
  const failing = [];
733
734
  for (const [call, since] of this.stuck())
734
735
  if (now - since >= ScopeQueue.bound(call))
@@ -739,7 +740,7 @@ class ScopeQueue {
739
740
  call.fail(this.stalled(ran));
740
741
  this.next();
741
742
  this.watch();
742
- }, Math.max(0, at - Date.now()));
743
+ }, at);
743
744
  // A stuck call ahead of the queue never keeps the process alive on its own.
744
745
  this.watchdog.unref();
745
746
  }