@bastani/atomic 0.10.10 → 0.10.11-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 (402) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +1 -1
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +11 -13
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +9 -9
  9. package/dist/_shared/mode-shared-2QJSCUM6.js +55 -18
  10. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  11. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  12. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  13. package/dist/_shared/{sdk-RRLVN7ER.js → sdk-IQMULKFU.js} +2962 -470
  14. package/dist/_shared/sdk-IQMULKFU.js.map +1 -0
  15. package/dist/_shared/session-data-AHTU7IS6.js +4 -4
  16. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  17. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +1 -1
  18. package/dist/_shared/{settings-startup-4QCVCI53.js → settings-startup-HXQLSUWM.js} +8 -2
  19. package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -0
  20. package/dist/_shared/{startup-0-0-4VG2G44V.js → startup-0-0-3IXNMFM2.js} +482 -53
  21. package/dist/_shared/startup-0-0-3IXNMFM2.js.map +1 -0
  22. package/dist/_shared/{startup-0-1-XTIL65D4.js → startup-0-1-7T2IAE7J.js} +121 -251
  23. package/dist/_shared/startup-0-1-7T2IAE7J.js.map +1 -0
  24. package/dist/_shared/{startup-0-2-27OWFHV6.js → startup-0-2-5QHPCEON.js} +293 -10
  25. package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -0
  26. package/dist/_shared/{startup-0-3-T4DVFYWX.js → startup-0-3-4ZYBYQNM.js} +273 -14
  27. package/dist/_shared/startup-0-3-4ZYBYQNM.js.map +1 -0
  28. package/dist/_shared/startup-0-4-ZMJV547D.js +6 -6
  29. package/dist/_shared/{startup-0-5-FD2P735I.js → startup-0-5-YDW47QX6.js} +29 -71
  30. package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -0
  31. package/dist/_shared/startup-10-0-TDQNBDDL.js +9 -9
  32. package/dist/_shared/startup-12-0-55AAXBJZ.js +4 -4
  33. package/dist/_shared/startup-14-0-MLX36RBG.js +6 -6
  34. package/dist/_shared/startup-15-0-YUKGAC63.js +34 -10
  35. package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
  36. package/dist/_shared/startup-15-1-4S7FLMNG.js +10 -9
  37. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  38. package/dist/_shared/startup-8-0-34CBHPZH.js +421 -84
  39. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  40. package/dist/_shared/{startup-8-1-4KANEHRA.js → startup-8-1-X32CYSXB.js} +1291 -722
  41. package/dist/_shared/startup-8-1-X32CYSXB.js.map +1 -0
  42. package/dist/_shared/storage-command-7MGXLJGZ.js +17 -9
  43. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  44. package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
  45. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  46. package/dist/_shared/tree-outline-MUEPK5B7.js +3 -3
  47. package/dist/builtin/intercom/CHANGELOG.md +29 -0
  48. package/dist/builtin/intercom/broker/broker.bundle.mjs +1138 -384
  49. package/dist/builtin/intercom/broker/database-wake-up-bus.ts +103 -24
  50. package/dist/builtin/intercom/broker/multinode-router.ts +42 -21
  51. package/dist/builtin/intercom/broker/multinode-state-store.ts +22 -1
  52. package/dist/builtin/intercom/broker/open-broker-state.ts +82 -31
  53. package/dist/builtin/intercom/broker/paths.ts +8 -4
  54. package/dist/builtin/intercom/broker/released-asker-remote-replies.ts +18 -6
  55. package/dist/builtin/intercom/broker/sql-add-column.ts +4 -1
  56. package/dist/builtin/intercom/broker/sql-ended-child-queue-store.ts +65 -44
  57. package/dist/builtin/intercom/broker/sql-held-send-store.ts +11 -3
  58. package/dist/builtin/intercom/broker/sql-known-session-store.ts +24 -12
  59. package/dist/builtin/intercom/broker/sql-lease-store.ts +386 -65
  60. package/dist/builtin/intercom/broker/sql-outbox-store.ts +462 -130
  61. package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +20 -9
  62. package/dist/builtin/intercom/broker/sql-released-ask-store.ts +14 -6
  63. package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +27 -11
  64. package/dist/builtin/intercom/broker/sql-schema.ts +198 -5
  65. package/dist/builtin/intercom/broker/sql-sent-message-authority.ts +97 -34
  66. package/dist/builtin/intercom/index.bundle.mjs +11 -8
  67. package/dist/builtin/intercom/package.json +1 -1
  68. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  69. package/dist/builtin/mcp/package.json +1 -1
  70. package/dist/builtin/subagents/CHANGELOG.md +18 -0
  71. package/dist/builtin/subagents/package.json +1 -1
  72. package/dist/builtin/subagents/skills/skill-creator/SKILL.md +1 -1
  73. package/dist/builtin/subagents/src/extension/index.bundle.mjs +62 -23
  74. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  75. package/dist/builtin/web-access/package.json +1 -1
  76. package/dist/cli/args.js +2 -2
  77. package/dist/cli/auth-cli.code.js +6 -6
  78. package/dist/cli/auth-cli.impl.js +3 -3
  79. package/dist/cli/auth-cli.js +3 -3
  80. package/dist/cli/blueprint-command.code.js +4 -4
  81. package/dist/cli/blueprint-command.impl.js +3 -3
  82. package/dist/cli/blueprint-command.js +3 -3
  83. package/dist/cli/intercom-command.code.js +3 -3
  84. package/dist/cli/intercom-command.impl.js +3 -3
  85. package/dist/cli/intercom-command.js +3 -3
  86. package/dist/cli/list-models.code.js +2 -2
  87. package/dist/cli/list-models.impl.js +3 -3
  88. package/dist/cli/list-models.js +3 -3
  89. package/dist/cli/session-picker.code.js +2 -2
  90. package/dist/cli/session-picker.impl.js +3 -3
  91. package/dist/cli/session-picker.js +3 -3
  92. package/dist/cli/startup-ui.code.js +2 -2
  93. package/dist/cli/startup-ui.impl.js +3 -3
  94. package/dist/cli/startup-ui.js +3 -3
  95. package/dist/cli/storage-command.impl.js +3 -3
  96. package/dist/cli/storage-command.js +3 -3
  97. package/dist/cli/storage-search-session.code.js +3 -3
  98. package/dist/cli/storage-search-session.impl.js +3 -3
  99. package/dist/cli/storage-search-session.js +3 -3
  100. package/dist/cli/team-command.code.js +3 -3
  101. package/dist/cli/team-command.impl.js +3 -3
  102. package/dist/cli/team-command.js +3 -3
  103. package/dist/cli.js +2 -2
  104. package/dist/core/agent-session-methods.d.ts +3 -0
  105. package/dist/core/agent-session-methods.js.map +1 -1
  106. package/dist/core/agent-session.d.ts +1 -0
  107. package/dist/core/compaction/compactor.d.ts +2 -0
  108. package/dist/core/debug.impl.js +3 -3
  109. package/dist/core/debug.js +3 -3
  110. package/dist/core/export-html/card-projection.code.js +1 -1
  111. package/dist/core/export-html/card-projection.impl.js +3 -3
  112. package/dist/core/export-html/card-projection.js +3 -3
  113. package/dist/core/export-html/index.code.js +2 -2
  114. package/dist/core/export-html/index.impl.js +3 -3
  115. package/dist/core/export-html/index.js +3 -3
  116. package/dist/core/export-html/json-spans.impl.js +3 -3
  117. package/dist/core/export-html/json-spans.js +3 -3
  118. package/dist/core/export-html/oversized-render-inputs.code.js +2 -2
  119. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  120. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  121. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  122. package/dist/core/export-html/tool-renderer.js +3 -3
  123. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  124. package/dist/core/extensions/jiti-loader.js +3 -3
  125. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  126. package/dist/core/extensions/jiti-static-loader.js +3 -3
  127. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  128. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  129. package/dist/core/extensions/loader-host-modules.js +3 -3
  130. package/dist/core/extensions/loader-virtual-modules.js +2 -2
  131. package/dist/core/extensions/runner-context.js +4 -4
  132. package/dist/core/extensions/runner-context.js.map +1 -1
  133. package/dist/core/intercom-broker-control-host.code.js +1 -1
  134. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  135. package/dist/core/intercom-broker-control-host.js +3 -3
  136. package/dist/core/intercom-broker-control.code.js +3 -3
  137. package/dist/core/intercom-broker-control.impl.js +3 -3
  138. package/dist/core/intercom-broker-control.js +3 -3
  139. package/dist/core/model-registry.js +1 -1
  140. package/dist/core/model-resolver-defaults.d.ts +3 -2
  141. package/dist/core/package-manager-storage-adapters.code.js +1 -1
  142. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  143. package/dist/core/package-manager-storage-adapters.js +3 -3
  144. package/dist/core/sdk.code.js +4 -5
  145. package/dist/core/sdk.impl.js +3 -3
  146. package/dist/core/sdk.js +3 -3
  147. package/dist/core/session-manager-core.d.ts +5 -2
  148. package/dist/core/session-manager-core.js +39 -23
  149. package/dist/core/session-manager-core.js.map +1 -1
  150. package/dist/core/session-manager-list.impl.js +3 -3
  151. package/dist/core/session-manager-list.js +3 -3
  152. package/dist/core/session-manager.code.js +3 -3
  153. package/dist/core/session-manager.impl.js +3 -3
  154. package/dist/core/session-manager.js +3 -3
  155. package/dist/core/session-open-markers.js +3 -0
  156. package/dist/core/session-open-markers.js.map +1 -0
  157. package/dist/core/session-storage.code.js +1 -1
  158. package/dist/core/session-storage.impl.js +3 -3
  159. package/dist/core/session-storage.js +3 -3
  160. package/dist/core/storage/added-exports.d.ts +6 -0
  161. package/dist/core/storage/added-exports.js +19 -0
  162. package/dist/core/storage/added-exports.js.map +1 -0
  163. package/dist/core/storage/database.d.ts +53 -0
  164. package/dist/core/storage/database.js.map +1 -1
  165. package/dist/core/storage/fenced-paths.d.ts +47 -0
  166. package/dist/core/storage/fenced-paths.js +53 -0
  167. package/dist/core/storage/fenced-paths.js.map +1 -1
  168. package/dist/core/storage/file-identity.js +31 -2
  169. package/dist/core/storage/file-identity.js.map +1 -1
  170. package/dist/core/storage/index.d.ts +4 -1
  171. package/dist/core/storage/index.js +5 -2
  172. package/dist/core/storage/index.js.map +1 -1
  173. package/dist/core/storage/migrations.d.ts +33 -2
  174. package/dist/core/storage/migrations.js +73 -5
  175. package/dist/core/storage/migrations.js.map +1 -1
  176. package/dist/core/storage/node-sqlite-thread.js +48 -6
  177. package/dist/core/storage/node-sqlite-thread.js.map +1 -1
  178. package/dist/core/storage/node-sqlite.js +137 -4
  179. package/dist/core/storage/node-sqlite.js.map +1 -1
  180. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  181. package/dist/core/storage/offline-snapshot-file.js +3 -3
  182. package/dist/core/storage/prefix.d.ts +3 -2
  183. package/dist/core/storage/prefix.js +23 -2
  184. package/dist/core/storage/prefix.js.map +1 -1
  185. package/dist/core/storage/provider.js +2 -2
  186. package/dist/core/storage/schema-catalog.d.ts +120 -0
  187. package/dist/core/storage/schema-catalog.js +351 -0
  188. package/dist/core/storage/schema-catalog.js.map +1 -0
  189. package/dist/core/storage/selection.js +2 -2
  190. package/dist/core/storage/session/branch-fork-source.code.js +47 -25
  191. package/dist/core/storage/session/branch-fork-source.code.js.map +1 -1
  192. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  193. package/dist/core/storage/session/branch-fork-source.js +3 -3
  194. package/dist/core/storage/session/card-view.impl.js +3 -3
  195. package/dist/core/storage/session/card-view.js +3 -3
  196. package/dist/core/storage/session/child-reader.code.js +4 -4
  197. package/dist/core/storage/session/child-reader.impl.js +3 -3
  198. package/dist/core/storage/session/child-reader.js +3 -3
  199. package/dist/core/storage/session/chunked-resume-projection.code.js +1 -1
  200. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  201. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  202. package/dist/core/storage/session/errors.js +1 -1
  203. package/dist/core/storage/session/expanded-child-details.code.js +4 -4
  204. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  205. package/dist/core/storage/session/expanded-child-details.js +3 -3
  206. package/dist/core/storage/session/fork-detach.d.ts +118 -0
  207. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  208. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  209. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  210. package/dist/core/storage/session/fork-row-index.js +3 -3
  211. package/dist/core/storage/session/fork-schema.js +53 -0
  212. package/dist/core/storage/session/fork-schema.js.map +1 -0
  213. package/dist/core/storage/session/fork-segments.d.ts +58 -0
  214. package/dist/core/storage/session/fork-staging.code.js +176 -36
  215. package/dist/core/storage/session/fork-staging.code.js.map +1 -1
  216. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  217. package/dist/core/storage/session/fork-staging.js +3 -3
  218. package/dist/core/storage/session/fork-sweep.js +61 -0
  219. package/dist/core/storage/session/fork-sweep.js.map +1 -0
  220. package/dist/core/storage/session/fork-window.code.js +4 -4
  221. package/dist/core/storage/session/fork-window.impl.js +3 -3
  222. package/dist/core/storage/session/fork-window.js +3 -3
  223. package/dist/core/storage/session/history-pages.impl.js +3 -3
  224. package/dist/core/storage/session/history-pages.js +3 -3
  225. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  226. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  227. package/dist/core/storage/session/jsonl-session-store.d.ts +37 -1
  228. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  229. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  230. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  231. package/dist/core/storage/session/memory-session-store.js +3 -3
  232. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  233. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  234. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  235. package/dist/core/storage/session/released-history-files.code.js +3 -3
  236. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  237. package/dist/core/storage/session/released-history-files.js +3 -3
  238. package/dist/core/storage/session/resident-fork-rows.code.js +1 -1
  239. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  240. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  241. package/dist/core/storage/session/session-resume.impl.js +3 -3
  242. package/dist/core/storage/session/session-resume.js +3 -3
  243. package/dist/core/storage/session/session-search-index.d.ts +5 -0
  244. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  245. package/dist/core/storage/session/snapshot-cut.js +3 -3
  246. package/dist/core/storage/session/snapshot-history.code.js +4 -4
  247. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  248. package/dist/core/storage/session/snapshot-history.js +3 -3
  249. package/dist/core/storage/session/sql-chat-records.d.ts +15 -0
  250. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  251. package/dist/core/storage/session/sql-session-store.d.ts +445 -11
  252. package/dist/core/storage/session/sql-session-store.impl.js +4 -4
  253. package/dist/core/storage/session/sql-session-store.js +4 -4
  254. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  255. package/dist/core/storage/session/tree-outline.js +3 -3
  256. package/dist/core/storage/session/tree-presentation.code.js +1 -1
  257. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  258. package/dist/core/storage/session/tree-presentation.js +3 -3
  259. package/dist/core/storage/session/types.d.ts +36 -0
  260. package/dist/core/storage/sqlite-facade.d.ts +54 -6
  261. package/dist/core/storage/sqlite-facade.js +384 -18
  262. package/dist/core/storage/sqlite-facade.js.map +1 -1
  263. package/dist/core/storage/statement-sequence.d.ts +83 -0
  264. package/dist/core/storage/statement-sequence.js +21 -0
  265. package/dist/core/storage/statement-sequence.js.map +1 -1
  266. package/dist/core/storage/storage-status.code.js +1 -1
  267. package/dist/core/storage/storage-status.impl.js +3 -3
  268. package/dist/core/storage/storage-status.js +3 -3
  269. package/dist/core/storage/team.code.js +1 -1
  270. package/dist/core/storage/team.impl.js +3 -3
  271. package/dist/core/storage/team.js +3 -3
  272. package/dist/core/structured-output/index.code.js +1 -1
  273. package/dist/core/structured-output/index.impl.js +3 -3
  274. package/dist/core/structured-output/index.js +3 -3
  275. package/dist/core/tasks/task-completion-entry.code.js +1 -1
  276. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  277. package/dist/core/tasks/task-completion-entry.js +3 -3
  278. package/dist/core/tasks/task-file-history.code.js +4 -4
  279. package/dist/core/tasks/task-file-history.impl.js +3 -3
  280. package/dist/core/tasks/task-file-history.js +3 -3
  281. package/dist/core/tasks/task-reference-archive.code.js +5 -5
  282. package/dist/core/tasks/task-reference-archive.js +3 -3
  283. package/dist/core/tasks/task-reference-identity.js +3 -3
  284. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  285. package/dist/core/tasks/task-reference-stream.js +3 -3
  286. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  287. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  288. package/dist/core/tasks/task-view-source.code.js +1 -1
  289. package/dist/core/tasks/task-view-source.impl.js +3 -3
  290. package/dist/core/tasks/task-view-source.js +3 -3
  291. package/dist/core/tools/bash.d.ts +8 -4
  292. package/dist/core/tools/history-session.d.ts +7 -0
  293. package/dist/core/tools/history-tasks.d.ts +123 -0
  294. package/dist/core/tools/kill.d.ts +5 -2
  295. package/dist/core/tools/powershell.d.ts +2 -2
  296. package/dist/core/tools/read-url.code.js +3 -3
  297. package/dist/core/tools/read-url.impl.js +3 -3
  298. package/dist/core/tools/read-url.js +3 -3
  299. package/dist/core/tools/read.d.ts +12 -2
  300. package/dist/core/tools/resource-selectors.d.ts +2 -0
  301. package/dist/core/tools/search.d.ts +12 -2
  302. package/dist/core/worktree-snapshot/blob-store.d.ts +45 -2
  303. package/dist/core/worktree-snapshot/blob-store.js +228 -60
  304. package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
  305. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  306. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  307. package/dist/core/worktree-snapshot/errors.js +3 -3
  308. package/dist/core/worktree-snapshot/fork-snapshot-index.js +121 -0
  309. package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -0
  310. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  311. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  312. package/dist/extensions/codemode/execute.code.js +3 -3
  313. package/dist/extensions/codemode/execute.impl.js +3 -3
  314. package/dist/extensions/codemode/execute.js +3 -3
  315. package/dist/extensions/codemode/renderer.code.js +2 -2
  316. package/dist/extensions/codemode/renderer.impl.js +3 -3
  317. package/dist/extensions/codemode/renderer.js +3 -3
  318. package/dist/extensions/mcp/cli.code.js +3 -3
  319. package/dist/extensions/mcp/cli.impl.js +3 -3
  320. package/dist/extensions/mcp/cli.js +3 -3
  321. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  322. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  323. package/dist/extensions/mcp/cli.lazy.js +3 -3
  324. package/dist/extensions/mcp/runtime.code.js +1 -1
  325. package/dist/extensions/mcp/runtime.impl.js +3 -3
  326. package/dist/extensions/mcp/runtime.js +3 -3
  327. package/dist/index.js +8 -8
  328. package/dist/main-first-time-setup.code.js +2 -2
  329. package/dist/main-first-time-setup.impl.js +3 -3
  330. package/dist/main-first-time-setup.js +3 -3
  331. package/dist/main.js +1 -1
  332. package/dist/modes/interactive/components/agent-panel.d.ts +1 -0
  333. package/dist/modes/interactive/components/stored-tree-view.code.js +3 -3
  334. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  335. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  336. package/dist/modes/interactive/components/task-inspector.d.ts +2 -0
  337. package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
  338. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  339. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  340. package/dist/modes/interactive/interactive-mode-helpers.d.ts +2 -2
  341. package/dist/modes/print-mode.js +1 -1
  342. package/dist/modes/rpc/agent-panel-bridge.d.ts +5 -0
  343. package/dist/package-manager-cli.code.js +7 -7
  344. package/dist/package-manager-cli.impl.js +3 -3
  345. package/dist/package-manager-cli.js +3 -3
  346. package/dist/rpc-entry.js +1 -1
  347. package/dist/startup-files.json +1 -1
  348. package/dist/startup-stages/0.js +1 -1
  349. package/dist/startup-stages/1.js +1 -1
  350. package/dist/startup-stages/10.js +1 -1
  351. package/dist/startup-stages/12.js +1 -1
  352. package/dist/startup-stages/2.js +9 -1
  353. package/dist/startup-stages/3.js +1 -6
  354. package/dist/startup-stages/5.js +1 -1
  355. package/dist/startup-stages/7.js +1 -1
  356. package/dist/startup-stages/8.js +2 -2
  357. package/dist/utils/startup-database-spare.code.js +3 -3
  358. package/dist/utils/startup-database-spare.impl.js +3 -3
  359. package/dist/utils/startup-database-spare.js +3 -3
  360. package/dist/utils/tools-manager.code.js +1 -1
  361. package/dist/utils/tools-manager.impl.js +3 -3
  362. package/dist/utils/tools-manager.js +3 -3
  363. package/docs/background-tasks.md +123 -23
  364. package/docs/compaction.md +18 -0
  365. package/docs/docs.json +2 -0
  366. package/docs/environment-variables.md +1 -1
  367. package/docs/getting-started/installation.md +9 -2
  368. package/docs/guides/postgres-pgbouncer.md +346 -0
  369. package/docs/guides/postgres-tuning.md +311 -0
  370. package/docs/guides/resume-on-any-machine.md +2 -2
  371. package/docs/guides.md +2 -0
  372. package/docs/index.md +1 -1
  373. package/docs/libraries/agent-core.md +1 -1
  374. package/docs/libraries/ai.md +2 -2
  375. package/docs/libraries/codemode.md +1 -1
  376. package/docs/libraries/storage-libsql.md +6 -1
  377. package/docs/libraries/storage-postgres.md +11 -6
  378. package/docs/libraries/tui.md +1 -1
  379. package/docs/libraries.md +2 -2
  380. package/docs/programmatic.md +1 -1
  381. package/docs/quickstart.md +1 -1
  382. package/docs/sdk/storage.md +1 -1
  383. package/docs/sdk/web-server.md +1 -3
  384. package/docs/sdk.md +1 -7
  385. package/docs/sessions.md +67 -2
  386. package/docs/settings.md +20 -1
  387. package/docs/skills/authoring.md +1 -1
  388. package/docs/skills.md +79 -6
  389. package/docs/storage.md +305 -14
  390. package/docs/subagents/reference.md +2 -2
  391. package/docs/subagents.md +4 -3
  392. package/docs/tools.md +44 -10
  393. package/docs/windows.md +1 -1
  394. package/package.json +9 -9
  395. package/dist/_shared/sdk-RRLVN7ER.js.map +0 -1
  396. package/dist/_shared/settings-startup-4QCVCI53.js.map +0 -1
  397. package/dist/_shared/startup-0-0-4VG2G44V.js.map +0 -1
  398. package/dist/_shared/startup-0-1-XTIL65D4.js.map +0 -1
  399. package/dist/_shared/startup-0-2-27OWFHV6.js.map +0 -1
  400. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +0 -1
  401. package/dist/_shared/startup-0-5-FD2P735I.js.map +0 -1
  402. package/dist/_shared/startup-8-1-4KANEHRA.js.map +0 -1
@@ -2,7 +2,7 @@ import { type BashOperations, type BashSpawnContext, type BashSpawnHook, type Ba
2
2
  import { type SupervisedCommandOwner } from "./bash-pty-native.js";
3
3
  export declare const powershellToolSystemPromptContribution: Readonly<{
4
4
  readonly snippet: "Execute PowerShell commands.";
5
- readonly guidelines: readonly ["You can inspect ATOMIC_* or PI_* environment variables for current model and session details.", "Use { action: \"wait\", id: taskId } to observe an existing shell task with the owner policy. Avoid repeated short polls; await completion notifications when no dependent work is blocked. Never relaunch a yielded command. Waiting does not extend execution timeout or owner lifetime.", "For ordinary commands, omit wait to use the owner's observation policy (normally 10s). Do not routinely request one-second waits: premature yields add tool calls without making the command faster. Use a short budget only for a concrete responsiveness need, or explicit background observation when you have independent work to do. Explicit budgets, including zero for polling, remain available.", "Choose foreground or background shell observation as needed without asking the user each time. Background yields after admission; foreground waits for its optional budget then the same command continues in background. Omitted wait uses owner-configured automatic background yield (default 10s). Observation never changes the execution timeout, which stops the command. Background requires a supported task owner; unbound foreground waits until completion regardless of budget."];
5
+ readonly guidelines: readonly ["You can inspect ATOMIC_* or PI_* environment variables for current model and session details.", "Use { action: \"wait\", id: taskId } to observe an existing shell task with the owner policy. Avoid repeated short polls; await completion notifications when no dependent work is blocked. Never relaunch a yielded command. Waiting never stops a command or changes when it stops.", "For ordinary commands, omit wait to use the owner's observation policy (normally 10s). Do not routinely request one-second waits: premature yields add tool calls without making the command faster. Use a short budget only for a concrete responsiveness need, or explicit background observation when you have independent work to do. Explicit budgets, including zero for polling, remain available.", "Choose foreground or background shell observation as needed without asking the user each time. Background yields after admission; foreground waits for its optional budget then the same command continues in background. Omitted wait uses owner-configured automatic background yield (default 10s). Observation never stops the command. Background requires a supported task owner; unbound foreground waits until completion regardless of budget.", "A command has no time limit: it runs until it exits, kill({ id: taskId }) stops it, or this session ends. Set timeout (in seconds) only when it must stop by a deadline; timeout: 600 stops it after 10 minutes. Up to 64 commands run at once in a session; at that limit a new command is refused until one finishes or is stopped."];
6
6
  }>;
7
7
  export type PowerShellOperations = BashOperations;
8
8
  export type PowerShellToolDetails = BashToolDetails;
@@ -183,7 +183,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
183
183
  } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>), signal: AbortSignal | undefined, onUpdate: import("@bastani/atomic-agent-core").AgentToolUpdateCallback<BashToolDetails | undefined> | undefined, ctx: import("../extensions/context-types.ts").ExtensionToolContext): Promise<import("@bastani/atomic-agent-core").AgentToolResult<BashToolDetails | undefined>>;
