@qwen-code/qwen-code 0.19.10 → 0.19.11-nightly.20260718.767a32484

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 (307) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +11 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +15 -14
  3. package/bundled/qc-helper/docs/features/approval-mode.md +2 -2
  4. package/bundled/qc-helper/docs/features/channels/dingtalk.md +30 -0
  5. package/bundled/qc-helper/docs/features/channels/overview.md +66 -17
  6. package/bundled/qc-helper/docs/features/channels/wecom.md +8 -7
  7. package/bundled/qc-helper/docs/features/sandbox.md +2 -0
  8. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +42 -7
  9. package/bundled/qc-helper/docs/qwen-serve.md +77 -46
  10. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
  11. package/bundled/review/SKILL.md +163 -403
  12. package/chunks/{MaxSizedBox-67ODZ4SZ.js → MaxSizedBox-ZFHA4QEQ.js} +30 -30
  13. package/chunks/{StandaloneSessionPicker-SIPBQT5Z.js → StandaloneSessionPicker-YRWOQVQA.js} +44 -44
  14. package/chunks/{acpAgent-VPZJXLFX.js → acpAgent-U2P2IESZ.js} +1423 -487
  15. package/chunks/{agent-Z7NWL6XL.js → agent-GQXX6X5Y.js} +26 -26
  16. package/chunks/{agent-headless-73HZ6ROQ.js → agent-headless-3572NBCK.js} +26 -26
  17. package/chunks/{anthropicContentGenerator-56U3YCP2.js → anthropicContentGenerator-Y65DMM64.js} +103 -18
  18. package/chunks/{artifact-tool-BWZZJ42H.js → artifact-tool-WR7I2XON.js} +2 -2
  19. package/chunks/{askUserQuestion-WU3S5A5T.js → askUserQuestion-B4FUTPHD.js} +2 -44
  20. package/chunks/{bridge-XFKW6S7Q.js → bridge-N5RMGD7G.js} +31 -33
  21. package/chunks/{ca-C2JTT2N5.js → ca-M3GQQ26D.js} +7 -2
  22. package/chunks/channel-worker-group-HZVJKLGX.js +21 -0
  23. package/chunks/{channel-worker-manager-5RWKSGEU.js → channel-worker-manager-3WDK4HNS.js} +34 -10
  24. package/chunks/{channel-worker-supervisor-PCDAZN4D.js → channel-worker-supervisor-U2W6Q5F7.js} +6 -4
  25. package/chunks/{chunk-YYPXHMWO.js → chunk-2XRGFF5K.js} +6 -6
  26. package/chunks/{chunk-ZKMGAFYV.js → chunk-2YSZE74N.js} +2 -2
  27. package/chunks/{chunk-L5U3ELZX.js → chunk-335ECZTA.js} +1 -1
  28. package/chunks/{chunk-5EBKKSBX.js → chunk-336KPNNV.js} +2 -2
  29. package/chunks/{chunk-Q5GLXH5Q.js → chunk-3CL5SEDT.js} +6 -6
  30. package/chunks/{chunk-2FO5GFKZ.js → chunk-3DJY4IFO.js} +1 -1
  31. package/chunks/{chunk-CJFNEBYB.js → chunk-3NWYQ7FX.js} +2 -2
  32. package/chunks/{chunk-WIASPMLX.js → chunk-3X2CFOUM.js} +358 -298
  33. package/chunks/{chunk-K7CRWKOE.js → chunk-3YJZ6WNY.js} +5812 -4520
  34. package/chunks/{chunk-Y66VOBRP.js → chunk-4CA4WUMS.js} +2 -2
  35. package/chunks/{chunk-LQIDP6K5.js → chunk-4CHDYDG3.js} +1 -1
  36. package/chunks/{chunk-TISZXPAX.js → chunk-4HCYNDMG.js} +1 -1
  37. package/chunks/chunk-4JBTZBCW.js +140 -0
  38. package/chunks/{chunk-TV6K2FB4.js → chunk-4RPARQ5D.js} +2 -2
  39. package/chunks/{chunk-RCEEXIOO.js → chunk-4XCVGEEX.js} +3 -3
  40. package/chunks/{chunk-N6FXRR6P.js → chunk-57RWF6R7.js} +1 -1
  41. package/chunks/chunk-5O34IMY5.js +59 -0
  42. package/chunks/{chunk-5LROA5W4.js → chunk-5QRK2VZG.js} +8 -8
  43. package/chunks/{chunk-7L4XBYVW.js → chunk-632KROVU.js} +10 -3
  44. package/chunks/{chunk-65N2J6V2.js → chunk-64XGKNSI.js} +3 -3
  45. package/chunks/{chunk-P6LART6G.js → chunk-66IT3EY2.js} +1059 -129
  46. package/chunks/{chunk-FXMC7SL2.js → chunk-6ITLKEOZ.js} +3 -3
  47. package/chunks/{chunk-F7NXQH4Y.js → chunk-6YIRYY3P.js} +1 -1
  48. package/chunks/{chunk-GGJII3FM.js → chunk-6Z5NRZVU.js} +92 -3
  49. package/chunks/{chunk-DPFBNG72.js → chunk-AEKYFMYE.js} +1 -1
  50. package/chunks/{chunk-2UUAIFQO.js → chunk-ANRANWVE.js} +9 -1
  51. package/chunks/{chunk-SXU3KKNI.js → chunk-ATJ7H5AS.js} +419 -76
  52. package/chunks/{chunk-6GETGQWP.js → chunk-C5NSOSF4.js} +64 -18
  53. package/chunks/{chunk-TQBODCFD.js → chunk-CMVFTMRD.js} +251 -3
  54. package/chunks/{chunk-DK33QJ3V.js → chunk-CZSAIBUB.js} +733 -14
  55. package/chunks/{chunk-3MX7D6QN.js → chunk-DASWPKXR.js} +32 -4
  56. package/chunks/{chunk-JSJFKYWT.js → chunk-DPSHAB47.js} +2 -2
  57. package/chunks/{chunk-7MJAZMXK.js → chunk-ECZFTRTP.js} +29 -78
  58. package/chunks/{chunk-H3FQOPPS.js → chunk-EKG3BHQY.js} +4 -4
  59. package/chunks/{chunk-FSA7ERJ2.js → chunk-F2RR4HO2.js} +1 -1
  60. package/chunks/{chunk-EQY6POVO.js → chunk-F5XYN5VF.js} +2 -2
  61. package/chunks/chunk-FEOZBUMT.js +77 -0
  62. package/chunks/{chunk-L62SEJWY.js → chunk-FHUXCRAF.js} +4 -4
  63. package/chunks/{chunk-OFEVHGVU.js → chunk-FSJGBUQI.js} +818 -31
  64. package/chunks/{chunk-FBU7WRZI.js → chunk-FUTHTZVV.js} +1 -1
  65. package/chunks/{chunk-ZRKBI3DP.js → chunk-FZRES4GK.js} +1 -1
  66. package/chunks/{chunk-OKAIGAYW.js → chunk-G274ETR6.js} +3 -3
  67. package/chunks/{chunk-6GKMJPOC.js → chunk-GA3WUOO7.js} +5 -5
  68. package/chunks/{chunk-X362TMXZ.js → chunk-GAQOQMHY.js} +8 -6
  69. package/chunks/{chunk-WLXYAKV7.js → chunk-GG6RSNWS.js} +9 -4
  70. package/chunks/{chunk-CEW4HDPK.js → chunk-GUNTLALV.js} +2484 -362
  71. package/chunks/{chunk-LXLTBIDP.js → chunk-HCCR43AY.js} +1 -1
  72. package/chunks/{chunk-RDRVMDWV.js → chunk-HIMIG6PI.js} +11 -11
  73. package/chunks/{chunk-MO7O5722.js → chunk-HQXQCIT2.js} +45 -5
  74. package/chunks/{chunk-LTNI523B.js → chunk-HT7L5FCZ.js} +28 -5
  75. package/chunks/{chunk-7NAWTFVY.js → chunk-IENO2YAT.js} +3 -3
  76. package/chunks/{chunk-3XJFUTNM.js → chunk-IK5TYYVR.js} +59 -12
  77. package/chunks/{chunk-AAR5SGMD.js → chunk-IVKLDHU6.js} +7 -5
  78. package/chunks/{chunk-6W6DI34P.js → chunk-IX7O5WI3.js} +180 -8
  79. package/chunks/{chunk-SPJQO2CE.js → chunk-J2MKYJKZ.js} +2 -2
  80. package/chunks/{chunk-SPUYQB4T.js → chunk-JBAQ5BYX.js} +1 -1
  81. package/chunks/{chunk-TYLOFD2U.js → chunk-JCJPZMJV.js} +1 -1
  82. package/chunks/chunk-JDIUK2Y3.js +226 -0
  83. package/chunks/{chunk-L37RC7MQ.js → chunk-JUVTV4NF.js} +1 -1
  84. package/chunks/{chunk-WDWJ4OQJ.js → chunk-K2GBHL73.js} +4 -4
  85. package/chunks/{chunk-HHEFI4RP.js → chunk-KEVDWH3U.js} +857 -137
  86. package/chunks/{chunk-YU56QGXX.js → chunk-KTKETHMY.js} +1 -1
  87. package/chunks/{chunk-WDW64OW3.js → chunk-LGY7PG7Q.js} +5 -5
  88. package/chunks/{chunk-E67NFMF4.js → chunk-LKR7QQ63.js} +37 -3
  89. package/chunks/{chunk-4YWLED2A.js → chunk-LSFVUGXT.js} +9 -6
  90. package/chunks/{chunk-W34A5MJH.js → chunk-LTD3CHGS.js} +1 -1
  91. package/chunks/chunk-LXXMOYPL.js +22 -0
  92. package/chunks/{chunk-BBNVFRGD.js → chunk-MI2V6IWU.js} +1 -1
  93. package/chunks/{chunk-UFOKA4PR.js → chunk-O2K6BLPZ.js} +114 -4
  94. package/chunks/{chunk-B5I2IIWY.js → chunk-OBYAX5QZ.js} +6 -6
  95. package/chunks/{chunk-V7EQTZYR.js → chunk-OCQ2QTFJ.js} +203 -47
  96. package/chunks/{chunk-VBRRNQB7.js → chunk-OPVIKLKK.js} +112 -25
  97. package/chunks/{chunk-2Z5UX4KI.js → chunk-OSSDHJDU.js} +1 -1
  98. package/chunks/{chunk-TTUO4DNG.js → chunk-OXOEOOQU.js} +126 -734
  99. package/chunks/{chunk-4FMG7EDJ.js → chunk-PWYLF7SS.js} +79 -16
  100. package/chunks/chunk-QFEY6OXH.js +45 -0
  101. package/chunks/{chunk-YX4LLZ3D.js → chunk-QPRDXJIC.js} +115 -40
  102. package/chunks/{chunk-7R4DPSRA.js → chunk-R3VWUU2E.js} +1 -1
  103. package/chunks/{chunk-XLIRF7IK.js → chunk-S4N3G4BB.js} +1 -1
  104. package/chunks/{chunk-ARKANCNX.js → chunk-SGPFJMRP.js} +1 -1
  105. package/chunks/{chunk-WTSXKLG5.js → chunk-SUARMD4Q.js} +1 -1
  106. package/chunks/{chunk-PZL23GTM.js → chunk-T3W4SDRB.js} +2 -0
  107. package/chunks/chunk-T4TZQJ7W.js +48 -0
  108. package/chunks/{chunk-K4PZ5F5T.js → chunk-TVYM3Q3J.js} +101 -8
  109. package/chunks/{chunk-4LD5APFL.js → chunk-TYQMGACW.js} +1 -0
  110. package/chunks/{chunk-6OATMEYN.js → chunk-U2LNTX56.js} +12 -4
  111. package/chunks/{chunk-422XAKCK.js → chunk-U2XBPBO3.js} +4 -3
  112. package/chunks/{chunk-LNUXFLLJ.js → chunk-U4FJ26D2.js} +54 -6
  113. package/chunks/{chunk-ZQTZXVHP.js → chunk-U6OPT4H2.js} +4 -18
  114. package/chunks/{chunk-7NFB7LBQ.js → chunk-UE5TZ55T.js} +8 -0
  115. package/chunks/{chunk-CUUXANEQ.js → chunk-URP6O2PP.js} +6 -1
  116. package/chunks/{chunk-GDQQRV43.js → chunk-V2FRLYHN.js} +3 -3
  117. package/chunks/{chunk-WIEO4CWB.js → chunk-VAJS2E2D.js} +1 -1
  118. package/chunks/{chunk-TXY2C3D2.js → chunk-VNN3JNYT.js} +1 -1
  119. package/chunks/{chunk-YHN5SUIJ.js → chunk-W7H223ZZ.js} +1 -1
  120. package/chunks/{chunk-WX6SD4IQ.js → chunk-WEPXQKGP.js} +1 -1
  121. package/chunks/{chunk-KSO42X3Z.js → chunk-X6YQWCIJ.js} +21 -2
  122. package/chunks/{chunk-URU5UEK6.js → chunk-XA7OKDWM.js} +135 -68
  123. package/chunks/{chunk-Q6TUALBE.js → chunk-XAAEDML2.js} +1 -1
  124. package/chunks/{chunk-KKRTYONM.js → chunk-XSPFQQRE.js} +3 -3
  125. package/chunks/{chunk-OATTJGPJ.js → chunk-Y72B36CP.js} +7 -7
  126. package/chunks/{chunk-ZPAHLFZU.js → chunk-Z2LBNX3R.js} +2 -2
  127. package/chunks/{chunk-XXJKGHZV.js → chunk-ZTSDZQZO.js} +131 -4
  128. package/chunks/{computer-use-IYTX45WA.js → computer-use-UIFBH25Y.js} +26 -26
  129. package/chunks/{config-utils-CFT33LTP.js → config-utils-2LHI7JXU.js} +3 -3
  130. package/chunks/{contextCommand-272V77WU.js → contextCommand-VGZHKEH2.js} +28 -28
  131. package/chunks/{create-sub-session-WNX2OQVX.js → create-sub-session-DIJOV6HV.js} +2 -2
  132. package/chunks/{create-sub-session-CBJMQLYP.js → create-sub-session-OFVI4H6I.js} +26 -26
  133. package/chunks/{cron-create-36TIFKRT.js → cron-create-34GVLSW5.js} +4 -4
  134. package/chunks/{cron-delete-OQD3WULU.js → cron-delete-NMVKUL45.js} +4 -4
  135. package/chunks/{cron-list-4533T2FH.js → cron-list-277ZOR7L.js} +4 -4
  136. package/chunks/{daemon-RNGFPMAB.js → daemon-72MEV3TY.js} +361 -84
  137. package/chunks/daemon-status-provider-ZJJ6AOG2.js +75 -0
  138. package/chunks/{de-2VCDRDGU.js → de-56TMDIKS.js} +7 -2
  139. package/chunks/{dist-3V3ZV6ML.js → dist-4W3UGU2A.js} +1 -1
  140. package/chunks/{dist-HNN7DR2L.js → dist-G6QCGO2K.js} +58 -30
  141. package/chunks/{dist-ERCPDVA6.js → dist-ILVRL322.js} +4 -51
  142. package/chunks/{dist-PHEPJLXD.js → dist-KEZ5JWH4.js} +2 -2
  143. package/chunks/{dist-JZE7F6YR.js → dist-LQHDHBPP.js} +1 -1
  144. package/chunks/{dist-MOEC47TR.js → dist-SVHAGOLN.js} +1 -1
  145. package/chunks/{earlyInputCapture-EN4BRREQ.js → earlyInputCapture-NPF4PVUE.js} +27 -27
  146. package/chunks/{edit-OMAF2QDR.js → edit-F7CT6NZH.js} +27 -27
  147. package/chunks/{en-NJCA3TAA.js → en-AXS2N62H.js} +12 -3
  148. package/chunks/{enter-worktree-BBZX52HG.js → enter-worktree-Z4ET3MZL.js} +26 -26
  149. package/chunks/{enterPlanMode-5NNFMBUY.js → enterPlanMode-VYR7T5NX.js} +27 -29
  150. package/chunks/{environment-7TEWMJYN.js → environment-MBTXL57Q.js} +28 -28
  151. package/chunks/{errors-I4VKVX3F.js → errors-HN36J4FR.js} +28 -28
  152. package/chunks/{exit-worktree-FUWRJI33.js → exit-worktree-RU7JYFMF.js} +26 -26
  153. package/chunks/exitPlanMode-LUBAWMZQ.js +390 -0
  154. package/chunks/{fast-path-ZA57TOH4.js → fast-path-RFT3CDNZ.js} +2 -2
  155. package/chunks/{fr-5F3E7WKD.js → fr-ZJPE5OVN.js} +7 -2
  156. package/chunks/{gemini-UOAKVXBG.js → gemini-37NTNKZF.js} +215 -231
  157. package/chunks/{geminiContentGenerator-G6UCE6MW.js → geminiContentGenerator-76HNOYNQ.js} +5 -5
  158. package/chunks/{glob-4GJQ2UFF.js → glob-DWD7JCZE.js} +32 -27
  159. package/chunks/{grep-5QSYXF2E.js → grep-NJRXFV5C.js} +32 -27
  160. package/chunks/{handleAutoUpdate-ULHNWL6R.js → handleAutoUpdate-7GBDXW6U.js} +30 -30
  161. package/chunks/{i18n-CYDUTF6F.js → i18n-MYD5VGED.js} +27 -27
  162. package/chunks/{initializer-NRFKUGIO.js → initializer-4DHPNAZG.js} +32 -32
  163. package/chunks/{installationInfo-WELKRHHE.js → installationInfo-RWOW6BZO.js} +27 -27
  164. package/chunks/{ja-66J6B53L.js → ja-57GG4QSL.js} +7 -2
  165. package/chunks/{keychain-token-storage-AU22CQI6.js → keychain-token-storage-K23CFKGN.js} +2 -2
  166. package/chunks/{list-JVDXEG2E.js → list-MMCNNHE7.js} +34 -34
  167. package/chunks/{loadedSettingsAdapter-WAM4VUTG.js → loadedSettingsAdapter-UK4JWPYU.js} +31 -31
  168. package/chunks/{loop-wakeup-MVUKDVCP.js → loop-wakeup-KCLY4XQM.js} +5 -5
  169. package/chunks/{ls-RXNIAQDE.js → ls-UNI4LAJ3.js} +4 -4
  170. package/chunks/{lsp-HB5LM5IL.js → lsp-HPACPJAN.js} +2 -2
  171. package/chunks/{mcp-YHOZN3ZM.js → mcp-AFCVA4UV.js} +31 -31
  172. package/chunks/{monitor-R7XZPJHQ.js → monitor-RK637BNO.js} +28 -27
  173. package/chunks/nonInteractiveCli-OUGWLHNV.js +129 -0
  174. package/chunks/{notebook-edit-6RNKE2L2.js → notebook-edit-LY2X3CMF.js} +27 -27
  175. package/chunks/{openaiContentGenerator-XNS5S64I.js → openaiContentGenerator-MDYDW7IA.js} +14 -14
  176. package/chunks/{pidfile-XE4RRR2P.js → pidfile-2NUYRLKB.js} +27 -27
  177. package/chunks/processUtils-7QH3VBVN.js +29 -0
  178. package/chunks/{pt-TFZO5Y6T.js → pt-MCGZ3RZ4.js} +7 -2
  179. package/chunks/{qwenContentGenerator-APDPJ3VN.js → qwenContentGenerator-3HT4TVDL.js} +28 -28
  180. package/chunks/{qwenOAuth2-LEYOU7RU.js → qwenOAuth2-3A4TJVZT.js} +5 -5
  181. package/chunks/{read-file-XSUWXSR7.js → read-file-NE4FREFR.js} +10 -10
  182. package/chunks/{read-mcp-resource-6LRTZKXI.js → read-mcp-resource-C6NT52T6.js} +2 -2
  183. package/chunks/{record-artifact-PMDTY4OS.js → record-artifact-ENCU7QCL.js} +2 -2
  184. package/chunks/{ripGrep-APB3CDMU.js → ripGrep-DBLXWQCJ.js} +26 -26
  185. package/chunks/{ru-4L4LFHIT.js → ru-GA3NZW5Q.js} +7 -2
  186. package/chunks/{run-qwen-serve-NWTGPERT.js → run-qwen-serve-3NOCI6IL.js} +63 -39
  187. package/chunks/{runtime-EIO3NQKR.js → runtime-ZI7DSZSS.js} +35 -35
  188. package/chunks/{scheduler-JJDZBDRN.js → scheduler-SOVEP5K7.js} +26 -26
  189. package/chunks/{send-message-SR4WSXP2.js → send-message-5IFPZTPE.js} +3 -3
  190. package/chunks/{serve-WTIPB3EI.js → serve-DB6OCXIA.js} +31 -31
  191. package/chunks/{server-NJPHQHLH.js → server-LDY4YVU4.js} +2257 -648
  192. package/chunks/{session-O4AO7FTS.js → session-D6OG5SKX.js} +99 -72
  193. package/chunks/{settings-HQNDK7TG.js → settings-L52ZV5LO.js} +30 -30
  194. package/chunks/{shell-UIXM6PWG.js → shell-IU27OY3Q.js} +28 -26
  195. package/chunks/{skill-3XMB4ULV.js → skill-BSOJT7LE.js} +12 -12
  196. package/chunks/{spawnChannel-3R632QRM.js → spawnChannel-HQAM25DD.js} +28 -29
  197. package/chunks/{src-USZKPUOC.js → src-7ZBIMTJZ.js} +130 -51
  198. package/chunks/{standalone-update-L5XW3D7K.js → standalone-update-77457VVK.js} +28 -28
  199. package/chunks/{startInteractiveUI-CPZOL2WB.js → startInteractiveUI-S7WC6EZG.js} +2310 -1835
  200. package/chunks/{syntheticOutput-YKFNUQZD.js → syntheticOutput-ULOVVLY4.js} +3 -3
  201. package/chunks/{task-create-NUFOHU53.js → task-create-V2DCDSET.js} +7 -7
  202. package/chunks/{task-list-Z2IKQY3S.js → task-list-DPL5ZN55.js} +5 -5
  203. package/chunks/{task-stop-KQFIVQTJ.js → task-stop-CPEQWOT6.js} +2 -2
  204. package/chunks/{task-update-HKADXSTD.js → task-update-ZR45M5Q7.js} +7 -7
  205. package/chunks/{team-create-XXPRF3IQ.js → team-create-CO7HSUON.js} +26 -26
  206. package/chunks/{team-delete-SDNTGZLG.js → team-delete-HIWXCWJU.js} +5 -5
  207. package/chunks/{team-plan-approval-EOTTKHDW.js → team-plan-approval-QDZF5YZY.js} +26 -26
  208. package/chunks/{theme-manager-P6UITO2L.js → theme-manager-UTUT3I4P.js} +27 -27
  209. package/chunks/todoWrite-HK6B3RHJ.js +358 -0
  210. package/chunks/{tool-search-DDNGK2LR.js → tool-search-2UUORA35.js} +11 -11
  211. package/chunks/{total-session-admission-PL5N7DNY.js → total-session-admission-NTWG6G3F.js} +32 -34
  212. package/chunks/{trustedFolders-C5LMF3UR.js → trustedFolders-YF37ZCN5.js} +27 -27
  213. package/chunks/update-relaunch-QFNHPMZZ.js +87 -0
  214. package/chunks/{updateCheck-QTVVISH7.js → updateCheck-B6O42VMD.js} +30 -28
  215. package/chunks/{validateNonInterActiveAuth-RY4RKBQG.js → validateNonInterActiveAuth-SCIWJ4CX.js} +65 -65
  216. package/chunks/{version-U45RYOSD.js → version-7DA6LAI3.js} +1 -1
  217. package/chunks/{web-fetch-ZSPR3PRR.js → web-fetch-B62SJXM2.js} +5 -6
  218. package/chunks/{workflow-TCIAQYOA.js → workflow-Q5WG4THP.js} +27 -27
  219. package/chunks/{workspace-providers-status-I3G2HYLY.js → workspace-providers-status-WWLAGWQW.js} +34 -34
  220. package/chunks/{workspace-registration-store-IH5GLZ6Y.js → workspace-registration-store-BVYQVY2H.js} +1 -1
  221. package/chunks/{workspace-registry-QEKBELIX.js → workspace-registry-OD7ACADD.js} +32 -34
  222. package/chunks/{workspace-service-ORKHGLP3.js → workspace-service-4LYJWS63.js} +37 -38
  223. package/chunks/{workspace-skills-status-D7QCNDYY.js → workspace-skills-status-P2AQLZZS.js} +32 -32
  224. package/chunks/{write-file-JGRQR5VM.js → write-file-TEPGXNM3.js} +60 -27
  225. package/chunks/{zh-FSAH32JB.js → zh-E34DZ2S3.js} +12 -3
  226. package/chunks/{zh-TW-D2YIE2LO.js → zh-TW-PEI2ZWUR.js} +12 -3
  227. package/cli-entry.js +92 -8
  228. package/cli.js +11 -11
  229. package/locales/ca.js +12 -2
  230. package/locales/de.js +12 -2
  231. package/locales/en.js +20 -5
  232. package/locales/fr.js +12 -2
  233. package/locales/ja.js +12 -2
  234. package/locales/pt.js +12 -2
  235. package/locales/ru.js +12 -2
  236. package/locales/zh-TW.js +19 -3
  237. package/locales/zh.js +19 -3
  238. package/package.json +3 -3
  239. package/web-shell/assets/{arc-CUeDlxvE.js → arc-Dh-N5oEG.js} +1 -1
  240. package/web-shell/assets/{architectureDiagram-3BPJPVTR-PiUszkQA.js → architectureDiagram-3BPJPVTR-DBOQgtfF.js} +1 -1
  241. package/web-shell/assets/{blockDiagram-GPEHLZMM-s2wYSO7e.js → blockDiagram-GPEHLZMM-Dyxbuyju.js} +1 -1
  242. package/web-shell/assets/{c4Diagram-AAUBKEIU-DyLxZoz9.js → c4Diagram-AAUBKEIU-DCJR5HPT.js} +1 -1
  243. package/web-shell/assets/channel-DY0fkcKT.js +1 -0
  244. package/web-shell/assets/{chunk-2J33WTMH-Dsdai7Tk.js → chunk-2J33WTMH-BkMUcy3O.js} +1 -1
  245. package/web-shell/assets/{chunk-4BX2VUAB-DEosOjV7.js → chunk-4BX2VUAB-BSm4pLQk.js} +1 -1
  246. package/web-shell/assets/{chunk-55IACEB6-sNsRLTXf.js → chunk-55IACEB6-CuRr-XgW.js} +1 -1
  247. package/web-shell/assets/{chunk-727SXJPM-DkRNZzmh.js → chunk-727SXJPM-CLv7-w3t.js} +1 -1
  248. package/web-shell/assets/{chunk-AQP2D5EJ-BrsRNpzd.js → chunk-AQP2D5EJ-Cz_n3-JW.js} +1 -1
  249. package/web-shell/assets/{chunk-FMBD7UC4-CI039lpl.js → chunk-FMBD7UC4-CFT_62Hq.js} +1 -1
  250. package/web-shell/assets/{chunk-ND2GUHAM-M-pkeIfu.js → chunk-ND2GUHAM-DWz6DOZ6.js} +1 -1
  251. package/web-shell/assets/{chunk-QZHKN3VN-C4ckGNbH.js → chunk-QZHKN3VN-C-mRhUzw.js} +1 -1
  252. package/web-shell/assets/classDiagram-4FO5ZUOK-DBvJ6PZo.js +1 -0
  253. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DBvJ6PZo.js +1 -0
  254. package/web-shell/assets/{cose-bilkent-S5V4N54A-BciKUAFq.js → cose-bilkent-S5V4N54A-BqCZS3i1.js} +1 -1
  255. package/web-shell/assets/{dagre-BM42HDAG-C1nTSgU6.js → dagre-BM42HDAG-BGasdP8i.js} +1 -1
  256. package/web-shell/assets/{diagram-2AECGRRQ-BDPNWr1m.js → diagram-2AECGRRQ-BSyLDkMy.js} +1 -1
  257. package/web-shell/assets/{diagram-5GNKFQAL-CNFhTszL.js → diagram-5GNKFQAL-CM-ZJxWC.js} +1 -1
  258. package/web-shell/assets/{diagram-KO2AKTUF-CjPa4p5a.js → diagram-KO2AKTUF-wJdzt_C5.js} +1 -1
  259. package/web-shell/assets/{diagram-LMA3HP47-ZzPykSyG.js → diagram-LMA3HP47-DiH2fhpL.js} +1 -1
  260. package/web-shell/assets/{diagram-OG6HWLK6-0UVtZ9A4.js → diagram-OG6HWLK6-BZ9z1ZBl.js} +1 -1
  261. package/web-shell/assets/{erDiagram-TEJ5UH35-CajDZCat.js → erDiagram-TEJ5UH35-BsyWDziR.js} +1 -1
  262. package/web-shell/assets/{flowDiagram-I6XJVG4X-BRuFBIvL.js → flowDiagram-I6XJVG4X-CzdkxIrq.js} +1 -1
  263. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BevGmJqG.js → ganttDiagram-6RSMTGT7-javIv2r2.js} +1 -1
  264. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DvPMpBMb.js → gitGraphDiagram-PVQCEYII-CjHstylC.js} +1 -1
  265. package/web-shell/assets/{index-DzHwQkQq.js → index-BnJGxpah.js} +1 -1
  266. package/web-shell/assets/index-DhXB9nTa.js +1161 -0
  267. package/web-shell/assets/index-vYHgZ7bL.css +5 -0
  268. package/web-shell/assets/{infoDiagram-5YYISTIA-Oixn7tA9.js → infoDiagram-5YYISTIA-yXuQsomo.js} +1 -1
  269. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BgKpeg-j.js → ishikawaDiagram-YF4QCWOH-a85JhE6F.js} +1 -1
  270. package/web-shell/assets/{journeyDiagram-JHISSGLW-74mwxIaA.js → journeyDiagram-JHISSGLW-Dak_4BVj.js} +1 -1
  271. package/web-shell/assets/{kanban-definition-UN3LZRKU-D4D6cEqA.js → kanban-definition-UN3LZRKU-COA-LuCV.js} +1 -1
  272. package/web-shell/assets/{linear-atZRE_L2.js → linear-DNAAAQWq.js} +1 -1
  273. package/web-shell/assets/{mermaid.core-KKudX-JC.js → mermaid.core-7Ff3aIUD.js} +5 -5
  274. package/web-shell/assets/{mindmap-definition-RKZ34NQL-CMCej9yG.js → mindmap-definition-RKZ34NQL-_rCOIODU.js} +1 -1
  275. package/web-shell/assets/{pieDiagram-4H26LBE5-nhx40X7q.js → pieDiagram-4H26LBE5-C9QCQ8EW.js} +1 -1
  276. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CUmVcN3M.js → quadrantDiagram-W4KKPZXB-CsaE4FA8.js} +1 -1
  277. package/web-shell/assets/{requirementDiagram-4Y6WPE33-C_vyEwyy.js → requirementDiagram-4Y6WPE33-tV78naTg.js} +1 -1
  278. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-DU6G4VWR.js → sankeyDiagram-5OEKKPKP-Dk3Rw7BZ.js} +1 -1
  279. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DdeRR_KJ.js → sequenceDiagram-3UESZ5HK-BGsAWcMX.js} +1 -1
  280. package/web-shell/assets/{stateDiagram-AJRCARHV-C6iCI8ps.js → stateDiagram-AJRCARHV-zSxdtdoB.js} +1 -1
  281. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-vLEEtDpO.js +1 -0
  282. package/web-shell/assets/{timeline-definition-PNZ67QCA-B_Ea8Cb7.js → timeline-definition-PNZ67QCA-j0BQh9Go.js} +1 -1
  283. package/web-shell/assets/{vennDiagram-CIIHVFJN-BPUVZEJA.js → vennDiagram-CIIHVFJN-CRaUFFIu.js} +1 -1
  284. package/web-shell/assets/{wardley-L42UT6IY-BWEj0lKY.js → wardley-L42UT6IY-D7Py_ofm.js} +1 -1
  285. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BvDsdIQw.js → wardleyDiagram-YWT4CUSO-BrDIAZcp.js} +1 -1
  286. package/web-shell/assets/{xychartDiagram-2RQKCTM6-crz0QhF_.js → xychartDiagram-2RQKCTM6-Cecdw-w2.js} +1 -1
  287. package/web-shell/index.html +2 -2
  288. package/chunks/channel-worker-group-K7QKH6IG.js +0 -13
  289. package/chunks/chunk-2HRYPZT5.js +0 -25
  290. package/chunks/chunk-B7NUUEXC.js +0 -311
  291. package/chunks/chunk-CARU2RR2.js +0 -24
  292. package/chunks/chunk-GYTKQYDB.js +0 -23
  293. package/chunks/chunk-LQU7EVFA.js +0 -30
  294. package/chunks/chunk-OCPBI7J5.js +0 -18
  295. package/chunks/chunk-OJAMDVF5.js +0 -66
  296. package/chunks/chunk-QAW7PIHT.js +0 -168
  297. package/chunks/chunk-TEGEBB2I.js +0 -122
  298. package/chunks/daemon-status-provider-L4STG5VO.js +0 -76
  299. package/chunks/exitPlanMode-IHCJ5EEI.js +0 -909
  300. package/chunks/nonInteractiveCli-NSOB6D74.js +0 -129
  301. package/chunks/todoWrite-YNXB27GB.js +0 -531
  302. package/web-shell/assets/channel-DkuJJ0qd.js +0 -1
  303. package/web-shell/assets/classDiagram-4FO5ZUOK-CwqHc0TB.js +0 -1
  304. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwqHc0TB.js +0 -1
  305. package/web-shell/assets/index-Cnvv4VcI.css +0 -5
  306. package/web-shell/assets/index-D1Uyklxa.js +0 -1088
  307. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C0_6nR6C.js +0 -1
@@ -3,13 +3,15 @@
3
3
  import {
4
4
  InvalidStreamError,
5
5
  OpenAIContentConverter,
6
+ ProtocolTagSanitizedEvent,
6
7
  TaggedThinkingParser,
7
8
  getRateLimitErrorDetails,
9
+ logProtocolTagSanitized,
8
10
  openaiRequestCaptureContext
9
- } from "./chunk-P6LART6G.js";
11
+ } from "./chunk-66IT3EY2.js";
10
12
  import {
11
13
  RequestTokenizer
12
- } from "./chunk-GDQQRV43.js";
14
+ } from "./chunk-V2FRLYHN.js";
13
15
  import {
14
16
  DASHSCOPE_PROXY_BASE_URL,
15
17
  DEFAULT_DASHSCOPE_BASE_URL,
@@ -17,33 +19,34 @@ import {
17
19
  DEFAULT_STREAM_IDLE_TIMEOUT_MS,
18
20
  MAX_STREAM_IDLE_TIMEOUT_MS,
19
21
  QWEN_STREAM_IDLE_TIMEOUT_MS_ENV,
22
+ resolveRequestTimeout
23
+ } from "./chunk-FEOZBUMT.js";
24
+ import {
20
25
  defaultOutputCeiling,
26
+ getToolCallPreparations,
21
27
  hasExplicitOutputLimit,
22
28
  parsePositiveIntegerEnvValue,
23
29
  reconcileMaxTokens,
24
- resolveRequestTimeout,
25
- tokenLimit
26
- } from "./chunk-B7NUUEXC.js";
27
- import {
28
30
  runtimeDiagnostics,
29
- safeJsonParse
30
- } from "./chunk-TQBODCFD.js";
31
+ safeJsonParse,
32
+ tokenLimit
33
+ } from "./chunk-CMVFTMRD.js";
31
34
  import {
32
35
  GenerateContentResponse
33
- } from "./chunk-4LD5APFL.js";
36
+ } from "./chunk-TYQMGACW.js";
34
37
  import {
35
38
  createChildAbortController
36
39
  } from "./chunk-DJ2GSRLV.js";
37
40
  import {
38
41
  buildRuntimeFetchOptions,
39
42
  redactProxyError
40
- } from "./chunk-LQIDP6K5.js";
43
+ } from "./chunk-4CHDYDG3.js";
41
44
  import {
42
45
  createDebugLogger,
43
46
  getErrorStatus,
44
47
  getErrorType,
45
48
  isAbortError
46
- } from "./chunk-7NFB7LBQ.js";
49
+ } from "./chunk-UE5TZ55T.js";
47
50
  import {
48
51
  init_esbuild_shims
49
52
  } from "./chunk-5O2XNYP6.js";
@@ -7093,6 +7096,9 @@ var DashScopeOpenAICompatibleProvider = class _DashScopeOpenAICompatibleProvider
7093
7096
  constructor(contentGeneratorConfig, cliConfig) {
7094
7097
  super(contentGeneratorConfig, cliConfig);
7095
7098
  }
7099
+ getResponseParsingOptions() {
7100
+ return { contentOnlyThinkingTagLeaks: true };
7101
+ }
7096
7102
  /**
7097
7103
  * Determines whether to use the DashScope-compatible provider.
7098
7104
  * Covers dashscope.aliyuncs.com, dashscope-intl.aliyuncs.com,
@@ -7792,8 +7798,12 @@ var StreamingToolCallParser = class {
7792
7798
  namelessToolCallIndices = /* @__PURE__ */ new Set();
7793
7799
  /** Map from tool call ID to actual index used for storage */
7794
7800
  idToIndexMap = /* @__PURE__ */ new Map();
7801
+ /** Remapped slots awaiting a stable ID from a later chunk. */
7802
+ pendingIndexRemaps = /* @__PURE__ */ new Map();
7795
7803
  /** Counter for generating new indices when collisions occur */
7796
7804
  nextAvailableIndex = 0;
7805
+ conflictingToolCallIdentity = false;
7806
+ invalidToolCallIndex = false;
7797
7807
  /**
7798
7808
  * Processes a new chunk of tool call data and attempts to parse complete JSON objects
7799
7809
  *
@@ -7811,7 +7821,16 @@ var StreamingToolCallParser = class {
7811
7821
  * @returns ToolCallParseResult with completion status, parsed value, and repair info
7812
7822
  */
7813
7823
  addChunk(index, chunk, id, name) {
7814
- if (!id && !name && !chunk.trim()) {
7824
+ const validName = name?.trim() || void 0;
7825
+ if (!Number.isSafeInteger(index) || index < 0) {
7826
+ this.conflictingToolCallIdentity = true;
7827
+ this.invalidToolCallIndex = true;
7828
+ return {
7829
+ complete: false,
7830
+ error: new Error(`Invalid tool call index: ${index}`)
7831
+ };
7832
+ }
7833
+ if (!id && !validName && !chunk.trim()) {
7815
7834
  const depth2 = this.depths.get(index) ?? 0;
7816
7835
  const inString2 = this.inStrings.get(index) ?? false;
7817
7836
  if (!this.buffers.has(index) || depth2 === 0 && !inString2) {
@@ -7820,18 +7839,25 @@ var StreamingToolCallParser = class {
7820
7839
  }
7821
7840
  let actualIndex = index;
7822
7841
  const isKnownId = Boolean(id && this.idToIndexMap.has(id));
7823
- const isNameOnlyDelta = Boolean(name && chunk.length === 0);
7842
+ const existingName = this.toolCallMeta.get(index)?.name;
7843
+ const isNameOnlyDelta = Boolean(
7844
+ validName && chunk.length === 0 && (!existingName || existingName === validName)
7845
+ );
7824
7846
  if (id) {
7825
7847
  if (this.idToIndexMap.has(id)) {
7826
7848
  actualIndex = this.idToIndexMap.get(id);
7849
+ } else if (this.pendingIndexRemaps.has(index)) {
7850
+ actualIndex = this.pendingIndexRemaps.get(index);
7851
+ this.pendingIndexRemaps.delete(index);
7852
+ this.idToIndexMap.set(id, actualIndex);
7827
7853
  } else {
7828
7854
  if (this.buffers.has(index)) {
7829
7855
  const existingBuffer = this.buffers.get(index);
7830
7856
  const existingDepth = this.depths.get(index);
7831
7857
  const existingMeta = this.toolCallMeta.get(index);
7832
- if (existingMeta?.name && existingDepth === 0 && existingMeta?.id && existingMeta.id !== id) {
7833
- let existingComplete = true;
7834
- if (existingBuffer.trim()) {
7858
+ if (existingMeta?.id && existingMeta.id !== id) {
7859
+ let existingComplete = existingDepth === 0;
7860
+ if (existingComplete && existingBuffer.trim()) {
7835
7861
  try {
7836
7862
  JSON.parse(existingBuffer);
7837
7863
  } catch {
@@ -7839,14 +7865,31 @@ var StreamingToolCallParser = class {
7839
7865
  }
7840
7866
  }
7841
7867
  if (existingComplete) {
7842
- actualIndex = this.findNextAvailableIndex();
7868
+ actualIndex = 0;
7869
+ while (this.buffers.has(actualIndex)) actualIndex += 1;
7870
+ if (!existingMeta.name) {
7871
+ this.conflictingToolCallIdentity = true;
7872
+ }
7873
+ } else {
7874
+ this.conflictingToolCallIdentity = true;
7843
7875
  }
7844
7876
  }
7845
7877
  }
7846
7878
  this.idToIndexMap.set(id, actualIndex);
7847
7879
  }
7848
7880
  } else if (!isNameOnlyDelta) {
7849
- if (this.buffers.has(index)) {
7881
+ if (this.pendingIndexRemaps.has(index)) {
7882
+ actualIndex = this.pendingIndexRemaps.get(index);
7883
+ const existingBuffer = this.buffers.get(actualIndex);
7884
+ const existingDepth = this.depths.get(actualIndex);
7885
+ if (existingDepth === 0 && existingBuffer.trim()) {
7886
+ try {
7887
+ JSON.parse(existingBuffer);
7888
+ actualIndex = this.findMostRecentIncompleteIndex();
7889
+ } catch {
7890
+ }
7891
+ }
7892
+ } else if (this.buffers.has(index)) {
7850
7893
  const existingBuffer = this.buffers.get(index);
7851
7894
  const existingDepth = this.depths.get(index);
7852
7895
  if (existingDepth > 0 || !existingBuffer.trim()) {
@@ -7871,15 +7914,18 @@ var StreamingToolCallParser = class {
7871
7914
  const currentBuffer = this.buffers.get(actualIndex);
7872
7915
  const currentDepth = this.depths.get(actualIndex);
7873
7916
  const meta = this.toolCallMeta.get(actualIndex);
7874
- if (chunk.length === 0 && (id || name)) {
7917
+ if (chunk.length === 0 && (id || validName)) {
7875
7918
  if (id) meta.id = id;
7876
- if (name && !meta.name) meta.name = name;
7919
+ if (validName && !meta.name) meta.name = validName;
7877
7920
  if (!meta.name && meta.id) {
7878
7921
  this.namelessToolCallIndices.add(actualIndex);
7879
7922
  } else {
7880
7923
  this.namelessToolCallIndices.delete(actualIndex);
7881
7924
  }
7882
- return { complete: false };
7925
+ if (!meta.id && actualIndex !== index) {
7926
+ this.pendingIndexRemaps.set(index, actualIndex);
7927
+ }
7928
+ return { actualIndex, complete: false };
7883
7929
  }
7884
7930
  if (isKnownId && currentDepth === 0) {
7885
7931
  if (currentBuffer.trim()) {
@@ -7888,13 +7934,23 @@ var StreamingToolCallParser = class {
7888
7934
  debugLogger3.debug(
7889
7935
  `Ignoring replay chunk for completed toolCall id=${id}`
7890
7936
  );
7891
- return { complete: false };
7937
+ return { actualIndex, complete: false };
7892
7938
  } catch {
7893
7939
  }
7894
7940
  }
7895
7941
  }
7942
+ const identityChanged = Boolean(id && meta.id && meta.id !== id);
7896
7943
  if (id) meta.id = id;
7897
- if (name) meta.name = name;
7944
+ if (validName) {
7945
+ if (!identityChanged && meta.name && meta.name !== validName) {
7946
+ this.conflictingToolCallIdentity = true;
7947
+ } else {
7948
+ meta.name = validName;
7949
+ }
7950
+ }
7951
+ if (!meta.id && actualIndex !== index) {
7952
+ this.pendingIndexRemaps.set(index, actualIndex);
7953
+ }
7898
7954
  const currentInString = this.inStrings.get(actualIndex);
7899
7955
  const currentEscape = this.escapes.get(actualIndex);
7900
7956
  const newBuffer = currentBuffer + chunk;
@@ -7923,12 +7979,13 @@ var StreamingToolCallParser = class {
7923
7979
  if (depth === 0 && newBuffer.trim().length > 0) {
7924
7980
  try {
7925
7981
  const parsed = JSON.parse(newBuffer);
7926
- return { complete: true, value: parsed };
7982
+ return { actualIndex, complete: true, value: parsed };
7927
7983
  } catch (e) {
7928
7984
  if (inString) {
7929
7985
  try {
7930
7986
  const repaired = JSON.parse(newBuffer + '"');
7931
7987
  return {
7988
+ actualIndex,
7932
7989
  complete: true,
7933
7990
  value: repaired,
7934
7991
  repaired: true
@@ -7937,12 +7994,13 @@ var StreamingToolCallParser = class {
7937
7994
  }
7938
7995
  }
7939
7996
  return {
7997
+ actualIndex,
7940
7998
  complete: false,
7941
7999
  error: e instanceof Error ? e : new Error(String(e))
7942
8000
  };
7943
8001
  }
7944
8002
  }
7945
- return { complete: false };
8003
+ return { actualIndex, complete: false };
7946
8004
  }
7947
8005
  /**
7948
8006
  * Gets the current tool call metadata for a specific index
@@ -7956,6 +8014,26 @@ var StreamingToolCallParser = class {
7956
8014
  hasNamelessToolCall() {
7957
8015
  return this.namelessToolCallIndices.size > 0;
7958
8016
  }
8017
+ hasConflictingToolCallIdentity() {
8018
+ return this.conflictingToolCallIdentity;
8019
+ }
8020
+ hasInvalidToolCallIndex() {
8021
+ return this.invalidToolCallIndex;
8022
+ }
8023
+ hasInvalidToolCallArguments() {
8024
+ for (const [index, buffer] of this.buffers.entries()) {
8025
+ if (!this.toolCallMeta.get(index)?.name || buffer.length === 0) continue;
8026
+ try {
8027
+ const args = JSON.parse(buffer);
8028
+ if (typeof args !== "object" || args === null || Array.isArray(args)) {
8029
+ return true;
8030
+ }
8031
+ } catch {
8032
+ return true;
8033
+ }
8034
+ }
8035
+ return false;
8036
+ }
7959
8037
  /**
7960
8038
  * Gets all completed tool calls that are ready to be emitted
7961
8039
  *
@@ -8088,6 +8166,11 @@ var StreamingToolCallParser = class {
8088
8166
  this.escapes.set(index, false);
8089
8167
  this.toolCallMeta.set(index, {});
8090
8168
  this.namelessToolCallIndices.delete(index);
8169
+ for (const [providerIndex, actualIndex] of this.pendingIndexRemaps) {
8170
+ if (providerIndex === index || actualIndex === index) {
8171
+ this.pendingIndexRemaps.delete(providerIndex);
8172
+ }
8173
+ }
8091
8174
  }
8092
8175
  /**
8093
8176
  * Resets the entire parser state for processing a new stream
@@ -8104,7 +8187,10 @@ var StreamingToolCallParser = class {
8104
8187
  this.toolCallMeta.clear();
8105
8188
  this.namelessToolCallIndices.clear();
8106
8189
  this.idToIndexMap.clear();
8190
+ this.pendingIndexRemaps.clear();
8107
8191
  this.nextAvailableIndex = 0;
8192
+ this.conflictingToolCallIdentity = false;
8193
+ this.invalidToolCallIndex = false;
8108
8194
  }
8109
8195
  /**
8110
8196
  * Gets the current accumulated buffer content for a specific index
@@ -8405,7 +8491,8 @@ var ContentGenerationPipeline = class {
8405
8491
  const innerStream = this.processStreamWithLogging(
8406
8492
  guarded,
8407
8493
  context,
8408
- request
8494
+ request,
8495
+ userPromptId
8409
8496
  );
8410
8497
  async function* drainThenCleanup() {
8411
8498
  try {
@@ -8425,13 +8512,30 @@ var ContentGenerationPipeline = class {
8425
8512
  * 1. Convert OpenAI chunks to Gemini format while preserving original chunks
8426
8513
  * 2. Filter empty responses
8427
8514
  * 3. Handle chunk merging for providers that send finishReason and usageMetadata separately
8428
- * 4. Collect both formats for logging
8429
- * 5. Handle success/error logging
8515
+ * 4. Handle success/error logging
8430
8516
  */
8431
- async *processStreamWithLogging(stream, context, request) {
8432
- const collectedGeminiResponses = [];
8517
+ async *processStreamWithLogging(stream, context, request, userPromptId) {
8433
8518
  let pendingFinishResponse = null;
8434
8519
  let finishYielded = false;
8520
+ let pendingFinishProtocolTagSanitized;
8521
+ const logPendingProtocolTagSanitized = /* @__PURE__ */ __name((response, sanitization) => {
8522
+ if (!sanitization) return;
8523
+ const event = new ProtocolTagSanitizedEvent({
8524
+ model: context.model,
8525
+ promptId: userPromptId,
8526
+ responseId: response.responseId,
8527
+ tagName: sanitization.tagName,
8528
+ toolCallCount: sanitization.toolCallCount
8529
+ });
8530
+ debugLogger4.warn("Sanitized a model protocol tag", {
8531
+ model: event.model,
8532
+ promptId: event.prompt_id,
8533
+ responseId: event.response_id,
8534
+ tagName: event.tag_name,
8535
+ toolCallCount: event.tool_call_count
8536
+ });
8537
+ logProtocolTagSanitized(this.config.cliConfig, event);
8538
+ }, "logPendingProtocolTagSanitized");
8435
8539
  try {
8436
8540
  for await (const chunk of stream) {
8437
8541
  if (chunk.choices?.[0]?.finish_reason === "error_finish") {
@@ -8442,9 +8546,22 @@ var ContentGenerationPipeline = class {
8442
8546
  chunk,
8443
8547
  context
8444
8548
  );
8445
- if (response.candidates?.[0]?.content?.parts?.length === 0 && !response.candidates?.[0]?.finishReason && !response.usageMetadata) {
8549
+ const sanitization = context.protocolTagSanitized;
8550
+ if (sanitization) {
8551
+ context.protocolTagSanitized = void 0;
8552
+ }
8553
+ if (response.candidates?.[0]?.content?.parts?.length === 0 && !response.candidates?.[0]?.finishReason && !response.usageMetadata && // Preparation-only responses must reach ACP before arguments complete.
8554
+ getToolCallPreparations(response).length === 0) {
8446
8555
  continue;
8447
8556
  }
8557
+ if (pendingFinishProtocolTagSanitized && pendingFinishResponse && !response.candidates?.[0]?.finishReason && response.candidates?.some(
8558
+ (candidate) => (candidate.content?.parts?.length ?? 0) > 0
8559
+ )) {
8560
+ throw new InvalidStreamError(
8561
+ "Model response continued after a finish reason.",
8562
+ "PROTOCOL_TAG_LEAK"
8563
+ );
8564
+ }
8448
8565
  if (finishYielded) {
8449
8566
  if (response.usageMetadata) {
8450
8567
  const pending = pendingFinishResponse;
@@ -8452,26 +8569,57 @@ var ContentGenerationPipeline = class {
8452
8569
  pending.usageMetadata = response.usageMetadata;
8453
8570
  }
8454
8571
  }
8455
- collectedGeminiResponses.push(response);
8456
8572
  continue;
8457
8573
  }
8574
+ if (!pendingFinishResponse && response.candidates?.[0]?.finishReason && sanitization) {
8575
+ pendingFinishProtocolTagSanitized = sanitization;
8576
+ }
8458
8577
  const shouldYield = this.handleChunkMerging(
8459
8578
  response,
8460
- collectedGeminiResponses,
8579
+ pendingFinishResponse,
8461
8580
  (mergedResponse) => {
8462
8581
  pendingFinishResponse = mergedResponse;
8463
8582
  }
8464
8583
  );
8465
8584
  if (shouldYield) {
8466
8585
  if (pendingFinishResponse) {
8586
+ logPendingProtocolTagSanitized(
8587
+ pendingFinishResponse,
8588
+ pendingFinishProtocolTagSanitized
8589
+ );
8467
8590
  yield pendingFinishResponse;
8468
8591
  finishYielded = true;
8469
8592
  } else {
8593
+ logPendingProtocolTagSanitized(response, sanitization);
8470
8594
  yield response;
8471
8595
  }
8472
8596
  }
8473
8597
  }
8598
+ if (context.pendingThinkingTagCandidate && !context.pendingThinkingTagCandidate.closingTagName && !/\S/.test(context.pendingThinkingTagCandidate.text)) {
8599
+ const pendingParts = context.pendingUntrustedResponseParts;
8600
+ context.pendingThinkingTagCandidate = void 0;
8601
+ context.pendingUntrustedResponseParts = void 0;
8602
+ if (pendingParts?.length) {
8603
+ const response = new GenerateContentResponse();
8604
+ response.candidates = [
8605
+ {
8606
+ content: { parts: pendingParts, role: "model" },
8607
+ index: 0
8608
+ }
8609
+ ];
8610
+ yield response;
8611
+ }
8612
+ } else if (context.pendingThinkingTagCandidate) {
8613
+ throw new InvalidStreamError(
8614
+ "Model response leaked thinking tags.",
8615
+ "PROTOCOL_TAG_LEAK"
8616
+ );
8617
+ }
8474
8618
  if (pendingFinishResponse && !finishYielded) {
8619
+ logPendingProtocolTagSanitized(
8620
+ pendingFinishResponse,
8621
+ pendingFinishProtocolTagSanitized
8622
+ );
8475
8623
  yield pendingFinishResponse;
8476
8624
  }
8477
8625
  } catch (error) {
@@ -8481,6 +8629,14 @@ var ContentGenerationPipeline = class {
8481
8629
  if (error instanceof StreamContentError) {
8482
8630
  throw redactProxyError(error);
8483
8631
  }
8632
+ if (context.pendingThinkingTagCandidate?.closingTagName && request.config?.abortSignal?.aborted !== true) {
8633
+ context.pendingThinkingTagCandidate = void 0;
8634
+ context.pendingUntrustedResponseParts = void 0;
8635
+ throw new InvalidStreamError(
8636
+ "Model response leaked thinking tags.",
8637
+ "PROTOCOL_TAG_LEAK"
8638
+ );
8639
+ }
8484
8640
  if (error instanceof StreamInactivityTimeoutError) {
8485
8641
  debugLogger4.warn("OpenAI stream inactivity timeout", {
8486
8642
  idleMs: error.idleMs,
@@ -8500,43 +8656,37 @@ var ContentGenerationPipeline = class {
8500
8656
  * finishReason and the most up-to-date usage information from any provider pattern.
8501
8657
  *
8502
8658
  * @param response Current Gemini response
8503
- * @param collectedGeminiResponses Array to collect responses for logging
8659
+ * @param pendingFinishResponse Finish response currently held for merging
8504
8660
  * @param setPendingFinish Callback to set pending finish response
8505
8661
  * @returns true if the response should be yielded, false if it should be held for merging
8506
8662
  */
8507
- handleChunkMerging(response, collectedGeminiResponses, setPendingFinish) {
8663
+ handleChunkMerging(response, pendingFinishResponse, setPendingFinish) {
8508
8664
  const isFinishChunk = response.candidates?.[0]?.finishReason;
8509
- const hasPendingFinish = collectedGeminiResponses.length > 0 && collectedGeminiResponses[collectedGeminiResponses.length - 1].candidates?.[0]?.finishReason;
8510
8665
  if (isFinishChunk) {
8511
- if (hasPendingFinish) {
8512
- const lastResponse = collectedGeminiResponses[collectedGeminiResponses.length - 1];
8666
+ if (pendingFinishResponse) {
8513
8667
  if (response.usageMetadata) {
8514
- lastResponse.usageMetadata = response.usageMetadata;
8668
+ pendingFinishResponse.usageMetadata = response.usageMetadata;
8515
8669
  }
8516
- setPendingFinish(lastResponse);
8670
+ setPendingFinish(pendingFinishResponse);
8517
8671
  } else {
8518
- collectedGeminiResponses.push(response);
8519
8672
  setPendingFinish(response);
8520
8673
  }
8521
8674
  return false;
8522
- } else if (hasPendingFinish) {
8523
- const lastResponse = collectedGeminiResponses[collectedGeminiResponses.length - 1];
8675
+ } else if (pendingFinishResponse) {
8524
8676
  const mergedResponse = new GenerateContentResponse();
8525
- mergedResponse.candidates = lastResponse.candidates;
8677
+ mergedResponse.candidates = pendingFinishResponse.candidates;
8526
8678
  if (response.usageMetadata) {
8527
8679
  mergedResponse.usageMetadata = response.usageMetadata;
8528
8680
  } else {
8529
- mergedResponse.usageMetadata = lastResponse.usageMetadata;
8681
+ mergedResponse.usageMetadata = pendingFinishResponse.usageMetadata;
8530
8682
  }
8531
8683
  mergedResponse.responseId = response.responseId;
8532
8684
  mergedResponse.createTime = response.createTime;
8533
8685
  mergedResponse.modelVersion = response.modelVersion;
8534
8686
  mergedResponse.promptFeedback = response.promptFeedback;
8535
- collectedGeminiResponses[collectedGeminiResponses.length - 1] = mergedResponse;
8536
8687
  setPendingFinish(mergedResponse);
8537
8688
  return true;
8538
8689
  }
8539
- collectedGeminiResponses.push(response);
8540
8690
  return true;
8541
8691
  }
8542
8692
  async buildRequest(request, userPromptId, context, isStreaming) {
@@ -8560,6 +8710,12 @@ var ContentGenerationPipeline = class {
8560
8710
  request.config.tools,
8561
8711
  this.contentGeneratorConfig.schemaCompliance ?? "auto"
8562
8712
  );
8713
+ const fcMode = request.config?.toolConfig?.functionCallingConfig?.mode;
8714
+ if (fcMode === "ANY") {
8715
+ baseRequest["tool_choice"] = "required";
8716
+ } else if (fcMode === "NONE") {
8717
+ baseRequest["tool_choice"] = "none";
8718
+ }
8563
8719
  }
8564
8720
  const providerRequest = this.config.provider.buildRequest(
8565
8721
  baseRequest,