@bastani/atomic 0.10.5-alpha.1 → 0.10.6-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/_shared/APEv2Parser-APXNTTFS.js.map +1 -1
  4. package/dist/_shared/AsfParser-AP272OWG.js +1 -1
  5. package/dist/_shared/DsfParser-FTOZZCZP.js +2 -2
  6. package/dist/_shared/FlacParser-WJATCQT6.js +2 -2
  7. package/dist/_shared/FlacParser-WJATCQT6.js.map +1 -1
  8. package/dist/_shared/ID3v1Parser-XVX6XPGB.js +1 -1
  9. package/dist/_shared/ID3v2Parser-DB2T4Z6M.js +2 -2
  10. package/dist/_shared/MP4Parser-2TZWZV4K.js +3 -3
  11. package/dist/_shared/MP4Parser-2TZWZV4K.js.map +1 -1
  12. package/dist/_shared/MatroskaParser-V22CGP72.js.map +1 -1
  13. package/dist/_shared/MusepackParser-XEUVYWNQ.js +2 -2
  14. package/dist/_shared/MusepackParser-XEUVYWNQ.js.map +1 -1
  15. package/dist/_shared/OggParser-Y7FSZNTO.js +1 -1
  16. package/dist/_shared/OggParser-Y7FSZNTO.js.map +1 -1
  17. package/dist/_shared/ParseError-VXOGXIIE.js +2 -2
  18. package/dist/_shared/ParseError-VXOGXIIE.js.map +1 -1
  19. package/dist/_shared/WavPackParser-ZYK4CLSW.js +1 -1
  20. package/dist/_shared/WaveParser-VA3P7P3H.js +2 -2
  21. package/dist/_shared/dist-KOELCESV.js +55 -63
  22. package/dist/_shared/dist-KOELCESV.js.map +1 -1
  23. package/dist/_shared/fork-row-index-UAUAQRD5.js +3 -3
  24. package/dist/_shared/full.umd-CBF7UGXV.js +7 -6
  25. package/dist/_shared/full.umd-CBF7UGXV.js.map +1 -1
  26. package/dist/_shared/http-YFAPTIZD.js +2 -2
  27. package/dist/_shared/http-YFAPTIZD.js.map +1 -1
  28. package/dist/_shared/http-undici-FVPTZA4G.js +19 -20
  29. package/dist/_shared/http-undici-FVPTZA4G.js.map +1 -1
  30. package/dist/_shared/lib-4PES5P4V.js +8 -8
  31. package/dist/_shared/lib-4PES5P4V.js.map +1 -1
  32. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +5 -4
  33. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  34. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +20 -20
  35. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  36. package/dist/_shared/mode-shared-2QJSCUM6.js +441 -341
  37. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  38. package/dist/_shared/p0-cli-BB45ZQY6.js +8 -12
  39. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  40. package/dist/_shared/p1a-prewarm-UQY3X2UK.js +8 -8
  41. package/dist/_shared/p1b-elig-ENCUPKKJ.js +17 -17
  42. package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -1
  43. package/dist/_shared/p2-shell-TJBYQMCJ.js +27 -28
  44. package/dist/_shared/p2-shell-TJBYQMCJ.js.map +1 -1
  45. package/dist/_shared/p2-shell-main-B2WIALFD.js +44 -47
  46. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  47. package/dist/_shared/rolldown-runtime-BGM3D5V3.js +4 -4
  48. package/dist/_shared/runtime-O4KCSG4C.js +7 -7
  49. package/dist/_shared/runtime-O4KCSG4C.js.map +1 -1
  50. package/dist/_shared/sdk-WQIOHVKO.js +24 -24
  51. package/dist/_shared/sdk-WQIOHVKO.js.map +1 -1
  52. package/dist/_shared/session-data-AHTU7IS6.js +4 -4
  53. package/dist/_shared/session-manager-list-2BLEEZVG.js +3 -3
  54. package/dist/_shared/{settings-startup-65YEWRV2.js → settings-startup-4QCVCI53.js} +2 -32
  55. package/dist/_shared/settings-startup-4QCVCI53.js.map +1 -0
  56. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +35 -0
  57. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -0
  58. package/dist/_shared/sql-session-store-5FD3WBMZ.js +12 -12
  59. package/dist/_shared/startup-0-0-TYUFUOJZ.js +143 -115
  60. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -1
  61. package/dist/_shared/{startup-0-1-D4LGGINF.js → startup-0-1-W2G2UY7R.js} +365 -27
  62. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +1 -0
  63. package/dist/_shared/startup-0-2-SZGQIWHI.js +19 -24
  64. package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -1
  65. package/dist/_shared/startup-0-3-T4DVFYWX.js +7 -7
  66. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  67. package/dist/_shared/startup-0-4-HN5EB4K7.js +7 -7
  68. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
  69. package/dist/_shared/startup-0-5-OHJNE6JH.js +157 -92
  70. package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
  71. package/dist/_shared/startup-10-0-TDQNBDDL.js +4 -4
  72. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
  73. package/dist/_shared/startup-14-0-MLX36RBG.js +19 -19
  74. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  75. package/dist/_shared/startup-15-0-YUKGAC63.js +17 -16
  76. package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
  77. package/dist/_shared/startup-15-1-4S7FLMNG.js +5 -5
  78. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  79. package/dist/_shared/startup-8-0-34CBHPZH.js +23 -23
  80. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  81. package/dist/_shared/startup-8-1-SJW2GMAM.js +113 -114
  82. package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -1
  83. package/dist/_shared/storage-command-7MGXLJGZ.js +15 -14
  84. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  85. package/dist/_shared/task-reference-stream-JWMUZSJX.js +7 -7
  86. package/dist/_shared/task-reference-stream-JWMUZSJX.js.map +1 -1
  87. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  88. package/dist/_shared/tree-outline-MUEPK5B7.js +4 -4
  89. package/dist/_shared/turndown.cjs-7Z43JOED.js +7 -10
  90. package/dist/_shared/turndown.cjs-7Z43JOED.js.map +1 -1
  91. package/dist/builtin/intercom/CHANGELOG.md +27 -0
  92. package/dist/builtin/intercom/index.bundle.mjs +2 -2
  93. package/dist/builtin/intercom/package.json +1 -1
  94. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  95. package/dist/builtin/mcp/package.json +1 -1
  96. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  97. package/dist/builtin/subagents/package.json +1 -1
  98. package/dist/builtin/subagents/src/extension/index.bundle.mjs +15 -12
  99. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  100. package/dist/builtin/web-access/package.json +1 -1
  101. package/dist/cli/args.js +1 -1
  102. package/dist/cli/auth-cli.code.js +10 -13
  103. package/dist/cli/auth-cli.code.js.map +1 -1
  104. package/dist/cli/auth-cli.impl.js +3 -3
  105. package/dist/cli/auth-cli.js +3 -3
  106. package/dist/cli/blueprint-command.code.js +8 -8
  107. package/dist/cli/blueprint-command.impl.js +3 -3
  108. package/dist/cli/blueprint-command.js +3 -3
  109. package/dist/cli/intercom-command.code.js +2 -2
  110. package/dist/cli/intercom-command.impl.js +3 -3
  111. package/dist/cli/intercom-command.js +3 -3
  112. package/dist/cli/list-models.code.js +3 -3
  113. package/dist/cli/list-models.impl.js +3 -3
  114. package/dist/cli/list-models.js +3 -3
  115. package/dist/cli/session-picker.code.js +3 -3
  116. package/dist/cli/session-picker.impl.js +3 -3
  117. package/dist/cli/session-picker.js +3 -3
  118. package/dist/cli/settings-startup.js +1 -1
  119. package/dist/cli/startup-ui.impl.js +3 -3
  120. package/dist/cli/startup-ui.js +3 -3
  121. package/dist/cli/storage-command.impl.js +3 -3
  122. package/dist/cli/storage-command.js +3 -3
  123. package/dist/cli/storage-search-session.code.js +4 -4
  124. package/dist/cli/storage-search-session.impl.js +3 -3
  125. package/dist/cli/storage-search-session.js +3 -3
  126. package/dist/cli/team-command.code.js +3 -3
  127. package/dist/cli/team-command.impl.js +3 -3
  128. package/dist/cli/team-command.js +3 -3
  129. package/dist/cli.js +2 -2
  130. package/dist/cli.js.map +1 -1
  131. package/dist/core/debug.impl.js +3 -3
  132. package/dist/core/debug.js +3 -3
  133. package/dist/core/export-html/card-projection.code.js +2 -2
  134. package/dist/core/export-html/card-projection.code.js.map +1 -1
  135. package/dist/core/export-html/card-projection.impl.js +3 -3
  136. package/dist/core/export-html/card-projection.js +3 -3
  137. package/dist/core/export-html/index.code.js +9 -9
  138. package/dist/core/export-html/index.code.js.map +1 -1
  139. package/dist/core/export-html/index.impl.js +3 -3
  140. package/dist/core/export-html/index.js +3 -3
  141. package/dist/core/export-html/json-spans.impl.js +3 -3
  142. package/dist/core/export-html/json-spans.js +3 -3
  143. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  144. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  145. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  146. package/dist/core/export-html/tool-renderer.code.js +1 -1
  147. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  148. package/dist/core/export-html/tool-renderer.js +3 -3
  149. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  150. package/dist/core/extensions/jiti-loader.js +3 -3
  151. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  152. package/dist/core/extensions/jiti-static-loader.js +3 -3
  153. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  154. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  155. package/dist/core/extensions/loader-host-modules.js +3 -3
  156. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  157. package/dist/core/extensions/runner-context.js +5 -5
  158. package/dist/core/extensions/runner-context.js.map +1 -1
  159. package/dist/core/http-dispatcher.js +2 -0
  160. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  161. package/dist/core/intercom-broker-control-host.js +3 -3
  162. package/dist/core/intercom-broker-control.code.js +3 -3
  163. package/dist/core/intercom-broker-control.impl.js +3 -3
  164. package/dist/core/intercom-broker-control.js +3 -3
  165. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  166. package/dist/core/package-manager-storage-adapters.js +3 -3
  167. package/dist/core/sdk.code.js +1 -1
  168. package/dist/core/sdk.impl.js +3 -3
  169. package/dist/core/sdk.js +3 -3
  170. package/dist/core/session-manager-core.js +15 -15
  171. package/dist/core/session-manager-core.js.map +1 -1
  172. package/dist/core/session-manager-list.impl.js +3 -3
  173. package/dist/core/session-manager-list.js +3 -3
  174. package/dist/core/session-manager.code.js +1 -1
  175. package/dist/core/session-manager.impl.js +3 -3
  176. package/dist/core/session-manager.js +3 -3
  177. package/dist/core/session-storage.impl.js +3 -3
  178. package/dist/core/session-storage.js +3 -3
  179. package/dist/core/storage/index.js +2 -2
  180. package/dist/core/storage/node-sqlite-thread.js +2 -2
  181. package/dist/core/storage/node-sqlite.js +2 -2
  182. package/dist/core/storage/offline-snapshot-file.code.js +1 -1
  183. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  184. package/dist/core/storage/offline-snapshot-file.js +3 -3
  185. package/dist/core/storage/provider.js +2 -2
  186. package/dist/core/storage/selection.js +2 -2
  187. package/dist/core/storage/session/branch-fork-source.code.js +3 -3
  188. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  189. package/dist/core/storage/session/branch-fork-source.js +3 -3
  190. package/dist/core/storage/session/card-view.impl.js +3 -3
  191. package/dist/core/storage/session/card-view.js +3 -3
  192. package/dist/core/storage/session/child-reader.code.js +5 -4
  193. package/dist/core/storage/session/child-reader.code.js.map +1 -1
  194. package/dist/core/storage/session/child-reader.impl.js +3 -3
  195. package/dist/core/storage/session/child-reader.js +3 -3
  196. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  197. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  198. package/dist/core/storage/session/errors.js +1 -0
  199. package/dist/core/storage/session/errors.js.map +1 -1
  200. package/dist/core/storage/session/expanded-child-details.code.js +4 -4
  201. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  202. package/dist/core/storage/session/expanded-child-details.js +3 -3
  203. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  204. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  205. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  206. package/dist/core/storage/session/fork-row-index.js +3 -3
  207. package/dist/core/storage/session/fork-staging.code.js +5 -4
  208. package/dist/core/storage/session/fork-staging.code.js.map +1 -1
  209. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  210. package/dist/core/storage/session/fork-staging.js +3 -3
  211. package/dist/core/storage/session/fork-window.code.js +3 -3
  212. package/dist/core/storage/session/fork-window.impl.js +3 -3
  213. package/dist/core/storage/session/fork-window.js +3 -3
  214. package/dist/core/storage/session/history-pages.impl.js +3 -3
  215. package/dist/core/storage/session/history-pages.js +3 -3
  216. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  217. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  218. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  219. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  220. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  221. package/dist/core/storage/session/memory-session-store.js +3 -3
  222. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  223. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  224. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  225. package/dist/core/storage/session/released-history-files.code.js +12 -12
  226. package/dist/core/storage/session/released-history-files.code.js.map +1 -1
  227. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  228. package/dist/core/storage/session/released-history-files.js +3 -3
  229. package/dist/core/storage/session/resident-fork-rows.code.js +1 -1
  230. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  231. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  232. package/dist/core/storage/session/session-resume.impl.js +3 -3
  233. package/dist/core/storage/session/session-resume.js +3 -3
  234. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  235. package/dist/core/storage/session/snapshot-cut.js +3 -3
  236. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  237. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  238. package/dist/core/storage/session/snapshot-history.js +3 -3
  239. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  240. package/dist/core/storage/session/sql-session-store.js +3 -3
  241. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  242. package/dist/core/storage/session/tree-outline.js +3 -3
  243. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  244. package/dist/core/storage/session/tree-presentation.js +3 -3
  245. package/dist/core/storage/storage-status.impl.js +3 -3
  246. package/dist/core/storage/storage-status.js +3 -3
  247. package/dist/core/storage/team.impl.js +3 -3
  248. package/dist/core/storage/team.js +3 -3
  249. package/dist/core/structured-output/index.impl.js +3 -3
  250. package/dist/core/structured-output/index.js +3 -3
  251. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  252. package/dist/core/tasks/task-completion-entry.js +3 -3
  253. package/dist/core/tasks/task-file-history.code.js +5 -5
  254. package/dist/core/tasks/task-file-history.code.js.map +1 -1
  255. package/dist/core/tasks/task-file-history.impl.js +3 -3
  256. package/dist/core/tasks/task-file-history.js +3 -3
  257. package/dist/core/tasks/task-reference-archive.code.js +11 -11
  258. package/dist/core/tasks/task-reference-archive.code.js.map +1 -1
  259. package/dist/core/tasks/task-reference-archive.js +3 -3
  260. package/dist/core/tasks/task-reference-identity.code.js +2 -2
  261. package/dist/core/tasks/task-reference-identity.js +3 -3
  262. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  263. package/dist/core/tasks/task-reference-stream.js +3 -3
  264. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  265. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  266. package/dist/core/tasks/task-view-source.impl.js +3 -3
  267. package/dist/core/tasks/task-view-source.js +3 -3
  268. package/dist/core/tools/read-url.code.js +9 -9
  269. package/dist/core/tools/read-url.impl.js +3 -3
  270. package/dist/core/tools/read-url.js +3 -3
  271. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  272. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  273. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  274. package/dist/core/worktree-snapshot/errors.js +3 -3
  275. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  276. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  277. package/dist/extensions/codemode/execute.code.js +3 -3
  278. package/dist/extensions/codemode/execute.impl.js +3 -3
  279. package/dist/extensions/codemode/execute.js +3 -3
  280. package/dist/extensions/codemode/renderer.code.js +1 -1
  281. package/dist/extensions/codemode/renderer.impl.js +3 -3
  282. package/dist/extensions/codemode/renderer.js +3 -3
  283. package/dist/extensions/mcp/cli.code.js +7 -7
  284. package/dist/extensions/mcp/cli.impl.js +3 -3
  285. package/dist/extensions/mcp/cli.js +3 -3
  286. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  287. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  288. package/dist/extensions/mcp/cli.lazy.js +3 -3
  289. package/dist/extensions/mcp/runtime.impl.js +3 -3
  290. package/dist/extensions/mcp/runtime.js +3 -3
  291. package/dist/index.js +2 -2
  292. package/dist/main-first-time-setup.impl.js +3 -3
  293. package/dist/main-first-time-setup.js +3 -3
  294. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  295. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  296. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  297. package/dist/modes/interactive/components/task-inspector.d.ts +10 -2
  298. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  299. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  300. package/dist/package-manager-cli.code.js +14 -14
  301. package/dist/package-manager-cli.impl.js +3 -3
  302. package/dist/package-manager-cli.js +3 -3
  303. package/dist/rpc-entry.js +3 -3
  304. package/dist/startup-files.json +1 -1
  305. package/dist/startup-stages/7.js +1 -1
  306. package/dist/utils/startup-database-spare.code.js +5 -5
  307. package/dist/utils/startup-database-spare.impl.js +3 -3
  308. package/dist/utils/startup-database-spare.js +3 -3
  309. package/dist/utils/tools-manager.code.js +1 -1
  310. package/dist/utils/tools-manager.impl.js +3 -3
  311. package/dist/utils/tools-manager.js +3 -3
  312. package/docs/background-tasks.md +2 -2
  313. package/package.json +9 -9
  314. package/dist/_shared/settings-startup-65YEWRV2.js.map +0 -1
  315. package/dist/_shared/startup-0-1-D4LGGINF.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { __name } from "./rolldown-runtime-BGM3D5V3.js";
2
2
  import { createSessionCwdMatcher, normalizePath, resolvePath } from "./p0-cli-BB45ZQY6.js";
3
3
  import { CURRENT_SESSION_VERSION, EntryTypeReader, JsonTextChecker, applySessionSummaryEntries, bindChatEpoch, boundedChatRecord, decodeChatRecord, firstChatOrders, getErrnoCode, historySnapshotFor, inheritForkScope, isClassifiedWorkflowSession, materializeSessionSummaryMetadata, noteSnapshotGeneration, observeReferenceCut, readLines, referenceMetadataRead, registerArchiveLoad, registerForkScope, require_sha256, sha256Hex, summarizeSession, yieldTurn } from "./startup-0-0-TYUFUOJZ.js";
4
- import { AgentRehydrateError, AgentReleaseConfigError, SessionKeyDigests, appendFileChatRecord, deleteFileChatRecords, hasFileChatRecords, latestLegacyMessageTime, legacyCompletionTarget, readFileChatOrders, readFileChatRecords, rememberEarlierCompletion, summarizeLegacySession } from "./startup-0-1-D4LGGINF.js";
4
+ import { AgentRehydrateError, AgentReleaseConfigError, SessionKeyDigests, appendFileChatRecord, deleteFileChatRecords, hasFileChatRecords, latestLegacyMessageTime, legacyCompletionTarget, readFileChatOrders, readFileChatRecords, rememberEarlierCompletion, summarizeLegacySession } from "./startup-0-1-W2G2UY7R.js";
5
5
  import { agentWakeDispatcher } from "./startup-0-2-SZGQIWHI.js";
6
- import { SESSION_HISTORY_CHUNK_BYTES, SESSION_HISTORY_PAGE_BYTES, SESSION_HISTORY_SCAN_ENTRIES, SessionIdError, entrySizeLimit, matchesSessionIdPrefix, yieldSessionTurn } from "./settings-startup-65YEWRV2.js";
6
+ import { SESSION_HISTORY_CHUNK_BYTES, SESSION_HISTORY_PAGE_BYTES, SESSION_HISTORY_SCAN_ENTRIES, SessionIdError, entrySizeLimit, matchesSessionIdPrefix, yieldSessionTurn } from "./settings-startup-4QCVCI53.js";
7
7
  import { access, appendFile, copyFile, link, mkdir, open, readFile, readdir, rename, stat, truncate, unlink, writeFile } from "node:fs/promises";
8
8
  import { closeSync, existsSync, openSync, readSync, readdirSync, statSync } from "fs";
9
9
  import { join } from "path";
@@ -1659,9 +1659,9 @@ function appendFailureWroteNothing(error) {
1659
1659
  /** Validate the tree envelope and required payload fields before consuming persisted entries. */
1660
1660
  function validateSessionEntryStructure(entries, path) {
1661
1661
  for (const entry of entries) {
1662
- if (!entry || typeof entry !== "object" || typeof entry.id !== "string" || entry.parentId !== null && typeof entry.parentId !== "string" || typeof entry.timestamp !== "string") throw new SessionFormatVersionError(path, 4);
1662
+ if (!entry || typeof entry !== "object" || typeof entry.id !== "string" || entry.parentId !== null && typeof entry.parentId !== "string" || typeof entry.timestamp !== "string") throw new SessionFormatVersionError$1(path, 4);
1663
1663
  readExtensionFields(entry);
1664
- if (!validPayload(entry)) throw new SessionFormatVersionError(path, 4);
1664
+ if (!validPayload(entry)) throw new SessionFormatVersionError$1(path, 4);
1665
1665
  }
1666
1666
  }
1667
1667
  /**
@@ -1748,8 +1748,8 @@ function validDegradedRestore(value) {
1748
1748
  /** Reject unsupported or incomplete trees before indexing or rewriting their header. */
1749
1749
  function validateSessionFileEntries(entries, path) {
1750
1750
  const header = entries[0];
1751
- if (header?.type !== "session") throw new SessionFormatVersionError(path, void 0);
1752
- if (header.version !== CURRENT_SESSION_VERSION || typeof header.id !== "string" || typeof header.cwd !== "string" || typeof header.createdAt !== "string") throw new SessionFormatVersionError(path, header.version);
1751
+ if (header?.type !== "session") throw new SessionFormatVersionError$1(path, void 0);
1752
+ if (header.version !== CURRENT_SESSION_VERSION || typeof header.id !== "string" || typeof header.cwd !== "string" || typeof header.createdAt !== "string") throw new SessionFormatVersionError$1(path, header.version);
1753
1753
  validateSessionEntryStructure(entries.slice(1), path);
1754
1754
  return header;
1755
1755
  }
@@ -2748,7 +2748,7 @@ var EntryScanner = class {
2748
2748
  });
