@qwen-code/qwen-code 0.21.3 → 0.21.4

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 (241) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +13 -0
  2. package/bundled/qc-helper/docs/features/channels/github.md +12 -8
  3. package/bundled/qc-helper/docs/features/code-review.md +14 -1
  4. package/bundled/qc-helper/docs/features/commands.md +46 -40
  5. package/bundled/qc-helper/docs/qwen-serve.md +27 -26
  6. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -19
  7. package/bundled/review/SKILL.md +67 -22
  8. package/chunks/{MaxSizedBox-OJR636GP.js → MaxSizedBox-5XDFQHTQ.js} +8 -7
  9. package/chunks/{StandaloneSessionPicker-AMMBF5UY.js → StandaloneSessionPicker-DLADA54K.js} +21 -20
  10. package/chunks/{acpAgent-M57LVIQA.js → acpAgent-MVEFZSBS.js} +48 -42
  11. package/chunks/{agent-PE37ARLM.js → agent-RB6LCRZX.js} +8 -7
  12. package/chunks/{agent-headless-45ASME4R.js → agent-headless-272ZACJV.js} +8 -7
  13. package/chunks/{anthropicContentGenerator-WCBYB6JG.js → anthropicContentGenerator-3CAHEZBM.js} +4 -2
  14. package/chunks/{bridge-K3ZRPO4D.js → bridge-GXUXFSHK.js} +9 -8
  15. package/chunks/{ca-4OJN75WT.js → ca-NYKNH222.js} +4 -0
  16. package/chunks/{channel-management-service-IXJ2MZTS.js → channel-management-service-UHX56NBO.js} +1 -1
  17. package/chunks/{channel-settings-store-PEAR3IME.js → channel-settings-store-5UA2SABE.js} +14 -13
  18. package/chunks/{chunk-IWGTGH4G.js → chunk-2CCUHZP5.js} +2 -2
  19. package/chunks/{chunk-HUIQ4FYC.js → chunk-2JN5V3I7.js} +3 -3
  20. package/chunks/{chunk-BSKUTHLO.js → chunk-2ON2O4MD.js} +16 -3
  21. package/chunks/{chunk-QPSYIV2O.js → chunk-2T3RYG4L.js} +2039 -563
  22. package/chunks/{chunk-ZGSUFIL5.js → chunk-3PHUGFPH.js} +1 -1
  23. package/chunks/{chunk-QWW6I2UO.js → chunk-4CTV3FZH.js} +400 -33
  24. package/chunks/{chunk-6NE5NTHJ.js → chunk-4PZ7SPD5.js} +1 -1
  25. package/chunks/{chunk-2LZCLQIS.js → chunk-5XGI4IPK.js} +4 -4
  26. package/chunks/{chunk-GMSBXEH4.js → chunk-6KQUOXT5.js} +6 -6
  27. package/chunks/{chunk-2MI7ZTRT.js → chunk-6ME3PVMM.js} +4 -4
  28. package/chunks/{chunk-SRY26X4H.js → chunk-7UXI6P72.js} +11 -2
  29. package/chunks/{chunk-YU6TBRTA.js → chunk-A7PONO5G.js} +1 -1
  30. package/chunks/{chunk-N42C2FU3.js → chunk-AFJSRJTO.js} +1 -1
  31. package/chunks/{chunk-H6FIBBXK.js → chunk-AWTLFUVN.js} +11 -11
  32. package/chunks/{chunk-HIXVWF7I.js → chunk-B3EBXISV.js} +2 -2
  33. package/chunks/{chunk-3XF4WT3B.js → chunk-BC4LTKEG.js} +1 -1
  34. package/chunks/{chunk-ZJES4C3I.js → chunk-BOWKLLWA.js} +2 -2
  35. package/chunks/{chunk-SKSF3LGQ.js → chunk-C5YFS6VR.js} +3 -3
  36. package/chunks/{chunk-IF6K42YJ.js → chunk-C6FU76AA.js} +1 -1
  37. package/chunks/{chunk-VUNRNRN6.js → chunk-DHNFB7NC.js} +4 -4
  38. package/chunks/{chunk-LZV2BZPL.js → chunk-DJA7YBLJ.js} +2 -2
  39. package/chunks/{chunk-K2J5JZ6B.js → chunk-DOCBJIBL.js} +1 -1
  40. package/chunks/{chunk-X6WUYMOV.js → chunk-DTAPI453.js} +2 -2
  41. package/chunks/{chunk-XUMAD5IT.js → chunk-DZPOYHBT.js} +1 -1
  42. package/chunks/{chunk-UQDFEU47.js → chunk-E2SYUEIA.js} +463 -114
  43. package/chunks/{chunk-DSGJLHM3.js → chunk-EIAPOG76.js} +3 -3
  44. package/chunks/{chunk-EGYJRIDF.js → chunk-EJXATV5R.js} +2 -2
  45. package/chunks/{chunk-BKGA75MU.js → chunk-FPPVCCAH.js} +1 -1
  46. package/chunks/{chunk-KXWERR6P.js → chunk-FV4TUUDE.js} +10 -10
  47. package/chunks/{chunk-WY2ENRDN.js → chunk-G6KI6B5L.js} +1 -1
  48. package/chunks/{chunk-H6ZYP74A.js → chunk-GDREW3U5.js} +1 -1
  49. package/chunks/{chunk-BKXTHMOZ.js → chunk-HBCKZF2A.js} +1 -1
  50. package/chunks/chunk-HGCQ5SE7.js +136 -0
  51. package/chunks/{chunk-HEBW74ZW.js → chunk-HI4YGRJD.js} +3 -3
  52. package/chunks/{chunk-5JPVOYWA.js → chunk-I32URQI7.js} +4 -4
  53. package/chunks/{chunk-5VYFXHY2.js → chunk-IMGNGOGC.js} +3 -3
  54. package/chunks/{chunk-4K3RV3OA.js → chunk-JDJ7SC4E.js} +7 -3
  55. package/chunks/{chunk-22YFMJBW.js → chunk-KB6VSG2U.js} +58 -6
  56. package/chunks/{chunk-R7XNRHYD.js → chunk-KHSJSMFS.js} +1 -1
  57. package/chunks/{chunk-LGT3YMLN.js → chunk-LEZFUYPM.js} +1 -1
  58. package/chunks/{chunk-TZTBZ25J.js → chunk-LLMGP5IC.js} +1 -1
  59. package/chunks/{chunk-NW57GHNL.js → chunk-LPLMUGIM.js} +3 -3
  60. package/chunks/{chunk-L7FTDKCD.js → chunk-M2L4TMH3.js} +21 -3
  61. package/chunks/{chunk-RCXCGZG6.js → chunk-M6RNMBUO.js} +3 -3
  62. package/chunks/{chunk-D2GPKXCQ.js → chunk-O4IWFYUW.js} +4 -4
  63. package/chunks/{chunk-Q3G5L5KF.js → chunk-OOPFAIWP.js} +1 -1
  64. package/chunks/{chunk-MTR4JWQJ.js → chunk-P5UJMCVS.js} +4 -4
  65. package/chunks/{chunk-FF75UUB2.js → chunk-PCVMRBLN.js} +1 -1
  66. package/chunks/{chunk-XMJO6C44.js → chunk-PQ5JFCNL.js} +3 -3
  67. package/chunks/{chunk-SQ3YD5MI.js → chunk-PQEIKQXN.js} +1 -1
  68. package/chunks/{chunk-3MWNROHB.js → chunk-QXTGHZCX.js} +3 -3
  69. package/chunks/{chunk-TXABHVZD.js → chunk-QZQ72YF6.js} +1 -1
  70. package/chunks/{chunk-YPUHMQXV.js → chunk-RL2NPV5E.js} +1 -1
  71. package/chunks/{chunk-FXVHVCNA.js → chunk-RNKGMZEW.js} +1 -1
  72. package/chunks/{chunk-EIMKVOSF.js → chunk-SBBHZ3YT.js} +1 -1
  73. package/chunks/{chunk-QDWLUXKP.js → chunk-SV5X2EUV.js} +1 -1
  74. package/chunks/{chunk-YWMDTMAU.js → chunk-THLV7YGY.js} +2 -2
  75. package/chunks/{chunk-H35Q5CEG.js → chunk-TXZDRD36.js} +6 -6
  76. package/chunks/{chunk-MUEJ4R3E.js → chunk-UATJZOAJ.js} +3 -3
  77. package/chunks/{chunk-M5LIY7Y6.js → chunk-URVJ4AZC.js} +1 -1
  78. package/chunks/{chunk-4AGGSHCH.js → chunk-WDLQGFWP.js} +196 -52
  79. package/chunks/{chunk-RL6J3BPE.js → chunk-XGA6XHH3.js} +3 -3
  80. package/chunks/{chunk-QWDVZH24.js → chunk-XPAY4EMH.js} +3 -3
  81. package/chunks/{chunk-MCXMWLFT.js → chunk-XSOAW7FC.js} +5 -5
  82. package/chunks/{chunk-RR224BUP.js → chunk-ZLJQIGCH.js} +45 -1
  83. package/chunks/{chunk-FG63DZQA.js → chunk-ZRQY5BBS.js} +9 -9
  84. package/chunks/{computer-use-UJMK6JQU.js → computer-use-MDOMIVTL.js} +8 -7
  85. package/chunks/{config-utils-7COTJMWK.js → config-utils-E3ZQTHGM.js} +2 -2
  86. package/chunks/{contextCommand-4YABGF4S.js → contextCommand-FCK3CB37.js} +10 -9
  87. package/chunks/{core-runtime-7M4VM3DA.js → core-runtime-UHRHHU2O.js} +8 -7
  88. package/chunks/{create-sub-session-HOFDW4N7.js → create-sub-session-MIXUVLWW.js} +20 -13
  89. package/chunks/{daemon-status-provider-W2U5Q3J5.js → daemon-status-provider-6LC7LUNR.js} +13 -12
  90. package/chunks/{daemon-trust-policy-IFICWPXP.js → daemon-trust-policy-Y36HGRAM.js} +13 -12
  91. package/chunks/{daemon-trust-policy-monitor-GX7EO6FW.js → daemon-trust-policy-monitor-ROTBBDOH.js} +13 -12
  92. package/chunks/{de-A6TI4LBB.js → de-VL76CPLV.js} +4 -0
  93. package/chunks/{deferred-core-runtime-U36OOOKE.js → deferred-core-runtime-ZQ4JIAJD.js} +8 -7
  94. package/chunks/{display-image-VS3TXYQH.js → display-image-2WOG27DY.js} +1 -1
  95. package/chunks/{dist-NEBRI7WO.js → dist-C5U4LJKW.js} +95 -0
  96. package/chunks/{dist-4KAX7CCL.js → dist-IKGVITP3.js} +401 -24
  97. package/chunks/{earlyInputCapture-5ZWDH3SB.js → earlyInputCapture-GPRUNXTP.js} +8 -7
  98. package/chunks/{edit-J7SW6UP6.js → edit-YK3UP6D2.js} +8 -7
  99. package/chunks/{en-L4UQDLWW.js → en-IRJ2WN5T.js} +4 -0
  100. package/chunks/{enter-worktree-NRLOHRB6.js → enter-worktree-QMVQW7UG.js} +8 -7
  101. package/chunks/{enterPlanMode-GDSTEFSM.js → enterPlanMode-TZAYQ5MP.js} +8 -7
  102. package/chunks/{environment-KHYEKG5W.js → environment-3UQURCZG.js} +10 -9
  103. package/chunks/{errors-VNLAJV3O.js → errors-VBIMTNNI.js} +10 -9
  104. package/chunks/{exit-worktree-ARVID7DF.js → exit-worktree-4EC7LBBC.js} +8 -7
  105. package/chunks/{exitPlanMode-4ZFY7KUH.js → exitPlanMode-K5Y3REU2.js} +8 -7
  106. package/chunks/{fast-path-KA65VREJ.js → fast-path-KS6IE7YR.js} +11 -2
  107. package/chunks/{fr-QF7RI5ZE.js → fr-GK3HQYVB.js} +4 -0
  108. package/chunks/{gemini-5PMCNPF7.js → gemini-LTUCUOJH.js} +42 -40
  109. package/chunks/{geminiContentGenerator-NFSYJ4HA.js → geminiContentGenerator-M3HJTHKR.js} +1 -1
  110. package/chunks/{glob-F3EAUDAX.js → glob-SKUYGTF2.js} +8 -7
  111. package/chunks/{grep-UJMPVZER.js → grep-SQ7RD7SV.js} +8 -7
  112. package/chunks/{handleAutoUpdate-MG4FRZPN.js → handleAutoUpdate-OK7OX23A.js} +12 -11
  113. package/chunks/{i18n-EVHV4ZF3.js → i18n-P77YBKY4.js} +9 -8
  114. package/chunks/{image-gen-UC7XVHI7.js → image-gen-2ZWPS42A.js} +1 -1
  115. package/chunks/{initializer-O5B6HUBI.js → initializer-PIOYXVW7.js} +13 -12
  116. package/chunks/{installationInfo-2LIKCNVX.js → installationInfo-IWMM6DPV.js} +9 -8
  117. package/chunks/{ja-URQESVGW.js → ja-3FA46IKD.js} +4 -0
  118. package/chunks/{list-BPKIE3Z4.js → list-3DCR4TRI.js} +16 -15
  119. package/chunks/{loadedSettingsAdapter-NGLFF4V4.js → loadedSettingsAdapter-EJC6CU5N.js} +13 -12
  120. package/chunks/{loggingContentGenerator-7TFESRG5.js → loggingContentGenerator-2JEFU25T.js} +3 -3
  121. package/chunks/{managed-npm-update-CLZGGV7F.js → managed-npm-update-EGVQPSBR.js} +9 -8
  122. package/chunks/{mcp-X5OZOOXX.js → mcp-KFFH2MBV.js} +13 -12
  123. package/chunks/{monitor-TGSVSAZZ.js → monitor-6Y3NDMTI.js} +8 -7
  124. package/chunks/{nonInteractiveCli-GUMJ5JLG.js → nonInteractiveCli-426IQDPE.js} +40 -38
  125. package/chunks/{notebook-edit-EZISE7IC.js → notebook-edit-373IQQLE.js} +8 -7
  126. package/chunks/{openaiContentGenerator-ZAKS5A6P.js → openaiContentGenerator-PGFSOMIQ.js} +3 -3
  127. package/chunks/{pidfile-PCMBX4LR.js → pidfile-Y4INDMHG.js} +8 -7
  128. package/chunks/{processUtils-2CSVE5BW.js → processUtils-6BCPCJZW.js} +2 -2
  129. package/chunks/{pt-EEEQXRUI.js → pt-3AOBKPIJ.js} +4 -0
  130. package/chunks/{qwenContentGenerator-S3H6PIC4.js → qwenContentGenerator-QC3KSHSX.js} +8 -8
  131. package/chunks/{qwenOAuth2-MNU425VE.js → qwenOAuth2-IOAXKJ3L.js} +1 -1
  132. package/chunks/{read-file-HXJXHBI6.js → read-file-2T54FYZV.js} +2 -2
  133. package/chunks/{resumeHistoryUtils-4QAMC2S6.js → resumeHistoryUtils-O62RDCZ3.js} +11 -10
  134. package/chunks/{ripGrep-MCETPF2E.js → ripGrep-3H72KY7S.js} +8 -7
  135. package/chunks/{ru-WGZDYQAB.js → ru-VJRAMC4W.js} +4 -0
  136. package/chunks/{run-qwen-serve-3NMODTXV.js → run-qwen-serve-3AIDNNHO.js} +82 -35
  137. package/chunks/{runtime-AQOV7DVP.js → runtime-AZ4EHHFV.js} +16 -15
  138. package/chunks/{scheduler-DN7SZ6ZE.js → scheduler-L4UUCU4Z.js} +8 -7
  139. package/chunks/{send-message-HGCVVDTZ.js → send-message-LHJLVWFD.js} +2 -2
  140. package/chunks/{serve-WZB45HVT.js → serve-CLXGSYOE.js} +14 -12
  141. package/chunks/{server-GOTZFEEZ.js → server-MEAE3WMM.js} +36 -34
  142. package/chunks/{session-23LOFLWN.js → session-OSLD2LT5.js} +41 -39
  143. package/chunks/{settings-LI2ORVXC.js → settings-ILWAOKA4.js} +12 -11
  144. package/chunks/{shell-GLC6OP3C.js → shell-RT5DBH6B.js} +8 -7
  145. package/chunks/{skill-C7W6M4GO.js → skill-LVGA3ATZ.js} +2 -2
  146. package/chunks/{skill-settings-W25NCK5I.js → skill-settings-WTZE7EPE.js} +12 -11
  147. package/chunks/{spawnChannel-OHJLEBLD.js → spawnChannel-BOBS7DVM.js} +8 -7
  148. package/chunks/{standalone-update-E4V5V7WT.js → standalone-update-Y5JB4S2K.js} +10 -9
  149. package/chunks/{startInteractiveUI-FKILLW7Q.js → startInteractiveUI-ZV25CD2S.js} +62 -50
  150. package/chunks/{task-create-CSCEG4SM.js → task-create-4ALZMGP5.js} +3 -3
  151. package/chunks/{task-update-C52LNFU5.js → task-update-IKCEEWJ6.js} +3 -3
  152. package/chunks/{team-create-HBIJ7NHT.js → team-create-ZVPQIXCP.js} +8 -7
  153. package/chunks/{team-plan-approval-IBJOKS4J.js → team-plan-approval-5UHUBY3W.js} +8 -7
  154. package/chunks/{terminal-image-renderer-BOQJPVLB.js → terminal-image-renderer-NWC2RALG.js} +8 -7
  155. package/chunks/{theme-manager-NSS7VLUD.js → theme-manager-5KICSBOB.js} +8 -7
  156. package/chunks/{todoWrite-YKAA57W2.js → todoWrite-FTZWQRZH.js} +2 -1
  157. package/chunks/{tool-search-DEAS54VG.js → tool-search-2AOU77H4.js} +4 -4
  158. package/chunks/{total-session-admission-4LWTX3WD.js → total-session-admission-FR7RMHVL.js} +9 -8
  159. package/chunks/{trustedFolders-NF3J2TA7.js → trustedFolders-V7UUPQXO.js} +9 -8
  160. package/chunks/{update-relaunch-WUHRH5V3.js → update-relaunch-TBWRMQD6.js} +5 -5
  161. package/chunks/{updateCheck-7EG4BLBH.js → updateCheck-42SPCLH7.js} +11 -10
  162. package/chunks/{useAutoAcceptIndicator-ZRV56GVP.js → useAutoAcceptIndicator-4C2KM345.js} +14 -13
  163. package/chunks/{validateNonInterActiveAuth-WC2FPE3I.js → validateNonInterActiveAuth-UVFRXV3Z.js} +37 -35
  164. package/chunks/{version-6SS7KCUP.js → version-HKTV6TPN.js} +1 -1
  165. package/chunks/{web-fetch-Y5QQMPKA.js → web-fetch-ZRXSV5AN.js} +2 -2
  166. package/chunks/{web-search-QKKEU723.js → web-search-WOLV3L6T.js} +2 -2
  167. package/chunks/{workflow-PWIU6Q2M.js → workflow-F63ES3OB.js} +9 -8
  168. package/chunks/{workspace-providers-status-B2DM6FNK.js → workspace-providers-status-PJMGMYMC.js} +15 -14
  169. package/chunks/{workspace-registration-store-7Y33TTHJ.js → workspace-registration-store-LNBOX5TJ.js} +1 -1
  170. package/chunks/{workspace-registry-TSNJKLPC.js → workspace-registry-4PR7VDQ3.js} +9 -8
  171. package/chunks/{workspace-service-4I2QHDX4.js → workspace-service-PVI3VUNQ.js} +16 -15
  172. package/chunks/{workspace-skills-status-HVXNWVGR.js → workspace-skills-status-2Q5ZISO6.js} +13 -12
  173. package/chunks/{workspace-trust-reconciler-RDBBGMWP.js → workspace-trust-reconciler-NOILUH3C.js} +14 -13
  174. package/chunks/{write-file-RQ4DG5RY.js → write-file-MOM4JDHG.js} +8 -7
  175. package/chunks/{zh-72XPUG5P.js → zh-ARWDLDLR.js} +4 -0
  176. package/chunks/{zh-TW-LTB4SRH3.js → zh-TW-Y4RGI3P7.js} +4 -0
  177. package/chunks/{zoom-image-O5YCB7WN.js → zoom-image-E3VHRCFU.js} +2 -2
  178. package/cli.js +12 -12
  179. package/locales/ca.js +8 -0
  180. package/locales/de.js +8 -0
  181. package/locales/en.js +8 -0
  182. package/locales/fr.js +8 -0
  183. package/locales/ja.js +8 -0
  184. package/locales/pt.js +8 -0
  185. package/locales/ru.js +8 -0
  186. package/locales/zh-TW.js +7 -0
  187. package/locales/zh.js +7 -0
  188. package/package.json +3 -3
  189. package/web-shell/assets/{arc-Bd7d781i.js → arc-GpdmhIxr.js} +1 -1
  190. package/web-shell/assets/{architectureDiagram-3BPJPVTR-CpnOJqNE.js → architectureDiagram-3BPJPVTR-C-LhCgH_.js} +1 -1
  191. package/web-shell/assets/{blockDiagram-GPEHLZMM-NxVTiWnk.js → blockDiagram-GPEHLZMM-CzNdTCm-.js} +1 -1
  192. package/web-shell/assets/{c4Diagram-AAUBKEIU-BWT75l82.js → c4Diagram-AAUBKEIU-Ce7hbrRM.js} +1 -1
  193. package/web-shell/assets/channel-95y6Rcp3.js +1 -0
  194. package/web-shell/assets/{chunk-2J33WTMH-Dzz03hk6.js → chunk-2J33WTMH-BBSEn1PK.js} +1 -1
  195. package/web-shell/assets/{chunk-4BX2VUAB-DRF-egfm.js → chunk-4BX2VUAB-_llgjfe5.js} +1 -1
  196. package/web-shell/assets/{chunk-55IACEB6-Co15vq5x.js → chunk-55IACEB6-9fJZ_oZE.js} +1 -1
  197. package/web-shell/assets/{chunk-727SXJPM-DHSUk1J7.js → chunk-727SXJPM-DgEzQWOu.js} +1 -1
  198. package/web-shell/assets/{chunk-AQP2D5EJ-Br8u_E2R.js → chunk-AQP2D5EJ-B4RthUTc.js} +1 -1
  199. package/web-shell/assets/{chunk-FMBD7UC4-DXbPTnqF.js → chunk-FMBD7UC4-CDI-emMW.js} +1 -1
  200. package/web-shell/assets/{chunk-ND2GUHAM-BleQdi4d.js → chunk-ND2GUHAM-jM2-yOd8.js} +1 -1
  201. package/web-shell/assets/{chunk-QZHKN3VN-CqgBf-95.js → chunk-QZHKN3VN-XGZHlKPF.js} +1 -1
  202. package/web-shell/assets/classDiagram-4FO5ZUOK-pfzVkmjQ.js +1 -0
  203. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-pfzVkmjQ.js +1 -0
  204. package/web-shell/assets/{cose-bilkent-S5V4N54A-WS7b13Yg.js → cose-bilkent-S5V4N54A-90nbW1xQ.js} +1 -1
  205. package/web-shell/assets/{dagre-BM42HDAG-v_55ki8o.js → dagre-BM42HDAG-BtzlyqZ9.js} +1 -1
  206. package/web-shell/assets/{diagram-2AECGRRQ-DaYAjbdK.js → diagram-2AECGRRQ-DAaqGWaH.js} +1 -1
  207. package/web-shell/assets/{diagram-5GNKFQAL-D_Hy-L64.js → diagram-5GNKFQAL-CxlzSIFa.js} +1 -1
  208. package/web-shell/assets/{diagram-KO2AKTUF-dB06cZyD.js → diagram-KO2AKTUF-8kj-1H6u.js} +1 -1
  209. package/web-shell/assets/{diagram-LMA3HP47-DzSluD4F.js → diagram-LMA3HP47-6NhjFwRF.js} +1 -1
  210. package/web-shell/assets/{diagram-OG6HWLK6-Cvb6CeXQ.js → diagram-OG6HWLK6-Bn9kvInz.js} +1 -1
  211. package/web-shell/assets/{erDiagram-TEJ5UH35-7eB2Hmov.js → erDiagram-TEJ5UH35-CaRoGsAt.js} +1 -1
  212. package/web-shell/assets/{flowDiagram-I6XJVG4X-B08iGCw_.js → flowDiagram-I6XJVG4X-TkLweHdf.js} +1 -1
  213. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgsrCHq-.js → ganttDiagram-6RSMTGT7-ruwhCKBl.js} +1 -1
  214. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DQLurQ2i.js → gitGraphDiagram-PVQCEYII-DNI_PxoU.js} +1 -1
  215. package/web-shell/assets/{index-DJ-z1Oba.js → index-T4KluHvu.js} +336 -336
  216. package/web-shell/assets/{index-Bi1dP2mU.css → index-WxSvj2tI.css} +2 -2
  217. package/web-shell/assets/{index-B_1Z0Mgr.js → index-p1gz-sxE.js} +1 -1
  218. package/web-shell/assets/{infoDiagram-5YYISTIA-DXZGO8qB.js → infoDiagram-5YYISTIA-DarXq1-A.js} +1 -1
  219. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-g7gbuH2w.js → ishikawaDiagram-YF4QCWOH-GxDaDlT0.js} +1 -1
  220. package/web-shell/assets/{journeyDiagram-JHISSGLW-euefICGn.js → journeyDiagram-JHISSGLW-mDEoGBzY.js} +1 -1
  221. package/web-shell/assets/{kanban-definition-UN3LZRKU-Dws8-mjG.js → kanban-definition-UN3LZRKU-Ds0t-Mup.js} +1 -1
  222. package/web-shell/assets/{linear-C63F0tyh.js → linear-05nJ0xZ7.js} +1 -1
  223. package/web-shell/assets/{mermaid.core-fLrhp_4-.js → mermaid.core-Bua24ThM.js} +5 -5
  224. package/web-shell/assets/{mindmap-definition-RKZ34NQL-qRkydfT-.js → mindmap-definition-RKZ34NQL-D_zRdvUS.js} +1 -1
  225. package/web-shell/assets/{pieDiagram-4H26LBE5-BZ0wQaKN.js → pieDiagram-4H26LBE5-DZHr1x16.js} +1 -1
  226. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Fjq6GbSZ.js → quadrantDiagram-W4KKPZXB-HA06Wf0h.js} +1 -1
  227. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CqWvjLHU.js → requirementDiagram-4Y6WPE33-DH3urmJf.js} +1 -1
  228. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-VcXX6PVZ.js → sankeyDiagram-5OEKKPKP-C4xgz0TT.js} +1 -1
  229. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BJSRtxFr.js → sequenceDiagram-3UESZ5HK-DAUoZWgv.js} +1 -1
  230. package/web-shell/assets/{stateDiagram-AJRCARHV-Dt9zUwmZ.js → stateDiagram-AJRCARHV-v7NzXy4l.js} +1 -1
  231. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CtdFexEf.js +1 -0
  232. package/web-shell/assets/{timeline-definition-PNZ67QCA-DQwlNRws.js → timeline-definition-PNZ67QCA-B3GTYR2W.js} +1 -1
  233. package/web-shell/assets/{vennDiagram-CIIHVFJN-DwxjUEtQ.js → vennDiagram-CIIHVFJN-BWHjSPAq.js} +1 -1
  234. package/web-shell/assets/{wardley-L42UT6IY-D3QdMSpJ.js → wardley-L42UT6IY-m9r6IUBC.js} +1 -1
  235. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BddN8oK8.js → wardleyDiagram-YWT4CUSO-kT0FkVfK.js} +1 -1
  236. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BUNuBrRJ.js → xychartDiagram-2RQKCTM6-CYRm10z5.js} +1 -1
  237. package/web-shell/index.html +2 -2
  238. package/web-shell/assets/channel-A434sWK5.js +0 -1
  239. package/web-shell/assets/classDiagram-4FO5ZUOK-CwPuhldB.js +0 -1
  240. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwPuhldB.js +0 -1
  241. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CCxQt56w.js +0 -1
@@ -71,7 +71,7 @@ import {
71
71
  RUNTIME_SNAPSHOT_PREFIX,
72
72
  buildModelIdContext,
73
73
  resolveModelId
74
- } from "./chunk-XUMAD5IT.js";
74
+ } from "./chunk-DZPOYHBT.js";
75
75
  import {
76
76
  ARTIFACT_TITLE_MAX_LENGTH,
77
77
  ARTIFACT_WORKSPACE_PATH_MAX_LENGTH,
@@ -163,7 +163,7 @@ import {
163
163
  runWithRuntimeContentGenerator,
164
164
  shouldUsePlanOnlyReminderInSubagentContext,
165
165
  spawnBlockReason
166
- } from "./chunk-TZTBZ25J.js";
166
+ } from "./chunk-LLMGP5IC.js";
167
167
  import {
168
168
  getTeammateContext,
169
169
  isTeammate,
@@ -202,7 +202,7 @@ import {
202
202
  selectForkHistory,
203
203
  stripSystemReminderBlocks,
204
204
  validateForkToolList
205
- } from "./chunk-SRY26X4H.js";
205
+ } from "./chunk-7UXI6P72.js";
206
206
  import {
207
207
  collectAvailableSkillEntries,
208
208
  renderAvailableSkillsBlock
@@ -221,6 +221,9 @@ import {
221
221
  isPathWithinRoot,
222
222
  require_ignore
223
223
  } from "./chunk-432XCUHF.js";
224
+ import {
225
+ DashScopeOpenAICompatibleProvider
226
+ } from "./chunk-YXEVDA66.js";
224
227
  import {
225
228
  openBrowserSecurely,
226
229
  shouldAttemptBrowserLaunch
@@ -380,7 +383,7 @@ import {
380
383
  updateMCPServerStatus,
381
384
  writeLine,
382
385
  writeLineSync
383
- } from "./chunk-4K3RV3OA.js";
386
+ } from "./chunk-JDJ7SC4E.js";
384
387
  import {
385
388
  E_TIMEOUT,
386
389
  Mutex,
@@ -439,7 +442,7 @@ import {
439
442
  createContentGenerator,
440
443
  resetPreloadedContentGenerator,
441
444
  resolveContentGeneratorConfigWithSources
442
- } from "./chunk-H35Q5CEG.js";
445
+ } from "./chunk-TXZDRD36.js";
443
446
  import {
444
447
  normalizeMcpToolName,
445
448
  sanitizeToolNameForProvider
@@ -19962,13 +19965,15 @@ var BaseLlmClient = class {
19962
19965
  );
19963
19966
  let text = "";
19964
19967
  let usage;
19968
+ let hadToolCall = false;
19965
19969
  for await (const chunk of responseStream) {
19966
19970
  text += getResponseText(chunk) ?? "";
19971
+ hadToolCall ||= (getFunctionCalls(chunk)?.length ?? 0) > 0;
19967
19972
  if (chunk.usageMetadata) {
19968
19973
  usage = chunk.usageMetadata;
19969
19974
  }
19970
19975
  }
19971
- return { text, usage };
19976
+ return { text, usage, hadToolCall };
19972
19977
  } : async () => {
19973
19978
  const result2 = await contentGenerator.generateContent(
19974
19979
  request,
@@ -19976,7 +19981,8 @@ var BaseLlmClient = class {
19976
19981
  );
19977
19982
  return {
19978
19983
  text: getResponseText(result2) ?? "",
19979
- usage: result2.usageMetadata
19984
+ usage: result2.usageMetadata,
19985
+ hadToolCall: (getFunctionCalls(result2)?.length ?? 0) > 0
19980
19986
  };
19981
19987
  };
19982
19988
  const result = await retryWithBackoff(apiCall, {
@@ -20008,7 +20014,8 @@ var BaseLlmClient = class {
20008
20014
  });
20009
20015
  return {
20010
20016
  text: result.text.trim(),
20011
- usage: result.usage
20017
+ usage: result.usage,
20018
+ hadToolCall: result.hadToolCall
20012
20019
  };
20013
20020
  } catch (error) {
20014
20021
  if (abortSignal.aborted) {
@@ -22132,7 +22139,7 @@ You have access to the ${ToolNames.TODO_WRITE} tool to keep user-visible progres
22132
22139
 
22133
22140
  When you create a todo list:
22134
22141
  - Keep it short and outcome-oriented. Use a few meaningful, logically ordered, verifiable steps rather than one item per error, file, command, or minor edit.
22135
- - For complex work delegated through top-level Agent calls, create the relevant todo first and pass its ID as \`todo_id\` so the execution can be associated with the plan node.
22142
+ - When an active Todo plan covers work delegated through top-level Agent calls, pass the matching Todo ID as \`todo_id\` so the execution can be associated with that plan node. Do not create a Todo solely to wrap a delegation that does not otherwise need task tracking.
22136
22143
  - Keep at most one item in_progress. Keep the list current, mark finished work completed, and revise it when the scope or approach changes. When work completes together, update multiple statuses in one tool call rather than making bookkeeping-only calls.
22137
22144
  - Do not repeat the full todo list in prose after calling the tool; briefly communicate only important context or the next step.
22138
22145
 
@@ -29318,17 +29325,14 @@ function recordSegmentBytes(index, uuid) {
29318
29325
  return entry?.segments.reduce((total, segment) => total + segment.length, 0) ?? 0;
29319
29326
  }
29320
29327
  __name(recordSegmentBytes, "recordSegmentBytes");
29321
- function selectPageUuids(index, sessionId, position, limit, maxBytes) {
29328
+ function selectPageUuids(index, position, limit, maxBytes) {
29322
29329
  const candidates = index.activeUuids.slice(position, position + limit);
29323
29330
  if (maxBytes === void 0) return candidates;
29324
29331
  const selected = [];
29325
29332
  let selectedBytes = 0;
29326
29333
  for (const uuid of candidates) {
29327
29334
  const bytes = recordSegmentBytes(index, uuid);
29328
- if (selected.length === 0 && bytes > maxBytes) {
29329
- throw new SessionTranscriptPageTooLargeError(sessionId, bytes, maxBytes);
29330
- }
29331
- if (selectedBytes + bytes > maxBytes) break;
29335
+ if (selected.length > 0 && selectedBytes + bytes > maxBytes) break;
29332
29336
  selected.push(uuid);
29333
29337
  selectedBytes += bytes;
29334
29338
  }
@@ -29340,7 +29344,7 @@ function isReplayTurnStart(index, uuid) {
29340
29344
  return entry?.type === "user" && entry.subtype !== "mid_turn_user_message";
29341
29345
  }
29342
29346
  __name(isReplayTurnStart, "isReplayTurnStart");
29343
- function selectBackwardPageUuids(index, sessionId, position, limit, maxBytes) {
29347
+ function selectBackwardPageUuids(index, position, limit, maxBytes) {
29344
29348
  let start = Math.max(0, position - limit);
29345
29349
  for (let i = start; i < position; i++) {
29346
29350
  if (isReplayTurnStart(index, index.activeUuids[i])) {
@@ -29356,10 +29360,9 @@ function selectBackwardPageUuids(index, sessionId, position, limit, maxBytes) {
29356
29360
  for (let i = position - 1; i >= start; i--) {
29357
29361
  const uuid = index.activeUuids[i];
29358
29362
  const bytes = recordSegmentBytes(index, uuid);
29359
- if (selectedStart === position && maxBytes !== void 0 && bytes > maxBytes) {
29360
- throw new SessionTranscriptPageTooLargeError(sessionId, bytes, maxBytes);
29363
+ if (selectedStart < position && maxBytes !== void 0 && selectedBytes + bytes > maxBytes) {
29364
+ break;
29361
29365
  }
29362
- if (maxBytes !== void 0 && selectedBytes + bytes > maxBytes) break;
29363
29366
  selectedStart = i;
29364
29367
  selectedBytes += bytes;
29365
29368
  }
@@ -29371,7 +29374,6 @@ function selectBackwardPageUuids(index, sessionId, position, limit, maxBytes) {
29371
29374
  break;
29372
29375
  }
29373
29376
  }
29374
- let expandedSelection = false;
29375
29377
  if (alignedToReplayBoundary && selectedStart > 0) {
29376
29378
  let previousTurnStart = selectedStart - 1;
29377
29379
  while (previousTurnStart >= 0 && !isReplayTurnStart(index, index.activeUuids[previousTurnStart])) {
@@ -29379,23 +29381,11 @@ function selectBackwardPageUuids(index, sessionId, position, limit, maxBytes) {
29379
29381
  }
29380
29382
  if (previousTurnStart < 0) {
29381
29383
  selectedStart = 0;
29382
- expandedSelection = true;
29383
29384
  }
29384
29385
  } else if (!alignedToReplayBoundary) {
29385
29386
  while (selectedStart > 0 && !isReplayTurnStart(index, index.activeUuids[selectedStart])) {
29386
29387
  selectedStart--;
29387
29388
  }
29388
- expandedSelection = true;
29389
- }
29390
- if (expandedSelection && maxBytes !== void 0) {
29391
- const alignedBytes = index.activeUuids.slice(selectedStart, position).reduce((total, uuid) => total + recordSegmentBytes(index, uuid), 0);
29392
- if (alignedBytes > maxBytes) {
29393
- throw new SessionTranscriptPageTooLargeError(
29394
- sessionId,
29395
- alignedBytes,
29396
- maxBytes
29397
- );
29398
- }
29399
29389
  }
29400
29390
  return {
29401
29391
  uuids: index.activeUuids.slice(selectedStart, position),
@@ -29825,8 +29815,8 @@ var SessionTranscriptReader = class {
29825
29815
  );
29826
29816
  throw new InvalidSessionTranscriptCursorError();
29827
29817
  }
29828
- const backwardPage = direction === "backward" ? selectBackwardPageUuids(index, sessionId, position, limit, maxBytes) : void 0;
29829
- const pageUuids = backwardPage?.uuids ?? selectPageUuids(index, sessionId, position, limit, maxBytes);
29818
+ const backwardPage = direction === "backward" ? selectBackwardPageUuids(index, position, limit, maxBytes) : void 0;
29819
+ const pageUuids = backwardPage?.uuids ?? selectPageUuids(index, position, limit, maxBytes);
29830
29820
  const nextPosition = backwardPage?.nextPosition ?? position + pageUuids.length;
29831
29821
  const records = await readAggregatedRecords(index, pageUuids);
29832
29822
  const backwardGoalState = direction === "backward" ? await readGoalStateBeforePosition(index, nextPosition) : void 0;
@@ -35318,6 +35308,15 @@ function getCitations(resp) {
35318
35308
  }
35319
35309
  __name(getCitations, "getCitations");
35320
35310
 
35311
+ // packages/core/src/core/openaiContentGenerator/prefix-caching.ts
35312
+ init_esbuild_shims();
35313
+ function supportsOpenAIPrefixCaching(contentGeneratorConfig) {
35314
+ return DashScopeOpenAICompatibleProvider.isDashScopeProvider(
35315
+ contentGeneratorConfig
35316
+ );
35317
+ }
35318
+ __name(supportsOpenAIPrefixCaching, "supportsOpenAIPrefixCaching");
35319
+
35321
35320
  // packages/core/src/services/postCompactAttachments.ts
35322
35321
  init_esbuild_shims();
35323
35322
  import { readFile as readFile7, stat as stat4 } from "node:fs/promises";
@@ -35776,6 +35775,21 @@ Additional Instructions:
35776
35775
  ${parts.join("\n\n")}`;
35777
35776
  }
35778
35777
  __name(buildCompressionSystemPrompt, "buildCompressionSystemPrompt");
35778
+ function supportsCompressionCacheSharing(config) {
35779
+ const provider = config.getContentGeneratorConfig();
35780
+ if (provider.enableCacheControl === false) return false;
35781
+ if (provider.authType === "anthropic" /* USE_ANTHROPIC */) return true;
35782
+ return (provider.authType === "qwen-oauth" /* QWEN_OAUTH */ || provider.authType === "openai" /* USE_OPENAI */) && supportsOpenAIPrefixCaching(provider);
35783
+ }
35784
+ __name(supportsCompressionCacheSharing, "supportsCompressionCacheSharing");
35785
+ function hasStateSnapshot(summary) {
35786
+ const stripped = stripAnalysisBlock(summary);
35787
+ const startTag = "<state_snapshot>";
35788
+ const start = stripped.indexOf(startTag);
35789
+ const end = stripped.indexOf("</state_snapshot>", start + startTag.length);
35790
+ return start >= 0 && end > start + startTag.length && stripped.slice(start + startTag.length, end).trim().length > 0;
35791
+ }
35792
+ __name(hasStateSnapshot, "hasStateSnapshot");
35779
35793
  var ChatCompressionService = class {
35780
35794
  static {
35781
35795
  __name(this, "ChatCompressionService");
@@ -35916,7 +35930,9 @@ var ChatCompressionService = class {
35916
35930
  }
35917
35931
  }
35918
35932
  }
35919
- const summaryResult = await runSideQuery(config, {
35933
+ const abortSignal = signal ?? new AbortController().signal;
35934
+ abortSignal.throwIfAborted();
35935
+ const runColdCompression = /* @__PURE__ */ __name(() => runSideQuery(config, {
35920
35936
  purpose: "chat-compression",
35921
35937
  skipOutputLanguagePreference: true,
35922
35938
  model: effectiveCompactionModel,
@@ -35953,9 +35969,77 @@ var ChatCompressionService = class {
35953
35969
  thinkingConfig: { includeThoughts: false },
35954
35970
  maxOutputTokens: COMPACT_MAX_OUTPUT_TOKENS
35955
35971
  },
35956
- abortSignal: signal ?? new AbortController().signal,
35972
+ abortSignal,
35957
35973
  promptId
35958
- });
35974
+ }), "runColdCompression");
35975
+ let summaryResult;
35976
+ let usedCacheSharing = false;
35977
+ const canShareCache = effectiveCompactionModel === config.getModel() && slim.stats.imagesStripped === 0 && slim.stats.documentsStripped === 0 && supportsCompressionCacheSharing(config);
35978
+ if (canShareCache) {
35979
+ try {
35980
+ const generationConfig = {
35981
+ ...chat.getGenerationConfig(),
35982
+ ...opts.requestGenerationConfig
35983
+ };
35984
+ const mainSystemInstruction = generationConfig.systemInstruction;
35985
+ delete generationConfig.systemInstruction;
35986
+ delete generationConfig.abortSignal;
35987
+ const sharedResult = await config.getBaseLlmClient().generateText({
35988
+ contents: [
35989
+ ...sideQueryHistory,
35990
+ {
35991
+ role: "user",
35992
+ parts: [
35993
+ {
35994
+ text: `${systemInstruction}
35995
+
35996
+ Do not call tools; tool execution is disabled for this request. First, reason in your <analysis> block. Then, produce the <state_snapshot> XML.`
35997
+ }
35998
+ ]
35999
+ }
36000
+ ],
36001
+ model: effectiveCompactionModel,
36002
+ systemInstruction: mainSystemInstruction,
36003
+ config: {
36004
+ ...generationConfig,
36005
+ ...config.getContentGeneratorConfig().authType === "anthropic" /* USE_ANTHROPIC */ ? {
36006
+ thinkingConfig: {
36007
+ ...generationConfig.thinkingConfig,
36008
+ // Manual Anthropic thinking requires budget_tokens to be
36009
+ // strictly below max_tokens. Preserve thinking for cache
36010
+ // compatibility while keeping this bounded request valid.
36011
+ thinkingBudget: COMPACT_MAX_OUTPUT_TOKENS - 1
36012
+ }
36013
+ } : {},
36014
+ maxOutputTokens: COMPACT_MAX_OUTPUT_TOKENS
36015
+ },
36016
+ abortSignal,
36017
+ promptId,
36018
+ stream: true,
36019
+ maxAttempts: 1
36020
+ });
36021
+ if (!sharedResult.hadToolCall && hasStateSnapshot(sharedResult.text)) {
36022
+ summaryResult = sharedResult;
36023
+ usedCacheSharing = true;
36024
+ config.getDebugLogger().debug(
36025
+ `[chat-compression] cache-sharing request succeeded; cachedContentTokenCount=${sharedResult.usage?.cachedContentTokenCount ?? 0}`
36026
+ );
36027
+ } else {
36028
+ config.getDebugLogger().warn(
36029
+ `[chat-compression] cache-sharing response was unusable (${sharedResult.hadToolCall ? "tool call" : "invalid state snapshot"}); falling back to the dedicated summarizer.`
36030
+ );
36031
+ }
36032
+ } catch (error) {
36033
+ if (abortSignal.aborted) throw error;
36034
+ config.getDebugLogger().warn(
36035
+ `[chat-compression] cache-sharing request failed; falling back to the dedicated summarizer: ${String(error)}`
36036
+ );
36037
+ }
36038
+ }
36039
+ if (!summaryResult) {
36040
+ abortSignal.throwIfAborted();
36041
+ summaryResult = await runColdCompression();
36042
+ }
35959
36043
  const summary = summaryResult.text;
35960
36044
  const isSummaryEmpty = !summary || stripAnalysisBlock(summary).trim().length === 0;
35961
36045
  const compressionUsageMetadata = summaryResult.usage;
@@ -35976,7 +36060,7 @@ var ChatCompressionService = class {
35976
36060
  `[chat-compression] compression side-query omitted usage metadata; using local estimate for summary output token count (${compressionOutputTokenCount}).`
35977
36061
  );
35978
36062
  }
35979
- if (!isSummaryEmpty && typeof compressionOutputTokenCount === "number" && compressionOutputTokenCount >= COMPACT_MAX_OUTPUT_TOKENS) {
36063
+ if (!usedCacheSharing && !isSummaryEmpty && typeof compressionOutputTokenCount === "number" && compressionOutputTokenCount >= COMPACT_MAX_OUTPUT_TOKENS) {
35980
36064
  config.getDebugLogger().warn(
35981
36065
  `[chat-compression] summary output reached the COMPACT_MAX_OUTPUT_TOKENS cap (${COMPACT_MAX_OUTPUT_TOKENS}); dropping potentially-truncated result. This counts as a compression failure for the per-chat circuit breaker.`
35982
36066
  );
@@ -36039,7 +36123,7 @@ var ChatCompressionService = class {
36039
36123
  }
36040
36124
  ];
36041
36125
  }
36042
- if (typeof compressionInputTokenCount === "number" && compressionInputTokenCount > 0 && typeof compressionOutputTokenCount === "number" && compressionOutputTokenCount > 0) {
36126
+ if (!usedCacheSharing && typeof compressionInputTokenCount === "number" && compressionInputTokenCount > 0 && typeof compressionOutputTokenCount === "number" && compressionOutputTokenCount > 0) {
36043
36127
  canCalculateNewTokenCount = true;
36044
36128
  const compressedHistoryTokenCount = Math.max(
36045
36129
  0,
@@ -36071,7 +36155,7 @@ var ChatCompressionService = class {
36071
36155
  newTokenCount = estimatedNonVisibleTokenCount + estimatedNewVisibleTokenCount;
36072
36156
  canCalculateNewTokenCount = true;
36073
36157
  config.getDebugLogger().debug(
36074
- `[chat-compression] usage metadata missing; estimated post-compression token count by preserving the API-reported non-visible remainder (${estimatedNonVisibleTokenCount}) and replacing the visible-history estimate (${estimatedOriginalVisibleTokenCount} -> ${estimatedNewVisibleTokenCount}).`
36158
+ `[chat-compression] ${usedCacheSharing ? "cache-sharing token accounting" : "usage metadata missing"}; estimated post-compression token count by preserving the API-reported non-visible remainder (${estimatedNonVisibleTokenCount}) and replacing the visible-history estimate (${estimatedOriginalVisibleTokenCount} -> ${estimatedNewVisibleTokenCount}).`
36075
36159
  );
36076
36160
  }
36077
36161
  }
@@ -36082,7 +36166,9 @@ var ChatCompressionService = class {
36082
36166
  tokens_before: originalTokenCount,
36083
36167
  tokens_after: newTokenCount,
36084
36168
  compression_input_token_count: compressionInputTokenCount,
36085
- compression_output_token_count: compressionOutputTokenCount
36169
+ compression_output_token_count: compressionOutputTokenCount,
36170
+ cache_sharing_attempted: canShareCache,
36171
+ cache_sharing_used: usedCacheSharing
36086
36172
  })
36087
36173
  );
36088
36174
  if (isSummaryEmpty) {
@@ -36787,14 +36873,14 @@ var RETRYABLE_STREAM_TRANSPORT_CODES = /* @__PURE__ */ new Set([
36787
36873
  // packages/core/src/core/geminiChat.ts
36788
36874
  var debugLogger22 = createDebugLogger("QWEN_CODE_CHAT");
36789
36875
  var GEMINI_EMPTY_CONTENT_PLACEHOLDER = "(empty content)";
36790
- function isToolCallPreparationOnly(response) {
36791
- if (getToolCallPreparations(response).length === 0) return false;
36792
- const hasCandidateOutput = response.candidates?.some(
36793
- (candidate) => Boolean(candidate.finishReason) || (candidate.content?.parts?.length ?? 0) > 0
36876
+ function hasCandidateOutput(response) {
36877
+ return Boolean(
36878
+ response.candidates?.some(
36879
+ (candidate) => Boolean(candidate.finishReason) || (candidate.content?.parts?.length ?? 0) > 0
36880
+ )
36794
36881
  );
36795
- return !hasCandidateOutput && !response.usageMetadata;
36796
36882
  }
36797
- __name(isToolCallPreparationOnly, "isToolCallPreparationOnly");
36883
+ __name(hasCandidateOutput, "hasCandidateOutput");
36798
36884
  function hasNonThoughtCandidateParts(response) {
36799
36885
  return Boolean(
36800
36886
  response.candidates?.some(
@@ -36927,11 +37013,24 @@ var INVALID_STREAM_RETRY_CONFIG = {
36927
37013
  };
36928
37014
  var TRANSPORT_STREAM_RETRY_CONFIG = {
36929
37015
  maxRetries: 2,
36930
- initialDelayMs: 1e3
37016
+ initialDelayMs: 1e3,
37017
+ /**
37018
+ * Budget for *continuation* recovery after a socket-level cut that already
37019
+ * delivered output (issue #7832). This is a different mechanism from the
37020
+ * `maxRetries` replay above and therefore has its own budget: a replay
37021
+ * re-sends the request from scratch and is only legal before any chunk
37022
+ * reached callers, while a continuation keeps the delivered output and asks
37023
+ * the model to resume from it. A single long generation can be cut more than
37024
+ * once by the same gateway idle timeout, so this is sized like
37025
+ * {@link MAX_OUTPUT_RECOVERY_ATTEMPTS} rather than like the replay budget.
37026
+ */
37027
+ maxContinuationRetries: 3
36931
37028
  };
36932
37029
  var FIRST_SEND_CLAMP_OVERHEAD_PAD = 2e4;
36933
37030
  var MAX_OUTPUT_RECOVERY_ATTEMPTS = 3;
36934
- var OUTPUT_RECOVERY_MESSAGE = "Output token limit hit. Resume directly \u2014 no apology, no recap of what you were doing. Pick up mid-thought if that is where the cut happened. Break remaining work into smaller pieces.";
37031
+ var RECOVERY_RESUME_INSTRUCTION = "Resume directly \u2014 no apology, no recap of what you were doing. Pick up mid-thought if that is where the cut happened. Break remaining work into smaller pieces.";
37032
+ var OUTPUT_RECOVERY_MESSAGE = `Output token limit hit. ${RECOVERY_RESUME_INSTRUCTION}`;
37033
+ var TRANSPORT_CONTINUATION_MESSAGE = `The connection dropped mid-response. ${RECOVERY_RESUME_INSTRUCTION}`;
36935
37034
  var OUTPUT_RECOVERY_TAIL_CHARS = 1200;
36936
37035
  var RECOVERY_OVERLAP_MAX_SCAN_CHARS = 4e3;
36937
37036
  var RECOVERY_OVERLAP_MIN_BYTES = 6;
@@ -37046,20 +37145,26 @@ function sanitizeRecoverySuffixTail(tail) {
37046
37145
  return tail.replace(/<\/previous_response_suffix>/g, "<\u200B/previous_response_suffix>").replace(/<previous_response_suffix>/g, "<\u200Bprevious_response_suffix>");
37047
37146
  }
37048
37147
  __name(sanitizeRecoverySuffixTail, "sanitizeRecoverySuffixTail");
37049
- function buildOutputRecoveryMessage(previousModelTurn) {
37050
- const previousText = previousModelTurn?.role === "model" ? getPlainTextFromParts(previousModelTurn.parts) : "";
37148
+ function buildRecoveryMessageFromText(lead, previousText) {
37051
37149
  if (previousText.trim().length === 0) {
37052
- return OUTPUT_RECOVERY_MESSAGE;
37150
+ return lead;
37053
37151
  }
37054
37152
  const rawTail = previousText.length > OUTPUT_RECOVERY_TAIL_CHARS ? previousText.slice(-OUTPUT_RECOVERY_TAIL_CHARS) : previousText;
37055
37153
  const tail = sanitizeRecoverySuffixTail(rawTail);
37056
- return `${OUTPUT_RECOVERY_MESSAGE}
37154
+ return `${lead}
37057
37155
 
37058
37156
  The previous assistant response ended with this exact suffix. Do not repeat any line, table row, code line, or prose that already appears in it; output only text that comes after this suffix:
37059
37157
 
37060
37158
  <previous_response_suffix>
37061
37159
  ` + tail + "\n</previous_response_suffix>";
37062
37160
  }
37161
+ __name(buildRecoveryMessageFromText, "buildRecoveryMessageFromText");
37162
+ function buildOutputRecoveryMessage(previousModelTurn) {
37163
+ return buildRecoveryMessageFromText(
37164
+ OUTPUT_RECOVERY_MESSAGE,
37165
+ previousModelTurn?.role === "model" ? getPlainTextFromParts(previousModelTurn.parts) : ""
37166
+ );
37167
+ }
37063
37168
  __name(buildOutputRecoveryMessage, "buildOutputRecoveryMessage");
37064
37169
  function appendRecoveryContinuationParts(previousParts, continuationParts) {
37065
37170
  const mergedParts = [...previousParts ?? []];
@@ -37247,6 +37352,26 @@ var PROTOCOL_TAG_PREFIXES = [
37247
37352
  "<summary",
37248
37353
  "</summary"
37249
37354
  ];
37355
+ var LEAKED_TOOL_CALL_TAGS = /[}\]]\s*<\/parameter>\s*<\/function>/iy;
37356
+ function hasLeakedToolCallTags(text) {
37357
+ let inString = false;
37358
+ let escaped = false;
37359
+ for (let i = 0; i < text.length; i++) {
37360
+ const char = text[i];
37361
+ if (inString) {
37362
+ if (escaped) escaped = false;
37363
+ else if (char === "\\") escaped = true;
37364
+ else if (char === '"') inString = false;
37365
+ } else if (char === '"') {
37366
+ inString = true;
37367
+ } else if (char === "}" || char === "]") {
37368
+ LEAKED_TOOL_CALL_TAGS.lastIndex = i;
37369
+ if (LEAKED_TOOL_CALL_TAGS.test(text)) return true;
37370
+ }
37371
+ }
37372
+ return false;
37373
+ }
37374
+ __name(hasLeakedToolCallTags, "hasLeakedToolCallTags");
37250
37375
  var LeadingProtocolTagLeakDetector = class {
37251
37376
  static {
37252
37377
  __name(this, "LeadingProtocolTagLeakDetector");
@@ -37257,6 +37382,7 @@ var LeadingProtocolTagLeakDetector = class {
37257
37382
  if (this.state === "clean") return text;
37258
37383
  if (this.state === "leaked") return "";
37259
37384
  this.buffer += text;
37385
+ if (this.state === "json") return "";
37260
37386
  const candidate = this.buffer.trimStart().toLowerCase();
37261
37387
  if (!candidate) return "";
37262
37388
  if (PROTOCOL_TAG_PREFIXES.some((prefix) => prefix.startsWith(candidate))) {
@@ -37269,12 +37395,29 @@ var LeadingProtocolTagLeakDetector = class {
37269
37395
  return "";
37270
37396
  }
37271
37397
  }
37272
- this.state = "clean";
37273
- const output = this.buffer;
37274
- this.buffer = "";
37275
- return output;
37398
+ if (candidate.startsWith("{")) {
37399
+ this.state = "json";
37400
+ return "";
37401
+ }
37402
+ if (candidate.startsWith("[")) {
37403
+ const normalized2 = candidate.replace(/\s/g, "");
37404
+ if (normalized2 === "[") return "";
37405
+ if (normalized2.startsWith("[{")) {
37406
+ this.state = "json";
37407
+ return "";
37408
+ }
37409
+ }
37410
+ return this.release();
37276
37411
  }
37277
37412
  finish() {
37413
+ if (this.state === "json") {
37414
+ if (hasLeakedToolCallTags(this.buffer)) {
37415
+ this.state = "leaked";
37416
+ this.buffer = "";
37417
+ return "";
37418
+ }
37419
+ return this.release();
37420
+ }
37278
37421
  if (this.state !== "detecting") return "";
37279
37422
  const candidate = this.buffer.trimStart().toLowerCase();
37280
37423
  if (candidate && PROTOCOL_TAG_PREFIXES.some((prefix) => prefix.startsWith(candidate))) {
@@ -37282,8 +37425,11 @@ var LeadingProtocolTagLeakDetector = class {
37282
37425
  this.buffer = "";
37283
37426
  return "";
37284
37427
  }
37285
- this.state = "clean";
37428
+ return this.release();
37429
+ }
37430
+ release() {
37286
37431
  const output = this.buffer;
37432
+ this.state = "clean";
37287
37433
  this.buffer = "";
37288
37434
  return output;
37289
37435
  }
@@ -37664,6 +37810,7 @@ var GeminiChat = class {
37664
37810
  originalTokenCount: options2?.originalTokenCountOverride ?? this.lastPromptTokenCount,
37665
37811
  pendingUserMessage: options2?.pendingUserMessage,
37666
37812
  precomputedEffectiveTokens: options2?.precomputedEffectiveTokens,
37813
+ requestGenerationConfig: options2?.requestGenerationConfig,
37667
37814
  trigger: options2?.trigger,
37668
37815
  customInstructions: options2?.customInstructions,
37669
37816
  signal
@@ -37893,6 +38040,7 @@ var GeminiChat = class {
37893
38040
  {
37894
38041
  pendingUserMessage: userContent,
37895
38042
  precomputedEffectiveTokens: effectiveTokens,
38043
+ requestGenerationConfig: params.config,
37896
38044
  deferChatCompressionRecord: shouldForceFromHard,
37897
38045
  // Hard-rescue is force=true to bypass the cheap-gate breaker
37898
38046
  // but it remains a semantically AUTOMATIC trigger. Tag the
@@ -38033,6 +38181,10 @@ var GeminiChat = class {
38033
38181
  let protocolTagLeakRetryCount = 0;
38034
38182
  const totalInvalidStreamRetryCount = /* @__PURE__ */ __name(() => transientInvalidStreamRetryCount + protocolTagLeakRetryCount, "totalInvalidStreamRetryCount");
38035
38183
  let transportStreamRetryCount = 0;
38184
+ let transportContinuationCount = 0;
38185
+ let transportContinuationText = "";
38186
+ let transportAttemptText = "";
38187
+ let transportContinuationPrefix = "";
38036
38188
  let reactiveCompressionAttempted = false;
38037
38189
  let suppressNextRetryEvent = false;
38038
38190
  let streamYieldedAnyChunk = false;
@@ -38059,18 +38211,49 @@ var GeminiChat = class {
38059
38211
  );
38060
38212
  const shouldEscalateMaxOutputTokens = effectiveInitialMaxOutputTokens < escalatedLimit;
38061
38213
  let lastFinishReason;
38214
+ const buildAttemptContents = /* @__PURE__ */ __name(() => transportContinuationPrefix.length > 0 ? [
38215
+ ...requestContents,
38216
+ {
38217
+ role: "model",
38218
+ parts: [{ text: transportContinuationPrefix }]
38219
+ },
38220
+ createUserContent([
38221
+ {
38222
+ text: buildRecoveryMessageFromText(
38223
+ TRANSPORT_CONTINUATION_MESSAGE,
38224
+ transportContinuationPrefix
38225
+ )
38226
+ }
38227
+ ])
38228
+ ] : requestContents, "buildAttemptContents");
38229
+ const resetTransportContinuation = /* @__PURE__ */ __name(() => {
38230
+ transportContinuationCount = 0;
38231
+ transportContinuationText = "";
38232
+ transportAttemptText = "";
38233
+ transportContinuationPrefix = "";
38234
+ }, "resetTransportContinuation");
38235
+ const foldTransportAttemptText = /* @__PURE__ */ __name(() => {
38236
+ transportContinuationText += getRecoveryContinuationSuffix(
38237
+ transportContinuationText,
38238
+ transportAttemptText
38239
+ );
38240
+ transportAttemptText = "";
38241
+ }, "foldTransportAttemptText");
38062
38242
  for (; ; ) {
38243
+ transportAttemptText = "";
38063
38244
  let streamYieldedChunk = false;
38064
38245
  let streamYieldedContentChunk = false;
38246
+ let streamYieldedFunctionCall = false;
38065
38247
  try {
38066
38248
  if (suppressNextRetryEvent) {
38067
38249
  suppressNextRetryEvent = false;
38068
- } else if (rateLimitRetryCount > 0 || totalInvalidStreamRetryCount() > 0 || transportStreamRetryCount > 0) {
38250
+ } else if (rateLimitRetryCount > 0 || totalInvalidStreamRetryCount() > 0 || transportStreamRetryCount > 0 || transportContinuationCount > 0) {
38251
+ resetTransportContinuation();
38069
38252
  yield { type: "retry" /* RETRY */ };
38070
38253
  }
38071
38254
  const stream2 = await self2.makeApiCallAndProcessStream(
38072
38255
  model,
38073
- requestContents,
38256
+ buildAttemptContents(),
38074
38257
  params,
38075
38258
  prompt_id,
38076
38259
  requestOverrides,
@@ -38078,21 +38261,31 @@ var GeminiChat = class {
38078
38261
  );
38079
38262
  lastFinishReason = void 0;
38080
38263
  for await (const chunk of stream2) {
38081
- if (!isToolCallPreparationOnly(chunk)) {
38264
+ if (hasCandidateOutput(chunk)) {
38082
38265
  streamYieldedChunk = true;
38083
38266
  streamYieldedAnyChunk = true;
38084
38267
  }
38085
38268
  if (hasNonThoughtCandidateParts(chunk)) {
38086
38269
  streamYieldedContentChunk = true;
38087
38270
  }
38271
+ const chunkParts = chunk.candidates?.[0]?.content?.parts;
38272
+ transportAttemptText += getPlainTextFromParts(chunkParts);
38273
+ if (chunkParts?.some((part) => part.functionCall)) {
38274
+ streamYieldedFunctionCall = true;
38275
+ }
38088
38276
  const fr2 = chunk.candidates?.[0]?.finishReason;
38089
38277
  if (fr2) lastFinishReason = fr2;
38090
38278
  yield { type: "chunk" /* CHUNK */, value: chunk };
38091
38279
  }
38092
38280
  lastError = null;
38281
+ if (transportContinuationPrefix.length > 0) {
38282
+ self2.prependTextToLastModelTurn(transportContinuationPrefix);
38283
+ transportContinuationPrefix = "";
38284
+ }
38093
38285
  break;
38094
38286
  } catch (error) {
38095
38287
  lastError = error;
38288
+ foldTransportAttemptText();
38096
38289
  const classification = classifyRetryError(error, {
38097
38290
  authType: cgConfig?.authType,
38098
38291
  extraRetryErrorCodes
@@ -38165,7 +38358,15 @@ var GeminiChat = class {
38165
38358
  const isRetryableStreamTransportError = classification.kind === "transport" && classification.transportCode !== void 0 && RETRYABLE_STREAM_TRANSPORT_CODES.has(
38166
38359
  classification.transportCode
38167
38360
  );
38168
- if (isRetryableStreamTransportError && !streamYieldedContentChunk && transportStreamRetryCount < TRANSPORT_STREAM_RETRY_CONFIG.maxRetries) {
38361
+ if (isRetryableStreamTransportError && !streamYieldedContentChunk && // `streamYieldedContentChunk` is per-attempt, so on its own it
38362
+ // cannot tell "nothing has been delivered" from "this attempt
38363
+ // was cut while thinking, after earlier attempts already put
38364
+ // text on screen". Only the first is replayable; replaying the
38365
+ // second discards output the caller is watching. The
38366
+ // accumulated buffer is what distinguishes them, and it must be
38367
+ // consulted here because this branch is checked before the
38368
+ // continuation one below.
38369
+ transportContinuationText.trim().length === 0 && transportStreamRetryCount < TRANSPORT_STREAM_RETRY_CONFIG.maxRetries) {
38169
38370
  self2.popPendingPartialAssistantTurn();
38170
38371
  transportStreamRetryCount++;
38171
38372
  const delayMs = TRANSPORT_STREAM_RETRY_CONFIG.initialDelayMs * transportStreamRetryCount;
@@ -38180,6 +38381,28 @@ var GeminiChat = class {
38180
38381
  transportCode: classification.transportCode
38181
38382
  });
38182
38383
  yield { type: "retry" /* RETRY */ };
38384
+ resetTransportContinuation();
38385
+ suppressNextRetryEvent = true;
38386
+ await delay2(delayMs, params.config?.abortSignal).promise;
38387
+ continue;
38388
+ }
38389
+ const canContinueAfterTransportCut = isRetryableStreamTransportError && !streamYieldedFunctionCall && transportContinuationText.trim().length > 0 && transportContinuationCount < TRANSPORT_STREAM_RETRY_CONFIG.maxContinuationRetries;
38390
+ if (canContinueAfterTransportCut) {
38391
+ self2.popPendingPartialAssistantTurn();
38392
+ transportContinuationCount++;
38393
+ transportContinuationPrefix = transportContinuationText;
38394
+ const delayMs = TRANSPORT_STREAM_RETRY_CONFIG.initialDelayMs * transportContinuationCount;
38395
+ debugLogger22.warn("Transport stream continuation scheduled", {
38396
+ retryPath: "stream",
38397
+ retryDecision: "continue",
38398
+ attempt: transportContinuationCount,
38399
+ maxRetries: TRANSPORT_STREAM_RETRY_CONFIG.maxContinuationRetries,
38400
+ retryDelayMs: delayMs,
38401
+ errorKind: classification.kind,
38402
+ transportCode: classification.transportCode,
38403
+ deliveredChars: transportContinuationText.length
38404
+ });
38405
+ yield { type: "retry" /* RETRY */, isContinuation: true };
38183
38406
  suppressNextRetryEvent = true;
38184
38407
  await delay2(delayMs, params.config?.abortSignal).promise;
38185
38408
  continue;
@@ -38190,6 +38413,8 @@ var GeminiChat = class {
38190
38413
  retryDecision: streamYieldedContentChunk ? "skipped_after_content" : "exhausted",
38191
38414
  attempts: transportStreamRetryCount,
38192
38415
  maxRetries: TRANSPORT_STREAM_RETRY_CONFIG.maxRetries,
38416
+ continuationAttempts: transportContinuationCount,
38417
+ maxContinuationRetries: TRANSPORT_STREAM_RETRY_CONFIG.maxContinuationRetries,
38193
38418
  errorKind: classification.kind,
38194
38419
  transportCode: classification.transportCode
38195
38420
  });
@@ -38209,6 +38434,7 @@ var GeminiChat = class {
38209
38434
  params.config?.abortSignal,
38210
38435
  {
38211
38436
  originalTokenCountOverride: reactiveOriginalTokenCount,
38437
+ requestGenerationConfig: params.config,
38212
38438
  trigger: "auto"
38213
38439
  }
38214
38440
  );
@@ -38244,6 +38470,7 @@ var GeminiChat = class {
38244
38470
  info: reactiveInfo
38245
38471
  };
38246
38472
  yield { type: "retry" /* RETRY */ };
38473
+ resetTransportContinuation();
38247
38474
  suppressNextRetryEvent = true;
38248
38475
  continue;
38249
38476
  }
@@ -38612,7 +38839,7 @@ var GeminiChat = class {
38612
38839
  fallbackRetryErrorCodes,
38613
38840
  turnGoalContext
38614
38841
  )) {
38615
- const emittedUserVisibleOutput = event.type !== "chunk" /* CHUNK */ || !isToolCallPreparationOnly(event.value);
38842
+ const emittedUserVisibleOutput = event.type !== "chunk" /* CHUNK */ || hasCandidateOutput(event.value);
38616
38843
  if (emittedUserVisibleOutput) {
38617
38844
  currentFallbackYieldedAnyChunk = true;
38618
38845
  fallbackStreamYieldedAnyChunk = true;
@@ -39096,6 +39323,21 @@ This error was probably caused by cyclic schema references in one of the followi
39096
39323
  let hasToolCall = false;
39097
39324
  let hasFinishReason = false;
39098
39325
  const protocolTagDetector = new LeadingProtocolTagLeakDetector();
39326
+ let pendingProtocolParts = [];
39327
+ const takePendingProtocolParts = /* @__PURE__ */ __name(() => {
39328
+ const parts = pendingProtocolParts;
39329
+ pendingProtocolParts = [];
39330
+ const released = [];
39331
+ for (const part of parts) {
39332
+ const previous = released.at(-1);
39333
+ if (previous && isValidNonThoughtTextPart(previous) && isValidNonThoughtTextPart(part)) {
39334
+ previous.text += part.text;
39335
+ } else {
39336
+ released.push(isValidNonThoughtTextPart(part) ? { ...part } : part);
39337
+ }
39338
+ }
39339
+ return released;
39340
+ }, "takePendingProtocolParts");
39099
39341
  let protocolTextWasSuppressed = false;
39100
39342
  const currentUserTurn = this.history[this.history.length - 1];
39101
39343
  const isToolResultContinuation = currentUserTurn?.role === "user" && currentUserTurn.parts?.some((part) => part.functionResponse) === true;
@@ -39120,22 +39362,57 @@ This error was probably caused by cyclic schema references in one of the followi
39120
39362
  hasFinishReason ||= chunk?.candidates?.some((candidate) => candidate.finishReason) ?? false;
39121
39363
  if (isValidResponse(chunk)) {
39122
39364
  const candidate = chunk.candidates?.[0];
39123
- const content = candidate?.content;
39365
+ let content = candidate?.content;
39366
+ if (candidate?.finishReason && !content?.parts) {
39367
+ protocolTagDetector.finish();
39368
+ if (protocolTagDetector.leaked) {
39369
+ pendingProtocolParts = [];
39370
+ } else {
39371
+ const parts = takePendingProtocolParts();
39372
+ if (parts.length > 0) {
39373
+ content = {
39374
+ ...content,
39375
+ role: content?.role ?? "model",
39376
+ parts
39377
+ };
39378
+ candidate.content = content;
39379
+ }
39380
+ }
39381
+ }
39124
39382
  if (content?.parts) {
39125
- content.parts = content.parts.flatMap((part) => {
39383
+ const outputParts = [];
39384
+ for (const part of content.parts) {
39126
39385
  if (isToolResultContinuation && !part.thought && part.text?.trim() === GEMINI_EMPTY_CONTENT_PLACEHOLDER) {
39127
- return [];
39386
+ continue;
39387
+ }
39388
+ if (typeof part.text !== "string" || part.thought) {
39389
+ if (pendingProtocolParts.length > 0 || protocolTagDetector.leaked) {
39390
+ pendingProtocolParts.push(part);
39391
+ } else {
39392
+ outputParts.push(part);
39393
+ }
39394
+ continue;
39128
39395
  }
39129
- if (typeof part.text !== "string" || part.thought) return [part];
39130
39396
  const text = protocolTagDetector.accept(part.text);
39131
- if (text) return [{ ...part, text }];
39397
+ if (text) {
39398
+ if (pendingProtocolParts.length > 0) {
39399
+ outputParts.push(...takePendingProtocolParts(), part);
39400
+ } else {
39401
+ outputParts.push({ ...part, text });
39402
+ }
39403
+ continue;
39404
+ }
39405
+ pendingProtocolParts.push(...outputParts.splice(0), part);
39132
39406
  protocolTextWasSuppressed ||= part.text.length > 0;
39133
- const { text: _text, ...rest } = part;
39134
- return Object.values(rest).some((value) => value !== void 0) ? [rest] : [];
39135
- });
39407
+ }
39408
+ content.parts = outputParts;
39136
39409
  if (candidate?.finishReason) {
39137
- const text = protocolTagDetector.finish();
39138
- if (text) content.parts.push({ text });
39410
+ protocolTagDetector.finish();
39411
+ if (protocolTagDetector.leaked) {
39412
+ pendingProtocolParts = [];
39413
+ } else {
39414
+ content.parts.push(...takePendingProtocolParts());
39415
+ }
39139
39416
  }
39140
39417
  content.parts = normalizeModelToolCallIds(
39141
39418
  content.parts,
@@ -39208,13 +39485,33 @@ This error was probably caused by cyclic schema references in one of the followi
39208
39485
  }
39209
39486
  }
39210
39487
  }
39211
- if (!protocolTextWasSuppressed || !protocolTagDetector.blockingOutput) {
39488
+ if (!chunk.candidates?.length || preparations.length > 0 || !protocolTextWasSuppressed || !protocolTagDetector.blockingOutput) {
39212
39489
  yield chunk;
39213
39490
  }
39214
39491
  }
39215
39492
  } catch (e) {
39216
39493
  streamError = e;
39217
39494
  }
39495
+ if (streamError === null && pendingProtocolParts.length > 0 && (hasToolCall || pendingProtocolParts.some((part) => part.functionCall !== void 0))) {
39496
+ protocolTagDetector.finish();
39497
+ if (protocolTagDetector.leaked) {
39498
+ pendingProtocolParts = [];
39499
+ } else {
39500
+ const parts = normalizeModelToolCallIds(
39501
+ takePendingProtocolParts(),
39502
+ usedToolCallIds,
39503
+ rawToolCallIdsInCurrentTurn,
39504
+ reservedToolCallIds
39505
+ );
39506
+ const chunk = {
39507
+ candidates: [{ content: { role: "model", parts } }]
39508
+ };
39509
+ syncFunctionCallsField(chunk, parts);
39510
+ hasToolCall ||= parts.some((part) => part.functionCall);
39511
+ allModelParts.push(...parts);
39512
+ yield chunk;
39513
+ }
39514
+ }
39218
39515
  let thoughtContentPart;
39219
39516
  const thoughtText = allModelParts.filter((part) => part.thought).map((part) => part.text).join("").trim();
39220
39517
  if (thoughtText !== "") {
@@ -39283,7 +39580,7 @@ This error was probably caused by cyclic schema references in one of the followi
39283
39580
  );
39284
39581
  }
39285
39582
  }
39286
- if (streamError === null && protocolTagDetector.leaked) {
39583
+ if (streamError === null && protocolTagDetector.leaked && !hasToolCall) {
39287
39584
  throw new InvalidStreamError(
39288
39585
  "Model response started with leaked protocol tags.",
39289
39586
  "PROTOCOL_TAG_LEAK"
@@ -39364,6 +39661,49 @@ This error was probably caused by cyclic schema references in one of the followi
39364
39661
  };
39365
39662
  }
39366
39663
  }
39664
+ /**
39665
+ * Prepend already-delivered text to the trailing model turn.
39666
+ *
39667
+ * Used by the transport-continuation path (issue #7832): after a socket cut
39668
+ * mid-response, the caller has seen text that `processStreamResponse`
39669
+ * deliberately did not persist, and the continuation attempt's own turn
39670
+ * carries only the resumed remainder. Without this, durable history would
39671
+ * hold an answer that starts mid-sentence — visibly wrong on `/compress`,
39672
+ * `--resume`, and every later turn's context.
39673
+ *
39674
+ * The delivered text is merged into the turn's first plain-text part (kept
39675
+ * after any leading thought part, matching the
39676
+ * `[thoughtPart?, ...text]` shape `processStreamResponse` produces), or
39677
+ * inserted as a new part when the continuation returned no text of its own.
39678
+ * Overlap is deduped by the same helper the output-recovery merge uses, so a
39679
+ * model that replays part of its previous tail does not double it.
39680
+ */
39681
+ prependTextToLastModelTurn(deliveredText) {
39682
+ if (deliveredText.length === 0) return;
39683
+ const lastEntry = this.history.at(-1);
39684
+ if (lastEntry?.role !== "model") {
39685
+ debugLogger22.warn(
39686
+ "[TRANSPORT_CONTINUATION] Trailing entry is not a model turn; dropping the delivered-text merge.",
39687
+ { role: lastEntry?.role ?? "undefined" }
39688
+ );
39689
+ return;
39690
+ }
39691
+ const parts = [...lastEntry.parts ?? []];
39692
+ const textIndex = parts.findIndex(isPlainTextPart);
39693
+ if (textIndex < 0) {
39694
+ const insertAt = parts.findIndex((part) => !part.thought);
39695
+ parts.splice(insertAt < 0 ? parts.length : insertAt, 0, {
39696
+ text: deliveredText
39697
+ });
39698
+ } else {
39699
+ const continuationPart = parts[textIndex];
39700
+ parts[textIndex] = {
39701
+ ...continuationPart,
39702
+ text: deliveredText + getRecoveryContinuationSuffix(deliveredText, continuationPart.text)
39703
+ };
39704
+ }
39705
+ lastEntry.parts = parts;
39706
+ }
39367
39707
  /**
39368
39708
  * Merge `pairCount` trailing (user_recovery, model_continuation) pairs back
39369
39709
  * into the model turn that precedes them. Used after the output-token
@@ -84989,7 +85329,7 @@ async function runManagedRememberByAgent(params) {
84989
85329
  wrapUserContent: true
84990
85330
  }),
84991
85331
  systemPrompt: buildRememberSystemPrompt(memoryPrompt),
84992
- maxTurns: 6,
85332
+ maxTurns: params.config.getMemoryAgentMaxTurns() ?? 6,
84993
85333
  maxTimeMinutes: params.config.getMemoryAgentTimeoutMinutes() ?? 5,
84994
85334
  extraHistory: params.contextMode === "clean" ? [] : void 0,
84995
85335
  preserveEmptyExtraHistory: params.contextMode === "clean",
@@ -85235,7 +85575,7 @@ async function planManagedAutoMemoryDreamByAgent(config, projectRoot, abortSigna
85235
85575
  config: scopedConfig,
85236
85576
  taskPrompt: buildConsolidationTaskPrompt(memoryRoot, transcriptDir),
85237
85577
  systemPrompt: DREAM_AGENT_SYSTEM_PROMPT,
85238
- maxTurns: MAX_TURNS,
85578
+ maxTurns: config.getMemoryAgentMaxTurns() ?? MAX_TURNS,
85239
85579
  maxTimeMinutes: config.getMemoryAgentTimeoutMinutes() ?? MAX_TIME_MINUTES,
85240
85580
  tools: [
85241
85581
  ToolNames.READ_FILE,
@@ -85616,7 +85956,7 @@ async function runSkillReviewByAgent(params) {
85616
85956
  config: scopedConfig,
85617
85957
  taskPrompt: await buildTaskPrompt(params.projectRoot),
85618
85958
  systemPrompt: SKILL_REVIEW_SYSTEM_PROMPT,
85619
- maxTurns: params.maxTurns ?? DEFAULT_AUTO_SKILL_MAX_TURNS,
85959
+ maxTurns: params.maxTurns ?? params.config.getMemoryAgentMaxTurns() ?? DEFAULT_AUTO_SKILL_MAX_TURNS,
85620
85960
  maxTimeMinutes: params.timeoutMs !== void 0 ? params.timeoutMs / 6e4 : params.config.getMemoryAgentTimeoutMinutes() ?? DEFAULT_AUTO_SKILL_TIMEOUT_MS / 6e4,
85621
85961
  tools: [
85622
85962
  ToolNames.READ_FILE,
@@ -138860,7 +139200,7 @@ async function runAutoMemoryExtractionByAgent(config, projectRoot) {
138860
139200
  topicSummaries
138861
139201
  ),
138862
139202
  systemPrompt: EXTRACTION_AGENT_SYSTEM_PROMPT,
138863
- maxTurns: 5,
139203
+ maxTurns: config.getMemoryAgentMaxTurns() ?? 5,
138864
139204
  maxTimeMinutes: config.getMemoryAgentTimeoutMinutes() ?? 2,
138865
139205
  tools: [
138866
139206
  ToolNames.READ_FILE,
@@ -142242,7 +142582,6 @@ var GeminiClient = class _GeminiClient {
142242
142582
  skillsModified: this.skillsModifiedInSession,
142243
142583
  enabled: autoSkillEnabled,
142244
142584
  threshold: AUTO_SKILL_THRESHOLD,
142245
- maxTurns: DEFAULT_AUTO_SKILL_MAX_TURNS,
142246
142585
  confirmBeforePersist: this.config.getAutoSkillConfirmEnabled()
142247
142586
  });
142248
142587
  if (skillReviewResult.status === "scheduled") {
@@ -145613,6 +145952,7 @@ var Config = class _Config {
145613
145952
  enableAutoSkill;
145614
145953
  autoSkillConfirm;
145615
145954
  memoryAgentTimeoutMinutes;
145955
+ memoryAgentMaxTurns;
145616
145956
  fastModel;
145617
145957
  webSearchSettings;
145618
145958
  webSearchNoticeEmitted = false;
@@ -145928,6 +146268,7 @@ var Config = class _Config {
145928
146268
  this.enableAutoSkill = params.enableAutoSkill ?? false;
145929
146269
  this.autoSkillConfirm = params.autoSkillConfirm ?? true;
145930
146270
  this.memoryAgentTimeoutMinutes = params.memoryAgentTimeoutMinutes !== void 0 && params.memoryAgentTimeoutMinutes >= 0 ? params.memoryAgentTimeoutMinutes : void 0;
146271
+ this.memoryAgentMaxTurns = params.memoryAgentMaxTurns !== void 0 && Number.isInteger(params.memoryAgentMaxTurns) && params.memoryAgentMaxTurns >= 0 ? params.memoryAgentMaxTurns : void 0;
145931
146272
  this.fastModel = params.fastModel || void 0;
145932
146273
  this.webSearchSettings = params.webSearch;
145933
146274
  this.visionModel = params.visionModel || void 0;
@@ -149243,6 +149584,14 @@ var Config = class _Config {
149243
149584
  getMemoryAgentTimeoutMinutes() {
149244
149585
  return this.memoryAgentTimeoutMinutes;
149245
149586
  }
149587
+ /**
149588
+ * Max turns for background memory agents. Resolves the
149589
+ * `memory.agentMaxTurns` setting. Unset means each agent's built-in default;
149590
+ * 0 disables the turn limit.
149591
+ */
149592
+ getMemoryAgentMaxTurns() {
149593
+ return this.memoryAgentMaxTurns;
149594
+ }
149246
149595
  getPreventSystemSleepEnabled() {
149247
149596
  return this.preventSystemSleep && !this.isSafeMode();
149248
149597
  }
@@ -149982,7 +150331,7 @@ var Config = class _Config {
149982
150331
  }
149983
150332
  if (!enabled) return;
149984
150333
  registry.registerFactory(ToolNames.IMAGE_GEN, async () => {
149985
- const { ImageGenTool } = await import("./image-gen-UC7XVHI7.js");
150334
+ const { ImageGenTool } = await import("./image-gen-2ZWPS42A.js");
149986
150335
  return new ImageGenTool(this);
149987
150336
  });
149988
150337
  }
@@ -150029,19 +150378,19 @@ var Config = class _Config {
150029
150378
  }, "registerGoalWorkerTools");
150030
150379
  if (this.getBareMode()) {
150031
150380
  await registerLazy(ToolNames.READ_FILE, async () => {
150032
- const { ReadFileTool } = await import("./read-file-HXJXHBI6.js");
150381
+ const { ReadFileTool } = await import("./read-file-2T54FYZV.js");
150033
150382
  return new ReadFileTool(this);
150034
150383
  });
150035
150384
  await registerLazy(ToolNames.EDIT, async () => {
150036
- const { EditTool } = await import("./edit-J7SW6UP6.js");
150385
+ const { EditTool } = await import("./edit-YK3UP6D2.js");
150037
150386
  return new EditTool(this);
150038
150387
  });
150039
150388
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
150040
- const { NotebookEditTool } = await import("./notebook-edit-EZISE7IC.js");
150389
+ const { NotebookEditTool } = await import("./notebook-edit-373IQQLE.js");
150041
150390
  return new NotebookEditTool(this);
150042
150391
  });
150043
150392
  await registerLazy(ToolNames.SHELL, async () => {
150044
- const { ShellTool: ShellTool2 } = await import("./shell-GLC6OP3C.js");
150393
+ const { ShellTool: ShellTool2 } = await import("./shell-RT5DBH6B.js");
150045
150394
  return new ShellTool2(this);
150046
150395
  });
150047
150396
  await registerGoalWorkerTools();
@@ -150053,7 +150402,7 @@ var Config = class _Config {
150053
150402
  }
150054
150403
  await registerGoalWorkerTools();
150055
150404
  await registerLazy(ToolNames.TOOL_SEARCH, async () => {
150056
- const { ToolSearchTool } = await import("./tool-search-DEAS54VG.js");
150405
+ const { ToolSearchTool } = await import("./tool-search-2AOU77H4.js");
150057
150406
  return new ToolSearchTool(this);
150058
150407
  });
150059
150408
  await registerLazy(ToolNames.READ_MCP_RESOURCE, async () => {
@@ -150061,7 +150410,7 @@ var Config = class _Config {
150061
150410
  return new ReadMcpResourceTool(this);
150062
150411
  });
150063
150412
  await registerLazy(ToolNames.AGENT, async () => {
150064
- const { AgentTool: AgentTool2 } = await import("./agent-PE37ARLM.js");
150413
+ const { AgentTool: AgentTool2 } = await import("./agent-RB6LCRZX.js");
150065
150414
  return new AgentTool2(this);
150066
150415
  });
150067
150416
  await registerLazy(ToolNames.LIST_AGENTS, async () => {
@@ -150073,11 +150422,11 @@ var Config = class _Config {
150073
150422
  return new TaskStopTool(this);
150074
150423
  });
150075
150424
  await registerLazy(ToolNames.SEND_MESSAGE, async () => {
150076
- const { SendMessageTool } = await import("./send-message-HGCVVDTZ.js");
150425
+ const { SendMessageTool } = await import("./send-message-LHJLVWFD.js");
150077
150426
  return new SendMessageTool(this);
150078
150427
  });
150079
150428
  await registerLazy(ToolNames.SKILL, async () => {
150080
- const { SkillTool } = await import("./skill-C7W6M4GO.js");
150429
+ const { SkillTool } = await import("./skill-LVGA3ATZ.js");
150081
150430
  return new SkillTool(this);
150082
150431
  });
150083
150432
  await registerLazy(ToolNames.LS, async () => {
@@ -150085,11 +150434,11 @@ var Config = class _Config {
150085
150434
  return new LSTool(this);
150086
150435
  });
150087
150436
  await registerLazy(ToolNames.READ_FILE, async () => {
150088
- const { ReadFileTool } = await import("./read-file-HXJXHBI6.js");
150437
+ const { ReadFileTool } = await import("./read-file-2T54FYZV.js");
150089
150438
  return new ReadFileTool(this);
150090
150439
  });
150091
150440
  await registerLazy(ToolNames.ZOOM_IMAGE, async () => {
150092
- const { ZoomImageTool } = await import("./zoom-image-O5YCB7WN.js");
150441
+ const { ZoomImageTool } = await import("./zoom-image-E3VHRCFU.js");
150093
150442
  return new ZoomImageTool(this);
150094
150443
  });
150095
150444
  if (this.getUseRipgrep()) {
@@ -150104,7 +150453,7 @@ var Config = class _Config {
150104
150453
  recordStartupEvent("config_initialize_ripgrep_probe_end");
150105
150454
  if (useRipgrep) {
150106
150455
  await registerLazy(ToolNames.GREP, async () => {
150107
- const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-MCETPF2E.js");
150456
+ const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-3H72KY7S.js");
150108
150457
  return new RipGrepTool2(this);
150109
150458
  });
150110
150459
  } else {
@@ -150117,7 +150466,7 @@ var Config = class _Config {
150117
150466
  )
150118
150467
  );
150119
150468
  await registerLazy(ToolNames.GREP, async () => {
150120
- const { GrepTool } = await import("./grep-UJMPVZER.js");
150469
+ const { GrepTool } = await import("./grep-SQ7RD7SV.js");
150121
150470
  return new GrepTool(this);
150122
150471
  });
150123
150472
  }
@@ -150125,32 +150474,32 @@ var Config = class _Config {
150125
150474
  recordStartupEvent("config_initialize_ripgrep_probe_start");
150126
150475
  recordStartupEvent("config_initialize_ripgrep_probe_end");
150127
150476
  await registerLazy(ToolNames.GREP, async () => {
150128
- const { GrepTool } = await import("./grep-UJMPVZER.js");
150477
+ const { GrepTool } = await import("./grep-SQ7RD7SV.js");
150129
150478
  return new GrepTool(this);
150130
150479
  });
150131
150480
  }
150132
150481
  await registerLazy(ToolNames.GLOB, async () => {
150133
- const { GlobTool } = await import("./glob-F3EAUDAX.js");
150482
+ const { GlobTool } = await import("./glob-SKUYGTF2.js");
150134
150483
  return new GlobTool(this);
150135
150484
  });
150136
150485
  await registerLazy(ToolNames.EDIT, async () => {
150137
- const { EditTool } = await import("./edit-J7SW6UP6.js");
150486
+ const { EditTool } = await import("./edit-YK3UP6D2.js");
150138
150487
  return new EditTool(this);
150139
150488
  });
150140
150489
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
150141
- const { NotebookEditTool } = await import("./notebook-edit-EZISE7IC.js");
150490
+ const { NotebookEditTool } = await import("./notebook-edit-373IQQLE.js");
150142
150491
  return new NotebookEditTool(this);
150143
150492
  });
150144
150493
  await registerLazy(ToolNames.WRITE_FILE, async () => {
150145
- const { WriteFileTool: WriteFileTool2 } = await import("./write-file-RQ4DG5RY.js");
150494
+ const { WriteFileTool: WriteFileTool2 } = await import("./write-file-MOM4JDHG.js");
150146
150495
  return new WriteFileTool2(this);
150147
150496
  });
150148
150497
  await registerLazy(ToolNames.SHELL, async () => {
150149
- const { ShellTool: ShellTool2 } = await import("./shell-GLC6OP3C.js");
150498
+ const { ShellTool: ShellTool2 } = await import("./shell-RT5DBH6B.js");
150150
150499
  return new ShellTool2(this);
150151
150500
  });
150152
150501
  await registerLazy(ToolNames.TODO_WRITE, async () => {
150153
- const { TodoWriteTool } = await import("./todoWrite-YKAA57W2.js");
150502
+ const { TodoWriteTool } = await import("./todoWrite-FTZWQRZH.js");
150154
150503
  return new TodoWriteTool(this);
150155
150504
  });
150156
150505
  const supportsUserInteraction = resolveInteractionMode(this) !== "headless";
@@ -150162,40 +150511,40 @@ var Config = class _Config {
150162
150511
  }
150163
150512
  if (!this.sdkMode && (supportsUserInteraction || options2?.forSubAgent)) {
150164
150513
  await registerLazy(ToolNames.EXIT_PLAN_MODE, async () => {
150165
- const { ExitPlanModeTool: ExitPlanModeTool2 } = await import("./exitPlanMode-4ZFY7KUH.js");
150514
+ const { ExitPlanModeTool: ExitPlanModeTool2 } = await import("./exitPlanMode-K5Y3REU2.js");
150166
150515
  return new ExitPlanModeTool2(this);
150167
150516
  });
150168
150517
  }
150169
150518
  if (!this.sdkMode && supportsUserInteraction) {
150170
150519
  await registerLazy(ToolNames.ENTER_PLAN_MODE, async () => {
150171
- const { EnterPlanModeTool } = await import("./enterPlanMode-GDSTEFSM.js");
150520
+ const { EnterPlanModeTool } = await import("./enterPlanMode-TZAYQ5MP.js");
150172
150521
  return new EnterPlanModeTool(this);
150173
150522
  });
150174
150523
  }
150175
150524
  await registerLazy(ToolNames.ENTER_WORKTREE, async () => {
150176
- const { EnterWorktreeTool } = await import("./enter-worktree-NRLOHRB6.js");
150525
+ const { EnterWorktreeTool } = await import("./enter-worktree-QMVQW7UG.js");
150177
150526
  return new EnterWorktreeTool(this);
150178
150527
  });
150179
150528
  await registerLazy(ToolNames.EXIT_WORKTREE, async () => {
150180
- const { ExitWorktreeTool } = await import("./exit-worktree-ARVID7DF.js");
150529
+ const { ExitWorktreeTool } = await import("./exit-worktree-4EC7LBBC.js");
150181
150530
  return new ExitWorktreeTool(this);
150182
150531
  });
150183
150532
  await registerLazy(ToolNames.WEB_FETCH, async () => {
150184
- const { WebFetchTool } = await import("./web-fetch-Y5QQMPKA.js");
150533
+ const { WebFetchTool } = await import("./web-fetch-ZRXSV5AN.js");
150185
150534
  return new WebFetchTool(this);
150186
150535
  });
150187
150536
  if (resolveInteractionMode(this) === "interactive" && !this.sdkMode && !this.getScreenReader() && !options2?.forSubAgent) {
150188
150537
  await registerLazy(ToolNames.DISPLAY_IMAGE, async () => {
150189
- const { DisplayImageTool } = await import("./display-image-VS3TXYQH.js");
150538
+ const { DisplayImageTool } = await import("./display-image-2WOG27DY.js");
150190
150539
  return new DisplayImageTool(this);
150191
150540
  });
150192
150541
  }
150193
150542
  if (this.webSearchSettings?.enabled) {
150194
- const { evaluateWebSearchGate } = await import("./web-search-QKKEU723.js");
150543
+ const { evaluateWebSearchGate } = await import("./web-search-WOLV3L6T.js");
150195
150544
  const gate = evaluateWebSearchGate(this);
150196
150545
  if (gate.ok) {
150197
150546
  await registerLazy(ToolNames.WEB_SEARCH, async () => {
150198
- const { WebSearchTool } = await import("./web-search-QKKEU723.js");
150547
+ const { WebSearchTool } = await import("./web-search-WOLV3L6T.js");
150199
150548
  return new WebSearchTool(this);
150200
150549
  });
150201
150550
  } else if (!this.webSearchNoticeEmitted && !options2?.forSubAgent) {
@@ -150247,7 +150596,7 @@ var Config = class _Config {
150247
150596
  });
150248
150597
  if (this.isAgentTeamEnabled()) {
150249
150598
  await registerLazy(ToolNames.TEAM_CREATE, async () => {
150250
- const { TeamCreateTool } = await import("./team-create-HBIJ7NHT.js");
150599
+ const { TeamCreateTool } = await import("./team-create-ZVPQIXCP.js");
150251
150600
  return new TeamCreateTool(this);
150252
150601
  });
150253
150602
  await registerLazy(ToolNames.TEAM_DELETE, async () => {
@@ -150255,15 +150604,15 @@ var Config = class _Config {
150255
150604
  return new TeamDeleteTool(this);
150256
150605
  });
150257
150606
  await registerLazy(ToolNames.TEAM_PLAN_APPROVAL, async () => {
150258
- const { TeamPlanApprovalTool } = await import("./team-plan-approval-IBJOKS4J.js");
150607
+ const { TeamPlanApprovalTool } = await import("./team-plan-approval-5UHUBY3W.js");
150259
150608
  return new TeamPlanApprovalTool(this);
150260
150609
  });
150261
150610
  await registerLazy(ToolNames.TASK_CREATE, async () => {
150262
- const { TaskCreateTool } = await import("./task-create-CSCEG4SM.js");
150611
+ const { TaskCreateTool } = await import("./task-create-4ALZMGP5.js");
150263
150612
  return new TaskCreateTool(this);
150264
150613
  });
150265
150614
  await registerLazy(ToolNames.TASK_UPDATE, async () => {
150266
- const { TaskUpdateTool } = await import("./task-update-C52LNFU5.js");
150615
+ const { TaskUpdateTool } = await import("./task-update-IKCEEWJ6.js");
150267
150616
  return new TaskUpdateTool(this);
150268
150617
  });
150269
150618
  await registerLazy(ToolNames.TASK_LIST, async () => {
@@ -150273,16 +150622,16 @@ var Config = class _Config {
150273
150622
  }
150274
150623
  if (this.isWorkflowsEnabled()) {
150275
150624
  await registerLazy(ToolNames.WORKFLOW, async () => {
150276
- const { WorkflowTool } = await import("./workflow-PWIU6Q2M.js");
150625
+ const { WorkflowTool } = await import("./workflow-F63ES3OB.js");
150277
150626
  return new WorkflowTool(this);
150278
150627
  });
150279
150628
  }
150280
150629
  if (this.isComputerUseEnabled()) {
150281
- const { registerComputerUseTools } = await import("./computer-use-UJMK6JQU.js");
150630
+ const { registerComputerUseTools } = await import("./computer-use-MDOMIVTL.js");
150282
150631
  await registerComputerUseTools(registerLazy, this);
150283
150632
  }
150284
150633
  await registerLazy(ToolNames.MONITOR, async () => {
150285
- const { MonitorTool } = await import("./monitor-TGSVSAZZ.js");
150634
+ const { MonitorTool } = await import("./monitor-6Y3NDMTI.js");
150286
150635
  return new MonitorTool(this);
150287
150636
  });
150288
150637
  if (this.pendingMcpBudgetCallback) {