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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js +72 -39
  6. package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -1
  7. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +57 -18
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  9. package/dist/_shared/mode-shared-2QJSCUM6.js +59 -14
  10. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  11. package/dist/_shared/p0-cli-BB45ZQY6.js +2 -2
  12. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  13. package/dist/_shared/p1b-elig-BY2G5BUE.js +6 -3
  14. package/dist/_shared/p1b-elig-BY2G5BUE.js.map +1 -1
  15. package/dist/_shared/runtime-O4KCSG4C.js +4 -4
  16. package/dist/_shared/sdk-5ZFNDXUJ.js +208 -54
  17. package/dist/_shared/sdk-5ZFNDXUJ.js.map +1 -1
  18. package/dist/_shared/session-data-AHTU7IS6.js +14 -7
  19. package/dist/_shared/session-data-AHTU7IS6.js.map +1 -1
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-HXQLSUWM.js +2 -2
  22. package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-FPPQF42L.js → startup-0-0-OWBJIX35.js} +161 -86
  24. package/dist/_shared/startup-0-0-OWBJIX35.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-Q7GBLBEL.js → startup-0-1-DZYE4E5Z.js} +321 -17
  26. package/dist/_shared/startup-0-1-DZYE4E5Z.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-JNYN24UI.js → startup-0-2-WFLTE4SC.js} +113 -6
  28. package/dist/_shared/startup-0-2-WFLTE4SC.js.map +1 -0
  29. package/dist/_shared/startup-0-3-DE2NCS6A.js +47 -23
  30. package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-ZZXFKE55.js → startup-0-4-6XXL4JMZ.js} +37 -13
  32. package/dist/_shared/startup-0-4-6XXL4JMZ.js.map +1 -0
  33. package/dist/_shared/{startup-0-5-WN2IYA25.js → startup-0-5-DNS6FYS7.js} +126 -150
  34. package/dist/_shared/startup-0-5-DNS6FYS7.js.map +1 -0
  35. package/dist/_shared/startup-10-0-O6DAT7U4.js +93 -72
  36. package/dist/_shared/startup-10-0-O6DAT7U4.js.map +1 -1
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +5 -5
  39. package/dist/_shared/startup-15-0-E7RYG5YF.js +6 -6
  40. package/dist/_shared/startup-15-1-WQZBOTMZ.js +289 -122
  41. package/dist/_shared/startup-15-1-WQZBOTMZ.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +263 -145
  43. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  44. package/dist/_shared/{startup-8-1-QZMXUGHI.js → startup-8-1-VXBL37AI.js} +325 -10
  45. package/dist/_shared/startup-8-1-VXBL37AI.js.map +1 -0
  46. package/dist/_shared/storage-command-7MGXLJGZ.js +11 -273
  47. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  48. package/dist/_shared/storage-status-T6FUXRIM.js +4 -4
  49. package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
  50. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  51. package/dist/_shared/team-DOQKICG2.js +2 -2
  52. package/dist/_shared/tree-outline-MUEPK5B7.js +9 -2
  53. package/dist/_shared/tree-outline-MUEPK5B7.js.map +1 -1
  54. package/dist/binary-self-update.js +3 -3
  55. package/dist/builtin/intercom/broker/broker.bundle.mjs +46 -8
  56. package/dist/builtin/intercom/broker/broker.ts +1 -0
  57. package/dist/builtin/intercom/broker/client.ts +5 -1
  58. package/dist/builtin/intercom/broker/departed-children.ts +12 -6
  59. package/dist/builtin/intercom/broker/ended-child-wakes.ts +2 -0
  60. package/dist/builtin/intercom/index.bundle.mjs +130 -264
  61. package/dist/builtin/intercom/message-display.ts +42 -0
  62. package/dist/builtin/intercom/package.json +1 -1
  63. package/dist/builtin/intercom/types.ts +1 -0
  64. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  65. package/dist/builtin/mcp/package.json +1 -1
  66. package/dist/builtin/subagents/package.json +1 -1
  67. package/dist/builtin/subagents/src/extension/index.bundle.mjs +99 -20
  68. package/dist/builtin/web-access/index.bundle.mjs +15 -9
  69. package/dist/builtin/web-access/package.json +1 -1
  70. package/dist/cli/args.js +2 -2
  71. package/dist/cli/auth-cli.code.js +6 -6
  72. package/dist/cli/auth-cli.impl.js +3 -3
  73. package/dist/cli/auth-cli.js +3 -3
  74. package/dist/cli/blueprint-command.code.js +4 -4
  75. package/dist/cli/blueprint-command.impl.js +3 -3
  76. package/dist/cli/blueprint-command.js +3 -3
  77. package/dist/cli/intercom-command.code.js +3 -3
  78. package/dist/cli/intercom-command.impl.js +3 -3
  79. package/dist/cli/intercom-command.js +3 -3
  80. package/dist/cli/list-models.code.js +3 -3
  81. package/dist/cli/list-models.impl.js +3 -3
  82. package/dist/cli/list-models.js +3 -3
  83. package/dist/cli/session-picker.code.js +2 -2
  84. package/dist/cli/session-picker.impl.js +3 -3
  85. package/dist/cli/session-picker.js +3 -3
  86. package/dist/cli/startup-ui.code.js +2 -2
  87. package/dist/cli/startup-ui.impl.js +3 -3
  88. package/dist/cli/startup-ui.js +3 -3
  89. package/dist/cli/storage-command.impl.js +3 -3
  90. package/dist/cli/storage-command.js +3 -3
  91. package/dist/cli/storage-search-session.code.js +2 -2
  92. package/dist/cli/storage-search-session.impl.js +3 -3
  93. package/dist/cli/storage-search-session.js +3 -3
  94. package/dist/cli/team-command.code.js +2 -2
  95. package/dist/cli/team-command.impl.js +3 -3
  96. package/dist/cli/team-command.js +3 -3
  97. package/dist/cli.js +2 -2
  98. package/dist/core/agent-session-runtime.d.ts +14 -3
  99. package/dist/core/agent-session-types.d.ts +5 -1
  100. package/dist/core/debug.impl.js +3 -3
  101. package/dist/core/debug.js +3 -3
  102. package/dist/core/export-html/card-projection.code.js +74 -72
  103. package/dist/core/export-html/card-projection.code.js.map +1 -1
  104. package/dist/core/export-html/card-projection.impl.js +3 -3
  105. package/dist/core/export-html/card-projection.js +3 -3
  106. package/dist/core/export-html/index.code.js +12 -4
  107. package/dist/core/export-html/index.code.js.map +1 -1
  108. package/dist/core/export-html/index.impl.js +3 -3
  109. package/dist/core/export-html/index.js +3 -3
  110. package/dist/core/export-html/json-spans.impl.js +3 -3
  111. package/dist/core/export-html/json-spans.js +3 -3
  112. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  113. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  114. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  115. package/dist/core/export-html/template.js +24 -23
  116. package/dist/core/export-html/tool-renderer.code.js +1 -1
  117. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  118. package/dist/core/export-html/tool-renderer.js +3 -3
  119. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  120. package/dist/core/extensions/jiti-loader.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  122. package/dist/core/extensions/jiti-static-loader.js +3 -3
  123. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  124. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  125. package/dist/core/extensions/loader-host-modules.js +3 -3
  126. package/dist/core/extensions/loader-virtual-modules.js +2 -2
  127. package/dist/core/extensions/runner-context.js +2 -2
  128. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  129. package/dist/core/intercom-broker-control-host.js +3 -3
  130. package/dist/core/intercom-broker-control.code.js +3 -3
  131. package/dist/core/intercom-broker-control.impl.js +3 -3
  132. package/dist/core/intercom-broker-control.js +3 -3
  133. package/dist/core/model-registry.js +2 -2
  134. package/dist/core/package-manager-storage-adapters.code.js +1 -1
  135. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  136. package/dist/core/package-manager-storage-adapters.js +3 -3
  137. package/dist/core/resume/failure.d.ts +1 -1
  138. package/dist/core/sdk.code.js +4 -4
  139. package/dist/core/sdk.impl.js +3 -3
  140. package/dist/core/sdk.js +3 -3
  141. package/dist/core/session-claims.d.ts +13 -2
  142. package/dist/core/session-load-events.d.ts +42 -0
  143. package/dist/core/session-manager-core.d.ts +13 -2
  144. package/dist/core/session-manager-core.js +211 -98
  145. package/dist/core/session-manager-core.js.map +1 -1
  146. package/dist/core/session-manager-errors.d.ts +2 -2
  147. package/dist/core/session-manager-list.impl.js +3 -3
  148. package/dist/core/session-manager-list.js +3 -3
  149. package/dist/core/session-manager.code.js +1 -1
  150. package/dist/core/session-manager.impl.js +3 -3
  151. package/dist/core/session-manager.js +3 -3
  152. package/dist/core/session-storage.code.js +1 -1
  153. package/dist/core/session-storage.impl.js +3 -3
  154. package/dist/core/session-storage.js +3 -3
  155. package/dist/core/settings-manager.js +2 -2
  156. package/dist/core/storage/index.js +2 -2
  157. package/dist/core/storage/node-sqlite-thread.js +2 -2
  158. package/dist/core/storage/node-sqlite.js +2 -2
  159. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  160. package/dist/core/storage/offline-snapshot-file.js +3 -3
  161. package/dist/core/storage/provider.js +2 -2
  162. package/dist/core/storage/schema-catalog.d.ts +2 -1
  163. package/dist/core/storage/schema-catalog.js +25 -6
  164. package/dist/core/storage/schema-catalog.js.map +1 -1
  165. package/dist/core/storage/selection.js +2 -2
  166. package/dist/core/storage/session/branch-fork-source.code.js +17 -4
  167. package/dist/core/storage/session/branch-fork-source.code.js.map +1 -1
  168. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  169. package/dist/core/storage/session/branch-fork-source.js +3 -3
  170. package/dist/core/storage/session/card-view.impl.js +3 -3
  171. package/dist/core/storage/session/card-view.js +3 -3
  172. package/dist/core/storage/session/child-reader.code.js +3 -3
  173. package/dist/core/storage/session/child-reader.impl.js +3 -3
  174. package/dist/core/storage/session/child-reader.js +3 -3
  175. package/dist/core/storage/session/chunked-resume-projection.code.js +1 -1
  176. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  177. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  178. package/dist/core/storage/session/expanded-child-details.code.js +3 -3
  179. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  180. package/dist/core/storage/session/expanded-child-details.js +3 -3
  181. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  182. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  183. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  184. package/dist/core/storage/session/fork-row-index.js +3 -3
  185. package/dist/core/storage/session/fork-staging.code.js +8 -4
  186. package/dist/core/storage/session/fork-staging.code.js.map +1 -1
  187. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  188. package/dist/core/storage/session/fork-staging.js +3 -3
  189. package/dist/core/storage/session/fork-window.code.js +29 -14
  190. package/dist/core/storage/session/fork-window.code.js.map +1 -1
  191. package/dist/core/storage/session/fork-window.impl.js +3 -3
  192. package/dist/core/storage/session/fork-window.js +3 -3
  193. package/dist/core/storage/session/history-pages.impl.js +3 -3
  194. package/dist/core/storage/session/history-pages.js +3 -3
  195. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  196. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  197. package/dist/core/storage/session/jsonl-session-store.d.ts +8 -4
  198. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  199. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  200. package/dist/core/storage/session/memory-session-store.d.ts +3 -3
  201. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  202. package/dist/core/storage/session/memory-session-store.js +3 -3
  203. package/dist/core/storage/session/parent-links.d.ts +122 -0
  204. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  205. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  206. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  207. package/dist/core/storage/session/released-history-files.code.js +3 -3
  208. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  209. package/dist/core/storage/session/released-history-files.js +3 -3
  210. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  211. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  212. package/dist/core/storage/session/session-resume.impl.js +3 -3
  213. package/dist/core/storage/session/session-resume.js +3 -3
  214. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  215. package/dist/core/storage/session/snapshot-cut.js +3 -3
  216. package/dist/core/storage/session/snapshot-history.code.js +5 -6
  217. package/dist/core/storage/session/snapshot-history.code.js.map +1 -1
  218. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  219. package/dist/core/storage/session/snapshot-history.js +3 -3
  220. package/dist/core/storage/session/sql-session-store.d.ts +4 -3
  221. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  222. package/dist/core/storage/session/sql-session-store.js +3 -3
  223. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  224. package/dist/core/storage/session/tree-outline.js +3 -3
  225. package/dist/core/storage/session/tree-presentation.code.js +1 -1
  226. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  227. package/dist/core/storage/session/tree-presentation.js +3 -3
  228. package/dist/core/storage/session/types.d.ts +9 -3
  229. package/dist/core/storage/session/usage-observations.js +1 -1
  230. package/dist/core/storage/storage-status.impl.js +3 -3
  231. package/dist/core/storage/storage-status.js +3 -3
  232. package/dist/core/storage/team.impl.js +3 -3
  233. package/dist/core/storage/team.js +3 -3
  234. package/dist/core/structured-output/index.impl.js +3 -3
  235. package/dist/core/structured-output/index.js +3 -3
  236. package/dist/core/tasks/task-completion-entry.code.js +1 -1
  237. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  238. package/dist/core/tasks/task-completion-entry.js +3 -3
  239. package/dist/core/tasks/task-file-history.code.js +3 -3
  240. package/dist/core/tasks/task-file-history.impl.js +3 -3
  241. package/dist/core/tasks/task-file-history.js +3 -3
  242. package/dist/core/tasks/task-reference-archive.code.js +5 -5
  243. package/dist/core/tasks/task-reference-archive.js +3 -3
  244. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  245. package/dist/core/tasks/task-reference-identity.js +3 -3
  246. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  247. package/dist/core/tasks/task-reference-stream.js +3 -3
  248. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  249. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  250. package/dist/core/tasks/task-view-source.code.js +1 -1
  251. package/dist/core/tasks/task-view-source.impl.js +3 -3
  252. package/dist/core/tasks/task-view-source.js +3 -3
  253. package/dist/core/tools/read-url.code.js +3 -3
  254. package/dist/core/tools/read-url.impl.js +3 -3
  255. package/dist/core/tools/read-url.js +3 -3
  256. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  257. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  258. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  259. package/dist/core/worktree-snapshot/errors.js +3 -3
  260. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  261. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  262. package/dist/extensions/codemode/execute.code.js +2 -2
  263. package/dist/extensions/codemode/execute.impl.js +3 -3
  264. package/dist/extensions/codemode/execute.js +3 -3
  265. package/dist/extensions/codemode/renderer.code.js +12 -7
  266. package/dist/extensions/codemode/renderer.code.js.map +1 -1
  267. package/dist/extensions/codemode/renderer.impl.js +3 -3
  268. package/dist/extensions/codemode/renderer.js +3 -3
  269. package/dist/extensions/mcp/cli.code.js +2 -2
  270. package/dist/extensions/mcp/cli.impl.js +3 -3
  271. package/dist/extensions/mcp/cli.js +3 -3
  272. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  273. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  274. package/dist/extensions/mcp/cli.lazy.js +3 -3
  275. package/dist/extensions/mcp/runtime.impl.js +3 -3
  276. package/dist/extensions/mcp/runtime.js +3 -3
  277. package/dist/index.d.ts +5 -2
  278. package/dist/index.js +7 -7
  279. package/dist/main-first-time-setup.code.js +2 -2
  280. package/dist/main-first-time-setup.impl.js +3 -3
  281. package/dist/main-first-time-setup.js +3 -3
  282. package/dist/main.js +1 -1
  283. package/dist/modes/index.d.ts +1 -1
  284. package/dist/modes/interactive/components/intercom-wake-notice.d.ts +4 -0
  285. package/dist/modes/interactive/components/notice-line.d.ts +1 -1
  286. package/dist/modes/interactive/components/stored-tree-view.code.js +6 -5
  287. package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -1
  288. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  289. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  290. package/dist/modes/interactive/components/tool-block.d.ts +5 -1
  291. package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
  292. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  293. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  294. package/dist/modes/interactive-engine/isolated-runtime.d.ts +3 -3
  295. package/dist/modes/interactive-engine/protocol.d.ts +0 -4
  296. package/dist/modes/rpc/rpc-client-api.d.ts +5 -0
  297. package/dist/modes/rpc/rpc-types.d.ts +23 -5
  298. package/dist/package-manager-cli.code.js +7 -7
  299. package/dist/package-manager-cli.impl.js +3 -3
  300. package/dist/package-manager-cli.js +3 -3
  301. package/dist/rpc-entry.js +1 -1
  302. package/dist/startup-files.json +1 -1
  303. package/dist/startup-stages/10.js +1 -1
  304. package/dist/startup-stages/12.js +1 -1
  305. package/dist/startup-stages/13.js +2 -1
  306. package/dist/startup-stages/14.js +1 -0
  307. package/dist/startup-stages/4.js +1 -1
  308. package/dist/startup-stages/6.js +1 -1
  309. package/dist/startup-stages/7.js +1 -1
  310. package/dist/startup-stages/8.js +1 -1
  311. package/dist/startup-stages/stages.json +1 -1
  312. package/dist/utils/startup-database-spare.code.js +3 -3
  313. package/dist/utils/startup-database-spare.impl.js +3 -3
  314. package/dist/utils/startup-database-spare.js +3 -3
  315. package/dist/utils/tools-manager.code.js +1 -1
  316. package/dist/utils/tools-manager.impl.js +3 -3
  317. package/dist/utils/tools-manager.js +3 -3
  318. package/docs/.agents/context/DESIGN.md +30 -0
  319. package/docs/changelog.mdx +23 -0
  320. package/docs/docs.json +1 -1
  321. package/docs/guides/subscription-usage.md +3 -3
  322. package/docs/intercom.md +3 -1
  323. package/docs/json.md +3 -3
  324. package/docs/providers.md +2 -0
  325. package/docs/rpc/protocol.md +1 -1
  326. package/docs/sdk.md +2 -0
  327. package/docs/sessions.md +36 -1
  328. package/docs/subagents.md +2 -0
  329. package/package.json +8 -8
  330. package/dist/_shared/startup-0-0-FPPQF42L.js.map +0 -1
  331. package/dist/_shared/startup-0-1-Q7GBLBEL.js.map +0 -1
  332. package/dist/_shared/startup-0-2-JNYN24UI.js.map +0 -1
  333. package/dist/_shared/startup-0-4-ZZXFKE55.js.map +0 -1
  334. package/dist/_shared/startup-0-5-WN2IYA25.js.map +0 -1
  335. package/dist/_shared/startup-8-1-QZMXUGHI.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { __commonJSMin, __name, __require, __toESM } from "./rolldown-runtime-BGM3D5V3.js";
2
2
  import { APP_NAME, BUILTIN_PACKAGE_DIR_NAMES, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_DEBUG, ENV_OFFLINE, ENV_PACKAGE_DIR, ENV_SELF_UPDATE_COMMAND, ENV_SESSION_DIR, ENV_SHARE_VIEWER_URL, ENV_STDIN_TIMEOUT_MS, ENV_TELEMETRY, INSTALLED_EXTENSION_ENTRIES, SOURCE_EXTENSION_ENTRIES, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getEnvValue, getPackageDir, helperLaunchAsync, isBunBinary, isBundledBuild, isChildProcessExitStatusUnknownError, missingHelperOptions, resolvePath, stripBom, waitForChildProcess } from "./p0-cli-BB45ZQY6.js";
3
- import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, canWatchProcessUntilHostDies, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, clearLockHolderAsync, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isPathInside, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, joinForkSegments, leadingAndTrailingWs, leadingWs, lockNamesLocalHolder, lockShared, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, normalizeVtText, parseTranscriptFrameLayout, raceWithAbortSignal, recordLockHolderAsync, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, requestRateLimitsFromHeaders, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, segmentLength, setFunctionList, setHistoryLoadObserverLookup, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, takeOverDeadHolderAsync, toError, trailingWs, uniquifyToolCallIds, usageWindowsFromCodexEvent, usageWindowsFromHeaders, validQuestionnaire, watchProcessUntilHostDies, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-FPPQF42L.js";
3
+ import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, canWatchProcessUntilHostDies, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, clearLockHolderAsync, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isPathInside, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, joinForkSegments, leadingAndTrailingWs, leadingWs, lockNamesLocalHolder, lockShared, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, normalizeVtText, parseTranscriptFrameLayout, raceWithAbortSignal, recordLockHolderAsync, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, requestRateLimitsFromHeaders, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, segmentLength, setFunctionList, setHistoryLoadObserverLookup, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, takeOverDeadHolderAsync, toError, trailingWs, uniquifyToolCallIds, usageWindowsFromCodexEvent, usageWindowsFromHeaders, validQuestionnaire, watchProcessUntilHostDies, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-OWBJIX35.js";
4
4
  import { CodeHighlighter, OVERLAY_ACTIVE_ROW_MARKER, getLanguageFromPath, graphemeAt, highlightCode, keyHint, loadPhoton, navActionText, navFirstKeyText, parenthesizedKeyHint, rawKeyHint, renderNavHintLine, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme } from "./p2-shell-main-B2WIALFD.js";
5
5
  import { extractBearerToken, failureDebugFields, findInCauseChain, hasErrorIdentity, lockHolderAsync, releaseLock, removeLeftoverHolderFilesAsync, reportDebugAsync, serializeErrorCause, takeTakeoverMutexAsync } from "./p1b-elig-BY2G5BUE.js";
6
6
  import { windowsPowerShellEnvironment } from "./p1-elig-shell-WWRO3L2R.js";
@@ -3190,6 +3190,310 @@ var SessionKeyDigests = class {
3190
3190
  return this.packed().toString("base64");
3191
3191
  }
3192
3192
  };
3193
+ // dist/core/storage/session/parent-links.js
3194
+ /** An explicit root and a genuinely omitted receipt parent are not damage. */
3195
+ function parentLinkDisposition(entry, parentWasEarlier, parentIsKnown) {
3196
+ if (entry.parentId == null) return "root";
3197
+ if (entry.parentId === entry.id) return "broken";
3198
+ if (parentWasEarlier) return "earlier";
3199
+ return !parentIsKnown && isDetachedReceipt(entry) ? "detached" : "broken";
3200
+ }
3201
+ var SessionInvalidParentError = class extends Error {
3202
+ entryId;
3203
+ parentId;
3204
+ reason;
3205
+ constructor(entryId, parentId, reason) {
3206
+ const explanation = reason === "self" ? "an entry cannot be its own parent" : reason === "later" ? "the parent was recorded later" : "no entry with this ID exists in the session";
3207
+ super(`Damaged history link on entry ${JSON.stringify(entryId)}: parent ${JSON.stringify(parentId)}; ${explanation}.`);
3208
+ this.name = "SessionInvalidParentError";
3209
+ this.entryId = entryId;
3210
+ this.parentId = parentId;
3211
+ this.reason = reason;
3212
+ }
3213
+ };
3214
+ /** A trimmed fork may copy a tool-output receipt but leave its original parent behind. */
3215
+ function isDetachedReceipt(entry) {
3216
+ if (entry.type !== "custom" || entry.customType !== "atomic.tool-output") return false;
3217
+ const hash = entry.data?.hash;
3218
+ return typeof hash === "string" && /^[0-9a-f]{64}$/.test(hash);
3219
+ }
3220
+ function invalidSessionParent(entry, position, parentPosition) {
3221
+ const { id, parentId } = entry;
3222
+ if (parentId === null || parentLinkDisposition(entry, isEarlierSessionEntry(parentPosition, position), parentPosition !== void 0) !== "broken") return void 0;
3223
+ if (parentId === id) return new SessionInvalidParentError(id, parentId, "self");
3224
+ return new SessionInvalidParentError(id, parentId, parentPosition === void 0 ? "absent" : "later");
3225
+ }
3226
+ var SessionDuplicateEntryError = class extends Error {
3227
+ entryId;
3228
+ constructor(entryId) {
3229
+ super(`Duplicate history entry ID ${JSON.stringify(entryId)} in the same session.`);
3230
+ this.name = "SessionDuplicateEntryError";
3231
+ this.entryId = entryId;
3232
+ }
3233
+ };
3234
+ function describeSessionParentRepairs(repaired) {
3235
+ if (repaired.length === 0) return void 0;
3236
+ const changes = repaired.map((repair) => {
3237
+ const entry = `${repair.source === "file" ? "imported " : repair.source === "storage" ? "saved " : ""}${JSON.stringify(repair.sessionId)} entry ${JSON.stringify(repair.entryId)}`;
3238
+ if (repair.kind === "entry_id") return `${entry} (changed ID to ${JSON.stringify(repair.newEntryId)})`;
3239
+ return repair.newParentId === null ? `${entry} (removed broken parent ${JSON.stringify(repair.parentId)} from the first entry)` : `${entry} (reattached to ${JSON.stringify(repair.newParentId)} instead of ${JSON.stringify(repair.parentId)})`;
3240
+ });
3241
+ return `Repaired ${changes.length} history ${changes.length === 1 ? "problem" : "problems"}: ${changes.join(", ")}.`;
3242
+ }
3243
+ function newSessionEntryPositions(entries, after = 0) {
3244
+ const positions = /* @__PURE__ */ new Map();
3245
+ for (const { id } of entries) {
3246
+ if (positions.has(id)) throw new SessionDuplicateEntryError(id);
3247
+ positions.set(id, ++after);
3248
+ }
3249
+ return positions;
3250
+ }
3251
+ const noEntry = (_id) => void 0;
3252
+ const noDetachedParents = /* @__PURE__ */ new Map();
3253
+ function assertWriteParent(parentId) {
3254
+ if (parentId !== null && typeof parentId !== "string") throw new TypeError("Session entry parentId must be a string or null.");
3255
+ }
3256
+ /** Check a batch against its session's recorded cut, returning only the newly reserved IDs. */
3257
+ function validateSessionParentWrites(entries, after = 0, seqOf = noEntry, detachedParents = noDetachedParents) {
3258
+ const positions = newSessionEntryPositions(entries, after);
3259
+ for (const id of positions.keys()) {
3260
+ if (seqOf(id) !== void 0) throw new SessionDuplicateEntryError(id);
3261
+ const detached = detachedParents.get(id);
3262
+ if (detached !== void 0) throw new SessionInvalidParentError(detached, id, "later");
3263
+ }
3264
+ let reserved;
3265
+ for (const [index, entry] of entries.entries()) {
3266
+ const { id, parentId } = entry;
3267
+ assertWriteParent(parentId);
3268
+ if (parentId === null) continue;
3269
+ const parent = positions.get(parentId) ?? seqOf(parentId);
3270
+ const error = invalidSessionParent(entry, after + index + 1, parent);
3271
+ if (error !== void 0) throw error;
3272
+ if (parent === void 0) {
3273
+ reserved ??= /* @__PURE__ */ new Map();
3274
+ reserved.set(parentId, id);
3275
+ }
3276
+ }
3277
+ return reserved;
3278
+ }
3279
+ /** The facts a file-backed writer needs from the recorded rows, including ones an older client wrote. */
3280
+ var SessionParentIndex = class {
3281
+ positions = /* @__PURE__ */ new Map();
3282
+ detached = /* @__PURE__ */ new Map();
3283
+ constructor(entries = []) {
3284
+ for (const [index, entry] of entries.entries()) this.note(entry, index + 1);
3285
+ }
3286
+ note({ id, parentId }, seq, previous) {
3287
+ this.detached.delete(id);
3288
+ this.positions.set(id, seq);
3289
+ if (parentId != null && !this.positions.has(parentId) && !previous?.has(parentId)) this.detached.set(parentId, id);
3290
+ }
3291
+ };
3292
+ /** Resolve raw IDs in recorded order, before replacing them with their unique stored addresses. */
3293
+ var SessionParentRepairer = class {
3294
+ repaired = [];
3295
+ latest = /* @__PURE__ */ new Map();
3296
+ taken = /* @__PURE__ */ new Set();
3297
+ detached = /* @__PURE__ */ new Set();
3298
+ sessionId;
3299
+ seenBefore;
3300
+ previouslyDetached;
3301
+ incoming;
3302
+ reserved;
3303
+ previousId;
3304
+ constructor(sessionId, seqOf = noEntry, detached = noDetachedParents, incoming, reserved, previousId = null) {
3305
+ this.sessionId = sessionId;
3306
+ this.seenBefore = seqOf;
3307
+ this.previouslyDetached = detached;
3308
+ this.incoming = incoming;
3309
+ this.reserved = reserved;
3310
+ this.previousId = previousId;
3311
+ }
3312
+ repair(entry, seq, parentRecordedLater) {
3313
+ let { id, parentId } = entry;
3314
+ assertWriteParent(parentId);
3315
+ if (this.inUse(id)) {
3316
+ for (let attempt = 0;; attempt++) {
3317
+ const digest = (0, import_sha256.hash)(new TextEncoder().encode(JSON.stringify([
3318
+ id,
3319
+ seq,
3320
+ attempt
3321
+ ])));
3322
+ const fresh = `repair-${Array.from(digest.subarray(0, 16), (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
3323
+ if (this.incoming?.has(fresh) || this.reserved?.has(fresh) || this.inUse(fresh)) continue;
3324
+ id = fresh;
3325
+ break;
3326
+ }
3327
+ this.repaired.push({
3328
+ kind: "entry_id",
3329
+ sessionId: this.sessionId,
3330
+ entryId: entry.id,
3331
+ newEntryId: id
3332
+ });
3333
+ }
3334
+ if (parentId !== null) {
3335
+ const parent = this.latest.get(parentId) ?? (this.seenBefore(parentId) === void 0 ? void 0 : parentId);
3336
+ switch (parentLinkDisposition(entry, parent !== void 0, parent !== void 0 || parentRecordedLater === true || this.incoming?.has(parentId) === true)) {
3337
+ case "detached":
3338
+ this.detached.add(parentId);
3339
+ break;
3340
+ case "earlier":
3341
+ parentId = parent;
3342
+ break;
3343
+ case "broken": parentId = this.previousId;
3344
+ }
3345
+ if (entry.parentId !== parentId) this.repaired.push({
3346
+ kind: "parent",
3347
+ sessionId: this.sessionId,
3348
+ entryId: id,
3349
+ parentId: entry.parentId,
3350
+ newParentId: parentId
3351
+ });
3352
+ }
3353
+ this.latest.set(entry.id, id);
3354
+ this.taken.add(id);
3355
+ this.previousId = id;
3356
+ return id === entry.id && parentId === entry.parentId ? entry : {
3357
+ ...entry,
3358
+ id,
3359
+ parentId
3360
+ };
3361
+ }
3362
+ inUse(id) {
3363
+ return this.taken.has(id) || this.detached.has(id) || this.previouslyDetached.get(id) !== void 0 || this.seenBefore(id) !== void 0;
3364
+ }
3365
+ };
3366
+ function repairSessionParentWrites(sessionId, entries) {
3367
+ return repairParentBatch(sessionId, entries);
3368
+ }
3369
+ /** An append must supply its recorded prefix, including the predecessor of its first row. */
3370
+ function repairAppendedSessionParents(sessionId, entries, prefix) {
3371
+ return repairParentBatch(sessionId, entries, prefix);
3372
+ }
3373
+ function repairParentBatch(sessionId, entries, prefix) {
3374
+ const after = prefix?.lastSeq ?? 0;
3375
+ const seqOf = prefix?.seqOf ?? noEntry;
3376
+ const detachedParents = prefix?.detachedParents ?? noDetachedParents;
3377
+ try {
3378
+ validateSessionParentWrites(entries, after, seqOf, detachedParents);
3379
+ return {
3380
+ entries,
3381
+ repaired: []
3382
+ };
3383
+ } catch (error) {
3384
+ if (!(error instanceof SessionInvalidParentError || error instanceof SessionDuplicateEntryError)) throw error;
3385
+ }
3386
+ const repairer = new SessionParentRepairer(sessionId, seqOf, detachedParents, new Set(entries.map(({ id }) => id)), new Set(entries.flatMap(({ parentId }) => parentId === null ? [] : [parentId])), prefix === void 0 ? null : prefix.lastEntryId);
3387
+ return {
3388
+ entries: entries.map((entry, index) => repairer.repair(entry, after + index + 1)),
3389
+ repaired: repairer.repaired
3390
+ };
3391
+ }
3392
+ const prepareImportedSessionParents = repairSessionParentWrites;
3393
+ function repairedWriteResult(result) {
3394
+ return result.repaired.length === 0 ? {} : result;
3395
+ }
3396
+ /** A repair of copied bytes replaces their link fields, not their potentially oversized payload. */
3397
+ function pairedForkEntry(row, entry) {
3398
+ if (row.entry === entry) return row;
3399
+ return {
3400
+ ...row,
3401
+ entry,
3402
+ stored: void 0,
3403
+ ...row.reference === void 0 ? {} : { edits: {
3404
+ ...row.edits,
3405
+ id: entry.id,
3406
+ parentId: entry.parentId
3407
+ } }
3408
+ };
3409
+ }
3410
+ /** Only an entry recorded before its child can be a parent. Zero is the position before the first entry. */
3411
+ function isEarlierSessionEntry(parent, child) {
3412
+ return parent !== void 0 && parent > 0 && parent < child;
3413
+ }
3414
+ /** Next address in a reverse scan. The scan itself can only match it on an earlier row. */
3415
+ function parentIdInEarlierRows(entry) {
3416
+ return entry.parentId !== entry.id ? entry.parentId ?? null : null;
3417
+ }
3418
+ /** Track receipts that are detached only if the rest of the recorded history never names their parent. */
3419
+ var LaterSessionParents = class {
3420
+ pending;
3421
+ note(parentId, seq) {
3422
+ this.pending ??= /* @__PURE__ */ new Map();
3423
+ const rows = this.pending.get(parentId);
3424
+ if (rows === void 0) this.pending.set(parentId, [seq]);
3425
+ else rows.push(seq);
3426
+ }
3427
+ found(id) {
3428
+ const rows = this.pending?.get(id);
3429
+ if (rows !== void 0) this.pending.delete(id);
3430
+ return rows;
3431
+ }
3432
+ };
3433
+ function sessionEntryPositions(entries) {
3434
+ const positions = /* @__PURE__ */ new Map();
3435
+ let position = 0;
3436
+ for (const { id } of entries) positions.set(id, ++position);
3437
+ return positions;
3438
+ }
3439
+ /** Each row records the latest matching row that has already occurred, never a duplicate later in the file. */
3440
+ function recordedSessionParents(entries) {
3441
+ const positions = /* @__PURE__ */ new Map();
3442
+ let allPositions;
3443
+ let damaged = false;
3444
+ const parents = [];
3445
+ for (const [index, entry] of entries.entries()) {
3446
+ const { id, parentId } = entry;
3447
+ const earlier = parentId == null ? void 0 : positions.get(parentId);
3448
+ let known = earlier !== void 0;
3449
+ if (!known && parentId != null && isDetachedReceipt(entry)) {
3450
+ allPositions ??= sessionEntryPositions(entries);
3451
+ known = allPositions.has(parentId);
3452
+ }
3453
+ const link = parentLinkDisposition(entry, earlier !== void 0, known);
3454
+ parents.push(link === "earlier" ? earlier : link === "broken" ? index : 0);
3455
+ damaged ||= link === "broken" || positions.has(id);
3456
+ positions.set(id, index + 1);
3457
+ }
3458
+ return {
3459
+ positions,
3460
+ parents,
3461
+ damaged
3462
+ };
3463
+ }
3464
+ function recordedSessionBranch(entries, leafId) {
3465
+ const { positions, parents } = recordedSessionParents(entries);
3466
+ const branch = [];
3467
+ for (let seq = positions.get(leafId) ?? 0; seq > 0; seq = parents[seq - 1]) branch.push(entries[seq - 1]);
3468
+ return branch.reverse();
3469
+ }
3470
+ function sessionParent(entry, getEntry, positionOf, link, entryAt) {
3471
+ const child = positionOf(entry.id);
3472
+ if (child === void 0) return void 0;
3473
+ const parent = entry.parentId == null ? void 0 : getEntry(entry.parentId);
3474
+ const disposition = parentLinkDisposition(entry, parent !== void 0 && isEarlierSessionEntry(positionOf(parent.id), child), parent !== void 0);
3475
+ if (disposition === "earlier") return parent;
3476
+ if (link !== void 0 && isEarlierSessionEntry(positionOf(link), child)) return getEntry(link);
3477
+ return disposition === "broken" ? entryAt?.(child - 1) : void 0;
3478
+ }
3479
+ /** The position decreases strictly on each step, so each recorded entry is visited at most once. */
3480
+ function* walkSessionParents(first, getEntry, positionOf, links, entryAt) {
3481
+ for (let entry = first; entry !== void 0; entry = sessionParent(entry, getEntry, positionOf, links?.get(entry.id), entryAt)) yield entry;
3482
+ }
3483
+ function hasDamagedHistoryLinks(entries) {
3484
+ return recordedSessionParents(entries).damaged;
3485
+ }
3486
+ function damagedHistoryWarning(sessionId) {
3487
+ return {
3488
+ type: "session_history_warning",
3489
+ code: "damaged_parent_links",
3490
+ sessionId,
3491
+ warningMessage: `Session ${sessionId} has damaged history links. Entries with broken links are shown after the entries recorded just before them.`
3492
+ };
3493
+ }
3494
+ function warnDamagedHistoryLinks(sessionId) {
3495
+ process.emitWarning(damagedHistoryWarning(sessionId).warningMessage, { code: "ATOMIC_SESSION_HISTORY_LINKS" });
3496
+ }
3193
3497
  // dist/core/workspace/errors.js
3194
3498
  /**
3195
3499
  * The workspace error family: worktree snapshot capture, restore and drift (#4245), snapshot blob collection (#4355),
@@ -15863,6 +16167,18 @@ function openEventSubscription(input) {
15863
16167
  }
15864
16168
  };
15865
16169
  }
16170
+ // dist/core/session-history-progress.js
16171
+ const observer = asyncScope();
16172
+ setHistoryLoadObserverLookup(() => observer.getStore()?.current);
16173
+ /** Keeps a foreground session load from displaying counts from concurrent background reads. */
16174
+ async function withHistoryLoadObserver(next, run) {
16175
+ const scope = { current: next };
16176
+ try {
16177
+ return await observer.run(scope, run);
16178
+ } finally {
16179
+ scope.current = void 0;
16180
+ }
16181
+ }
15866
16182
  // dist/extensions/llama/client.js
15867
16183
  function errorMessage(payload, fallback) {
15868
16184
  if (typeof payload !== "object" || payload === null) return fallback;
@@ -18581,13 +18897,6 @@ function getClientIdentity(settingsManager) {
18581
18897
  attribution: isInstallTelemetryEnabled(settingsManager) ? ATOMIC_ATTRIBUTION : null
18582
18898
  };
18583
18899
  }
18584
- // dist/core/session-history-progress.js
18585
- const observer = new AsyncLocalStorage();
18586
- setHistoryLoadObserverLookup(() => observer.getStore());
18587
- /** Keeps a foreground session load from displaying counts from concurrent background reads. */
18588
- function withHistoryLoadObserver(next, run) {
18589
- return observer.run(next, run);
18590
- }
18591
18900
  // dist/main-stdio.js
18592
18901
  /** How long a run waits for the first piped byte, or the end of stdin, by default. */
18593
18902
  const DEFAULT_STDIN_TIMEOUT_MS = 2e3;
@@ -19484,11 +19793,6 @@ function parseInteractiveEngineMessage(line) {
19484
19793
  requestId: value.requestId,
19485
19794
  command: value.command
19486
19795
  } : void 0;
19487
- case "engine_session_load_progress": return typeof value.requestId === "string" && typeof value.message === "string" ? {
19488
- type: value.type,
19489
- requestId: value.requestId,
19490
- message: value.message
19491
- } : void 0;
19492
19796
  case "engine_custom_open": return typeof value.componentId === "string" && typeof value.overlay === "boolean" ? {
19493
19797
  type: value.type,
19494
19798
  componentId: value.componentId,
@@ -20310,16 +20614,16 @@ var ChildCatalog = class ChildCatalog {
20310
20614
  function sessionScratchDir(agentDir, cwd, _sessionId) {
20311
20615
  return getDefaultSessionDirPath(cwd, agentDir);
20312
20616
  }
20313
- export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, UsageObservationStore, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecords, assertSessionBlobStore, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, blueprintDigest, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, classifyCompactionModel, cleanupFailureSummary, codexAccountId, collectAgentTasks, collectCommandDeliveries, collectExtensionPackageWarnings, collectFlags, collectMarkdownTransformers, collectPackageInstallWarnings, collectRegisteredTools, collectSettingsDiagnostics, columnWidths, compareCreated, compareFrozen, computeFocusedOptionHasPreview, conflictEntries, convertImageBytesToPng, convertToLlm, convertToLlmWithForkBoundaries, convertToPng, copyRegistrations, copySessionBlobs, createAccumulator, createBranchSummaryMessage, createCustomMessage, createInvocationBindings, createLazyBuiltinFactory, createManagedTaskClocks, createProviderAlias, createSessionHistoryToolDefinition, createSkillRouter, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, entryLines, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, failedProviderAccount, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findToolDefinition, findWorkspaceError, fixUtf8Stream, flush, forkReplayFilter, forkToolDeclarations, formatAnswerScalar, formatBytes, formatNoUsableModelMessage, formatPackageInstallWarning, formatResumeTimings, formatTokenSegment, formatToolStatus, genBridge, getBuiltinExtensionEntryLabel, getClientIdentity, getCommandEnv, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getLazyBuiltinSpec, getLoaderAgentDirs, getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, initialBindScope, inlineToolOutput, insertForcedOptionsBeforeTerminator, invocationExtension, invocationRuntime, isAgentRehydrateError, isAgentReleaseConfigError, isBashToolResult, isContentFilterRefusal, isEditToolResult, isFindToolResult, isForkHeader, isHeldPromptInput, isInsideInputHook, isJsonValue, isLocalOnlySessionStorage, isLsToolResult, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isPowerShellToolResult, isPresentationHostInput, isProviderCredentialRejection, isReadToolResult, isRetryableAgentRehydrateError, isRetryableModelFailure, isRetryableSameModelFailure, isRetryableWorkspaceError, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isStorageImportIncompleteError, isStorageTransferError, isTaskToolError, isToolCallEventType, isTruthyEnvFlag, isUnrecognizedModelFailure, isVerbatimCompactionMessage, isWorkspaceBindingError, isWorkspaceCollectionError, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspacePublicationError, isWorkspaceRestoreError, isWorkspaceSandboxError, isWorkspaceSnapshotError, isWorkspaceTimeoutError, isWriteToolResult, joinCommandSend, joinCommandTurn, killQuitStoppableCommandsNow, latestLegacyMessageTime, latestResumeTimings, legacyCompletionTarget, lifecycleScopeForOwner, llamaInferenceUrl, loadVirtualModules, loaderHostModulesTestHooks, lockSharedWithHolder, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, observeFailedProviderAccount, observeSubscriptionUsage, observedOpenAiDirectUsage, observedSubscriptionUsage, openAiDirectUsageObserver, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, parseSkillUri, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareRegistrationCallbacks, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerAccount, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLedger, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairOrphanToolResults, reparentedSegments, reportDiagnostics, reportWorktreeLockProgress, repositoryKey, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_trim_comparator_whitespace, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, rootKey, routeKey, routeNamesPrompt, runCallback, runCommandHandler, runInputHook, runSynchronousCallback, runWithProgress, scheduleToolExecution, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, selectReadLinesFromChunks, selectReadLinesFromList, serializeAgentRehydrateError, serializeInteractiveEngineFrame, serializeInteractiveEngineMessage, serializeTodoForAgent, serializeTodoListForAgent, serializeWorkspaceError, sessionBlobHashes, sessionBlobOutput, sessionLifecycleCreation, sessionLifecycleScopes, sessionPosition, sessionScratchDir, setCallbackActivityReporter, setUsageObservationStore, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, skillUri, splitSearchTextParts, splitSegment, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, subscriptionBearer, subscriptionCredentialKey, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, timestamp, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transcriptHeaderLines, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, updateLedger, usageObservationStore, userLikeContentBlockIsLlmVisible, validateEventSource, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, watchHeldPromptAttention, withGitProvisionSettingsForTest, withHistoryLoadObserver, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withWorktreeLockProgress, withoutCarriedToolOutput, withoutSearchPosition, workspaceKey, writeChunksAtomically, writeLinesAtomically, writeRenderers };
20617
+ export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LaterSessionParents, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionDuplicateEntryError, SessionInvalidParentError, SessionKeyDigests, SessionParentIndex, SessionParentRepairer, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, UsageObservationStore, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecords, assertSessionBlobStore, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, blueprintDigest, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, classifyCompactionModel, cleanupFailureSummary, codexAccountId, collectAgentTasks, collectCommandDeliveries, collectExtensionPackageWarnings, collectFlags, collectMarkdownTransformers, collectPackageInstallWarnings, collectRegisteredTools, collectSettingsDiagnostics, columnWidths, compareCreated, compareFrozen, computeFocusedOptionHasPreview, conflictEntries, convertImageBytesToPng, convertToLlm, convertToLlmWithForkBoundaries, convertToPng, copyRegistrations, copySessionBlobs, createAccumulator, createBranchSummaryMessage, createCustomMessage, createInvocationBindings, createLazyBuiltinFactory, createManagedTaskClocks, createProviderAlias, createSessionHistoryToolDefinition, createSkillRouter, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, damagedHistoryWarning, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeSessionParentRepairs, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, entryLines, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, failedProviderAccount, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findToolDefinition, findWorkspaceError, fixUtf8Stream, flush, forkReplayFilter, forkToolDeclarations, formatAnswerScalar, formatBytes, formatNoUsableModelMessage, formatPackageInstallWarning, formatResumeTimings, formatTokenSegment, formatToolStatus, genBridge, getBuiltinExtensionEntryLabel, getClientIdentity, getCommandEnv, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getLazyBuiltinSpec, getLoaderAgentDirs, getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasDamagedHistoryLinks, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, initialBindScope, inlineToolOutput, insertForcedOptionsBeforeTerminator, invocationExtension, invocationRuntime, isAgentRehydrateError, isAgentReleaseConfigError, isBashToolResult, isContentFilterRefusal, isDetachedReceipt, isEarlierSessionEntry, isEditToolResult, isFindToolResult, isForkHeader, isHeldPromptInput, isInsideInputHook, isJsonValue, isLocalOnlySessionStorage, isLsToolResult, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isPowerShellToolResult, isPresentationHostInput, isProviderCredentialRejection, isReadToolResult, isRetryableAgentRehydrateError, isRetryableModelFailure, isRetryableSameModelFailure, isRetryableWorkspaceError, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isStorageImportIncompleteError, isStorageTransferError, isTaskToolError, isToolCallEventType, isTruthyEnvFlag, isUnrecognizedModelFailure, isVerbatimCompactionMessage, isWorkspaceBindingError, isWorkspaceCollectionError, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspacePublicationError, isWorkspaceRestoreError, isWorkspaceSandboxError, isWorkspaceSnapshotError, isWorkspaceTimeoutError, isWriteToolResult, joinCommandSend, joinCommandTurn, killQuitStoppableCommandsNow, latestLegacyMessageTime, latestResumeTimings, legacyCompletionTarget, lifecycleScopeForOwner, llamaInferenceUrl, loadVirtualModules, loaderHostModulesTestHooks, lockSharedWithHolder, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, newSessionEntryPositions, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, observeFailedProviderAccount, observeSubscriptionUsage, observedOpenAiDirectUsage, observedSubscriptionUsage, openAiDirectUsageObserver, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, pairedForkEntry, parentIdInEarlierRows, parentLinkDisposition, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, parseSkillUri, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareImportedSessionParents, prepareRegistrationCallbacks, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerAccount, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLedger, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, recordedSessionBranch, recordedSessionParents, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairAppendedSessionParents, repairOrphanToolResults, repairSessionParentWrites, repairedWriteResult, reparentedSegments, reportDiagnostics, reportWorktreeLockProgress, repositoryKey, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_trim_comparator_whitespace, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, rootKey, routeKey, routeNamesPrompt, runCallback, runCommandHandler, runInputHook, runSynchronousCallback, runWithProgress, scheduleToolExecution, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, selectReadLinesFromChunks, selectReadLinesFromList, serializeAgentRehydrateError, serializeInteractiveEngineFrame, serializeInteractiveEngineMessage, serializeTodoForAgent, serializeTodoListForAgent, serializeWorkspaceError, sessionBlobHashes, sessionBlobOutput, sessionEntryPositions, sessionLifecycleCreation, sessionLifecycleScopes, sessionParent, sessionPosition, sessionScratchDir, setCallbackActivityReporter, setUsageObservationStore, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, skillUri, splitSearchTextParts, splitSegment, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, subscriptionBearer, subscriptionCredentialKey, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, timestamp, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transcriptHeaderLines, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, updateLedger, usageObservationStore, userLikeContentBlockIsLlmVisible, validateEventSource, validateSessionParentWrites, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, walkSessionParents, warnDamagedHistoryLinks, watchHeldPromptAttention, withGitProvisionSettingsForTest, withHistoryLoadObserver, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withWorktreeLockProgress, withoutCarriedToolOutput, withoutSearchPosition, workspaceKey, writeChunksAtomically, writeLinesAtomically, writeRenderers };
20314
20618
 
20315
- //# sourceMappingURL=startup-0-1-Q7GBLBEL.js.map
20619
+ //# sourceMappingURL=startup-0-1-DZYE4E5Z.js.map
20316
20620
  // __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
20317
20621
  // demand that fails in a process an in-place update left running says to restart.
20318
20622
  function __atomicOnDemandFailed(error, feature) {
20319
20623
  return (async () => {
20320
20624
  const root = new URL("../", import.meta.url);
20321
20625
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
20322
- const key = `${root.href}#0.10.20-alpha.1`;
20626
+ const key = `${root.href}#0.10.20-alpha.2`;
20323
20627
  let release = releases.get(key);
20324
20628
  if (release === undefined) {
20325
20629
  const current = (async () => {
@@ -20347,7 +20651,7 @@ function __atomicOnDemandFailed(error, feature) {
20347
20651
  } catch {
20348
20652
  // No installation to read, as in a bundle of the package: the release the process runs decides.
20349
20653
  }
20350
- const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.1" ? installed : running !== undefined && running.version !== "0.10.20-alpha.1" ? "0.10.20-alpha.1" : undefined;
20654
+ const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.2" ? installed : running !== undefined && running.version !== "0.10.20-alpha.2" ? "0.10.20-alpha.2" : undefined;
20351
20655
  if (updatedTo === undefined) throw error;
20352
20656
  const application = typeof running?.name === "string" ? running.name : "atomic";
20353
20657
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {