@qwen-code/qwen-code 0.21.12-preview.3 → 0.21.12

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 (348) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +10 -0
  2. package/bundled/qc-helper/docs/features/channels/overview.md +1 -1
  3. package/bundled/qc-helper/docs/features/channels/plugins.md +11 -11
  4. package/bundled/qc-helper/docs/features/code-review.md +1 -1
  5. package/bundled/qc-helper/docs/qwen-serve.md +99 -34
  6. package/bundled/review/SKILL.md +55 -36
  7. package/chunks/{MaxSizedBox-EIK4BHBQ.js → MaxSizedBox-ZSJJ2D5S.js} +46 -46
  8. package/chunks/{StandaloneSessionPicker-NHVJDRYD.js → StandaloneSessionPicker-WHUHQXSA.js} +65 -66
  9. package/chunks/{acp-startup-profiler-JMJBZDVO.js → acp-startup-profiler-SVPUHLXV.js} +2 -2
  10. package/chunks/{acpAgent-37UDZP64.js → acpAgent-7JOAESF5.js} +960 -539
  11. package/chunks/{agent-FAWBG7PP.js → agent-E6V3VXQR.js} +42 -42
  12. package/chunks/{agent-headless-SHK4PCCH.js → agent-headless-OEQNFOMH.js} +42 -42
  13. package/chunks/{anthropicContentGenerator-4JSC3ZFL.js → anthropicContentGenerator-YDT4EOKO.js} +25 -25
  14. package/chunks/{artifact-tool-FRMBPDPB.js → artifact-tool-4GCQQDZI.js} +5 -5
  15. package/chunks/{askUserQuestion-7G3LI3IZ.js → askUserQuestion-HZJJLR3Z.js} +2 -2
  16. package/chunks/{bridge-DEAYNDCI.js → bridge-NPBV53UA.js} +49 -49
  17. package/chunks/{build-RZS65IIX.js → build-GDBLPA24.js} +1 -1
  18. package/chunks/{channel-management-service-SKAN6NOB.js → channel-management-service-OADNGQM3.js} +4 -4
  19. package/chunks/{channel-settings-store-UIGYER6R.js → channel-settings-store-4ODLJ4X2.js} +49 -49
  20. package/chunks/{channel-worker-group-YPTB5ASD.js → channel-worker-group-IHBIHQ45.js} +7 -7
  21. package/chunks/{channel-worker-manager-4EHJSPRH.js → channel-worker-manager-GEHYJ5AE.js} +7 -7
  22. package/chunks/{channel-worker-supervisor-DZKHYFHV.js → channel-worker-supervisor-ZJIIWM4I.js} +5 -5
  23. package/chunks/{chunk-LHOG4E6Y.js → chunk-22C7BQ6D.js} +3 -3
  24. package/chunks/{chunk-DP3IHZGG.js → chunk-2AUM35J5.js} +59 -7
  25. package/chunks/{chunk-2SB4SLKC.js → chunk-2IIJTXYF.js} +1 -3
  26. package/chunks/{chunk-DYVCDQW2.js → chunk-2IVYL3IF.js} +1 -1
  27. package/chunks/{chunk-EYW54TBD.js → chunk-2ZWH53I4.js} +3 -3
  28. package/chunks/{chunk-5I5NMQCU.js → chunk-36XKGB7E.js} +3 -3
  29. package/chunks/{chunk-AQHNAA7E.js → chunk-3AEKDXKT.js} +1 -1
  30. package/chunks/{chunk-M6SXIXBV.js → chunk-3GDBZJD6.js} +6 -6
  31. package/chunks/{chunk-6XZERB6P.js → chunk-3GM5DLBI.js} +5 -5
  32. package/chunks/{chunk-4M2F7OG7.js → chunk-3LDGOQXZ.js} +6 -6
  33. package/chunks/{chunk-BKHCW2BI.js → chunk-3VUENPWF.js} +10 -0
  34. package/chunks/{chunk-ENEEQMGM.js → chunk-45NQKMYB.js} +1 -1
  35. package/chunks/{chunk-MDFUBQAQ.js → chunk-47BGDLJG.js} +119 -27
  36. package/chunks/{chunk-EFIMD5VA.js → chunk-4AOVQPJU.js} +1 -1
  37. package/chunks/{chunk-HB6QW4LM.js → chunk-4KM2SYK5.js} +19 -16
  38. package/chunks/{chunk-UNCIELQJ.js → chunk-4XA4QIUA.js} +1 -1
  39. package/chunks/{chunk-2J53A6MV.js → chunk-56HVDG3M.js} +4 -4
  40. package/chunks/{chunk-N3FJOQX7.js → chunk-5AFGJNY6.js} +4 -4
  41. package/chunks/{chunk-2AZMF6G5.js → chunk-5RUCD4ED.js} +2 -2
  42. package/chunks/{chunk-32VOOMEF.js → chunk-62X3CM7Q.js} +7 -7
  43. package/chunks/{chunk-6LYDH7VT.js → chunk-63FNZTWG.js} +2 -2
  44. package/chunks/{chunk-P64FPV3G.js → chunk-6JEIRPLN.js} +47 -4
  45. package/chunks/{chunk-O5G7IQGM.js → chunk-6P5EXEBL.js} +499 -112
  46. package/chunks/{chunk-3ZYX7AUR.js → chunk-6SPD4Z7F.js} +1 -1
  47. package/chunks/{chunk-YZJVVQD3.js → chunk-6ZKSO6K7.js} +7 -7
  48. package/chunks/{chunk-N5ULBHP3.js → chunk-7KJPO7YH.js} +2 -2
  49. package/chunks/{chunk-MZSJ43WV.js → chunk-7U5G6JXI.js} +24 -2
  50. package/chunks/{chunk-K7JW6V5O.js → chunk-A6NRNRKE.js} +1 -1
  51. package/chunks/{chunk-XLQS3VI6.js → chunk-AKBFSOC5.js} +2 -2
  52. package/chunks/{chunk-LT532KF4.js → chunk-AW27A43Y.js} +10 -12
  53. package/chunks/{chunk-M4NWDIFU.js → chunk-AZQ3DT76.js} +1 -1
  54. package/chunks/{chunk-4GLFFNP3.js → chunk-B4VN3VDH.js} +5 -5
  55. package/chunks/{chunk-YTYPRVIZ.js → chunk-BSR5AXZR.js} +4 -3
  56. package/chunks/{chunk-AJX4ITUG.js → chunk-BSSLSQEW.js} +3 -3
  57. package/chunks/{chunk-EYY4IBPV.js → chunk-CGM3E75C.js} +3 -3
  58. package/chunks/{chunk-V4MJ56RS.js → chunk-CIDQISGM.js} +5 -5
  59. package/chunks/{chunk-T6W4KACQ.js → chunk-CPFFU46D.js} +1 -1
  60. package/chunks/{chunk-TYCXSMZU.js → chunk-CQ6IPDQW.js} +3 -3
  61. package/chunks/{chunk-KIFRFCCB.js → chunk-CZ4OWGQQ.js} +67 -22
  62. package/chunks/{chunk-N7NBMAMW.js → chunk-D2RNVVH6.js} +2 -2
  63. package/chunks/{chunk-KPVVWKF3.js → chunk-D7QGE3RT.js} +1 -1
  64. package/chunks/{chunk-TYGKUOEG.js → chunk-DAV4QFD5.js} +3 -11
  65. package/chunks/{chunk-QUESTNOP.js → chunk-DD6O3ZRD.js} +1 -1
  66. package/chunks/{chunk-NWPO6I7V.js → chunk-DEDESZDL.js} +1 -1
  67. package/chunks/{chunk-7LZ7DK4D.js → chunk-DFVXU5YM.js} +1 -1
  68. package/chunks/{chunk-TBVNYG5B.js → chunk-DG4IQ6JG.js} +5 -5
  69. package/chunks/{chunk-SAQHDAUJ.js → chunk-DPTMKFIH.js} +452 -57
  70. package/chunks/{chunk-M6HXP2SG.js → chunk-EBPLKY6U.js} +2192 -849
  71. package/chunks/{chunk-3XZYK76R.js → chunk-EJOGLSNJ.js} +2 -2
  72. package/chunks/{chunk-L7T742G2.js → chunk-FA5K6YI2.js} +47 -3
  73. package/chunks/{chunk-M2NMFAFR.js → chunk-FMIH5KMQ.js} +1 -1
  74. package/chunks/{chunk-HHGQGTJQ.js → chunk-FQDCO3CJ.js} +10 -1
  75. package/chunks/{chunk-V3LXMASR.js → chunk-FRHQQC2Z.js} +1 -1
  76. package/chunks/{chunk-732MOPEM.js → chunk-G6MUFRNI.js} +1 -1
  77. package/chunks/{chunk-KNXA5XXK.js → chunk-GXTMEATA.js} +15 -34
  78. package/chunks/{chunk-7SUQZ7QH.js → chunk-GZDWTBT3.js} +2 -2
  79. package/chunks/{chunk-IQFYO5BF.js → chunk-H7TMVHKE.js} +1 -1
  80. package/chunks/{chunk-KNQZXSLW.js → chunk-HG3UBTJ4.js} +23 -9
  81. package/chunks/{chunk-MPBRV3UU.js → chunk-HOSVOUDK.js} +71 -0
  82. package/chunks/{chunk-OPBATTFQ.js → chunk-HTYND72J.js} +1 -1
  83. package/chunks/{chunk-I4XSOFH2.js → chunk-I7BT2MME.js} +1 -1
  84. package/chunks/{chunk-LHY6HBRA.js → chunk-IH4Z54RJ.js} +7 -5
  85. package/chunks/{chunk-GYBDYWMV.js → chunk-IRSLAS4M.js} +2 -2
  86. package/chunks/{chunk-UZPWH6SP.js → chunk-IX4PWUDU.js} +401 -173
  87. package/chunks/{chunk-KT4OWAAZ.js → chunk-JRIVMPD2.js} +3 -3
  88. package/chunks/{chunk-Q7YDKOGY.js → chunk-JVEGA3MM.js} +1 -1
  89. package/chunks/{chunk-O5AZPHYZ.js → chunk-K34GJQOZ.js} +138 -16
  90. package/chunks/{chunk-L2GTEEEU.js → chunk-K5IDV3PC.js} +44 -1
  91. package/chunks/{chunk-5HBFERG5.js → chunk-KEC5FHLM.js} +3 -3
  92. package/chunks/{chunk-5PWLQ7SK.js → chunk-KLOMACIR.js} +15 -8
  93. package/chunks/{chunk-XWUQ4IH5.js → chunk-KWX56CHZ.js} +7 -7
  94. package/chunks/{chunk-VQZXRLEX.js → chunk-LCX5B364.js} +3 -3
  95. package/chunks/{chunk-CTQE2NB2.js → chunk-LSRI3ND3.js} +1 -1
  96. package/chunks/{chunk-5TXOGH4I.js → chunk-LUISTZXI.js} +3 -3
  97. package/chunks/{chunk-6AECVSVX.js → chunk-MAKIANMX.js} +3 -3
  98. package/chunks/{chunk-M4OYAR6J.js → chunk-MDNUCDKZ.js} +2 -2
  99. package/chunks/{chunk-CZXQ4UZA.js → chunk-MELQSJOU.js} +1 -1
  100. package/chunks/{chunk-6ZIIHBNV.js → chunk-MUNA4QDC.js} +4 -4
  101. package/chunks/{chunk-E5BWLU5J.js → chunk-N4SVADAV.js} +305 -143
  102. package/chunks/{chunk-URK542T4.js → chunk-NF5J2WFA.js} +15 -2
  103. package/chunks/{chunk-GJJQV4PY.js → chunk-NLFLYSS4.js} +1 -1
  104. package/chunks/{chunk-FRH4SSGX.js → chunk-NW2GIPG3.js} +2 -4
  105. package/chunks/{chunk-JS4Q5NG5.js → chunk-NX4A23LY.js} +3 -3
  106. package/chunks/{chunk-DEG7R6Z6.js → chunk-OK47XBYH.js} +79 -36
  107. package/chunks/{chunk-7D4KEFOT.js → chunk-OPVF453Q.js} +3 -3
  108. package/chunks/{chunk-J7DNMZFO.js → chunk-OR64CU46.js} +1 -1
  109. package/chunks/{chunk-DAX3G67A.js → chunk-OWGRUU7F.js} +1 -1
  110. package/chunks/{chunk-M2PY7CNK.js → chunk-OWXFBIB6.js} +2 -2
  111. package/chunks/{chunk-NELCY6JT.js → chunk-OYWVIXHT.js} +1 -3
  112. package/chunks/{chunk-V7RNNPGC.js → chunk-P5Y23G2L.js} +18 -1
  113. package/chunks/{chunk-QZ5G26ZE.js → chunk-PTSEETCO.js} +27 -27
  114. package/chunks/{chunk-IEP44U2R.js → chunk-PVXEJB66.js} +1 -1
  115. package/chunks/{chunk-NC4O6UE6.js → chunk-PZW46OTB.js} +2 -2
  116. package/chunks/{chunk-RQVVXDHS.js → chunk-Q4ZPYNIZ.js} +4 -4
  117. package/chunks/{chunk-QSWDGAIC.js → chunk-QILD6R27.js} +1 -1
  118. package/chunks/{chunk-GLWWPFTW.js → chunk-QLTATTPS.js} +1 -1
  119. package/chunks/{chunk-QTI7SRXI.js → chunk-QPBFRWCP.js} +3 -3
  120. package/chunks/{chunk-3TT6MZHJ.js → chunk-QSD4UH74.js} +842 -62
  121. package/chunks/{chunk-TEKFBSMY.js → chunk-RDVNSJQU.js} +3 -3
  122. package/chunks/{chunk-NPE3STIW.js → chunk-ROIJYS5K.js} +6 -6
  123. package/chunks/{chunk-JEMR2FTD.js → chunk-RQJA2YYO.js} +4 -4
  124. package/chunks/{chunk-YI6UGZF5.js → chunk-S6TCTH4Z.js} +13 -13
  125. package/chunks/{chunk-ZGWY4YUB.js → chunk-SYHXR6WM.js} +5 -5
  126. package/chunks/{chunk-O4BBDP2G.js → chunk-TB4YFWXG.js} +2 -2
  127. package/chunks/{chunk-ILVATFYJ.js → chunk-TDESMS7M.js} +22 -18
  128. package/chunks/{chunk-47FQVRCO.js → chunk-TMFWI4RC.js} +1 -1
  129. package/chunks/{chunk-T4FTABSW.js → chunk-TQDFSQQF.js} +1 -1
  130. package/chunks/{chunk-ZV4XVYL3.js → chunk-TTRH3RTQ.js} +4 -4
  131. package/chunks/{chunk-ZWPWQEF5.js → chunk-TXP5NGG3.js} +1 -1
  132. package/chunks/{chunk-E3GLDLYB.js → chunk-TYAMGABM.js} +0 -6
  133. package/chunks/{chunk-VWD7SNNN.js → chunk-UI5UGEF4.js} +1082 -926
  134. package/chunks/{chunk-MWZYNOCG.js → chunk-ULNWG62W.js} +3 -3
  135. package/chunks/{chunk-HGCQ5SE7.js → chunk-UXEO7E3V.js} +21 -0
  136. package/chunks/{chunk-U6PTKAOW.js → chunk-V6OBVAST.js} +1 -1
  137. package/chunks/{chunk-5UPJ774B.js → chunk-VIFA5VJD.js} +1 -1
  138. package/chunks/{chunk-Y66OOMKS.js → chunk-VLHR7F4E.js} +595 -58
  139. package/chunks/{chunk-EYS3GGM3.js → chunk-VPV7WBVT.js} +1 -1
  140. package/chunks/{chunk-XCGIMOLN.js → chunk-WCCLLK7X.js} +14 -1
  141. package/chunks/{chunk-JL3LC3CQ.js → chunk-WCEI6J56.js} +1 -1
  142. package/chunks/{chunk-JXK3WAP7.js → chunk-WDVDVWJ3.js} +6 -6
  143. package/chunks/{chunk-ZQSNP4TG.js → chunk-WI6GIM2M.js} +2 -2
  144. package/chunks/{chunk-TRYJ3BVE.js → chunk-WM3LUQLO.js} +7 -7
  145. package/chunks/{chunk-VJNBRRZG.js → chunk-WZMH7II3.js} +1 -1
  146. package/chunks/{chunk-HBZUU4AE.js → chunk-X5SLJOMF.js} +9 -7
  147. package/chunks/{chunk-FDWH6CBK.js → chunk-XAFIL4BD.js} +7 -7
  148. package/chunks/{chunk-P2UCMHDT.js → chunk-XDRXOSAD.js} +3 -3
  149. package/chunks/{chunk-RRQJPCRQ.js → chunk-XH3KAV2G.js} +2 -2
  150. package/chunks/{chunk-F6AOBFUN.js → chunk-YBHUXEC6.js} +1 -1
  151. package/chunks/{chunk-GZGDJ4E6.js → chunk-YBVVOSOH.js} +1 -1
  152. package/chunks/{chunk-EXG2R5UR.js → chunk-YCHNAKC5.js} +16 -14
  153. package/chunks/{chunk-XTH2OMDS.js → chunk-YIGGWOJE.js} +1 -1
  154. package/chunks/{chunk-IX7CFQGA.js → chunk-YILJKX2T.js} +3 -3
  155. package/chunks/{chunk-SSAOTDK7.js → chunk-YX2RDGAL.js} +1 -1
  156. package/chunks/{chunk-6S52N6PG.js → chunk-ZBB5EZZV.js} +2 -2
  157. package/chunks/{chunk-3GCU5O2E.js → chunk-ZLCT4C5A.js} +1 -1
  158. package/chunks/{chunk-4ETA3KRC.js → chunk-ZMY2P4L3.js} +3 -3
  159. package/chunks/{chunk-575MI5K3.js → chunk-ZQUY3ZJU.js} +4 -4
  160. package/chunks/{computer-use-S4JEU5P7.js → computer-use-F4URV4TU.js} +45 -45
  161. package/chunks/{config-utils-TXVKR27S.js → config-utils-Z3OW3IQG.js} +4 -4
  162. package/chunks/{contextCommand-2H5OH2HW.js → contextCommand-IGSS2U5J.js} +44 -44
  163. package/chunks/{core-runtime-IAQ4DD4Y.js → core-runtime-H5CZDN3A.js} +42 -42
  164. package/chunks/{create-sub-session-EKHKXJAA.js → create-sub-session-PA7MFTHK.js} +42 -42
  165. package/chunks/{create-sub-session-Y4WYDZGC.js → create-sub-session-XT6DLYOE.js} +2 -2
  166. package/chunks/{cron-create-ZOVA3CC2.js → cron-create-2JZ2TWTF.js} +4 -4
  167. package/chunks/{cron-delete-7Z3H4LJY.js → cron-delete-CTPD2P26.js} +4 -4
  168. package/chunks/{cron-list-UHGX3IQG.js → cron-list-V44KHAF6.js} +4 -4
  169. package/chunks/{daemon-PXIC4ZDK.js → daemon-GED37WOX.js} +30 -2
  170. package/chunks/daemon-git-worktree-guard-LZDCNJGV.js +2062 -0
  171. package/chunks/daemon-status-provider-QYM57Z44.js +102 -0
  172. package/chunks/{daemon-trust-policy-7JOBVFH3.js → daemon-trust-policy-TSRVEYZR.js} +48 -48
  173. package/chunks/{daemon-trust-policy-monitor-OU3NRHAR.js → daemon-trust-policy-monitor-2K2YETMT.js} +48 -48
  174. package/chunks/{deferred-core-runtime-SFT3KI2C.js → deferred-core-runtime-FKJ3OYE7.js} +44 -44
  175. package/chunks/{devtools-X6ROTKHE.js → devtools-4QFYJT6U.js} +1 -1
  176. package/chunks/{display-image-ZE3GZNIK.js → display-image-M2ELAVN4.js} +4 -4
  177. package/chunks/{dist-KTYDJNYM.js → dist-4ZPG4BY6.js} +2 -2
  178. package/chunks/{dist-NPS52B2V.js → dist-BROOP2EG.js} +1 -1
  179. package/chunks/{dist-BW2LDPV3.js → dist-IYYN3RUT.js} +2 -2
  180. package/chunks/{dist-EFJILGIS.js → dist-JWMKPWT5.js} +3 -1
  181. package/chunks/{dist-AVUYBK7L.js → dist-K7IQB53U.js} +1 -1
  182. package/chunks/{dist-PKSRQAR2.js → dist-MAQXAQ2Y.js} +1 -1
  183. package/chunks/{dist-BNWP6IZL.js → dist-WJ4BHIEW.js} +2 -2
  184. package/chunks/{dist-ZWDH5HLS.js → dist-YEPL4RAW.js} +1 -1
  185. package/chunks/{earlyInputCapture-27RPWE2D.js → earlyInputCapture-WJBSJQUF.js} +43 -43
  186. package/chunks/{edit-WXVZ7FHS.js → edit-X73LA4YO.js} +50 -49
  187. package/chunks/{enter-worktree-TYMVXFLA.js → enter-worktree-CLRQTIVN.js} +47 -47
  188. package/chunks/{enterPlanMode-FT4MRU5N.js → enterPlanMode-6BDYUQ5T.js} +48 -48
  189. package/chunks/{environment-Z6OMA34I.js → environment-WOAJXJDJ.js} +44 -44
  190. package/chunks/{errors-YMXK2GG3.js → errors-7OY5MXYY.js} +44 -44
  191. package/chunks/{exit-worktree-ODZUQLGJ.js → exit-worktree-TFFJXCRT.js} +47 -47
  192. package/chunks/{exitPlanMode-MBPAPBBV.js → exitPlanMode-WDURQMIU.js} +42 -42
  193. package/chunks/{external-tool-guard-provider-5HTGOPGU.js → external-tool-guard-provider-TE4DRY36.js} +1 -1
  194. package/chunks/{fast-path-ZU5T6XSN.js → fast-path-QQLGC37M.js} +5 -5
  195. package/chunks/{gemini-OZK6AIMC.js → gemini-VHE62IJL.js} +110 -105
  196. package/chunks/{geminiContentGenerator-MC6ZKWZG.js → geminiContentGenerator-VSHIEGAQ.js} +11 -11
  197. package/chunks/{glob-KJ4A4ZOM.js → glob-VMEEDDLO.js} +49 -49
  198. package/chunks/{goal-tools-JDK2SNMV.js → goal-tools-M4UDAZXP.js} +4 -4
  199. package/chunks/{grep-QWBLG564.js → grep-F4UAR7KX.js} +47 -47
  200. package/chunks/{handleAutoUpdate-M3ACKDKF.js → handleAutoUpdate-GN7Z6QAC.js} +46 -46
  201. package/chunks/{i18n-FPW7XZL5.js → i18n-ETW24DHW.js} +43 -43
  202. package/chunks/{image-gen-OTFC2S7L.js → image-gen-YPK2AZT4.js} +11 -11
  203. package/chunks/{initializer-5HKUXXBT.js → initializer-UA6KQ7MS.js} +49 -49
  204. package/chunks/{installationInfo-4OA6UW7V.js → installationInfo-P7OTIR4P.js} +43 -43
  205. package/chunks/{keychain-token-storage-JTWUYFU7.js → keychain-token-storage-NKKCUHI2.js} +2 -2
  206. package/chunks/{list-3TKZ264A.js → list-GRAMIQOT.js} +51 -51
  207. package/chunks/{list-agents-4GQ2XNEU.js → list-agents-O6WSY4CT.js} +2 -2
  208. package/chunks/{loadedSettingsAdapter-IRUANLS2.js → loadedSettingsAdapter-5O2TDS3I.js} +48 -48
  209. package/chunks/{loggingContentGenerator-D4URLH2A.js → loggingContentGenerator-J2J2AANS.js} +151 -120
  210. package/chunks/{loop-wakeup-HOQI3K5D.js → loop-wakeup-GVQRMUKS.js} +5 -5
  211. package/chunks/{ls-FSHISLLA.js → ls-6W2D7TKU.js} +6 -6
  212. package/chunks/{lsp-APQJ5ZEZ.js → lsp-NJ4KFBI2.js} +2 -2
  213. package/chunks/{managed-npm-update-2O7XSAWJ.js → managed-npm-update-WMV5ITKU.js} +45 -45
  214. package/chunks/{mcp-AFVHCHKT.js → mcp-XLP33CAI.js} +48 -48
  215. package/chunks/{monitor-PY4WDSX3.js → monitor-2MM23VDV.js} +47 -47
  216. package/chunks/{node-YSOU44FX.js → node-UUDY34IG.js} +3 -3
  217. package/chunks/nonInteractiveCli-KTA5K6FS.js +163 -0
  218. package/chunks/{notebook-edit-GEPL33NO.js → notebook-edit-QD4TRKLY.js} +47 -47
  219. package/chunks/{openaiContentGenerator-ACYSXQ6R.js → openaiContentGenerator-KLHSPVN2.js} +31 -31
  220. package/chunks/{pidfile-SUNYCAA4.js → pidfile-RQGZBNXT.js} +43 -43
  221. package/chunks/{processUtils-F7LP7YUV.js → processUtils-HZZDA2VV.js} +2 -2
  222. package/chunks/{qwenContentGenerator-BB6IPELF.js → qwenContentGenerator-T75M2Z3B.js} +50 -50
  223. package/chunks/{qwenOAuth2-OU3WGDOI.js → qwenOAuth2-5QZU444W.js} +10 -10
  224. package/chunks/{read-file-GORBXJTS.js → read-file-LOVUSBJC.js} +12 -12
  225. package/chunks/{read-mcp-resource-TJSJRH4F.js → read-mcp-resource-GWCP23WG.js} +2 -2
  226. package/chunks/{read-package-up-TCM6I7S2.js → read-package-up-K6RKTL5D.js} +1 -1
  227. package/chunks/{record-artifact-FXF5LHPE.js → record-artifact-IYQDEYMV.js} +3 -3
  228. package/chunks/{resumeHistoryUtils-FOAJJJWK.js → resumeHistoryUtils-LVKSSQII.js} +50 -50
  229. package/chunks/{ripGrep-RNLIZGCY.js → ripGrep-ZJSHKB6H.js} +42 -42
  230. package/chunks/{run-qwen-serve-GVMMX3IU.js → run-qwen-serve-GZW7B4WK.js} +186 -90
  231. package/chunks/{runtime-RNBZ5FDD.js → runtime-MYRXEO2E.js} +53 -53
  232. package/chunks/{scheduler-NTRFSPIP.js → scheduler-DPTPI6FW.js} +44 -44
  233. package/chunks/{sdk-exporters-grpc-4QKV6MCX.js → sdk-exporters-grpc-54L4LS5L.js} +2 -2
  234. package/chunks/{sdk-exporters-http-2VPMAPFI.js → sdk-exporters-http-NHBYB5FZ.js} +21 -17
  235. package/chunks/{sdk-impl-5W3JUCWF.js → sdk-impl-SK4P5WON.js} +17 -14
  236. package/chunks/{send-message-RBYLV5NY.js → send-message-O7FO63UK.js} +6 -6
  237. package/chunks/{serve-H3PGA26U.js → serve-XCG4XCDA.js} +52 -52
  238. package/chunks/{server-SUXD2F3C.js → server-AWQHKXLG.js} +310 -200
  239. package/chunks/{session-MTFVUWWM.js → session-P5FKNCNR.js} +94 -97
  240. package/chunks/{settings-GUJ3TN2J.js → settings-CSYVIP2R.js} +47 -47
  241. package/chunks/{shell-C2UP5FF2.js → shell-EGTSUO2P.js} +42 -42
  242. package/chunks/{skill-4XCNK55E.js → skill-IFUD72GF.js} +22 -22
  243. package/chunks/{skill-settings-Y2BU27XM.js → skill-settings-YOE7LBHE.js} +47 -47
  244. package/chunks/{spawnChannel-UUUUK734.js → spawnChannel-PQSZIOLY.js} +45 -47
  245. package/chunks/{standalone-update-MJ722XZ4.js → standalone-update-RB2EGUSF.js} +44 -44
  246. package/chunks/{startInteractiveUI-TCPIPNGN.js → startInteractiveUI-KMYUJ2MU.js} +3040 -2399
  247. package/chunks/{syntheticOutput-D3Z64LJC.js → syntheticOutput-DVHJMUGV.js} +3 -3
  248. package/chunks/{task-create-URFZ5EUX.js → task-create-4NC7PDI4.js} +11 -11
  249. package/chunks/{task-list-6JDFMPUW.js → task-list-LBSRMOC7.js} +5 -5
  250. package/chunks/{task-stop-HHUGCD25.js → task-stop-YFNATTIM.js} +2 -2
  251. package/chunks/{task-update-DVV6CUGI.js → task-update-BPLM52GD.js} +12 -12
  252. package/chunks/{team-create-WZWH2NJI.js → team-create-B6A6MJBT.js} +47 -47
  253. package/chunks/{team-delete-PZGGBQLM.js → team-delete-MKYMYBFM.js} +5 -5
  254. package/chunks/{team-plan-approval-SUZQJCWJ.js → team-plan-approval-5WO3CXXU.js} +48 -48
  255. package/chunks/{terminal-image-renderer-BCUN3Z3W.js → terminal-image-renderer-BTRE2GEU.js} +44 -44
  256. package/chunks/{theme-manager-UGMFDREN.js → theme-manager-XL2N5SBY.js} +43 -43
  257. package/chunks/{todoWrite-WINAZSZI.js → todoWrite-K5K7NRE5.js} +4 -4
  258. package/chunks/{tool-search-B6F3MPUZ.js → tool-search-QNBLXUGR.js} +18 -18
  259. package/chunks/{total-session-admission-MQLBJ5WL.js → total-session-admission-N4E5SFBO.js} +49 -49
  260. package/chunks/{trustedFolders-2XST7U5C.js → trustedFolders-MQS46LIU.js} +43 -43
  261. package/chunks/{update-relaunch-OVC7YNGD.js → update-relaunch-536KRL33.js} +5 -5
  262. package/chunks/{updateCheck-YAKM36WQ.js → updateCheck-QJI2SYWF.js} +48 -48
  263. package/chunks/{useAutoAcceptIndicator-RF6FVX3S.js → useAutoAcceptIndicator-7QASHD46.js} +51 -51
  264. package/chunks/{validateNonInterActiveAuth-IPPXFNQH.js → validateNonInterActiveAuth-ZNRGWBLV.js} +86 -88
  265. package/chunks/{version-4IDFEXOU.js → version-DBEQAFRW.js} +2 -2
  266. package/chunks/{web-fetch-NUOLHXPN.js → web-fetch-MBIVXKPE.js} +21 -21
  267. package/chunks/{web-search-LVOOV4XZ.js → web-search-4LBIN6VF.js} +16 -16
  268. package/chunks/{workflow-JSTYTG3K.js → workflow-LNMA55HY.js} +127 -61
  269. package/chunks/{workspace-providers-status-U4EYXA4K.js → workspace-providers-status-PDDMI6ST.js} +51 -51
  270. package/chunks/{workspace-registration-store-OG66U3CB.js → workspace-registration-store-BGRKKIYR.js} +1 -1
  271. package/chunks/{workspace-registry-WSHWQRQQ.js → workspace-registry-L4NCJ34K.js} +49 -49
  272. package/chunks/{workspace-service-QZXQHX2F.js → workspace-service-LOXYKYTR.js} +54 -54
  273. package/chunks/{workspace-skills-status-VRBHEX5O.js → workspace-skills-status-IJ5FOQI6.js} +49 -49
  274. package/chunks/{workspace-trust-reconciler-FCRIUIOF.js → workspace-trust-reconciler-H36TCR2S.js} +57 -57
  275. package/chunks/{write-file-PYL3JCCD.js → write-file-JJAY7JSP.js} +42 -42
  276. package/chunks/{zoom-image-RS6MU26F.js → zoom-image-4MVVVM7E.js} +12 -12
  277. package/cli.js +18 -17
  278. package/package.json +4 -4
  279. package/web-shell/assets/{arc-CgGUyHWd.js → arc-B-89zHN4.js} +1 -1
  280. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BR0Qv-1Y.js → architectureDiagram-3BPJPVTR-BkcOncHk.js} +1 -1
  281. package/web-shell/assets/{blockDiagram-GPEHLZMM-DIoaceaI.js → blockDiagram-GPEHLZMM-DQ4yboaF.js} +1 -1
  282. package/web-shell/assets/{c4Diagram-AAUBKEIU-Bc5k6BbI.js → c4Diagram-AAUBKEIU-C_8ZjPDI.js} +1 -1
  283. package/web-shell/assets/channel-Du2WFns8.js +1 -0
  284. package/web-shell/assets/{chunk-2J33WTMH-DtPEz2WX.js → chunk-2J33WTMH-naKVe1Bm.js} +1 -1
  285. package/web-shell/assets/{chunk-4BX2VUAB-Dydo6ydE.js → chunk-4BX2VUAB-DdoViKT2.js} +1 -1
  286. package/web-shell/assets/{chunk-55IACEB6-DD9_VWXm.js → chunk-55IACEB6-DUDQZEwU.js} +1 -1
  287. package/web-shell/assets/{chunk-727SXJPM-DVI2m59k.js → chunk-727SXJPM-BqpDTR5s.js} +1 -1
  288. package/web-shell/assets/{chunk-AQP2D5EJ-luatmaTN.js → chunk-AQP2D5EJ-CdmEknkT.js} +1 -1
  289. package/web-shell/assets/{chunk-FMBD7UC4-Duy8NTIi.js → chunk-FMBD7UC4-CH7fFTLB.js} +1 -1
  290. package/web-shell/assets/{chunk-ND2GUHAM-CrL1yhms.js → chunk-ND2GUHAM-ObgSuFKF.js} +1 -1
  291. package/web-shell/assets/{chunk-QZHKN3VN-C7BX6bu1.js → chunk-QZHKN3VN-D9fKdv_s.js} +1 -1
  292. package/web-shell/assets/classDiagram-4FO5ZUOK-Zw0HafH6.js +1 -0
  293. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Zw0HafH6.js +1 -0
  294. package/web-shell/assets/{cose-bilkent-S5V4N54A-BTzs7mIi.js → cose-bilkent-S5V4N54A-CvzATMx9.js} +1 -1
  295. package/web-shell/assets/{dagre-BM42HDAG-3VTUmWts.js → dagre-BM42HDAG-M_xU21QW.js} +1 -1
  296. package/web-shell/assets/{diagram-2AECGRRQ-Ehdp75GN.js → diagram-2AECGRRQ-CNrl9sW1.js} +1 -1
  297. package/web-shell/assets/{diagram-5GNKFQAL-B3wu3teE.js → diagram-5GNKFQAL-CUweVT6T.js} +1 -1
  298. package/web-shell/assets/{diagram-KO2AKTUF-DjgTSf2S.js → diagram-KO2AKTUF-D3n6Lxjo.js} +1 -1
  299. package/web-shell/assets/{diagram-LMA3HP47-Br9mwjY3.js → diagram-LMA3HP47-0SeFPK4t.js} +1 -1
  300. package/web-shell/assets/{diagram-OG6HWLK6-D4xz5M-z.js → diagram-OG6HWLK6-DAgyEwge.js} +1 -1
  301. package/web-shell/assets/{erDiagram-TEJ5UH35-CXayWlG_.js → erDiagram-TEJ5UH35-CzxBBDIK.js} +1 -1
  302. package/web-shell/assets/{flowDiagram-I6XJVG4X-CLonjQTi.js → flowDiagram-I6XJVG4X-B0uj0jyo.js} +1 -1
  303. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BTySFT-1.js → ganttDiagram-6RSMTGT7-DFzcj5km.js} +1 -1
  304. package/web-shell/assets/{gitGraphDiagram-PVQCEYII--2WcUjOe.js → gitGraphDiagram-PVQCEYII-DylJ_Fc9.js} +1 -1
  305. package/web-shell/assets/index-BIGQygTL.css +5 -0
  306. package/web-shell/assets/{index-DPJHkFOG.js → index-BKSAnXU9.js} +1 -1
  307. package/web-shell/assets/index-J7OMTqAN.js +1789 -0
  308. package/web-shell/assets/{infoDiagram-5YYISTIA-9vpgAf1m.js → infoDiagram-5YYISTIA-BYMcJVMI.js} +1 -1
  309. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DcRpHnAW.js → ishikawaDiagram-YF4QCWOH-t1quI1S3.js} +1 -1
  310. package/web-shell/assets/{journeyDiagram-JHISSGLW-C2TKorRm.js → journeyDiagram-JHISSGLW-YM_QVUJm.js} +1 -1
  311. package/web-shell/assets/{kanban-definition-UN3LZRKU-DdsFwB8b.js → kanban-definition-UN3LZRKU-jw8OddK1.js} +1 -1
  312. package/web-shell/assets/{linear-7PjRvJrf.js → linear-Dlr3RVuP.js} +1 -1
  313. package/web-shell/assets/{mermaid.core-raDXa11C.js → mermaid.core-CqGKzNzd.js} +5 -5
  314. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DLHc-PRN.js → mindmap-definition-RKZ34NQL-BqureoOS.js} +1 -1
  315. package/web-shell/assets/{pieDiagram-4H26LBE5-BftYpeTW.js → pieDiagram-4H26LBE5-Da20HkK1.js} +1 -1
  316. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-O-6ygOYn.js → quadrantDiagram-W4KKPZXB-BsNlMvJy.js} +1 -1
  317. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BmZWVufJ.js → requirementDiagram-4Y6WPE33-DzVCQCse.js} +1 -1
  318. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-2x5beiWt.js → sankeyDiagram-5OEKKPKP-BMo16voT.js} +1 -1
  319. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BH8uKokQ.js → sequenceDiagram-3UESZ5HK-Bgi-pdHk.js} +1 -1
  320. package/web-shell/assets/{stateDiagram-AJRCARHV-Dq1MFgX_.js → stateDiagram-AJRCARHV-xaPQXwGk.js} +1 -1
  321. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-D5RqimXD.js +1 -0
  322. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cl2WKbv9.js → timeline-definition-PNZ67QCA-C_9RuvKG.js} +1 -1
  323. package/web-shell/assets/{vennDiagram-CIIHVFJN-BqoRo_Q-.js → vennDiagram-CIIHVFJN-Bgu6vdla.js} +1 -1
  324. package/web-shell/assets/{wardley-L42UT6IY-BTxp-Yot.js → wardley-L42UT6IY-CFTZ8IrX.js} +1 -1
  325. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DFXVCSH2.js → wardleyDiagram-YWT4CUSO-BASW9Vmt.js} +1 -1
  326. package/web-shell/assets/{xychartDiagram-2RQKCTM6-qQhWx0aE.js → xychartDiagram-2RQKCTM6--Nh-CD3F.js} +1 -1
  327. package/web-shell/index.html +2 -2
  328. package/chunks/chunk-CG3OQDNY.js +0 -649
  329. package/chunks/chunk-L34XSHIZ.js +0 -28
  330. package/chunks/chunk-N2TNM3QB.js +0 -9
  331. package/chunks/chunk-UOMZKPI5.js +0 -830
  332. package/chunks/chunk-WFRHWDBT.js +0 -622
  333. package/chunks/chunk-WLML6VIA.js +0 -18
  334. package/chunks/chunk-ZBBVBZBR.js +0 -137
  335. package/chunks/chunk-bdqvmfwv-OHYAFAAO.js +0 -17446
  336. package/chunks/daemon-status-provider-LPYR2GXY.js +0 -103
  337. package/chunks/dispatch-B53LNEO4.js +0 -37
  338. package/chunks/nonInteractiveCli-ZHW6F76F.js +0 -166
  339. package/chunks/opentui-entry-SBAOWW7M.js +0 -52325
  340. package/chunks/runtime-gate-T4ICWGQJ.js +0 -89
  341. package/chunks/wrapper-46Z24CTM.js +0 -35
  342. package/web-shell/assets/channel-D2b9IYpS.js +0 -1
  343. package/web-shell/assets/classDiagram-4FO5ZUOK-DHatTCmD.js +0 -1
  344. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHatTCmD.js +0 -1
  345. package/web-shell/assets/index-CIFO52Wx.css +0 -5
  346. package/web-shell/assets/index-bhq3CUUF.js +0 -1789
  347. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-spuAYji6.js +0 -1
  348. /package/chunks/{chunk-44CTCCLY.js → chunk-NWNEANAT.js} +0 -0
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  runSideQuery
5
- } from "./chunk-CTQE2NB2.js";
5
+ } from "./chunk-LSRI3ND3.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-5O2XNYP6.js";
@@ -89,6 +89,7 @@ var KNOWN_RECORD_SUBTYPES = /* @__PURE__ */ new Set([
89
89
  "rewind",
90
90
  "agent_bootstrap",
91
91
  "agent_launch_prompt",
92
+ "agent_retry",
92
93
  "file_history_snapshot",
93
94
  "session_source",
94
95
  "goal_state",
@@ -477,6 +478,278 @@ var InvalidGoalEvidenceReferenceError = class extends Error {
477
478
  __name(this, "InvalidGoalEvidenceReferenceError");
478
479
  }
479
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");
480
753
  function buildGoalEvidenceCatalog(input) {
481
754
  const analysis = analyzeEvidence(input);
482
755
  return {
@@ -487,32 +760,19 @@ function buildGoalEvidenceCatalog(input) {
487
760
  }
488
761
  __name(buildGoalEvidenceCatalog, "buildGoalEvidenceCatalog");
489
762
  function buildGoalEvidenceCheckpointWindow(input) {
490
- const analysis = analyzeEvidence(input);
491
- const rawEntries = analysis.catalog.filter(
492
- (entry) => entry.provenance !== "goal_checkpoint"
763
+ const accumulator = new GoalEvidenceCheckpointAccumulator(
764
+ input.records.map(getGoalEvidenceRecordIndexHint),
765
+ input.goal,
766
+ input.permit
493
767
  );
494
- const shouldCheckpoint = !analysis.catalogTruncated && rawEntries.length > 0 && (analysis.catalog.length >= CHECKPOINT_ENTRY_THRESHOLD || analysis.catalogBytes >= CHECKPOINT_BYTE_THRESHOLD);
495
- const evidence = (shouldCheckpoint ? rawEntries : []).map((entry) => {
496
- const recordIndex = analysis.indexByUuid.get(entry.uuid);
497
- const record = recordIndex === void 0 ? void 0 : input.records[recordIndex];
498
- const content = record ? evidenceContent(record, entry.provenance) : "";
499
- if (!content) {
500
- throw new InvalidGoalEvidenceReferenceError(
501
- "ineligible_reference",
502
- `Transcript record ${entry.uuid} has no eligible evidence content.`,
503
- entry.uuid
504
- );
505
- }
506
- return { ...entry, content: capCheckpointContent(content) };
507
- });
508
- return {
509
- previousClaims: structuredClone(
510
- input.goal.evidenceCheckpoint?.claims ?? []
511
- ),
512
- evidence,
513
- truncated: analysis.catalogTruncated,
514
- shouldCheckpoint
515
- };
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();
516
776
  }
517
777
  __name(buildGoalEvidenceCheckpointWindow, "buildGoalEvidenceCheckpointWindow");
518
778
  function validateGoalEvidenceReferences(input) {
@@ -1633,20 +1893,30 @@ var LEGACY_STOPPED_KINDS = /* @__PURE__ */ new Set([
1633
1893
  "paused"
1634
1894
  ]);
1635
1895
  function recoverGoalFromRecords(records) {
1896
+ return selectGoalRecoveryFromRecords(records).recovery;
1897
+ }
1898
+ __name(recoverGoalFromRecords, "recoverGoalFromRecords");
1899
+ function selectGoalRecoveryFromRecords(records) {
1636
1900
  let unsupported;
1901
+ let unsupportedSourceUuid;
1637
1902
  for (let index = records.length - 1; index >= 0; index -= 1) {
1638
1903
  const record = records[index];
1639
1904
  if (record?.subtype !== "goal_state") continue;
1640
1905
  const payload = record.type === "system" ? parseGoalStateRecordPayloadV2(record.systemPayload) : void 0;
1641
- if (payload) return { kind: "v2", payload };
1642
- unsupported ??= {
1643
- kind: "unsupported",
1644
- reason: `Goal lifecycle record ${record.uuid} is malformed or uses an unsupported version`
1645
- };
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
+ }
1646
1916
  }
1647
- return unsupported ?? recoverLegacyGoal(records);
1917
+ return unsupported ? { recovery: unsupported, sourceUuid: unsupportedSourceUuid } : recoverLegacyGoal(records);
1648
1918
  }
1649
- __name(recoverGoalFromRecords, "recoverGoalFromRecords");
1919
+ __name(selectGoalRecoveryFromRecords, "selectGoalRecoveryFromRecords");
1650
1920
  function recoverLegacyGoal(records) {
1651
1921
  for (let recordIndex = records.length - 1; recordIndex >= 0; recordIndex -= 1) {
1652
1922
  const record = records[recordIndex];
@@ -1663,18 +1933,71 @@ function recoverLegacyGoal(records) {
1663
1933
  const kind = value["kind"];
1664
1934
  const condition = value["condition"];
1665
1935
  if (typeof kind !== "string" || typeof condition !== "string") {
1666
- 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 };
1667
1943
  }
1668
- if (LEGACY_STOPPED_KINDS.has(kind)) return { kind: "none" };
1669
1944
  if (!LEGACY_ACTIVE_KINDS.has(kind) || condition.trim().length === 0) {
1670
- return unsupportedLegacy(record.uuid);
1945
+ return {
1946
+ recovery: unsupportedLegacy(record.uuid),
1947
+ sourceUuid: record.uuid
1948
+ };
1671
1949
  }
1672
- return { kind: "legacy", objective: condition.trim() };
1950
+ return {
1951
+ recovery: { kind: "legacy", objective: condition.trim() },
1952
+ sourceUuid: record.uuid
1953
+ };
1673
1954
  }
1674
1955
  }
1675
- return { kind: "none" };
1956
+ return { recovery: { kind: "none" } };
1676
1957
  }
1677
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");
1678
2001
  function unsupportedLegacy(recordUuid) {
1679
2002
  return {
1680
2003
  kind: "unsupported",
@@ -1762,6 +2085,12 @@ function createGoalRuntime(options) {
1762
2085
  let nextVerifierFeedback;
1763
2086
  let currentTurnFeedback;
1764
2087
  let restored = false;
2088
+ let restoreActivationPending = false;
2089
+ let restorePreparation;
2090
+ let restoreActivation;
2091
+ let preparedRestoreCause;
2092
+ let preparedRestoreHasSnapshot = false;
2093
+ let preparedCheckpointWindow;
1765
2094
  let disposed = false;
1766
2095
  let recoveryError;
1767
2096
  let recoveryCause;
@@ -1861,7 +2190,7 @@ function createGoalRuntime(options) {
1861
2190
  void started.catch(handleStartFailure);
1862
2191
  }, "flushContinuation");
1863
2192
  const queueContinuation = /* @__PURE__ */ __name((cause) => {
1864
- if (snapshot.goal?.status !== "active" || currentPermit || pendingProposal || verificationAttempt || checkpointAttempt) {
2193
+ if (restoreActivationPending || snapshot.goal?.status !== "active" || currentPermit || pendingProposal || verificationAttempt || checkpointAttempt) {
1865
2194
  return;
1866
2195
  }
1867
2196
  continuationQueued = true;
@@ -2214,10 +2543,10 @@ function createGoalRuntime(options) {
2214
2543
  }
2215
2544
  });
2216
2545
  }, "recordCheckpoint");
2217
- const runCheckpoint = /* @__PURE__ */ __name(async (attempt) => {
2546
+ const runCheckpoint = /* @__PURE__ */ __name(async (attempt, preparedWindow) => {
2218
2547
  const evidenceSource = options.evidenceSource;
2219
2548
  const checkpointVerifier = options.checkpointVerifier;
2220
- if (!evidenceSource || !checkpointVerifier) {
2549
+ if (!preparedWindow && !evidenceSource || !checkpointVerifier) {
2221
2550
  await recordCheckpointFailure(
2222
2551
  attempt,
2223
2552
  "Goal checkpoint recovery dependencies are unavailable"
@@ -2225,15 +2554,18 @@ function createGoalRuntime(options) {
2225
2554
  return;
2226
2555
  }
2227
2556
  try {
2228
- await evidenceSource.flush();
2229
- if (attempt.controller.signal.aborted) return;
2230
- const records = await evidenceSource.readActiveTranscriptChain();
2231
- if (attempt.controller.signal.aborted) return;
2232
- const window = buildGoalEvidenceCheckpointWindow({
2233
- records,
2234
- goal: attempt.goal,
2235
- permit: attempt.permit
2236
- });
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
+ }
2237
2569
  if (window.truncated) {
2238
2570
  await recordCheckpointFailure(
2239
2571
  attempt,
@@ -2300,8 +2632,11 @@ function createGoalRuntime(options) {
2300
2632
  listeners.add(listener);
2301
2633
  return () => listeners.delete(listener);
2302
2634
  },
2303
- restore(records) {
2304
- 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(
2305
2640
  async () => {
2306
2641
  assertAvailable();
2307
2642
  if (restored) return;
@@ -2359,14 +2694,15 @@ function createGoalRuntime(options) {
2359
2694
  recoveredSnapshot = structuredClone(payload.snapshot);
2360
2695
  recoveredCause = payload.cause;
2361
2696
  }
2697
+ assertAvailable();
2362
2698
  if (recoveredSnapshot) snapshot = recoveredSnapshot;
2363
2699
  recoveryError = void 0;
2364
2700
  restored = true;
2365
2701
  if (recoveredSnapshot) {
2366
2702
  recoveryCause = recoveredCause;
2367
- broadcast(recoveredCause);
2368
2703
  }
2369
- if (!checkpointAttempt) queueContinuation();
2704
+ preparedRestoreHasSnapshot = recoveredSnapshot !== void 0;
2705
+ preparedRestoreCause = recoveredCause;
2370
2706
  return checkpointAttempt;
2371
2707
  } catch (error) {
2372
2708
  if (!disposed) {
@@ -2376,14 +2712,66 @@ function createGoalRuntime(options) {
2376
2712
  }
2377
2713
  }
2378
2714
  );
2379
- return restoring.then(async (attempt) => {
2380
- 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
+ }
2381
2764
  try {
2382
- await runCheckpoint(attempt);
2765
+ await runCheckpoint(attempt, preparedCheckpointWindow);
2383
2766
  } catch {
2384
2767
  await settleDanglingAttempt(attempt.permit);
2385
2768
  }
2386
2769
  });
2770
+ return restoreActivation;
2771
+ },
2772
+ async restore(records) {
2773
+ await this.prepareRestore(records);
2774
+ await this.activateRestoredWork();
2387
2775
  },
2388
2776
  bindHost(nextHost) {
2389
2777
  assertOperational();
@@ -2753,11 +3141,18 @@ export {
2753
3141
  aggregateTranscriptRecordFragments,
2754
3142
  prepareTranscriptRecords,
2755
3143
  GOAL_EVIDENCE_REFERENCE_LIMIT,
3144
+ EvidenceSourceUnavailableError,
3145
+ InvalidGoalEvidenceReferenceError,
3146
+ GoalEvidenceRecordIndexAccumulator,
3147
+ GoalEvidenceCheckpointAccumulator,
2756
3148
  createGoalCheckpointVerifier,
2757
3149
  elapsedActiveTime,
2758
3150
  parseGoalStateRecordPayloadV2,
2759
3151
  parseGoalSnapshotV2,
2760
3152
  parseGoalStateCause,
3153
+ selectGoalRecoveryFromRecords,
3154
+ normalizeGoalRecoveryRecord,
3155
+ isGoalRecoveryCandidate,
2761
3156
  GOAL_RUNTIME_DISPOSED_MESSAGE,
2762
3157
  STALE_GOAL_TURN_MESSAGE,
2763
3158
  GoalPersistenceUnavailableError,