@bastani/atomic 0.10.11-alpha.1 → 0.10.11-alpha.3

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 (457) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/README.md +5 -8
  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 +9 -9
  7. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +8 -8
  8. package/dist/_shared/mode-shared-2QJSCUM6.js +9 -9
  9. package/dist/_shared/p0-cli-BB45ZQY6.js +46 -67
  10. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  11. package/dist/_shared/p1a-prewarm-XIU57JHF.js +7 -8
  12. package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
  13. package/dist/_shared/{p1b-elig-ENCUPKKJ.js → p1b-elig-TVB5CBLL.js} +14 -2
  14. package/dist/_shared/{p1b-elig-ENCUPKKJ.js.map → p1b-elig-TVB5CBLL.js.map} +1 -1
  15. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  16. package/dist/_shared/{sdk-AVFII7NK.js → sdk-B5LEWGGI.js} +2633 -488
  17. package/dist/_shared/sdk-B5LEWGGI.js.map +1 -0
  18. package/dist/_shared/session-data-AHTU7IS6.js +3 -3
  19. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  20. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +1 -1
  21. package/dist/_shared/{settings-startup-4QCVCI53.js → settings-startup-HXQLSUWM.js} +8 -2
  22. package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -0
  23. package/dist/_shared/{startup-0-0-57KF6LZH.js → startup-0-0-EZUKEP4Q.js} +436 -51
  24. package/dist/_shared/startup-0-0-EZUKEP4Q.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-GIY75K46.js → startup-0-1-RTOHJFDJ.js} +240 -279
  26. package/dist/_shared/startup-0-1-RTOHJFDJ.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-27OWFHV6.js → startup-0-2-5QHPCEON.js} +254 -46
  28. package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -0
  29. package/dist/_shared/{startup-0-3-T4DVFYWX.js → startup-0-3-4ZYBYQNM.js} +273 -14
  30. package/dist/_shared/startup-0-3-4ZYBYQNM.js.map +1 -0
  31. package/dist/_shared/startup-0-4-ZMJV547D.js +14 -9
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -1
  33. package/dist/_shared/startup-0-5-YDW47QX6.js +10 -10
  34. package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +9 -9
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
  37. package/dist/_shared/startup-14-0-MLX36RBG.js +6 -7
  38. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +7 -7
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +22 -30
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +455 -102
  43. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  44. package/dist/_shared/{startup-8-1-X32CYSXB.js → startup-8-1-LZFXSD3Z.js} +162 -1184
  45. package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -0
  46. package/dist/_shared/storage-command-7MGXLJGZ.js +189 -36
  47. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  48. package/dist/_shared/storage-status-K7PX2RXA.js +557 -0
  49. package/dist/_shared/storage-status-K7PX2RXA.js.map +1 -0
  50. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  51. package/dist/_shared/team-DOQKICG2.js +376 -0
  52. package/dist/_shared/team-DOQKICG2.js.map +1 -0
  53. package/dist/_shared/tree-outline-MUEPK5B7.js +3 -3
  54. package/dist/builtin/intercom/CHANGELOG.md +34 -0
  55. package/dist/builtin/intercom/README.md +2 -2
  56. package/dist/builtin/intercom/broker/broker.bundle.mjs +1091 -344
  57. package/dist/builtin/intercom/broker/database-wake-up-bus.ts +243 -64
  58. package/dist/builtin/intercom/broker/multinode-router.ts +154 -22
  59. package/dist/builtin/intercom/broker/multinode-state-store.ts +30 -3
  60. package/dist/builtin/intercom/broker/open-broker-state.ts +14 -0
  61. package/dist/builtin/intercom/broker/sql-add-column.ts +29 -5
  62. package/dist/builtin/intercom/broker/sql-ended-child-queue-store.ts +3 -2
  63. package/dist/builtin/intercom/broker/sql-held-send-store.ts +2 -2
  64. package/dist/builtin/intercom/broker/sql-known-session-store.ts +43 -19
  65. package/dist/builtin/intercom/broker/sql-lease-store.ts +208 -101
  66. package/dist/builtin/intercom/broker/sql-outbox-store.ts +516 -102
  67. package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +8 -5
  68. package/dist/builtin/intercom/broker/sql-released-ask-store.ts +12 -5
  69. package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +24 -7
  70. package/dist/builtin/intercom/broker/sql-retention.ts +141 -0
  71. package/dist/builtin/intercom/broker/sql-schema.ts +199 -27
  72. package/dist/builtin/intercom/broker/sql-sent-message-authority.ts +74 -19
  73. package/dist/builtin/intercom/broker/wake-up-bus.ts +6 -0
  74. package/dist/builtin/intercom/index.bundle.mjs +2 -3
  75. package/dist/builtin/intercom/package.json +1 -1
  76. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  77. package/dist/builtin/mcp/package.json +1 -1
  78. package/dist/builtin/subagents/CHANGELOG.md +6 -0
  79. package/dist/builtin/subagents/package.json +1 -1
  80. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  81. package/dist/builtin/web-access/index.bundle.mjs +2 -10
  82. package/dist/builtin/web-access/package.json +1 -1
  83. package/dist/bun/bundled-sqlite.js +41 -0
  84. package/dist/bun/bundled-sqlite.js.map +1 -0
  85. package/dist/cli/args.js +2 -2
  86. package/dist/cli/auth-cli.code.js +6 -6
  87. package/dist/cli/auth-cli.impl.js +3 -3
  88. package/dist/cli/auth-cli.js +3 -3
  89. package/dist/cli/blueprint-command.code.js +4 -4
  90. package/dist/cli/blueprint-command.impl.js +3 -3
  91. package/dist/cli/blueprint-command.js +3 -3
  92. package/dist/cli/intercom-command.code.js +4 -4
  93. package/dist/cli/intercom-command.code.js.map +1 -1
  94. package/dist/cli/intercom-command.impl.js +3 -3
  95. package/dist/cli/intercom-command.js +3 -3
  96. package/dist/cli/list-models.code.js +2 -2
  97. package/dist/cli/list-models.impl.js +3 -3
  98. package/dist/cli/list-models.js +3 -3
  99. package/dist/cli/session-picker.code.js +2 -2
  100. package/dist/cli/session-picker.impl.js +3 -3
  101. package/dist/cli/session-picker.js +3 -3
  102. package/dist/cli/startup-ui.code.js +2 -2
  103. package/dist/cli/startup-ui.impl.js +3 -3
  104. package/dist/cli/startup-ui.js +3 -3
  105. package/dist/cli/storage-command.impl.js +3 -3
  106. package/dist/cli/storage-command.js +3 -3
  107. package/dist/cli/storage-search-session.code.js +3 -3
  108. package/dist/cli/storage-search-session.impl.js +3 -3
  109. package/dist/cli/storage-search-session.js +3 -3
  110. package/dist/cli/team-command.code.js +20 -114
  111. package/dist/cli/team-command.code.js.map +1 -1
  112. package/dist/cli/team-command.impl.js +3 -3
  113. package/dist/cli/team-command.js +3 -3
  114. package/dist/cli.js +5 -18
  115. package/dist/cli.js.map +1 -1
  116. package/dist/core/agent-rehydrate-errors.d.ts +4 -9
  117. package/dist/core/compaction/compactor.d.ts +3 -3
  118. package/dist/core/debug.code.js +1 -1
  119. package/dist/core/debug.impl.js +3 -3
  120. package/dist/core/debug.js +3 -3
  121. package/dist/core/export-html/card-projection.impl.js +3 -3
  122. package/dist/core/export-html/card-projection.js +3 -3
  123. package/dist/core/export-html/index.code.js +2 -2
  124. package/dist/core/export-html/index.impl.js +3 -3
  125. package/dist/core/export-html/index.js +3 -3
  126. package/dist/core/export-html/json-spans.impl.js +3 -3
  127. package/dist/core/export-html/json-spans.js +3 -3
  128. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  129. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  130. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  131. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  132. package/dist/core/export-html/tool-renderer.js +3 -3
  133. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  134. package/dist/core/extensions/jiti-loader.js +3 -3
  135. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  136. package/dist/core/extensions/jiti-static-loader.js +3 -3
  137. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  138. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  139. package/dist/core/extensions/loader-host-modules.js +3 -3
  140. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  141. package/dist/core/extensions/runner-context.js +3 -3
  142. package/dist/core/intercom-broker-control-host.code.js +2 -2
  143. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  144. package/dist/core/intercom-broker-control-host.js +3 -3
  145. package/dist/core/intercom-broker-control.code.js +3 -3
  146. package/dist/core/intercom-broker-control.impl.js +3 -3
  147. package/dist/core/intercom-broker-control.js +3 -3
  148. package/dist/core/package-manager-storage-adapters.code.js +1 -1
  149. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  150. package/dist/core/package-manager-storage-adapters.js +3 -3
  151. package/dist/core/process-start-token.d.ts +8 -0
  152. package/dist/core/process-tree-containment.d.ts +16 -0
  153. package/dist/core/sdk-types.d.ts +1 -2
  154. package/dist/core/sdk-types.js.map +1 -1
  155. package/dist/core/sdk.code.js +4 -4
  156. package/dist/core/sdk.impl.js +3 -3
  157. package/dist/core/sdk.js +3 -3
  158. package/dist/core/session-manager-core.js +27 -15
  159. package/dist/core/session-manager-core.js.map +1 -1
  160. package/dist/core/session-manager-list.impl.js +3 -3
  161. package/dist/core/session-manager-list.js +3 -3
  162. package/dist/core/session-manager.code.js +3 -3
  163. package/dist/core/session-manager.impl.js +3 -3
  164. package/dist/core/session-manager.js +3 -3
  165. package/dist/core/session-open-markers.js +3 -0
  166. package/dist/core/session-open-markers.js.map +1 -0
  167. package/dist/core/session-storage.code.js +1 -1
  168. package/dist/core/session-storage.impl.js +3 -3
  169. package/dist/core/session-storage.js +3 -3
  170. package/dist/core/settings-schema.d.ts +0 -3
  171. package/dist/core/storage/added-exports-0-10-11.js +19 -0
  172. package/dist/core/storage/added-exports-0-10-11.js.map +1 -0
  173. package/dist/core/storage/added-exports.js +3 -0
  174. package/dist/core/storage/added-exports.js.map +1 -1
  175. package/dist/core/storage/creation-time.js +105 -0
  176. package/dist/core/storage/creation-time.js.map +1 -0
  177. package/dist/core/storage/database.d.ts +56 -5
  178. package/dist/core/storage/database.js.map +1 -1
  179. package/dist/core/storage/dialect.d.ts +1 -1
  180. package/dist/core/storage/dialect.js +1 -1
  181. package/dist/core/storage/dialect.js.map +1 -1
  182. package/dist/core/storage/errors.d.ts +13 -13
  183. package/dist/core/storage/errors.js +10 -16
  184. package/dist/core/storage/errors.js.map +1 -1
  185. package/dist/core/storage/fenced-paths.d.ts +11 -0
  186. package/dist/core/storage/fenced-paths.js +11 -0
  187. package/dist/core/storage/fenced-paths.js.map +1 -1
  188. package/dist/core/storage/file-identity.d.ts +2 -0
  189. package/dist/core/storage/file-identity.js +24 -8
  190. package/dist/core/storage/file-identity.js.map +1 -1
  191. package/dist/core/storage/index.d.ts +4 -3
  192. package/dist/core/storage/index.js +5 -3
  193. package/dist/core/storage/index.js.map +1 -1
  194. package/dist/core/storage/libsql-removed.d.ts +71 -0
  195. package/dist/core/storage/libsql-removed.js +123 -0
  196. package/dist/core/storage/libsql-removed.js.map +1 -0
  197. package/dist/core/storage/migrations.d.ts +81 -8
  198. package/dist/core/storage/migrations.js +386 -47
  199. package/dist/core/storage/migrations.js.map +1 -1
  200. package/dist/core/storage/node-sqlite-file-gate.js +0 -15
  201. package/dist/core/storage/node-sqlite-file-gate.js.map +1 -1
  202. package/dist/core/storage/node-sqlite-thread.js +36 -12
  203. package/dist/core/storage/node-sqlite-thread.js.map +1 -1
  204. package/dist/core/storage/node-sqlite.js +135 -3
  205. package/dist/core/storage/node-sqlite.js.map +1 -1
  206. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  207. package/dist/core/storage/offline-snapshot-file.js +3 -3
  208. package/dist/core/storage/prefix.d.ts +1 -1
  209. package/dist/core/storage/prefix.js +14 -2
  210. package/dist/core/storage/prefix.js.map +1 -1
  211. package/dist/core/storage/process-selection.d.ts +5 -5
  212. package/dist/core/storage/provider.js +2 -2
  213. package/dist/core/storage/schema-catalog.d.ts +82 -5
  214. package/dist/core/storage/schema-catalog.js +244 -34
  215. package/dist/core/storage/schema-catalog.js.map +1 -1
  216. package/dist/core/storage/selection.d.ts +7 -82
  217. package/dist/core/storage/selection.js +20 -235
  218. package/dist/core/storage/selection.js.map +1 -1
  219. package/dist/core/storage/session/branch-fork-source.code.js +9 -8
  220. package/dist/core/storage/session/branch-fork-source.code.js.map +1 -1
  221. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  222. package/dist/core/storage/session/branch-fork-source.js +3 -3
  223. package/dist/core/storage/session/card-view.impl.js +3 -3
  224. package/dist/core/storage/session/card-view.js +3 -3
  225. package/dist/core/storage/session/child-reader.code.js +4 -4
  226. package/dist/core/storage/session/child-reader.impl.js +3 -3
  227. package/dist/core/storage/session/child-reader.js +3 -3
  228. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  229. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  230. package/dist/core/storage/session/errors.js +1 -1
  231. package/dist/core/storage/session/expanded-child-details.code.js +3 -3
  232. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  233. package/dist/core/storage/session/expanded-child-details.js +3 -3
  234. package/dist/core/storage/session/fork-detach.d.ts +118 -0
  235. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  236. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  237. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  238. package/dist/core/storage/session/fork-row-index.js +3 -3
  239. package/dist/core/storage/session/fork-schema.js +53 -0
  240. package/dist/core/storage/session/fork-schema.js.map +1 -0
  241. package/dist/core/storage/session/fork-segments.d.ts +58 -0
  242. package/dist/core/storage/session/fork-staging.code.js +5 -8
  243. package/dist/core/storage/session/fork-staging.code.js.map +1 -1
  244. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  245. package/dist/core/storage/session/fork-staging.js +3 -3
  246. package/dist/core/storage/session/fork-sweep.js +61 -0
  247. package/dist/core/storage/session/fork-sweep.js.map +1 -0
  248. package/dist/core/storage/session/fork-window.code.js +4 -4
  249. package/dist/core/storage/session/fork-window.impl.js +3 -3
  250. package/dist/core/storage/session/fork-window.js +3 -3
  251. package/dist/core/storage/session/history-pages.impl.js +3 -3
  252. package/dist/core/storage/session/history-pages.js +3 -3
  253. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  254. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  255. package/dist/core/storage/session/jsonl-session-store.d.ts +42 -2
  256. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  257. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  258. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  259. package/dist/core/storage/session/memory-session-store.js +3 -3
  260. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  261. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  262. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  263. package/dist/core/storage/session/released-history-files.code.js +4 -4
  264. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  265. package/dist/core/storage/session/released-history-files.js +3 -3
  266. package/dist/core/storage/session/resident-fork-rows.code.js +1 -1
  267. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  268. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  269. package/dist/core/storage/session/session-resume.impl.js +3 -3
  270. package/dist/core/storage/session/session-resume.js +3 -3
  271. package/dist/core/storage/session/session-search-index.d.ts +43 -4
  272. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  273. package/dist/core/storage/session/snapshot-cut.js +3 -3
  274. package/dist/core/storage/session/snapshot-history.code.js +4 -4
  275. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  276. package/dist/core/storage/session/snapshot-history.js +3 -3
  277. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  278. package/dist/core/storage/session/sql-session-store.d.ts +394 -20
  279. package/dist/core/storage/session/sql-session-store.impl.js +4 -4
  280. package/dist/core/storage/session/sql-session-store.js +4 -4
  281. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  282. package/dist/core/storage/session/tree-outline.js +3 -3
  283. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  284. package/dist/core/storage/session/tree-presentation.js +3 -3
  285. package/dist/core/storage/session/types.d.ts +22 -0
  286. package/dist/core/storage/sqlite-facade.d.ts +23 -2
  287. package/dist/core/storage/sqlite-facade.js +34 -0
  288. package/dist/core/storage/sqlite-facade.js.map +1 -1
  289. package/dist/core/storage/storage-status.code.js +1 -1
  290. package/dist/core/storage/storage-status.impl.js +3 -3
  291. package/dist/core/storage/storage-status.js +3 -3
  292. package/dist/core/storage/team.code.js +1 -1
  293. package/dist/core/storage/team.d.ts +26 -115
  294. package/dist/core/storage/team.impl.js +3 -3
  295. package/dist/core/storage/team.js +3 -3
  296. package/dist/core/structured-output/index.code.js +1 -1
  297. package/dist/core/structured-output/index.impl.js +3 -3
  298. package/dist/core/structured-output/index.js +3 -3
  299. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  300. package/dist/core/tasks/task-completion-entry.js +3 -3
  301. package/dist/core/tasks/task-file-history.code.js +4 -4
  302. package/dist/core/tasks/task-file-history.impl.js +3 -3
  303. package/dist/core/tasks/task-file-history.js +3 -3
  304. package/dist/core/tasks/task-reference-archive.code.js +5 -5
  305. package/dist/core/tasks/task-reference-archive.js +3 -3
  306. package/dist/core/tasks/task-reference-identity.js +3 -3
  307. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  308. package/dist/core/tasks/task-reference-stream.js +3 -3
  309. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  310. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  311. package/dist/core/tasks/task-view-source.code.js +1 -1
  312. package/dist/core/tasks/task-view-source.impl.js +3 -3
  313. package/dist/core/tasks/task-view-source.js +3 -3
  314. package/dist/core/tools/history-session.d.ts +2 -0
  315. package/dist/core/tools/history-tasks.d.ts +3 -2
  316. package/dist/core/tools/read-url.code.js +4 -4
  317. package/dist/core/tools/read-url.impl.js +3 -3
  318. package/dist/core/tools/read-url.js +3 -3
  319. package/dist/core/worktree-snapshot/blob-store.d.ts +71 -3
  320. package/dist/core/worktree-snapshot/blob-store.js +575 -67
  321. package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
  322. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  323. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  324. package/dist/core/worktree-snapshot/errors.js +3 -3
  325. package/dist/core/worktree-snapshot/fork-blob-guard.js +81 -0
  326. package/dist/core/worktree-snapshot/fork-blob-guard.js.map +1 -0
  327. package/dist/core/worktree-snapshot/fork-snapshot-index.js +162 -0
  328. package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -0
  329. package/dist/core/worktree-snapshot/session-index-reset.code.js +4 -0
  330. package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -1
  331. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  332. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  333. package/dist/extensions/codemode/execute.code.js +2 -2
  334. package/dist/extensions/codemode/execute.impl.js +3 -3
  335. package/dist/extensions/codemode/execute.js +3 -3
  336. package/dist/extensions/codemode/renderer.code.js +2 -2
  337. package/dist/extensions/codemode/renderer.impl.js +3 -3
  338. package/dist/extensions/codemode/renderer.js +3 -3
  339. package/dist/extensions/mcp/cli.code.js +3 -3
  340. package/dist/extensions/mcp/cli.impl.js +3 -3
  341. package/dist/extensions/mcp/cli.js +3 -3
  342. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  343. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  344. package/dist/extensions/mcp/cli.lazy.js +3 -3
  345. package/dist/extensions/mcp/runtime.code.js +1 -1
  346. package/dist/extensions/mcp/runtime.impl.js +3 -3
  347. package/dist/extensions/mcp/runtime.js +3 -3
  348. package/dist/index.d.ts +3 -1
  349. package/dist/index.js +8 -8
  350. package/dist/main-first-time-setup.code.js +2 -2
  351. package/dist/main-first-time-setup.impl.js +3 -3
  352. package/dist/main-first-time-setup.js +3 -3
  353. package/dist/main.js +1 -1
  354. package/dist/modes/interactive/components/stored-tree-view.code.js +3 -3
  355. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  356. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  357. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  358. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  359. package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
  360. package/dist/modes/interactive-engine/engine-prewarm.d.ts +1 -1
  361. package/dist/modes/print-mode.js +1 -1
  362. package/dist/package-manager-cli.code.js +7 -7
  363. package/dist/package-manager-cli.impl.js +3 -3
  364. package/dist/package-manager-cli.js +3 -3
  365. package/dist/rpc-entry.js +1 -1
  366. package/dist/startup-files.json +1 -1
  367. package/dist/startup-stages/10.js +1 -1
  368. package/dist/startup-stages/11.js +1 -1
  369. package/dist/startup-stages/12.js +1 -1
  370. package/dist/startup-stages/2.js +2 -3
  371. package/dist/startup-stages/3.js +1 -3
  372. package/dist/startup-stages/4.js +1 -2
  373. package/dist/startup-stages/5.js +1 -1
  374. package/dist/startup-stages/6.js +5 -7
  375. package/dist/startup-stages/7.js +3 -6
  376. package/dist/startup-stages/8.js +7 -2
  377. package/dist/startup-stages/9.js +1 -7
  378. package/dist/startup-stages/stages.json +1 -1
  379. package/dist/utils/compile-cache-deferral.js +8 -13
  380. package/dist/utils/compile-cache-deferral.js.map +1 -1
  381. package/dist/utils/compile-cache-warmup-host.js +3 -4
  382. package/dist/utils/compile-cache-warmup-host.js.map +1 -1
  383. package/dist/utils/compile-cache.js +12 -100
  384. package/dist/utils/compile-cache.js.map +1 -1
  385. package/dist/utils/startup-database-spare.code.js +3 -3
  386. package/dist/utils/startup-database-spare.impl.js +3 -3
  387. package/dist/utils/startup-database-spare.js +3 -3
  388. package/dist/utils/tools-manager.code.js +1 -1
  389. package/dist/utils/tools-manager.impl.js +3 -3
  390. package/dist/utils/tools-manager.js +3 -3
  391. package/dist/utils/worker-threads.js +2 -15
  392. package/dist/utils/worker-threads.js.map +1 -1
  393. package/docs/build.md +3 -3
  394. package/docs/changelog.mdx +1421 -69
  395. package/docs/compaction/reference.md +5 -5
  396. package/docs/compaction.md +7 -9
  397. package/docs/containerization.md +2 -2
  398. package/docs/custom-provider/api-reference.md +1 -1
  399. package/docs/docs.json +37 -10
  400. package/docs/environment-variables.md +0 -2
  401. package/docs/extensions/api-reference.md +4 -4
  402. package/docs/getting-started/installation.md +3 -0
  403. package/docs/guides/configuration.md +1 -1
  404. package/docs/guides/non-interactive.md +1 -1
  405. package/docs/guides/resume-on-any-machine.md +14 -22
  406. package/docs/guides/team-setup.md +56 -83
  407. package/docs/guides.md +2 -4
  408. package/docs/herdr.md +1 -1
  409. package/docs/index.md +1 -1
  410. package/docs/intercom/operations.md +26 -21
  411. package/docs/intercom/reference.md +2 -2
  412. package/docs/intercom.md +1 -1
  413. package/docs/libraries/storage-postgres.md +9 -9
  414. package/docs/libraries.md +2 -3
  415. package/docs/models-configuration.md +2 -2
  416. package/docs/models.md +2 -3
  417. package/docs/packages/authoring.md +7 -7
  418. package/docs/packages.md +1 -1
  419. package/docs/programmatic.md +2 -2
  420. package/docs/quickstart.md +1 -1
  421. package/docs/reference/cli.md +6 -11
  422. package/docs/reference.md +2 -2
  423. package/docs/rpc/extension-ui.md +2 -2
  424. package/docs/sdk/reference.md +5 -4
  425. package/docs/sdk/storage.md +8 -92
  426. package/docs/sdk/structured-decisions.md +1 -1
  427. package/docs/sdk/web-server.md +3 -3
  428. package/docs/sdk.md +14 -4
  429. package/docs/security.md +1 -1
  430. package/docs/session-format.md +5 -5
  431. package/docs/sessions.md +31 -42
  432. package/docs/settings.md +7 -8
  433. package/docs/storage/custom-adapters.md +255 -0
  434. package/docs/storage/jsonl.md +117 -0
  435. package/docs/{guides/postgres-pgbouncer.md → storage/postgres/pgbouncer.md} +73 -68
  436. package/docs/storage/postgres/tuning.md +337 -0
  437. package/docs/storage/postgres.md +556 -0
  438. package/docs/storage/sqlite.md +99 -0
  439. package/docs/storage.md +333 -956
  440. package/docs/subagents/authoring.md +1 -1
  441. package/docs/subagents.md +2 -2
  442. package/docs/tools.md +1 -1
  443. package/docs/worktree-snapshots.md +2 -2
  444. package/package.json +9 -9
  445. package/schemas/models.schema.json +2 -2
  446. package/schemas/settings.schema.json +0 -14
  447. package/dist/_shared/sdk-AVFII7NK.js.map +0 -1
  448. package/dist/_shared/settings-startup-4QCVCI53.js.map +0 -1
  449. package/dist/_shared/startup-0-0-57KF6LZH.js.map +0 -1
  450. package/dist/_shared/startup-0-1-GIY75K46.js.map +0 -1
  451. package/dist/_shared/startup-0-2-27OWFHV6.js.map +0 -1
  452. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +0 -1
  453. package/dist/_shared/startup-8-1-X32CYSXB.js.map +0 -1
  454. package/dist/core/intercom-broker-control.d.ts +0 -129
  455. package/dist/startup-stages/13.js +0 -1
  456. package/docs/guides/postgres-tuning.md +0 -311
  457. package/docs/libraries/storage-libsql.md +0 -97
@@ -1,11 +1,11 @@
1
1
  import { __commonJSMin, __require } from "./rolldown-runtime-BGM3D5V3.js";
2
2
  import { APP_NAME, ENV_SESSION_DIR, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutable, findHelperExecutableAsync, getAgentDir, getBinDir, getProjectConfigDirs, isBunBinary, isBundledBuild, isPathWithin, loadOnDemand, markLifecycleTiming, normalizePath, processLaunch, processLaunchAsync, releaseRetainedWindowsProcessExitHandle, resolutionBaseUrl, resolvePath, resolveSafeWindowsKillCwdLexical, resolveSafeWindowsWorkingDirectoryAsync, retainWindowsProcessExitHandle, spawnLaunchedProcess, spawnLaunchedProcessSync, stripBom } from "./p0-cli-BB45ZQY6.js";
3
- import { ActivityWatchdog, CompactionCancelledError, CompactorFailure, Diff, JSON_RPC_ERROR_CODES, LIVE_COMMAND_LIMIT_MESSAGE, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defineTool, fetchWithRetry, fieldTone, findProviderDefaultModel, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-57KF6LZH.js";
4
- import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-GIY75K46.js";
3
+ import { ActivityWatchdog, CompactionCancelledError, CompactorFailure, Diff, ForkSourceIncompleteError, JSON_RPC_ERROR_CODES, LIVE_COMMAND_LIMIT_MESSAGE, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defineTool, fetchWithRetry, fieldTone, fileEpochOf, findProviderDefaultModel, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, segmentLength, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-EZUKEP4Q.js";
4
+ import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, reparentedSegments, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, splitSegment, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-RTOHJFDJ.js";
5
5
  import { KeybindingsManager as KeybindingsManager$1, clickableHintText, clickableKeyTextHint, detectTerminalThemeForAuto, graphemeAt, initTheme, keepStartupDialogDraft, parenthesizedKeyHint, setTheme, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme, withEarlyInputHeldForStartupDialog } from "./p2-shell-main-B2WIALFD.js";
6
6
  import { stripJsonComments } from "./p1-shared-RG5I5LJ6.js";
7
- import { findInCauseChain, guardLockRemoval, nativeProcessCreationTime, nativeTerminateProcess, redactCredentialShapes, rehydrateErrorCause, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, serializeErrorCause, waitForLock, waitForLockSync } from "./p1b-elig-ENCUPKKJ.js";
8
- import { rehydrateDecisionError } from "./settings-startup-4QCVCI53.js";
7
+ import { findInCauseChain, guardLockRemoval, nativeProcessCreationTime, nativeTerminateProcess, redactCredentialShapes, rehydrateErrorCause, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, serializeErrorCause, waitForLock, waitForLockSync } from "./p1b-elig-TVB5CBLL.js";
8
+ import { rehydrateDecisionError } from "./settings-startup-HXQLSUWM.js";
9
9
  import * as fs from "node:fs/promises";
10
10
  import { chmod, lstat, mkdir, mkdtemp, readFile, rm, stat } from "node:fs/promises";
11
11
  import { chmodSync, existsSync, mkdirSync, readFileSync, realpath as realpath$1, realpathSync, rmSync, statSync, writeFileSync } from "fs";
@@ -32,6 +32,7 @@ import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
32
32
  import { memoizeAsync } from "../utils/memoize-async.js";
33
33
  import { runToolCall } from "@bastani/atomic-agent-core";
34
34
  import { isProxy } from "node:util/types";
35
+ import { learnCreationTime } from "../core/storage/creation-time.js";
35
36
  import { defaultSessionDatabasePathSteps, defaultSharedStoragePathSteps, runStorageSteps, runStorageStepsSync, storagePathBaseDirSteps, storageSettingsSteps } from "../core/storage/file-identity.js";
36
37
  import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
37
38
  import { llamaCppClassifyApi } from "@bastani/atomic-ai/api/llama-cpp-classify.lazy";
@@ -45,7 +46,8 @@ import { lookup } from "node:dns/promises";
45
46
  import { anthropicAssistantReplayContent } from "@bastani/atomic-ai/api/anthropic-assistant-content";
46
47
  import { isProducedByModel } from "@bastani/atomic-ai/api/transform-messages";
47
48
  import { Value } from "@bastani/atomic-ai/utils/typebox/value";
48
- import { TEAM_PROFILE_ENV, environmentTeamProfile, environmentTeamProfileAsync, environmentTeamProfileSelection, selectStorage, selectStorageSteps } from "../core/storage/selection.js";
49
+ import { rejectRemovedTeamProfile } from "../core/storage/libsql-removed.js";
50
+ import { selectStorage, selectStorageSteps } from "../core/storage/selection.js";
49
51
  // dist/cli/startup-ui.js
50
52
  var StartupDialogInputGuard = class extends Container {
51
53
  enterArmed;
@@ -941,6 +943,224 @@ function killProcessTree(pid) {
941
943
  }
942
944
  }
943
945
  }
946
+ // dist/core/storage/session/fork-detach.js
947
+ /**
948
+ * Detaching lazy forks from a session (Neon's detach_ancestor). A fork in a SQL store reads the rows it inherited
949
+ * through segments that point at the sessions owning them, which keep those rows while any segment points at them. To
950
+ * really delete or rewrite such a session, every fork still pointing at it first gets its own copy of those rows:
951
+ *
952
+ * 1. Block: the segments pin the parent's rows, and a progress row records the detach and the child's original map.
953
+ * 2. Copy: a page of the parent's rows moves into the child at the global seqs the segment gave them, and in the same
954
+ * transaction the segment shrinks past them, so every seq is covered by a segment or by a row of the child's own,
955
+ * never both, and the child reads the same at every commit.
956
+ * 3. Publish: each page commits; the segments are the progress, so a crash resumes with the segments that remain.
957
+ * 4-6. The last page also removes the child's last segment on the parent, re-points at the child's copy each other
958
+ * fork of the parent that reads only rows the child's prefix holds (its cut-off at or below the child's), and
959
+ * removes the progress row, in one transaction.
960
+ *
961
+ * A detach locks the sessions whose segments it changes for update, in ID order, and never the parent. The store's
962
+ * delete and replace lock a session for update before they list the references to it, and a fork locks every session
963
+ * its segments name for key share, so neither misses a reference another transaction is adding. Re-pointing a fork at
964
+ * the child adds a reference to the child, which the detach already holds for update. Locking the parent instead
965
+ * would deadlock against the parent's replace, which holds the parent's row while it waits for its forks' rows.
966
+ */
967
+ /**
968
+ * Where a refused copy of shared rows is noted, for debugging: the application sets it once, to its debug log. A refusal
969
+ * also fails the write that needed the copy, so nothing is lost; the note says which fork and which source entry.
970
+ */
971
+ let noteRefusedCopy = () => {};
972
+ function setForkCopyRefusalNote(note) {
973
+ noteRefusedCopy = note;
974
+ }
975
+ /** Notes `error` once when it is a refused copy of shared rows; resolves nothing and never throws. */
976
+ function noteForkCopyRefusal(error, operation) {
977
+ if (!(error instanceof ForkSourceIncompleteError)) return;
978
+ try {
979
+ noteRefusedCopy({
980
+ operation,
981
+ sessionId: error.sessionId,
982
+ sourceId: error.sourceId,
983
+ sourceSeq: error.sourceSeq
984
+ });
985
+ } catch {}
986
+ }
987
+ /**
988
+ * Locks `ids` for update, to change their segments, in ID order, the order every transaction that locks sessions
989
+ * takes them in. A detach never locks the parent: the parent's replace holds the parent's row while it waits for its
990
+ * forks' rows, and only that replace can change the parent's rows a fork reads, after it has detached the fork itself.
991
+ */
992
+ async function lockForUpdate(host, tx, ids) {
993
+ await host.lockForkSources(tx, [...new Set(ids)].sort(), "update");
994
+ }
995
+ /** The forks whose segments name `sessionId`, after locking it for update. */
996
+ async function lockedReferrers(host, tx, sessionId) {
997
+ await host.lockForkSources(tx, [sessionId], "update");
998
+ return (await host.forkChildren(tx, sessionId)).filter((id) => id !== sessionId);
999
+ }
1000
+ /** Removes the rows a session stores and its tombstone: nothing names them, and the session is gone or replaced. */
1001
+ async function removeStoredRows(host, tx, sessionId) {
1002
+ const { pinTables: tables } = host;
1003
+ for (const table of [
1004
+ tables.blobChunks,
1005
+ tables.blobs,
1006
+ tables.entryChunks,
1007
+ tables.searchTexts,
1008
+ tables.entries
1009
+ ]) await tx.run(`DELETE FROM ${table} WHERE session_id = ?`, sessionId);
1010
+ await tx.run(`DELETE FROM ${tables.tombstones} WHERE session_id = ?`, sessionId);
1011
+ }
1012
+ async function isTombstoned(host, tx, sessionId) {
1013
+ return await tx.get(`SELECT session_id FROM ${host.pinTables.tombstones} WHERE session_id = ?`, sessionId) !== void 0;
1014
+ }
1015
+ function parseProgress(row) {
1016
+ return {
1017
+ reparent: row.reparent !== 0,
1018
+ original: JSON.parse(row.original_segments),
1019
+ epochs: [row.parent_epoch ?? void 0, row.child_epoch ?? void 0]
1020
+ };
1021
+ }
1022
+ /** The rewrite epochs of the parent and the child, read under their locks. */
1023
+ async function rewriteEpochs(host, tx, parentId, childId) {
1024
+ return [await host.forkRewriteEpoch(tx, parentId), await host.forkRewriteEpoch(tx, childId)];
1025
+ }
1026
+ /** Every session whose rows `sessionId` reads, directly or through the sessions it reads. */
1027
+ async function readSources(host, tx, sessionId) {
1028
+ const found = /* @__PURE__ */ new Set();
1029
+ const pending = [sessionId];
1030
+ for (let next = pending.pop(); next !== void 0; next = pending.pop()) for (const { sourceId } of await host.forkSegments(tx, next)) if (!found.has(sourceId)) {
1031
+ found.add(sourceId);
1032
+ pending.push(sourceId);
1033
+ }
1034
+ return found;
1035
+ }
1036
+ /**
1037
+ * Within `tx`, copies every row of `parentId` the child reads into the child and removes its segments on the parent,
1038
+ * as a caller about to rewrite the parent in the same transaction needs. With `reparent`, the parent's other forks are
1039
+ * re-pointed at the child's copy when it holds every row they read of the parent at the same seqs. `started` is how a detach a page at a time found
1040
+ * the child when it started; its map of the child's rows holds only while neither session was rewritten since, so
1041
+ * a rewrite of either skips the re-pointing, and the other forks keep reading the parent. Resolves with the forks
1042
+ * re-pointed.
1043
+ */
1044
+ async function detachForkWithin(host, tx, parentId, childId, reparent, started) {
1045
+ const siblings = reparent ? (await host.forkChildren(tx, parentId)).filter((id) => id !== childId) : [];
1046
+ await lockForUpdate(host, tx, [childId, ...siblings]);
1047
+ const onParent = (await host.forkSegments(tx, childId)).filter((segment) => segment.sourceId === parentId);
1048
+ if (onParent.length > 0) await host.materializeForkSegments(tx, childId, onParent);
1049
+ if (siblings.length === 0) return [];
1050
+ let map = onParent;
1051
+ if (started !== void 0) {
1052
+ const [parentEpoch, childEpoch] = await rewriteEpochs(host, tx, parentId, childId);
1053
+ map = parentEpoch === started.epochs[0] && childEpoch === started.epochs[1] ? started.original : [];
1054
+ }
1055
+ const reparented = [];
1056
+ if (map.length === 0) return reparented;
1057
+ const readByChild = await readSources(host, tx, childId);
1058
+ for (const sibling of siblings) {
1059
+ if (readByChild.has(sibling)) continue;
1060
+ const before = await host.forkSegments(tx, sibling);
1061
+ const after = reparentedSegments(before, parentId, childId, map);
1062
+ if (after !== void 0) {
1063
+ await host.writeForkSegments(tx, sibling, after);
1064
+ reparented.push(sibling);
1065
+ }
1066
+ }
1067
+ return reparented;
1068
+ }
1069
+ /**
1070
+ * Detaches `childId` from `parentId` a page at a time, each page its own transaction; see the module comment. A detach
1071
+ * a crash stopped resumes where it stopped when it runs again, with the options it started with.
1072
+ */
1073
+ async function detachFork(host, parentId, childId, options = {}) {
1074
+ const table = host.forkDetachTable;
1075
+ const pageRows = Math.max(1, Math.floor(options.pageRows ?? 2e3));
1076
+ const progress = await host.forkTransaction(async (tx) => {
1077
+ const row = await tx.get(`SELECT parent_id, child_id, reparent, original_segments, parent_epoch, child_epoch FROM ${table} WHERE parent_id = ? AND child_id = ?`, parentId, childId);
1078
+ if (row !== void 0) return parseProgress(row);
1079
+ await lockForUpdate(host, tx, [childId]);
1080
+ const original = (await host.forkSegments(tx, childId)).filter((segment) => segment.sourceId === parentId);
1081
+ if (original.length === 0) return void 0;
1082
+ const started = {
1083
+ reparent: options.reparent ?? true,
1084
+ original,
1085
+ epochs: await rewriteEpochs(host, tx, parentId, childId)
1086
+ };
1087
+ await tx.run(`INSERT INTO ${table} (parent_id, child_id, reparent, original_segments, parent_epoch, child_epoch) VALUES (?, ?, ?, ?, ?, ?) ON CONFLICT DO NOTHING`, parentId, childId, started.reparent ? 1 : 0, JSON.stringify(original), started.epochs[0] ?? null, started.epochs[1] ?? null);
1088
+ return started;
1089
+ });
1090
+ if (progress === void 0) return {
1091
+ detached: [],
1092
+ reparented: []
1093
+ };
1094
+ for (;;) {
1095
+ const done = await host.forkTransaction(async (tx) => {
1096
+ await lockForUpdate(host, tx, [childId]);
1097
+ const onParent = (await host.forkSegments(tx, childId)).filter((segment) => segment.sourceId === parentId);
1098
+ if (onParent.reduce((rows, segment) => rows + segmentLength(segment), 0) > pageRows) {
1099
+ await host.materializeForkSegments(tx, childId, [splitSegment(onParent[0], pageRows).page]);
1100
+ return;
1101
+ }
1102
+ const reparented = await detachForkWithin(host, tx, parentId, childId, progress.reparent, progress);
1103
+ await tx.run(`DELETE FROM ${table} WHERE parent_id = ? AND child_id = ?`, parentId, childId);
1104
+ return reparented;
1105
+ }).catch(async (error) => {
1106
+ if (error instanceof ForkSourceIncompleteError) await host.forkTransaction((tx) => tx.run(`DELETE FROM ${table} WHERE parent_id = ? AND child_id = ?`, parentId, childId));
1107
+ throw error;
1108
+ });
1109
+ if (done !== void 0) return {
1110
+ detached: [childId],
1111
+ reparented: [...done]
1112
+ };
1113
+ }
1114
+ }
1115
+ /**
1116
+ * Detaches every fork still pointing at `parentId`, so the parent's rows can go: first the fork that holds most of the
1117
+ * parent's rows, re-pointing the others at its copy when it holds all they read, then any fork that still reads
1118
+ * rows only the parent has. Detaches a crash stopped are finished first.
1119
+ */
1120
+ async function detachForkChildren(host, parentId, options = {}) {
1121
+ const detached = [];
1122
+ const reparented = /* @__PURE__ */ new Set();
1123
+ const record = (report) => {
1124
+ detached.push(...report.detached);
1125
+ for (const id of report.reparented) reparented.add(id);
1126
+ };
1127
+ const pending = await host.forkTransaction((tx) => tx.all(`SELECT child_id FROM ${host.forkDetachTable} WHERE parent_id = ? ORDER BY child_id`, parentId));
1128
+ for (const { child_id } of pending) record(await detachFork(host, parentId, child_id, options));
1129
+ for (;;) {
1130
+ const next = await host.forkTransaction(async (tx) => {
1131
+ let best;
1132
+ for (const id of await host.forkChildren(tx, parentId)) {
1133
+ const rows = (await host.forkSegments(tx, id)).filter((segment) => segment.sourceId === parentId).reduce((sum, segment) => sum + segmentLength(segment), 0);
1134
+ if (best === void 0 || rows > best.rows) best = {
1135
+ id,
1136
+ rows
1137
+ };
1138
+ }
1139
+ return best?.id;
1140
+ });
1141
+ if (next === void 0) break;
1142
+ record(await detachFork(host, parentId, next, options));
1143
+ }
1144
+ return {
1145
+ detached,
1146
+ reparented: [...reparented].filter((id) => !detached.includes(id))
1147
+ };
1148
+ }
1149
+ /** Finishes every detach a crash stopped, as each started. */
1150
+ async function resumeForkDetaches(host) {
1151
+ const rows = await host.forkTransaction((tx) => tx.all(`SELECT parent_id, child_id FROM ${host.forkDetachTable} ORDER BY parent_id, child_id`));
1152
+ const detached = [];
1153
+ const reparented = [];
1154
+ for (const { parent_id, child_id } of rows) {
1155
+ const report = await detachFork(host, parent_id, child_id);
1156
+ detached.push(...report.detached);
1157
+ reparented.push(...report.reparented);
1158
+ }
1159
+ return {
1160
+ detached,
1161
+ reparented
1162
+ };
1163
+ }
944
1164
  // ../../node_modules/yaml/dist/doc/directives.js
945
1165
  var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
946
1166
  var identity = require_identity();
@@ -3353,10 +3573,8 @@ var TaskSupervisor = class {
3353
3573
  if (state.commandStarts.get(operation) === start) state.commandStarts.delete(operation);
3354
3574
  };
3355
3575
  result.then((started) => {
3356
- if (started.ok) {
3357
- start.result = started;
3358
- start.task = started.value;
3359
- } else forget();
3576
+ if (started.ok) start.task = started.value;
3577
+ else forget();
3360
3578
  }, forget);
3361
3579
  return result;
3362
3580
  }
@@ -4107,10 +4325,11 @@ const captureTaskChatFile = async (file, id) => {
4107
4325
  inspectedFiles.set(view, discovery);
4108
4326
  }
4109
4327
  if (!await discovery.present) return void 0;
4328
+ await learnCreationTime(dirname$1(file));
4110
4329
  return (raw, stats) => {
4111
4330
  if (stats.birthtimeNs <= 0n) return;
4112
4331
  const { type: _type, ...header } = raw;
4113
- const epoch = `${stats.dev}:${stats.ino}:${stats.birthtimeNs}:${createHash("sha256").update(JSON.stringify(header)).digest("hex").slice(0, 16)}`;
4332
+ const epoch = fileEpochOf(stats, JSON.stringify(header));
4114
4333
  capture.scope = {
4115
4334
  store: fileReader,
4116
4335
  owner: {
@@ -10168,8 +10387,8 @@ const ModelFieldDescriptions = {
10168
10387
  name: "Display name, also matched by --model patterns.",
10169
10388
  reasoning: "Whether the model supports thinking. Applies only to chat models.",
10170
10389
  contextWindow: "Context window in tokens. Applies only to chat models.",
10171
- maxTokens: "Maximum output tokens. Defaults to 16384 for chat models. When omitted on compactor models, defaults to 32000 estimated tokens, capped at 50% of the automatic trigger.",
10172
- maxTokensOverride: "Maximum output tokens. On compactor models, sets the upper bound on compacted output in estimated tokens, capped at 50% of the automatic trigger."
10390
+ maxTokens: "Maximum output tokens. Defaults to 16384 for chat models. On compactor models it has no default: when set, compacted output longer than this many estimated tokens clears the context instead; when omitted, output has no size limit.",
10391
+ maxTokensOverride: "Maximum output tokens. On compactor models, compacted output longer than this many estimated tokens clears the context instead; omit it for no size limit."
10173
10392
  };
10174
10393
  /** Everything pi-ai defines for compatibility, plus Atomic's alias for the grammar-tool capability. */
10175
10394
  const ModelsJsonCompatSchema = Type$1.Object({
@@ -11225,9 +11444,9 @@ function estimateTokens(message) {
11225
11444
  const COMPACTOR_REQUEST_TIMEOUT_MS = 12e4;
11226
11445
  /** Lines longer than this are wrapped before they are sent, so the compactor can keep or drop parts of them. */
11227
11446
  const COMPACTOR_LINE_WIDTH = 2e3;
11228
- /** Default upper bound on compacted text, in estimated tokens, unless overridden by model `maxTokens`. Longer output is a failure and the context is cleared. */
11447
+ /** Upper bound, in estimated tokens, on compacted text an extension hook supplies; longer text clears the context. A compactor model's output has no bound. */
11229
11448
  const COMPACTED_OUTPUT_MAX_TOKENS = 32e3;
11230
- /** Compacted text never fills more than this share of the context the automatic trigger allows. */
11449
+ /** Compacted text an extension hook supplies never fills more than this share of the context the automatic trigger allows. */
11231
11450
  const COMPACTED_OUTPUT_MAX_TRIGGER_SHARE = .5;
11232
11451
  const DEFAULT_COMPACTOR_ENDPOINT_PATH = "/compact";
11233
11452
  const HTTP_ERROR_EXCERPT_MAX_CHARS = 500;
@@ -11302,7 +11521,7 @@ function buildCompactorMessages(messages, isBoundary) {
11302
11521
  const rest = messages.filter((message) => !(message.role === "custom" && isBoundary(message)));
11303
11522
  return [...boundaries, ...rest].flatMap((message) => messageIsLlmVisible(message) ? compactorMessage(message, isBoundary) ?? [] : []);
11304
11523
  }
11305
- /** Largest compacted text, in estimated tokens, for a model whose automatic trigger fires above `triggerTokens`. */
11524
+ /** Largest compacted text an extension hook may supply, in estimated tokens, for a model whose automatic trigger fires above `triggerTokens`. */
11306
11525
  function compactedOutputTokenCap(triggerTokens, maxOutputTokens = COMPACTED_OUTPUT_MAX_TOKENS) {
11307
11526
  return Math.max(0, Math.min(Number.isFinite(maxOutputTokens) && maxOutputTokens > 0 ? maxOutputTokens : COMPACTED_OUTPUT_MAX_TOKENS, Math.floor(triggerTokens * COMPACTED_OUTPUT_MAX_TRIGGER_SHARE)));
11308
11527
  }
@@ -11897,19 +12116,20 @@ function setCliStorageSelection(argument, cwd = process.cwd()) {
11897
12116
  value: parseCliStorageArgument(argument, cwd)
11898
12117
  };
11899
12118
  }
11900
- /** Every set storage variable, parsed and checked even when another selection outranks it. */
12119
+ /**
12120
+ * Every set storage variable, parsed and checked even when another selection outranks it. A variable of the removed
12121
+ * `ATOMIC_PROFILE=ci` team profile is refused.
12122
+ */
11901
12123
  function environmentChoices(agentDir, env = process.env) {
12124
+ rejectRemovedTeamProfile(env);
11902
12125
  const read = (field, schema) => {
11903
12126
  const text = environmentValue(field, env);
11904
12127
  if (text === void 0) return void 0;
11905
12128
  return chooseAt(parseSelection(text, schema, "env", field), "env", field, agentDir);
11906
12129
  };
11907
- const team = environmentTeamProfileSelection(env);
11908
12130
  return {
11909
12131
  sessions: read(SESSIONS_STORAGE_ENV, SessionStorageSelectionSchema),
11910
- shared: read(STORAGE_ENV, StorageSelectionSchema),
11911
- team: team === void 0 ? void 0 : chooseAt(team, "env", TEAM_PROFILE_ENV, agentDir),
11912
- teamValue: team
12132
+ shared: read(STORAGE_ENV, StorageSelectionSchema)
11913
12133
  };
11914
12134
  }
11915
12135
  /**
@@ -11942,8 +12162,7 @@ function previewProcessStorageSelection(domain, options = {}) {
11942
12162
  } catch {
11943
12163
  throw new StorageConfigError("env", legacyField, "invalid-path");
11944
12164
  }
11945
- if (validated.shared !== void 0) return validated.shared.selection;
11946
- return validated.team?.selection;
12165
+ return validated.shared?.selection;
11947
12166
  }
11948
12167
  /**
11949
12168
  * Classify a `settings.json` session-storage value (`sessions.storage` or `storage`)
@@ -11959,11 +12178,10 @@ function previewSessionSettingSelection(value, field, agentDir) {
11959
12178
  }
11960
12179
  async function validateProcessStorageAsync(agentDir) {
11961
12180
  environmentChoices(agentDir);
11962
- await environmentTeamProfileAsync();
11963
12181
  }
11964
12182
  /**
11965
12183
  * The process-level storage selection for one domain: `--storage`/`--storage-file`, then, for sessions, the domain
11966
- * variable or its legacy path variable, then `ATOMIC_STORAGE`, then the `ATOMIC_PROFILE=ci` team database.
12184
+ * variable or its legacy path variable, then `ATOMIC_STORAGE`.
11967
12185
  * `undefined` leaves the choice to settings.
11968
12186
  * Every set storage variable is validated, whichever one applies.
11969
12187
  */
@@ -12014,39 +12232,29 @@ function* selectProcessStorageSteps(domain, agentDir, cwd) {
12014
12232
  throw new StorageConfigError("env", legacyField, "invalid-path");
12015
12233
  }
12016
12234
  if (validated.shared !== void 0) return yield* resolveEnv(STORAGE_ENV, StorageSelectionSchema, sharedDefault);
12017
- const team = validated.teamValue;
12018
- return team === void 0 ? void 0 : yield* chooseSteps(team, "env", TEAM_PROFILE_ENV, baseDir, sharedDefault);
12019
12235
  }
12020
12236
  /** Whether the launching process selected this domain's storage, without validating the selection. */
12021
12237
  function hasProcessStorageSelection(domain) {
12022
12238
  return registry[CLI_SELECTION] !== void 0 || (domain === "sessions" ? [
12023
12239
  "ATOMIC_SESSIONS_STORAGE",
12024
12240
  ENV_SESSION_DIR,
12025
- "ATOMIC_STORAGE",
12026
- TEAM_PROFILE_ENV
12027
- ] : ["ATOMIC_STORAGE", TEAM_PROFILE_ENV]).some((name) => environmentValue(name) !== void 0);
12241
+ "ATOMIC_STORAGE"
12242
+ ] : ["ATOMIC_STORAGE"]).some((name) => environmentValue(name) !== void 0);
12028
12243
  }
12029
12244
  /**
12030
12245
  * The shared `storage` selection this process was launched with, as the `ATOMIC_STORAGE` value a child process it
12031
- * spawns should receive: `--storage`/`--storage-file`, then `ATOMIC_STORAGE`, then the `ATOMIC_PROFILE=ci` team
12032
- * database, which references its token by variable or file and never copies it. `undefined` leaves the choice to
12033
- * settings. An invalid team profile throws {@link TeamProfileConfigError}, as it does at startup.
12246
+ * spawns should receive: `--storage`/`--storage-file`, then `ATOMIC_STORAGE`. `undefined` leaves the choice to
12247
+ * settings. A variable of the removed `ATOMIC_PROFILE=ci` team profile is refused, so a broker or Intercom session
12248
+ * never starts without the database it named.
12034
12249
  */
12035
12250
  function processSharedStorageSelection() {
12251
+ rejectRemovedTeamProfile();
12036
12252
  const cli = registry[CLI_SELECTION];
12037
12253
  if (cli !== void 0) return JSON.stringify(cli.value);
12038
- const shared = environmentValue(STORAGE_ENV);
12039
- if (shared !== void 0) return shared;
12040
- const team = environmentTeamProfile();
12041
- return team === void 0 ? void 0 : JSON.stringify(team);
12254
+ return environmentValue(STORAGE_ENV);
12042
12255
  }
12043
12256
  async function processSharedStorageSelectionAsync() {
12044
- const cli = registry[CLI_SELECTION];
12045
- if (cli !== void 0) return JSON.stringify(cli.value);
12046
- const shared = environmentValue(STORAGE_ENV);
12047
- if (shared !== void 0) return shared;
12048
- const team = await environmentTeamProfileAsync();
12049
- return team === void 0 ? void 0 : JSON.stringify(team);
12257
+ return processSharedStorageSelection();
12050
12258
  }
12051
12259
  /**
12052
12260
  * `process.env` with `ATOMIC_STORAGE` set to {@link processSharedStorageSelection}, as the Intercom broker this
@@ -12275,16 +12483,16 @@ var RpcTerminalDrain = class {
12275
12483
  return this.generation === generation && this.settlement ? this.settlement : Promise.resolve();
12276
12484
  }
12277
12485
  };
12278
- export { AgentTokenMeter, AgentWakeDispatcher, COMPACTED_OUTPUT_MAX_TOKENS, COMPACTED_OUTPUT_MAX_TRIGGER_SHARE, COMPACTOR_LINE_WIDTH, COMPACTOR_REQUEST_TIMEOUT_MS, ChatRowView, DEFAULT_AGENT_WAIT_BUDGET_MS, DEFAULT_COMPACTION_SETTINGS, DialogView, FILE_HEADERS_ONLY, FileAuthStorageBackend, InMemoryAuthStorageBackend, InteractiveEngineMonitor, JsonRpcLineReader, LLAMA_PROVIDER_ID, LONG_STREAM_CUT_ADVICE, LONG_STREAM_CUT_MS, MAX_LONG_STREAM_CUT_RETRIES, McpAuthRequiredError, McpHttpError, McpSessionExpiredError, MessageAdmissionBoundary, ModelConfig, OptionListView, PreviewBlockRenderer, QuestionnairePropsAdapter, ResumeCatalogTimeoutError, ResumeCatalogUnavailableError, ResumeError, ResumeNotFoundError, ResumePreconditionError, RpcTerminalDrain, SESSIONS_STORAGE_ENV, STORAGE_ENV, STRUCTURED_OUTPUT_TOOL_NAME, SessionWorkUnsettledError, StartupDialogInputGuard, StreamableHttpTransport, TaskSupervisor, TempDirRefusedError, TodoParams, WorkingRunMeter, abortSessionWork, acquireProtectedPaths, addShellOutputPreview, agentTokenTotal, agentWakeDispatcher, applyExtensionSourceInfo, applyProviderRateLimitObservation, armSessionQuitStops, assertPrivateDirectory, assertPrivateDirectoryAsync, assertSessionOpen, assertWorkspace, asyncAuthStorageReads, automaticWaitBudgetMs, bindTaskChatPage, buildCompactorMessages, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, calculateContextTokens, captureChatSnapshot, captureTaskChatFile, chatPageRequest, classifyRepository, clearNestedToolCalls, compactedOutputTokenCap, compactionMeta, configureProviderRequestBudget, createLlamaProvider, createStructuredOutputCapture, createStructuredOutputTool, createToolDefinitionFromAgentTool, createTwoFilesPatch, detectStartupTheme, discoverAppendSystemPromptFile, discoverSystemPromptFile, drainSessionReload, drainSessionWork, drainSessionWorkWithin, dropWrongTypedSettings, ensurePrivateTempDir, ensurePrivateTempDirAsync, ensureSessionTempDirAsync, ensureTempDirAsync, estimateContextTokens, estimateDirectBranchContextTokens, estimateProjectedContextTokens, estimateTextTokens, estimateTokens, executeNestedToolCall, findExactModelReferenceMatch, findResumeError, findSourceInfoForPath, formatDimensionNote, formatKillCall, formatPatch, formatTruncationNotice, formatWorkingElapsed, formatWorkingMeta, fun, gen, getCallableTools, getDefaultSourceInfoForPath, getLastAssistantUsage, getNativeMcpToolIdentity, getPowerShellConfig, getPowerShellConfigAsync, getShellConfig, getShellConfigAsync, getShellEnvAsync, getTempRootDir, hasCallingSessionWork, hasProcessStorageSelection, hasSessionReload, importAfterEvaluation, installHostModuleBridge, invalidSettingMessage, isLongStreamCut, isPowerShellAvailable, isPowerShellAvailableAsync, isProtectedSessionTempDir, isProviderLimitFailure, isProviderRateLimit, isResumeCatalogTimeoutError, isResumeCatalogUnavailableError, isResumeError, isResumeNotFoundError, isResumePreconditionError, isRetryableResumeError, isSelectedNativeMcpTool, isTodoOperationError, isWorkspace, killChildProcessTree, killProcessTree, killSupervisedProcessTrees, killTrackedDetachedChildren, limitQuitShutdownHandlers, loadTaskOwnTranscriptEntries, loadTaskOwnTranscriptHistory, markDetachedChildExited, markNativeMcpToolDefinition, markProviderRateLimitObserved, matchesMcpDirectToolSelection, modelIdForModel, nextRetryDecision, normalizeDerivedSessionEntries, normalizeWorkingRunSnapshot, observeAccountCatalog, observeProviderRateLimits, observedTaskChatWrite, onSessionQuit, ownedSessionManagerStores, ownedSessionPermits, ownedSessionStores, prepareSourceEntries, prepareSourceEntry, previewProcessStorageSelection, previewSessionSettingSelection, processSharedStorageSelection, processSharedStorageSelectionAsync, processStorageEnvironment, processStorageEnvironmentAsync, providerAdmissionTurn, providerCooldownMs, providerIdForModel, providerLimitScope, providerRateLimitObservations, providerRateLimitSnapshot, providerRequestGate, providerRetryHint, providerUnavailableMs, rebuildKillResult, rebuildShellWaitResult, recordNestedToolCalls, recordProviderRateLimit, recordProviderRetryHint, recordProviderSuccess, recordedRepo, reduce, registerSessionRetirement, registerSessionWorkOwner, registerSourceBuiltinLoad, rehydrateResumeError, renewSessionWork, repeatsLongStreamCut, requestCompactorOutput, require_Node, require_anchors, require_directives, require_lib, require_semver, resizeImage, resolveModelReference, resolveSessionTempDirPath, restoreAnthropicReplayThinkingBlocks, retireSessionReloadGeneration, runCommand, runCommandCapture, runCommandSync, runInProgress, runWithConcurrency, sanitizeTempPathComponent, selectChatRowProps, selectDialogProps, selectMultiSelectProps, selectOptionListProps, selectPreviewPaneProps, selectProcessStorage, selectProcessStorageAsync, selectProcessStorageSteps, selectSubmitPickerProps, selectTabBarProps, serializeResumeError, sessionGenerationClosing, sessionLifetime, sessionQuitSignal, setActiveSessionTempId, setCliStorageSelection, setProviderRequestGate, shouldCompact, showFirstTimeSetup, showStartupInput, showStartupSelector, shutdownDeadline, spawnShellProcess, startParentProcessGuardian, structuredPatch, summarizeQuestions, taskChatPage, taskExtensionStatuses, taskOwnTranscriptEntries, taskTranscriptSource, trackDetachedChildPid, trackDetachedChildProcess, trackSessionReload, trackSessionWork, transformTemplate, tryAdmitProviderRequest, untilShutdownHandlerDeadline, untrackDetachedChildPid, validateProcessStorageAsync, validateQuestionnaire, wakeKeyNamespace, watchTaskExtensionStatuses, watchTaskTranscriptBindings, withBuiltinDiagnostics, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog, withTaskChatRows, workspace, wrapLongLines, wrapToolDefinition };
12486
+ export { AgentTokenMeter, AgentWakeDispatcher, COMPACTED_OUTPUT_MAX_TOKENS, COMPACTED_OUTPUT_MAX_TRIGGER_SHARE, COMPACTOR_LINE_WIDTH, COMPACTOR_REQUEST_TIMEOUT_MS, ChatRowView, DEFAULT_AGENT_WAIT_BUDGET_MS, DEFAULT_COMPACTION_SETTINGS, DialogView, FILE_HEADERS_ONLY, FileAuthStorageBackend, InMemoryAuthStorageBackend, InteractiveEngineMonitor, JsonRpcLineReader, LLAMA_PROVIDER_ID, LONG_STREAM_CUT_ADVICE, LONG_STREAM_CUT_MS, MAX_LONG_STREAM_CUT_RETRIES, McpAuthRequiredError, McpHttpError, McpSessionExpiredError, MessageAdmissionBoundary, ModelConfig, OptionListView, PreviewBlockRenderer, QuestionnairePropsAdapter, ResumeCatalogTimeoutError, ResumeCatalogUnavailableError, ResumeError, ResumeNotFoundError, ResumePreconditionError, RpcTerminalDrain, SESSIONS_STORAGE_ENV, STORAGE_ENV, STRUCTURED_OUTPUT_TOOL_NAME, SessionWorkUnsettledError, StartupDialogInputGuard, StreamableHttpTransport, TaskSupervisor, TempDirRefusedError, TodoParams, WorkingRunMeter, abortSessionWork, acquireProtectedPaths, addShellOutputPreview, agentTokenTotal, agentWakeDispatcher, applyExtensionSourceInfo, applyProviderRateLimitObservation, armSessionQuitStops, assertPrivateDirectory, assertPrivateDirectoryAsync, assertSessionOpen, assertWorkspace, asyncAuthStorageReads, automaticWaitBudgetMs, bindTaskChatPage, buildCompactorMessages, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, calculateContextTokens, captureChatSnapshot, captureTaskChatFile, chatPageRequest, classifyRepository, clearNestedToolCalls, compactedOutputTokenCap, compactionMeta, configureProviderRequestBudget, createLlamaProvider, createStructuredOutputCapture, createStructuredOutputTool, createToolDefinitionFromAgentTool, createTwoFilesPatch, detachForkChildren, detachForkWithin, detectStartupTheme, discoverAppendSystemPromptFile, discoverSystemPromptFile, drainSessionReload, drainSessionWork, drainSessionWorkWithin, dropWrongTypedSettings, ensurePrivateTempDir, ensurePrivateTempDirAsync, ensureSessionTempDirAsync, ensureTempDirAsync, estimateContextTokens, estimateDirectBranchContextTokens, estimateProjectedContextTokens, estimateTextTokens, estimateTokens, executeNestedToolCall, findExactModelReferenceMatch, findResumeError, findSourceInfoForPath, formatDimensionNote, formatKillCall, formatPatch, formatTruncationNotice, formatWorkingElapsed, formatWorkingMeta, fun, gen, getCallableTools, getDefaultSourceInfoForPath, getLastAssistantUsage, getNativeMcpToolIdentity, getPowerShellConfig, getPowerShellConfigAsync, getShellConfig, getShellConfigAsync, getShellEnvAsync, getTempRootDir, hasCallingSessionWork, hasProcessStorageSelection, hasSessionReload, importAfterEvaluation, installHostModuleBridge, invalidSettingMessage, isLongStreamCut, isPowerShellAvailable, isPowerShellAvailableAsync, isProtectedSessionTempDir, isProviderLimitFailure, isProviderRateLimit, isResumeCatalogTimeoutError, isResumeCatalogUnavailableError, isResumeError, isResumeNotFoundError, isResumePreconditionError, isRetryableResumeError, isSelectedNativeMcpTool, isTodoOperationError, isTombstoned, isWorkspace, killChildProcessTree, killProcessTree, killSupervisedProcessTrees, killTrackedDetachedChildren, limitQuitShutdownHandlers, loadTaskOwnTranscriptEntries, loadTaskOwnTranscriptHistory, lockedReferrers, markDetachedChildExited, markNativeMcpToolDefinition, markProviderRateLimitObserved, matchesMcpDirectToolSelection, modelIdForModel, nextRetryDecision, normalizeDerivedSessionEntries, normalizeWorkingRunSnapshot, noteForkCopyRefusal, observeAccountCatalog, observeProviderRateLimits, observedTaskChatWrite, onSessionQuit, ownedSessionManagerStores, ownedSessionPermits, ownedSessionStores, prepareSourceEntries, prepareSourceEntry, previewProcessStorageSelection, previewSessionSettingSelection, processSharedStorageSelection, processSharedStorageSelectionAsync, processStorageEnvironment, processStorageEnvironmentAsync, providerAdmissionTurn, providerCooldownMs, providerIdForModel, providerLimitScope, providerRateLimitObservations, providerRateLimitSnapshot, providerRequestGate, providerRetryHint, providerUnavailableMs, rebuildKillResult, rebuildShellWaitResult, recordNestedToolCalls, recordProviderRateLimit, recordProviderRetryHint, recordProviderSuccess, recordedRepo, reduce, registerSessionRetirement, registerSessionWorkOwner, registerSourceBuiltinLoad, rehydrateResumeError, removeStoredRows, renewSessionWork, repeatsLongStreamCut, requestCompactorOutput, require_Node, require_anchors, require_directives, require_lib, require_semver, resizeImage, resolveModelReference, resolveSessionTempDirPath, restoreAnthropicReplayThinkingBlocks, resumeForkDetaches, retireSessionReloadGeneration, runCommand, runCommandCapture, runCommandSync, runInProgress, runWithConcurrency, sanitizeTempPathComponent, selectChatRowProps, selectDialogProps, selectMultiSelectProps, selectOptionListProps, selectPreviewPaneProps, selectProcessStorage, selectProcessStorageAsync, selectProcessStorageSteps, selectSubmitPickerProps, selectTabBarProps, serializeResumeError, sessionGenerationClosing, sessionLifetime, sessionQuitSignal, setActiveSessionTempId, setCliStorageSelection, setForkCopyRefusalNote, setProviderRequestGate, shouldCompact, showFirstTimeSetup, showStartupInput, showStartupSelector, shutdownDeadline, spawnShellProcess, startParentProcessGuardian, structuredPatch, summarizeQuestions, taskChatPage, taskExtensionStatuses, taskOwnTranscriptEntries, taskTranscriptSource, trackDetachedChildPid, trackDetachedChildProcess, trackSessionReload, trackSessionWork, transformTemplate, tryAdmitProviderRequest, untilShutdownHandlerDeadline, untrackDetachedChildPid, validateProcessStorageAsync, validateQuestionnaire, wakeKeyNamespace, watchTaskExtensionStatuses, watchTaskTranscriptBindings, withBuiltinDiagnostics, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog, withTaskChatRows, workspace, wrapLongLines, wrapToolDefinition };
12279
12487
 
12280
- //# sourceMappingURL=startup-0-2-27OWFHV6.js.map
12488
+ //# sourceMappingURL=startup-0-2-5QHPCEON.js.map
12281
12489
  // __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
12282
12490
  // demand that fails in a process an in-place update left running says to restart.
12283
12491
  function __atomicOnDemandFailed(error, feature) {
12284
12492
  return (async () => {
12285
12493
  const root = new URL("../", import.meta.url);
12286
12494
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
12287
- const key = `${root.href}#0.10.11-alpha.1`;
12495
+ const key = `${root.href}#0.10.11-alpha.3`;
12288
12496
  let release = releases.get(key);
12289
12497
  if (release === undefined) {
12290
12498
  const current = (async () => {
@@ -12312,7 +12520,7 @@ function __atomicOnDemandFailed(error, feature) {
12312
12520
  } catch {
12313
12521
  // No installation to read, as in a bundle of the package: the release the process runs decides.
12314
12522
  }
12315
- const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.1" ? installed : running !== undefined && running.version !== "0.10.11-alpha.1" ? "0.10.11-alpha.1" : undefined;
12523
+ const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.3" ? installed : running !== undefined && running.version !== "0.10.11-alpha.3" ? "0.10.11-alpha.3" : undefined;
12316
12524
  if (updatedTo === undefined) throw error;
12317
12525
  const application = typeof running?.name === "string" ? running.name : "atomic";
12318
12526
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {