@qwen-code/qwen-code 0.19.10 → 0.19.11-nightly.20260717.f8e6e8931

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 (275) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +7 -6
  2. package/bundled/qc-helper/docs/features/approval-mode.md +2 -2
  3. package/bundled/qc-helper/docs/features/channels/dingtalk.md +30 -0
  4. package/bundled/qc-helper/docs/features/channels/overview.md +53 -17
  5. package/bundled/qc-helper/docs/features/channels/wecom.md +8 -7
  6. package/bundled/qc-helper/docs/features/sandbox.md +2 -0
  7. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +42 -7
  8. package/bundled/qc-helper/docs/qwen-serve.md +53 -46
  9. package/bundled/review/SKILL.md +163 -403
  10. package/chunks/{MaxSizedBox-67ODZ4SZ.js → MaxSizedBox-JGTP7YJQ.js} +13 -13
  11. package/chunks/{StandaloneSessionPicker-SIPBQT5Z.js → StandaloneSessionPicker-2XQDOYZ5.js} +27 -27
  12. package/chunks/{acpAgent-VPZJXLFX.js → acpAgent-RXRJA7GD.js} +1135 -373
  13. package/chunks/{agent-Z7NWL6XL.js → agent-UQP53UWQ.js} +10 -10
  14. package/chunks/{agent-headless-73HZ6ROQ.js → agent-headless-I52OXDCK.js} +10 -10
  15. package/chunks/{anthropicContentGenerator-56U3YCP2.js → anthropicContentGenerator-HBRXJSP4.js} +76 -14
  16. package/chunks/{artifact-tool-BWZZJ42H.js → artifact-tool-MIZLXBLF.js} +1 -1
  17. package/chunks/{askUserQuestion-WU3S5A5T.js → askUserQuestion-XMJVPNWM.js} +1 -1
  18. package/chunks/{bridge-XFKW6S7Q.js → bridge-3DVRNBSF.js} +14 -16
  19. package/chunks/{ca-C2JTT2N5.js → ca-CODEN7TD.js} +5 -0
  20. package/chunks/channel-worker-group-SOUWTFHC.js +21 -0
  21. package/chunks/{channel-worker-manager-5RWKSGEU.js → channel-worker-manager-LOVSV3WW.js} +34 -10
  22. package/chunks/{channel-worker-supervisor-PCDAZN4D.js → channel-worker-supervisor-XW6MHJBQ.js} +6 -4
  23. package/chunks/{chunk-BBNVFRGD.js → chunk-3DWIFU7L.js} +1 -1
  24. package/chunks/{chunk-ZQTZXVHP.js → chunk-3KSHYS4T.js} +4 -18
  25. package/chunks/{chunk-ZKMGAFYV.js → chunk-3LS57JZI.js} +1 -1
  26. package/chunks/{chunk-B5I2IIWY.js → chunk-46Y6SSQ7.js} +5 -5
  27. package/chunks/{chunk-GDQQRV43.js → chunk-4BJVSIS3.js} +2 -2
  28. package/chunks/{chunk-L37RC7MQ.js → chunk-4HTHLSIH.js} +1 -1
  29. package/chunks/{chunk-DPFBNG72.js → chunk-4UBEB74N.js} +1 -1
  30. package/chunks/{chunk-AAR5SGMD.js → chunk-4YR7FSAM.js} +7 -5
  31. package/chunks/{chunk-OATTJGPJ.js → chunk-5CNYZ7TN.js} +7 -7
  32. package/chunks/{chunk-JSJFKYWT.js → chunk-5VWYKIMW.js} +1 -1
  33. package/chunks/{chunk-6GETGQWP.js → chunk-5WWYHNAH.js} +39 -10
  34. package/chunks/{chunk-65N2J6V2.js → chunk-6ANLV27M.js} +2 -2
  35. package/chunks/{chunk-L62SEJWY.js → chunk-6RV42SFP.js} +4 -4
  36. package/chunks/{chunk-XXJKGHZV.js → chunk-6VMOP2Z7.js} +4 -4
  37. package/chunks/{chunk-URU5UEK6.js → chunk-6WGZDD67.js} +135 -68
  38. package/chunks/{chunk-7NAWTFVY.js → chunk-6WPJRYLZ.js} +2 -2
  39. package/chunks/chunk-6WVLHULT.js +59 -0
  40. package/chunks/{chunk-N6FXRR6P.js → chunk-7ZFXHKKZ.js} +1 -1
  41. package/chunks/{chunk-E67NFMF4.js → chunk-A2HWMJVO.js} +35 -1
  42. package/chunks/{chunk-4FMG7EDJ.js → chunk-AEKHQ3E5.js} +77 -11
  43. package/chunks/{chunk-WIASPMLX.js → chunk-AH3YAJU6.js} +22 -33
  44. package/chunks/{chunk-6GKMJPOC.js → chunk-AHAH5H6D.js} +3 -3
  45. package/chunks/{chunk-3XJFUTNM.js → chunk-AVAU67KP.js} +57 -10
  46. package/chunks/{chunk-LNUXFLLJ.js → chunk-BDHYJ2MM.js} +53 -5
  47. package/chunks/{chunk-P6LART6G.js → chunk-BTSE2DUP.js} +957 -122
  48. package/chunks/{chunk-7MJAZMXK.js → chunk-BZ5D7OVV.js} +28 -77
  49. package/chunks/{chunk-WDWJ4OQJ.js → chunk-CC2UASQ4.js} +3 -3
  50. package/chunks/{chunk-WLXYAKV7.js → chunk-D7KYA6EY.js} +3 -3
  51. package/chunks/{chunk-5LROA5W4.js → chunk-DD45XVOQ.js} +3 -3
  52. package/chunks/{chunk-H3FQOPPS.js → chunk-DOPUYNXO.js} +2 -2
  53. package/chunks/{chunk-SPUYQB4T.js → chunk-DPXB3XRN.js} +1 -1
  54. package/chunks/{chunk-XLIRF7IK.js → chunk-E7ECGLZW.js} +1 -1
  55. package/chunks/{chunk-RDRVMDWV.js → chunk-EMJJBXS7.js} +10 -10
  56. package/chunks/{chunk-TXY2C3D2.js → chunk-F333XEAU.js} +1 -1
  57. package/chunks/chunk-FEOZBUMT.js +77 -0
  58. package/chunks/{chunk-YYPXHMWO.js → chunk-FEYHXPZG.js} +4 -4
  59. package/chunks/{chunk-ZRKBI3DP.js → chunk-FNX3LGAK.js} +1 -1
  60. package/chunks/chunk-FXK3QMRD.js +140 -0
  61. package/chunks/{chunk-422XAKCK.js → chunk-G5ZKRK2E.js} +2 -2
  62. package/chunks/{chunk-DK33QJ3V.js → chunk-GCRFH57X.js} +732 -13
  63. package/chunks/{chunk-EQY6POVO.js → chunk-GLEJW7T2.js} +1 -1
  64. package/chunks/{chunk-FXMC7SL2.js → chunk-I6NOSIVF.js} +1 -1
  65. package/chunks/{chunk-VBRRNQB7.js → chunk-IHJRUIWN.js} +109 -22
  66. package/chunks/{chunk-F7NXQH4Y.js → chunk-IIXEI2VE.js} +1 -1
  67. package/chunks/{chunk-2UUAIFQO.js → chunk-JGUT3LWZ.js} +5 -0
  68. package/chunks/{chunk-5EBKKSBX.js → chunk-JY74T7PW.js} +1 -1
  69. package/chunks/chunk-KSZKSE23.js +226 -0
  70. package/chunks/{chunk-MO7O5722.js → chunk-KW46DBFM.js} +35 -2
  71. package/chunks/{chunk-TISZXPAX.js → chunk-L263ROM6.js} +1 -1
  72. package/chunks/chunk-LXXMOYPL.js +22 -0
  73. package/chunks/{chunk-YX4LLZ3D.js → chunk-NABT4VOY.js} +109 -35
  74. package/chunks/{chunk-W34A5MJH.js → chunk-NROLDLP4.js} +1 -1
  75. package/chunks/{chunk-V7EQTZYR.js → chunk-O3WCEZEN.js} +191 -44
  76. package/chunks/{chunk-K4PZ5F5T.js → chunk-OWT2CAEQ.js} +1 -1
  77. package/chunks/{chunk-4YWLED2A.js → chunk-PNCWEDF6.js} +7 -4
  78. package/chunks/{chunk-WDW64OW3.js → chunk-PSDTLRAV.js} +5 -5
  79. package/chunks/{chunk-7R4DPSRA.js → chunk-R3VWUU2E.js} +1 -1
  80. package/chunks/{chunk-K7CRWKOE.js → chunk-R6AO7HBQ.js} +4617 -4012
  81. package/chunks/{chunk-6OATMEYN.js → chunk-RTV5TUYB.js} +12 -4
  82. package/chunks/{chunk-6W6DI34P.js → chunk-SE6GSFAO.js} +159 -2
  83. package/chunks/{chunk-WTSXKLG5.js → chunk-SUARMD4Q.js} +1 -1
  84. package/chunks/chunk-T4TZQJ7W.js +48 -0
  85. package/chunks/{chunk-LTNI523B.js → chunk-T7CZYIAU.js} +28 -5
  86. package/chunks/{chunk-3MX7D6QN.js → chunk-TIOE2OPE.js} +32 -4
  87. package/chunks/{chunk-TTUO4DNG.js → chunk-UF6ZTWU5.js} +75 -710
  88. package/chunks/{chunk-Q5GLXH5Q.js → chunk-UJG4VV2O.js} +5 -5
  89. package/chunks/{chunk-CJFNEBYB.js → chunk-VFEZWI6F.js} +1 -1
  90. package/chunks/{chunk-UFOKA4PR.js → chunk-VHCSIMTF.js} +114 -4
  91. package/chunks/{chunk-TQBODCFD.js → chunk-VRR65QYW.js} +250 -2
  92. package/chunks/{chunk-CUUXANEQ.js → chunk-W6J7RSCK.js} +6 -1
  93. package/chunks/{chunk-YHN5SUIJ.js → chunk-W7H223ZZ.js} +1 -1
  94. package/chunks/{chunk-WX6SD4IQ.js → chunk-WTNZ6DXB.js} +1 -1
  95. package/chunks/{chunk-GGJII3FM.js → chunk-WZJELXEU.js} +92 -3
  96. package/chunks/{chunk-OFEVHGVU.js → chunk-X5HZX4EP.js} +9 -11
  97. package/chunks/{chunk-KSO42X3Z.js → chunk-X6YQWCIJ.js} +21 -2
  98. package/chunks/{chunk-7L4XBYVW.js → chunk-XK42MWWO.js} +9 -2
  99. package/chunks/{chunk-X362TMXZ.js → chunk-XQDPCQ3A.js} +7 -5
  100. package/chunks/{chunk-YU56QGXX.js → chunk-Y3TNSHKF.js} +1 -1
  101. package/chunks/{chunk-HHEFI4RP.js → chunk-YOJGIRTD.js} +714 -109
  102. package/chunks/{chunk-CEW4HDPK.js → chunk-ZK4AMPKI.js} +2459 -350
  103. package/chunks/{chunk-SXU3KKNI.js → chunk-ZQIYGQCG.js} +251 -54
  104. package/chunks/{computer-use-IYTX45WA.js → computer-use-LTW3VB6L.js} +10 -10
  105. package/chunks/{config-utils-CFT33LTP.js → config-utils-IQQT3GCI.js} +3 -3
  106. package/chunks/{contextCommand-272V77WU.js → contextCommand-GLMC6CTP.js} +12 -12
  107. package/chunks/{create-sub-session-WNX2OQVX.js → create-sub-session-EAB2U5XW.js} +1 -1
  108. package/chunks/{create-sub-session-CBJMQLYP.js → create-sub-session-YMWQAWSN.js} +10 -10
  109. package/chunks/{cron-create-36TIFKRT.js → cron-create-GMVKSXZT.js} +1 -1
  110. package/chunks/{cron-delete-OQD3WULU.js → cron-delete-VDZKUAVK.js} +1 -1
  111. package/chunks/{cron-list-4533T2FH.js → cron-list-UG7C7RAR.js} +1 -1
  112. package/chunks/{daemon-RNGFPMAB.js → daemon-PRB64RP5.js} +303 -71
  113. package/chunks/{daemon-status-provider-L4STG5VO.js → daemon-status-provider-5OMM5JHF.js} +19 -20
  114. package/chunks/{de-2VCDRDGU.js → de-NOXPCSYN.js} +5 -0
  115. package/chunks/{dist-ERCPDVA6.js → dist-4WCQEZIN.js} +4 -51
  116. package/chunks/{dist-MOEC47TR.js → dist-DOPL5LSQ.js} +1 -1
  117. package/chunks/{dist-JZE7F6YR.js → dist-GXJVCOS7.js} +1 -1
  118. package/chunks/{dist-PHEPJLXD.js → dist-PX2ERZ6I.js} +2 -2
  119. package/chunks/{dist-HNN7DR2L.js → dist-V2YVLYOW.js} +58 -30
  120. package/chunks/{dist-3V3ZV6ML.js → dist-VYWUKURL.js} +1 -1
  121. package/chunks/{earlyInputCapture-EN4BRREQ.js → earlyInputCapture-A3WSRN4T.js} +10 -10
  122. package/chunks/{edit-OMAF2QDR.js → edit-7PG4AH27.js} +10 -10
  123. package/chunks/{en-NJCA3TAA.js → en-JFVULHTB.js} +6 -0
  124. package/chunks/{enter-worktree-BBZX52HG.js → enter-worktree-QUSB44RE.js} +10 -10
  125. package/chunks/{enterPlanMode-5NNFMBUY.js → enterPlanMode-NVSIEL7X.js} +10 -10
  126. package/chunks/{environment-7TEWMJYN.js → environment-AHHXHQTI.js} +12 -12
  127. package/chunks/{errors-I4VKVX3F.js → errors-NSWSRXC7.js} +12 -12
  128. package/chunks/{exit-worktree-FUWRJI33.js → exit-worktree-FXYEYHPL.js} +10 -10
  129. package/chunks/{exitPlanMode-IHCJ5EEI.js → exitPlanMode-JI5GK3F6.js} +10 -10
  130. package/chunks/{fast-path-ZA57TOH4.js → fast-path-X7EVDLKZ.js} +2 -2
  131. package/chunks/{fr-5F3E7WKD.js → fr-HVFNU42H.js} +5 -0
  132. package/chunks/{gemini-UOAKVXBG.js → gemini-YRLHY5KS.js} +162 -206
  133. package/chunks/{geminiContentGenerator-G6UCE6MW.js → geminiContentGenerator-SPLFPV5E.js} +1 -1
  134. package/chunks/{glob-4GJQ2UFF.js → glob-WASUBCSA.js} +10 -10
  135. package/chunks/{grep-5QSYXF2E.js → grep-DUVG3NGA.js} +10 -10
  136. package/chunks/{handleAutoUpdate-ULHNWL6R.js → handleAutoUpdate-NGE5AQ2N.js} +14 -14
  137. package/chunks/{i18n-CYDUTF6F.js → i18n-QNVR36NB.js} +11 -11
  138. package/chunks/{initializer-NRFKUGIO.js → initializer-ZY7ORPMH.js} +15 -15
  139. package/chunks/{installationInfo-WELKRHHE.js → installationInfo-4R75MFTB.js} +11 -11
  140. package/chunks/{ja-66J6B53L.js → ja-PY5AF544.js} +5 -0
  141. package/chunks/{list-JVDXEG2E.js → list-36JCMZRS.js} +18 -18
  142. package/chunks/{loadedSettingsAdapter-WAM4VUTG.js → loadedSettingsAdapter-PQIOJUSJ.js} +15 -15
  143. package/chunks/{loop-wakeup-MVUKDVCP.js → loop-wakeup-QXWZSCYM.js} +2 -2
  144. package/chunks/{ls-RXNIAQDE.js → ls-2OUTG3IZ.js} +1 -1
  145. package/chunks/{lsp-HB5LM5IL.js → lsp-4VMNXZW6.js} +1 -1
  146. package/chunks/{mcp-YHOZN3ZM.js → mcp-QXY6XA6H.js} +15 -15
  147. package/chunks/{monitor-R7XZPJHQ.js → monitor-AVEKRSY3.js} +12 -11
  148. package/chunks/{nonInteractiveCli-NSOB6D74.js → nonInteractiveCli-YWIBKX4M.js} +50 -50
  149. package/chunks/{notebook-edit-6RNKE2L2.js → notebook-edit-4SBTJX72.js} +10 -10
  150. package/chunks/{openaiContentGenerator-XNS5S64I.js → openaiContentGenerator-4EBAO7LR.js} +8 -8
  151. package/chunks/{pidfile-XE4RRR2P.js → pidfile-JMIUPXSU.js} +10 -10
  152. package/chunks/processUtils-EOINMEIH.js +29 -0
  153. package/chunks/{pt-TFZO5Y6T.js → pt-A3PRQXMU.js} +5 -0
  154. package/chunks/{qwenContentGenerator-APDPJ3VN.js → qwenContentGenerator-M7UBL3JS.js} +12 -12
  155. package/chunks/{read-file-XSUWXSR7.js → read-file-DXSEFHCV.js} +5 -5
  156. package/chunks/{read-mcp-resource-6LRTZKXI.js → read-mcp-resource-JUFHCKSC.js} +1 -1
  157. package/chunks/{record-artifact-PMDTY4OS.js → record-artifact-DWSMBXYY.js} +1 -1
  158. package/chunks/{ripGrep-APB3CDMU.js → ripGrep-VTRVFMDJ.js} +10 -10
  159. package/chunks/{ru-4L4LFHIT.js → ru-IBCWUTOC.js} +5 -0
  160. package/chunks/{run-qwen-serve-NWTGPERT.js → run-qwen-serve-P7WQDZAS.js} +59 -38
  161. package/chunks/{runtime-EIO3NQKR.js → runtime-UHYO6JGN.js} +19 -19
  162. package/chunks/{scheduler-JJDZBDRN.js → scheduler-WTK7ZLV5.js} +10 -10
  163. package/chunks/{send-message-SR4WSXP2.js → send-message-JZ752NWD.js} +2 -2
  164. package/chunks/{serve-WTIPB3EI.js → serve-AG2AOG56.js} +15 -15
  165. package/chunks/{server-NJPHQHLH.js → server-G5MM2BRI.js} +1157 -225
  166. package/chunks/{session-O4AO7FTS.js → session-NUAGEMVS.js} +51 -51
  167. package/chunks/{settings-HQNDK7TG.js → settings-VQA5PR2M.js} +14 -14
  168. package/chunks/{shell-UIXM6PWG.js → shell-X33RWGLP.js} +12 -10
  169. package/chunks/{skill-3XMB4ULV.js → skill-PHSU2OPP.js} +5 -5
  170. package/chunks/{spawnChannel-3R632QRM.js → spawnChannel-D6TZN4W7.js} +12 -13
  171. package/chunks/{src-USZKPUOC.js → src-6OJFUPTL.js} +95 -34
  172. package/chunks/{standalone-update-L5XW3D7K.js → standalone-update-ZARRW44Y.js} +12 -12
  173. package/chunks/{startInteractiveUI-CPZOL2WB.js → startInteractiveUI-C6IZRTF3.js} +176 -158
  174. package/chunks/{syntheticOutput-YKFNUQZD.js → syntheticOutput-LELY6HAI.js} +2 -2
  175. package/chunks/{task-create-NUFOHU53.js → task-create-QY3BIMNM.js} +3 -3
  176. package/chunks/{task-list-Z2IKQY3S.js → task-list-D2U47WBJ.js} +1 -1
  177. package/chunks/{task-stop-KQFIVQTJ.js → task-stop-N6E5IYLH.js} +1 -1
  178. package/chunks/{task-update-HKADXSTD.js → task-update-HJCQILLB.js} +3 -3
  179. package/chunks/{team-create-XXPRF3IQ.js → team-create-H434NQP2.js} +10 -10
  180. package/chunks/{team-delete-SDNTGZLG.js → team-delete-RCWYDRF4.js} +1 -1
  181. package/chunks/{team-plan-approval-EOTTKHDW.js → team-plan-approval-IIOHXZU6.js} +10 -10
  182. package/chunks/{theme-manager-P6UITO2L.js → theme-manager-IEOPHMX6.js} +10 -10
  183. package/chunks/{todoWrite-YNXB27GB.js → todoWrite-FKCGATPJ.js} +1 -1
  184. package/chunks/{tool-search-DDNGK2LR.js → tool-search-WIIEDALL.js} +6 -6
  185. package/chunks/{total-session-admission-PL5N7DNY.js → total-session-admission-WU3DORRW.js} +15 -17
  186. package/chunks/{trustedFolders-C5LMF3UR.js → trustedFolders-JVUTUAJ3.js} +11 -11
  187. package/chunks/update-relaunch-X5EQKCH5.js +87 -0
  188. package/chunks/{updateCheck-QTVVISH7.js → updateCheck-TGO2X735.js} +14 -12
  189. package/chunks/{validateNonInterActiveAuth-RY4RKBQG.js → validateNonInterActiveAuth-2MEUL2ME.js} +46 -46
  190. package/chunks/{version-U45RYOSD.js → version-KBGQKZWV.js} +1 -1
  191. package/chunks/{web-fetch-ZSPR3PRR.js → web-fetch-CFCWTCAP.js} +2 -3
  192. package/chunks/{workflow-TCIAQYOA.js → workflow-PAOSF4CG.js} +11 -11
  193. package/chunks/{workspace-providers-status-I3G2HYLY.js → workspace-providers-status-AYHJYSVO.js} +18 -18
  194. package/chunks/{workspace-registration-store-IH5GLZ6Y.js → workspace-registration-store-GZMR53QL.js} +1 -1
  195. package/chunks/{workspace-registry-QEKBELIX.js → workspace-registry-C2IXZWPF.js} +15 -17
  196. package/chunks/{workspace-service-ORKHGLP3.js → workspace-service-KDDAW33F.js} +20 -21
  197. package/chunks/{workspace-skills-status-D7QCNDYY.js → workspace-skills-status-WWEZBZXY.js} +16 -16
  198. package/chunks/{write-file-JGRQR5VM.js → write-file-ACN3TAIX.js} +10 -10
  199. package/chunks/{zh-FSAH32JB.js → zh-PAUNIMHQ.js} +6 -0
  200. package/chunks/{zh-TW-D2YIE2LO.js → zh-TW-GNEUIUFF.js} +6 -0
  201. package/cli-entry.js +92 -8
  202. package/cli.js +11 -11
  203. package/locales/ca.js +10 -0
  204. package/locales/de.js +10 -0
  205. package/locales/en.js +11 -0
  206. package/locales/fr.js +10 -0
  207. package/locales/ja.js +10 -0
  208. package/locales/pt.js +10 -0
  209. package/locales/ru.js +10 -0
  210. package/locales/zh-TW.js +11 -0
  211. package/locales/zh.js +11 -0
  212. package/package.json +3 -3
  213. package/web-shell/assets/{arc-CUeDlxvE.js → arc-Blc5_CnD.js} +1 -1
  214. package/web-shell/assets/{architectureDiagram-3BPJPVTR-PiUszkQA.js → architectureDiagram-3BPJPVTR-Dyv1BvGP.js} +1 -1
  215. package/web-shell/assets/{blockDiagram-GPEHLZMM-s2wYSO7e.js → blockDiagram-GPEHLZMM-CVAb8DyB.js} +1 -1
  216. package/web-shell/assets/{c4Diagram-AAUBKEIU-DyLxZoz9.js → c4Diagram-AAUBKEIU-ClHPb_6S.js} +1 -1
  217. package/web-shell/assets/channel-DkPTtnGS.js +1 -0
  218. package/web-shell/assets/{chunk-2J33WTMH-Dsdai7Tk.js → chunk-2J33WTMH-Dad9g3ZA.js} +1 -1
  219. package/web-shell/assets/{chunk-4BX2VUAB-DEosOjV7.js → chunk-4BX2VUAB-IJJSSdDs.js} +1 -1
  220. package/web-shell/assets/{chunk-55IACEB6-sNsRLTXf.js → chunk-55IACEB6-DRcc-Hl9.js} +1 -1
  221. package/web-shell/assets/{chunk-727SXJPM-DkRNZzmh.js → chunk-727SXJPM-DOCFB-6a.js} +1 -1
  222. package/web-shell/assets/{chunk-AQP2D5EJ-BrsRNpzd.js → chunk-AQP2D5EJ-CRZnSjHp.js} +1 -1
  223. package/web-shell/assets/{chunk-FMBD7UC4-CI039lpl.js → chunk-FMBD7UC4-BwUI4Yes.js} +1 -1
  224. package/web-shell/assets/{chunk-ND2GUHAM-M-pkeIfu.js → chunk-ND2GUHAM-DLy8doxd.js} +1 -1
  225. package/web-shell/assets/{chunk-QZHKN3VN-C4ckGNbH.js → chunk-QZHKN3VN-Bhz7iysj.js} +1 -1
  226. package/web-shell/assets/classDiagram-4FO5ZUOK-DBdPU8ix.js +1 -0
  227. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DBdPU8ix.js +1 -0
  228. package/web-shell/assets/{cose-bilkent-S5V4N54A-BciKUAFq.js → cose-bilkent-S5V4N54A-jT1e8KzN.js} +1 -1
  229. package/web-shell/assets/{dagre-BM42HDAG-C1nTSgU6.js → dagre-BM42HDAG-C1veApQk.js} +1 -1
  230. package/web-shell/assets/{diagram-2AECGRRQ-BDPNWr1m.js → diagram-2AECGRRQ-C_NOwKeT.js} +1 -1
  231. package/web-shell/assets/{diagram-5GNKFQAL-CNFhTszL.js → diagram-5GNKFQAL-Bigfuz1r.js} +1 -1
  232. package/web-shell/assets/{diagram-KO2AKTUF-CjPa4p5a.js → diagram-KO2AKTUF-CpXltPpU.js} +1 -1
  233. package/web-shell/assets/{diagram-LMA3HP47-ZzPykSyG.js → diagram-LMA3HP47-DYawbYbH.js} +1 -1
  234. package/web-shell/assets/{diagram-OG6HWLK6-0UVtZ9A4.js → diagram-OG6HWLK6-D2t-ttd1.js} +1 -1
  235. package/web-shell/assets/{erDiagram-TEJ5UH35-CajDZCat.js → erDiagram-TEJ5UH35-Buc53PB5.js} +1 -1
  236. package/web-shell/assets/{flowDiagram-I6XJVG4X-BRuFBIvL.js → flowDiagram-I6XJVG4X-DwdFsCN7.js} +1 -1
  237. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BevGmJqG.js → ganttDiagram-6RSMTGT7-XhiEKGoP.js} +1 -1
  238. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DvPMpBMb.js → gitGraphDiagram-PVQCEYII-D6We014a.js} +1 -1
  239. package/web-shell/assets/index-BctAmeF3.js +1143 -0
  240. package/web-shell/assets/{index-DzHwQkQq.js → index-CAWqS-bZ.js} +1 -1
  241. package/web-shell/assets/index-DLyhlZZO.css +5 -0
  242. package/web-shell/assets/{infoDiagram-5YYISTIA-Oixn7tA9.js → infoDiagram-5YYISTIA-C_iugRHQ.js} +1 -1
  243. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BgKpeg-j.js → ishikawaDiagram-YF4QCWOH-CAn9Kaix.js} +1 -1
  244. package/web-shell/assets/{journeyDiagram-JHISSGLW-74mwxIaA.js → journeyDiagram-JHISSGLW-BjDYOkEB.js} +1 -1
  245. package/web-shell/assets/{kanban-definition-UN3LZRKU-D4D6cEqA.js → kanban-definition-UN3LZRKU-Br_oI3Ob.js} +1 -1
  246. package/web-shell/assets/{linear-atZRE_L2.js → linear-BqnWHE9E.js} +1 -1
  247. package/web-shell/assets/{mermaid.core-KKudX-JC.js → mermaid.core-CT-sofSb.js} +5 -5
  248. package/web-shell/assets/{mindmap-definition-RKZ34NQL-CMCej9yG.js → mindmap-definition-RKZ34NQL-BbvrZR4B.js} +1 -1
  249. package/web-shell/assets/{pieDiagram-4H26LBE5-nhx40X7q.js → pieDiagram-4H26LBE5-gAwi3h_Q.js} +1 -1
  250. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CUmVcN3M.js → quadrantDiagram-W4KKPZXB-CONvBIuO.js} +1 -1
  251. package/web-shell/assets/{requirementDiagram-4Y6WPE33-C_vyEwyy.js → requirementDiagram-4Y6WPE33-lpkrcy1e.js} +1 -1
  252. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-DU6G4VWR.js → sankeyDiagram-5OEKKPKP-Bk6FJHqb.js} +1 -1
  253. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DdeRR_KJ.js → sequenceDiagram-3UESZ5HK-B9b9bBzt.js} +1 -1
  254. package/web-shell/assets/{stateDiagram-AJRCARHV-C6iCI8ps.js → stateDiagram-AJRCARHV-JqBGC-S3.js} +1 -1
  255. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B_w4fDnm.js +1 -0
  256. package/web-shell/assets/{timeline-definition-PNZ67QCA-B_Ea8Cb7.js → timeline-definition-PNZ67QCA-CCCceXDP.js} +1 -1
  257. package/web-shell/assets/{vennDiagram-CIIHVFJN-BPUVZEJA.js → vennDiagram-CIIHVFJN-EHRnmZ09.js} +1 -1
  258. package/web-shell/assets/{wardley-L42UT6IY-BWEj0lKY.js → wardley-L42UT6IY-CYIcHx3_.js} +1 -1
  259. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BvDsdIQw.js → wardleyDiagram-YWT4CUSO-B81AuYRl.js} +1 -1
  260. package/web-shell/assets/{xychartDiagram-2RQKCTM6-crz0QhF_.js → xychartDiagram-2RQKCTM6-DOQ6E3z7.js} +1 -1
  261. package/web-shell/index.html +2 -2
  262. package/chunks/channel-worker-group-K7QKH6IG.js +0 -13
  263. package/chunks/chunk-B7NUUEXC.js +0 -311
  264. package/chunks/chunk-CARU2RR2.js +0 -24
  265. package/chunks/chunk-GYTKQYDB.js +0 -23
  266. package/chunks/chunk-LQU7EVFA.js +0 -30
  267. package/chunks/chunk-OCPBI7J5.js +0 -18
  268. package/chunks/chunk-OJAMDVF5.js +0 -66
  269. package/chunks/chunk-TEGEBB2I.js +0 -122
  270. package/web-shell/assets/channel-DkuJJ0qd.js +0 -1
  271. package/web-shell/assets/classDiagram-4FO5ZUOK-CwqHc0TB.js +0 -1
  272. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwqHc0TB.js +0 -1
  273. package/web-shell/assets/index-Cnvv4VcI.css +0 -5
  274. package/web-shell/assets/index-D1Uyklxa.js +0 -1088
  275. 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-BTSE2DUP.js";
10
12
  import {
11
13
  RequestTokenizer
12
- } from "./chunk-GDQQRV43.js";
14
+ } from "./chunk-4BJVSIS3.js";
13
15
  import {
14
16
  DASHSCOPE_PROXY_BASE_URL,
15
17
  DEFAULT_DASHSCOPE_BASE_URL,
@@ -17,17 +19,18 @@ 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-VRR65QYW.js";
31
34
  import {
32
35
  GenerateContentResponse
33
36
  } from "./chunk-4LD5APFL.js";
@@ -7792,8 +7795,12 @@ var StreamingToolCallParser = class {
7792
7795
  namelessToolCallIndices = /* @__PURE__ */ new Set();
7793
7796
  /** Map from tool call ID to actual index used for storage */
7794
7797
  idToIndexMap = /* @__PURE__ */ new Map();
7798
+ /** Remapped slots awaiting a stable ID from a later chunk. */
7799
+ pendingIndexRemaps = /* @__PURE__ */ new Map();
7795
7800
  /** Counter for generating new indices when collisions occur */
7796
7801
  nextAvailableIndex = 0;
7802
+ conflictingToolCallIdentity = false;
7803
+ invalidToolCallIndex = false;
7797
7804
  /**
7798
7805
  * Processes a new chunk of tool call data and attempts to parse complete JSON objects
7799
7806
  *
@@ -7811,7 +7818,16 @@ var StreamingToolCallParser = class {
7811
7818
  * @returns ToolCallParseResult with completion status, parsed value, and repair info
7812
7819
  */
7813
7820
  addChunk(index, chunk, id, name) {
7814
- if (!id && !name && !chunk.trim()) {
7821
+ const validName = name?.trim() || void 0;
7822
+ if (!Number.isSafeInteger(index) || index < 0) {
7823
+ this.conflictingToolCallIdentity = true;
7824
+ this.invalidToolCallIndex = true;
7825
+ return {
7826
+ complete: false,
7827
+ error: new Error(`Invalid tool call index: ${index}`)
7828
+ };
7829
+ }
7830
+ if (!id && !validName && !chunk.trim()) {
7815
7831
  const depth2 = this.depths.get(index) ?? 0;
7816
7832
  const inString2 = this.inStrings.get(index) ?? false;
7817
7833
  if (!this.buffers.has(index) || depth2 === 0 && !inString2) {
@@ -7820,18 +7836,25 @@ var StreamingToolCallParser = class {
7820
7836
  }
7821
7837
  let actualIndex = index;
7822
7838
  const isKnownId = Boolean(id && this.idToIndexMap.has(id));
7823
- const isNameOnlyDelta = Boolean(name && chunk.length === 0);
7839
+ const existingName = this.toolCallMeta.get(index)?.name;
7840
+ const isNameOnlyDelta = Boolean(
7841
+ validName && chunk.length === 0 && (!existingName || existingName === validName)
7842
+ );
7824
7843
  if (id) {
7825
7844
  if (this.idToIndexMap.has(id)) {
7826
7845
  actualIndex = this.idToIndexMap.get(id);
7846
+ } else if (this.pendingIndexRemaps.has(index)) {
7847
+ actualIndex = this.pendingIndexRemaps.get(index);
7848
+ this.pendingIndexRemaps.delete(index);
7849
+ this.idToIndexMap.set(id, actualIndex);
7827
7850
  } else {
7828
7851
  if (this.buffers.has(index)) {
7829
7852
  const existingBuffer = this.buffers.get(index);
7830
7853
  const existingDepth = this.depths.get(index);
7831
7854
  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()) {
7855
+ if (existingMeta?.id && existingMeta.id !== id) {
7856
+ let existingComplete = existingDepth === 0;
7857
+ if (existingComplete && existingBuffer.trim()) {
7835
7858
  try {
7836
7859
  JSON.parse(existingBuffer);
7837
7860
  } catch {
@@ -7839,14 +7862,31 @@ var StreamingToolCallParser = class {
7839
7862
  }
7840
7863
  }
7841
7864
  if (existingComplete) {
7842
- actualIndex = this.findNextAvailableIndex();
7865
+ actualIndex = 0;
7866
+ while (this.buffers.has(actualIndex)) actualIndex += 1;
7867
+ if (!existingMeta.name) {
7868
+ this.conflictingToolCallIdentity = true;
7869
+ }
7870
+ } else {
7871
+ this.conflictingToolCallIdentity = true;
7843
7872
  }
7844
7873
  }
7845
7874
  }
7846
7875
  this.idToIndexMap.set(id, actualIndex);
7847
7876
  }
7848
7877
  } else if (!isNameOnlyDelta) {
7849
- if (this.buffers.has(index)) {
7878
+ if (this.pendingIndexRemaps.has(index)) {
7879
+ actualIndex = this.pendingIndexRemaps.get(index);
7880
+ const existingBuffer = this.buffers.get(actualIndex);
7881
+ const existingDepth = this.depths.get(actualIndex);
7882
+ if (existingDepth === 0 && existingBuffer.trim()) {
7883
+ try {
7884
+ JSON.parse(existingBuffer);
7885
+ actualIndex = this.findMostRecentIncompleteIndex();
7886
+ } catch {
7887
+ }
7888
+ }
7889
+ } else if (this.buffers.has(index)) {
7850
7890
  const existingBuffer = this.buffers.get(index);
7851
7891
  const existingDepth = this.depths.get(index);
7852
7892
  if (existingDepth > 0 || !existingBuffer.trim()) {
@@ -7871,15 +7911,18 @@ var StreamingToolCallParser = class {
7871
7911
  const currentBuffer = this.buffers.get(actualIndex);
7872
7912
  const currentDepth = this.depths.get(actualIndex);
7873
7913
  const meta = this.toolCallMeta.get(actualIndex);
7874
- if (chunk.length === 0 && (id || name)) {
7914
+ if (chunk.length === 0 && (id || validName)) {
7875
7915
  if (id) meta.id = id;
7876
- if (name && !meta.name) meta.name = name;
7916
+ if (validName && !meta.name) meta.name = validName;
7877
7917
  if (!meta.name && meta.id) {
7878
7918
  this.namelessToolCallIndices.add(actualIndex);
7879
7919
  } else {
7880
7920
  this.namelessToolCallIndices.delete(actualIndex);
7881
7921
  }
7882
- return { complete: false };
7922
+ if (!meta.id && actualIndex !== index) {
7923
+ this.pendingIndexRemaps.set(index, actualIndex);
7924
+ }
7925
+ return { actualIndex, complete: false };
7883
7926
  }
7884
7927
  if (isKnownId && currentDepth === 0) {
7885
7928
  if (currentBuffer.trim()) {
@@ -7888,13 +7931,23 @@ var StreamingToolCallParser = class {
7888
7931
  debugLogger3.debug(
7889
7932
  `Ignoring replay chunk for completed toolCall id=${id}`
7890
7933
  );
7891
- return { complete: false };
7934
+ return { actualIndex, complete: false };
7892
7935
  } catch {
7893
7936
  }
7894
7937
  }
7895
7938
  }
7939
+ const identityChanged = Boolean(id && meta.id && meta.id !== id);
7896
7940
  if (id) meta.id = id;
7897
- if (name) meta.name = name;
7941
+ if (validName) {
7942
+ if (!identityChanged && meta.name && meta.name !== validName) {
7943
+ this.conflictingToolCallIdentity = true;
7944
+ } else {
7945
+ meta.name = validName;
7946
+ }
7947
+ }
7948
+ if (!meta.id && actualIndex !== index) {
7949
+ this.pendingIndexRemaps.set(index, actualIndex);
7950
+ }
7898
7951
  const currentInString = this.inStrings.get(actualIndex);
7899
7952
  const currentEscape = this.escapes.get(actualIndex);
7900
7953
  const newBuffer = currentBuffer + chunk;
@@ -7923,12 +7976,13 @@ var StreamingToolCallParser = class {
7923
7976
  if (depth === 0 && newBuffer.trim().length > 0) {
7924
7977
  try {
7925
7978
  const parsed = JSON.parse(newBuffer);
7926
- return { complete: true, value: parsed };
7979
+ return { actualIndex, complete: true, value: parsed };
7927
7980
  } catch (e) {
7928
7981
  if (inString) {
7929
7982
  try {
7930
7983
  const repaired = JSON.parse(newBuffer + '"');
7931
7984
  return {
7985
+ actualIndex,
7932
7986
  complete: true,
7933
7987
  value: repaired,
7934
7988
  repaired: true
@@ -7937,12 +7991,13 @@ var StreamingToolCallParser = class {
7937
7991
  }
7938
7992
  }
7939
7993
  return {
7994
+ actualIndex,
7940
7995
  complete: false,
7941
7996
  error: e instanceof Error ? e : new Error(String(e))
7942
7997
  };
7943
7998
  }
7944
7999
  }
7945
- return { complete: false };
8000
+ return { actualIndex, complete: false };
7946
8001
  }
7947
8002
  /**
7948
8003
  * Gets the current tool call metadata for a specific index
@@ -7956,6 +8011,26 @@ var StreamingToolCallParser = class {
7956
8011
  hasNamelessToolCall() {
7957
8012
  return this.namelessToolCallIndices.size > 0;
7958
8013
  }
8014
+ hasConflictingToolCallIdentity() {
8015
+ return this.conflictingToolCallIdentity;
8016
+ }
8017
+ hasInvalidToolCallIndex() {
8018
+ return this.invalidToolCallIndex;
8019
+ }
8020
+ hasInvalidToolCallArguments() {
8021
+ for (const [index, buffer] of this.buffers.entries()) {
8022
+ if (!this.toolCallMeta.get(index)?.name || buffer.length === 0) continue;
8023
+ try {
8024
+ const args = JSON.parse(buffer);
8025
+ if (typeof args !== "object" || args === null || Array.isArray(args)) {
8026
+ return true;
8027
+ }
8028
+ } catch {
8029
+ return true;
8030
+ }
8031
+ }
8032
+ return false;
8033
+ }
7959
8034
  /**
7960
8035
  * Gets all completed tool calls that are ready to be emitted
7961
8036
  *
@@ -8088,6 +8163,11 @@ var StreamingToolCallParser = class {
8088
8163
  this.escapes.set(index, false);
8089
8164
  this.toolCallMeta.set(index, {});
8090
8165
  this.namelessToolCallIndices.delete(index);
8166
+ for (const [providerIndex, actualIndex] of this.pendingIndexRemaps) {
8167
+ if (providerIndex === index || actualIndex === index) {
8168
+ this.pendingIndexRemaps.delete(providerIndex);
8169
+ }
8170
+ }
8091
8171
  }
8092
8172
  /**
8093
8173
  * Resets the entire parser state for processing a new stream
@@ -8104,7 +8184,10 @@ var StreamingToolCallParser = class {
8104
8184
  this.toolCallMeta.clear();
8105
8185
  this.namelessToolCallIndices.clear();
8106
8186
  this.idToIndexMap.clear();
8187
+ this.pendingIndexRemaps.clear();
8107
8188
  this.nextAvailableIndex = 0;
8189
+ this.conflictingToolCallIdentity = false;
8190
+ this.invalidToolCallIndex = false;
8108
8191
  }
8109
8192
  /**
8110
8193
  * Gets the current accumulated buffer content for a specific index
@@ -8405,7 +8488,8 @@ var ContentGenerationPipeline = class {
8405
8488
  const innerStream = this.processStreamWithLogging(
8406
8489
  guarded,
8407
8490
  context,
8408
- request
8491
+ request,
8492
+ userPromptId
8409
8493
  );
8410
8494
  async function* drainThenCleanup() {
8411
8495
  try {
@@ -8425,13 +8509,30 @@ var ContentGenerationPipeline = class {
8425
8509
  * 1. Convert OpenAI chunks to Gemini format while preserving original chunks
8426
8510
  * 2. Filter empty responses
8427
8511
  * 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
8512
+ * 4. Handle success/error logging
8430
8513
  */
8431
- async *processStreamWithLogging(stream, context, request) {
8432
- const collectedGeminiResponses = [];
8514
+ async *processStreamWithLogging(stream, context, request, userPromptId) {
8433
8515
  let pendingFinishResponse = null;
8434
8516
  let finishYielded = false;
8517
+ let pendingFinishProtocolTagSanitized;
8518
+ const logPendingProtocolTagSanitized = /* @__PURE__ */ __name((response, sanitization) => {
8519
+ if (!sanitization) return;
8520
+ const event = new ProtocolTagSanitizedEvent({
8521
+ model: context.model,
8522
+ promptId: userPromptId,
8523
+ responseId: response.responseId,
8524
+ tagName: sanitization.tagName,
8525
+ toolCallCount: sanitization.toolCallCount
8526
+ });
8527
+ debugLogger4.warn("Sanitized a model protocol tag", {
8528
+ model: event.model,
8529
+ promptId: event.prompt_id,
8530
+ responseId: event.response_id,
8531
+ tagName: event.tag_name,
8532
+ toolCallCount: event.tool_call_count
8533
+ });
8534
+ logProtocolTagSanitized(this.config.cliConfig, event);
8535
+ }, "logPendingProtocolTagSanitized");
8435
8536
  try {
8436
8537
  for await (const chunk of stream) {
8437
8538
  if (chunk.choices?.[0]?.finish_reason === "error_finish") {
@@ -8442,9 +8543,22 @@ var ContentGenerationPipeline = class {
8442
8543
  chunk,
8443
8544
  context
8444
8545
  );
8445
- if (response.candidates?.[0]?.content?.parts?.length === 0 && !response.candidates?.[0]?.finishReason && !response.usageMetadata) {
8546
+ const sanitization = context.protocolTagSanitized;
8547
+ if (sanitization) {
8548
+ context.protocolTagSanitized = void 0;
8549
+ }
8550
+ if (response.candidates?.[0]?.content?.parts?.length === 0 && !response.candidates?.[0]?.finishReason && !response.usageMetadata && // Preparation-only responses must reach ACP before arguments complete.
8551
+ getToolCallPreparations(response).length === 0) {
8446
8552
  continue;
8447
8553
  }
8554
+ if (pendingFinishProtocolTagSanitized && pendingFinishResponse && !response.candidates?.[0]?.finishReason && response.candidates?.some(
8555
+ (candidate) => (candidate.content?.parts?.length ?? 0) > 0
8556
+ )) {
8557
+ throw new InvalidStreamError(
8558
+ "Model response continued after a finish reason.",
8559
+ "PROTOCOL_TAG_LEAK"
8560
+ );
8561
+ }
8448
8562
  if (finishYielded) {
8449
8563
  if (response.usageMetadata) {
8450
8564
  const pending = pendingFinishResponse;
@@ -8452,26 +8566,57 @@ var ContentGenerationPipeline = class {
8452
8566
  pending.usageMetadata = response.usageMetadata;
8453
8567
  }
8454
8568
  }
8455
- collectedGeminiResponses.push(response);
8456
8569
  continue;
8457
8570
  }
8571
+ if (!pendingFinishResponse && response.candidates?.[0]?.finishReason && sanitization) {
8572
+ pendingFinishProtocolTagSanitized = sanitization;
8573
+ }
8458
8574
  const shouldYield = this.handleChunkMerging(
8459
8575
  response,
8460
- collectedGeminiResponses,
8576
+ pendingFinishResponse,
8461
8577
  (mergedResponse) => {
8462
8578
  pendingFinishResponse = mergedResponse;
8463
8579
  }
8464
8580
  );
8465
8581
  if (shouldYield) {
8466
8582
  if (pendingFinishResponse) {
8583
+ logPendingProtocolTagSanitized(
8584
+ pendingFinishResponse,
8585
+ pendingFinishProtocolTagSanitized
8586
+ );
8467
8587
  yield pendingFinishResponse;
8468
8588
  finishYielded = true;
8469
8589
  } else {
8590
+ logPendingProtocolTagSanitized(response, sanitization);
8470
8591
  yield response;
8471
8592
  }
8472
8593
  }
8473
8594
  }
8595
+ if (context.pendingThinkingTagCandidate && !context.pendingThinkingTagCandidate.closingTagName && !/\S/.test(context.pendingThinkingTagCandidate.text)) {
8596
+ const pendingParts = context.pendingUntrustedResponseParts;
8597
+ context.pendingThinkingTagCandidate = void 0;
8598
+ context.pendingUntrustedResponseParts = void 0;
8599
+ if (pendingParts?.length) {
8600
+ const response = new GenerateContentResponse();
8601
+ response.candidates = [
8602
+ {
8603
+ content: { parts: pendingParts, role: "model" },
8604
+ index: 0
8605
+ }
8606
+ ];
8607
+ yield response;
8608
+ }
8609
+ } else if (context.pendingThinkingTagCandidate) {
8610
+ throw new InvalidStreamError(
8611
+ "Model response leaked thinking tags.",
8612
+ "PROTOCOL_TAG_LEAK"
8613
+ );
8614
+ }
8474
8615
  if (pendingFinishResponse && !finishYielded) {
8616
+ logPendingProtocolTagSanitized(
8617
+ pendingFinishResponse,
8618
+ pendingFinishProtocolTagSanitized
8619
+ );
8475
8620
  yield pendingFinishResponse;
8476
8621
  }
8477
8622
  } catch (error) {
@@ -8481,6 +8626,14 @@ var ContentGenerationPipeline = class {
8481
8626
  if (error instanceof StreamContentError) {
8482
8627
  throw redactProxyError(error);
8483
8628
  }
8629
+ if (context.pendingThinkingTagCandidate?.closingTagName && request.config?.abortSignal?.aborted !== true) {
8630
+ context.pendingThinkingTagCandidate = void 0;
8631
+ context.pendingUntrustedResponseParts = void 0;
8632
+ throw new InvalidStreamError(
8633
+ "Model response leaked thinking tags.",
8634
+ "PROTOCOL_TAG_LEAK"
8635
+ );
8636
+ }
8484
8637
  if (error instanceof StreamInactivityTimeoutError) {
8485
8638
  debugLogger4.warn("OpenAI stream inactivity timeout", {
8486
8639
  idleMs: error.idleMs,
@@ -8500,43 +8653,37 @@ var ContentGenerationPipeline = class {
8500
8653
  * finishReason and the most up-to-date usage information from any provider pattern.
8501
8654
  *
8502
8655
  * @param response Current Gemini response
8503
- * @param collectedGeminiResponses Array to collect responses for logging
8656
+ * @param pendingFinishResponse Finish response currently held for merging
8504
8657
  * @param setPendingFinish Callback to set pending finish response
8505
8658
  * @returns true if the response should be yielded, false if it should be held for merging
8506
8659
  */
8507
- handleChunkMerging(response, collectedGeminiResponses, setPendingFinish) {
8660
+ handleChunkMerging(response, pendingFinishResponse, setPendingFinish) {
8508
8661
  const isFinishChunk = response.candidates?.[0]?.finishReason;
8509
- const hasPendingFinish = collectedGeminiResponses.length > 0 && collectedGeminiResponses[collectedGeminiResponses.length - 1].candidates?.[0]?.finishReason;
8510
8662
  if (isFinishChunk) {
8511
- if (hasPendingFinish) {
8512
- const lastResponse = collectedGeminiResponses[collectedGeminiResponses.length - 1];
8663
+ if (pendingFinishResponse) {
8513
8664
  if (response.usageMetadata) {
8514
- lastResponse.usageMetadata = response.usageMetadata;
8665
+ pendingFinishResponse.usageMetadata = response.usageMetadata;
8515
8666
  }
8516
- setPendingFinish(lastResponse);
8667
+ setPendingFinish(pendingFinishResponse);
8517
8668
  } else {
8518
- collectedGeminiResponses.push(response);
8519
8669
  setPendingFinish(response);
8520
8670
  }
8521
8671
  return false;
8522
- } else if (hasPendingFinish) {
8523
- const lastResponse = collectedGeminiResponses[collectedGeminiResponses.length - 1];
8672
+ } else if (pendingFinishResponse) {
8524
8673
  const mergedResponse = new GenerateContentResponse();
8525
- mergedResponse.candidates = lastResponse.candidates;
8674
+ mergedResponse.candidates = pendingFinishResponse.candidates;
8526
8675
  if (response.usageMetadata) {
8527
8676
  mergedResponse.usageMetadata = response.usageMetadata;
8528
8677
  } else {
8529
- mergedResponse.usageMetadata = lastResponse.usageMetadata;
8678
+ mergedResponse.usageMetadata = pendingFinishResponse.usageMetadata;
8530
8679
  }
8531
8680
  mergedResponse.responseId = response.responseId;
8532
8681
  mergedResponse.createTime = response.createTime;
8533
8682
  mergedResponse.modelVersion = response.modelVersion;
8534
8683
  mergedResponse.promptFeedback = response.promptFeedback;
8535
- collectedGeminiResponses[collectedGeminiResponses.length - 1] = mergedResponse;
8536
8684
  setPendingFinish(mergedResponse);
8537
8685
  return true;
8538
8686
  }
8539
- collectedGeminiResponses.push(response);
8540
8687
  return true;
8541
8688
  }
8542
8689
  async buildRequest(request, userPromptId, context, isStreaming) {
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-QHTIBUWB.js";
17
17
  import {
18
18
  stripAnsi
19
- } from "./chunk-K7CRWKOE.js";
19
+ } from "./chunk-T4TZQJ7W.js";
20
20
  import {
21
21
  init_esbuild_shims
22
22
  } from "./chunk-5O2XNYP6.js";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-YUZI3WAC.js";
14
14
  import {
15
15
  ideContextStore
16
- } from "./chunk-K7CRWKOE.js";
16
+ } from "./chunk-R6AO7HBQ.js";
17
17
  import {
18
18
  atomicWriteFileSync
19
19
  } from "./chunk-WIEO4CWB.js";
@@ -8455,9 +8455,6 @@ function getExplicitTrustLevel(trustConfig, workspaceCwd) {
8455
8455
  __name(getExplicitTrustLevel, "getExplicitTrustLevel");
8456
8456
  function loadTrustedFoldersWithOverrides(trustConfig) {
8457
8457
  const folders = loadTrustedFolders();
8458
- if (trustConfig) {
8459
- folders.user.config = trustConfig;
8460
- }
8461
8458
  if (folders.errors.length > 0) {
8462
8459
  const errorMessages = folders.errors.map(
8463
8460
  (error) => `Error in ${error.path}: ${error.message}`
@@ -8467,6 +8464,12 @@ function loadTrustedFoldersWithOverrides(trustConfig) {
8467
8464
  Please fix the configuration file and try again.`
8468
8465
  );
8469
8466
  }
8467
+ if (trustConfig) {
8468
+ return new LoadedTrustedFolders(
8469
+ { ...folders.user, config: trustConfig },
8470
+ folders.errors
8471
+ );
8472
+ }
8470
8473
  return folders;
8471
8474
  }
8472
8475
  __name(loadTrustedFoldersWithOverrides, "loadTrustedFoldersWithOverrides");
@@ -14,14 +14,14 @@ import {
14
14
  } from "./chunk-TJTKSVIV.js";
15
15
  import {
16
16
  loadSettings
17
- } from "./chunk-6GETGQWP.js";
17
+ } from "./chunk-5WWYHNAH.js";
18
18
  import {
19
19
  writeStderrLine
20
20
  } from "./chunk-YUZI3WAC.js";
21
21
  import {
22
22
  MCP_BUDGET_WARN_FRACTION,
23
23
  parsePositiveIntegerEnv
24
- } from "./chunk-K7CRWKOE.js";
24
+ } from "./chunk-R6AO7HBQ.js";
25
25
  import {
26
26
  openBrowserSecurely,
27
27
  shouldLaunchBrowser
@@ -102,7 +102,7 @@ var serveCommand = {
102
102
  type: "string",
103
103
  array: true,
104
104
  requiresArg: true,
105
- description: "Absolute workspace path this daemon binds to. POST /session requests with a mismatched cwd return 400 workspace_mismatch. Defaults to process.cwd() when omitted. Repeat for sessions-only multi-workspace mode; legacy workspace APIs remain primary-workspace only."
105
+ description: "Absolute workspace path to register with this daemon. POST /session requests with a mismatched cwd return 400 workspace_mismatch. Defaults to process.cwd() when omitted. Repeat to register isolated workspace runtimes; the first is primary."
106
106
  }).option("max-connections", {
107
107
  type: "number",
108
108
  default: 256,
@@ -152,7 +152,7 @@ var serveCommand = {
152
152
  }).option("http-bridge", {
153
153
  type: "boolean",
154
154
  default: true,
155
- description: "HTTP bridge mode: one `qwen --acp` child per registered workspace (sessions-only multi-workspace routing is enabled when multiple --workspace values are supplied). Stage 2 native in-process mode is not yet implemented; this flag will become opt-in then."
155
+ description: "HTTP bridge mode: attempt to preheat one primary `qwen --acp` child; trusted secondaries start one on demand. Stage 2 native in-process mode is not yet implemented; this flag will become opt-in then."
156
156
  }).option("mcp-client-budget", {
157
157
  type: "number",
158
158
  description: "Cap on live MCP clients spawned inside the ACP child for the bound workspace. Positive integer. Combine with --mcp-budget-mode to control behavior at the cap. When unset, mode defaults to off (no accounting-driven enforcement, but GET /workspace/mcp still reports `clientCount`). Distinct from claude-code MCP_SERVER_CONNECTION_BATCH_SIZE which gates startup concurrency, not the total client count."
@@ -297,7 +297,7 @@ var serveCommand = {
297
297
  process.exit(1);
298
298
  }
299
299
  }
300
- const { runQwenServe } = await import("./run-qwen-serve-NWTGPERT.js");
300
+ const { runQwenServe } = await import("./run-qwen-serve-P7WQDZAS.js");
301
301
  try {
302
302
  const handle = await runQwenServe({
303
303
  port: argv.port,
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  TotalSessionLimitExceededError,
5
5
  WorkspaceDrainingError
6
- } from "./chunk-KSO42X3Z.js";
6
+ } from "./chunk-X6YQWCIJ.js";
7
7
  import {
8
8
  init_esbuild_shims
9
9
  } from "./chunk-5O2XNYP6.js";