2749
2749
  } else if (spec.kind !== "skip") this.capture = {
2750
2750
  depth: this.depth,
2751
- limit: spec.kind === "exact" || !container && byte !== QUOTE ? Infinity : KEEP_BYTES,
2751
+ limit: spec.kind === "exact" || !container && byte !== QUOTE ? 1e400 : KEEP_BYTES,
2752
2752
  first: byte,
2753
2753
  parts: [],
2754
2754
  size: 0,
@@ -2796,7 +2796,7 @@ var EntryScanner = class {
2796
2796
  const frame = this.live();
2797
2797
  if (frame && frame.spec.kind !== "skip") this.capture = {
2798
2798
  depth: this.depth,
2799
- limit: Infinity,
2799
+ limit: 1e400,
2800
2800
  first: QUOTE,
2801
2801
  parts: [],
2802
2802
  size: 0,
@@ -2972,7 +2972,7 @@ function legacyVersion(stored, path) {
2972
2972
  const version = stored.version === void 0 ? 1 : stored.version;
2973
2973
  if (version === 1 || version === 2 || version === 3) return version;
2974
2974
  if (isEarlyFormat4Header(stored)) return 4;
2975
- throw new SessionFormatVersionError(path, stored.version);
2975
+ throw new SessionFormatVersionError$1(path, stored.version);
2976
2976
  }
2977
2977
  function upgradeLegacySessionHeader(stored, path) {
2978
2978
  legacyVersion(stored, path);
@@ -3006,7 +3006,7 @@ function upgradeLegacySessionEntry(stored, entry, seq, path) {
3006
3006
  if (withIds.type === "compaction") {
3007
3007
  const { firstKeptEntryIndex, ...compaction } = withIds;
3008
3008
  if (typeof firstKeptEntryIndex === "number") {
3009
- if (!Number.isInteger(firstKeptEntryIndex) || firstKeptEntryIndex < 0 || firstKeptEntryIndex > seq) throw new SessionFormatVersionError(path, stored.version);
3009
+ if (!Number.isInteger(firstKeptEntryIndex) || firstKeptEntryIndex < 0 || firstKeptEntryIndex > seq) throw new SessionFormatVersionError$1(path, stored.version);
3010
3010
  const firstKeptEntryId = firstKeptEntryIndex >= 1 && firstKeptEntryIndex < seq ? v1EntryId(firstKeptEntryIndex) : null;
3011
3011
  upgraded = {
3012
3012
  ...compaction,
@@ -3028,7 +3028,7 @@ function migrateV2ToV3(entries) {
3028
3028
  return entries.map(renameHookMessage);
3029
3029
  }
3030
3030
  function migrateV3ToV4(stored, path) {
3031
- if (stored.type !== "session" || typeof stored.id !== "string" || typeof stored.cwd !== "string" || typeof stored.timestamp !== "string" || stored.parentSession !== void 0 && typeof stored.parentSession !== "string") throw new SessionFormatVersionError(path, stored.version);
3031
+ if (stored.type !== "session" || typeof stored.id !== "string" || typeof stored.cwd !== "string" || typeof stored.timestamp !== "string" || stored.parentSession !== void 0 && typeof stored.parentSession !== "string") throw new SessionFormatVersionError$1(path, stored.version);
3032
3032
  return {
3033
3033
  type: "session",
3034
3034
  version: 4,
@@ -4470,7 +4470,7 @@ var JsonlSessionStore = class JsonlSessionStore {
4470
4470
  await this.readPersisted(located.path, located.stored);
4471
4471
  located = await this.locate(sessionId);
4472
4472
  if (!located) throw new SessionNotFoundError(sessionId);
4473
- if (!isCurrentSessionHeader(located.stored)) throw new SessionFormatVersionError(located.path, located.stored.version);
4473
+ if (!isCurrentSessionHeader(located.stored)) throw new SessionFormatVersionError$1(located.path, located.stored.version);
4474
4474
  }
4475
4475
  const { path, header } = located;
4476
4476
  const jsonl = await this.indexFor(path, header);
@@ -4912,7 +4912,7 @@ var JsonlSessionStore = class JsonlSessionStore {
4912
4912
  } catch (cause) {
4913
4913
  const error = cause;
4914
4914
  if (error.path === path && (error.code === "ENOENT" || error.code === "ENOTDIR")) return void 0;
4915
- if (cause instanceof SessionFormatVersionError || cause instanceof SessionInvalidTextError || cause instanceof SessionInvalidTimestampError || cause instanceof SyntaxError) return void 0;
4915
+ if (cause instanceof SessionFormatVersionError$1 || cause instanceof SessionInvalidTextError || cause instanceof SessionInvalidTimestampError || cause instanceof SyntaxError) return void 0;
4916
4916
  throw cause;
4917
4917
  }
4918
4918
  }, cached?.summaryState === void 0, query.signal);
@@ -4954,7 +4954,7 @@ var JsonlSessionStore = class JsonlSessionStore {
4954
4954
  return await (locked ? this.exclusive(operation, signal) : operation());
4955
4955
  } catch (cause) {
4956
4956
  if (signal?.aborted && cause === signal.reason) throw cause;
4957
- if (cause instanceof SessionConflictError || cause instanceof SessionExistsError || cause instanceof SessionNotFoundError || cause instanceof SessionIdMismatchError || cause instanceof SessionInvalidTextError || cause instanceof SessionInvalidTimestampError || cause instanceof SessionFormatVersionError || cause instanceof JsonlStoragePoisonedError || cause instanceof DOMException) throw cause;
4957
+ if (cause instanceof SessionConflictError || cause instanceof SessionExistsError || cause instanceof SessionNotFoundError || cause instanceof SessionIdMismatchError || cause instanceof SessionInvalidTextError || cause instanceof SessionInvalidTimestampError || cause instanceof SessionFormatVersionError$1 || cause instanceof JsonlStoragePoisonedError || cause instanceof DOMException) throw cause;
4958
4958
  throw new StorageUnavailableError$1(this.descriptor, cause);
4959
4959
  }
4960
4960
  });
@@ -5170,7 +5170,7 @@ var JsonlSessionStore = class JsonlSessionStore {
5170
5170
  async readHeaderAt(path, stored) {
5171
5171
  stored ??= await this.readFirstLine(path);
5172
5172
  const { type: _type, ...header } = isCurrentSessionHeader(stored) ? stored : upgradeLegacySessionHeader(stored, path);
5173
- if (_type !== "session" || typeof header.id !== "string" || typeof header.cwd !== "string" || typeof header.createdAt !== "string") throw new SessionFormatVersionError(path, stored.version);
5173
+ if (_type !== "session" || typeof header.id !== "string" || typeof header.cwd !== "string" || typeof header.createdAt !== "string") throw new SessionFormatVersionError$1(path, stored.version);
5174
5174
  validateSessionHeader(header);
5175
5175
  return header;
5176
5176
  }
@@ -5302,7 +5302,7 @@ var JsonlSessionStore = class JsonlSessionStore {
5302
5302
  const located = await this.locate(sessionId);
5303
5303
  if (!located) throw new SessionNotFoundError(sessionId);
5304
5304
  const { path, header, stored, stats } = located;
5305
- if (!isCurrentSessionHeader(stored)) throw new SessionFormatVersionError(path, stored.version);
5305
+ if (!isCurrentSessionHeader(stored)) throw new SessionFormatVersionError$1(path, stored.version);
5306
5306
  let state = located.state;
5307
5307
  if (!state) {
5308
5308
  await this.readSnapshot(path);
@@ -5394,7 +5394,7 @@ function spanEnd(jsonl, seq) {
5394
5394
  return jsonl.spans[2 * (seq - 1) + 1];
5395
5395
  }
5396
5396
  function idHash(id) {
5397
- let hash = 2166136261;
5397
+ let hash = 0x811c9dc5;
5398
5398
  for (let index = 0; index < id.length; index++) hash = Math.imul(hash ^ id.charCodeAt(index), 16777619);
5399
5399
  return hash >>> 0;
5400
5400
  }
@@ -5640,7 +5640,7 @@ const utf8Decoder = new TextDecoder();
5640
5640
  const COMMA = 44;
5641
5641
  const NO_ENTRIES = /* @__PURE__ */ new Uint8Array(0);
5642
5642
  const SPILL_BLOCK_BYTES = 65536;
5643
- const FNV_OFFSET = 2166136261;
5643
+ const FNV_OFFSET = 0x811c9dc5;
5644
5644
  const SCAN_WINDOW_BYTES = 1048576;
5645
5645
  const RAW_CHUNK_BYTES = 1048576;
5646
5646
  const TYPE_WINDOW_BYTES = 65536;
@@ -7065,7 +7065,7 @@ function parseHistory(directory, sessionId, spilled, held, expectedChecksum) {
7065
7065
  return entries;
7066
7066
  }
7067
7067
  /** Cheap accidental-corruption detection, not an authentication tag. Updating only the append avoids re-reading history. */
7068
- function checksum(bytes, previous = 2166136261) {
7068
+ function checksum(bytes, previous = 0x811c9dc5) {
7069
7069
  let hash = previous;
7070
7070
  for (let index = 0; index < bytes.byteLength; index++) hash = Math.imul(hash ^ bytes[index], 16777619);
7071
7071
  return hash >>> 0;
@@ -7231,7 +7231,7 @@ function parseReleaseWhenIdle(value, source = "sdk") {
7231
7231
  value: describe(value)
7232
7232
  });
7233
7233
  const afterMs = value.afterMs;
7234
- if (!(typeof afterMs === "number" && afterMs >= 0 && afterMs <= 2147483647)) throw new AgentReleaseConfigError({
7234
+ if (!(typeof afterMs === "number" && afterMs >= 0 && afterMs <= 0x7fffffff)) throw new AgentReleaseConfigError({
7235
7235
  source,
7236
7236
  field: "releaseWhenIdle.afterMs",
7237
7237
  value: describe(afterMs)
@@ -8014,7 +8014,7 @@ async function newestCopiesFirst(copies) {
8014
8014
  }
8015
8015
  return ranked.sort((a, b) => a.damaged - b.damaged || b.latest - a.latest || b.modified - a.modified || a.order - b.order).map(({ file }) => file);
8016
8016
  }
8017
- export { EMPTY_SESSION_HISTORY_TOTALS, JSONL_INDEX_VERSION, JsonlSessionStore, JsonlStoragePoisonedError, LegacySessionStore, MemorySessionStore, RESUME_UPGRADE_SOURCES, SPILL_BLOCK_BYTES, SPILL_DIRECTORY_RETRY_MS, SessionFormatVersionError$1 as SessionFormatVersionError, addEntryToHistoryTotals, agentSessionPersistenceFailureMethods, agentSessionReleaseMethods, appendFailureWroteNothing, archivedAnswerAt, assertSnapshotCut, assertValidSessionId, bindSessionFile, branchRanges, checkedCustomMessage, checkedCustomType, checkedLabel, childCatalogCut, clearPersistenceFailure, completionIdOf, createBranchSummaryEntry, createCompactionEntry, createContextEditEntry, createCustomEntry, createCustomMessageEntry, createLabelEntry, createMessageEntry, createModelChangeEntry, createSessionFilePath, createSessionHeader, createSessionId, createSessionInfoEntry, createSessionSummaryEntry, createThinkingLevelChangeEntry, createWorktreeSnapshotEntry, earlierTranscriptCursor, enableReleaseWhenIdle, entryProjector, findInSessionHistory, findMostRecentSession, findQueuedMessages, findQueuedMessagesInFile, findQueuedMessagesInStore, findSessionCompaction, findWorktreeSnapshotRecords, firstHistoryCursor, foldSessionResume, foreignResumeIds, generateId, getEntriesWithoutHeader, getLastConversationMessageId, getLatestSessionName, getLatestSessionSummary, historyChunks, historyPageGeneration, historyPages, intentForAcknowledgement, isBranchCustomState, isCurrentSessionHeader, isExtensionCustomState, isInternalHeader, isPrivateMemorySessionStore, isSessionHistoryEntry, isSessionResumeIndex, isUpgradableSessionResumeIndex, jsonlEntryProjection, keepRefusedInput, lastAssistantAnswer, lastBranchAnswer, latestCompactionOf, loadEntriesFromFile, markPrivateMemorySessionStore, notReopenable, noteMessageSaved, omittedTotals, onSessionClose, parseReleaseWhenIdle, parseSessionEntries, parseStoredSessionEntries, readAhead, readEarlierCompletionIntents, readSessionHeaderAsync, readSessionHistory, readSessionHistoryChunks, readSessionRange, readSessionTail, recordPersistenceFailure, recoveryWitnessesOf, refoldSessionResume, repeatsShownUnsavedInput, resumeIndexNeedsRefold, rethrowUnlessReportedPersistenceFailure, savedWindowAnswer, selectResumeLeaf, selectedHistoryPages, selectedPagePlan, sessionClosing, sessionCompactionOf, sessionRangeOf, sessionResumeFrom, sessionResumeOf, sessionResumePlan, sessionResumeUpgrade, sessionTailFrom, sessionTailOf, snapshotChunk, snapshotCutOf, snapshotHead, snapshotPage, snapshotStamp, stateSeqsBefore, storeSnapshotIndex, transcriptBranchSpan, transcriptCursorWithin, updateWorkflowStarts, upgradeStoredSessionEntries, validateSessionEntries, validateSessionEntryStructure, validateSessionFileEntries, validateSessionHeader, validateSessionText, withForkFileWindow, witnessedIn, worktreeSnapshotPages, writesEndWithWriter };
8017
+ export { EMPTY_SESSION_HISTORY_TOTALS, JSONL_INDEX_VERSION, JsonlSessionStore, JsonlStoragePoisonedError, LegacySessionStore, MemorySessionStore, RESUME_UPGRADE_SOURCES, SPILL_BLOCK_BYTES, SPILL_DIRECTORY_RETRY_MS, SessionFormatVersionError, addEntryToHistoryTotals, agentSessionPersistenceFailureMethods, agentSessionReleaseMethods, appendFailureWroteNothing, archivedAnswerAt, assertSnapshotCut, assertValidSessionId, bindSessionFile, branchRanges, checkedCustomMessage, checkedCustomType, checkedLabel, childCatalogCut, clearPersistenceFailure, completionIdOf, createBranchSummaryEntry, createCompactionEntry, createContextEditEntry, createCustomEntry, createCustomMessageEntry, createLabelEntry, createMessageEntry, createModelChangeEntry, createSessionFilePath, createSessionHeader, createSessionId, createSessionInfoEntry, createSessionSummaryEntry, createThinkingLevelChangeEntry, createWorktreeSnapshotEntry, earlierTranscriptCursor, enableReleaseWhenIdle, entryProjector, findInSessionHistory, findMostRecentSession, findQueuedMessages, findQueuedMessagesInFile, findQueuedMessagesInStore, findSessionCompaction, findWorktreeSnapshotRecords, firstHistoryCursor, foldSessionResume, foreignResumeIds, generateId, getEntriesWithoutHeader, getLastConversationMessageId, getLatestSessionName, getLatestSessionSummary, historyChunks, historyPageGeneration, historyPages, intentForAcknowledgement, isBranchCustomState, isCurrentSessionHeader, isExtensionCustomState, isInternalHeader, isPrivateMemorySessionStore, isSessionHistoryEntry, isSessionResumeIndex, isUpgradableSessionResumeIndex, jsonlEntryProjection, keepRefusedInput, lastAssistantAnswer, lastBranchAnswer, latestCompactionOf, loadEntriesFromFile, markPrivateMemorySessionStore, notReopenable, noteMessageSaved, omittedTotals, onSessionClose, parseReleaseWhenIdle, parseSessionEntries, parseStoredSessionEntries, readAhead, readEarlierCompletionIntents, readSessionHeaderAsync, readSessionHistory, readSessionHistoryChunks, readSessionRange, readSessionTail, recordPersistenceFailure, recoveryWitnessesOf, refoldSessionResume, repeatsShownUnsavedInput, resumeIndexNeedsRefold, rethrowUnlessReportedPersistenceFailure, savedWindowAnswer, selectResumeLeaf, selectedHistoryPages, selectedPagePlan, sessionClosing, sessionCompactionOf, sessionRangeOf, sessionResumeFrom, sessionResumeOf, sessionResumePlan, sessionResumeUpgrade, sessionTailFrom, sessionTailOf, snapshotChunk, snapshotCutOf, snapshotHead, snapshotPage, snapshotStamp, stateSeqsBefore, storeSnapshotIndex, transcriptBranchSpan, transcriptCursorWithin, updateWorkflowStarts, upgradeStoredSessionEntries, validateSessionEntries, validateSessionEntryStructure, validateSessionFileEntries, validateSessionHeader, validateSessionText, withForkFileWindow, witnessedIn, worktreeSnapshotPages, writesEndWithWriter };
8018
8018
 
8019
8019
  //# sourceMappingURL=startup-8-0-34CBHPZH.js.map
8020
8020
  // __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
@@ -8023,7 +8023,7 @@ function __atomicOnDemandFailed(error, feature) {
8023
8023
  return (async () => {
8024
8024
  const root = new URL("../", import.meta.url);
8025
8025
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
8026
- const key = `${root.href}#0.10.5-alpha.1`;
8026
+ const key = `${root.href}#0.10.6-alpha.1`;
8027
8027
  let release = releases.get(key);
8028
8028
  if (release === undefined) {
8029
8029
  const current = (async () => {
@@ -8051,7 +8051,7 @@ function __atomicOnDemandFailed(error, feature) {
8051
8051
  } catch {
8052
8052
  // No installation to read, as in a bundle of the package: the release the process runs decides.
8053
8053
  }
8054
- const updatedTo = typeof installed === "string" && installed !== "0.10.5-alpha.1" ? installed : running !== undefined && running.version !== "0.10.5-alpha.1" ? "0.10.5-alpha.1" : undefined;
8054
+ const updatedTo = typeof installed === "string" && installed !== "0.10.6-alpha.1" ? installed : running !== undefined && running.version !== "0.10.6-alpha.1" ? "0.10.6-alpha.1" : undefined;
8055
8055
  if (updatedTo === undefined) throw error;
8056
8056
  const application = typeof running?.name === "string" ? running.name : "atomic";
8057
8057
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {