@qwen-code/qwen-code 0.21.10 → 0.21.11-nightly.20260814.45c2e73080

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 (378) hide show
  1. package/bundled/coordinate/SKILL.md +52 -0
  2. package/bundled/qc-helper/docs/configuration/model-providers.md +10 -8
  3. package/bundled/qc-helper/docs/configuration/settings.md +10 -0
  4. package/bundled/qc-helper/docs/extension/_meta.ts +1 -0
  5. package/bundled/qc-helper/docs/extension/agent-plugins.md +50 -0
  6. package/bundled/qc-helper/docs/extension/extension-releasing.md +3 -3
  7. package/bundled/qc-helper/docs/extension/introduction.md +17 -3
  8. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  9. package/bundled/qc-helper/docs/features/arena.md +4 -3
  10. package/bundled/qc-helper/docs/features/code-review.md +1 -1
  11. package/bundled/qc-helper/docs/features/commands.md +7 -6
  12. package/bundled/qc-helper/docs/features/dual-output.md +5 -0
  13. package/bundled/qc-helper/docs/features/headless.md +8 -0
  14. package/bundled/qc-helper/docs/features/multi-agent-coordination.md +30 -0
  15. package/bundled/qc-helper/docs/qwen-serve.md +40 -40
  16. package/bundled/review/SKILL.md +45 -23
  17. package/chunks/{MaxSizedBox-FKXYULMW.js → MaxSizedBox-P4Z76535.js} +45 -44
  18. package/chunks/{StandaloneSessionPicker-OQS3M7AY.js → StandaloneSessionPicker-TRWDBCJG.js} +65 -64
  19. package/chunks/{acp-startup-profiler-VNTFWYAC.js → acp-startup-profiler-TVI2OVUN.js} +2 -2
  20. package/chunks/{acpAgent-AGS6HLQQ.js → acpAgent-MSZHQSZ7.js} +1645 -579
  21. package/chunks/{agent-4NCVO27U.js → agent-TMTEYQGK.js} +42 -41
  22. package/chunks/agent-headless-54WWND2M.js +87 -0
  23. package/chunks/{anthropicContentGenerator-D3Y4RFT4.js → anthropicContentGenerator-7ZK7U65G.js} +8 -8
  24. package/chunks/{artifact-tool-N652YE4L.js → artifact-tool-7HVSSXYZ.js} +2 -2
  25. package/chunks/{askUserQuestion-ONW74PKJ.js → askUserQuestion-IQCA2SOX.js} +2 -2
  26. package/chunks/{bridge-FHINXZMN.js → bridge-CI2NKV64.js} +49 -48
  27. package/chunks/{ca-ZLKAB4K3.js → ca-4CQ6MYNQ.js} +2 -1
  28. package/chunks/{channel-management-service-PHELKOW2.js → channel-management-service-LNEYNMDX.js} +6 -6
  29. package/chunks/channel-settings-store-QU4WFXHO.js +102 -0
  30. package/chunks/{channel-worker-group-WQP4RCDO.js → channel-worker-group-Q5WQVOMZ.js} +8 -7
  31. package/chunks/{channel-worker-manager-MRDFAKIM.js → channel-worker-manager-Z3JLH72P.js} +8 -7
  32. package/chunks/{channel-worker-supervisor-IVSDIMI4.js → channel-worker-supervisor-CG5HHT7K.js} +6 -5
  33. package/chunks/{chunk-A7XMDZRI.js → chunk-2AG524A4.js} +5 -5
  34. package/chunks/{chunk-GM463R2B.js → chunk-2ASWIM4A.js} +1 -1
  35. package/chunks/{chunk-DP3IHZGG.js → chunk-2AUM35J5.js} +59 -7
  36. package/chunks/{chunk-TZEZYNYD.js → chunk-2N6CV4PW.js} +1 -1
  37. package/chunks/{chunk-BSI645OU.js → chunk-3LHSUFPE.js} +3 -3
  38. package/chunks/{chunk-DCZEPFB4.js → chunk-3XLWKV4S.js} +3 -3
  39. package/chunks/{chunk-YWPSGJFI.js → chunk-4IBNVBGJ.js} +2 -2
  40. package/chunks/{chunk-ZRBMO3C7.js → chunk-4IWFPTAH.js} +1 -1
  41. package/chunks/{chunk-B2GJNDTV.js → chunk-4JS2QK7P.js} +1 -1
  42. package/chunks/{chunk-5MZCSWI4.js → chunk-4NV6L4GZ.js} +1184 -1450
  43. package/chunks/{chunk-Y3OVRWRY.js → chunk-4QC6SUVN.js} +1 -1
  44. package/chunks/{chunk-AOHJKPKL.js → chunk-5KZNWF2M.js} +1 -1
  45. package/chunks/{chunk-UMD7WQTR.js → chunk-5XNR53C7.js} +10 -8
  46. package/chunks/{chunk-IIJEYBNH.js → chunk-66PLFJQ7.js} +197 -60
  47. package/chunks/{chunk-SEZ556DZ.js → chunk-67F2BEYW.js} +1 -1
  48. package/chunks/{chunk-7GTMV7UE.js → chunk-6KXHEN6M.js} +8700 -2449
  49. package/chunks/{chunk-FVKHVJZQ.js → chunk-6OJDN5ZT.js} +1 -1
  50. package/chunks/{chunk-CKASRHZI.js → chunk-6SU6OW5Z.js} +1 -1
  51. package/chunks/{chunk-NEOXOWYH.js → chunk-6YUEAYJ5.js} +7 -7
  52. package/chunks/{chunk-QGNOFE5E.js → chunk-766PXUQ3.js} +1 -1
  53. package/chunks/{chunk-UVX4Y6IN.js → chunk-7JL5YBSA.js} +1 -1
  54. package/chunks/{chunk-2PLNY5TN.js → chunk-7MAHENBD.js} +4 -4
  55. package/chunks/{chunk-L2AFWWJE.js → chunk-7UNST76G.js} +105 -24
  56. package/chunks/{chunk-HUWENAHO.js → chunk-7WUMS2UA.js} +1 -1
  57. package/chunks/{chunk-MVUQRLOH.js → chunk-A4BAHMJF.js} +3 -3
  58. package/chunks/{chunk-7MH4J33A.js → chunk-A6GQUQ7I.js} +2 -2
  59. package/chunks/{chunk-GNPNYXJB.js → chunk-AAZWJAPQ.js} +2 -2
  60. package/chunks/{chunk-DX3RGJMS.js → chunk-ADJDLEVO.js} +72 -13
  61. package/chunks/{chunk-IWTMYQ32.js → chunk-AN3LCBS7.js} +9 -8
  62. package/chunks/{chunk-LHEC5V6G.js → chunk-AXEL55JW.js} +2 -2
  63. package/chunks/{chunk-QUI267ZP.js → chunk-B66LYK4B.js} +492 -63
  64. package/chunks/{chunk-VNNWAZSI.js → chunk-BCGJZGFI.js} +3 -3
  65. package/chunks/{chunk-F6WDTQ3M.js → chunk-BRYHERQ6.js} +5 -5
  66. package/chunks/{chunk-6ZRFAKXK.js → chunk-C2DR57L6.js} +1 -1
  67. package/chunks/{chunk-26CXSA6V.js → chunk-CAOT4DYN.js} +2 -2
  68. package/chunks/{chunk-H6XPXXMH.js → chunk-CQ35AJ4Z.js} +252 -254
  69. package/chunks/{chunk-F24A2JBM.js → chunk-CUXI3S6E.js} +914 -175
  70. package/chunks/{chunk-AEL7KN2O.js → chunk-DANYMI4U.js} +2 -2
  71. package/chunks/{chunk-AAE6SR4Q.js → chunk-DX7V233D.js} +1 -1
  72. package/chunks/{chunk-PJRW65JO.js → chunk-E74YSVIN.js} +1 -1
  73. package/chunks/{chunk-OWMAZHIX.js → chunk-EGB2PIYM.js} +1 -1
  74. package/chunks/{chunk-TRRF5BSP.js → chunk-F4BUGC4Y.js} +1 -1
  75. package/chunks/{chunk-4MKXUHXY.js → chunk-FGQY4VOZ.js} +5 -5
  76. package/chunks/{chunk-ZBVS26BY.js → chunk-FPGTNKCP.js} +7 -5
  77. package/chunks/{chunk-SR7RZ4MS.js → chunk-FTGU6G45.js} +2 -2
  78. package/chunks/{chunk-IBUGFUXC.js → chunk-G2ZEKO4T.js} +12 -12
  79. package/chunks/{chunk-NDU63YLI.js → chunk-GN2SCYBA.js} +4 -4
  80. package/chunks/{chunk-NV3F44FL.js → chunk-GNRFC5UM.js} +2 -2
  81. package/chunks/{chunk-KKBPOU75.js → chunk-H6BFLALJ.js} +1 -1
  82. package/chunks/chunk-HHJLM3WQ.js +41 -0
  83. package/chunks/{chunk-LLCWZQCU.js → chunk-HM7TLULV.js} +3 -3
  84. package/chunks/{chunk-ECWR5LQR.js → chunk-I76FLAP7.js} +3 -3
  85. package/chunks/{chunk-Q3AL4JQ3.js → chunk-IAE7LYSB.js} +2 -2
  86. package/chunks/{chunk-DREZZAZM.js → chunk-IDNVCWXZ.js} +13 -5
  87. package/chunks/{chunk-YF5MALI4.js → chunk-IPMHLZPY.js} +20 -16
  88. package/chunks/{chunk-UDXSXLER.js → chunk-IW6RQPQB.js} +14 -4
  89. package/chunks/{chunk-UBX6NL47.js → chunk-JLT5HCGQ.js} +47 -3
  90. package/chunks/{chunk-COBO5EBO.js → chunk-JRTJEGSP.js} +1 -1
  91. package/chunks/{chunk-PBRVUF5B.js → chunk-JW5UEE3V.js} +1 -1
  92. package/chunks/{chunk-W4RQUHY3.js → chunk-K5IDV3PC.js} +184 -22
  93. package/chunks/{chunk-O3EU6GMH.js → chunk-KACBT7N7.js} +27 -4
  94. package/chunks/{chunk-MFDYOYZZ.js → chunk-KCGEAL2C.js} +25 -2
  95. package/chunks/{chunk-EI3HZX6C.js → chunk-KK3FEHPJ.js} +1 -1
  96. package/chunks/{chunk-OJUQF2PL.js → chunk-KRRRRU3X.js} +5 -5
  97. package/chunks/{chunk-J6SZID63.js → chunk-KTWUFHS4.js} +2 -2
  98. package/chunks/{chunk-E2FPSSKP.js → chunk-KZKEVWJW.js} +57 -13
  99. package/chunks/{chunk-ZJ4W6SUY.js → chunk-L6PE52MF.js} +3 -3
  100. package/chunks/{chunk-YGT2AUJ7.js → chunk-LAKFZU36.js} +39 -19
  101. package/chunks/{chunk-47PEPJO7.js → chunk-LKN5SEHD.js} +3 -3
  102. package/chunks/{chunk-OQTXYMKW.js → chunk-LSMCI42W.js} +3 -3
  103. package/chunks/{chunk-ABVRJU3D.js → chunk-LY2SB7GC.js} +7 -7
  104. package/chunks/{chunk-D27I6YJT.js → chunk-M53FFYQJ.js} +27 -18
  105. package/chunks/{chunk-YTFDX4PR.js → chunk-M6NDLY2T.js} +1 -1
  106. package/chunks/{chunk-3P2LV43B.js → chunk-MMEDZKWK.js} +3 -3
  107. package/chunks/{chunk-VFMASYQA.js → chunk-MS7GNABG.js} +3 -0
  108. package/chunks/{chunk-6LP743KE.js → chunk-MUTFMB5B.js} +78 -112
  109. package/chunks/{chunk-URK542T4.js → chunk-NF5J2WFA.js} +15 -2
  110. package/chunks/{chunk-VSFKIRRW.js → chunk-NH6U7L42.js} +4 -4
  111. package/chunks/{chunk-DA4HRSBW.js → chunk-NHZF4VCD.js} +1 -1
  112. package/chunks/{chunk-QG3FFJYU.js → chunk-NJE5NH5B.js} +1 -1
  113. package/chunks/{chunk-2UUMVNYT.js → chunk-NM33GGOM.js} +3 -3
  114. package/chunks/{chunk-FOGU3LJX.js → chunk-NW7SPXVG.js} +1 -1
  115. package/chunks/{chunk-EUNWC2VS.js → chunk-O6SLWH4X.js} +2 -2
  116. package/chunks/{chunk-EBZ6BJTF.js → chunk-OEVVUUYW.js} +1 -1
  117. package/chunks/chunk-OMVHZ7E6.js +1280 -0
  118. package/chunks/{chunk-KZ22NXBY.js → chunk-OT72MGHE.js} +4 -4
  119. package/chunks/{chunk-DZUO626D.js → chunk-OUCCIS3E.js} +3 -3
  120. package/chunks/{chunk-OONWZLFK.js → chunk-OYLYERMH.js} +4 -4
  121. package/chunks/{chunk-P3BJLFSZ.js → chunk-OYQM5XZ4.js} +3 -3
  122. package/chunks/{chunk-NRLFZWCT.js → chunk-PNU3TILU.js} +3 -3
  123. package/chunks/{chunk-M6HMMKVG.js → chunk-PSTHNTHF.js} +1 -1
  124. package/chunks/{chunk-4PYCZH2V.js → chunk-QEWAHAW2.js} +3 -3
  125. package/chunks/{chunk-QJMOAMXT.js → chunk-RG2S3GYC.js} +8 -8
  126. package/chunks/{chunk-CTJLZLB5.js → chunk-RQS2BGPI.js} +1 -1
  127. package/chunks/{chunk-Y4R47ZUH.js → chunk-RTBUTKAX.js} +7 -7
  128. package/chunks/{chunk-NV65ZUVM.js → chunk-RZZV6GQN.js} +1 -1
  129. package/chunks/{chunk-UEOKWYGY.js → chunk-SESSAEWC.js} +11 -11
  130. package/chunks/{chunk-CPG6P4GG.js → chunk-SKRHR6N2.js} +1 -1
  131. package/chunks/{chunk-WAUGQKUU.js → chunk-SNHBRO4C.js} +9 -5
  132. package/chunks/{chunk-KID7K6H2.js → chunk-SNPOURNX.js} +6 -6
  133. package/chunks/{chunk-VWKER4ZH.js → chunk-SQCTJ435.js} +3 -3
  134. package/chunks/{chunk-Z4JX4NSH.js → chunk-SXJ7JYQA.js} +23 -23
  135. package/chunks/{chunk-XVHYA33G.js → chunk-TD7JVTIA.js} +4 -4
  136. package/chunks/{chunk-IRZ2ZH72.js → chunk-TEFHXP7C.js} +4 -4
  137. package/chunks/{chunk-2FRY5CRX.js → chunk-TNETSI2A.js} +3 -3
  138. package/chunks/{chunk-IA7TGCN2.js → chunk-TROB4PZY.js} +4 -4
  139. package/chunks/{chunk-4TRQPFDP.js → chunk-U3O2EO5Y.js} +26 -20
  140. package/chunks/{chunk-VKJ4KTPJ.js → chunk-U7ROFHSH.js} +1 -1
  141. package/chunks/{chunk-Q3JQ7OSU.js → chunk-UBC6PMV7.js} +1 -1
  142. package/chunks/{chunk-W5UC37EE.js → chunk-UFHPAMAV.js} +6 -0
  143. package/chunks/{chunk-EQL65XGA.js → chunk-UHF5VBKO.js} +47 -21
  144. package/chunks/{chunk-S6HYI3MF.js → chunk-UQPLUR4A.js} +2 -2
  145. package/chunks/{chunk-HGCQ5SE7.js → chunk-UXEO7E3V.js} +21 -0
  146. package/chunks/{chunk-WCG5O7IP.js → chunk-V3NMFQD2.js} +2 -2
  147. package/chunks/{chunk-EKPKKXY2.js → chunk-V4SJMQVJ.js} +1 -1
  148. package/chunks/{chunk-ONSZH6VM.js → chunk-VFJVRSRK.js} +2 -2
  149. package/chunks/{chunk-MZSJ43WV.js → chunk-W5ZFJYUG.js} +13 -0
  150. package/chunks/{chunk-XCGIMOLN.js → chunk-WCCLLK7X.js} +14 -1
  151. package/chunks/{chunk-4WL6SY4F.js → chunk-WDSTNDEW.js} +1 -1
  152. package/chunks/{chunk-KONVMRK7.js → chunk-WFTBYUOR.js} +1 -1
  153. package/chunks/{chunk-EI3NWELG.js → chunk-WH32GXQS.js} +6233 -4342
  154. package/chunks/{chunk-MIKXJYZB.js → chunk-WS5TWVT6.js} +305 -291
  155. package/chunks/{chunk-VJNBRRZG.js → chunk-WZMH7II3.js} +1 -1
  156. package/chunks/{chunk-67EWJE77.js → chunk-XY7DGTIC.js} +1 -1
  157. package/chunks/{chunk-HV76SFIA.js → chunk-YI5G32RU.js} +3 -3
  158. package/chunks/{chunk-OIVKILPI.js → chunk-YMB77M76.js} +18 -0
  159. package/chunks/{chunk-AQAJJMRR.js → chunk-YPITLFHS.js} +1 -1
  160. package/chunks/{chunk-WOJZWRAZ.js → chunk-YRLW2MSX.js} +1 -1
  161. package/chunks/{chunk-ZZCWJWTF.js → chunk-YY23TR4M.js} +31 -11
  162. package/chunks/{chunk-URKIBIFC.js → chunk-YYI3Z3AO.js} +3 -3
  163. package/chunks/chunk-Z7B6SRPM.js +32 -0
  164. package/chunks/{chunk-6Q5ABMTU.js → chunk-ZGONVQ3D.js} +23 -19
  165. package/chunks/{chunk-GWVUR3QZ.js → chunk-ZM6LZON7.js} +3 -3
  166. package/chunks/{chunk-XCWO3SMQ.js → chunk-ZPZANKVP.js} +3 -3
  167. package/chunks/{chunk-OCSFNUU4.js → chunk-ZRD3BUEX.js} +8 -8
  168. package/chunks/{chunk-PYQADEFD.js → chunk-ZRT36RSF.js} +1 -1
  169. package/chunks/{chunk-JT7XS4YW.js → chunk-ZZ7RUTJ4.js} +1 -1
  170. package/chunks/{computer-use-WQFK33Z3.js → computer-use-7BMFU557.js} +42 -41
  171. package/chunks/{config-utils-ULCSRMWD.js → config-utils-I732W437.js} +6 -6
  172. package/chunks/{contextCommand-7EOZND7C.js → contextCommand-VJ6UOMM4.js} +44 -43
  173. package/chunks/{core-runtime-FGMQRM6E.js → core-runtime-PMRKP77C.js} +42 -41
  174. package/chunks/{create-sub-session-QIDZUOPU.js → create-sub-session-23ULO5PO.js} +2 -2
  175. package/chunks/{create-sub-session-QM2K5HLZ.js → create-sub-session-5A3MSW22.js} +42 -41
  176. package/chunks/{cron-create-VONA5JYY.js → cron-create-5WUTNKNF.js} +4 -4
  177. package/chunks/{cron-delete-5JXSP2MI.js → cron-delete-JEQ27YPS.js} +4 -4
  178. package/chunks/{cron-list-KE4F2CIR.js → cron-list-IXGCA7UR.js} +4 -4
  179. package/chunks/{daemon-GWD7BT6E.js → daemon-PXIC4ZDK.js} +186 -7
  180. package/chunks/daemon-status-provider-33BLPRUA.js +103 -0
  181. package/chunks/daemon-trust-policy-ZUV26YGP.js +99 -0
  182. package/chunks/{daemon-trust-policy-monitor-6UKEABN5.js → daemon-trust-policy-monitor-35WRTIMA.js} +49 -48
  183. package/chunks/{de-LIW4XVLN.js → de-UBEBKG6V.js} +2 -1
  184. package/chunks/{deferred-core-runtime-67GJXHXS.js → deferred-core-runtime-ZSLQKM7J.js} +42 -41
  185. package/chunks/{display-image-NQRSIBXM.js → display-image-CAD7RAUM.js} +4 -4
  186. package/chunks/{dist-6BMOAE3Z.js → dist-362MN6CP.js} +4 -4
  187. package/chunks/{dist-3NTTUAHT.js → dist-5VDE7U3A.js} +3 -3
  188. package/chunks/{dist-Z3CS4OVP.js → dist-6RK4U6VU.js} +11 -5
  189. package/chunks/{dist-B2CGTW6T.js → dist-CCUH2Z4C.js} +3 -3
  190. package/chunks/{dist-J47AXBZC.js → dist-EZHCZSW6.js} +3 -3
  191. package/chunks/{dist-EZE3V3Q7.js → dist-JIORWIDV.js} +3 -3
  192. package/chunks/{dist-EWW3J4HQ.js → dist-M3XMEIP2.js} +3 -3
  193. package/chunks/{dist-OTUO3AS2.js → dist-NN5ARGTQ.js} +13 -5
  194. package/chunks/{earlyInputCapture-IWMYR6OB.js → earlyInputCapture-UNMCTGJR.js} +43 -42
  195. package/chunks/{edit-ZFGROCAF.js → edit-TXVTSXHY.js} +42 -41
  196. package/chunks/{en-SY5GTIGX.js → en-X6YV7GME.js} +2 -1
  197. package/chunks/{enter-worktree-TZZZCDM5.js → enter-worktree-7Q3X4PW7.js} +42 -41
  198. package/chunks/{enterPlanMode-U77BI3R6.js → enterPlanMode-AZBU3ZB6.js} +42 -41
  199. package/chunks/{environment-HC37DS2I.js → environment-TGFFQISF.js} +45 -44
  200. package/chunks/{errors-6AG54JPD.js → errors-GVPFT7BA.js} +44 -43
  201. package/chunks/{exit-worktree-UYYWFPNK.js → exit-worktree-7INKYMWE.js} +42 -41
  202. package/chunks/exitPlanMode-5CE7CLAE.js +85 -0
  203. package/chunks/{fast-path-F5FSZ3O7.js → fast-path-7B6F74IR.js} +5 -5
  204. package/chunks/{fast-path-settings-RPAVBD7P.js → fast-path-settings-LNOFM2YP.js} +2 -2
  205. package/chunks/{fr-RQFO7U4P.js → fr-VENTC2BS.js} +2 -1
  206. package/chunks/{gemini-NKQHYM36.js → gemini-4RUYPDKT.js} +92 -91
  207. package/chunks/{geminiContentGenerator-HCWZOUX3.js → geminiContentGenerator-NLL52POY.js} +6 -6
  208. package/chunks/{glob-3PDXKBAO.js → glob-DHU3INUK.js} +42 -41
  209. package/chunks/{goal-tools-SWNB6GP4.js → goal-tools-LQFO4BRY.js} +4 -4
  210. package/chunks/{grep-5HZKZYVD.js → grep-523W6G52.js} +42 -41
  211. package/chunks/handleAutoUpdate-PKUQ3OQQ.js +94 -0
  212. package/chunks/{i18n-Q27KKNDL.js → i18n-HYL2UBJW.js} +43 -42
  213. package/chunks/{image-gen-2Z2RJ6W7.js → image-gen-NLIDBAKE.js} +10 -10
  214. package/chunks/initializer-DGH7RAJ7.js +100 -0
  215. package/chunks/{installationInfo-XXB75T7O.js → installationInfo-FZ4XWV7O.js} +43 -42
  216. package/chunks/{ja-KOZKHJHZ.js → ja-QHT4EQTO.js} +2 -1
  217. package/chunks/{keychain-token-storage-TVAMTNP7.js → keychain-token-storage-GU75J2T2.js} +2 -2
  218. package/chunks/list-RH5HGWRJ.js +103 -0
  219. package/chunks/{list-agents-Z4WABFDZ.js → list-agents-5PNMK2AM.js} +2 -2
  220. package/chunks/loadedSettingsAdapter-XMX2JDOU.js +97 -0
  221. package/chunks/{loggingContentGenerator-6NTFBM7Q.js → loggingContentGenerator-T3J4HZ7U.js} +139 -98
  222. package/chunks/{loop-wakeup-UZ5RL5Y2.js → loop-wakeup-OV65FEGR.js} +5 -5
  223. package/chunks/{ls-TVHDGIES.js → ls-7CETV7WV.js} +4 -4
  224. package/chunks/{lsp-CVN6OQPI.js → lsp-IWTJWFLT.js} +2 -2
  225. package/chunks/{managed-npm-update-SPHYQUWZ.js → managed-npm-update-E5ZGIGWV.js} +45 -44
  226. package/chunks/mcp-6LC572CW.js +97 -0
  227. package/chunks/{monitor-ZBBPAA54.js → monitor-HQUS4RTV.js} +42 -41
  228. package/chunks/nonInteractiveCli-X7HKTS5Z.js +163 -0
  229. package/chunks/{notebook-edit-5W3FW7Z2.js → notebook-edit-QPI3LTFM.js} +42 -41
  230. package/chunks/{openaiContentGenerator-TQANPEVZ.js → openaiContentGenerator-GGS72DVB.js} +29 -29
  231. package/chunks/{pidfile-EQOBLH4E.js → pidfile-HD3EB6GL.js} +43 -42
  232. package/chunks/{processUtils-7XQG7EHS.js → processUtils-2WNEPSW4.js} +2 -2
  233. package/chunks/{pt-U6AOCTMF.js → pt-VL3I5RNY.js} +2 -1
  234. package/chunks/{qwenContentGenerator-BKCPHHXU.js → qwenContentGenerator-WJYPELF3.js} +48 -48
  235. package/chunks/{qwenOAuth2-BJ6PQKE6.js → qwenOAuth2-RSMEBZU4.js} +9 -9
  236. package/chunks/read-file-URU5ALY3.js +32 -0
  237. package/chunks/{read-mcp-resource-PZ4ZF6YL.js → read-mcp-resource-THCSZHXO.js} +2 -2
  238. package/chunks/{read-package-up-TCM6I7S2.js → read-package-up-K6RKTL5D.js} +1 -1
  239. package/chunks/{record-artifact-P4HFMS7X.js → record-artifact-76YYQA5F.js} +3 -3
  240. package/chunks/{resumeHistoryUtils-6N6XGJJW.js → resumeHistoryUtils-XMC3CR2U.js} +49 -48
  241. package/chunks/ripGrep-6NYCUBVW.js +85 -0
  242. package/chunks/{ru-CMX4UMYP.js → ru-4RCKL4PY.js} +2 -1
  243. package/chunks/{run-qwen-serve-BCKBCAMX.js → run-qwen-serve-H4IXCJDQ.js} +165 -65
  244. package/chunks/{runtime-E2437YKL.js → runtime-EJHNZR7H.js} +55 -54
  245. package/chunks/{scheduler-K3D5Z655.js → scheduler-VVORKEEZ.js} +44 -43
  246. package/chunks/{sdk-exporters-http-XVTZQRCE.js → sdk-exporters-http-JYKTSCMG.js} +11 -7
  247. package/chunks/{sdk-impl-7W7AKCS4.js → sdk-impl-ROR54N3H.js} +13 -10
  248. package/chunks/{send-message-CAMSLG2L.js → send-message-P5SLP57G.js} +6 -6
  249. package/chunks/serve-3ULKH2KQ.js +107 -0
  250. package/chunks/{server-UD6INW7J.js → server-J52IQLRJ.js} +949 -303
  251. package/chunks/{session-GR4ZEVW4.js → session-MNWSMCC2.js} +118 -98
  252. package/chunks/{settings-5O24D3OJ.js → settings-WFCKUQZO.js} +48 -47
  253. package/chunks/{shell-UTLWLG5G.js → shell-H5DZN76B.js} +42 -41
  254. package/chunks/{skill-QQAZL4VO.js → skill-STSDBOIL.js} +19 -19
  255. package/chunks/{skill-settings-P3YHJVBZ.js → skill-settings-LTJAR2LV.js} +48 -47
  256. package/chunks/spawnChannel-XL27KTLE.js +98 -0
  257. package/chunks/{standalone-update-QP742MGP.js → standalone-update-3FUDL2R6.js} +44 -43
  258. package/chunks/{startInteractiveUI-YCS6AEPN.js → startInteractiveUI-5BFJCCWU.js} +596 -335
  259. package/chunks/{syntheticOutput-PEBJQYJV.js → syntheticOutput-SEW4NA47.js} +3 -3
  260. package/chunks/{task-create-5NWCQSJF.js → task-create-247EAVF7.js} +10 -10
  261. package/chunks/{task-list-53265TRZ.js → task-list-ZJN4QHLK.js} +5 -5
  262. package/chunks/{task-stop-FPCOIRYX.js → task-stop-MAYQJ42I.js} +2 -2
  263. package/chunks/{task-update-5HN577LS.js → task-update-CG4FALQF.js} +10 -10
  264. package/chunks/{team-create-WFH7OCDQ.js → team-create-FC2EYGE7.js} +44 -43
  265. package/chunks/{team-delete-MMQB4OSC.js → team-delete-3XVRPQBP.js} +5 -5
  266. package/chunks/{team-plan-approval-EGTT53MV.js → team-plan-approval-X673CRIZ.js} +42 -41
  267. package/chunks/{terminal-image-renderer-BWRESAQ7.js → terminal-image-renderer-MRNJ77H7.js} +44 -43
  268. package/chunks/theme-manager-6UMSB7DJ.js +89 -0
  269. package/chunks/{todoWrite-JGV6VLOX.js → todoWrite-IE2YTCK7.js} +4 -4
  270. package/chunks/{tool-search-TI5PTIBF.js → tool-search-7Z3PPA5O.js} +19 -19
  271. package/chunks/total-session-admission-NU4KV76R.js +99 -0
  272. package/chunks/{trustedFolders-4KYHA4IG.js → trustedFolders-SCUSHKHS.js} +43 -42
  273. package/chunks/{update-relaunch-WB6LGIF2.js → update-relaunch-M6BNKY4W.js} +5 -5
  274. package/chunks/{updateCheck-LOS5GYFC.js → updateCheck-QMZZ53S6.js} +48 -47
  275. package/chunks/{useAutoAcceptIndicator-MHAPY52L.js → useAutoAcceptIndicator-GAFG5PFE.js} +52 -51
  276. package/chunks/{validateNonInterActiveAuth-QV22HNQU.js → validateNonInterActiveAuth-V44BOAD2.js} +87 -86
  277. package/chunks/{version-DALWZHKQ.js → version-A4J2RQXD.js} +2 -2
  278. package/chunks/{web-fetch-JMJVMYFE.js → web-fetch-43TWEBWB.js} +19 -19
  279. package/chunks/{web-search-DNDUIPU5.js → web-search-CS3Q6JBI.js} +11 -11
  280. package/chunks/{workflow-JGNN64PM.js → workflow-ETQXJUPR.js} +115 -49
  281. package/chunks/workspace-providers-status-Y4FPKLHN.js +100 -0
  282. package/chunks/{workspace-registration-store-LRJG7QA4.js → workspace-registration-store-JASCK5RS.js} +1 -1
  283. package/chunks/{workspace-registry-KVXIFM36.js → workspace-registry-MU3VIM2D.js} +49 -48
  284. package/chunks/{workspace-service-PO4AAKKT.js → workspace-service-MHVHRNDX.js} +54 -53
  285. package/chunks/workspace-skills-status-QVQMNHGO.js +100 -0
  286. package/chunks/{workspace-trust-reconciler-DOZPCVHG.js → workspace-trust-reconciler-ABXDCISO.js} +56 -55
  287. package/chunks/write-file-YL7EPQRJ.js +87 -0
  288. package/chunks/{zh-AGL2FVBI.js → zh-LMSTK4WD.js} +2 -1
  289. package/chunks/{zh-TW-KI66MHQY.js → zh-TW-SQ4HTSCW.js} +2 -1
  290. package/chunks/{zoom-image-CNC77ZMA.js → zoom-image-ZQV6O2KE.js} +15 -15
  291. package/cli.js +13 -13
  292. package/locales/ca.js +1 -0
  293. package/locales/de.js +1 -0
  294. package/locales/en.js +1 -0
  295. package/locales/fr.js +1 -0
  296. package/locales/ja.js +1 -0
  297. package/locales/pt.js +1 -0
  298. package/locales/ru.js +1 -0
  299. package/locales/zh-TW.js +1 -0
  300. package/locales/zh.js +1 -0
  301. package/package.json +4 -4
  302. package/web-shell/assets/{arc-CDk0d60K.js → arc-BDKBUdHd.js} +1 -1
  303. package/web-shell/assets/{architectureDiagram-3BPJPVTR-h-W3I2lP.js → architectureDiagram-3BPJPVTR-DgMi5iOf.js} +1 -1
  304. package/web-shell/assets/{blockDiagram-GPEHLZMM-D1pvSmZg.js → blockDiagram-GPEHLZMM-DOyxD2BK.js} +1 -1
  305. package/web-shell/assets/{c4Diagram-AAUBKEIU-ByAm5ZNf.js → c4Diagram-AAUBKEIU-CmXzCE_n.js} +1 -1
  306. package/web-shell/assets/channel-BCff03Ag.js +1 -0
  307. package/web-shell/assets/{chunk-2J33WTMH-VrGPPOGV.js → chunk-2J33WTMH-Dr13N7PT.js} +1 -1
  308. package/web-shell/assets/{chunk-4BX2VUAB-B7hTowgG.js → chunk-4BX2VUAB-CIFcKNCP.js} +1 -1
  309. package/web-shell/assets/{chunk-55IACEB6-j1Fq8DpE.js → chunk-55IACEB6-B8jmrVPK.js} +1 -1
  310. package/web-shell/assets/{chunk-727SXJPM-UjABYpF2.js → chunk-727SXJPM-CQc0wjze.js} +1 -1
  311. package/web-shell/assets/{chunk-AQP2D5EJ-D4uBItrs.js → chunk-AQP2D5EJ-CGdZxT9s.js} +1 -1
  312. package/web-shell/assets/{chunk-FMBD7UC4-DeFbKlb8.js → chunk-FMBD7UC4-4iCBhCLJ.js} +1 -1
  313. package/web-shell/assets/{chunk-ND2GUHAM-rQJ8TIgT.js → chunk-ND2GUHAM-B0mMzZcM.js} +1 -1
  314. package/web-shell/assets/{chunk-QZHKN3VN-DAGcRxvq.js → chunk-QZHKN3VN-6CURQrGl.js} +1 -1
  315. package/web-shell/assets/classDiagram-4FO5ZUOK-DnwxH0ri.js +1 -0
  316. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DnwxH0ri.js +1 -0
  317. package/web-shell/assets/{cose-bilkent-S5V4N54A-MaE7MJSt.js → cose-bilkent-S5V4N54A-L6Fo1GN1.js} +1 -1
  318. package/web-shell/assets/{dagre-BM42HDAG-DzijYGSb.js → dagre-BM42HDAG-BTsGDeLA.js} +1 -1
  319. package/web-shell/assets/{diagram-2AECGRRQ-WdbG7WnX.js → diagram-2AECGRRQ-B4AXYZGR.js} +1 -1
  320. package/web-shell/assets/{diagram-5GNKFQAL-NYutsBnw.js → diagram-5GNKFQAL-C2yM5aNc.js} +1 -1
  321. package/web-shell/assets/{diagram-KO2AKTUF-Dqg0eBY0.js → diagram-KO2AKTUF-CrGLZmRK.js} +1 -1
  322. package/web-shell/assets/{diagram-LMA3HP47-C7vRP2Lb.js → diagram-LMA3HP47-rycHl4fv.js} +1 -1
  323. package/web-shell/assets/{diagram-OG6HWLK6-B2sEPpPt.js → diagram-OG6HWLK6-MQj80AQu.js} +1 -1
  324. package/web-shell/assets/{erDiagram-TEJ5UH35-a4zIbzm8.js → erDiagram-TEJ5UH35-DCgH-D0D.js} +1 -1
  325. package/web-shell/assets/{flowDiagram-I6XJVG4X-BK9y89ya.js → flowDiagram-I6XJVG4X-B0gnwCnt.js} +1 -1
  326. package/web-shell/assets/{ganttDiagram-6RSMTGT7-wUQTSNvV.js → ganttDiagram-6RSMTGT7-CB0OxXVE.js} +1 -1
  327. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Dnzt4SAi.js → gitGraphDiagram-PVQCEYII-xLxucse9.js} +1 -1
  328. package/web-shell/assets/{index-BA3wUcKL.js → index-BFFbq0E-.js} +1 -1
  329. package/web-shell/assets/index-D7XXR9S-.js +1789 -0
  330. package/web-shell/assets/index-Dk5RwPL9.css +5 -0
  331. package/web-shell/assets/{infoDiagram-5YYISTIA-DcaoToij.js → infoDiagram-5YYISTIA-7FCqN4qa.js} +1 -1
  332. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DzduqhP2.js → ishikawaDiagram-YF4QCWOH-BGyKlnik.js} +1 -1
  333. package/web-shell/assets/{journeyDiagram-JHISSGLW-BvviZR_O.js → journeyDiagram-JHISSGLW-CmgSXMLF.js} +1 -1
  334. package/web-shell/assets/{kanban-definition-UN3LZRKU-Efm2JxY3.js → kanban-definition-UN3LZRKU-CjT2mF6A.js} +1 -1
  335. package/web-shell/assets/{linear-DtY3IbOs.js → linear-CiTDGfCW.js} +1 -1
  336. package/web-shell/assets/{mermaid.core-PzpFqoMe.js → mermaid.core-_QnqxPRF.js} +5 -5
  337. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BLlTkHS0.js → mindmap-definition-RKZ34NQL-B1On14ZB.js} +1 -1
  338. package/web-shell/assets/{pieDiagram-4H26LBE5-D-mKF-jE.js → pieDiagram-4H26LBE5-x1Pf1OG2.js} +1 -1
  339. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DYCzslGm.js → quadrantDiagram-W4KKPZXB-ZawmK1Q9.js} +1 -1
  340. package/web-shell/assets/{requirementDiagram-4Y6WPE33-Dfpxlk7R.js → requirementDiagram-4Y6WPE33-krIMX0c8.js} +1 -1
  341. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D5cRaaxh.js → sankeyDiagram-5OEKKPKP-aMJyxtx_.js} +1 -1
  342. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-s04DReiS.js → sequenceDiagram-3UESZ5HK-C530-Kqz.js} +1 -1
  343. package/web-shell/assets/{stateDiagram-AJRCARHV-01UNFgnb.js → stateDiagram-AJRCARHV-DObd9dT_.js} +1 -1
  344. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bttf9Ae9.js +1 -0
  345. package/web-shell/assets/{timeline-definition-PNZ67QCA-DX8_wZBC.js → timeline-definition-PNZ67QCA-D9LnwQ1O.js} +1 -1
  346. package/web-shell/assets/{vennDiagram-CIIHVFJN-BK0FlBme.js → vennDiagram-CIIHVFJN-B_MT_v6Y.js} +1 -1
  347. package/web-shell/assets/{wardley-L42UT6IY-DkPc9UlD.js → wardley-L42UT6IY-DHKPz5Hu.js} +1 -1
  348. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DNKkpDAo.js → wardleyDiagram-YWT4CUSO-BoyKaItA.js} +1 -1
  349. package/web-shell/assets/{xychartDiagram-2RQKCTM6-CiPwg8QG.js → xychartDiagram-2RQKCTM6--xBJT7Kg.js} +1 -1
  350. package/web-shell/index.html +2 -2
  351. package/chunks/agent-headless-HYEHZFH6.js +0 -86
  352. package/chunks/channel-settings-store-OXYG5S5X.js +0 -101
  353. package/chunks/chunk-I5VM3SKY.js +0 -451
  354. package/chunks/chunk-PDPFQ2FO.js +0 -156
  355. package/chunks/daemon-status-provider-L3J6GKCT.js +0 -102
  356. package/chunks/daemon-trust-policy-4PHPY23S.js +0 -98
  357. package/chunks/exitPlanMode-RWJR2KGB.js +0 -84
  358. package/chunks/handleAutoUpdate-NHFSGYTF.js +0 -93
  359. package/chunks/initializer-Y5DJLT43.js +0 -99
  360. package/chunks/list-YHNQ32CS.js +0 -102
  361. package/chunks/loadedSettingsAdapter-GHUQK7H4.js +0 -96
  362. package/chunks/mcp-EA3KO6FS.js +0 -96
  363. package/chunks/nonInteractiveCli-NNOR56HU.js +0 -162
  364. package/chunks/read-file-KKTXGIZD.js +0 -32
  365. package/chunks/ripGrep-SJVAAYDV.js +0 -84
  366. package/chunks/serve-IH4XR5IL.js +0 -106
  367. package/chunks/spawnChannel-UAQMH6Y6.js +0 -94
  368. package/chunks/theme-manager-ZNDGAHJN.js +0 -88
  369. package/chunks/total-session-admission-66UDSOHO.js +0 -98
  370. package/chunks/workspace-providers-status-K22B3Z6B.js +0 -99
  371. package/chunks/workspace-skills-status-DDYCBVSH.js +0 -99
  372. package/chunks/write-file-TT6MWIKC.js +0 -86
  373. package/web-shell/assets/channel-DPFUV4oi.js +0 -1
  374. package/web-shell/assets/classDiagram-4FO5ZUOK-CLm0hVvw.js +0 -1
  375. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CLm0hVvw.js +0 -1
  376. package/web-shell/assets/index-BjC3yjjL.css +0 -5
  377. package/web-shell/assets/index-QzFq6w7o.js +0 -1775
  378. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DXb5olqv.js +0 -1
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  runSideQuery
5
- } from "./chunk-COBO5EBO.js";
5
+ } from "./chunk-JRTJEGSP.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-5O2XNYP6.js";
@@ -26,6 +26,10 @@ function isGoalEvidenceProofKind(value) {
26
26
  return value === "user_input" || value === "delivered_output" || value === "external_fact";
27
27
  }
28
28
  __name(isGoalEvidenceProofKind, "isGoalEvidenceProofKind");
29
+ function emptyGoalSnapshot() {
30
+ return { v: GOAL_STATE_VERSION, goal: null, activity: "idle" };
31
+ }
32
+ __name(emptyGoalSnapshot, "emptyGoalSnapshot");
29
33
  function goalRequiresExactPermit(snapshot) {
30
34
  return snapshot.goal !== null && (snapshot.goal.status === "active" || snapshot.activity === "running");
31
35
  }
@@ -85,6 +89,7 @@ var KNOWN_RECORD_SUBTYPES = /* @__PURE__ */ new Set([
85
89
  "rewind",
86
90
  "agent_bootstrap",
87
91
  "agent_launch_prompt",
92
+ "agent_retry",
88
93
  "file_history_snapshot",
89
94
  "session_source",
90
95
  "goal_state",
@@ -473,6 +478,278 @@ var InvalidGoalEvidenceReferenceError = class extends Error {
473
478
  __name(this, "InvalidGoalEvidenceReferenceError");
474
479
  }
475
480
  };
481
+ var GoalEvidenceRecordIndexAccumulator = class {
482
+ static {
483
+ __name(this, "GoalEvidenceRecordIndexAccumulator");
484
+ }
485
+ uuid;
486
+ parsedGoalContext;
487
+ claimedGoalId;
488
+ claimedRevision;
489
+ provenance;
490
+ hasObjectSystemPayload;
491
+ displayText;
492
+ hasHookContext;
493
+ prefixPreview = "";
494
+ lastPartPreviewValues = [];
495
+ lastPartIsHookContext = false;
496
+ partCount = 0;
497
+ hasRawEligibleContent = false;
498
+ constructor(record) {
499
+ this.uuid = record.uuid;
500
+ this.parsedGoalContext = parseGoalContext(record.goalContext);
501
+ const claimed = isRecord(record.goalContext) ? record.goalContext : void 0;
502
+ this.claimedGoalId = typeof claimed?.["goalId"] === "string" ? claimed["goalId"] : void 0;
503
+ this.claimedRevision = typeof claimed?.["revision"] === "number" ? claimed["revision"] : void 0;
504
+ this.provenance = this.parsedGoalContext ? coherentEvidenceProvenance(record) : void 0;
505
+ const systemPayload = isRecord(record.systemPayload) ? record.systemPayload : void 0;
506
+ this.hasObjectSystemPayload = systemPayload !== void 0;
507
+ this.displayText = typeof systemPayload?.["displayText"] === "string" ? systemPayload["displayText"].slice(0, CATALOG_PREVIEW_LIMIT) : void 0;
508
+ this.hasHookContext = typeof systemPayload?.["hookContext"] === "string";
509
+ this.addFragment(record);
510
+ }
511
+ addFragment(record) {
512
+ if (!this.provenance) return;
513
+ for (const part of record.message?.parts ?? []) {
514
+ this.finishPreviousPart();
515
+ const previewValues = [];
516
+ if (part.thought !== true && typeof part.text === "string") {
517
+ previewValues.push(part.text.slice(0, CATALOG_PREVIEW_LIMIT));
518
+ if (part.text.trim()) this.hasRawEligibleContent = true;
519
+ }
520
+ if (this.provenance === "tool_result" && part.functionResponse) {
521
+ previewValues.push(renderToolResponsePreview(part.functionResponse));
522
+ if (part.functionResponse.response !== void 0) {
523
+ this.hasRawEligibleContent = true;
524
+ }
525
+ }
526
+ this.lastPartPreviewValues = previewValues;
527
+ this.lastPartIsHookContext = typeof part.text === "string" && isUserPromptSubmitContextPartText(part.text);
528
+ this.partCount++;
529
+ }
530
+ }
531
+ finish() {
532
+ let preview;
533
+ const hasFinalHookContextPart = this.partCount > 1 && this.lastPartIsHookContext;
534
+ if (this.provenance === "real_user" && (this.hasHookContext || hasFinalHookContextPart) && this.displayText !== void 0) {
535
+ preview = this.displayText.slice(0, CATALOG_PREVIEW_LIMIT).trim();
536
+ } else if (this.provenance === "real_user" && !this.hasObjectSystemPayload && hasFinalHookContextPart) {
537
+ preview = this.prefixPreview.trim();
538
+ } else {
539
+ preview = appendPreviewValues(
540
+ this.prefixPreview,
541
+ this.lastPartPreviewValues
542
+ ).trim();
543
+ }
544
+ const catalogEntry = this.provenance && this.parsedGoalContext && preview ? {
545
+ uuid: this.uuid,
546
+ provenance: this.provenance,
547
+ turnId: this.parsedGoalContext.turnId,
548
+ preview,
549
+ proofKind: proofKindOf(this.provenance)
550
+ } : void 0;
551
+ return {
552
+ uuid: this.uuid,
553
+ ...this.parsedGoalContext ? { parsedGoalContext: this.parsedGoalContext } : {},
554
+ ...this.claimedGoalId !== void 0 ? { claimedGoalId: this.claimedGoalId } : {},
555
+ ...this.claimedRevision !== void 0 ? { claimedRevision: this.claimedRevision } : {},
556
+ ...this.provenance ? { provenance: this.provenance } : {},
557
+ hasCatalogEligibleContent: catalogEntry !== void 0,
558
+ hasRawEligibleContent: this.hasRawEligibleContent,
559
+ ...catalogEntry ? {
560
+ catalogEntryBytes: Buffer.byteLength(
561
+ JSON.stringify(catalogEntry),
562
+ "utf8"
563
+ )
564
+ } : {}
565
+ };
566
+ }
567
+ finishPreviousPart() {
568
+ if (this.partCount === 0) return;
569
+ this.prefixPreview = appendPreviewValues(
570
+ this.prefixPreview,
571
+ this.lastPartPreviewValues
572
+ );
573
+ }
574
+ };
575
+ function appendPreviewValues(current, values) {
576
+ let preview = current;
577
+ for (const value of values) {
578
+ if (!value || preview.length >= CATALOG_PREVIEW_LIMIT) continue;
579
+ const separator = preview ? "\n" : "";
580
+ const remaining = CATALOG_PREVIEW_LIMIT - preview.length;
581
+ preview += `${separator}${value}`.slice(0, remaining);
582
+ }
583
+ return preview;
584
+ }
585
+ __name(appendPreviewValues, "appendPreviewValues");
586
+ var GoalEvidenceCheckpointAccumulator = class {
587
+ constructor(hints, goal, permit) {
588
+ this.goal = goal;
589
+ if (permit.goalId !== goal.goalId || permit.revision !== goal.revision || !isNonEmptyString(permit.turnId)) {
590
+ throw new EvidenceSourceUnavailableError(
591
+ "permit_goal_mismatch",
592
+ "The current Goal permit does not match the Goal evidence revision."
593
+ );
594
+ }
595
+ const indexByUuid = /* @__PURE__ */ new Map();
596
+ for (let index = 0; index < hints.length; index++) {
597
+ const uuid = hints[index].uuid;
598
+ if (indexByUuid.has(uuid)) {
599
+ throw new EvidenceSourceUnavailableError(
600
+ "duplicate_record_uuid",
601
+ `The active transcript chain contains duplicate record UUID ${uuid}.`
602
+ );
603
+ }
604
+ indexByUuid.set(uuid, index);
605
+ }
606
+ const cursorId = goal.evidenceCursor.recordId;
607
+ if (cursorId === null) {
608
+ throw new EvidenceSourceUnavailableError(
609
+ "cursor_unset",
610
+ "The Goal evidence cursor is not available."
611
+ );
612
+ }
613
+ const cursorIndex = indexByUuid.get(cursorId);
614
+ if (cursorIndex === void 0) {
615
+ throw new EvidenceSourceUnavailableError(
616
+ "cursor_not_found",
617
+ `The Goal evidence cursor ${cursorId} is not in the active transcript chain.`
618
+ );
619
+ }
620
+ const lineageTurnIds = [];
621
+ const seenTurnIds = /* @__PURE__ */ new Set();
622
+ let currentTurnId;
623
+ for (let index = cursorIndex + 1; index < hints.length; index++) {
624
+ const hint = hints[index];
625
+ const context = hint.parsedGoalContext;
626
+ if (!context) {
627
+ if (hint.claimedGoalId === goal.goalId && hint.claimedRevision === goal.revision) {
628
+ throw new EvidenceSourceUnavailableError(
629
+ "malformed_turn_context",
630
+ `Goal-owned transcript record ${hint.uuid} has malformed turn context.`
631
+ );
632
+ }
633
+ continue;
634
+ }
635
+ if (context.goalId !== goal.goalId || context.revision !== goal.revision) {
636
+ continue;
637
+ }
638
+ if (context.turnId === currentTurnId) continue;
639
+ if (seenTurnIds.has(context.turnId)) {
640
+ throw new EvidenceSourceUnavailableError(
641
+ "turn_reentry",
642
+ `Goal turn ${context.turnId} re-enters the active transcript lineage.`
643
+ );
644
+ }
645
+ seenTurnIds.add(context.turnId);
646
+ lineageTurnIds.push(context.turnId);
647
+ currentTurnId = context.turnId;
648
+ }
649
+ if (lineageTurnIds.at(-1) !== permit.turnId) {
650
+ throw new EvidenceSourceUnavailableError(
651
+ "current_turn_not_tail",
652
+ "The current Goal permit is not the tail of the active transcript lineage."
653
+ );
654
+ }
655
+ this.checkpointEntries = checkpointCatalogEntries(goal);
656
+ const checkpointBytes = this.checkpointEntries.reduce(
657
+ (total, entry) => total + Buffer.byteLength(JSON.stringify(entry), "utf8"),
658
+ 0
659
+ );
660
+ let truncated = this.checkpointEntries.length >= CATALOG_ENTRY_LIMIT || checkpointBytes > CATALOG_BYTE_LIMIT;
661
+ const rawEntryLimit = Math.max(
662
+ 0,
663
+ CATALOG_ENTRY_LIMIT - this.checkpointEntries.length
664
+ );
665
+ let catalogBytes = checkpointBytes;
666
+ for (let index = hints.length - 1; !truncated && index > cursorIndex; index--) {
667
+ const hint = hints[index];
668
+ const context = hint.parsedGoalContext;
669
+ if (!hint.provenance || !context || context.goalId !== goal.goalId || context.revision !== goal.revision) {
670
+ continue;
671
+ }
672
+ if (this.candidateUuids.length >= rawEntryLimit) {
673
+ if (hint.hasRawEligibleContent) {
674
+ truncated = true;
675
+ break;
676
+ }
677
+ continue;
678
+ }
679
+ if (!hint.hasCatalogEligibleContent) continue;
680
+ const entryBytes = hint.catalogEntryBytes;
681
+ if (entryBytes === void 0 || catalogBytes + entryBytes > CATALOG_BYTE_LIMIT) {
682
+ truncated = true;
683
+ break;
684
+ }
685
+ this.candidateUuids.push(hint.uuid);
686
+ this.candidateUuidSet.add(hint.uuid);
687
+ catalogBytes += entryBytes;
688
+ }
689
+ this.truncated = truncated;
690
+ this.shouldCheckpoint = !truncated && this.candidateUuids.length > 0 && (this.checkpointEntries.length + this.candidateUuids.length >= CHECKPOINT_ENTRY_THRESHOLD || catalogBytes >= CHECKPOINT_BYTE_THRESHOLD);
691
+ }
692
+ static {
693
+ __name(this, "GoalEvidenceCheckpointAccumulator");
694
+ }
695
+ candidateUuids = [];
696
+ candidateUuidSet = /* @__PURE__ */ new Set();
697
+ captured = /* @__PURE__ */ new Map();
698
+ checkpointEntries;
699
+ truncated;
700
+ shouldCheckpoint;
701
+ getCandidateUuids() {
702
+ return this.shouldCheckpoint ? this.candidateUuids : [];
703
+ }
704
+ capture(record) {
705
+ if (!this.shouldCheckpoint || !this.candidateUuidSet.has(record.uuid)) {
706
+ return;
707
+ }
708
+ const provenance = coherentEvidenceProvenance(record);
709
+ if (!provenance) return;
710
+ const context = parseGoalContext(record.goalContext);
711
+ if (!context || context.goalId !== this.goal.goalId || context.revision !== this.goal.revision) {
712
+ return;
713
+ }
714
+ const preview = evidencePreview(record, provenance);
715
+ const content = evidenceContent(record, provenance);
716
+ if (!preview || !content) return;
717
+ this.captured.set(record.uuid, {
718
+ uuid: record.uuid,
719
+ provenance,
720
+ turnId: context.turnId,
721
+ preview,
722
+ proofKind: proofKindOf(provenance),
723
+ content: capCheckpointContent(content)
724
+ });
725
+ }
726
+ finish() {
727
+ const selected = this.shouldCheckpoint ? this.candidateUuids.map((uuid) => {
728
+ const entry = this.captured.get(uuid);
729
+ if (!entry) {
730
+ throw new InvalidGoalEvidenceReferenceError(
731
+ "ineligible_reference",
732
+ `Transcript record ${uuid} has no eligible evidence content.`,
733
+ uuid
734
+ );
735
+ }
736
+ return entry;
737
+ }) : [];
738
+ selected.reverse();
739
+ return {
740
+ previousClaims: structuredClone(
741
+ this.goal.evidenceCheckpoint?.claims ?? []
742
+ ),
743
+ evidence: selected,
744
+ truncated: this.truncated,
745
+ shouldCheckpoint: this.shouldCheckpoint
746
+ };
747
+ }
748
+ };
749
+ function getGoalEvidenceRecordIndexHint(record) {
750
+ return new GoalEvidenceRecordIndexAccumulator(record).finish();
751
+ }
752
+ __name(getGoalEvidenceRecordIndexHint, "getGoalEvidenceRecordIndexHint");
476
753
  function buildGoalEvidenceCatalog(input) {
477
754
  const analysis = analyzeEvidence(input);
478
755
  return {
@@ -483,32 +760,19 @@ function buildGoalEvidenceCatalog(input) {
483
760
  }
484
761
  __name(buildGoalEvidenceCatalog, "buildGoalEvidenceCatalog");
485
762
  function buildGoalEvidenceCheckpointWindow(input) {
486
- const analysis = analyzeEvidence(input);
487
- const rawEntries = analysis.catalog.filter(
488
- (entry) => entry.provenance !== "goal_checkpoint"
763
+ const accumulator = new GoalEvidenceCheckpointAccumulator(
764
+ input.records.map(getGoalEvidenceRecordIndexHint),
765
+ input.goal,
766
+ input.permit
489
767
  );
490
- const shouldCheckpoint = !analysis.catalogTruncated && rawEntries.length > 0 && (analysis.catalog.length >= CHECKPOINT_ENTRY_THRESHOLD || analysis.catalogBytes >= CHECKPOINT_BYTE_THRESHOLD);
491
- const evidence = (shouldCheckpoint ? rawEntries : []).map((entry) => {
492
- const recordIndex = analysis.indexByUuid.get(entry.uuid);
493
- const record = recordIndex === void 0 ? void 0 : input.records[recordIndex];
494
- const content = record ? evidenceContent(record, entry.provenance) : "";
495
- if (!content) {
496
- throw new InvalidGoalEvidenceReferenceError(
497
- "ineligible_reference",
498
- `Transcript record ${entry.uuid} has no eligible evidence content.`,
499
- entry.uuid
500
- );
501
- }
502
- return { ...entry, content: capCheckpointContent(content) };
503
- });
504
- return {
505
- previousClaims: structuredClone(
506
- input.goal.evidenceCheckpoint?.claims ?? []
507
- ),
508
- evidence,
509
- truncated: analysis.catalogTruncated,
510
- shouldCheckpoint
511
- };
768
+ const recordsByUuid = new Map(
769
+ input.records.map((record) => [record.uuid, record])
770
+ );
771
+ for (const uuid of accumulator.getCandidateUuids()) {
772
+ const record = recordsByUuid.get(uuid);
773
+ if (record) accumulator.capture(record);
774
+ }
775
+ return accumulator.finish();
512
776
  }
513
777
  __name(buildGoalEvidenceCheckpointWindow, "buildGoalEvidenceCheckpointWindow");
514
778
  function validateGoalEvidenceReferences(input) {
@@ -1629,20 +1893,30 @@ var LEGACY_STOPPED_KINDS = /* @__PURE__ */ new Set([
1629
1893
  "paused"
1630
1894
  ]);
1631
1895
  function recoverGoalFromRecords(records) {
1896
+ return selectGoalRecoveryFromRecords(records).recovery;
1897
+ }
1898
+ __name(recoverGoalFromRecords, "recoverGoalFromRecords");
1899
+ function selectGoalRecoveryFromRecords(records) {
1632
1900
  let unsupported;
1901
+ let unsupportedSourceUuid;
1633
1902
  for (let index = records.length - 1; index >= 0; index -= 1) {
1634
1903
  const record = records[index];
1635
1904
  if (record?.subtype !== "goal_state") continue;
1636
1905
  const payload = record.type === "system" ? parseGoalStateRecordPayloadV2(record.systemPayload) : void 0;
1637
- if (payload) return { kind: "v2", payload };
1638
- unsupported ??= {
1639
- kind: "unsupported",
1640
- reason: `Goal lifecycle record ${record.uuid} is malformed or uses an unsupported version`
1641
- };
1906
+ if (payload) {
1907
+ return { recovery: { kind: "v2", payload }, sourceUuid: record.uuid };
1908
+ }
1909
+ if (!unsupported) {
1910
+ unsupported = {
1911
+ kind: "unsupported",
1912
+ reason: `Goal lifecycle record ${record.uuid} is malformed or uses an unsupported version`
1913
+ };
1914
+ unsupportedSourceUuid = record.uuid;
1915
+ }
1642
1916
  }
1643
- return unsupported ?? recoverLegacyGoal(records);
1917
+ return unsupported ? { recovery: unsupported, sourceUuid: unsupportedSourceUuid } : recoverLegacyGoal(records);
1644
1918
  }
1645
- __name(recoverGoalFromRecords, "recoverGoalFromRecords");
1919
+ __name(selectGoalRecoveryFromRecords, "selectGoalRecoveryFromRecords");
1646
1920
  function recoverLegacyGoal(records) {
1647
1921
  for (let recordIndex = records.length - 1; recordIndex >= 0; recordIndex -= 1) {
1648
1922
  const record = records[recordIndex];
@@ -1659,18 +1933,71 @@ function recoverLegacyGoal(records) {
1659
1933
  const kind = value["kind"];
1660
1934
  const condition = value["condition"];
1661
1935
  if (typeof kind !== "string" || typeof condition !== "string") {
1662
- return unsupportedLegacy(record.uuid);
1936
+ return {
1937
+ recovery: unsupportedLegacy(record.uuid),
1938
+ sourceUuid: record.uuid
1939
+ };
1940
+ }
1941
+ if (LEGACY_STOPPED_KINDS.has(kind)) {
1942
+ return { recovery: { kind: "none" }, sourceUuid: record.uuid };
1663
1943
  }
1664
- if (LEGACY_STOPPED_KINDS.has(kind)) return { kind: "none" };
1665
1944
  if (!LEGACY_ACTIVE_KINDS.has(kind) || condition.trim().length === 0) {
1666
- return unsupportedLegacy(record.uuid);
1945
+ return {
1946
+ recovery: unsupportedLegacy(record.uuid),
1947
+ sourceUuid: record.uuid
1948
+ };
1667
1949
  }
1668
- return { kind: "legacy", objective: condition.trim() };
1950
+ return {
1951
+ recovery: { kind: "legacy", objective: condition.trim() },
1952
+ sourceUuid: record.uuid
1953
+ };
1669
1954
  }
1670
1955
  }
1671
- return { kind: "none" };
1956
+ return { recovery: { kind: "none" } };
1672
1957
  }
1673
1958
  __name(recoverLegacyGoal, "recoverLegacyGoal");
1959
+ function normalizeGoalRecoveryRecord(record) {
1960
+ if (record.subtype === "goal_state") {
1961
+ return {
1962
+ uuid: record.uuid,
1963
+ type: record.type,
1964
+ subtype: record.subtype,
1965
+ systemPayload: record.type === "system" ? parseGoalStateRecordPayloadV2(record.systemPayload) ?? null : null
1966
+ };
1967
+ }
1968
+ if (record.type !== "system" || record.subtype !== "slash_command") {
1969
+ return void 0;
1970
+ }
1971
+ const payload = record.systemPayload;
1972
+ if (payload?.phase !== "result" || !Array.isArray(payload.outputHistoryItems)) {
1973
+ return void 0;
1974
+ }
1975
+ const goalStatusItems = payload.outputHistoryItems.filter(
1976
+ (value) => isObjectRecord2(value) && value["type"] === "goal_status"
1977
+ );
1978
+ if (goalStatusItems.length === 0) return void 0;
1979
+ return {
1980
+ uuid: record.uuid,
1981
+ type: record.type,
1982
+ subtype: record.subtype,
1983
+ systemPayload: {
1984
+ phase: "result",
1985
+ outputHistoryItems: goalStatusItems
1986
+ }
1987
+ };
1988
+ }
1989
+ __name(normalizeGoalRecoveryRecord, "normalizeGoalRecoveryRecord");
1990
+ function isGoalRecoveryCandidate(record) {
1991
+ if (record.subtype === "goal_state") return true;
1992
+ if (record.type !== "system" || record.subtype !== "slash_command") {
1993
+ return false;
1994
+ }
1995
+ const payload = record.systemPayload;
1996
+ return payload?.phase === "result" && Array.isArray(payload.outputHistoryItems) && payload.outputHistoryItems.some(
1997
+ (value) => isObjectRecord2(value) && value["type"] === "goal_status"
1998
+ );
1999
+ }
2000
+ __name(isGoalRecoveryCandidate, "isGoalRecoveryCandidate");
1674
2001
  function unsupportedLegacy(recordUuid) {
1675
2002
  return {
1676
2003
  kind: "unsupported",
@@ -1758,8 +2085,15 @@ function createGoalRuntime(options) {
1758
2085
  let nextVerifierFeedback;
1759
2086
  let currentTurnFeedback;
1760
2087
  let restored = false;
2088
+ let restoreActivationPending = false;
2089
+ let restorePreparation;
2090
+ let restoreActivation;
2091
+ let preparedRestoreCause;
2092
+ let preparedRestoreHasSnapshot = false;
2093
+ let preparedCheckpointWindow;
1761
2094
  let disposed = false;
1762
2095
  let recoveryError;
2096
+ let recoveryCause;
1763
2097
  const createCheckpointAttempt = /* @__PURE__ */ __name((permit, goal, recordUuid = randomUUID()) => options.evidenceSource && options.checkpointVerifier ? {
1764
2098
  permit: structuredClone(permit),
1765
2099
  goal: structuredClone(goal),
@@ -1856,7 +2190,7 @@ function createGoalRuntime(options) {
1856
2190
  void started.catch(handleStartFailure);
1857
2191
  }, "flushContinuation");
1858
2192
  const queueContinuation = /* @__PURE__ */ __name((cause) => {
1859
- if (snapshot.goal?.status !== "active" || currentPermit || pendingProposal || verificationAttempt || checkpointAttempt) {
2193
+ if (restoreActivationPending || snapshot.goal?.status !== "active" || currentPermit || pendingProposal || verificationAttempt || checkpointAttempt) {
1860
2194
  return;
1861
2195
  }
1862
2196
  continuationQueued = true;
@@ -2209,10 +2543,10 @@ function createGoalRuntime(options) {
2209
2543
  }
2210
2544
  });
2211
2545
  }, "recordCheckpoint");
2212
- const runCheckpoint = /* @__PURE__ */ __name(async (attempt) => {
2546
+ const runCheckpoint = /* @__PURE__ */ __name(async (attempt, preparedWindow) => {
2213
2547
  const evidenceSource = options.evidenceSource;
2214
2548
  const checkpointVerifier = options.checkpointVerifier;
2215
- if (!evidenceSource || !checkpointVerifier) {
2549
+ if (!preparedWindow && !evidenceSource || !checkpointVerifier) {
2216
2550
  await recordCheckpointFailure(
2217
2551
  attempt,
2218
2552
  "Goal checkpoint recovery dependencies are unavailable"
@@ -2220,15 +2554,18 @@ function createGoalRuntime(options) {
2220
2554
  return;
2221
2555
  }
2222
2556
  try {
2223
- await evidenceSource.flush();
2224
- if (attempt.controller.signal.aborted) return;
2225
- const records = await evidenceSource.readActiveTranscriptChain();
2226
- if (attempt.controller.signal.aborted) return;
2227
- const window = buildGoalEvidenceCheckpointWindow({
2228
- records,
2229
- goal: attempt.goal,
2230
- permit: attempt.permit
2231
- });
2557
+ let window = preparedWindow;
2558
+ if (!window) {
2559
+ await evidenceSource.flush();
2560
+ if (attempt.controller.signal.aborted) return;
2561
+ const records = await evidenceSource.readActiveTranscriptChain();
2562
+ if (attempt.controller.signal.aborted) return;
2563
+ window = buildGoalEvidenceCheckpointWindow({
2564
+ records,
2565
+ goal: attempt.goal,
2566
+ permit: attempt.permit
2567
+ });
2568
+ }
2232
2569
  if (window.truncated) {
2233
2570
  await recordCheckpointFailure(
2234
2571
  attempt,
@@ -2288,12 +2625,18 @@ function createGoalRuntime(options) {
2288
2625
  return {
2289
2626
  getSnapshot,
2290
2627
  getSnapshotForPermit,
2628
+ getRecoveryCause() {
2629
+ return recoveryCause;
2630
+ },
2291
2631
  subscribe(listener) {
2292
2632
  listeners.add(listener);
2293
2633
  return () => listeners.delete(listener);
2294
2634
  },
2295
- restore(records) {
2296
- const restoring = enqueue(
2635
+ prepareRestore(records, checkpointWindow) {
2636
+ if (restorePreparation) return restorePreparation.then(() => void 0);
2637
+ restoreActivationPending = true;
2638
+ preparedCheckpointWindow = checkpointWindow;
2639
+ const preparation = enqueue(
2297
2640
  async () => {
2298
2641
  assertAvailable();
2299
2642
  if (restored) return;
@@ -2351,11 +2694,15 @@ function createGoalRuntime(options) {
2351
2694
  recoveredSnapshot = structuredClone(payload.snapshot);
2352
2695
  recoveredCause = payload.cause;
2353
2696
  }
2697
+ assertAvailable();
2354
2698
  if (recoveredSnapshot) snapshot = recoveredSnapshot;
2355
2699
  recoveryError = void 0;
2356
2700
  restored = true;
2357
- if (recoveredSnapshot) broadcast(recoveredCause);
2358
- if (!checkpointAttempt) queueContinuation();
2701
+ if (recoveredSnapshot) {
2702
+ recoveryCause = recoveredCause;
2703
+ }
2704
+ preparedRestoreHasSnapshot = recoveredSnapshot !== void 0;
2705
+ preparedRestoreCause = recoveredCause;
2359
2706
  return checkpointAttempt;
2360
2707
  } catch (error) {
2361
2708
  if (!disposed) {
@@ -2365,14 +2712,66 @@ function createGoalRuntime(options) {
2365
2712
  }
2366
2713
  }
2367
2714
  );
2368
- return restoring.then(async (attempt) => {
2369
- if (!attempt) return;
2715
+ restorePreparation = preparation;
2716
+ return preparation.then(
2717
+ () => void 0,
2718
+ (error) => {
2719
+ if (!restored && restorePreparation === preparation) {
2720
+ restorePreparation = void 0;
2721
+ restoreActivation = void 0;
2722
+ restoreActivationPending = false;
2723
+ preparedCheckpointWindow = void 0;
2724
+ }
2725
+ throw error;
2726
+ }
2727
+ );
2728
+ },
2729
+ getPreparedRestore() {
2730
+ if (!restorePreparation) {
2731
+ return Promise.reject(
2732
+ new GoalPersistenceUnavailableError(
2733
+ "Goal restore preparation has not started"
2734
+ )
2735
+ );
2736
+ }
2737
+ return restorePreparation.then(() => void 0);
2738
+ },
2739
+ activateRestoredWork() {
2740
+ try {
2741
+ assertAvailable();
2742
+ } catch (error) {
2743
+ return Promise.reject(error);
2744
+ }
2745
+ if (!restorePreparation) {
2746
+ return Promise.reject(
2747
+ new GoalPersistenceUnavailableError(
2748
+ "Goal restore preparation has not started"
2749
+ )
2750
+ );
2751
+ }
2752
+ if (restoreActivation) return restoreActivation;
2753
+ restoreActivation = restorePreparation.then(async (attempt) => {
2754
+ assertAvailable();
2755
+ restoreActivationPending = false;
2756
+ if (preparedRestoreHasSnapshot) broadcast(preparedRestoreCause);
2757
+ if (!attempt) {
2758
+ await enqueue(async () => {
2759
+ assertAvailable();
2760
+ queueContinuation();
2761
+ });
2762
+ return;
2763
+ }
2370
2764
  try {
2371
- await runCheckpoint(attempt);
2765
+ await runCheckpoint(attempt, preparedCheckpointWindow);
2372
2766
  } catch {
2373
2767
  await settleDanglingAttempt(attempt.permit);
2374
2768
  }
2375
2769
  });
2770
+ return restoreActivation;
2771
+ },
2772
+ async restore(records) {
2773
+ await this.prepareRestore(records);
2774
+ await this.activateRestoredWork();
2376
2775
  },
2377
2776
  bindHost(nextHost) {
2378
2777
  assertOperational();
@@ -2428,10 +2827,25 @@ function createGoalRuntime(options) {
2428
2827
  currentTurnFeedback = void 0;
2429
2828
  currentProposal = void 0;
2430
2829
  snapshot = { ...snapshot, activity: "idle" };
2830
+ const nextTurnKey = queuedTurnKey;
2831
+ if (nextTurnKey && snapshot.goal?.status === "active" && !pendingProposal && !verificationAttempt) {
2832
+ queuedTurnKey = void 0;
2833
+ continuationQueued = false;
2834
+ currentPermit = {
2835
+ goalId: snapshot.goal.goalId,
2836
+ revision: snapshot.goal.revision,
2837
+ turnId: randomUUID()
2838
+ };
2839
+ currentPermitHost = host;
2840
+ currentTurnKey = nextTurnKey;
2841
+ currentTurnFeedback = nextVerifierFeedback;
2842
+ nextVerifierFeedback = void 0;
2843
+ snapshot = { ...snapshot, activity: "running" };
2844
+ }
2431
2845
  broadcast();
2432
2846
  released = true;
2433
2847
  }
2434
- if (released) queueContinuation();
2848
+ if (released && !currentPermit) queueContinuation();
2435
2849
  return released;
2436
2850
  });
2437
2851
  },
@@ -2634,11 +3048,18 @@ ${proposal.reason}`;
2634
3048
  goal: nextGoal,
2635
3049
  activity: "idle"
2636
3050
  };
2637
- await options.journal.recordGoalState(recordUuid, {
2638
- v: GOAL_STATE_VERSION,
2639
- cause: request.action,
2640
- snapshot: nextSnapshot
2641
- });
3051
+ try {
3052
+ await options.journal.recordGoalState(recordUuid, {
3053
+ v: GOAL_STATE_VERSION,
3054
+ cause: request.action,
3055
+ snapshot: nextSnapshot
3056
+ });
3057
+ } catch (error) {
3058
+ throw error instanceof GoalPersistenceUnavailableError ? error : new GoalPersistenceUnavailableError(
3059
+ error instanceof Error ? error.message : String(error),
3060
+ { cause: error }
3061
+ );
3062
+ }
2642
3063
  assertAvailable();
2643
3064
  const invalidatesPermit = request.action === "create" || request.action === "replace" || request.action === "edit" || request.action === "pause" || request.action === "clear";
2644
3065
  const invalidatedHost = currentPermitHost ?? host;
@@ -2706,6 +3127,7 @@ var goalTurnContext = new AsyncLocalStorage();
2706
3127
  export {
2707
3128
  GOAL_PROPOSAL_REASON_MAX_CHARACTERS,
2708
3129
  PAUSED_GOAL_SYSTEM_REMINDER,
3130
+ emptyGoalSnapshot,
2709
3131
  goalRequiresExactPermit,
2710
3132
  validateGoalProposalReason,
2711
3133
  wrapUserPromptSubmitContext,
@@ -2719,11 +3141,18 @@ export {
2719
3141
  aggregateTranscriptRecordFragments,
2720
3142
  prepareTranscriptRecords,
2721
3143
  GOAL_EVIDENCE_REFERENCE_LIMIT,
3144
+ EvidenceSourceUnavailableError,
3145
+ InvalidGoalEvidenceReferenceError,
3146
+ GoalEvidenceRecordIndexAccumulator,
3147
+ GoalEvidenceCheckpointAccumulator,
2722
3148
  createGoalCheckpointVerifier,
2723
3149
  elapsedActiveTime,
2724
3150
  parseGoalStateRecordPayloadV2,
2725
3151
  parseGoalSnapshotV2,
2726
3152
  parseGoalStateCause,
3153
+ selectGoalRecoveryFromRecords,
3154
+ normalizeGoalRecoveryRecord,
3155
+ isGoalRecoveryCandidate,
2727
3156
  GOAL_RUNTIME_DISPOSED_MESSAGE,
2728
3157
  STALE_GOAL_TURN_MESSAGE,
2729
3158
  GoalPersistenceUnavailableError,