184
184
  description: string;
185
185
  promptSnippet: "Execute PowerShell commands.";
186
- promptGuidelines: ("Choose foreground or background shell observation as needed without asking the user each time. Background yields after admission; foreground waits for its optional budget then the same command continues in background. Omitted wait uses owner-configured automatic background yield (default 10s). Observation never changes the execution timeout, which stops the command. Background requires a supported task owner; unbound foreground waits until completion regardless of budget." | "For ordinary commands, omit wait to use the owner's observation policy (normally 10s). Do not routinely request one-second waits: premature yields add tool calls without making the command faster. Use a short budget only for a concrete responsiveness need, or explicit background observation when you have independent work to do. Explicit budgets, including zero for polling, remain available." | "Use { action: \"wait\", id: taskId } to observe an existing shell task with the owner policy. Avoid repeated short polls; await completion notifications when no dependent work is blocked. Never relaunch a yielded command. Waiting does not extend execution timeout or owner lifetime." | "You can inspect ATOMIC_* or PI_* environment variables for current model and session details.")[] | undefined;
186
+ promptGuidelines: ("A command has no time limit: it runs until it exits, kill({ id: taskId }) stops it, or this session ends. Set timeout (in seconds) only when it must stop by a deadline; timeout: 600 stops it after 10 minutes. Up to 64 commands run at once in a session; at that limit a new command is refused until one finishes or is stopped." | "Choose foreground or background shell observation as needed without asking the user each time. Background yields after admission; foreground waits for its optional budget then the same command continues in background. Omitted wait uses owner-configured automatic background yield (default 10s). Observation never stops the command. Background requires a supported task owner; unbound foreground waits until completion regardless of budget." | "For ordinary commands, omit wait to use the owner's observation policy (normally 10s). Do not routinely request one-second waits: premature yields add tool calls without making the command faster. Use a short budget only for a concrete responsiveness need, or explicit background observation when you have independent work to do. Explicit budgets, including zero for polling, remain available." | "Use { action: \"wait\", id: taskId } to observe an existing shell task with the owner policy. Avoid repeated short polls; await completion notifications when no dependent work is blocked. Never relaunch a yielded command. Waiting never stops a command or changes when it stops." | "You can inspect ATOMIC_* or PI_* environment variables for current model and session details.")[] | undefined;
187
187
  };
188
188
  export declare function createPowerShellTool(cwd: string, options?: PowerShellToolOptions): import("@bastani/atomic-agent-core").AgentTool<import("typebox").TUnsafe<({
189
189
  command: string;
@@ -1,14 +1,14 @@
1
1
  import { __toESM } from "../../_shared/rolldown-runtime-BGM3D5V3.js";
2
2
  import { resolve } from "node:path";
3
3
  import { getAgentDir } from "../../_shared/p0-cli-BB45ZQY6.js";
4
- import { sessionScratchDir } from "../../_shared/startup-0-1-XTIL65D4.js";
4
+ import { sessionScratchDir } from "../../_shared/startup-0-1-7T2IAE7J.js";
5
5
  import { lookup } from "node:dns/promises";
6
6
  import { channel, tracingChannel } from "node:diagnostics_channel";
7
7
  import { require_turndown_cjs } from "../../_shared/turndown.cjs-7Z43JOED.js";
8
8
  import { require_undici } from "../../_shared/http-undici-FVPTZA4G.js";
9
9
  import { findAsciiCaseInsensitive, isAsciiWordCode } from "../../_shared/p1b-elig-ENCUPKKJ.js";
10
- import { applyReadLineSelection, decodeReadableUrl, extractDocumentMarkdown, getArtifactManager, isDocumentPath } from "../../_shared/startup-8-1-4KANEHRA.js";
11
- import { isReadableUrlPath, repairCollapsedScheme } from "../../_shared/startup-0-0-4VG2G44V.js";
10
+ import { applyReadLineSelection, decodeReadableUrl, extractDocumentMarkdown, getArtifactManager, isDocumentPath } from "../../_shared/startup-8-1-X32CYSXB.js";
11
+ import { isReadableUrlPath, repairCollapsedScheme } from "../../_shared/startup-0-0-3IXNMFM2.js";
12
12
  import { isIP } from "node:net";
13
13
  // ../../node_modules/lru-cache/dist/esm/node/index.min.js
14
14
  var S = channel("lru-cache:metrics");
@@ -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.10`;
9
+ const key = `${root.href}#0.10.11-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.10") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10 while this session was running; restart it to keep using this feature.", {
30
+ if (running === undefined || running.version === "0.10.11-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-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.10`;
9
+ const key = `${root.href}#0.10.11-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.10") throw error;
31
- throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10 while this session was running; restart it to keep using this feature.", {
30
+ if (running === undefined || running.version === "0.10.11-alpha.2") throw error;
31
+ throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.2 while this session was running; restart it to keep using this feature.", {
32
32
  cause: error,
33
33
  });
34
34
  }
@@ -3,13 +3,21 @@ import type { ModelImageResizeOptions } from "@bastani/atomic-ai/compat";
3
3
  import { type Static, Type } from "@bastani/atomic-ai/utils/typebox/index";
4
4
  import type { ToolDefinition } from "../extensions/types.ts";
5
5
  import { type DirectoryTreeEntry } from "./directory-tree.ts";
6
+ import { type HistoryTaskRegistry } from "./history-tasks.ts";
6
7
  import { type TruncationResult } from "./truncate.ts";
7
- declare const readSchema: Type.TObject<{
8
+ declare const readBaseSchema: Type.TObject<{
8
9
  path: Type.TString;
10
+ wait: Type.TOptional<Type.TUnsafe<import("../tasks/contracts.ts").WaitPolicy>>;
9
11
  }>;
12
+ type ReadCallInput = Static<typeof readBaseSchema> & {
13
+ action?: never;
14
+ id?: never;
15
+ budgetMs?: never;
16
+ };
17
+ declare const readSchema: Type.TUnsafe<ReadCallInput>;
10
18
  export declare const readToolSystemPromptContribution: Readonly<{
11
19
  readonly snippet: "Read a path selector.";
12
- readonly guidelines: readonly ["Use read to inspect file and resource contents; use path selectors for line ranges, raw output, and conflict views."];
20
+ readonly guidelines: readonly ["Use read to inspect file and resource contents; use path selectors for line ranges, raw output, and conflict views.", "A history:// read or search waits for its result like bash does: 10 seconds by default, or as set by wait (wait: { kind: \"background\" } returns at once). If it is still running then, it keeps running in the background with no time limit and returns a task ID, and its result arrives later as a completion notice. To wait for that result, call the same tool with { action: \"wait\", id }; to stop it, call kill({ id }). Never repeat the call to get its result. Up to 4 run at once in a session; at that limit a new one is refused until one finishes or is stopped."];
13
21
  }>;
14
22
  export type ReadToolInput = Static<typeof readSchema>;
15
23
  declare const readOutputSchema: Type.TUnion<[Type.TString, Type.TObject<{
@@ -68,6 +76,8 @@ export interface ReadToolOptions {
68
76
  /** Fallback resize profile when the execution context has no model metadata. */
69
77
  resizeOptions?: ModelImageResizeOptions;
70
78
  operations?: ReadOperations;
79
+ /** The session's background history tasks, resolved per call; without them a history:// read runs inline. */
80
+ historyTasks?: () => HistoryTaskRegistry | undefined;
71
81
  }
72
82
  export interface ReadRenderState {
73
83
  resolving?: string;
@@ -88,6 +88,8 @@ export declare function searchArchiveSelector(selector: ArchiveSelector, pattern
88
88
  /** One router from several: each operation goes to the first router that handles the URL. */
89
89
  export declare function composeInternalRouters(...routers: readonly InternalResourceRouter[]): InternalResourceRouter;
90
90
  export declare function resolveInternalSelector(value: string, cwd: string): Promise<string | undefined>;
91
+ /** The filesystem path an internal URL names, asking the session's routers before the workspace fallback. */
92
+ export declare function resolveInternalPath(value: string, cwd: string, context?: InternalResourceContext): Promise<string | undefined>;
91
93
  export declare function readInternalSelector(value: string, cwd: string, context?: InternalResourceContext): Promise<string>;
92
94
  export declare function readInternalSelected(value: string, selection: InternalReadSelection, context?: InternalResourceContext): Promise<string | undefined>;
93
95
  export declare function writeInternalSelector(value: string, cwd: string, content: string, context?: InternalResourceContext): Promise<void>;
@@ -2,24 +2,34 @@ import type { AgentTool } from "@bastani/atomic-agent-core";
2
2
  import { type Static, Type } from "@bastani/atomic-ai/utils/typebox/index";
3
3
  import type { ToolDefinition } from "../extensions/types.ts";
4
4
  import { type GrepToolOptions } from "./grep.ts";
5
+ import { type HistoryTaskRegistry } from "./history-tasks.ts";
5
6
  import { type SearchToolDetails } from "./search-details.ts";
6
7
  export type { SearchToolDetails } from "./search-details.ts";
7
- declare const searchSchema: Type.TObject<{
8
+ declare const searchBaseSchema: Type.TObject<{
8
9
  pattern: Type.TString;
9
10
  paths: Type.TOptional<Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>>;
10
11
  i: Type.TOptional<Type.TBoolean>;
11
12
  gitignore: Type.TOptional<Type.TBoolean>;
12
13
  case: Type.TOptional<Type.TBoolean>;
13
14
  skip: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
15
+ wait: Type.TOptional<Type.TUnsafe<import("../tasks/contracts.ts").WaitPolicy>>;
14
16
  }>;
17
+ type SearchCallInput = Static<typeof searchBaseSchema> & {
18
+ action?: never;
19
+ id?: never;
20
+ budgetMs?: never;
21
+ };
22
+ declare const searchSchema: Type.TUnsafe<SearchCallInput>;
15
23
  export declare const searchToolSystemPromptContribution: Readonly<{
16
24
  readonly snippet: "Search file contents with regex patterns.";
17
- readonly guidelines: readonly [];
25
+ readonly guidelines: readonly ["A history:// read or search waits for its result like bash does: 10 seconds by default, or as set by wait (wait: { kind: \"background\" } returns at once). If it is still running then, it keeps running in the background with no time limit and returns a task ID, and its result arrives later as a completion notice. To wait for that result, call the same tool with { action: \"wait\", id }; to stop it, call kill({ id }). Never repeat the call to get its result. Up to 4 run at once in a session; at that limit a new one is refused until one finishes or is stopped."];
18
26
  }>;
19
27
  export type SearchToolInput = Static<typeof searchSchema>;
20
28
  export type SearchToolOptions = GrepToolOptions & {
21
29
  contextBefore?: number;
22
30
  contextAfter?: number;
31
+ /** The session's background history tasks, resolved per call; without them a history:// search runs inline. */
32
+ historyTasks?: () => HistoryTaskRegistry | undefined;
23
33
  };
24
34
  export declare function createSearchToolDefinition(cwd: string, options?: SearchToolOptions): ToolDefinition<typeof searchSchema, SearchToolDetails | undefined>;
25
35
  export declare function createSearchTool(cwd: string, options?: SearchToolOptions): AgentTool<typeof searchSchema>;
@@ -234,6 +234,8 @@ export declare class SqlSnapshotBlobStore implements SnapshotBlobStore {
234
234
  private readonly tables;
235
235
  private readonly sources;
236
236
  private readonly dialect;
237
+ /** The sessions' fork segments table (#6560), which exists once shared-history forks are on. */
238
+ private readonly forkSegments;
237
239
  readonly table: string;
238
240
  private constructor();
239
241
  /** Which table this store collects, for telling stores of one database and prefix apart from others. */
@@ -269,7 +271,16 @@ export declare class SqlSnapshotBlobStore implements SnapshotBlobStore {
269
271
  * binds more than one chunk (#4954); the chunks of a blob stored already are not written again. Unknown ages
270
272
  * remain protected until collection stamps them.
271
273
  */
272
- putBlobs(blobs: readonly SnapshotBlob[]): Promise<void>;
274
+ putBlobs(unordered: readonly SnapshotBlob[]): Promise<void>;
275
+ /**
276
+ * How a put or a refresh of this table's blobs runs: a serial transaction of the blob table's own domain (#6560). On
277
+ * PostgreSQL it holds the database-wide lock shared, so it waits for and excludes collection, whose writes hold that
278
+ * lock exclusively, and the blob writers of this table exclude one another, but session writes, which hold the
279
+ * database-wide lock shared with their session's domain, run beside it. Rows it writes again (`created_at`) are locked
280
+ * in hash order, as an append's check of the blobs it records locks them (`missingBlob`), so neither waits on the
281
+ * other in a cycle. Its callback only uses the transaction, so a transient failure runs it again.
282
+ */
283
+ private blobWrite;
273
284
  /**
274
285
  * The blob's bytes, read a chunk per statement when it has chunks, so no response holds more than one chunk. A
275
286
  * chunked blob whose chunks are not all there, as when a collection deleted it during the read, is not returned.
@@ -286,12 +297,25 @@ export declare class SqlSnapshotBlobStore implements SnapshotBlobStore {
286
297
  * them after.
287
298
  */
288
299
  assertStored(transaction: SqliteExecutor, snapshots: readonly WorktreeSnapshot[]): Promise<void>;
300
+ /** The `blobs-collected` {@link WorkspaceSnapshotError} `assertStored` rejects with for `hash`. */
301
+ refuseCollected(hash: string): Promise<never>;
302
+ /** The blobs of `snapshots` that `assertStored` checks, each once, in the order it reports the first missing one. */
303
+ storedHashes(snapshots: readonly WorktreeSnapshot[]): string[];
304
+ /**
305
+ * The query `missingBlob` reads, for the blobs named by `source`, an SQL expression of a JSON array of hashes: the
306
+ * hashes this table holds in full, locked FOR SHARE in hash order. A statement that checks the blobs on the server,
307
+ * such as the session append function, runs it as it is (#6599).
308
+ */
309
+ storedBlobsQuery(source: string): string;
289
310
  /**
290
311
  * A query that returns a row only while this table holds every blob of `snapshots` in full, for a write planned
291
312
  * outside a transaction to check in the request that writes it (#5077); undefined when they name no blob.
292
313
  */
293
314
  storedFence(snapshots: readonly WorktreeSnapshot[]): SqliteStatement | undefined;
294
- /** The first of `snapshots`' blobs this table does not hold in full, read in `transaction`; undefined when none. */
315
+ /**
316
+ * The first of `snapshots`' blobs this table does not hold in full, read in `transaction`; undefined when none. The
317
+ * rows it finds stay locked FOR SHARE until the transaction ends, taken in hash order as a blob write takes them.
318
+ */
295
319
  missingBlob(transaction: SqliteExecutor, snapshots: readonly WorktreeSnapshot[]): Promise<string | undefined>;
296
320
  /**
297
321
  * Installs the index triggers of every referencing table that lacks them, each with a watermark, the highest rowid
@@ -300,6 +324,16 @@ export declare class SqlSnapshotBlobStore implements SnapshotBlobStore {
300
324
  * Resolves with the state of every referencing table.
301
325
  */
302
326
  private installIndex;
327
+ /** The fork links trigger earlier builds of #6560 installed on the session entries, and its table. */
328
+ private legacyForkLinks;
329
+ /**
330
+ * The state of every source, read outside a transaction. On PostgreSQL the objects and the progress rows are read in
331
+ * one read-only transaction whose start carries both, so they cost one round trip, not one each. An open's
332
+ * `catalog` answers which objects exist only when it found every one: only its positive answers are final, and a
333
+ * source table it lacks may have been created since (#6560). `also` asks which of other objects exist in the same
334
+ * read, as `readSourceStates` does.
335
+ */
336
+ private readStates;
303
337
  /**
304
338
  * Indexes the rows that referencing tables held before their triggers were installed, in transactions of
305
339
  * {@link SNAPSHOT_INDEX_BACKFILL_BATCH} rows, so that the index covers every reference. A one-time cost in the number
@@ -365,6 +399,15 @@ export declare class SqlSnapshotBlobStore implements SnapshotBlobStore {
365
399
  * not follow retains every snapshot it records.
366
400
  */
367
401
  private retainedBySessions;
402
+ /**
403
+ * A condition, after `OR`, that another session inherits the session record `record` through a fork segment
404
+ * (#6560); empty when `forks` says the fork segments table is not there, as while shared-history forks are off. A
405
+ * fork that shares its parent's history stores none of the entries it inherits, so its own references never name
406
+ * their snapshots: a record a segment names is kept whatever its session retains, as long as the segment lasts. A
407
+ * delete batch reads whether the table exists in its own transaction, so it sees the segments that hold when it
408
+ * commits.
409
+ */
410
+ private inheritedRecord;
368
411
  /**
369
412
  * The blobs of `batch` that a session records and that the delete must keep, in one statement: those the snapshots
370
413
  * of `batch.sessions` retain, and those a session not among them records, whose snapshots the sweep did not walk.