@qwen-code/qwen-code 0.21.7-nightly.20260808.4ec0371e6 → 0.21.8

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 (254) hide show
  1. package/README.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +12 -8
  3. package/bundled/qc-helper/docs/features/commands.md +1 -1
  4. package/bundled/qc-helper/docs/features/hooks.md +50 -0
  5. package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
  6. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  7. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
  8. package/bundled/review/SKILL.md +24 -5
  9. package/chunks/{MaxSizedBox-COZBVNCI.js → MaxSizedBox-7PM6BGJ5.js} +13 -10
  10. package/chunks/{StandaloneSessionPicker-3OF2FS6S.js → StandaloneSessionPicker-3UQHM7GV.js} +29 -26
  11. package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
  12. package/chunks/{acpAgent-3JCJ6KWG.js → acpAgent-5UWLFV6V.js} +369 -148
  13. package/chunks/{agent-DBSC47CD.js → agent-624T2BLO.js} +13 -10
  14. package/chunks/{agent-headless-ZJHZ7I3S.js → agent-headless-2EE5J2KX.js} +13 -10
  15. package/chunks/{bridge-NFBYT4ZI.js → bridge-JENKGFFP.js} +15 -12
  16. package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
  17. package/chunks/{channel-management-service-LXSJXQGM.js → channel-management-service-DDWUPHMU.js} +1 -1
  18. package/chunks/{channel-settings-store-LABKDKSI.js → channel-settings-store-SA6JZSPH.js} +21 -18
  19. package/chunks/{channel-worker-group-MTW2AGT3.js → channel-worker-group-E67EN3RV.js} +2 -2
  20. package/chunks/{channel-worker-manager-UU6PTQSI.js → channel-worker-manager-SW4C45CF.js} +2 -2
  21. package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
  22. package/chunks/{chunk-HKCYGZZ4.js → chunk-2ILAOM2I.js} +30 -13
  23. package/chunks/{chunk-LDY4J4G6.js → chunk-2M4K4KYS.js} +176 -119
  24. package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
  25. package/chunks/{chunk-XCG76UE6.js → chunk-3PY4LPJF.js} +17 -129
  26. package/chunks/{chunk-26ISE5EG.js → chunk-3SE7J4DR.js} +3 -3
  27. package/chunks/{chunk-APMRLB2H.js → chunk-3WNQOYHQ.js} +12 -12
  28. package/chunks/{chunk-O7VQ3F22.js → chunk-4ALIARFY.js} +1 -1
  29. package/chunks/{chunk-FJ6YHWHZ.js → chunk-4DU3NCHG.js} +47 -54
  30. package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
  31. package/chunks/{chunk-3HS6Y4UA.js → chunk-4WU6NY7F.js} +2 -2
  32. package/chunks/{chunk-JRIJOZXO.js → chunk-5ZGR6RKJ.js} +3 -3
  33. package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
  34. package/chunks/{chunk-ZQGHESAS.js → chunk-6TR7CFXH.js} +1 -1
  35. package/chunks/{chunk-EZ53KMUN.js → chunk-757GB46F.js} +1 -1
  36. package/chunks/{chunk-5YT3Y33M.js → chunk-77QVBFCU.js} +3 -3
  37. package/chunks/{chunk-5PGKKSO6.js → chunk-7DVT4LVV.js} +35 -28
  38. package/chunks/{chunk-IMK3SJ43.js → chunk-7VUERJHS.js} +1066 -597
  39. package/chunks/{chunk-KPMB4JEZ.js → chunk-B52AWKBB.js} +64 -20
  40. package/chunks/{chunk-R2KZWK5Z.js → chunk-BF224XHL.js} +2 -2
  41. package/chunks/{chunk-TSYIQDG7.js → chunk-BF52U4XJ.js} +1 -1
  42. package/chunks/{chunk-LDUGDB5H.js → chunk-C5VWPTGT.js} +1 -1
  43. package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
  44. package/chunks/chunk-COBO5EBO.js +135 -0
  45. package/chunks/{chunk-ACHMWGC5.js → chunk-DQSDACD2.js} +1 -1
  46. package/chunks/{chunk-VT3VNFVW.js → chunk-DX5W5AON.js} +2 -2
  47. package/chunks/{chunk-JACAHYEN.js → chunk-E4ZBKMSF.js} +4 -4
  48. package/chunks/{chunk-MV7VUCIG.js → chunk-EIVICVHM.js} +4 -4
  49. package/chunks/{chunk-YHEEE624.js → chunk-EN2TKTFH.js} +1 -1
  50. package/chunks/chunk-F6WFNA7U.js +22 -0
  51. package/chunks/{chunk-Z6W3XDLN.js → chunk-FN6YXJOP.js} +1 -1
  52. package/chunks/{chunk-BJKFFPX2.js → chunk-FWBXMANW.js} +3 -3
  53. package/chunks/{chunk-764F335K.js → chunk-FYAXKJK7.js} +314 -63
  54. package/chunks/{chunk-XIDHBXUI.js → chunk-GBDINRIL.js} +3 -3
  55. package/chunks/{chunk-Z5ZAWED3.js → chunk-GOEVOFQI.js} +3 -3
  56. package/chunks/{chunk-ZKUJ4AO7.js → chunk-GQCEQPYQ.js} +3 -3
  57. package/chunks/{chunk-BFSQBXHV.js → chunk-GXSNGY5M.js} +399 -534
  58. package/chunks/{chunk-3ARO4N5G.js → chunk-HA3SAB64.js} +22 -69
  59. package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
  60. package/chunks/{chunk-LMEIS6WW.js → chunk-HWX5HPUG.js} +3 -3
  61. package/chunks/{chunk-VLFX3L3X.js → chunk-IBYULW65.js} +6 -6
  62. package/chunks/{chunk-SDUDZNF4.js → chunk-IUQ52YJK.js} +1 -1
  63. package/chunks/{chunk-H2352CX2.js → chunk-IYES5WOT.js} +2 -2
  64. package/chunks/{chunk-CE5UCTKO.js → chunk-KAQCJO6Y.js} +1 -1
  65. package/chunks/{chunk-DPH3MUAP.js → chunk-KKDVZLGL.js} +1 -1
  66. package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
  67. package/chunks/{chunk-P7HUJDBZ.js → chunk-M3STHEMM.js} +11 -16
  68. package/chunks/{chunk-VDS2WYM5.js → chunk-NGYI5EF5.js} +2 -2
  69. package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
  70. package/chunks/{chunk-GUFY6D3E.js → chunk-NPUXXRJI.js} +1 -1
  71. package/chunks/{chunk-4Q6N3SNL.js → chunk-NVRDQFCX.js} +1 -1
  72. package/chunks/{chunk-77WOUGCA.js → chunk-OHKJVAKG.js} +7 -7
  73. package/chunks/{chunk-TAOSTUHI.js → chunk-PG62DFWD.js} +10 -10
  74. package/chunks/{chunk-REHWPCG2.js → chunk-PLFATELK.js} +1 -1
  75. package/chunks/{chunk-APNNM3JC.js → chunk-QGHSP65Z.js} +2 -2
  76. package/chunks/{chunk-HY2INPTA.js → chunk-QQWD7LZV.js} +4 -4
  77. package/chunks/{chunk-P74TZRXD.js → chunk-QXVSWG66.js} +1 -1
  78. package/chunks/{chunk-TX3KSSDN.js → chunk-S3Y3GBFD.js} +1 -1
  79. package/chunks/{chunk-B23P3YWE.js → chunk-SNRT2TJJ.js} +6 -23
  80. package/chunks/chunk-SR7RZ4MS.js +202 -0
  81. package/chunks/{chunk-F3LPXDJP.js → chunk-TE3ZAJE7.js} +13 -3
  82. package/chunks/{chunk-AB4A73VL.js → chunk-TKSZJ5BV.js} +1 -1
  83. package/chunks/{chunk-RZMGG3HP.js → chunk-U5SLIG7E.js} +1 -1
  84. package/chunks/chunk-UA5H3DS2.js +203 -0
  85. package/chunks/{chunk-JSJTZ6GO.js → chunk-VWMUDKLC.js} +3 -3
  86. package/chunks/{chunk-RGTB44BO.js → chunk-VXZ5HAOV.js} +1 -1
  87. package/chunks/{chunk-BCMJPTXV.js → chunk-WG6542MA.js} +1 -1
  88. package/chunks/{chunk-AG3P2RES.js → chunk-WV5J6Q6N.js} +1 -1
  89. package/chunks/{chunk-MIA37QO3.js → chunk-XHD7CRP2.js} +2 -2
  90. package/chunks/{chunk-KKRGVSHC.js → chunk-XZKQT2B2.js} +4 -4
  91. package/chunks/{chunk-4QJJHIZ5.js → chunk-Y4TETC74.js} +5 -5
  92. package/chunks/{chunk-QKJT5K4Q.js → chunk-YEF7XEO2.js} +3 -3
  93. package/chunks/{chunk-UKAYEQDU.js → chunk-YHJFF7KH.js} +131 -38
  94. package/chunks/{chunk-64YLXLMY.js → chunk-YOM7DEGB.js} +2 -2
  95. package/chunks/{chunk-BN3OROB3.js → chunk-ZCLLJARV.js} +9 -9
  96. package/chunks/{chunk-RFA6VDCR.js → chunk-ZHA242R4.js} +2 -2
  97. package/chunks/{chunk-L4OW63GW.js → chunk-ZPLALRXZ.js} +17 -9
  98. package/chunks/{computer-use-QLJ27OCZ.js → computer-use-ESQYJ3JY.js} +13 -10
  99. package/chunks/{config-utils-KIEXWA4F.js → config-utils-XQHBJP7G.js} +2 -2
  100. package/chunks/{contextCommand-JDTOJRBO.js → contextCommand-CX3YF4ZE.js} +15 -12
  101. package/chunks/{core-runtime-MZIAVYQC.js → core-runtime-DIAU7JMG.js} +13 -10
  102. package/chunks/{create-sub-session-YBBCNSHE.js → create-sub-session-HDPD6HOA.js} +13 -10
  103. package/chunks/{daemon-SCTQMM7Z.js → daemon-VZBGJUNL.js} +30 -0
  104. package/chunks/{daemon-status-provider-BZ7RD4ZJ.js → daemon-status-provider-H6O4UQ4F.js} +19 -16
  105. package/chunks/{daemon-trust-policy-2E4C3M7S.js → daemon-trust-policy-BNUXG6MT.js} +20 -17
  106. package/chunks/{daemon-trust-policy-monitor-UYLFH6RW.js → daemon-trust-policy-monitor-E4EQ7GF4.js} +20 -17
  107. package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
  108. package/chunks/{deferred-core-runtime-6XZYMJZB.js → deferred-core-runtime-CBMSHPAU.js} +13 -10
  109. package/chunks/{dist-BATY7GI4.js → dist-EEEQGCZA.js} +731 -136
  110. package/chunks/{dist-26RK5XZO.js → dist-MKX5OSFF.js} +4 -3
  111. package/chunks/{earlyInputCapture-LATQCGDC.js → earlyInputCapture-UIOP7OIN.js} +13 -10
  112. package/chunks/{edit-72DP57CD.js → edit-ITMZYFKA.js} +13 -10
  113. package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
  114. package/chunks/{enter-worktree-B4FY2ZPP.js → enter-worktree-S4PL5UV6.js} +13 -10
  115. package/chunks/{enterPlanMode-TQBWGCPL.js → enterPlanMode-YV52NNJT.js} +13 -10
  116. package/chunks/{environment-MOGZGZDS.js → environment-NGOWPRZV.js} +17 -14
  117. package/chunks/{errors-PGON5GH7.js → errors-BU26DTDX.js} +15 -12
  118. package/chunks/{exit-worktree-EYUD4YP2.js → exit-worktree-XRM6LH5F.js} +13 -10
  119. package/chunks/{exitPlanMode-4Q7BSQXR.js → exitPlanMode-ZLI5F7KR.js} +13 -10
  120. package/chunks/{fast-path-WI7D5MER.js → fast-path-UJWORIED.js} +3 -3
  121. package/chunks/{fast-path-settings-YBRL24DB.js → fast-path-settings-37WQD5B2.js} +6 -3
  122. package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
  123. package/chunks/{gemini-ZXURGM6Y.js → gemini-ZSKNDUMU.js} +55 -48
  124. package/chunks/{geminiContentGenerator-EOODO75Y.js → geminiContentGenerator-YGEXOEKD.js} +1 -1
  125. package/chunks/{glob-QNRIUOS6.js → glob-7KZG44BR.js} +13 -10
  126. package/chunks/{goal-tools-QSYW65HV.js → goal-tools-PXWN5VK3.js} +3 -1
  127. package/chunks/{grep-56MTW67B.js → grep-6ZFC7RJ5.js} +13 -10
  128. package/chunks/{handleAutoUpdate-XGFIPVT4.js → handleAutoUpdate-KSEL3TQS.js} +17 -14
  129. package/chunks/{i18n-RZB35L4B.js → i18n-ZIUXBW5V.js} +14 -11
  130. package/chunks/{image-gen-OE2EEKN3.js → image-gen-AUIZJJNK.js} +6 -4
  131. package/chunks/{initializer-YPVMTMKD.js → initializer-7AHY3N6Q.js} +20 -17
  132. package/chunks/{installationInfo-ZTMTMYNW.js → installationInfo-VGBXMYLY.js} +14 -11
  133. package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
  134. package/chunks/{list-NIW3WID5.js → list-PSFKQHLB.js} +23 -20
  135. package/chunks/{loadedSettingsAdapter-VSLILTOZ.js → loadedSettingsAdapter-FTMRCTOF.js} +20 -17
  136. package/chunks/{loggingContentGenerator-KFZYVAGV.js → loggingContentGenerator-MZAN52UV.js} +5 -3
  137. package/chunks/{managed-npm-update-WHTA2K5V.js → managed-npm-update-O4NHK45X.js} +14 -11
  138. package/chunks/{mcp-7KGK3CS3.js → mcp-6CFP2AYQ.js} +20 -17
  139. package/chunks/{monitor-FDWEJQWP.js → monitor-DAKD6OU4.js} +13 -10
  140. package/chunks/{nonInteractiveCli-2MVJ6TCS.js → nonInteractiveCli-RC7VIUZL.js} +49 -44
  141. package/chunks/{notebook-edit-ZUVK2XWE.js → notebook-edit-474DPMRL.js} +13 -10
  142. package/chunks/{openaiContentGenerator-TNLWOPH5.js → openaiContentGenerator-2NFY2MWO.js} +6 -3
  143. package/chunks/{pidfile-BB6SKPH2.js → pidfile-KBFVDNQP.js} +13 -10
  144. package/chunks/{processUtils-WKHJOPDH.js → processUtils-6GRYH4Y3.js} +2 -2
  145. package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
  146. package/chunks/{qwenContentGenerator-FZS2DYF7.js → qwenContentGenerator-KAHU6IZY.js} +14 -11
  147. package/chunks/{qwenOAuth2-UYMYRXBB.js → qwenOAuth2-RRQTCP4W.js} +6 -4
  148. package/chunks/{read-file-FMTE6LPA.js → read-file-3M6WXDXP.js} +4 -2
  149. package/chunks/{resumeHistoryUtils-Z34RCZFF.js → resumeHistoryUtils-D6TAY3HX.js} +16 -13
  150. package/chunks/{ripGrep-DUIYUZGM.js → ripGrep-PLPENT3E.js} +13 -10
  151. package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
  152. package/chunks/{run-qwen-serve-KOHHR3F4.js → run-qwen-serve-ZAFIJKJC.js} +93 -40
  153. package/chunks/{runtime-K4NTZSAU.js → runtime-ZED7CYOZ.js} +23 -20
  154. package/chunks/{scheduler-6G6AMURS.js → scheduler-MD3AL2W5.js} +13 -10
  155. package/chunks/{serve-NMG2TM5K.js → serve-E3VUDRZN.js} +20 -17
  156. package/chunks/{server-FS7KDELS.js → server-OWMEMAKR.js} +381 -192
  157. package/chunks/{session-XZADUVKJ.js → session-HZ57QK7K.js} +141 -81
  158. package/chunks/{settings-G75R6FOA.js → settings-V7BR3RKP.js} +19 -16
  159. package/chunks/{shell-3D3PMQHE.js → shell-23OMNMW6.js} +13 -10
  160. package/chunks/{skill-TSEYMVQ2.js → skill-6HBDYZRS.js} +4 -2
  161. package/chunks/{skill-settings-HJC2CPBJ.js → skill-settings-HWJLTU7M.js} +19 -16
  162. package/chunks/{spawnChannel-YWCN74G5.js → spawnChannel-N6KKUW5B.js} +13 -10
  163. package/chunks/{standalone-update-HLYOLX6V.js → standalone-update-QGIKHATD.js} +15 -12
  164. package/chunks/{startInteractiveUI-ROUIQ5KU.js → startInteractiveUI-GX2CRL42.js} +269 -118
  165. package/chunks/{team-create-OTP5SSB2.js → team-create-CFFKU7KL.js} +13 -10
  166. package/chunks/{team-plan-approval-TQX5TMXU.js → team-plan-approval-6EFOKR6A.js} +13 -10
  167. package/chunks/{terminal-image-renderer-KF3GKNWW.js → terminal-image-renderer-TLDNACQY.js} +13 -10
  168. package/chunks/{theme-manager-XVWAAGAM.js → theme-manager-5LJ3H7VO.js} +13 -10
  169. package/chunks/{tool-search-7N4D4O56.js → tool-search-UJV3A24H.js} +4 -2
  170. package/chunks/{total-session-admission-ZQ4VKIRW.js → total-session-admission-D63QYXGO.js} +15 -12
  171. package/chunks/{trustedFolders-4XYFPWVV.js → trustedFolders-KZCOB53W.js} +17 -12
  172. package/chunks/{update-relaunch-L4GSBLUU.js → update-relaunch-IFILM3SA.js} +5 -5
  173. package/chunks/{updateCheck-PCUTVRFE.js → updateCheck-YZ2CRCFC.js} +16 -13
  174. package/chunks/{useAutoAcceptIndicator-WMXY7MND.js → useAutoAcceptIndicator-AXEVNA3Q.js} +22 -19
  175. package/chunks/{validateNonInterActiveAuth-5S3U2D56.js → validateNonInterActiveAuth-3WTOJFWA.js} +44 -41
  176. package/chunks/{version-P57IQU2T.js → version-GXK7OHZY.js} +1 -1
  177. package/chunks/{web-fetch-5ZLLLCDD.js → web-fetch-ILB4GAVR.js} +10 -6
  178. package/chunks/{web-search-NELKANTW.js → web-search-HKRPGPZZ.js} +5 -3
  179. package/chunks/{workflow-RXKBF3LO.js → workflow-FXIPRQQA.js} +735 -134
  180. package/chunks/{workspace-providers-status-HAEMNAWC.js → workspace-providers-status-NYHC7HSR.js} +22 -19
  181. package/chunks/{workspace-registration-store-U3U3YM6V.js → workspace-registration-store-AKEB7OMW.js} +1 -1
  182. package/chunks/{workspace-registry-ZFP33GVB.js → workspace-registry-CDAS5TVZ.js} +15 -12
  183. package/chunks/{workspace-service-QMISJBMA.js → workspace-service-PAMUKMAV.js} +23 -20
  184. package/chunks/{workspace-skills-status-K7EOUGXL.js → workspace-skills-status-YQSHCCMS.js} +20 -17
  185. package/chunks/{workspace-trust-reconciler-BFPKULDZ.js → workspace-trust-reconciler-RPTXOIY2.js} +22 -19
  186. package/chunks/{write-file-2F76RRFE.js → write-file-CGS57TS4.js} +13 -10
  187. package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
  188. package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
  189. package/chunks/{zoom-image-DPR22XWY.js → zoom-image-E7D72GYV.js} +4 -2
  190. package/cli.js +13 -13
  191. package/locales/ca.js +10 -0
  192. package/locales/de.js +9 -0
  193. package/locales/en.js +10 -0
  194. package/locales/fr.js +9 -0
  195. package/locales/ja.js +9 -0
  196. package/locales/pt.js +9 -0
  197. package/locales/ru.js +9 -0
  198. package/locales/zh-TW.js +10 -0
  199. package/locales/zh.js +10 -0
  200. package/package.json +3 -3
  201. package/web-shell/assets/{arc-CunFPPcQ.js → arc-DybZaz32.js} +1 -1
  202. package/web-shell/assets/{architectureDiagram-3BPJPVTR-D3SqCgeM.js → architectureDiagram-3BPJPVTR-jN3qBd19.js} +1 -1
  203. package/web-shell/assets/{blockDiagram-GPEHLZMM-CPRx90S_.js → blockDiagram-GPEHLZMM-Ct5DZPrj.js} +1 -1
  204. package/web-shell/assets/{c4Diagram-AAUBKEIU-CahP9Ue4.js → c4Diagram-AAUBKEIU-CUAFMlUG.js} +1 -1
  205. package/web-shell/assets/channel-BMwLrwLW.js +1 -0
  206. package/web-shell/assets/{chunk-2J33WTMH-DckIWZ12.js → chunk-2J33WTMH-CuV8n90B.js} +1 -1
  207. package/web-shell/assets/{chunk-4BX2VUAB-D2Kfctyn.js → chunk-4BX2VUAB-BUzl_kls.js} +1 -1
  208. package/web-shell/assets/{chunk-55IACEB6-DkI11FTX.js → chunk-55IACEB6-BnDBLX6A.js} +1 -1
  209. package/web-shell/assets/{chunk-727SXJPM-rR-TSCIi.js → chunk-727SXJPM-B83uTOjm.js} +1 -1
  210. package/web-shell/assets/{chunk-AQP2D5EJ-DFGKcGRO.js → chunk-AQP2D5EJ-DM3HLgpT.js} +1 -1
  211. package/web-shell/assets/{chunk-FMBD7UC4-CjWqcTPE.js → chunk-FMBD7UC4-CSQ5hgyb.js} +1 -1
  212. package/web-shell/assets/{chunk-ND2GUHAM-RXe-87UV.js → chunk-ND2GUHAM-BWOF4SxX.js} +1 -1
  213. package/web-shell/assets/{chunk-QZHKN3VN-Dz0c_Yrn.js → chunk-QZHKN3VN-BsOH9LMi.js} +1 -1
  214. package/web-shell/assets/classDiagram-4FO5ZUOK-BGDv98jY.js +1 -0
  215. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BGDv98jY.js +1 -0
  216. package/web-shell/assets/{cose-bilkent-S5V4N54A-ZHF0-jvV.js → cose-bilkent-S5V4N54A-IENqH2iJ.js} +1 -1
  217. package/web-shell/assets/{dagre-BM42HDAG-7Umz_ygJ.js → dagre-BM42HDAG--dyzDTGo.js} +1 -1
  218. package/web-shell/assets/{diagram-2AECGRRQ-DomN8nxq.js → diagram-2AECGRRQ-BE7Dcqof.js} +1 -1
  219. package/web-shell/assets/{diagram-5GNKFQAL-eebvj2OL.js → diagram-5GNKFQAL-Cr8-5OTj.js} +1 -1
  220. package/web-shell/assets/{diagram-KO2AKTUF-IR1mmn9d.js → diagram-KO2AKTUF-Bzey3uAY.js} +1 -1
  221. package/web-shell/assets/{diagram-LMA3HP47-CKysx5KF.js → diagram-LMA3HP47-sErl28Xb.js} +1 -1
  222. package/web-shell/assets/{diagram-OG6HWLK6-cBy5puHn.js → diagram-OG6HWLK6-Dq30ATIo.js} +1 -1
  223. package/web-shell/assets/{erDiagram-TEJ5UH35-B5RJagPG.js → erDiagram-TEJ5UH35-BkCoEfVW.js} +1 -1
  224. package/web-shell/assets/{flowDiagram-I6XJVG4X-CfHgDmPg.js → flowDiagram-I6XJVG4X-DHwO0rrI.js} +1 -1
  225. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DUfFF5nb.js → ganttDiagram-6RSMTGT7-s7vAPxWq.js} +1 -1
  226. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-M9dt57k5.js → gitGraphDiagram-PVQCEYII-CQxhwPOU.js} +1 -1
  227. package/web-shell/assets/{index-B8e-CkuC.css → index-Bckpjr-I.css} +1 -1
  228. package/web-shell/assets/{index-CKjO4myk.js → index-CF4wApWp.js} +1 -1
  229. package/web-shell/assets/{index-Dc-fTO0V.js → index-DwEr9HEW.js} +316 -316
  230. package/web-shell/assets/{infoDiagram-5YYISTIA-CTKMmIro.js → infoDiagram-5YYISTIA-BnFrD0bq.js} +1 -1
  231. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DJIJDP4s.js → ishikawaDiagram-YF4QCWOH-Bf9zK5NK.js} +1 -1
  232. package/web-shell/assets/{journeyDiagram-JHISSGLW-DgRnvn6S.js → journeyDiagram-JHISSGLW-CyGAhsxi.js} +1 -1
  233. package/web-shell/assets/{kanban-definition-UN3LZRKU-VUwO8yrg.js → kanban-definition-UN3LZRKU-CbsK5akB.js} +1 -1
  234. package/web-shell/assets/{linear-BCvgV5I_.js → linear-cQsF4P8D.js} +1 -1
  235. package/web-shell/assets/{mermaid.core-mv_kVV6q.js → mermaid.core-Z4HVqrKY.js} +5 -5
  236. package/web-shell/assets/{mindmap-definition-RKZ34NQL-sfnjMlOd.js → mindmap-definition-RKZ34NQL-CYnrBo_f.js} +1 -1
  237. package/web-shell/assets/{pieDiagram-4H26LBE5-BlhICse4.js → pieDiagram-4H26LBE5-CBzOfhrs.js} +1 -1
  238. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BgTQzwen.js → quadrantDiagram-W4KKPZXB-D4LK1Ebn.js} +1 -1
  239. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ-FTrrN.js → requirementDiagram-4Y6WPE33-Bzti2Lcj.js} +1 -1
  240. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-G5Wp_jn3.js → sankeyDiagram-5OEKKPKP-yTBw5Z2s.js} +1 -1
  241. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-C8MKZ3i1.js → sequenceDiagram-3UESZ5HK-D07UVRiZ.js} +1 -1
  242. package/web-shell/assets/{stateDiagram-AJRCARHV-Bo0ZDm7y.js → stateDiagram-AJRCARHV-UE_lHsTn.js} +1 -1
  243. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DC6xgXjX.js +1 -0
  244. package/web-shell/assets/{timeline-definition-PNZ67QCA-M3L9E01f.js → timeline-definition-PNZ67QCA-DRvYdiTs.js} +1 -1
  245. package/web-shell/assets/{vennDiagram-CIIHVFJN-DD4eHCrm.js → vennDiagram-CIIHVFJN-CQLIXs0u.js} +1 -1
  246. package/web-shell/assets/{wardley-L42UT6IY-DNEL_3g4.js → wardley-L42UT6IY-JZz_Xqse.js} +1 -1
  247. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-q484OoqI.js → wardleyDiagram-YWT4CUSO--i7BiJwB.js} +1 -1
  248. package/web-shell/assets/{xychartDiagram-2RQKCTM6-4mcNt1Yg.js → xychartDiagram-2RQKCTM6-Bkc-bW0S.js} +1 -1
  249. package/web-shell/index.html +2 -2
  250. package/chunks/chunk-ALFTV7GA.js +0 -92
  251. package/web-shell/assets/channel-zbv7GWAw.js +0 -1
  252. package/web-shell/assets/classDiagram-4FO5ZUOK-DSjLkJJZ.js +0 -1
  253. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DSjLkJJZ.js +0 -1
  254. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-31TSCPcH.js +0 -1
@@ -71,7 +71,7 @@ import {
71
71
  RUNTIME_SNAPSHOT_PREFIX,
72
72
  buildModelIdContext,
73
73
  resolveModelId
74
- } from "./chunk-RGTB44BO.js";
74
+ } from "./chunk-VXZ5HAOV.js";
75
75
  import {
76
76
  ARTIFACT_TITLE_MAX_LENGTH,
77
77
  ARTIFACT_WORKSPACE_PATH_MAX_LENGTH,
@@ -131,15 +131,25 @@ import {
131
131
  import {
132
132
  normalizeImageGenerationBaseUrl,
133
133
  resolveNetworkTarget
134
- } from "./chunk-CJXIIILK.js";
134
+ } from "./chunk-2FRY5CRX.js";
135
135
  import {
136
136
  GoalPersistenceUnavailableError,
137
137
  PAUSED_GOAL_SYSTEM_REMINDER,
138
+ aggregateTranscriptRecordFragments,
139
+ createGoalCheckpointVerifier,
138
140
  createGoalRuntime,
139
141
  goalRequiresExactPermit,
140
142
  goalTurnContext,
141
- parseGoalStateRecordPayloadV2
142
- } from "./chunk-3K7FH2KQ.js";
143
+ isTranscriptArtifactRecord,
144
+ isTranscriptConversationRecord,
145
+ parseGoalStateRecordPayloadV2,
146
+ prepareTranscriptRecords,
147
+ projectUserTranscriptForDisplay,
148
+ selectTranscriptLeaf,
149
+ validateTranscriptRecord,
150
+ walkTranscriptUuidChain,
151
+ wrapUserPromptSubmitContext
152
+ } from "./chunk-67N6HB5H.js";
143
153
  import {
144
154
  APPROVAL_MODES,
145
155
  SUBAGENT_PLAN_LIFECYCLE_TOOLS,
@@ -242,11 +252,13 @@ import {
242
252
  shouldAttemptBrowserLaunch
243
253
  } from "./chunk-NAVJD2PQ.js";
244
254
  import {
245
- classifyRetryError,
246
- isFallbackEligible,
247
255
  isUnattendedMode,
248
256
  retryWithBackoff
249
- } from "./chunk-BGG4MBYD.js";
257
+ } from "./chunk-4PYCZH2V.js";
258
+ import {
259
+ classifyRetryError,
260
+ isFallbackEligible
261
+ } from "./chunk-SR7RZ4MS.js";
250
262
  import {
251
263
  QUOTA_EXHAUSTED_PREFIX,
252
264
  formatQuotaExhaustedMessage,
@@ -370,7 +382,6 @@ import {
370
382
  readTextRangeFromHandle,
371
383
  removeMCPServerStatus,
372
384
  removeMCPStatusChangeListener,
373
- runSideQuery,
374
385
  runVisionBridge,
375
386
  runWithChatRecordingSuppressed,
376
387
  runWithInvocationContext,
@@ -384,7 +395,7 @@ import {
384
395
  updateMCPServerStatus,
385
396
  writeLine,
386
397
  writeLineSync
387
- } from "./chunk-XCG76UE6.js";
398
+ } from "./chunk-3PY4LPJF.js";
388
399
  import {
389
400
  defaultModalities
390
401
  } from "./chunk-WOJZWRAZ.js";
@@ -413,6 +424,9 @@ import {
413
424
  isTeamAutoMemPath,
414
425
  isUserAutoMemPath
415
426
  } from "./chunk-FVKHVJZQ.js";
427
+ import {
428
+ runSideQuery
429
+ } from "./chunk-COBO5EBO.js";
416
430
  import {
417
431
  STRUCTURED_OUTPUT_REDACTED_ARGS
418
432
  } from "./chunk-6ZRFAKXK.js";
@@ -439,8 +453,6 @@ import {
439
453
  AUTH_ENV_MAPPINGS,
440
454
  AuthType,
441
455
  DEFAULT_MODELS,
442
- DEFAULT_QWEN_EMBEDDING_MODEL,
443
- DEFAULT_QWEN_MODEL,
444
456
  MODEL_GENERATION_CONFIG_FIELDS,
445
457
  PROVIDER_SOURCED_FIELDS,
446
458
  QWEN_OAUTH_ALLOWED_MODELS,
@@ -448,7 +460,11 @@ import {
448
460
  createContentGenerator,
449
461
  resetPreloadedContentGenerator,
450
462
  resolveContentGeneratorConfigWithSources
451
- } from "./chunk-P7HUJDBZ.js";
463
+ } from "./chunk-M3STHEMM.js";
464
+ import {
465
+ DEFAULT_QWEN_EMBEDDING_MODEL,
466
+ DEFAULT_QWEN_MODEL
467
+ } from "./chunk-F6WFNA7U.js";
452
468
  import {
453
469
  normalizeMcpToolName,
454
470
  sanitizeToolNameForProvider
@@ -21631,33 +21647,6 @@ function buildContextUsage(contextWindowSize, inputTokens) {
21631
21647
  }
21632
21648
  __name(buildContextUsage, "buildContextUsage");
21633
21649
 
21634
- // packages/core/src/hooks/user-prompt-submit-context.ts
21635
- init_esbuild_shims();
21636
- var USER_PROMPT_SUBMIT_CONTEXT_OPEN_TAG = "<qwen:user-prompt-submit-context>";
21637
- var USER_PROMPT_SUBMIT_CONTEXT_CLOSE_TAG = "</qwen:user-prompt-submit-context>";
21638
- function wrapUserPromptSubmitContext(context2) {
21639
- return `${USER_PROMPT_SUBMIT_CONTEXT_OPEN_TAG}
21640
- ${context2}
21641
- ${USER_PROMPT_SUBMIT_CONTEXT_CLOSE_TAG}`;
21642
- }
21643
- __name(wrapUserPromptSubmitContext, "wrapUserPromptSubmitContext");
21644
- function isUserPromptSubmitContextPartText(text) {
21645
- const trimmed = text.trim();
21646
- return trimmed.startsWith(USER_PROMPT_SUBMIT_CONTEXT_OPEN_TAG) && trimmed.endsWith(USER_PROMPT_SUBMIT_CONTEXT_CLOSE_TAG) && trimmed.length >= USER_PROMPT_SUBMIT_CONTEXT_OPEN_TAG.length + USER_PROMPT_SUBMIT_CONTEXT_CLOSE_TAG.length;
21647
- }
21648
- __name(isUserPromptSubmitContextPartText, "isUserPromptSubmitContextPartText");
21649
- function stripTrailingUserPromptSubmitContextPart(parts) {
21650
- if (parts.length <= 1) {
21651
- return parts;
21652
- }
21653
- const last = parts[parts.length - 1];
21654
- if (!last || typeof last.text !== "string" || !isUserPromptSubmitContextPartText(last.text)) {
21655
- return parts;
21656
- }
21657
- return parts.slice(0, -1);
21658
- }
21659
- __name(stripTrailingUserPromptSubmitContextPart, "stripTrailingUserPromptSubmitContextPart");
21660
-
21661
21650
  // packages/core/src/core/session-start-profiler.ts
21662
21651
  init_esbuild_shims();
21663
21652
  import * as fs3 from "node:fs";
@@ -22169,6 +22158,7 @@ ${coreIdentity}
22169
22158
 
22170
22159
  # Core Mandates
22171
22160
 
22161
+ - **UserPromptSubmit Context:** Text inside a \`<qwen:user-prompt-submit-context>\` tag is model context added by a configured \`UserPromptSubmit\` hook, not user input.
22172
22162
  - **Conventions:** Rigorously adhere to existing project conventions when reading or modifying code. Analyze surrounding code, tests, and configuration first.
22173
22163
  - **Libraries/Frameworks:** NEVER assume a library/framework is available or appropriate. Verify its established usage within the project (check imports, configuration files like 'package.json', 'Cargo.toml', 'requirements.txt', 'build.gradle', etc., or observe neighboring files) before employing it.
22174
22164
  - **Style & Structure:** Mimic the style (formatting, naming), structure, framework choices, typing, and architectural patterns of existing code in the project.
@@ -24477,357 +24467,6 @@ import fs12 from "node:fs";
24477
24467
  import { randomUUID as randomUUID3 } from "node:crypto";
24478
24468
  import readline from "node:readline";
24479
24469
 
24480
- // packages/core/src/utils/transcript-records.ts
24481
- init_esbuild_shims();
24482
- var TranscriptRecordPreparationError = class extends TypeError {
24483
- constructor(code, message) {
24484
- super(message);
24485
- this.code = code;
24486
- this.name = "TranscriptRecordPreparationError";
24487
- }
24488
- static {
24489
- __name(this, "TranscriptRecordPreparationError");
24490
- }
24491
- };
24492
- var RECORD_TYPES = /* @__PURE__ */ new Set([
24493
- "user",
24494
- "assistant",
24495
- "tool_result",
24496
- "system"
24497
- ]);
24498
- var ARTIFACT_RECORD_SUBTYPES = /* @__PURE__ */ new Set([
24499
- "session_artifact_event",
24500
- "session_artifact_snapshot"
24501
- ]);
24502
- var KNOWN_RECORD_SUBTYPES = /* @__PURE__ */ new Set([
24503
- "chat_compression",
24504
- "slash_command",
24505
- "ui_telemetry",
24506
- "at_command",
24507
- "attribution_snapshot",
24508
- "notification",
24509
- "cron",
24510
- "mid_turn_user_message",
24511
- "realtime_message",
24512
- "custom_title",
24513
- "parent_session",
24514
- "rewind",
24515
- "agent_bootstrap",
24516
- "agent_launch_prompt",
24517
- "file_history_snapshot",
24518
- "session_source",
24519
- "goal_state",
24520
- "goal_runtime",
24521
- ...ARTIFACT_RECORD_SUBTYPES
24522
- ]);
24523
- function isObjectRecord(value) {
24524
- return typeof value === "object" && value !== null && !Array.isArray(value);
24525
- }
24526
- __name(isObjectRecord, "isObjectRecord");
24527
- function diagnostic(code, message, affectsCompleteness, fields = {}, severity = affectsCompleteness ? "warning" : "info") {
24528
- return {
24529
- code,
24530
- severity,
24531
- message,
24532
- affectsCompleteness,
24533
- ...fields
24534
- };
24535
- }
24536
- __name(diagnostic, "diagnostic");
24537
- function isTranscriptConversationRecord(record2) {
24538
- return !isTranscriptArtifactRecord(record2);
24539
- }
24540
- __name(isTranscriptConversationRecord, "isTranscriptConversationRecord");
24541
- function isTranscriptArtifactRecord(record2) {
24542
- return record2.type === "system" && typeof record2.subtype === "string" && ARTIFACT_RECORD_SUBTYPES.has(record2.subtype);
24543
- }
24544
- __name(isTranscriptArtifactRecord, "isTranscriptArtifactRecord");
24545
- function validateTranscriptRecord(value, recordIndex) {
24546
- const diagnostics = [];
24547
- if (!isObjectRecord(value)) {
24548
- diagnostics.push(
24549
- diagnostic(
24550
- "invalid_record",
24551
- "Skipped a transcript record that is not an object.",
24552
- true,
24553
- { recordIndex }
24554
- )
24555
- );
24556
- return { diagnostics };
24557
- }
24558
- const uuid = value["uuid"];
24559
- const parentUuid = value["parentUuid"];
24560
- const sessionId = value["sessionId"];
24561
- const type = value["type"];
24562
- const recordId = typeof uuid === "string" ? uuid : void 0;
24563
- if (typeof uuid !== "string" || uuid.length === 0 || typeof parentUuid !== "string" && parentUuid !== null || typeof sessionId !== "string" || sessionId.length === 0) {
24564
- diagnostics.push(
24565
- diagnostic(
24566
- "invalid_record",
24567
- "Skipped a transcript record with invalid identity fields.",
24568
- true,
24569
- { recordIndex, recordId }
24570
- )
24571
- );
24572
- return { diagnostics };
24573
- }
24574
- if (typeof type !== "string" || !RECORD_TYPES.has(type)) {
24575
- diagnostics.push(
24576
- diagnostic(
24577
- "unknown_record_or_part",
24578
- "Skipped a transcript record with an unknown record type.",
24579
- true,
24580
- { recordIndex, recordId }
24581
- )
24582
- );
24583
- return { diagnostics };
24584
- }
24585
- const timestamp = value["timestamp"];
24586
- if (timestamp !== void 0 && (typeof timestamp !== "string" || !Number.isFinite(new Date(timestamp).getTime()))) {
24587
- diagnostics.push(
24588
- diagnostic(
24589
- "invalid_timestamp",
24590
- "Ignored an invalid transcript record timestamp.",
24591
- false,
24592
- { recordIndex, recordId, path: "timestamp" }
24593
- )
24594
- );
24595
- }
24596
- const subtype = value["subtype"];
24597
- if (subtype !== void 0 && (typeof subtype !== "string" || !KNOWN_RECORD_SUBTYPES.has(subtype))) {
24598
- diagnostics.push(
24599
- diagnostic(
24600
- "unknown_record_or_part",
24601
- "The transcript record has an unknown subtype.",
24602
- true,
24603
- { recordIndex, recordId, path: "subtype" }
24604
- )
24605
- );
24606
- }
24607
- let message;
24608
- if (value["message"] !== void 0) {
24609
- if (!isObjectRecord(value["message"])) {
24610
- diagnostics.push(
24611
- diagnostic(
24612
- "malformed_part",
24613
- "Ignored a malformed transcript message payload.",
24614
- true,
24615
- { recordIndex, recordId, path: "message" }
24616
- )
24617
- );
24618
- } else {
24619
- const parts = value["message"]["parts"];
24620
- if (parts !== void 0 && !Array.isArray(parts)) {
24621
- diagnostics.push(
24622
- diagnostic(
24623
- "malformed_part",
24624
- "Ignored malformed transcript message parts.",
24625
- true,
24626
- { recordIndex, recordId, path: "message.parts" }
24627
- )
24628
- );
24629
- }
24630
- message = {
24631
- ...typeof value["message"]["role"] === "string" ? { role: value["message"]["role"] } : {},
24632
- ...Array.isArray(parts) ? { parts } : {}
24633
- };
24634
- }
24635
- }
24636
- return {
24637
- record: {
24638
- ...value,
24639
- uuid,
24640
- parentUuid,
24641
- sessionId,
24642
- type,
24643
- ...typeof subtype === "string" ? { subtype } : { subtype: void 0 },
24644
- ...typeof timestamp === "string" && Number.isFinite(new Date(timestamp).getTime()) ? { timestamp } : { timestamp: void 0 },
24645
- ...message ? { message } : { message: void 0 }
24646
- },
24647
- diagnostics
24648
- };
24649
- }
24650
- __name(validateTranscriptRecord, "validateTranscriptRecord");
24651
- function selectTranscriptLeaf(records, leafUuid) {
24652
- if (leafUuid !== void 0) {
24653
- return records.some(
24654
- (record2) => record2.uuid === leafUuid && isTranscriptConversationRecord(record2)
24655
- ) ? leafUuid : void 0;
24656
- }
24657
- for (let index = records.length - 1; index >= 0; index -= 1) {
24658
- const record2 = records[index];
24659
- if (record2 && isTranscriptConversationRecord(record2)) return record2.uuid;
24660
- }
24661
- return void 0;
24662
- }
24663
- __name(selectTranscriptLeaf, "selectTranscriptLeaf");
24664
- function walkTranscriptUuidChain(leafUuid, lookup2) {
24665
- const uuids = [];
24666
- const gaps = [];
24667
- const visited = /* @__PURE__ */ new Set();
24668
- let currentUuid = leafUuid;
24669
- let cycleUuid;
24670
- while (currentUuid) {
24671
- if (visited.has(currentUuid)) {
24672
- cycleUuid = currentUuid;
24673
- break;
24674
- }
24675
- visited.add(currentUuid);
24676
- const record2 = lookup2(currentUuid);
24677
- if (!record2) break;
24678
- uuids.push(currentUuid);
24679
- if (!record2.parentUuid) break;
24680
- if (!lookup2(record2.parentUuid)) {
24681
- gaps.push({
24682
- childUuid: currentUuid,
24683
- missingParentUuid: record2.parentUuid
24684
- });
24685
- break;
24686
- }
24687
- currentUuid = record2.parentUuid;
24688
- }
24689
- uuids.reverse();
24690
- return { uuids, gaps, ...cycleUuid ? { cycleUuid } : {} };
24691
- }
24692
- __name(walkTranscriptUuidChain, "walkTranscriptUuidChain");
24693
- function aggregateTranscriptRecordFragments(records) {
24694
- const first = records[0];
24695
- if (!first) {
24696
- throw new Error("Cannot aggregate empty transcript record array");
24697
- }
24698
- const base = { ...first };
24699
- let message = first.message ? { ...first.message, parts: [...first.message.parts ?? []] } : void 0;
24700
- for (let index = 1; index < records.length; index += 1) {
24701
- const record2 = records[index];
24702
- if (record2.message !== void 0) {
24703
- message = message ? {
24704
- role: message.role,
24705
- parts: [...message.parts ?? [], ...record2.message.parts ?? []]
24706
- } : { ...record2.message, parts: [...record2.message.parts ?? []] };
24707
- }
24708
- if (record2.usageMetadata) base["usageMetadata"] = record2.usageMetadata;
24709
- if (record2.toolCallResult && !base["toolCallResult"]) {
24710
- base["toolCallResult"] = record2.toolCallResult;
24711
- }
24712
- if (record2.model && !base["model"]) base["model"] = record2.model;
24713
- if (record2.timestamp && (!base["timestamp"] || record2.timestamp > String(base["timestamp"]))) {
24714
- base["timestamp"] = record2.timestamp;
24715
- }
24716
- }
24717
- base["message"] = message;
24718
- return base;
24719
- }
24720
- __name(aggregateTranscriptRecordFragments, "aggregateTranscriptRecordFragments");
24721
- function prepareTranscriptRecords(values, options2 = {}) {
24722
- if (!Array.isArray(values)) {
24723
- throw new TranscriptRecordPreparationError(
24724
- "invalid_records",
24725
- "Transcript records must be an array."
24726
- );
24727
- }
24728
- const diagnostics = [];
24729
- const records = [];
24730
- const sourceIndexByRecord = /* @__PURE__ */ new Map();
24731
- for (let index = 0; index < values.length; index += 1) {
24732
- const validated = validateTranscriptRecord(values[index], index);
24733
- diagnostics.push(...validated.diagnostics);
24734
- if (validated.record) {
24735
- records.push(validated.record);
24736
- sourceIndexByRecord.set(validated.record, index);
24737
- }
24738
- }
24739
- const sessionIds = new Set(records.map((record2) => record2.sessionId));
24740
- if (sessionIds.size > 1) {
24741
- throw new TranscriptRecordPreparationError(
24742
- "mixed_session_ids",
24743
- "Transcript records contain multiple session ids."
24744
- );
24745
- }
24746
- const leafUuid = selectTranscriptLeaf(records, options2.leafUuid);
24747
- if (options2.leafUuid !== void 0 && leafUuid === void 0) {
24748
- throw new TranscriptRecordPreparationError(
24749
- "leaf_not_found",
24750
- "The requested transcript leaf was not found."
24751
- );
24752
- }
24753
- if (!leafUuid) {
24754
- if (records.length > 0) {
24755
- diagnostics.push(
24756
- diagnostic(
24757
- "artifact_only",
24758
- "The input contains no conversation records.",
24759
- false
24760
- )
24761
- );
24762
- }
24763
- return {
24764
- ...sessionIds.size === 1 ? { sessionId: records[0].sessionId } : {},
24765
- records: [],
24766
- gaps: [],
24767
- diagnostics
24768
- };
24769
- }
24770
- const fragmentsByUuid = /* @__PURE__ */ new Map();
24771
- const firstByUuid = /* @__PURE__ */ new Map();
24772
- for (const record2 of records) {
24773
- if (!isTranscriptConversationRecord(record2)) continue;
24774
- const fragments = fragmentsByUuid.get(record2.uuid);
24775
- if (fragments) {
24776
- if (fragments[0].parentUuid !== record2.parentUuid) {
24777
- diagnostics.push(
24778
- diagnostic(
24779
- "conflicting_parent_uuid",
24780
- "Duplicate transcript record fragments disagree on parentUuid.",
24781
- true,
24782
- {
24783
- recordIndex: sourceIndexByRecord.get(record2),
24784
- recordId: record2.uuid,
24785
- path: "parentUuid"
24786
- }
24787
- )
24788
- );
24789
- }
24790
- fragments.push(record2);
24791
- } else {
24792
- fragmentsByUuid.set(record2.uuid, [record2]);
24793
- firstByUuid.set(record2.uuid, record2);
24794
- }
24795
- }
24796
- const chain = walkTranscriptUuidChain(
24797
- leafUuid,
24798
- (uuid) => firstByUuid.get(uuid)
24799
- );
24800
- for (const gap of chain.gaps) {
24801
- diagnostics.push(
24802
- diagnostic(
24803
- "history_gap",
24804
- "The active transcript chain is missing a parent record.",
24805
- true,
24806
- { recordId: gap.childUuid }
24807
- )
24808
- );
24809
- }
24810
- if (chain.cycleUuid) {
24811
- diagnostics.push(
24812
- diagnostic(
24813
- "parent_cycle",
24814
- "The active transcript chain contains a parent cycle.",
24815
- true,
24816
- { recordId: chain.cycleUuid }
24817
- )
24818
- );
24819
- }
24820
- return {
24821
- ...sessionIds.size === 1 ? { sessionId: records[0].sessionId } : {},
24822
- records: chain.uuids.map(
24823
- (uuid) => aggregateTranscriptRecordFragments(fragmentsByUuid.get(uuid) ?? [])
24824
- ),
24825
- gaps: chain.gaps,
24826
- diagnostics
24827
- };
24828
- }
24829
- __name(prepareTranscriptRecords, "prepareTranscriptRecords");
24830
-
24831
24470
  // packages/core/src/services/fileHistoryService.ts
24832
24471
  init_esbuild_shims();
24833
24472
  import { createHash } from "node:crypto";
@@ -29186,10 +28825,10 @@ function makeSessionTranscriptNotFoundError(sessionId) {
29186
28825
  return error;
29187
28826
  }
29188
28827
  __name(makeSessionTranscriptNotFoundError, "makeSessionTranscriptNotFoundError");
29189
- function isObjectRecord2(value) {
28828
+ function isObjectRecord(value) {
29190
28829
  return typeof value === "object" && value !== null && !Array.isArray(value);
29191
28830
  }
29192
- __name(isObjectRecord2, "isObjectRecord");
28831
+ __name(isObjectRecord, "isObjectRecord");
29193
28832
  function isFiniteNonNegativeInteger(value) {
29194
28833
  return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
29195
28834
  }
@@ -29303,11 +28942,11 @@ function decodeCursorState(cursor, key) {
29303
28942
  try {
29304
28943
  const decoded = Buffer.from(cursor, "base64url").toString("utf8");
29305
28944
  const parsed = JSON.parse(decoded);
29306
- if (!isObjectRecord2(parsed)) {
28945
+ if (!isObjectRecord(parsed)) {
29307
28946
  throw new InvalidSessionTranscriptCursorError();
29308
28947
  }
29309
28948
  const fileIdentity = parsed["fileIdentity"];
29310
- if (parsed["v"] !== SESSION_TRANSCRIPT_CURSOR_VERSION || typeof parsed["sessionId"] !== "string" || !isObjectRecord2(fileIdentity) || !isFiniteNonNegativeFileId(fileIdentity["dev"]) || !isFiniteNonNegativeFileId(fileIdentity["ino"]) || !isFiniteNonNegativeInteger(parsed["snapshotSize"]) || !isFiniteNonNegativeInteger(parsed["position"]) || parsed["direction"] !== void 0 && parsed["direction"] !== "backward" || typeof parsed["leafUuid"] !== "string" || typeof parsed["startTime"] !== "string" || typeof parsed["lastUpdated"] !== "string" || typeof parsed["mac"] !== "string") {
28949
+ if (parsed["v"] !== SESSION_TRANSCRIPT_CURSOR_VERSION || typeof parsed["sessionId"] !== "string" || !isObjectRecord(fileIdentity) || !isFiniteNonNegativeFileId(fileIdentity["dev"]) || !isFiniteNonNegativeFileId(fileIdentity["ino"]) || !isFiniteNonNegativeInteger(parsed["snapshotSize"]) || !isFiniteNonNegativeInteger(parsed["position"]) || parsed["direction"] !== void 0 && parsed["direction"] !== "backward" || typeof parsed["leafUuid"] !== "string" || typeof parsed["startTime"] !== "string" || typeof parsed["lastUpdated"] !== "string" || typeof parsed["mac"] !== "string") {
29311
28950
  debugLogger14.debug("cursor decode failed: invalid payload shape");
29312
28951
  throw new InvalidSessionTranscriptCursorError();
29313
28952
  }
@@ -29745,7 +29384,7 @@ async function readAggregatedRecords(index, uuids) {
29745
29384
  }
29746
29385
  }
29747
29386
  __name(readAggregatedRecords, "readAggregatedRecords");
29748
- async function readGoalStateBeforePosition(index, position) {
29387
+ async function readGoalStatePayloadBeforePosition(index, position) {
29749
29388
  let low = 0;
29750
29389
  let high = index.goalStatePositions.length;
29751
29390
  while (low < high) {
@@ -29760,9 +29399,9 @@ async function readGoalStateBeforePosition(index, position) {
29760
29399
  if (goalStatePosition === void 0) return void 0;
29761
29400
  const uuid = index.activeUuids[goalStatePosition];
29762
29401
  const [record2] = await readAggregatedRecords(index, [uuid]);
29763
- return parseGoalStateRecordPayloadV2(record2?.systemPayload)?.snapshot;
29402
+ return parseGoalStateRecordPayloadV2(record2?.systemPayload);
29764
29403
  }
29765
- __name(readGoalStateBeforePosition, "readGoalStateBeforePosition");
29404
+ __name(readGoalStatePayloadBeforePosition, "readGoalStatePayloadBeforePosition");
29766
29405
  async function buildIndex(params) {
29767
29406
  const { filePath, fileIdentity, snapshotSize, lastUpdated } = params;
29768
29407
  const sessionId = path10.basename(filePath, ".jsonl");
@@ -29796,7 +29435,7 @@ async function buildIndex(params) {
29796
29435
  if (!record2 || !isTranscriptConversationRecord(record2)) {
29797
29436
  continue;
29798
29437
  }
29799
- if (record2.type === "system" && record2.subtype === "session_source" && isObjectRecord2(record2.systemPayload) && record2.systemPayload["sourceType"] === "side_task") {
29438
+ if (record2.type === "system" && record2.subtype === "session_source" && isObjectRecord(record2.systemPayload) && record2.systemPayload["sourceType"] === "side_task") {
29800
29439
  sideTaskSourceUuid = record2.uuid;
29801
29440
  }
29802
29441
  if (record2.timestamp) startTime ??= record2.timestamp;
@@ -30005,7 +29644,7 @@ var SessionTranscriptReader = class {
30005
29644
  const pageUuids = backwardPage?.uuids ?? selectPageUuids(index, position, limit, maxBytes);
30006
29645
  const nextPosition = backwardPage?.nextPosition ?? position + pageUuids.length;
30007
29646
  const records = await readAggregatedRecords(index, pageUuids);
30008
- const backwardGoalState = direction === "backward" ? await readGoalStateBeforePosition(index, nextPosition) : void 0;
29647
+ const backwardGoalState = direction === "backward" ? await readGoalStatePayloadBeforePosition(index, nextPosition) : void 0;
30009
29648
  const hasMore = direction === "backward" ? nextPosition > 0 : nextPosition < index.activeUuids.length;
30010
29649
  const nextCursorState = hasMore ? {
30011
29650
  v: SESSION_TRANSCRIPT_CURSOR_VERSION,
@@ -30029,7 +29668,12 @@ var SessionTranscriptReader = class {
30029
29668
  hasMore,
30030
29669
  ...direction === "backward" ? { direction: "backward" } : {},
30031
29670
  ...nextCursorState ? { nextCursorState } : {},
30032
- ...backwardGoalState ? { replay: { goalState: backwardGoalState } } : cursor?.replay !== void 0 ? { replay: cursor.replay } : {},
29671
+ ...backwardGoalState ? {
29672
+ replay: {
29673
+ goalState: backwardGoalState.snapshot,
29674
+ goalCause: backwardGoalState.cause
29675
+ }
29676
+ } : cursor?.replay !== void 0 ? { replay: cursor.replay } : {},
30033
29677
  startTime: index.startTime,
30034
29678
  lastUpdated: index.lastUpdated
30035
29679
  };
@@ -34519,15 +34163,17 @@ var ChatRecordingService = class {
34519
34163
  * Queues the write immediately on the serialized async writer.
34520
34164
  *
34521
34165
  * @param message The raw PartListUnion object as used with the API
34166
+ * @param goalContext Goal identity and turn that own this message
34167
+ * @param promptPayload User-authored display text and hook-context provenance
34522
34168
  */
34523
- recordUserMessage(message, goalContext, payload) {
34169
+ recordUserMessage(message, goalContext, promptPayload) {
34524
34170
  try {
34525
34171
  this.turnParentUuids.push(this.lastRecordUuid);
34526
34172
  const record2 = {
34527
34173
  ...this.createBaseRecord("user"),
34528
34174
  ...goalContext ? { goalContext: copyGoalContext(goalContext) } : {},
34529
34175
  message: createUserContent(message),
34530
- ...payload ? { systemPayload: payload } : {}
34176
+ ...promptPayload ? { systemPayload: promptPayload } : {}
34531
34177
  };
34532
34178
  this.appendRecord(record2);
34533
34179
  } catch (error) {
@@ -61785,6 +61431,39 @@ function sigtermPids(pids) {
61785
61431
  }
61786
61432
  __name(sigtermPids, "sigtermPids");
61787
61433
 
61434
+ // packages/core/src/tools/mcp-session-config.ts
61435
+ init_esbuild_shims();
61436
+ function normalizeMcpIncludeEntry(entry) {
61437
+ const paren = entry.indexOf("(");
61438
+ return paren === -1 ? entry : entry.slice(0, paren);
61439
+ }
61440
+ __name(normalizeMcpIncludeEntry, "normalizeMcpIncludeEntry");
61441
+ function coerceMcpFilterEntries(entries) {
61442
+ return (Array.isArray(entries) ? entries : []).filter(
61443
+ (entry) => typeof entry === "string"
61444
+ );
61445
+ }
61446
+ __name(coerceMcpFilterEntries, "coerceMcpFilterEntries");
61447
+ function normalizeFilter(entries, stripParenthesizedSuffix) {
61448
+ const normalized2 = coerceMcpFilterEntries(entries).map(
61449
+ (entry) => stripParenthesizedSuffix ? normalizeMcpIncludeEntry(entry) : entry
61450
+ );
61451
+ return [...new Set(normalized2)].sort();
61452
+ }
61453
+ __name(normalizeFilter, "normalizeFilter");
61454
+ function mcpSessionMetadataKey(config) {
61455
+ return JSON.stringify({
61456
+ trust: config.trust ?? null,
61457
+ alwaysLoadTools: config.alwaysLoadTools === true,
61458
+ // An absent allowlist accepts every name, while an explicit empty
61459
+ // allowlist accepts none. JSON `null` is treated as absent because
61460
+ // every runtime filter treats a falsy include list as "allow all".
61461
+ includeTools: config.includeTools == null ? null : normalizeFilter(config.includeTools, true),
61462
+ excludeTools: normalizeFilter(config.excludeTools, false)
61463
+ });
61464
+ }
61465
+ __name(mcpSessionMetadataKey, "mcpSessionMetadataKey");
61466
+
61788
61467
  // packages/core/src/tools/mcp-client-manager.ts
61789
61468
  var debugLogger40 = createDebugLogger("MCP");
61790
61469
  var RUNTIME_MCP_IF_ABSENT_CONFIG_FLAG = "__qwenRuntimeMcpIfAbsent";
@@ -61891,13 +61570,13 @@ var McpClientManager = class _McpClientManager {
61891
61570
  * Per connected server, the single-session "connected config key" of the
61892
61571
  * config it was last connected with — see {@link singleSessionConnectedKeyOf}.
61893
61572
  * Single-session path only; pool mode tracks transport identity via
61894
- * `pooledConnections[].id` and its own `desiredIds` diff.
61573
+ * `pooledConnections[].transportId` and its own `desiredIds` diff.
61895
61574
  * Lets `discoverAllMcpToolsIncremental` detect an in-place config change to an
61896
61575
  * already-connected server and reconnect it, instead of leaving it on the
61897
61576
  * stale config. Unlike the transport-only `connectionIdOf`, this key also
61898
- * covers the discovery-time filters (trust / includeTools / excludeTools) so
61899
- * editing those re-applies them. Set on successful connect; cleared on every
61900
- * teardown path so a stale key can't mask a later change.
61577
+ * covers the discovery-time metadata (trust / alwaysLoadTools / includeTools /
61578
+ * excludeTools) so editing those re-applies it. Set on successful connect;
61579
+ * cleared on every teardown path so a stale key can't mask a later change.
61901
61580
  */
61902
61581
  connectedConfigKeys = /* @__PURE__ */ new Map();
61903
61582
  /**
@@ -62656,7 +62335,7 @@ var McpClientManager = class _McpClientManager {
62656
62335
  }
62657
62336
  for (const [name, conn] of [...this.pooledConnections]) {
62658
62337
  const desired = desiredIds.get(name);
62659
- if (desired === void 0 || desired !== conn.id) {
62338
+ if (desired === void 0 || desired !== conn.transportId) {
62660
62339
  try {
62661
62340
  conn.release();
62662
62341
  } catch (err) {
@@ -62685,7 +62364,17 @@ var McpClientManager = class _McpClientManager {
62685
62364
  await this.discoverMcpToolsForServer(name, cliConfig);
62686
62365
  return;
62687
62366
  }
62688
- if (this.pooledConnections.has(name)) return;
62367
+ const existingConnection = this.pooledConnections.get(name);
62368
+ if (existingConnection) {
62369
+ try {
62370
+ existingConnection.updateConfig(config);
62371
+ } catch (err) {
62372
+ debugLogger40.error(
62373
+ `Pool metadata refresh failed for ${name}: ${getErrorMessage(err)}`
62374
+ );
62375
+ }
62376
+ return;
62377
+ }
62689
62378
  try {
62690
62379
  const conn = await this.pool.acquire(
62691
62380
  name,
@@ -63193,18 +62882,11 @@ var McpClientManager = class _McpClientManager {
63193
62882
  * intentionally transport-only (it excludes the per-session discovery filters
63194
62883
  * so the shared pool can reuse a transport across sessions with different
63195
62884
  * filters). But the single-session reconcile must ALSO reconnect when only a
63196
- * discovery filter changes — `trust`, `includeTools`, `excludeTools` are
63197
- * applied during `discover()` and baked into the registered tools, so a
63198
- * config edit to them otherwise never takes effect mid-session. Append a
63199
- * stable hash of those fields (arrays sorted so order alone doesn't churn).
62885
+ * discovery metadata changes. Append the same canonical metadata identity
62886
+ * used by pooled session views so equivalent filters do not reconnect.
63200
62887
  */
63201
62888
  singleSessionConnectedKeyOf(serverName, config) {
63202
- const discovery = JSON.stringify({
63203
- trust: config.trust ?? null,
63204
- includeTools: [...config.includeTools ?? []].sort(),
63205
- excludeTools: [...config.excludeTools ?? []].sort()
63206
- });
63207
- return `${connectionIdOf(serverName, config)}|${discovery}`;
62889
+ return `${connectionIdOf(serverName, config)}|${mcpSessionMetadataKey(config)}`;
63208
62890
  }
63209
62891
  /**
63210
62892
  * Purge a server's entries from all three registries (tools + prompts +
@@ -63391,9 +63073,10 @@ var McpClientManager = class _McpClientManager {
63391
63073
  }
63392
63074
  }
63393
63075
  const existingConn = this.pooledConnections.get(name);
63394
- if (existingConn && existingConn.id === newConnId) {
63076
+ if (existingConn && existingConn.transportId === newConnId) {
63077
+ existingConn.updateConfig(config);
63395
63078
  this.cliConfig.addRuntimeMcpServer(name, config);
63396
- const toolCount2 = existingConn.toolsSnapshot.length;
63079
+ const toolCount2 = this.toolRegistry.getToolsByServer(name).length;
63397
63080
  return {
63398
63081
  name,
63399
63082
  transport,
@@ -64393,7 +64076,8 @@ function defaultPoolEntryOptions(transport) {
64393
64076
  __name(defaultPoolEntryOptions, "defaultPoolEntryOptions");
64394
64077
  var PoolEntry = class {
64395
64078
  /**
64396
- * @param id Stable ConnectionId (`name::fingerprint`).
64079
+ * @param id Lifecycle identity. Pooled entries use `name::fingerprint`;
64080
+ * unpooled entries use a unique `name::unpooled-N` value.
64397
64081
  * @param serverName Server name as advertised in `MCPServerConfig`.
64398
64082
  * @param entryIndex Opaque, monotonic-within-name-group index for
64399
64083
  * status-route exposure. Stable across reconnect / drain
@@ -64422,6 +64106,7 @@ var PoolEntry = class {
64422
64106
  this.opts = opts;
64423
64107
  this.onClosed = onClosed;
64424
64108
  this.aggregateStatusByName = aggregateStatusByName;
64109
+ this.transportId = connectionIdOf(serverName, cfg);
64425
64110
  this.emitter.setMaxListeners(0);
64426
64111
  this.statusChangeListener = (name, status) => {
64427
64112
  if (name !== this.serverName) return;
@@ -64534,6 +64219,8 @@ var PoolEntry = class {
64534
64219
  * us. Skip those echoes (we already know our localStatus).
64535
64220
  */
64536
64221
  suppressNextStatusEcho = false;
64222
+ /** Transport identity captured at spawn, separate from unpooled lifecycle id. */
64223
+ transportId;
64537
64224
  get generation() {
64538
64225
  return this._generation;
64539
64226
  }
@@ -64634,6 +64321,30 @@ var PoolEntry = class {
64634
64321
  this.subscriberHandles.set(sessionId, handle);
64635
64322
  return handle;
64636
64323
  }
64324
+ /**
64325
+ * Refresh one attached session's metadata without reconnecting the shared
64326
+ * transport. The view owns filtering and per-session tool decoration; the
64327
+ * entry remains the single source of truth for discovery snapshots.
64328
+ */
64329
+ updateSessionConfig(sessionId, cfg) {
64330
+ if (this.isTerminated()) {
64331
+ throw new Error(
64332
+ `Cannot update config on PoolEntry ${this.id} in state ${this.state}`
64333
+ );
64334
+ }
64335
+ const view = this.subscribers.get(sessionId);
64336
+ if (!view) {
64337
+ throw new Error(
64338
+ `Cannot update config for detached session ${sessionId} on PoolEntry ${this.id}`
64339
+ );
64340
+ }
64341
+ if (!view.updateConfig(cfg)) return;
64342
+ if (this.state === "active") {
64343
+ view.applyTools(this.toolsSnapshot);
64344
+ view.applyPrompts(this.promptsSnapshot);
64345
+ view.applyResources(this.resourcesSnapshot);
64346
+ }
64347
+ }
64637
64348
  /**
64638
64349
  * Detach a session subscriber. Tears down the subscriber's
64639
64350
  * registrations via `view.teardown()` and removes the ref.
@@ -64991,6 +64702,9 @@ var PooledConnectionImpl = class {
64991
64702
  get id() {
64992
64703
  return this.entry.id;
64993
64704
  }
64705
+ get transportId() {
64706
+ return this.entry.transportId;
64707
+ }
64994
64708
  get serverName() {
64995
64709
  return this.entry.serverName;
64996
64710
  }
@@ -65009,6 +64723,14 @@ var PooledConnectionImpl = class {
65009
64723
  get resourcesSnapshot() {
65010
64724
  return this.entry.resourcesSnapshot;
65011
64725
  }
64726
+ updateConfig(cfg) {
64727
+ if (this.released) {
64728
+ throw new Error(
64729
+ `Cannot update config on released MCP connection ${this.id}`
64730
+ );
64731
+ }
64732
+ this.entry.updateSessionConfig(this.sessionId, cfg);
64733
+ }
65012
64734
  on(event, listener) {
65013
64735
  if (event !== "event") return this;
65014
64736
  if (this.listeners.has(listener)) return this;
@@ -65038,11 +64760,9 @@ init_esbuild_shims();
65038
64760
  var debugLogger43 = createDebugLogger("McpPool:View");
65039
64761
  function compileNameFilter(includeTools, excludeTools) {
65040
64762
  return {
65041
- excludeSet: excludeTools ? new Set(excludeTools) : void 0,
65042
- includeSet: includeTools ? new Set(
65043
- includeTools.map(
65044
- (entry) => entry.includes("(") ? entry.slice(0, entry.indexOf("(")) : entry
65045
- )
64763
+ excludeSet: excludeTools ? new Set(coerceMcpFilterEntries(excludeTools)) : void 0,
64764
+ includeSet: includeTools != null ? new Set(
64765
+ coerceMcpFilterEntries(includeTools).map(normalizeMcpIncludeEntry)
65046
64766
  ) : void 0
65047
64767
  };
65048
64768
  }
@@ -65057,16 +64777,18 @@ var SessionMcpView = class {
65057
64777
  /**
65058
64778
  * @param sessionToolRegistry The session-owned ToolRegistry; receives
65059
64779
  * filtered + trust-decorated `DiscoveredMCPTool` instances.
65060
- * @param sessionPromptRegistry The session-owned PromptRegistry;
65061
- * receives the unfiltered prompt snapshot (prompts have no
65062
- * per-session filter today — pool fans out the full set).
64780
+ * @param sessionPromptRegistry The session-owned PromptRegistry; receives
64781
+ * prompts selected by the same name filter as tools.
64782
+ * @param sessionResourceRegistry The session-owned ResourceRegistry;
64783
+ * receives the full resource snapshot because tool-name filters do not
64784
+ * apply to resource URIs.
65063
64785
  * @param sessionId Stamped onto debug logs for cross-session
65064
64786
  * correlation; not used for routing (pool's reverse index handles that).
65065
64787
  * @param serverName Server name as advertised in the per-session
65066
64788
  * merged mcpServers map; used as the key into the registries'
65067
64789
  * `removeMcpToolsByServer` / `removePromptsByServer` cleanup paths.
65068
64790
  * @param cfg The session's view of this server's config, source of
65069
- * `includeTools` / `excludeTools` / `trust`.
64791
+ * `includeTools` / `excludeTools` / `trust` / `alwaysLoadTools`.
65070
64792
  */
65071
64793
  constructor(sessionToolRegistry, sessionPromptRegistry, sessionResourceRegistry, sessionId, serverName, cfg) {
65072
64794
  this.sessionToolRegistry = sessionToolRegistry;
@@ -65075,10 +64797,12 @@ var SessionMcpView = class {
65075
64797
  this.sessionId = sessionId;
65076
64798
  this.serverName = serverName;
65077
64799
  this.cfg = cfg;
64800
+ this.metadataKey = mcpSessionMetadataKey(cfg);
65078
64801
  }
65079
64802
  static {
65080
64803
  __name(this, "SessionMcpView");
65081
64804
  }
64805
+ metadataKey;
65082
64806
  /**
65083
64807
  * Replace this session's registered tools for `serverName` with a
65084
64808
  * filtered+decorated copy of `snapshot`. Idempotent: re-apply on
@@ -65096,7 +64820,10 @@ var SessionMcpView = class {
65096
64820
  if (!compiledFilterAccepts(filter3, tool.serverToolName)) {
65097
64821
  continue;
65098
64822
  }
65099
- const sessionTool = tool.withTrust(this.cfg.trust);
64823
+ const sessionTool = tool.withSessionConfig(
64824
+ this.cfg.trust,
64825
+ this.cfg.alwaysLoadTools === true
64826
+ );
65100
64827
  try {
65101
64828
  this.sessionToolRegistry.registerTool(sessionTool);
65102
64829
  registered += 1;
@@ -65205,14 +64932,17 @@ var SessionMcpView = class {
65205
64932
  * `/mcp` tweaks `includeTools` at runtime). Re-apply uses the new
65206
64933
  * filter against the most recent snapshot.
65207
64934
  *
65208
- * The caller (typically the `PoolEntry.attach` path or
65209
- * `pool.notifyConfigChanged`) is responsible for invoking
65210
- * `applyTools` / `applyPrompts` with the current snapshot after
65211
- * this update — `SessionMcpView` doesn't cache snapshots itself
65212
- * (single-source-of-truth is the pool entry).
64935
+ * The caller is responsible for invoking `applyTools` / `applyPrompts` /
64936
+ * `applyResources` with the current snapshots when this method returns true.
64937
+ * The captured key also detects callers that mutate and resubmit the same
64938
+ * config object.
65213
64939
  */
65214
64940
  updateConfig(cfg) {
64941
+ const nextKey = mcpSessionMetadataKey(cfg);
64942
+ const changed = this.metadataKey !== nextKey;
65215
64943
  this.cfg = cfg;
64944
+ this.metadataKey = nextKey;
64945
+ return changed;
65216
64946
  }
65217
64947
  /**
65218
64948
  * Tear down this view's registrations. Called on:
@@ -76023,7 +75753,7 @@ var TOKEN_PLAN_MODELS = [
76023
75753
  enableThinking: true
76024
75754
  },
76025
75755
  { id: "deepseek-v4-pro", contextWindowSize: 1e6 },
76026
- { id: "deepseek-v4-flash", contextWindowSize: 1e6 },
75756
+ { id: "deepseek-v4-flash-0731", contextWindowSize: 1e6 },
76027
75757
  { id: "deepseek-v3.2", contextWindowSize: 131072 },
76028
75758
  {
76029
75759
  id: "kimi-k2.7-code",
@@ -79102,7 +78832,7 @@ ${body}`;
79102
78832
  const out = [];
79103
78833
  for (const rec of records) {
79104
78834
  if (rec.type === "user") {
79105
- const text = this.visibleText(rec.message);
78835
+ const text = this.visibleUserText(rec);
79106
78836
  if (text) out.push(`User: ${text}`);
79107
78837
  } else if (rec.type === "assistant") {
79108
78838
  const text = this.visibleText(rec.message);
@@ -79117,8 +78847,17 @@ ${body}`;
79117
78847
  return out;
79118
78848
  }
79119
78849
  visibleText(message) {
79120
- if (!message?.parts) return "";
79121
- return message.parts.filter((p2) => !p2.thought && p2.text).map((p2) => p2.text).join("").trim();
78850
+ return this.visibleTextParts(message?.parts ?? []);
78851
+ }
78852
+ visibleUserText(record2) {
78853
+ const projection = projectUserTranscriptForDisplay(record2);
78854
+ if (projection.displayText !== void 0) {
78855
+ return projection.displayText.trim();
78856
+ }
78857
+ return this.visibleTextParts(projection.parts);
78858
+ }
78859
+ visibleTextParts(parts) {
78860
+ return parts.filter((p2) => !p2.thought && p2.text).map((p2) => p2.text).join("").trim();
79122
78861
  }
79123
78862
  static TITLE_MAX_LENGTH = 80;
79124
78863
  deriveTitle(records) {
@@ -79132,7 +78871,7 @@ ${body}`;
79132
78871
  if (customTitle) return customTitle;
79133
78872
  for (const rec of records) {
79134
78873
  if (rec.type !== "user") continue;
79135
- const text = this.visibleText(rec.message);
78874
+ const text = this.visibleUserText(rec);
79136
78875
  if (!text) continue;
79137
78876
  const firstLine = text.split("\n")[0].trim();
79138
78877
  if (firstLine.length === 0) continue;
@@ -82719,6 +82458,14 @@ var BackgroundShellRegistry = class {
82719
82458
  init_esbuild_shims();
82720
82459
  var debugLogger61 = createDebugLogger("WORKFLOW_REGISTRY");
82721
82460
  var MAX_RETAINED_TERMINAL_WORKFLOWS = 10;
82461
+ function isActiveWorkflowStatus(status) {
82462
+ return status === "running" || status === "pausing" || status === "paused";
82463
+ }
82464
+ __name(isActiveWorkflowStatus, "isActiveWorkflowStatus");
82465
+ function isTerminalWorkflowStatus(status) {
82466
+ return status === "completed" || status === "failed" || status === "cancelled";
82467
+ }
82468
+ __name(isTerminalWorkflowStatus, "isTerminalWorkflowStatus");
82722
82469
  var MAX_PENDING_WORKFLOW_APPROVALS = 32;
82723
82470
  var MAX_WORKFLOW_APPROVAL_DISPLAY_CHARS = 64 * 1024;
82724
82471
  var WorkflowRunRegistry = class {
@@ -82832,7 +82579,7 @@ var WorkflowRunRegistry = class {
82832
82579
  */
82833
82580
  register(registration) {
82834
82581
  const existing = this.entries.get(registration.runId);
82835
- if (existing?.status === "running" || this.handles.has(registration.runId)) {
82582
+ if (existing && isActiveWorkflowStatus(existing.status) || this.handles.has(registration.runId)) {
82836
82583
  throw new Error(`Workflow run ${registration.runId} is already active.`);
82837
82584
  }
82838
82585
  const entry = registration;
@@ -82870,10 +82617,34 @@ var WorkflowRunRegistry = class {
82870
82617
  return entry;
82871
82618
  }
82872
82619
  attachHandle(handle) {
82873
- if (this.entries.get(handle.runId)?.status === "running") {
82620
+ const status = this.entries.get(handle.runId)?.status;
82621
+ if (status && isActiveWorkflowStatus(status)) {
82874
82622
  this.handles.set(handle.runId, handle);
82875
82623
  }
82876
82624
  }
82625
+ pause(runId) {
82626
+ const entry = this.entries.get(runId);
82627
+ const handle = this.handles.get(runId);
82628
+ if (!entry?.isBackgrounded || entry.status !== "running" || !handle) {
82629
+ return false;
82630
+ }
82631
+ return handle.pause();
82632
+ }
82633
+ resume(runId) {
82634
+ const entry = this.entries.get(runId);
82635
+ const handle = this.handles.get(runId);
82636
+ if (!entry || entry.status !== "paused" || !handle) return false;
82637
+ return handle.resume();
82638
+ }
82639
+ onDispatchStateChange(runId, state) {
82640
+ const entry = this.entries.get(runId);
82641
+ if (!entry || isTerminalWorkflowStatus(entry.status)) return;
82642
+ if (state === "pausing" && entry.status !== "running") return;
82643
+ if (state === "paused" && entry.status !== "pausing") return;
82644
+ if (state === "running" && entry.status !== "paused") return;
82645
+ entry.status = state;
82646
+ this.emitStatusChange(entry);
82647
+ }
82877
82648
  getHandle(runId) {
82878
82649
  return this.handles.get(runId);
82879
82650
  }
@@ -82969,9 +82740,9 @@ var WorkflowRunRegistry = class {
82969
82740
  }
82970
82741
  parkPendingApproval(runId, event) {
82971
82742
  const entry = this.entries.get(runId);
82972
- if (!entry || entry.status !== "running" || !this.approvalChangeCallback && !this.approvalRequestCallback) {
82743
+ if (!entry || !isActiveWorkflowStatus(entry.status) || !this.approvalChangeCallback && !this.approvalRequestCallback) {
82973
82744
  debugLogger61.warn(
82974
- `Workflow approval rejected for ${runId}/${event.callId}: entry missing, not running, or no host channel`
82745
+ `Workflow approval rejected for ${runId}/${event.callId}: entry missing, not active, or no host channel`
82975
82746
  );
82976
82747
  return "rejected";
82977
82748
  }
@@ -83052,7 +82823,7 @@ var WorkflowRunRegistry = class {
83052
82823
  */
83053
82824
  onPhaseStarted(runId, title) {
83054
82825
  const entry = this.entries.get(runId);
83055
- if (!entry || entry.status !== "running") return;
82826
+ if (!entry || !isActiveWorkflowStatus(entry.status)) return;
83056
82827
  entry.currentPhase = title;
83057
82828
  const last = entry.phases[entry.phases.length - 1];
83058
82829
  if (last !== title) entry.phases.push(title);
@@ -83061,14 +82832,14 @@ var WorkflowRunRegistry = class {
83061
82832
  /** Cumulative dispatch counter — incremented before each `agent()` call resolves. */
83062
82833
  onAgentDispatched(runId) {
83063
82834
  const entry = this.entries.get(runId);
83064
- if (!entry || entry.status !== "running") return;
82835
+ if (!entry || !isActiveWorkflowStatus(entry.status)) return;
83065
82836
  entry.agentsDispatched++;
83066
82837
  this.emitStatusChange(entry);
83067
82838
  }
83068
82839
  /** Cumulative completion counter — incremented after each `agent()` call settles. */
83069
82840
  onAgentCompleted(runId) {
83070
82841
  const entry = this.entries.get(runId);
83071
- if (!entry || entry.status !== "running") return;
82842
+ if (!entry || entry.agentsCompleted >= entry.agentsDispatched) return;
83072
82843
  entry.agentsCompleted++;
83073
82844
  this.emitStatusChange(entry);
83074
82845
  }
@@ -83084,7 +82855,7 @@ var WorkflowRunRegistry = class {
83084
82855
  */
83085
82856
  onBudgetUpdated(runId, spent, total) {
83086
82857
  const entry = this.entries.get(runId);
83087
- if (!entry || entry.status !== "running") return;
82858
+ if (!entry) return;
83088
82859
  const delta = spent - entry.tokensSpent;
83089
82860
  const totalChanged = entry.tokenBudgetTotal !== total;
83090
82861
  if (delta <= 0 && !totalChanged) return;
@@ -83114,14 +82885,15 @@ var WorkflowRunRegistry = class {
83114
82885
  setRecentLogs(runId, logs) {
83115
82886
  const entry = this.entries.get(runId);
83116
82887
  if (!entry) return;
83117
- if (entry.status !== "running" && entry.status !== "cancelled") return;
82888
+ if (!isActiveWorkflowStatus(entry.status) && entry.status !== "cancelled")
82889
+ return;
83118
82890
  const tail = logs.length > 100 ? logs.slice(-100) : Array.from(logs);
83119
82891
  entry.recentLogs = tail;
83120
82892
  this.emitStatusChange(entry);
83121
82893
  }
83122
82894
  complete(runId, result, endTime) {
83123
82895
  const entry = this.entries.get(runId);
83124
- if (!entry || entry.status !== "running") return;
82896
+ if (!entry || !isActiveWorkflowStatus(entry.status)) return;
83125
82897
  this.rejectPendingApprovals(runId);
83126
82898
  entry.status = "completed";
83127
82899
  entry.endTime = endTime;
@@ -83134,7 +82906,7 @@ var WorkflowRunRegistry = class {
83134
82906
  }
83135
82907
  fail(runId, message, endTime) {
83136
82908
  const entry = this.entries.get(runId);
83137
- if (!entry || entry.status !== "running") return;
82909
+ if (!entry || !isActiveWorkflowStatus(entry.status)) return;
83138
82910
  this.rejectPendingApprovals(runId);
83139
82911
  entry.status = "failed";
83140
82912
  entry.endTime = endTime;
@@ -83146,13 +82918,13 @@ var WorkflowRunRegistry = class {
83146
82918
  this.evictTerminal();
83147
82919
  }
83148
82920
  /**
83149
- * Mark a running entry as cancelled and abort its controller. No-op
82921
+ * Mark an active entry as cancelled and abort its controller. No-op
83150
82922
  * if the entry has already settled — protects against an explicit
83151
82923
  * dialog cancel racing with the natural complete/fail path.
83152
82924
  */
83153
82925
  cancel(runId, endTime) {
83154
82926
  const entry = this.entries.get(runId);
83155
- if (!entry || entry.status !== "running") return;
82927
+ if (!entry || !isActiveWorkflowStatus(entry.status)) return;
83156
82928
  this.rejectPendingApprovals(runId);
83157
82929
  entry.status = "cancelled";
83158
82930
  entry.endTime = endTime;
@@ -83168,21 +82940,33 @@ var WorkflowRunRegistry = class {
83168
82940
  get(runId) {
83169
82941
  return this.entries.get(runId);
83170
82942
  }
83171
- /** All entries (running + terminal, no filter). Iteration order = registration order. */
82943
+ /** All entries (active + terminal, no filter). Iteration order = registration order. */
83172
82944
  list() {
83173
82945
  return Array.from(this.entries.values());
83174
82946
  }
83175
82947
  /**
83176
- * R7 (wenshao): true if any entry is still `'running'`. Mirrors the
83177
- * three sibling registries' `hasUnfinalizedTasks()` /
82948
+ * R7 (wenshao): true if any entry is still actively executing.
82949
+ * Mirrors the three sibling registries' `hasUnfinalizedTasks()` /
83178
82950
  * `hasRunningEntries()` / `getRunning().length > 0` so the unified
83179
82951
  * `hasBlockingBackgroundWork()` helper (the gate `/clear` and session-
83180
82952
  * resume both use to refuse a switch with live work) can count
83181
82953
  * workflow runs the same way.
82954
+ *
82955
+ * R12 (doudouOUC): `paused` deliberately does NOT count. A paused run
82956
+ * has drained its dispatches and executes nothing, and its wall-clock
82957
+ * watchdog is suspended — if it blocked the switch, a paused-and-
82958
+ * forgotten run would block `/clear` and session switching forever
82959
+ * with no backstop to release it. Mirrors the sibling
82960
+ * `BackgroundTaskRegistry.hasRunningTasks()`, which also counts only
82961
+ * `running` (a paused background agent does not block a switch).
82962
+ * Session-switch teardown cancels paused runs via `abortAll()` before
82963
+ * `reset()` so they settle terminal instead of leaking.
83182
82964
  */
83183
82965
  hasRunningEntries() {
83184
82966
  for (const entry of this.entries.values()) {
83185
- if (entry.status === "running") return true;
82967
+ if (entry.status === "running" || entry.status === "pausing") {
82968
+ return true;
82969
+ }
83186
82970
  }
83187
82971
  return false;
83188
82972
  }
@@ -83190,7 +82974,7 @@ var WorkflowRunRegistry = class {
83190
82974
  * R7 (wenshao): drop every in-memory entry without touching
83191
82975
  * controllers. Mirrors `BackgroundShellRegistry.reset()` and the
83192
82976
  * other siblings' contract — callers (`/clear`, session-resume)
83193
- * MUST verify via `hasRunningEntries()` first that no still-running
82977
+ * MUST verify via `hasRunningEntries()` first that no active
83194
82978
  * work exists before invoking. The companion path that aborts
83195
82979
  * controllers is `abortAll()`.
83196
82980
  */
@@ -83210,7 +82994,7 @@ var WorkflowRunRegistry = class {
83210
82994
  if (sample) this.emitStatusChange(sample);
83211
82995
  }
83212
82996
  /**
83213
- * R7 (wenshao): cancel every still-running entry. Called on session/
82997
+ * R7 (wenshao): cancel every active entry. Called on session/
83214
82998
  * Config shutdown so workflow runs don't outlive the CLI process and
83215
82999
  * leak orphaned dispatches. Symmetric with `BackgroundShellRegistry.
83216
83000
  * abortAll()` and `BackgroundTaskRegistry.abortAll()`.
@@ -83218,13 +83002,13 @@ var WorkflowRunRegistry = class {
83218
83002
  * Settles each entry inline (status → 'cancelled', abort the
83219
83003
  * controller) and fires the status-change callback exactly once
83220
83004
  * after the loop — the per-entry `cancel()` path would have fired
83221
- * the callback for every running entry, wasteful on shutdown.
83005
+ * the callback for every active entry, wasteful on shutdown.
83222
83006
  */
83223
83007
  abortAll() {
83224
83008
  const endTime = Date.now();
83225
83009
  let lastCancelled;
83226
83010
  for (const entry of Array.from(this.entries.values())) {
83227
- if (entry.status !== "running") continue;
83011
+ if (!isActiveWorkflowStatus(entry.status)) continue;
83228
83012
  this.rejectPendingApprovals(entry.runId);
83229
83013
  entry.status = "cancelled";
83230
83014
  entry.endTime = endTime;
@@ -83244,11 +83028,13 @@ var WorkflowRunRegistry = class {
83244
83028
  }
83245
83029
  /**
83246
83030
  * Sweep terminal entries when they exceed `MAX_RETAINED_TERMINAL_WORKFLOWS`.
83247
- * Running entries are always retained. Oldest terminal entries
83031
+ * Active entries are always retained. Oldest terminal entries
83248
83032
  * (by `endTime`) are evicted first.
83249
83033
  */
83250
83034
  evictTerminal() {
83251
- const terminal = this.list().filter((e) => e.status !== "running");
83035
+ const terminal = this.list().filter(
83036
+ (e) => isTerminalWorkflowStatus(e.status)
83037
+ );
83252
83038
  if (terminal.length <= MAX_RETAINED_TERMINAL_WORKFLOWS) return;
83253
83039
  terminal.sort((a, b2) => (a.endTime ?? 0) - (b2.endTime ?? 0));
83254
83040
  const toEvict = terminal.slice(
@@ -83376,6 +83162,9 @@ import { promises as fs33 } from "node:fs";
83376
83162
  var debugLogger62 = createDebugLogger("WORKFLOW_SNAPSHOT");
83377
83163
  var MAX_RETAINED_SNAPSHOTS = 30;
83378
83164
  function toSnapshot(task) {
83165
+ if (!isTerminalWorkflowStatus(task.status)) {
83166
+ throw new Error(`Cannot snapshot active workflow ${task.runId}.`);
83167
+ }
83379
83168
  return {
83380
83169
  runId: task.runId,
83381
83170
  meta: task.meta,
@@ -83410,9 +83199,9 @@ async function writeWorkflowSnapshot(config, task) {
83410
83199
  const storage = config.storage;
83411
83200
  if (!storage) return;
83412
83201
  try {
83202
+ const snapshot = toSnapshot(task);
83413
83203
  const dir = storage.getWorkflowRunsDir();
83414
83204
  await fs33.mkdir(dir, { recursive: true });
83415
- const snapshot = toSnapshot(task);
83416
83205
  await fs33.writeFile(
83417
83206
  storage.getWorkflowRunSnapshotPath(task.runId),
83418
83207
  JSON.stringify(snapshot, null, 2),
@@ -89286,7 +89075,7 @@ var LspResponseNormalizer = class {
89286
89075
  /**
89287
89076
  * Convert diagnostic back to LSP format for requests
89288
89077
  */
89289
- denormalizeDiagnostic(diagnostic2) {
89078
+ denormalizeDiagnostic(diagnostic) {
89290
89079
  const severityMap = {
89291
89080
  error: 1,
89292
89081
  warning: 2,
@@ -89294,11 +89083,11 @@ var LspResponseNormalizer = class {
89294
89083
  hint: 4
89295
89084
  };
89296
89085
  return {
89297
- range: diagnostic2.range,
89298
- message: diagnostic2.message,
89299
- severity: diagnostic2.severity ? severityMap[diagnostic2.severity] : void 0,
89300
- code: diagnostic2.code,
89301
- source: diagnostic2.source
89086
+ range: diagnostic.range,
89087
+ message: diagnostic.message,
89088
+ severity: diagnostic.severity ? severityMap[diagnostic.severity] : void 0,
89089
+ code: diagnostic.code,
89090
+ source: diagnostic.source
89302
89091
  };
89303
89092
  }
89304
89093
  /**
@@ -95609,11 +95398,9 @@ import * as os16 from "node:os";
95609
95398
  init_esbuild_shims();
95610
95399
  var REDACTED_URL_CREDENTIAL = "***REDACTED***";
95611
95400
  var URL_CREDENTIALS_PATTERN = /\b([a-z][a-z0-9+.-]*:\/\/)(?:[^/\s]+@)+/gi;
95401
+ var UPLOAD_IDENTITY_PATTERN = /\bupload:v1:[0-9a-fA-F-]+:/gu;
95612
95402
  function redactUrlCredentials(source) {
95613
- return source.replace(
95614
- URL_CREDENTIALS_PATTERN,
95615
- `$1${REDACTED_URL_CREDENTIAL}@`
95616
- );
95403
+ return source.replace(UPLOAD_IDENTITY_PATTERN, "upload:").replace(URL_CREDENTIALS_PATTERN, `$1${REDACTED_URL_CREDENTIAL}@`);
95617
95404
  }
95618
95405
  __name(redactUrlCredentials, "redactUrlCredentials");
95619
95406
 
@@ -97552,6 +97339,9 @@ async function checkForExtensionUpdate(extension, extensionManager, signal) {
97552
97339
  signal?.throwIfAborted();
97553
97340
  const installMetadata = extension.installMetadata;
97554
97341
  if (installMetadata?.type === "local") {
97342
+ if (installMetadata.source.startsWith("upload:")) {
97343
+ return "not updatable" /* NOT_UPDATABLE */;
97344
+ }
97555
97345
  let latestConfig;
97556
97346
  let tempDir;
97557
97347
  let convertedDir;
@@ -103813,7 +103603,8 @@ var ExtensionManager = class _ExtensionManager {
103813
103603
  options2.initialActivation,
103814
103604
  options2.signal,
103815
103605
  true,
103816
- false
103606
+ false,
103607
+ options2.localSourcePath
103817
103608
  );
103818
103609
  }
103819
103610
  async prepareExtensionUpdateFromState(extension, signal) {
@@ -103862,7 +103653,10 @@ var ExtensionManager = class _ExtensionManager {
103862
103653
  )
103863
103654
  };
103864
103655
  }
103865
- async installExtensionInternal(installMetadata, requestConsent, requestSetting, cwd, previousExtensionConfig, initialActivation, signal, prepareOnly, emitMutation) {
103656
+ async installExtensionInternal(installMetadata, requestConsent, requestSetting, cwd, previousExtensionConfig, initialActivation, signal, prepareOnly, emitMutation, localSourcePathOverride) {
103657
+ if (localSourcePathOverride && installMetadata.type !== "local") {
103658
+ throw new Error("A local source path requires a local install.");
103659
+ }
103866
103660
  installMetadata = this.withNetworkPolicy(installMetadata);
103867
103661
  const currentDir = cwd ?? this.workspaceDir;
103868
103662
  const telemetryConfig = getTelemetryConfig(
@@ -103889,7 +103683,7 @@ var ExtensionManager = class _ExtensionManager {
103889
103683
  }
103890
103684
  const extensionsDir = this.configDir;
103891
103685
  await fs66.promises.mkdir(extensionsDir, { recursive: true });
103892
- if (!path67.isAbsolute(installMetadata.source) && (installMetadata.type === "local" || installMetadata.type === "link")) {
103686
+ if (!localSourcePathOverride && !path67.isAbsolute(installMetadata.source) && (installMetadata.type === "local" || installMetadata.type === "link")) {
103893
103687
  installMetadata.source = path67.resolve(
103894
103688
  currentDir,
103895
103689
  installMetadata.source
@@ -103936,12 +103730,18 @@ var ExtensionManager = class _ExtensionManager {
103936
103730
  );
103937
103731
  installMetadata.releaseTag = result.version;
103938
103732
  localSourcePath = tempDir;
103939
- } else if (installMetadata.type === "local" && isSupportedArchivePath(installMetadata.source)) {
103733
+ } else if (installMetadata.type === "local" && isSupportedArchivePath(
103734
+ localSourcePathOverride ?? installMetadata.source
103735
+ )) {
103940
103736
  tempDir = await ExtensionStorage.createTmpDir();
103941
- await extractArchiveFile(installMetadata.source, tempDir, signal);
103737
+ await extractArchiveFile(
103738
+ localSourcePathOverride ?? installMetadata.source,
103739
+ tempDir,
103740
+ signal
103741
+ );
103942
103742
  localSourcePath = tempDir;
103943
103743
  } else if (installMetadata.type === "local" || installMetadata.type === "link") {
103944
- localSourcePath = installMetadata.source;
103744
+ localSourcePath = localSourcePathOverride ?? installMetadata.source;
103945
103745
  } else {
103946
103746
  throw new Error(`Unsupported install type: ${installMetadata.type}`);
103947
103747
  }
@@ -104800,7 +104600,7 @@ var FILE_TYPES = /* @__PURE__ */ new Set([
104800
104600
  var isNormalFlowError = /* @__PURE__ */ __name((error) => NORMAL_FLOW_ERRORS.has(error.code), "isNormalFlowError");
104801
104601
  var wantBigintFsStats = process.platform === "win32";
104802
104602
  var emptyFn = /* @__PURE__ */ __name((_entryInfo) => true, "emptyFn");
104803
- var normalizeFilter = /* @__PURE__ */ __name((filter3) => {
104603
+ var normalizeFilter2 = /* @__PURE__ */ __name((filter3) => {
104804
104604
  if (filter3 === void 0)
104805
104605
  return emptyFn;
104806
104606
  if (typeof filter3 === "function")
@@ -104827,8 +104627,8 @@ var ReaddirpStream = class extends Readable {
104827
104627
  });
104828
104628
  const opts = { ...defaultOptions, ...options2 };
104829
104629
  const { root, type } = opts;
104830
- this._fileFilter = normalizeFilter(opts.fileFilter);
104831
- this._directoryFilter = normalizeFilter(opts.directoryFilter);
104630
+ this._fileFilter = normalizeFilter2(opts.fileFilter);
104631
+ this._directoryFilter = normalizeFilter2(opts.directoryFilter);
104832
104632
  const statMethod = opts.lstat ? lstat7 : stat14;
104833
104633
  if (wantBigintFsStats) {
104834
104634
  this._stat = (path98) => statMethod(path98, { bigint: true });
@@ -112493,6 +112293,29 @@ var BackgroundTaskRegistry = class {
112493
112293
  }
112494
112294
  return false;
112495
112295
  }
112296
+ /**
112297
+ * The agent ids behind `hasUnfinalizedTasks()`, in registration order.
112298
+ *
112299
+ * Callers that must *name* the outstanding work — rather than just know
112300
+ * that some exists — use this. The daemon's active-work snapshot builds
112301
+ * one hold per id so a restart controller and the session-retention path
112302
+ * both see the same set the registry itself would report, with no second
112303
+ * ledger to drift out of sync. Deliberately shares
112304
+ * `hasUnfinalizedTasks()`'s predicate (and not `hasRunningTasks()`'s):
112305
+ * a cancelled entry still owes its terminal task-notification, and
112306
+ * dropping it here would let the daemon reap the session inside the
112307
+ * cancel → finalizeCancelled() window.
112308
+ */
112309
+ listUnfinalizedBackgroundAgentIds() {
112310
+ const ids = [];
112311
+ for (const entry of this.agents.values()) {
112312
+ if (!entry.isBackgrounded) continue;
112313
+ if (entry.status === "running" || entry.status === "cancelled" && !entry.notified) {
112314
+ ids.push(entry.agentId);
112315
+ }
112316
+ }
112317
+ return ids;
112318
+ }
112496
112319
  /**
112497
112320
  * True while any background entry is still actually executing. Unlike
112498
112321
  * `hasUnfinalizedTasks()`, a `cancelled`-but-not-yet-finalized entry
@@ -112656,6 +112479,19 @@ var BackgroundTaskRegistry = class {
112656
112479
  setStatusChangeCallback(cb) {
112657
112480
  this.statusChangeCallback = cb;
112658
112481
  }
112482
+ /**
112483
+ * Retract `cb`, but only if it is still the installed one.
112484
+ *
112485
+ * The slot holds a single callback, so a subscriber that clears it
112486
+ * unconditionally on teardown can unhook whoever claimed it afterwards. This
112487
+ * makes the retraction safe to call from any owner's dispose path without
112488
+ * having to know whether it is still the owner.
112489
+ */
112490
+ clearStatusChangeCallback(cb) {
112491
+ if (this.statusChangeCallback === cb) {
112492
+ this.statusChangeCallback = void 0;
112493
+ }
112494
+ }
112659
112495
  setActivityChangeCallback(cb) {
112660
112496
  this.activityChangeCallback = cb;
112661
112497
  }
@@ -127353,11 +127189,30 @@ function createInstructionsLoadedCallback(getHookSystem) {
127353
127189
  }
127354
127190
  __name(createInstructionsLoadedCallback, "createInstructionsLoadedCallback");
127355
127191
 
127192
+ // packages/core/src/hooks/user-prompt-submit-context.ts
127193
+ init_esbuild_shims();
127194
+
127356
127195
  // packages/core/src/goals/index.ts
127357
127196
  init_esbuild_shims();
127358
127197
 
127359
127198
  // packages/core/src/goals/goal-legacy-projection.ts
127360
127199
  init_esbuild_shims();
127200
+ function isGoalCheckpointBookkeepingTransition(previous, next) {
127201
+ const previousGoal = previous?.goal;
127202
+ const nextGoal = next.goal;
127203
+ if (!previousGoal || !nextGoal) return false;
127204
+ return previousGoal.goalId === nextGoal.goalId && previousGoal.revision === nextGoal.revision && previousGoal.objective === nextGoal.objective && previousGoal.status === nextGoal.status && previousGoal.turnCount === nextGoal.turnCount && previousGoal.createdAt === nextGoal.createdAt && previousGoal.lastReason === nextGoal.lastReason;
127205
+ }
127206
+ __name(isGoalCheckpointBookkeepingTransition, "isGoalCheckpointBookkeepingTransition");
127207
+ function isGoalCheckpointBookkeepingCause(cause, previousCause) {
127208
+ if (cause === "checkpoint") return true;
127209
+ return cause === "verifier_reject" && (previousCause === "verifier_reject" || previousCause === "checkpoint");
127210
+ }
127211
+ __name(isGoalCheckpointBookkeepingCause, "isGoalCheckpointBookkeepingCause");
127212
+ function isGoalCheckpointBookkeepingRecord(input) {
127213
+ return isGoalCheckpointBookkeepingTransition(input.previous, input.next) && isGoalCheckpointBookkeepingCause(input.cause, input.previousCause);
127214
+ }
127215
+ __name(isGoalCheckpointBookkeepingRecord, "isGoalCheckpointBookkeepingRecord");
127361
127216
 
127362
127217
  // packages/core/src/goals/goal-verifier.ts
127363
127218
  init_esbuild_shims();
@@ -143752,7 +143607,8 @@ var GeminiClient = class _GeminiClient {
143752
143607
  strippedRetryEntries = this.stripOrphanedUserEntriesFromHistory() ?? [];
143753
143608
  pushCountAfterStrip = currentPushCount();
143754
143609
  }
143755
- let preInjectionPromptText;
143610
+ const preHookUserPromptText = messageType === "userQuery" /* UserQuery */ ? partToString(request) : void 0;
143611
+ let userPromptRecordPayload;
143756
143612
  let hooksEnabled;
143757
143613
  let messageBus;
143758
143614
  try {
@@ -143763,7 +143619,7 @@ var GeminiClient = class _GeminiClient {
143763
143619
  // hooks must not fire on (or be able to block) internal team
143764
143620
  // coordination traffic.
143765
143621
  messageType !== "teammate" /* Teammate */ && messageType !== "goal" /* Goal */ && hooksEnabled && messageBus && this.config.hasHooksForEvent("UserPromptSubmit")) {
143766
- const promptText = partToString(request);
143622
+ const promptText = preHookUserPromptText ?? partToString(request);
143767
143623
  const submittedPrompt = messageType === "userQuery" /* UserQuery */ && typeof options2?.submittedPrompt === "string" && options2.submittedPrompt.trim().length > 0 ? options2.submittedPrompt : void 0;
143768
143624
  const response = await messageBus.request(
143769
143625
  {
@@ -143813,7 +143669,12 @@ var GeminiClient = class _GeminiClient {
143813
143669
  ...requestArray,
143814
143670
  { text: wrapUserPromptSubmitContext(additionalContext) }
143815
143671
  ];
143816
- preInjectionPromptText = promptText;
143672
+ if (messageType === "userQuery" /* UserQuery */) {
143673
+ userPromptRecordPayload = {
143674
+ displayText: submittedPrompt ?? promptText,
143675
+ hookContext: additionalContext
143676
+ };
143677
+ }
143817
143678
  }
143818
143679
  }
143819
143680
  } catch (error) {
@@ -143915,7 +143776,7 @@ var GeminiClient = class _GeminiClient {
143915
143776
  addUserPromptAttributes(
143916
143777
  this.config,
143917
143778
  interactionSpan,
143918
- preInjectionPromptText ?? partToString(request)
143779
+ preHookUserPromptText ?? partToString(request)
143919
143780
  );
143920
143781
  }
143921
143782
  }
@@ -143943,7 +143804,7 @@ var GeminiClient = class _GeminiClient {
143943
143804
  }
143944
143805
  const promise = this.config.getMemoryManager().recall(
143945
143806
  this.config.getProjectRoot(),
143946
- preInjectionPromptText ?? partToString(request),
143807
+ preHookUserPromptText ?? partToString(request),
143947
143808
  {
143948
143809
  config: this.config,
143949
143810
  excludedFilePaths: this.surfacedRelevantAutoMemoryPaths,
@@ -143995,13 +143856,15 @@ var GeminiClient = class _GeminiClient {
143995
143856
  goalPermit
143996
143857
  );
143997
143858
  } else {
143998
- const recordingService = this.config.getChatRecordingService();
143999
- if (recordingService && preInjectionPromptText !== void 0) {
144000
- recordingService.recordUserMessage(request, goalPermit, {
144001
- displayText: preInjectionPromptText
144002
- });
144003
- } else if (recordingService) {
144004
- recordingService.recordUserMessage(request, goalPermit);
143859
+ const recorder = this.config.getChatRecordingService();
143860
+ if (userPromptRecordPayload) {
143861
+ recorder?.recordUserMessage(
143862
+ request,
143863
+ goalPermit,
143864
+ userPromptRecordPayload
143865
+ );
143866
+ } else {
143867
+ recorder?.recordUserMessage(request, goalPermit);
144005
143868
  }
144006
143869
  }
144007
143870
  }
@@ -150857,7 +150720,8 @@ var Config = class _Config {
150857
150720
  const runtime = createGoalRuntime({
150858
150721
  journal: this.chatRecordingService,
150859
150722
  evidenceSource: this.chatRecordingService,
150860
- verifier: createGoalVerifier(this)
150723
+ verifier: createGoalVerifier(this),
150724
+ checkpointVerifier: createGoalCheckpointVerifier(this)
150861
150725
  });
150862
150726
  this.goalRuntime = runtime;
150863
150727
  if (this.goalTurnHost) {
@@ -151189,7 +151053,7 @@ var Config = class _Config {
151189
151053
  }
151190
151054
  if (!enabled) return;
151191
151055
  registry.registerFactory(ToolNames.IMAGE_GEN, async () => {
151192
- const { ImageGenTool } = await import("./image-gen-OE2EEKN3.js");
151056
+ const { ImageGenTool } = await import("./image-gen-AUIZJJNK.js");
151193
151057
  return new ImageGenTool(this);
151194
151058
  });
151195
151059
  }
@@ -151226,29 +151090,29 @@ var Config = class _Config {
151226
151090
  const registerGoalWorkerTools = /* @__PURE__ */ __name(async () => {
151227
151091
  if (options2?.forSubAgent) return;
151228
151092
  await registerLazy(ToolNames.GET_GOAL, async () => {
151229
- const { GetGoalTool } = await import("./goal-tools-QSYW65HV.js");
151093
+ const { GetGoalTool } = await import("./goal-tools-PXWN5VK3.js");
151230
151094
  return new GetGoalTool(this);
151231
151095
  });
151232
151096
  await registerLazy(ToolNames.UPDATE_GOAL, async () => {
151233
- const { UpdateGoalTool } = await import("./goal-tools-QSYW65HV.js");
151097
+ const { UpdateGoalTool } = await import("./goal-tools-PXWN5VK3.js");
151234
151098
  return new UpdateGoalTool(this);
151235
151099
  });
151236
151100
  }, "registerGoalWorkerTools");
151237
151101
  if (this.getBareMode()) {
151238
151102
  await registerLazy(ToolNames.READ_FILE, async () => {
151239
- const { ReadFileTool } = await import("./read-file-FMTE6LPA.js");
151103
+ const { ReadFileTool } = await import("./read-file-3M6WXDXP.js");
151240
151104
  return new ReadFileTool(this);
151241
151105
  });
151242
151106
  await registerLazy(ToolNames.EDIT, async () => {
151243
- const { EditTool } = await import("./edit-72DP57CD.js");
151107
+ const { EditTool } = await import("./edit-ITMZYFKA.js");
151244
151108
  return new EditTool(this);
151245
151109
  });
151246
151110
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
151247
- const { NotebookEditTool } = await import("./notebook-edit-ZUVK2XWE.js");
151111
+ const { NotebookEditTool } = await import("./notebook-edit-474DPMRL.js");
151248
151112
  return new NotebookEditTool(this);
151249
151113
  });
151250
151114
  await registerLazy(ToolNames.SHELL, async () => {
151251
- const { ShellTool: ShellTool2 } = await import("./shell-3D3PMQHE.js");
151115
+ const { ShellTool: ShellTool2 } = await import("./shell-23OMNMW6.js");
151252
151116
  return new ShellTool2(this);
151253
151117
  });
151254
151118
  await registerGoalWorkerTools();
@@ -151260,7 +151124,7 @@ var Config = class _Config {
151260
151124
  }
151261
151125
  await registerGoalWorkerTools();
151262
151126
  await registerLazy(ToolNames.TOOL_SEARCH, async () => {
151263
- const { ToolSearchTool } = await import("./tool-search-7N4D4O56.js");
151127
+ const { ToolSearchTool } = await import("./tool-search-UJV3A24H.js");
151264
151128
  return new ToolSearchTool(this);
151265
151129
  });
151266
151130
  await registerLazy(ToolNames.READ_MCP_RESOURCE, async () => {
@@ -151268,7 +151132,7 @@ var Config = class _Config {
151268
151132
  return new ReadMcpResourceTool(this);
151269
151133
  });
151270
151134
  await registerLazy(ToolNames.AGENT, async () => {
151271
- const { AgentTool: AgentTool2 } = await import("./agent-DBSC47CD.js");
151135
+ const { AgentTool: AgentTool2 } = await import("./agent-624T2BLO.js");
151272
151136
  return new AgentTool2(this);
151273
151137
  });
151274
151138
  await registerLazy(ToolNames.LIST_AGENTS, async () => {
@@ -151284,7 +151148,7 @@ var Config = class _Config {
151284
151148
  return new SendMessageTool(this);
151285
151149
  });
151286
151150
  await registerLazy(ToolNames.SKILL, async () => {
151287
- const { SkillTool } = await import("./skill-TSEYMVQ2.js");
151151
+ const { SkillTool } = await import("./skill-6HBDYZRS.js");
151288
151152
  return new SkillTool(this);
151289
151153
  });
151290
151154
  await registerLazy(ToolNames.LS, async () => {
@@ -151292,11 +151156,11 @@ var Config = class _Config {
151292
151156
  return new LSTool(this);
151293
151157
  });
151294
151158
  await registerLazy(ToolNames.READ_FILE, async () => {
151295
- const { ReadFileTool } = await import("./read-file-FMTE6LPA.js");
151159
+ const { ReadFileTool } = await import("./read-file-3M6WXDXP.js");
151296
151160
  return new ReadFileTool(this);
151297
151161
  });
151298
151162
  await registerLazy(ToolNames.ZOOM_IMAGE, async () => {
151299
- const { ZoomImageTool } = await import("./zoom-image-DPR22XWY.js");
151163
+ const { ZoomImageTool } = await import("./zoom-image-E7D72GYV.js");
151300
151164
  return new ZoomImageTool(this);
151301
151165
  });
151302
151166
  if (this.getUseRipgrep()) {
@@ -151311,7 +151175,7 @@ var Config = class _Config {
151311
151175
  recordStartupEvent("config_initialize_ripgrep_probe_end");
151312
151176
  if (useRipgrep) {
151313
151177
  await registerLazy(ToolNames.GREP, async () => {
151314
- const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-DUIYUZGM.js");
151178
+ const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-PLPENT3E.js");
151315
151179
  return new RipGrepTool2(this);
151316
151180
  });
151317
151181
  } else {
@@ -151324,7 +151188,7 @@ var Config = class _Config {
151324
151188
  )
151325
151189
  );
151326
151190
  await registerLazy(ToolNames.GREP, async () => {
151327
- const { GrepTool } = await import("./grep-56MTW67B.js");
151191
+ const { GrepTool } = await import("./grep-6ZFC7RJ5.js");
151328
151192
  return new GrepTool(this);
151329
151193
  });
151330
151194
  }
@@ -151332,28 +151196,28 @@ var Config = class _Config {
151332
151196
  recordStartupEvent("config_initialize_ripgrep_probe_start");
151333
151197
  recordStartupEvent("config_initialize_ripgrep_probe_end");
151334
151198
  await registerLazy(ToolNames.GREP, async () => {
151335
- const { GrepTool } = await import("./grep-56MTW67B.js");
151199
+ const { GrepTool } = await import("./grep-6ZFC7RJ5.js");
151336
151200
  return new GrepTool(this);
151337
151201
  });
151338
151202
  }
151339
151203
  await registerLazy(ToolNames.GLOB, async () => {
151340
- const { GlobTool } = await import("./glob-QNRIUOS6.js");
151204
+ const { GlobTool } = await import("./glob-7KZG44BR.js");
151341
151205
  return new GlobTool(this);
151342
151206
  });
151343
151207
  await registerLazy(ToolNames.EDIT, async () => {
151344
- const { EditTool } = await import("./edit-72DP57CD.js");
151208
+ const { EditTool } = await import("./edit-ITMZYFKA.js");
151345
151209
  return new EditTool(this);
151346
151210
  });
151347
151211
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
151348
- const { NotebookEditTool } = await import("./notebook-edit-ZUVK2XWE.js");
151212
+ const { NotebookEditTool } = await import("./notebook-edit-474DPMRL.js");
151349
151213
  return new NotebookEditTool(this);
151350
151214
  });
151351
151215
  await registerLazy(ToolNames.WRITE_FILE, async () => {
151352
- const { WriteFileTool: WriteFileTool2 } = await import("./write-file-2F76RRFE.js");
151216
+ const { WriteFileTool: WriteFileTool2 } = await import("./write-file-CGS57TS4.js");
151353
151217
  return new WriteFileTool2(this);
151354
151218
  });
151355
151219
  await registerLazy(ToolNames.SHELL, async () => {
151356
- const { ShellTool: ShellTool2 } = await import("./shell-3D3PMQHE.js");
151220
+ const { ShellTool: ShellTool2 } = await import("./shell-23OMNMW6.js");
151357
151221
  return new ShellTool2(this);
151358
151222
  });
151359
151223
  await registerLazy(ToolNames.TODO_WRITE, async () => {
@@ -151369,26 +151233,26 @@ var Config = class _Config {
151369
151233
  }
151370
151234
  if (!this.sdkMode && (supportsUserInteraction || options2?.forSubAgent)) {
151371
151235
  await registerLazy(ToolNames.EXIT_PLAN_MODE, async () => {
151372
- const { ExitPlanModeTool: ExitPlanModeTool2 } = await import("./exitPlanMode-4Q7BSQXR.js");
151236
+ const { ExitPlanModeTool: ExitPlanModeTool2 } = await import("./exitPlanMode-ZLI5F7KR.js");
151373
151237
  return new ExitPlanModeTool2(this);
151374
151238
  });
151375
151239
  }
151376
151240
  if (!this.sdkMode && supportsUserInteraction) {
151377
151241
  await registerLazy(ToolNames.ENTER_PLAN_MODE, async () => {
151378
- const { EnterPlanModeTool } = await import("./enterPlanMode-TQBWGCPL.js");
151242
+ const { EnterPlanModeTool } = await import("./enterPlanMode-YV52NNJT.js");
151379
151243
  return new EnterPlanModeTool(this);
151380
151244
  });
151381
151245
  }
151382
151246
  await registerLazy(ToolNames.ENTER_WORKTREE, async () => {
151383
- const { EnterWorktreeTool } = await import("./enter-worktree-B4FY2ZPP.js");
151247
+ const { EnterWorktreeTool } = await import("./enter-worktree-S4PL5UV6.js");
151384
151248
  return new EnterWorktreeTool(this);
151385
151249
  });
151386
151250
  await registerLazy(ToolNames.EXIT_WORKTREE, async () => {
151387
- const { ExitWorktreeTool } = await import("./exit-worktree-EYUD4YP2.js");
151251
+ const { ExitWorktreeTool } = await import("./exit-worktree-XRM6LH5F.js");
151388
151252
  return new ExitWorktreeTool(this);
151389
151253
  });
151390
151254
  await registerLazy(ToolNames.WEB_FETCH, async () => {
151391
- const { WebFetchTool } = await import("./web-fetch-5ZLLLCDD.js");
151255
+ const { WebFetchTool } = await import("./web-fetch-ILB4GAVR.js");
151392
151256
  return new WebFetchTool(this);
151393
151257
  });
151394
151258
  if (resolveInteractionMode(this) === "interactive" && !this.sdkMode && !this.getScreenReader() && !options2?.forSubAgent) {
@@ -151398,11 +151262,11 @@ var Config = class _Config {
151398
151262
  });
151399
151263
  }
151400
151264
  if (this.webSearchSettings?.enabled) {
151401
- const { evaluateWebSearchGate } = await import("./web-search-NELKANTW.js");
151265
+ const { evaluateWebSearchGate } = await import("./web-search-HKRPGPZZ.js");
151402
151266
  const gate = evaluateWebSearchGate(this);
151403
151267
  if (gate.ok) {
151404
151268
  await registerLazy(ToolNames.WEB_SEARCH, async () => {
151405
- const { WebSearchTool } = await import("./web-search-NELKANTW.js");
151269
+ const { WebSearchTool } = await import("./web-search-HKRPGPZZ.js");
151406
151270
  return new WebSearchTool(this);
151407
151271
  });
151408
151272
  } else if (!this.webSearchNoticeEmitted && !options2?.forSubAgent) {
@@ -151454,7 +151318,7 @@ var Config = class _Config {
151454
151318
  });
151455
151319
  if (this.isAgentTeamEnabled()) {
151456
151320
  await registerLazy(ToolNames.TEAM_CREATE, async () => {
151457
- const { TeamCreateTool } = await import("./team-create-OTP5SSB2.js");
151321
+ const { TeamCreateTool } = await import("./team-create-CFFKU7KL.js");
151458
151322
  return new TeamCreateTool(this);
151459
151323
  });
151460
151324
  await registerLazy(ToolNames.TEAM_DELETE, async () => {
@@ -151462,7 +151326,7 @@ var Config = class _Config {
151462
151326
  return new TeamDeleteTool(this);
151463
151327
  });
151464
151328
  await registerLazy(ToolNames.TEAM_PLAN_APPROVAL, async () => {
151465
- const { TeamPlanApprovalTool } = await import("./team-plan-approval-TQX5TMXU.js");
151329
+ const { TeamPlanApprovalTool } = await import("./team-plan-approval-6EFOKR6A.js");
151466
151330
  return new TeamPlanApprovalTool(this);
151467
151331
  });
151468
151332
  await registerLazy(ToolNames.TASK_CREATE, async () => {
@@ -151480,16 +151344,16 @@ var Config = class _Config {
151480
151344
  }
151481
151345
  if (this.isWorkflowsEnabled()) {
151482
151346
  await registerLazy(ToolNames.WORKFLOW, async () => {
151483
- const { WorkflowTool } = await import("./workflow-RXKBF3LO.js");
151347
+ const { WorkflowTool } = await import("./workflow-FXIPRQQA.js");
151484
151348
  return new WorkflowTool(this);
151485
151349
  });
151486
151350
  }
151487
151351
  if (this.isComputerUseEnabled()) {
151488
- const { registerComputerUseTools } = await import("./computer-use-QLJ27OCZ.js");
151352
+ const { registerComputerUseTools } = await import("./computer-use-ESQYJ3JY.js");
151489
151353
  await registerComputerUseTools(registerLazy, this);
151490
151354
  }
151491
151355
  await registerLazy(ToolNames.MONITOR, async () => {
151492
- const { MonitorTool } = await import("./monitor-FDWEJQWP.js");
151356
+ const { MonitorTool } = await import("./monitor-DAKD6OU4.js");
151493
151357
  return new MonitorTool(this);
151494
151358
  });
151495
151359
  if (this.pendingMcpBudgetCallback) {
@@ -151913,8 +151777,6 @@ export {
151913
151777
  DEFAULT_STOP_HOOK_BLOCK_CAP,
151914
151778
  formatStopHookBlockingCapWarning,
151915
151779
  buildContextUsage,
151916
- wrapUserPromptSubmitContext,
151917
- stripTrailingUserPromptSubmitContextPart,
151918
151780
  isGitRepository,
151919
151781
  findGitRoot,
151920
151782
  getGitBranch,
@@ -152149,6 +152011,8 @@ export {
152149
152011
  SubagentManager,
152150
152012
  MAX_CONCURRENT_MONITORS,
152151
152013
  getMonitorOutputPath,
152014
+ isActiveWorkflowStatus,
152015
+ isTerminalWorkflowStatus,
152152
152016
  EXTENSIONS_CONFIG_FILENAME,
152153
152017
  So,
152154
152018
  redactUrlCredentials,
@@ -152305,7 +152169,8 @@ export {
152305
152169
  subagentGenerator,
152306
152170
  BTW_MAX_INPUT_LENGTH,
152307
152171
  buildBtwPrompt,
152308
- buildBtwCacheSafeParams
152172
+ buildBtwCacheSafeParams,
152173
+ isGoalCheckpointBookkeepingRecord
152309
152174
  };
152310
152175
  /**
152311
152176
  * @license
@@ -152329,12 +152194,12 @@ export {
152329
152194
  */
152330
152195
  /**
152331
152196
  * @license
152332
- * Copyright 2025 Qwen Code
152197
+ * Copyright 2026 Qwen
152333
152198
  * SPDX-License-Identifier: Apache-2.0
152334
152199
  */
152335
152200
  /**
152336
152201
  * @license
152337
- * Copyright 2026 Qwen
152202
+ * Copyright 2025 Qwen Code
152338
152203
  * SPDX-License-Identifier: Apache-2.0
152339
152204
  */
152340
152205
  /**