@bastani/atomic 0.10.4-alpha.2 → 0.10.5-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 (614) hide show
  1. package/CHANGELOG.md +238 -0
  2. package/dist/_shared/chunk-CDOYTDYM.js +4 -0
  3. package/dist/_shared/chunk-CDOYTDYM.js.map +1 -0
  4. package/dist/_shared/compile-cache-warmup-host-RU5L7I7A.js +1 -1
  5. package/dist/_shared/dist-KOELCESV.js +48 -3
  6. package/dist/_shared/fork-row-index-UAUAQRD5.js +47 -2
  7. package/dist/_shared/http-YFAPTIZD.js +16 -4
  8. package/dist/_shared/http-YFAPTIZD.js.map +1 -1
  9. package/dist/_shared/lib-4PES5P4V.js +59 -14
  10. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +1706 -258
  11. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  12. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +317 -64
  13. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  14. package/dist/_shared/{mode-shared-HP7GUA7J.js → mode-shared-2QJSCUM6.js} +432 -81
  15. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -0
  16. package/dist/_shared/p0-cli-BB45ZQY6.js +3482 -0
  17. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -0
  18. package/dist/_shared/p0-cli-GUFK7TPN.js +2 -2838
  19. package/dist/_shared/p0-cli-GUFK7TPN.js.map +1 -1
  20. package/dist/_shared/{p1a-prewarm-YK3KDTLN.js → p1a-prewarm-UQY3X2UK.js} +270 -73
  21. package/dist/_shared/p1a-prewarm-UQY3X2UK.js.map +1 -0
  22. package/dist/_shared/{p1b-elig-PXQA2FYP.js → p1b-elig-ENCUPKKJ.js} +190 -121
  23. package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -0
  24. package/dist/_shared/p2-common-YLSYXMDQ.js +1 -3
  25. package/dist/_shared/p2-common-YLSYXMDQ.js.map +1 -1
  26. package/dist/_shared/p2-shell-TJBYQMCJ.js +1 -1
  27. package/dist/_shared/p2-shell-main-B2WIALFD.js +500 -127
  28. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  29. package/dist/_shared/runtime-O4KCSG4C.js +4 -4
  30. package/dist/_shared/sdk-WQIOHVKO.js +56 -11
  31. package/dist/_shared/session-data-AHTU7IS6.js +48 -3
  32. package/dist/_shared/session-manager-list-2BLEEZVG.js +2 -2
  33. package/dist/_shared/settings-startup-65YEWRV2.js.map +1 -1
  34. package/dist/_shared/sql-session-store-5FD3WBMZ.js +57 -12
  35. package/dist/_shared/{startup-0-0-X4NF3GKM.js → startup-0-0-TYUFUOJZ.js} +528 -321
  36. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -0
  37. package/dist/_shared/{startup-0-1-7QTG6VJZ.js → startup-0-1-D4LGGINF.js} +284 -81
  38. package/dist/_shared/startup-0-1-D4LGGINF.js.map +1 -0
  39. package/dist/_shared/{startup-0-2-KFDYPDJK.js → startup-0-2-SZGQIWHI.js} +483 -154
  40. package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -0
  41. package/dist/_shared/startup-0-3-T4DVFYWX.js +340 -110
  42. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  43. package/dist/_shared/startup-0-4-HN5EB4K7.js +261 -59
  44. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
  45. package/dist/_shared/startup-0-5-OHJNE6JH.js +421 -148
  46. package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
  47. package/dist/_shared/startup-10-0-TDQNBDDL.js +62 -11
  48. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
  49. package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
  50. package/dist/_shared/startup-14-0-MLX36RBG.js +12 -11
  51. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  52. package/dist/_shared/startup-15-0-YUKGAC63.js +53 -158
  53. package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
  54. package/dist/_shared/startup-15-1-4S7FLMNG.js +231 -46
  55. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  56. package/dist/_shared/startup-8-0-34CBHPZH.js +115 -35
  57. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  58. package/dist/_shared/{startup-8-1-KQJBDKRU.js → startup-8-1-SJW2GMAM.js} +203 -62
  59. package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -0
  60. package/dist/_shared/storage-command-7MGXLJGZ.js +55 -10
  61. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +47 -2
  62. package/dist/_shared/tree-outline-MUEPK5B7.js +48 -3
  63. package/dist/builtin/intercom/CHANGELOG.md +59 -0
  64. package/dist/builtin/intercom/README.md +0 -1
  65. package/dist/builtin/intercom/broker/broker-instance.ts +13 -57
  66. package/dist/builtin/intercom/broker/broker-process.ts +30 -10
  67. package/dist/builtin/intercom/broker/broker-routing.ts +12 -2
  68. package/dist/builtin/intercom/broker/broker.bundle.mjs +2557 -498
  69. package/dist/builtin/intercom/broker/broker.ts +164 -55
  70. package/dist/builtin/intercom/broker/client.ts +36 -16
  71. package/dist/builtin/intercom/broker/control.ts +83 -20
  72. package/dist/builtin/intercom/broker/durable-ended-queue.ts +65 -19
  73. package/dist/builtin/intercom/broker/host-command-environment.ts +7 -2
  74. package/dist/builtin/intercom/broker/multinode-router.ts +1675 -387
  75. package/dist/builtin/intercom/broker/multinode-state-store.ts +10 -0
  76. package/dist/builtin/intercom/broker/paths.ts +68 -6
  77. package/dist/builtin/intercom/broker/pending-send-registry.ts +5 -0
  78. package/dist/builtin/intercom/broker/registration-bounds.ts +38 -0
  79. package/dist/builtin/intercom/broker/retiring-broker-check.ts +178 -0
  80. package/dist/builtin/intercom/broker/return-paths.ts +268 -7
  81. package/dist/builtin/intercom/broker/send-handler.ts +253 -28
  82. package/dist/builtin/intercom/broker/send-order-gate.ts +410 -0
  83. package/dist/builtin/intercom/broker/spawn.ts +950 -202
  84. package/dist/builtin/intercom/broker/sql-lease-store.ts +37 -0
  85. package/dist/builtin/intercom/broker/sql-outbox-store.ts +7 -0
  86. package/dist/builtin/intercom/broker/windows-cwd.ts +546 -0
  87. package/dist/builtin/intercom/index.bundle.mjs +3506 -2328
  88. package/dist/builtin/intercom/package.json +1 -1
  89. package/dist/builtin/intercom/retry-policy.ts +4 -0
  90. package/dist/builtin/intercom/types.ts +2 -0
  91. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  92. package/dist/builtin/mcp/package.json +1 -1
  93. package/dist/builtin/subagents/CHANGELOG.md +46 -0
  94. package/dist/builtin/subagents/package.json +1 -1
  95. package/dist/builtin/subagents/src/extension/index.bundle.mjs +336 -86
  96. package/dist/builtin/web-access/CHANGELOG.md +12 -0
  97. package/dist/builtin/web-access/index.bundle.mjs +23 -38
  98. package/dist/builtin/web-access/package.json +1 -1
  99. package/dist/bun/cli.js +1 -1
  100. package/dist/bun/cli.js.map +1 -1
  101. package/dist/bun/internal-intercom-broker.js +119 -4
  102. package/dist/bun/internal-intercom-broker.js.map +1 -1
  103. package/dist/bun/register-theme-validator.js +6 -0
  104. package/dist/bun/register-theme-validator.js.map +1 -0
  105. package/dist/cli/args.js +2 -2
  106. package/dist/cli/auth-cli.code.js +1102 -0
  107. package/dist/cli/auth-cli.code.js.map +1 -0
  108. package/dist/cli/auth-cli.impl.js +36 -0
  109. package/dist/cli/auth-cli.impl.js.map +1 -0
  110. package/dist/cli/auth-cli.js +30 -1096
  111. package/dist/cli/auth-cli.js.map +1 -1
  112. package/dist/cli/blueprint-command.code.js +906 -0
  113. package/dist/cli/blueprint-command.code.js.map +1 -0
  114. package/dist/cli/blueprint-command.impl.js +36 -0
  115. package/dist/cli/blueprint-command.impl.js.map +1 -0
  116. package/dist/cli/blueprint-command.js +30 -900
  117. package/dist/cli/blueprint-command.js.map +1 -1
  118. package/dist/cli/intercom-command.code.js +153 -0
  119. package/dist/cli/intercom-command.code.js.map +1 -0
  120. package/dist/cli/intercom-command.impl.js +36 -0
  121. package/dist/cli/intercom-command.impl.js.map +1 -0
  122. package/dist/cli/intercom-command.js +33 -105
  123. package/dist/cli/intercom-command.js.map +1 -1
  124. package/dist/cli/list-models.code.js +60 -0
  125. package/dist/cli/list-models.code.js.map +1 -0
  126. package/dist/cli/list-models.impl.js +36 -0
  127. package/dist/cli/list-models.impl.js.map +1 -0
  128. package/dist/cli/list-models.js +33 -57
  129. package/dist/cli/list-models.js.map +1 -1
  130. package/dist/cli/session-picker.code.js +55 -0
  131. package/dist/cli/session-picker.code.js.map +1 -0
  132. package/dist/cli/session-picker.impl.js +36 -0
  133. package/dist/cli/session-picker.impl.js.map +1 -0
  134. package/dist/cli/session-picker.js +33 -52
  135. package/dist/cli/session-picker.js.map +1 -1
  136. package/dist/cli/startup-ui.code.js +5 -0
  137. package/dist/cli/startup-ui.code.js.map +1 -0
  138. package/dist/cli/startup-ui.impl.js +36 -0
  139. package/dist/cli/startup-ui.impl.js.map +1 -0
  140. package/dist/cli/startup-ui.js +35 -4
  141. package/dist/cli/storage-command.code.js +3 -0
  142. package/dist/cli/storage-command.code.js.map +1 -0
  143. package/dist/cli/storage-command.impl.js +36 -0
  144. package/dist/cli/storage-command.impl.js.map +1 -0
  145. package/dist/cli/storage-command.js +35 -2
  146. package/dist/cli/storage-search-session.code.js +189 -0
  147. package/dist/cli/storage-search-session.code.js.map +1 -0
  148. package/dist/cli/storage-search-session.impl.js +36 -0
  149. package/dist/cli/storage-search-session.impl.js.map +1 -0
  150. package/dist/cli/storage-search-session.js +33 -186
  151. package/dist/cli/storage-search-session.js.map +1 -1
  152. package/dist/cli/team-command.code.js +217 -0
  153. package/dist/cli/team-command.code.js.map +1 -0
  154. package/dist/cli/team-command.impl.js +36 -0
  155. package/dist/cli/team-command.impl.js.map +1 -0
  156. package/dist/cli/team-command.js +32 -213
  157. package/dist/cli/team-command.js.map +1 -1
  158. package/dist/cli.js +60 -11
  159. package/dist/cli.js.map +1 -1
  160. package/dist/config.js +1 -1
  161. package/dist/core/agent-session-methods.d.ts +4 -3
  162. package/dist/core/agent-session-methods.js.map +1 -1
  163. package/dist/core/agent-session-types.d.ts +5 -0
  164. package/dist/core/compaction/compaction.d.ts +6 -0
  165. package/dist/core/compaction/model-resolver.d.ts +1 -1
  166. package/dist/core/debug.code.js +3 -0
  167. package/dist/core/debug.code.js.map +1 -0
  168. package/dist/core/debug.impl.js +36 -0
  169. package/dist/core/debug.impl.js.map +1 -0
  170. package/dist/core/debug.js +35 -2
  171. package/dist/core/default-model-api-prewarm.d.ts +5 -0
  172. package/dist/core/export-html/card-projection.code.js +257 -0
  173. package/dist/core/export-html/card-projection.code.js.map +1 -0
  174. package/dist/core/export-html/card-projection.impl.js +36 -0
  175. package/dist/core/export-html/card-projection.impl.js.map +1 -0
  176. package/dist/core/export-html/card-projection.js +34 -255
  177. package/dist/core/export-html/card-projection.js.map +1 -1
  178. package/dist/core/export-html/index.code.js +655 -0
  179. package/dist/core/export-html/index.code.js.map +1 -0
  180. package/dist/core/export-html/index.impl.js +36 -0
  181. package/dist/core/export-html/index.impl.js.map +1 -0
  182. package/dist/core/export-html/index.js +30 -604
  183. package/dist/core/export-html/index.js.map +1 -1
  184. package/dist/core/export-html/json-spans.code.js +3 -0
  185. package/dist/core/export-html/json-spans.code.js.map +1 -0
  186. package/dist/core/export-html/json-spans.impl.js +36 -0
  187. package/dist/core/export-html/json-spans.impl.js.map +1 -0
  188. package/dist/core/export-html/json-spans.js +35 -2
  189. package/dist/core/export-html/oversized-render-inputs.code.js +125 -0
  190. package/dist/core/export-html/oversized-render-inputs.code.js.map +1 -0
  191. package/dist/core/export-html/oversized-render-inputs.impl.js +36 -0
  192. package/dist/core/export-html/oversized-render-inputs.impl.js.map +1 -0
  193. package/dist/core/export-html/oversized-render-inputs.js +31 -120
  194. package/dist/core/export-html/oversized-render-inputs.js.map +1 -1
  195. package/dist/core/export-html/tool-renderer.code.js +350 -0
  196. package/dist/core/export-html/tool-renderer.code.js.map +1 -0
  197. package/dist/core/export-html/tool-renderer.impl.js +36 -0
  198. package/dist/core/export-html/tool-renderer.impl.js.map +1 -0
  199. package/dist/core/export-html/tool-renderer.js +33 -347
  200. package/dist/core/export-html/tool-renderer.js.map +1 -1
  201. package/dist/core/extensions/jiti-loader.code.js +3 -0
  202. package/dist/core/extensions/jiti-loader.code.js.map +1 -0
  203. package/dist/core/extensions/jiti-loader.impl.js +36 -0
  204. package/dist/core/extensions/jiti-loader.impl.js.map +1 -0
  205. package/dist/core/extensions/jiti-loader.js +35 -2
  206. package/dist/core/extensions/jiti-static-loader.code.js +3 -0
  207. package/dist/core/extensions/jiti-static-loader.code.js.map +1 -0
  208. package/dist/core/extensions/jiti-static-loader.impl.js +36 -0
  209. package/dist/core/extensions/jiti-static-loader.impl.js.map +1 -0
  210. package/dist/core/extensions/jiti-static-loader.js +35 -2
  211. package/dist/core/extensions/loader-host-modules.code.js +3 -0
  212. package/dist/core/extensions/loader-host-modules.code.js.map +1 -0
  213. package/dist/core/extensions/loader-host-modules.impl.js +36 -0
  214. package/dist/core/extensions/loader-host-modules.impl.js.map +1 -0
  215. package/dist/core/extensions/loader-host-modules.js +35 -2
  216. package/dist/core/extensions/loader-virtual-modules.d.ts +1 -6
  217. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  218. package/dist/core/extensions/runner-context.js +3 -3
  219. package/dist/core/extensions/session-events.d.ts +4 -0
  220. package/dist/core/extensions/session-events.js.map +1 -1
  221. package/dist/core/intercom-broker-control-host.code.js +5 -0
  222. package/dist/core/intercom-broker-control-host.code.js.map +1 -0
  223. package/dist/core/intercom-broker-control-host.impl.js +36 -0
  224. package/dist/core/intercom-broker-control-host.impl.js.map +1 -0
  225. package/dist/core/intercom-broker-control-host.js +35 -4
  226. package/dist/core/intercom-broker-control.code.js +63 -0
  227. package/dist/core/intercom-broker-control.code.js.map +1 -0
  228. package/dist/core/intercom-broker-control.d.ts +21 -0
  229. package/dist/core/intercom-broker-control.impl.js +36 -0
  230. package/dist/core/intercom-broker-control.impl.js.map +1 -0
  231. package/dist/core/intercom-broker-control.js +35 -17
  232. package/dist/core/intercom-broker-control.js.map +1 -1
  233. package/dist/core/package-manager-storage-adapters.code.js +3 -0
  234. package/dist/core/package-manager-storage-adapters.code.js.map +1 -0
  235. package/dist/core/package-manager-storage-adapters.impl.js +36 -0
  236. package/dist/core/package-manager-storage-adapters.impl.js.map +1 -0
  237. package/dist/core/package-manager-storage-adapters.js +35 -2
  238. package/dist/core/process-start-token.d.ts +8 -2
  239. package/dist/core/process-tree-containment.d.ts +27 -0
  240. package/dist/core/queued-message-delivery.d.ts +5 -2
  241. package/dist/core/resume/blueprint/process.d.ts +3 -1
  242. package/dist/core/sdk.code.js +9 -0
  243. package/dist/core/sdk.code.js.map +1 -0
  244. package/dist/core/sdk.impl.js +36 -0
  245. package/dist/core/sdk.impl.js.map +1 -0
  246. package/dist/core/sdk.js +35 -8
  247. package/dist/core/session-manager-core.d.ts +15 -5
  248. package/dist/core/session-manager-core.js +195 -38
  249. package/dist/core/session-manager-core.js.map +1 -1
  250. package/dist/core/session-manager-list.code.js +3 -0
  251. package/dist/core/session-manager-list.code.js.map +1 -0
  252. package/dist/core/session-manager-list.impl.js +36 -0
  253. package/dist/core/session-manager-list.impl.js.map +1 -0
  254. package/dist/core/session-manager-list.js +35 -2
  255. package/dist/core/session-manager-types.d.ts +20 -0
  256. package/dist/core/session-manager.code.js +8 -0
  257. package/dist/core/session-manager.code.js.map +1 -0
  258. package/dist/core/session-manager.d.ts +1 -1
  259. package/dist/core/session-manager.impl.js +36 -0
  260. package/dist/core/session-manager.impl.js.map +1 -0
  261. package/dist/core/session-manager.js +35 -7
  262. package/dist/core/session-storage.code.js +3 -0
  263. package/dist/core/session-storage.code.js.map +1 -0
  264. package/dist/core/session-storage.impl.js +36 -0
  265. package/dist/core/session-storage.impl.js.map +1 -0
  266. package/dist/core/session-storage.js +35 -2
  267. package/dist/core/storage/file-identity.d.ts +3 -0
  268. package/dist/core/storage/file-identity.js +296 -86
  269. package/dist/core/storage/file-identity.js.map +1 -1
  270. package/dist/core/storage/index.d.ts +1 -1
  271. package/dist/core/storage/index.js +52 -7
  272. package/dist/core/storage/index.js.map +1 -1
  273. package/dist/core/storage/node-sqlite-thread.js +47 -2
  274. package/dist/core/storage/node-sqlite.js +49 -4
  275. package/dist/core/storage/node-sqlite.js.map +1 -1
  276. package/dist/core/storage/offline-snapshot-file.code.js +37 -0
  277. package/dist/core/storage/offline-snapshot-file.code.js.map +1 -0
  278. package/dist/core/storage/offline-snapshot-file.impl.js +36 -0
  279. package/dist/core/storage/offline-snapshot-file.impl.js.map +1 -0
  280. package/dist/core/storage/offline-snapshot-file.js +33 -34
  281. package/dist/core/storage/offline-snapshot-file.js.map +1 -1
  282. package/dist/core/storage/provider.js +52 -7
  283. package/dist/core/storage/selection.js +49 -4
  284. package/dist/core/storage/session/branch-fork-source.code.js +146 -0
  285. package/dist/core/storage/session/branch-fork-source.code.js.map +1 -0
  286. package/dist/core/storage/session/branch-fork-source.impl.js +36 -0
  287. package/dist/core/storage/session/branch-fork-source.impl.js.map +1 -0
  288. package/dist/core/storage/session/branch-fork-source.js +32 -97
  289. package/dist/core/storage/session/branch-fork-source.js.map +1 -1
  290. package/dist/core/storage/session/card-view.code.js +60 -0
  291. package/dist/core/storage/session/card-view.code.js.map +1 -0
  292. package/dist/core/storage/session/card-view.impl.js +36 -0
  293. package/dist/core/storage/session/card-view.impl.js.map +1 -0
  294. package/dist/core/storage/session/card-view.js +34 -58
  295. package/dist/core/storage/session/card-view.js.map +1 -1
  296. package/dist/core/storage/session/child-reader.code.js +139 -0
  297. package/dist/core/storage/session/child-reader.code.js.map +1 -0
  298. package/dist/core/storage/session/child-reader.d.ts +1 -0
  299. package/dist/core/storage/session/child-reader.impl.js +36 -0
  300. package/dist/core/storage/session/child-reader.impl.js.map +1 -0
  301. package/dist/core/storage/session/child-reader.js +33 -91
  302. package/dist/core/storage/session/child-reader.js.map +1 -1
  303. package/dist/core/storage/session/chunked-resume-projection.code.js +3 -0
  304. package/dist/core/storage/session/chunked-resume-projection.code.js.map +1 -0
  305. package/dist/core/storage/session/chunked-resume-projection.impl.js +36 -0
  306. package/dist/core/storage/session/chunked-resume-projection.impl.js.map +1 -0
  307. package/dist/core/storage/session/chunked-resume-projection.js +35 -2
  308. package/dist/core/storage/session/expanded-child-details.code.js +684 -0
  309. package/dist/core/storage/session/expanded-child-details.code.js.map +1 -0
  310. package/dist/core/storage/session/expanded-child-details.impl.js +36 -0
  311. package/dist/core/storage/session/expanded-child-details.impl.js.map +1 -0
  312. package/dist/core/storage/session/expanded-child-details.js +31 -634
  313. package/dist/core/storage/session/expanded-child-details.js.map +1 -1
  314. package/dist/core/storage/session/fork-row-bytes.code.js +3 -0
  315. package/dist/core/storage/session/fork-row-bytes.code.js.map +1 -0
  316. package/dist/core/storage/session/fork-row-bytes.impl.js +36 -0
  317. package/dist/core/storage/session/fork-row-bytes.impl.js.map +1 -0
  318. package/dist/core/storage/session/fork-row-bytes.js +35 -2
  319. package/dist/core/storage/session/fork-row-index.code.js +3 -0
  320. package/dist/core/storage/session/fork-row-index.code.js.map +1 -0
  321. package/dist/core/storage/session/fork-row-index.impl.js +36 -0
  322. package/dist/core/storage/session/fork-row-index.impl.js.map +1 -0
  323. package/dist/core/storage/session/fork-row-index.js +35 -2
  324. package/dist/core/storage/session/fork-staging.code.js +580 -0
  325. package/dist/core/storage/session/fork-staging.code.js.map +1 -0
  326. package/dist/core/storage/session/fork-staging.impl.js +36 -0
  327. package/dist/core/storage/session/fork-staging.impl.js.map +1 -0
  328. package/dist/core/storage/session/fork-staging.js +30 -574
  329. package/dist/core/storage/session/fork-staging.js.map +1 -1
  330. package/dist/core/storage/session/fork-window.code.js +522 -0
  331. package/dist/core/storage/session/fork-window.code.js.map +1 -0
  332. package/dist/core/storage/session/fork-window.impl.js +36 -0
  333. package/dist/core/storage/session/fork-window.impl.js.map +1 -0
  334. package/dist/core/storage/session/fork-window.js +30 -471
  335. package/dist/core/storage/session/fork-window.js.map +1 -1
  336. package/dist/core/storage/session/history-pages.code.js +3 -0
  337. package/dist/core/storage/session/history-pages.code.js.map +1 -0
  338. package/dist/core/storage/session/history-pages.impl.js +36 -0
  339. package/dist/core/storage/session/history-pages.impl.js.map +1 -0
  340. package/dist/core/storage/session/history-pages.js +35 -2
  341. package/dist/core/storage/session/jsonl-entry-projection.code.js +3 -0
  342. package/dist/core/storage/session/jsonl-entry-projection.code.js.map +1 -0
  343. package/dist/core/storage/session/jsonl-entry-projection.impl.js +36 -0
  344. package/dist/core/storage/session/jsonl-entry-projection.impl.js.map +1 -0
  345. package/dist/core/storage/session/jsonl-entry-projection.js +35 -2
  346. package/dist/core/storage/session/jsonl-session-store.code.js +3 -0
  347. package/dist/core/storage/session/jsonl-session-store.code.js.map +1 -0
  348. package/dist/core/storage/session/jsonl-session-store.impl.js +36 -0
  349. package/dist/core/storage/session/jsonl-session-store.impl.js.map +1 -0
  350. package/dist/core/storage/session/jsonl-session-store.js +35 -2
  351. package/dist/core/storage/session/memory-session-store.code.js +3 -0
  352. package/dist/core/storage/session/memory-session-store.code.js.map +1 -0
  353. package/dist/core/storage/session/memory-session-store.impl.js +36 -0
  354. package/dist/core/storage/session/memory-session-store.impl.js.map +1 -0
  355. package/dist/core/storage/session/memory-session-store.js +35 -2
  356. package/dist/core/storage/session/pinned-branch-resume.code.js +117 -0
  357. package/dist/core/storage/session/pinned-branch-resume.code.js.map +1 -0
  358. package/dist/core/storage/session/pinned-branch-resume.impl.js +36 -0
  359. package/dist/core/storage/session/pinned-branch-resume.impl.js.map +1 -0
  360. package/dist/core/storage/session/pinned-branch-resume.js +33 -69
  361. package/dist/core/storage/session/pinned-branch-resume.js.map +1 -1
  362. package/dist/core/storage/session/released-history-files.code.js +465 -0
  363. package/dist/core/storage/session/released-history-files.code.js.map +1 -0
  364. package/dist/core/storage/session/released-history-files.impl.js +36 -0
  365. package/dist/core/storage/session/released-history-files.impl.js.map +1 -0
  366. package/dist/core/storage/session/released-history-files.js +32 -461
  367. package/dist/core/storage/session/released-history-files.js.map +1 -1
  368. package/dist/core/storage/session/resident-fork-rows.code.js +57 -0
  369. package/dist/core/storage/session/resident-fork-rows.code.js.map +1 -0
  370. package/dist/core/storage/session/resident-fork-rows.impl.js +36 -0
  371. package/dist/core/storage/session/resident-fork-rows.impl.js.map +1 -0
  372. package/dist/core/storage/session/resident-fork-rows.js +32 -53
  373. package/dist/core/storage/session/resident-fork-rows.js.map +1 -1
  374. package/dist/core/storage/session/session-resume.code.js +3 -0
  375. package/dist/core/storage/session/session-resume.code.js.map +1 -0
  376. package/dist/core/storage/session/session-resume.impl.js +36 -0
  377. package/dist/core/storage/session/session-resume.impl.js.map +1 -0
  378. package/dist/core/storage/session/session-resume.js +35 -2
  379. package/dist/core/storage/session/snapshot-cut.code.js +3 -0
  380. package/dist/core/storage/session/snapshot-cut.code.js.map +1 -0
  381. package/dist/core/storage/session/snapshot-cut.impl.js +36 -0
  382. package/dist/core/storage/session/snapshot-cut.impl.js.map +1 -0
  383. package/dist/core/storage/session/snapshot-cut.js +35 -2
  384. package/dist/core/storage/session/snapshot-history.code.js +107 -0
  385. package/dist/core/storage/session/snapshot-history.code.js.map +1 -0
  386. package/dist/core/storage/session/snapshot-history.impl.js +36 -0
  387. package/dist/core/storage/session/snapshot-history.impl.js.map +1 -0
  388. package/dist/core/storage/session/snapshot-history.js +34 -60
  389. package/dist/core/storage/session/snapshot-history.js.map +1 -1
  390. package/dist/core/storage/session/sql-session-store.code.js +3 -0
  391. package/dist/core/storage/session/sql-session-store.code.js.map +1 -0
  392. package/dist/core/storage/session/sql-session-store.impl.js +36 -0
  393. package/dist/core/storage/session/sql-session-store.impl.js.map +1 -0
  394. package/dist/core/storage/session/sql-session-store.js +35 -2
  395. package/dist/core/storage/session/tree-outline.code.js +3 -0
  396. package/dist/core/storage/session/tree-outline.code.js.map +1 -0
  397. package/dist/core/storage/session/tree-outline.impl.js +36 -0
  398. package/dist/core/storage/session/tree-outline.impl.js.map +1 -0
  399. package/dist/core/storage/session/tree-outline.js +35 -2
  400. package/dist/core/storage/session/tree-presentation.code.js +342 -0
  401. package/dist/core/storage/session/tree-presentation.code.js.map +1 -0
  402. package/dist/core/storage/session/tree-presentation.impl.js +36 -0
  403. package/dist/core/storage/session/tree-presentation.impl.js.map +1 -0
  404. package/dist/core/storage/session/tree-presentation.js +31 -337
  405. package/dist/core/storage/session/tree-presentation.js.map +1 -1
  406. package/dist/core/storage/session/types.d.ts +26 -0
  407. package/dist/core/storage/storage-status.code.js +3 -0
  408. package/dist/core/storage/storage-status.code.js.map +1 -0
  409. package/dist/core/storage/storage-status.impl.js +36 -0
  410. package/dist/core/storage/storage-status.impl.js.map +1 -0
  411. package/dist/core/storage/storage-status.js +35 -2
  412. package/dist/core/storage/team.code.js +3 -0
  413. package/dist/core/storage/team.code.js.map +1 -0
  414. package/dist/core/storage/team.impl.js +36 -0
  415. package/dist/core/storage/team.impl.js.map +1 -0
  416. package/dist/core/storage/team.js +35 -2
  417. package/dist/core/structured-output/index.code.js +3 -0
  418. package/dist/core/structured-output/index.code.js.map +1 -0
  419. package/dist/core/structured-output/index.impl.js +36 -0
  420. package/dist/core/structured-output/index.impl.js.map +1 -0
  421. package/dist/core/structured-output/index.js +35 -2
  422. package/dist/core/tasks/command-output.d.ts +4 -1
  423. package/dist/core/tasks/supervisor.d.ts +2 -0
  424. package/dist/core/tasks/task-completion-entry.code.js +254 -0
  425. package/dist/core/tasks/task-completion-entry.code.js.map +1 -0
  426. package/dist/core/tasks/task-completion-entry.impl.js +36 -0
  427. package/dist/core/tasks/task-completion-entry.impl.js.map +1 -0
  428. package/dist/core/tasks/task-completion-entry.js +33 -251
  429. package/dist/core/tasks/task-completion-entry.js.map +1 -1
  430. package/dist/core/tasks/task-file-history.code.js +424 -0
  431. package/dist/core/tasks/task-file-history.code.js.map +1 -0
  432. package/dist/core/tasks/task-file-history.impl.js +36 -0
  433. package/dist/core/tasks/task-file-history.impl.js.map +1 -0
  434. package/dist/core/tasks/task-file-history.js +32 -375
  435. package/dist/core/tasks/task-file-history.js.map +1 -1
  436. package/dist/core/tasks/task-reference-archive.code.js +514 -0
  437. package/dist/core/tasks/task-reference-archive.code.js.map +1 -0
  438. package/dist/core/tasks/task-reference-archive.js +34 -467
  439. package/dist/core/tasks/task-reference-archive.js.map +1 -1
  440. package/dist/core/tasks/task-reference-identity.code.js +164 -0
  441. package/dist/core/tasks/task-reference-identity.code.js.map +1 -0
  442. package/dist/core/tasks/task-reference-identity.js +32 -160
  443. package/dist/core/tasks/task-reference-identity.js.map +1 -1
  444. package/dist/core/tasks/task-reference-stream.code.js +3 -0
  445. package/dist/core/tasks/task-reference-stream.code.js.map +1 -0
  446. package/dist/core/tasks/task-reference-stream.impl.js +36 -0
  447. package/dist/core/tasks/task-reference-stream.impl.js.map +1 -0
  448. package/dist/core/tasks/task-reference-stream.js +35 -2
  449. package/dist/core/tasks/task-unsaved-answer.code.js +3 -0
  450. package/dist/core/tasks/task-unsaved-answer.code.js.map +1 -0
  451. package/dist/core/tasks/task-unsaved-answer.impl.js +36 -0
  452. package/dist/core/tasks/task-unsaved-answer.impl.js.map +1 -0
  453. package/dist/core/tasks/task-unsaved-answer.js +35 -2
  454. package/dist/core/tasks/task-view-source.code.js +3 -0
  455. package/dist/core/tasks/task-view-source.code.js.map +1 -0
  456. package/dist/core/tasks/task-view-source.d.ts +9 -0
  457. package/dist/core/tasks/task-view-source.impl.js +36 -0
  458. package/dist/core/tasks/task-view-source.impl.js.map +1 -0
  459. package/dist/core/tasks/task-view-source.js +35 -2
  460. package/dist/core/tools/read-url.code.js +1530 -0
  461. package/dist/core/tools/read-url.code.js.map +1 -0
  462. package/dist/core/tools/read-url.impl.js +36 -0
  463. package/dist/core/tools/read-url.impl.js.map +1 -0
  464. package/dist/core/tools/read-url.js +30 -1524
  465. package/dist/core/tools/read-url.js.map +1 -1
  466. package/dist/core/worktree-snapshot/blob-store.js +50 -5
  467. package/dist/core/worktree-snapshot/errors.code.js +6 -0
  468. package/dist/core/worktree-snapshot/errors.code.js.map +1 -0
  469. package/dist/core/worktree-snapshot/errors.impl.js +36 -0
  470. package/dist/core/worktree-snapshot/errors.impl.js.map +1 -0
  471. package/dist/core/worktree-snapshot/errors.js +35 -5
  472. package/dist/core/worktree-snapshot/session-index-reset.code.js +136 -0
  473. package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -0
  474. package/dist/core/worktree-snapshot/session-index-reset.impl.js +36 -0
  475. package/dist/core/worktree-snapshot/session-index-reset.impl.js.map +1 -0
  476. package/dist/core/worktree-snapshot/session-index-reset.js +34 -134
  477. package/dist/core/worktree-snapshot/session-index-reset.js.map +1 -1
  478. package/dist/extensions/codemode/execute.code.js +618 -0
  479. package/dist/extensions/codemode/execute.code.js.map +1 -0
  480. package/dist/extensions/codemode/execute.impl.js +36 -0
  481. package/dist/extensions/codemode/execute.impl.js.map +1 -0
  482. package/dist/extensions/codemode/execute.js +30 -612
  483. package/dist/extensions/codemode/execute.js.map +1 -1
  484. package/dist/extensions/codemode/renderer.code.js +110 -0
  485. package/dist/extensions/codemode/renderer.code.js.map +1 -0
  486. package/dist/extensions/codemode/renderer.impl.js +36 -0
  487. package/dist/extensions/codemode/renderer.impl.js.map +1 -0
  488. package/dist/extensions/codemode/renderer.js +33 -107
  489. package/dist/extensions/codemode/renderer.js.map +1 -1
  490. package/dist/extensions/mcp/cli.code.js +565 -0
  491. package/dist/extensions/mcp/cli.code.js.map +1 -0
  492. package/dist/extensions/mcp/cli.impl.js +36 -0
  493. package/dist/extensions/mcp/cli.impl.js.map +1 -0
  494. package/dist/extensions/mcp/cli.js +32 -561
  495. package/dist/extensions/mcp/cli.js.map +1 -1
  496. package/dist/extensions/mcp/cli.lazy.code.js +52 -0
  497. package/dist/extensions/mcp/cli.lazy.code.js.map +1 -0
  498. package/dist/extensions/mcp/cli.lazy.impl.js +36 -0
  499. package/dist/extensions/mcp/cli.lazy.impl.js.map +1 -0
  500. package/dist/extensions/mcp/cli.lazy.js +36 -7
  501. package/dist/extensions/mcp/cli.lazy.js.map +1 -1
  502. package/dist/extensions/mcp/client/transports/stdio.d.ts +2 -0
  503. package/dist/extensions/mcp/runtime.code.js +5 -0
  504. package/dist/extensions/mcp/runtime.code.js.map +1 -0
  505. package/dist/extensions/mcp/runtime.impl.js +36 -0
  506. package/dist/extensions/mcp/runtime.impl.js.map +1 -0
  507. package/dist/extensions/mcp/runtime.js +35 -4
  508. package/dist/index.d.ts +1 -1
  509. package/dist/index.js +8 -8
  510. package/dist/main-first-time-setup.code.js +12 -0
  511. package/dist/main-first-time-setup.code.js.map +1 -0
  512. package/dist/main-first-time-setup.impl.js +36 -0
  513. package/dist/main-first-time-setup.impl.js.map +1 -0
  514. package/dist/main-first-time-setup.js +35 -11
  515. package/dist/main-first-time-setup.js.map +1 -1
  516. package/dist/main.d.ts +1 -1
  517. package/dist/main.js +2 -2
  518. package/dist/modes/interactive/agent-view/agent-view-switcher.d.ts +6 -1
  519. package/dist/modes/interactive/agent-view/contracts.d.ts +4 -0
  520. package/dist/modes/interactive/chat-reader-records.d.ts +1 -1
  521. package/dist/modes/interactive/components/stored-tree-view.code.js +338 -0
  522. package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -0
  523. package/dist/modes/interactive/components/stored-tree-view.impl.js +36 -0
  524. package/dist/modes/interactive/components/stored-tree-view.impl.js.map +1 -0
  525. package/dist/modes/interactive/components/stored-tree-view.js +33 -290
  526. package/dist/modes/interactive/components/stored-tree-view.js.map +1 -1
  527. package/dist/modes/interactive/components/task-selection-state.d.ts +8 -3
  528. package/dist/modes/interactive/components/task-transcript-page.d.ts +1 -0
  529. package/dist/modes/interactive/components/user-message-selector-archive.code.js +191 -0
  530. package/dist/modes/interactive/components/user-message-selector-archive.code.js.map +1 -0
  531. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +36 -0
  532. package/dist/modes/interactive/components/user-message-selector-archive.impl.js.map +1 -0
  533. package/dist/modes/interactive/components/user-message-selector-archive.js +34 -189
  534. package/dist/modes/interactive/components/user-message-selector-archive.js.map +1 -1
  535. package/dist/modes/interactive/interactive-mode-base.d.ts +6 -0
  536. package/dist/modes/interactive/interactive-mode-deps.js +4 -0
  537. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -0
  538. package/dist/modes/interactive/interactive-mode.js +1 -1
  539. package/dist/modes/interactive/interactive-queueing.d.ts +4 -0
  540. package/dist/modes/interactive/interactive-render-chat.d.ts +22 -0
  541. package/dist/modes/interactive/interactive-startup.d.ts +2 -0
  542. package/dist/modes/interactive/program-status-reporter.d.ts +2 -1
  543. package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
  544. package/dist/modes/interactive/steering-queue-controller.d.ts +4 -0
  545. package/dist/modes/interactive/theme/theme-schema-factory.d.ts +26 -0
  546. package/dist/modes/interactive/theme/theme-schema.d.ts +4 -5
  547. package/dist/modes/interactive-engine/engine-prewarm.d.ts +30 -5
  548. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  549. package/dist/modes/interactive-engine/isolated-runtime.d.ts +7 -0
  550. package/dist/modes/interactive-engine/protocol.d.ts +32 -1
  551. package/dist/modes/rpc/agent-view-rpc-types.d.ts +12 -1
  552. package/dist/modes/rpc/agent-view-rpc-types.js.map +1 -1
  553. package/dist/modes/rpc/rpc-client-api.d.ts +3 -1
  554. package/dist/modes/rpc/rpc-types.d.ts +12 -0
  555. package/dist/package-manager-cli.code.js +1140 -0
  556. package/dist/package-manager-cli.code.js.map +1 -0
  557. package/dist/package-manager-cli.impl.js +36 -0
  558. package/dist/package-manager-cli.impl.js.map +1 -0
  559. package/dist/package-manager-cli.js +36 -1067
  560. package/dist/package-manager-cli.js.map +1 -1
  561. package/dist/rpc-entry.js +2 -2
  562. package/dist/startup-files.json +1 -1
  563. package/dist/startup-stages/10.js +1 -1
  564. package/dist/startup-stages/11.js +1 -1
  565. package/dist/startup-stages/12.js +1 -1
  566. package/dist/startup-stages/13.js +1 -0
  567. package/dist/startup-stages/2.js +1 -7
  568. package/dist/startup-stages/3.js +6 -2
  569. package/dist/startup-stages/4.js +2 -1
  570. package/dist/startup-stages/5.js +1 -7
  571. package/dist/startup-stages/6.js +7 -10
  572. package/dist/startup-stages/7.js +10 -3
  573. package/dist/startup-stages/8.js +3 -6
  574. package/dist/startup-stages/9.js +6 -1
  575. package/dist/startup-stages/stages.json +1 -1
  576. package/dist/utils/canonical-path.js +2 -0
  577. package/dist/utils/canonical-path.js.map +1 -1
  578. package/dist/utils/child-process.d.ts +41 -1
  579. package/dist/utils/compile-cache-warmup-host.js +63 -18
  580. package/dist/utils/compile-cache-warmup-host.js.map +1 -1
  581. package/dist/utils/credential-redaction.d.ts +50 -1
  582. package/dist/utils/interactive-engine-bootstrap.d.ts +2 -0
  583. package/dist/utils/interactive-engine-env.d.ts +2 -0
  584. package/dist/utils/memoize-async.d.ts +32 -0
  585. package/dist/utils/memoize-async.js +91 -0
  586. package/dist/utils/memoize-async.js.map +1 -0
  587. package/dist/utils/photon.js +19 -29
  588. package/dist/utils/photon.js.map +1 -1
  589. package/dist/utils/shell.d.ts +7 -4
  590. package/dist/utils/startup-database-spare.code.js +108 -0
  591. package/dist/utils/startup-database-spare.code.js.map +1 -0
  592. package/dist/utils/startup-database-spare.impl.js +36 -0
  593. package/dist/utils/startup-database-spare.impl.js.map +1 -0
  594. package/dist/utils/startup-database-spare.js +33 -105
  595. package/dist/utils/startup-database-spare.js.map +1 -1
  596. package/dist/utils/tools-manager.code.js +3 -0
  597. package/dist/utils/tools-manager.code.js.map +1 -0
  598. package/dist/utils/tools-manager.impl.js +36 -0
  599. package/dist/utils/tools-manager.impl.js.map +1 -0
  600. package/dist/utils/tools-manager.js +35 -2
  601. package/dist/utils/windows-cwd.js +585 -0
  602. package/dist/utils/windows-cwd.js.map +1 -0
  603. package/docs/extensions.md +1 -1
  604. package/docs/getting-started/installation.md +2 -0
  605. package/docs/intercom/operations.md +1 -0
  606. package/docs/reference/cli.md +2 -2
  607. package/package.json +24 -24
  608. package/dist/_shared/mode-shared-HP7GUA7J.js.map +0 -1
  609. package/dist/_shared/p1a-prewarm-YK3KDTLN.js.map +0 -1
  610. package/dist/_shared/p1b-elig-PXQA2FYP.js.map +0 -1
  611. package/dist/_shared/startup-0-0-X4NF3GKM.js.map +0 -1
  612. package/dist/_shared/startup-0-1-7QTG6VJZ.js.map +0 -1
  613. package/dist/_shared/startup-0-2-KFDYPDJK.js.map +0 -1
  614. package/dist/_shared/startup-8-1-KQJBDKRU.js.map +0 -1
@@ -1,11 +1,12 @@
1
1
  import { __commonJSMin, __name, __require, __toESM } from "./rolldown-runtime-BGM3D5V3.js";
2
- import { APP_NAME, 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, missingHelperOptions, resolvePath, stripBom, waitForChildProcess } from "./p0-cli-GUFK7TPN.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, attachSessionClaim, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, 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, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, leadingAndTrailingWs, leadingWs, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, parseTranscriptFrameLayout, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, setFunctionList, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, toError, trailingWs, uniquifyToolCallIds, validQuestionnaire, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-X4NF3GKM.js";
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, attachSessionClaim, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, 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, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, leadingAndTrailingWs, leadingWs, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, parseTranscriptFrameLayout, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, setFunctionList, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, toError, trailingWs, uniquifyToolCallIds, validQuestionnaire, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-TYUFUOJZ.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
- import { failureDebugFields, findInCauseChain, hasErrorIdentity, ownProcessStartToken, readProcessStartToken, reportDebugAsync, serializeErrorCause } from "./p1b-elig-PXQA2FYP.js";
5
+ import { failureDebugFields, findInCauseChain, hasErrorIdentity, ownProcessStartToken, readProcessStartToken, reportDebugAsync, serializeErrorCause } from "./p1b-elig-ENCUPKKJ.js";
6
6
  import { windowsPowerShellEnvironment } from "./p1-elig-shell-WWRO3L2R.js";
7
7
  import { SessionOpenElsewhereError, parseSerializedDecisionError } from "./settings-startup-65YEWRV2.js";
8
8
  import { SETTINGS_DEFAULTS } from "./p2-common-YLSYXMDQ.js";
9
+ import { interactiveEngineStartupEnv } from "./p1a-prewarm-UQY3X2UK.js";
9
10
  import { access, lstat, mkdir, open, readFile, readdir, rename, rm, rmdir, stat, unlink, writeFile } from "node:fs/promises";
10
11
  import { existsSync, readFileSync, readdirSync, statSync } from "fs";
11
12
  import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "path";
@@ -22,18 +23,19 @@ import chalk from "chalk";
22
23
  import { SessionBlobError, StorageConfigError, StorageError, isStorageError, rehydrateStorageError, serializeStorageError } from "../core/storage/errors.js";
23
24
  import { renderStorageIdentifiers, storageMigrationTable, validateStoragePrefix } from "../core/storage/prefix.js";
24
25
  import { chmod as chmod$1, lstat as lstat$1, mkdir as mkdir$1, mkdtemp as mkdtemp$1, open as open$1, readFile as readFile$1, readdir as readdir$1, readlink as readlink$1, rename as rename$1, rm as rm$1, stat as stat$2, utimes as utimes$1, writeFile as writeFile$1 } from "fs/promises";
25
- import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
26
26
  import { createHash, randomBytes, randomUUID } from "node:crypto";
27
27
  import lockfile from "proper-lockfile";
28
28
  import { StringEnum, clampThinkingLevel, getApiProvider } from "@bastani/atomic-ai/compat";
29
29
  import { createHash as createHash$1, randomUUID as randomUUID$1 } from "crypto";
30
30
  import { setTimeout as setTimeout$1 } from "timers/promises";
31
31
  import { AsyncLocalStorage } from "node:async_hooks";
32
+ import { memoizeAsync } from "../utils/memoize-async.js";
32
33
  import { refreshGitHubCopilotAccountModelLists } from "@bastani/atomic-ai/providers/github-copilot";
33
34
  import { clearTimeout as clearTimeout$1, setTimeout as setTimeout$2 } from "node:timers";
34
35
  import { Buffer as Buffer$1, constants as constants$3 } from "node:buffer";
35
36
  import { StringDecoder } from "node:string_decoder";
36
37
  import { isProxy } from "node:util/types";
38
+ import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
37
39
  import { dialectOf } from "../core/storage/dialect.js";
38
40
  import { applyStorageMigrations, withShortSchemaLockWaits } from "../core/storage/migrations.js";
39
41
  import { sequenceRunner } from "../core/storage/statement-sequence.js";
@@ -4913,20 +4915,18 @@ async function loadPngTranscoder() {
4913
4915
  return pngBytes ? Buffer.from(pngBytes).toString("base64") : null;
4914
4916
  };
4915
4917
  }
4916
- let pngTranscoderLoad;
4917
- let pngTranscoderRegistered = false;
4918
+ const registerPngTranscoder = memoizeAsync(async () => {
4919
+ const transcoder = await loadPngTranscoder();
4920
+ if (!transcoder) return false;
4921
+ setImageTranscoder(transcoder);
4922
+ return true;
4923
+ }, { shouldCache: (registered) => registered });
4918
4924
  /** Register the PNG transcoder on Kitty terminals, then redraw callers' fallback images. */
4919
4925
  function ensurePngTranscoder(onRegistered) {
4920
- if (pngTranscoderRegistered || getCapabilities().images !== "kitty") return;
4921
- pngTranscoderLoad ??= loadPngTranscoder().then((transcoder) => {
4922
- if (!transcoder) return false;
4923
- setImageTranscoder(transcoder);
4924
- pngTranscoderRegistered = true;
4925
- return true;
4926
- });
4927
- pngTranscoderLoad.then((registered) => {
4926
+ if (registerPngTranscoder.peek() === true || getCapabilities().images !== "kitty") return;
4927
+ registerPngTranscoder().then((registered) => {
4928
4928
  if (registered) onRegistered();
4929
- });
4929
+ }, () => {});
4930
4930
  }
4931
4931
  // dist/utils/image-resize-core.js
4932
4932
  const IMAGE_RESIZE_WORKER_RESPONSE_TYPE = "pi:image-resize-response";
@@ -7038,7 +7038,8 @@ function createLazyBuiltinFactory(spec, loadImplementation) {
7038
7038
  eventName: "session_start",
7039
7039
  event: {
7040
7040
  type: "session_start",
7041
- reason: "startup"
7041
+ reason: "startup",
7042
+ ...interactiveEngineStartupEnv().restarted ? { engineRestart: true } : {}
7042
7043
  },
7043
7044
  ctx,
7044
7045
  generation: ++lifecycleGeneration,
@@ -7092,7 +7093,8 @@ function createLazyBuiltinFactory(spec, loadImplementation) {
7092
7093
  eventName: "session_start",
7093
7094
  event: {
7094
7095
  type: "session_start",
7095
- reason: "startup"
7096
+ reason: "startup",
7097
+ ...interactiveEngineStartupEnv().restarted ? { engineRestart: true } : {}
7096
7098
  },
7097
7099
  ctx,
7098
7100
  generation: ++lifecycleGeneration,
@@ -8483,9 +8485,11 @@ async function execCommand(command, args, cwd, options, onQuit) {
8483
8485
  })();
8484
8486
  return treeStop;
8485
8487
  };
8488
+ const waitAbort = new AbortController();
8486
8489
  const killProcess = (startedAborted = false) => {
8487
8490
  if (killed) return;
8488
8491
  killed = true;
8492
+ waitAbort.abort();
8489
8493
  if (startedAborted) proc.kill("SIGTERM");
8490
8494
  else endTree();
8491
8495
  forceKillId = setTimeout(() => {
@@ -8537,11 +8541,12 @@ async function execCommand(command, args, cwd, options, onQuit) {
8537
8541
  });
8538
8542
  let code;
8539
8543
  try {
8540
- code = await waitForChildProcess(proc);
8544
+ code = await waitForChildProcess(proc, { signal: waitAbort.signal });
8541
8545
  } catch (error) {
8542
8546
  if (!(error instanceof Error)) throw error;
8543
8547
  code = 1;
8544
- if (!stderr) stderr = error.message;
8548
+ if (!killed && isChildProcessExitStatusUnknownError(error)) stderr = stderr ? `${stderr}\n${error.message}` : error.message;
8549
+ else if (!stderr) stderr = error.message;
8545
8550
  } finally {
8546
8551
  clearTimeout(timeoutId);
8547
8552
  options?.signal?.removeEventListener("abort", abort);
@@ -9786,8 +9791,6 @@ async function deleteFileChatRecords(owner) {
9786
9791
  }
9787
9792
  // dist/core/extensions/loader-host-modules.js
9788
9793
  const __atomicDistModuleUrl = new URL("../core/extensions/loader-host-modules.js", import.meta.url).href;
9789
- let virtualModules = null;
9790
- let virtualModulesPromise = null;
9791
9794
  function loadOptionalAtomicNatives(requireFromHost, specifier) {
9792
9795
  try {
9793
9796
  return requireFromHost(specifier);
@@ -9798,38 +9801,38 @@ function loadOptionalAtomicNatives(requireFromHost, specifier) {
9798
9801
  async function loadVirtualModules() {
9799
9802
  const atomicNatives = loadOptionalAtomicNatives(createModuleRequire(__atomicDistModuleUrl), isBunBinary ? join$1(getPackageDir(), "node_modules", "@bastani", "atomic-natives", "native", "index.js") : "@bastani/atomic-natives");
9800
9803
  const [typebox, typeboxCompile, typeboxError, typeboxFormat, typeboxGuard, typeboxSchema, typeboxSystem, typeboxType, typeboxValue, agentCore, tui, tuiLayout, tuiLayoutNode, ai, aiOauth, aiModels, aiProviders, aiCloudflareGatewayBinding, aiProviderEnv, aiOauthPage, codemode, codemodeDeclarations, codemodeSource, codemodePortable, codemodeNodeOptions, schema, schemaFormats, telemetry, telemetryRender, properLockfile, codingAgent, storage] = await Promise.all([
9801
- import("@bastani/atomic-ai/utils/typebox/index"),
9802
- import("@bastani/atomic-ai/utils/typebox/compile"),
9803
- import("@bastani/atomic-ai/utils/typebox/error"),
9804
- import("@bastani/atomic-ai/utils/typebox/format"),
9805
- import("@bastani/atomic-ai/utils/typebox/guard"),
9806
- import("@bastani/atomic-ai/utils/typebox/schema"),
9807
- import("@bastani/atomic-ai/utils/typebox/system"),
9808
- import("@bastani/atomic-ai/utils/typebox/type"),
9809
- import("@bastani/atomic-ai/utils/typebox/value"),
9810
- import("@bastani/atomic-agent-core"),
9811
- import("@bastani/atomic-tui"),
9812
- import("@bastani/atomic-tui/dist/layout.js"),
9813
- import("@bastani/atomic-tui/dist/layout-node.js"),
9814
- import("@bastani/atomic-ai/compat"),
9815
- import("@bastani/atomic-ai/oauth"),
9816
- import("@bastani/atomic-ai/models"),
9817
- import("@bastani/atomic-ai/providers/all"),
9818
- import("@bastani/atomic-ai/api/cloudflare-gateway-binding"),
9819
- import("@bastani/atomic-ai/utils/provider-env"),
9820
- import("@bastani/atomic-ai/utils/oauth-page"),
9821
- import("@bastani/atomic-codemode"),
9822
- import("@bastani/atomic-codemode/declarations"),
9823
- import("@bastani/atomic-codemode/source"),
9824
- import("@bastani/atomic-codemode/portable"),
9825
- import("@bastani/atomic-codemode/node-options"),
9826
- import("@bastani/atomic-schema"),
9827
- import("@bastani/atomic-schema/formats"),
9828
- import("@bastani/atomic-telemetry"),
9829
- import("@bastani/atomic-telemetry/render"),
9804
+ import("@bastani/atomic-ai/utils/typebox/index").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9805
+ import("@bastani/atomic-ai/utils/typebox/compile").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9806
+ import("@bastani/atomic-ai/utils/typebox/error").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9807
+ import("@bastani/atomic-ai/utils/typebox/format").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9808
+ import("@bastani/atomic-ai/utils/typebox/guard").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9809
+ import("@bastani/atomic-ai/utils/typebox/schema").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9810
+ import("@bastani/atomic-ai/utils/typebox/system").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9811
+ import("@bastani/atomic-ai/utils/typebox/type").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9812
+ import("@bastani/atomic-ai/utils/typebox/value").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9813
+ import("@bastani/atomic-agent-core").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9814
+ import("@bastani/atomic-tui").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9815
+ import("@bastani/atomic-tui/dist/layout.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9816
+ import("@bastani/atomic-tui/dist/layout-node.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9817
+ import("@bastani/atomic-ai/compat").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9818
+ import("@bastani/atomic-ai/oauth").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9819
+ import("@bastani/atomic-ai/models").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9820
+ import("@bastani/atomic-ai/providers/all").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9821
+ import("@bastani/atomic-ai/api/cloudflare-gateway-binding").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9822
+ import("@bastani/atomic-ai/utils/provider-env").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9823
+ import("@bastani/atomic-ai/utils/oauth-page").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9824
+ import("@bastani/atomic-codemode").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9825
+ import("@bastani/atomic-codemode/declarations").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9826
+ import("@bastani/atomic-codemode/source").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9827
+ import("@bastani/atomic-codemode/portable").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9828
+ import("@bastani/atomic-codemode/node-options").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9829
+ import("@bastani/atomic-schema").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9830
+ import("@bastani/atomic-schema/formats").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9831
+ import("@bastani/atomic-telemetry").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9832
+ import("@bastani/atomic-telemetry/render").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9830
9833
  import("proper-lockfile"),
9831
- import("../index.js"),
9832
- import("../core/storage/index.js")
9834
+ import("../index.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9835
+ import("../core/storage/index.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))
9833
9836
  ]);
9834
9837
  const typeboxModules = {
9835
9838
  "": typebox,
@@ -9882,40 +9885,38 @@ function prefixedModules(name, modules) {
9882
9885
  return Object.fromEntries(Object.entries(modules).map(([subpath, module]) => [`${name}${subpath}`, module]));
9883
9886
  }
9884
9887
  const loaderHostModulesTestHooks = { loadOptionalAtomicNatives };
9885
- async function getVirtualModules() {
9886
- if (virtualModules) return virtualModules;
9887
- virtualModulesPromise ??= loadVirtualModules().then((modules) => {
9888
- virtualModules = modules;
9889
- return modules;
9890
- }, (error) => {
9891
- virtualModulesPromise = null;
9892
- throw error;
9893
- });
9894
- return virtualModulesPromise;
9888
+ const cachedVirtualModules = memoizeAsync(loadVirtualModules);
9889
+ function getVirtualModules() {
9890
+ return cachedVirtualModules();
9895
9891
  }
9896
9892
  async function getStorageAdapterHostModules() {
9897
- const storage = await import("../core/storage/index.js");
9893
+ const storage = await import("../core/storage/index.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
9898
9894
  if (!(isBunBinary || isBundledBuild)) return { "@bastani/atomic/storage": storage };
9899
9895
  return {
9900
- "@bastani/atomic": await import("../index.js"),
9896
+ "@bastani/atomic": await import("../index.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
9901
9897
  "@bastani/atomic/storage": storage
9902
9898
  };
9903
9899
  }
9904
9900
  // dist/core/extensions/native-builtin-entries.js
9905
- let nativeBuiltinExtensionEntries;
9901
+ function candidateNativeBuiltinEntries() {
9902
+ return getBuiltinPackageLocations().map(({ distDirName, packageDir }) => resolve$1(packageDir, INSTALLED_EXTENSION_ENTRIES[distDirName]));
9903
+ }
9906
9904
  async function findNativeBuiltinExtensionEntries() {
9907
- const entries = await Promise.all(getBuiltinPackageLocations().map(async ({ distDirName, packageDir }) => {
9908
- const entryPath = resolve$1(packageDir, INSTALLED_EXTENSION_ENTRIES[distDirName]);
9909
- return access(entryPath).then(() => [entryPath], () => []);
9910
- }));
9911
- return new Set(entries.flat());
9905
+ const candidates = candidateNativeBuiltinEntries();
9906
+ const found = await Promise.all(candidates.map((entryPath) => access(entryPath).then(() => [entryPath], () => [])));
9907
+ const entries = new Set(found.flat());
9908
+ return {
9909
+ entries,
9910
+ complete: candidates.length === BUILTIN_PACKAGE_DIR_NAMES.length && entries.size === candidates.length
9911
+ };
9912
9912
  }
9913
+ const loadNativeBuiltinExtensionEntries = memoizeAsync(findNativeBuiltinExtensionEntries, { shouldCache: (result) => result.complete });
9913
9914
  /** Exact installed entry paths belonging to identity-verified Atomic builtin packages. */
9914
- function getNativeBuiltinExtensionEntries() {
9915
- nativeBuiltinExtensionEntries ??= findNativeBuiltinExtensionEntries();
9916
- return nativeBuiltinExtensionEntries;
9915
+ async function getNativeBuiltinExtensionEntries() {
9916
+ return (await loadNativeBuiltinExtensionEntries()).entries;
9917
9917
  }
9918
9918
  async function isNativeBuiltinExtensionPath(resolvedPath) {
9919
+ if (!candidateNativeBuiltinEntries().includes(resolvedPath)) return false;
9919
9920
  return (await getNativeBuiltinExtensionEntries()).has(resolvedPath);
9920
9921
  }
9921
9922
  /**
@@ -13639,6 +13640,127 @@ function rejectMalformedToolArguments(tool, getMessages) {
13639
13640
  }
13640
13641
  };
13641
13642
  }
13643
+ // dist/core/tools/session-history.js
13644
+ /** Characters one call may return; longer output is cut and says so. */
13645
+ const MAX_OUTPUT_CHARS = 5e4;
13646
+ const CURSOR_VALUE = /^\d+(?:\.\d+){0,3}$/;
13647
+ const sessionHistorySchema = Type$1.Object({
13648
+ pattern: Type$1.Optional(Type$1.String({ description: "Regular expression to search this session's history for. Keep it and set `lines` to a `?cursor=` URL to continue." })),
13649
+ lines: Type$1.Optional(Type$1.String({ description: "An entry range of this session's history to read, such as \"120-260\", or a `?cursor=` URL to continue." }))
13650
+ });
13651
+ function capped(text) {
13652
+ return text.length <= MAX_OUTPUT_CHARS ? text : `${text.slice(0, MAX_OUTPUT_CHARS)}\n[output cut at ${MAX_OUTPUT_CHARS} characters; narrow the search or the range]`;
13653
+ }
13654
+ function clampSpanEnd(start, end) {
13655
+ const maxEnd = Math.min(Number.MAX_SAFE_INTEGER, start + Math.min(399, Number.MAX_SAFE_INTEGER - start));
13656
+ return Math.min(end, maxEnd);
13657
+ }
13658
+ function parseEntryRange(value, label, capSpan) {
13659
+ const match = /^(\d+)(?:\s*-\s*(\d+))?$/.exec(value.trim());
13660
+ if (!match) throw new Error(`Invalid lines "${label}": use an entry range such as "120-260".`);
13661
+ const start = Number(match[1]);
13662
+ const end = match[2] === void 0 ? start : Number(match[2]);
13663
+ if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || start < 1 || end < start) throw new Error(`Invalid lines "${label}": the entry range must start at 1 or later.`);
13664
+ return {
13665
+ start,
13666
+ end: capSpan ? clampSpanEnd(start, end) : end
13667
+ };
13668
+ }
13669
+ function parseCursorQuery(query, label) {
13670
+ const params = new URLSearchParams(query);
13671
+ const keys = [...params.keys()];
13672
+ const cursor = params.get("cursor");
13673
+ if (keys.length !== 1 || keys[0] !== "cursor" || !cursor || !CURSOR_VALUE.test(cursor)) throw new Error(`Invalid lines "${label}": only ?cursor= continuations for this session are allowed.`);
13674
+ const parts = cursor.split(".").map((part) => Number(part));
13675
+ const firstSeq = parts[0] ?? 0;
13676
+ if (parts.some((part) => !Number.isSafeInteger(part) || part < 0) || firstSeq < 1) throw new Error(`Invalid lines "${label}": cursor positions must be safe positive integers.`);
13677
+ return {
13678
+ query: `?cursor=${cursor}`,
13679
+ firstSeq
13680
+ };
13681
+ }
13682
+ function parseTarget(baseUrl, rawLines, capSpan) {
13683
+ const trimmed = rawLines.trim();
13684
+ let rest = trimmed;
13685
+ if (trimmed.startsWith("history://")) {
13686
+ if (!trimmed.startsWith(baseUrl)) throw new Error(`Invalid lines "${rawLines}": only this session's history (${baseUrl}) is reachable.`);
13687
+ rest = trimmed.slice(baseUrl.length);
13688
+ if (rest === "" || rest[0] !== "?" && rest[0] !== ":") throw new Error(`Invalid lines "${rawLines}": only this session's history (${baseUrl}) is reachable.`);
13689
+ }
13690
+ let query = "";
13691
+ let cursorStart = 1;
13692
+ if (rest.startsWith("?")) {
13693
+ const colon = rest.indexOf(":");
13694
+ const parsedCursor = parseCursorQuery(colon >= 0 ? rest.slice(1, colon) : rest.slice(1), rawLines);
13695
+ query = parsedCursor.query;
13696
+ cursorStart = parsedCursor.firstSeq;
13697
+ rest = colon >= 0 ? rest.slice(colon + 1) : "";
13698
+ } else if (rest.startsWith(":")) rest = rest.slice(1);
13699
+ if (rest === "" && query !== "") return capSpan ? {
13700
+ url: `${baseUrl}${query}`,
13701
+ range: {
13702
+ start: cursorStart,
13703
+ end: clampSpanEnd(cursorStart, Number.MAX_SAFE_INTEGER)
13704
+ }
13705
+ } : { url: `${baseUrl}${query}` };
13706
+ return {
13707
+ url: `${baseUrl}${query}`,
13708
+ range: parseEntryRange(rest, rawLines, capSpan)
13709
+ };
13710
+ }
13711
+ /**
13712
+ * Read-only access to this session's own history, for an agent whose tools do not include `read` and `search`. It
13713
+ * reaches only `history://sessions/<own id>`: no other session, file or project.
13714
+ */
13715
+ function createSessionHistoryToolDefinition(name, options) {
13716
+ return {
13717
+ name,
13718
+ label: "Session history",
13719
+ description: "Search or read this session's own history after its context was cleared. When the context-cleared message tells you to `search` or `read` `history://sessions/<id>` and those tools are not available, use this tool instead: pass {\"pattern\": \"<regex>\"} to search (each match names its entry), then {\"lines\": \"N-M\"} to read a narrow entry range verbatim. Only this session's history is reachable.",
13720
+ parameters: sessionHistorySchema,
13721
+ promptSnippet: "Search and read this session's own history after a context clear (use in place of search/read on history://sessions/<id>)",
13722
+ execute: async (_toolCallId, { pattern, lines }, signal) => {
13723
+ const baseUrl = `history://sessions/${options.sessionId()}`;
13724
+ const router = options.router();
13725
+ if (pattern !== void 0 && pattern.trim() !== "") {
13726
+ const target = lines !== void 0 && lines.trim() !== "" ? parseTarget(baseUrl, lines, false) : void 0;
13727
+ const searchUrl = target ? target.url : baseUrl;
13728
+ if (!router.search) throw new Error(`Bounded history search is unavailable for ${baseUrl}.`);
13729
+ const found = await router.search(searchUrl, {
13730
+ pattern,
13731
+ ignoreCase: false,
13732
+ literal: false,
13733
+ contextBefore: 0,
13734
+ contextAfter: 0,
13735
+ ...target?.range ? { ranges: [target.range] } : {},
13736
+ ...signal === void 0 ? {} : { signal }
13737
+ });
13738
+ return {
13739
+ content: [{
13740
+ type: "text",
13741
+ text: capped(found?.trim() ? found : "No matches.")
13742
+ }],
13743
+ details: void 0
13744
+ };
13745
+ }
13746
+ if (lines === void 0) throw new Error("Pass {\"pattern\": \"<regex>\"} to search or {\"lines\": \"N-M\"} to read.");
13747
+ if (!router.readSelected) throw new Error(`Bounded history read is unavailable for ${baseUrl}.`);
13748
+ const { url, range } = parseTarget(baseUrl, lines, true);
13749
+ const transcript = await router.readSelected(url, {
13750
+ ...range ? { ranges: [range] } : {},
13751
+ ...signal === void 0 ? {} : { signal }
13752
+ });
13753
+ if (typeof transcript !== "string") throw new Error(`Bounded history read returned no transcript for ${baseUrl}.`);
13754
+ return {
13755
+ content: [{
13756
+ type: "text",
13757
+ text: capped(transcript)
13758
+ }],
13759
+ details: void 0
13760
+ };
13761
+ }
13762
+ };
13763
+ }
13642
13764
  // dist/core/tools/tool-concurrency.js
13643
13765
  function resolveToolConcurrency(concurrency, args) {
13644
13766
  if (typeof concurrency !== "function") return concurrency ?? "shared";
@@ -16833,10 +16955,14 @@ function resolveCompactionModel(configured, models) {
16833
16955
  function migrateCompactionModelSettings(settings, models) {
16834
16956
  const migrated = [];
16835
16957
  const scopes = settings.isProjectTrusted() ? ["global", "project"] : ["global"];
16958
+ let resolvedModels;
16836
16959
  for (const scope of scopes) try {
16837
16960
  const value = (scope === "global" ? settings.getGlobalSettings() : settings.getProjectSettings()).compactionModel;
16838
16961
  if (typeof value !== "string") continue;
16839
- const kind = classifyCompactionModel(value, models);
16962
+ const trimmed = value.trim();
16963
+ if (trimmed === "" || trimmed === "auto") continue;
16964
+ resolvedModels ??= typeof models === "function" ? models() : models;
16965
+ const kind = classifyCompactionModel(trimmed, resolvedModels);
16840
16966
  if (kind !== "chat" && kind !== "classifier") continue;
16841
16967
  settings.setCompactionModel("auto", scope);
16842
16968
  migrated.push({
@@ -18084,9 +18210,20 @@ function parseInteractiveEngineMessage(line) {
18084
18210
  status
18085
18211
  } : void 0;
18086
18212
  }
18213
+ case "engine_agent_queue_invalidated": {
18214
+ const reason = value.reason;
18215
+ const validReason = reason === "stopped" || reason === "cleared" || reason === "session-ended" || reason === "sent-elsewhere";
18216
+ return typeof value.sessionId === "string" && value.sessionId.length > 0 && (value.sessionFile === void 0 || typeof value.sessionFile === "string" && value.sessionFile.length > 0) && validReason ? {
18217
+ type: value.type,
18218
+ sessionId: value.sessionId,
18219
+ ...value.sessionFile === void 0 ? {} : { sessionFile: value.sessionFile },
18220
+ reason
18221
+ } : void 0;
18222
+ }
18087
18223
  case "engine_view_agent": return typeof value.taskId === "string" || value.taskId === null ? {
18088
18224
  type: value.type,
18089
18225
  taskId: value.taskId,
18226
+ ...typeof value.requestId === "number" && Number.isSafeInteger(value.requestId) && value.requestId > 0 ? { requestId: value.requestId } : {},
18090
18227
  ...value.keepScreen === true ? { keepScreen: true } : {},
18091
18228
  ...value.panel === true ? { panel: true } : {},
18092
18229
  ...value.panelOnView === true ? { panelOnView: true } : {}
@@ -18134,6 +18271,7 @@ function parseInteractiveEngineMessage(line) {
18134
18271
  componentId: value.componentId,
18135
18272
  overlay: value.overlay,
18136
18273
  ...value.purpose === "navigation" || value.purpose === "prompt" ? { purpose: value.purpose } : {},
18274
+ ...value.acksClicks === true ? { acksClicks: true } : {},
18137
18275
  deferInlineCustomUiFocus: value.deferInlineCustomUiFocus === true,
18138
18276
  handlesCtrlC: value.handlesCtrlC === true,
18139
18277
  handlesInternalUiAction: value.handlesInternalUiAction === true,
@@ -18165,6 +18303,7 @@ function parseInteractiveEngineMessage(line) {
18165
18303
  ...isCellCount(value.frame) ? { frame: value.frame } : {},
18166
18304
  ...Array.isArray(value.rowKeys) && value.rowKeys.every((key) => typeof key === "string") ? { rowKeys: value.rowKeys } : {},
18167
18305
  ...layoutField(value.layout),
18306
+ ...typeof value.previewSeq === "number" && Number.isSafeInteger(value.previewSeq) && value.previewSeq > 0 ? { previewSeq: value.previewSeq } : {},
18168
18307
  ...isJsonObject(value.scrollRequest) && typeof value.scrollRequest.version === "number" && typeof value.scrollRequest.scrollTop === "number" ? { scrollRequest: {
18169
18308
  version: value.scrollRequest.version,
18170
18309
  scrollTop: value.scrollRequest.scrollTop
@@ -18176,6 +18315,11 @@ function parseInteractiveEngineMessage(line) {
18176
18315
  requestId: value.requestId,
18177
18316
  handled: value.handled
18178
18317
  } : void 0;
18318
+ case "engine_custom_click_result": return typeof value.componentId === "string" && typeof value.ackId === "number" && Number.isSafeInteger(value.ackId) && value.ackId > 0 ? {
18319
+ type: value.type,
18320
+ componentId: value.componentId,
18321
+ ackId: value.ackId
18322
+ } : void 0;
18179
18323
  case "engine_custom_invalidate": return typeof value.componentId === "string" ? value.evictCache === true ? {
18180
18324
  type: value.type,
18181
18325
  componentId: value.componentId,
@@ -18331,12 +18475,19 @@ function parseInteractiveEngineCommand(line) {
18331
18475
  ...typeof value.rowKey === "string" ? { rowKey: value.rowKey } : {},
18332
18476
  ...isCellCount(value.clickId) ? { clickId: value.clickId } : {},
18333
18477
  ...value.cancelsClicks === true ? { cancelsClicks: true } : {},
18478
+ ...typeof value.ackId === "number" && Number.isSafeInteger(value.ackId) && value.ackId > 0 ? { ackId: value.ackId } : {},
18334
18479
  x: value.x,
18335
18480
  y: value.y,
18336
18481
  width: value.width,
18337
18482
  height: value.height
18338
18483
  };
18339
- if ((value.type === "engine_custom_click_settle" || value.type === "engine_custom_click_cancel") && isCellCount(value.clickId)) return {
18484
+ if (value.type === "engine_custom_click_settle" && isCellCount(value.clickId)) return {
18485
+ type: value.type,
18486
+ componentId: value.componentId,
18487
+ clickId: value.clickId,
18488
+ ...typeof value.ackId === "number" && Number.isSafeInteger(value.ackId) && value.ackId > 0 ? { ackId: value.ackId } : {}
18489
+ };
18490
+ if (value.type === "engine_custom_click_cancel" && isCellCount(value.clickId)) return {
18340
18491
  type: value.type,
18341
18492
  componentId: value.componentId,
18342
18493
  clickId: value.clickId
@@ -18446,11 +18597,18 @@ function parseAgentViewStatus(value) {
18446
18597
  if (value === void 0 || !isJsonObject(value)) return void 0;
18447
18598
  const queued = value.queued;
18448
18599
  if (!(typeof value.taskId === "string" && typeof value.agentKey === "string" && typeof value.name === "string" && typeof value.ruleLabel === "string" && typeof value.placeholder === "string" && typeof value.state === "string" && AGENT_VIEW_STATES.has(value.state) && typeof value.busy === "boolean" && typeof value.paused === "boolean" && typeof value.retrying === "boolean" && typeof value.heldPrompt === "boolean" && typeof value.gone === "boolean" && (value.readOnlyReason === void 0 || typeof value.readOnlyReason === "string") && (value.working === void 0 || value.working !== null && isJsonObject(value.working)) && queued !== void 0 && isJsonObject(queued) && isStringList(queued.steering) && isStringList(queued.followUp) && (value.unsaved === void 0 || isStringList(value.unsaved)))) return void 0;
18449
- if (value.receipts !== void 0 && !isAgentViewReceipts(value.receipts)) {
18450
- const { receipts: _receipts, ...status } = value;
18451
- return status;
18600
+ let result = value;
18601
+ if (result.receipts !== void 0 && !isAgentViewReceipts(result.receipts)) {
18602
+ const { receipts: _receipts, ...rest } = result;
18603
+ result = rest;
18452
18604
  }
18453
- return value;
18605
+ const badSessionId = result.sessionId !== void 0 && (typeof result.sessionId !== "string" || result.sessionId.length === 0);
18606
+ const badSessionFile = result.sessionFile !== void 0 && (typeof result.sessionFile !== "string" || result.sessionFile.length === 0);
18607
+ if (badSessionId || badSessionFile) {
18608
+ const { sessionId: _sessionId, sessionFile: _sessionFile, ...rest } = result;
18609
+ result = rest;
18610
+ }
18611
+ return result;
18454
18612
  }
18455
18613
  function isAgentViewReceipts(value) {
18456
18614
  if (!isJsonObject(value) || typeof value.sessionId !== "string" || !Array.isArray(value.taken)) return false;
@@ -18929,6 +19087,51 @@ async function readTransferDirectory(directory) {
18929
19087
  function sessionScratchDir(agentDir, cwd, _sessionId) {
18930
19088
  return getDefaultSessionDirPath(cwd, agentDir);
18931
19089
  }
18932
- 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$1 as StringEnum, TEAM_JOIN_COMMAND, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecord, assertSessionBlobStore, assertSessionNotOpenElsewhere, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, cleanupFailureSummary, 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, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findSessionOpenHolder, 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$1 as getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, holdSessionOpenMarker, 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, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareRegistrationCallbacks, prepareSessionOpenMarkers, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairOrphanToolResults, reportDiagnostics, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, 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, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, splitSearchTextParts, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, userLikeContentBlockIsLlmVisible, validateEventSource, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, watchHeldPromptAttention, withGitProvisionSettingsForTest, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withoutCarriedToolOutput, withoutSearchPosition, writeChunksAtomically, writeLinesAtomically, writeRenderers };
19090
+ 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$1 as StringEnum, TEAM_JOIN_COMMAND, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecord, assertSessionBlobStore, assertSessionNotOpenElsewhere, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, cleanupFailureSummary, 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, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findSessionOpenHolder, 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$1 as getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, holdSessionOpenMarker, 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, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareRegistrationCallbacks, prepareSessionOpenMarkers, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairOrphanToolResults, reportDiagnostics, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, 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, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, splitSearchTextParts, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, userLikeContentBlockIsLlmVisible, validateEventSource, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, watchHeldPromptAttention, withGitProvisionSettingsForTest, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withoutCarriedToolOutput, withoutSearchPosition, writeChunksAtomically, writeLinesAtomically, writeRenderers };
18933
19091
 
18934
- //# sourceMappingURL=startup-0-1-7QTG6VJZ.js.map
19092
+ //# sourceMappingURL=startup-0-1-D4LGGINF.js.map
19093
+ // __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
19094
+ // demand that fails in a process an in-place update left running says to restart.
19095
+ function __atomicOnDemandFailed(error, feature) {
19096
+ return (async () => {
19097
+ const root = new URL("../", import.meta.url);
19098
+ const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
19099
+ const key = `${root.href}#0.10.5-alpha.1`;
19100
+ let release = releases.get(key);
19101
+ if (release === undefined) {
19102
+ const current = (async () => {
19103
+ for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
19104
+ try {
19105
+ const held = await import(new URL(path, root).href);
19106
+ if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
19107
+ } catch {
19108
+ // Not a file this process can load: the next.
19109
+ }
19110
+ }
19111
+ return undefined;
19112
+ })().then((found) => {
19113
+ if (found === undefined && releases.get(key) === current) releases.delete(key);
19114
+ return found;
19115
+ });
19116
+ releases.set(key, current);
19117
+ release = current;
19118
+ }
19119
+ const running = await release;
19120
+ let installed;
19121
+ try {
19122
+ const { readFile } = process.getBuiltinModule("node:fs/promises");
19123
+ installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
19124
+ } catch {
19125
+ // No installation to read, as in a bundle of the package: the release the process runs decides.
19126
+ }
19127
+ 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;
19128
+ if (updatedTo === undefined) throw error;
19129
+ const application = typeof running?.name === "string" ? running.name : "atomic";
19130
+ const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
19131
+ cause: error,
19132
+ });
19133
+ restart.name = "UpdatedInstallError";
19134
+ restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
19135
+ throw restart;
19136
+ })();
19137
+ }