@qwen-code/qwen-code 0.19.8 → 0.19.9-nightly.20260714.9dd8389eb

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 (449) hide show
  1. package/bundled/qc-helper/SKILL.md +1 -0
  2. package/bundled/qc-helper/docs/configuration/auth.md +40 -55
  3. package/bundled/qc-helper/docs/configuration/model-providers.md +224 -218
  4. package/bundled/qc-helper/docs/configuration/settings.md +61 -51
  5. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  6. package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -2
  7. package/bundled/qc-helper/docs/features/channels/overview.md +82 -7
  8. package/bundled/qc-helper/docs/features/channels/wecom.md +6 -0
  9. package/bundled/qc-helper/docs/features/code-review.md +109 -41
  10. package/bundled/qc-helper/docs/features/commands.md +45 -44
  11. package/bundled/qc-helper/docs/features/computer-use.md +77 -0
  12. package/bundled/qc-helper/docs/features/hooks.md +29 -0
  13. package/bundled/qc-helper/docs/features/tool-use-summaries.md +19 -23
  14. package/bundled/qc-helper/docs/integration-vscode.md +2 -2
  15. package/bundled/qc-helper/docs/qwen-serve.md +60 -22
  16. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
  17. package/bundled/review/DESIGN.md +303 -46
  18. package/bundled/review/SKILL.md +658 -165
  19. package/chunks/MaxSizedBox-QAYHOC4F.js +71 -0
  20. package/chunks/{StandaloneSessionPicker-EYRGH6PJ.js → StandaloneSessionPicker-D3R6YYX3.js} +82 -79
  21. package/chunks/{acpAgent-GRFTTRHW.js → acpAgent-ENHBW72A.js} +1178 -421
  22. package/chunks/agent-57LX4KMG.js +69 -0
  23. package/chunks/agent-headless-AC6EVNAP.js +63 -0
  24. package/chunks/{anthropicContentGenerator-CPF22MA7.js → anthropicContentGenerator-56U3YCP2.js} +187 -31
  25. package/chunks/{artifact-tool-D233YJFH.js → artifact-tool-BWZZJ42H.js} +5 -5
  26. package/chunks/{askUserQuestion-MKL5ZTMC.js → askUserQuestion-WU3S5A5T.js} +6 -6
  27. package/chunks/bridge-4OZH44MK.js +79 -0
  28. package/chunks/{ca-MKD32FQL.js → ca-C2JTT2N5.js} +68 -6
  29. package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
  30. package/chunks/channel-worker-manager-5RWKSGEU.js +418 -0
  31. package/chunks/channel-worker-supervisor-PCDAZN4D.js +20 -0
  32. package/chunks/{chunk-CSOTA7KX.js → chunk-2FO5GFKZ.js} +2 -2
  33. package/chunks/{chunk-QQDPRDVW.js → chunk-2HRYPZT5.js} +1 -1
  34. package/chunks/{chunk-I6WGFJJ3.js → chunk-2MF6ICOL.js} +38 -12
  35. package/chunks/{chunk-X3YGAX7V.js → chunk-2UUAIFQO.js} +4 -2
  36. package/chunks/{chunk-2PSWA5ID.js → chunk-2X56YUSZ.js} +1 -1
  37. package/chunks/{chunk-NQKLOAVJ.js → chunk-2Z5UX4KI.js} +2 -2
  38. package/chunks/chunk-3MX7D6QN.js +516 -0
  39. package/chunks/{chunk-YDOXPLYL.js → chunk-4DYYRLIE.js} +3890 -975
  40. package/chunks/{chunk-OQXDAMKY.js → chunk-4FPUAYTT.js} +8 -8
  41. package/chunks/{chunk-55ZMG67I.js → chunk-4LD5APFL.js} +4 -4
  42. package/chunks/{chunk-YKZIAK7C.js → chunk-4LJNI7MU.js} +166 -37
  43. package/chunks/{chunk-BOBOCR5H.js → chunk-4QOPEEL2.js} +4 -4
  44. package/chunks/{chunk-UIDXQNMV.js → chunk-4WGODMVR.js} +1 -1
  45. package/chunks/{chunk-E6US47KI.js → chunk-4WKAA4KS.js} +1 -1
  46. package/chunks/{chunk-3GONHQOA.js → chunk-57OAHC2Y.js} +1 -1
  47. package/chunks/{chunk-JZSY4WP3.js → chunk-5DTTYNB7.js} +1 -1
  48. package/chunks/chunk-5HBA2Z7V.js +28 -0
  49. package/chunks/{chunk-SKAZWEV5.js → chunk-5M6IDOMF.js} +35 -98
  50. package/chunks/{chunk-A4BMJM77.js → chunk-5O2XNYP6.js} +1 -0
  51. package/chunks/{chunk-GO6LNQXT.js → chunk-6AM5D4ME.js} +1 -1
  52. package/chunks/{chunk-BJBWRCSK.js → chunk-6H67XLET.js} +1 -1
  53. package/chunks/{chunk-AYNCLGTW.js → chunk-6HHAADP2.js} +8 -51
  54. package/chunks/{chunk-VZ7HY3YU.js → chunk-6OATMEYN.js} +3 -3
  55. package/chunks/{chunk-3UP777ZS.js → chunk-6RLROE6G.js} +1 -1
  56. package/chunks/{chunk-ZERZSAZL.js → chunk-75DOP5OR.js} +2 -2
  57. package/chunks/{chunk-RMLZAUWH.js → chunk-7BIZARI2.js} +10 -12
  58. package/chunks/{chunk-GN3F6PIU.js → chunk-7NAWTFVY.js} +5 -5
  59. package/chunks/{chunk-22MNNNXE.js → chunk-7NFB7LBQ.js} +11 -3
  60. package/chunks/{chunk-ZL5HN75Q.js → chunk-7R4DPSRA.js} +37 -3
  61. package/chunks/{chunk-BVYU3ZTI.js → chunk-7U7UIO5W.js} +1005 -942
  62. package/chunks/{chunk-SAIILPQ3.js → chunk-7X7TEQNX.js} +5 -3
  63. package/chunks/{chunk-IRJWHZWU.js → chunk-A4UCTEB5.js} +2 -2
  64. package/chunks/{chunk-WF4FAXDL.js → chunk-AAS2Q2TV.js} +62 -62
  65. package/chunks/{chunk-O7FIRWJV.js → chunk-AAWKZ5R7.js} +3 -3
  66. package/chunks/{chunk-JCH35JB3.js → chunk-AGBFWLA5.js} +2 -2
  67. package/chunks/{chunk-QYUE6W3T.js → chunk-ALGGS7UH.js} +2 -39
  68. package/chunks/{chunk-WMPVYQ4P.js → chunk-ARKANCNX.js} +3 -2
  69. package/chunks/{chunk-HDOH3QYE.js → chunk-ASVORVFT.js} +2 -2
  70. package/chunks/{chunk-CHB5SLZZ.js → chunk-AUGSSJX3.js} +3 -3
  71. package/chunks/{chunk-PUVCVELY.js → chunk-B6ABUBYY.js} +4 -4
  72. package/chunks/{chunk-L4AMBVQG.js → chunk-B6KHOCU7.js} +49 -21
  73. package/chunks/{chunk-HW4N45EE.js → chunk-B7NUUEXC.js} +38 -11
  74. package/chunks/{chunk-CD6USWHZ.js → chunk-BBNVFRGD.js} +2 -2
  75. package/chunks/{chunk-ZN5T4BHI.js → chunk-BPZALHVR.js} +2 -2
  76. package/chunks/{chunk-VGGOPZUL.js → chunk-C4CXFRKY.js} +12 -5
  77. package/chunks/{chunk-OFEVLU4C.js → chunk-CARU2RR2.js} +1 -1
  78. package/chunks/{chunk-SQ2UATK7.js → chunk-CLTWL6HD.js} +11 -11
  79. package/chunks/{chunk-GLE2YUPU.js → chunk-COH43MRJ.js} +1 -1
  80. package/chunks/{chunk-E5A7LHNN.js → chunk-CPBF7KYF.js} +1 -1
  81. package/chunks/{chunk-UWCTAVOD.js → chunk-CR3C7WXL.js} +1 -1
  82. package/chunks/{chunk-DIWVZ3VM.js → chunk-CSACSGAW.js} +5 -5
  83. package/chunks/{chunk-5P5XGNYH.js → chunk-CU3L64TP.js} +1 -1
  84. package/chunks/{chunk-IWKSG2AR.js → chunk-CXAOG665.js} +1 -1
  85. package/chunks/{chunk-64WXLC72.js → chunk-DJ2GSRLV.js} +1 -1
  86. package/chunks/chunk-DKXW66XA.js +38 -0
  87. package/chunks/{chunk-QN5NZ3UQ.js → chunk-DMTGGOSA.js} +2 -2
  88. package/chunks/{chunk-JZHIQJOE.js → chunk-DMTQY5GY.js} +6 -6
  89. package/chunks/{chunk-GSHQYYIV.js → chunk-DNKX35GS.js} +6 -26
  90. package/chunks/{chunk-6IAWPIQ6.js → chunk-DPSWJWZI.js} +4 -3
  91. package/chunks/{chunk-X2XNQQJI.js → chunk-E2UVIFI2.js} +186 -399
  92. package/chunks/{chunk-KHDZHZMH.js → chunk-E5Z2AVNV.js} +1 -1
  93. package/chunks/{chunk-3B26UVCX.js → chunk-E67NFMF4.js} +39 -10
  94. package/chunks/{chunk-ON3JA3RU.js → chunk-EU3U7USF.js} +7 -9
  95. package/chunks/{chunk-L46XKEGM.js → chunk-EUNRLYJG.js} +5 -8
  96. package/chunks/{chunk-OACJLMLD.js → chunk-FBU7WRZI.js} +18 -2
  97. package/chunks/{chunk-5IFG2VC4.js → chunk-FCMNKVXT.js} +1 -1
  98. package/chunks/{chunk-A5JOJ77H.js → chunk-FDL4PB5H.js} +38 -15
  99. package/chunks/{chunk-E7KNELIZ.js → chunk-FSA7ERJ2.js} +2 -2
  100. package/chunks/{chunk-TI3BWD4D.js → chunk-G6QTKQN4.js} +39 -19
  101. package/chunks/{chunk-44NROQYV.js → chunk-GDQQRV43.js} +4 -4
  102. package/chunks/{chunk-O2YT7VB4.js → chunk-GOXKNSDZ.js} +2 -65
  103. package/chunks/{chunk-V35MD7KN.js → chunk-GRC5HGPI.js} +1 -1
  104. package/chunks/chunk-GYGGUR4Q.js +253 -0
  105. package/chunks/{chunk-S6RLAIUR.js → chunk-GYTKQYDB.js} +1 -1
  106. package/chunks/{chunk-A2X3KLC3.js → chunk-GZXCZHCT.js} +3 -3
  107. package/chunks/{chunk-K5PGHDBN.js → chunk-H6XPXXMH.js} +1 -1
  108. package/chunks/{chunk-E7EMCSUG.js → chunk-HE54PGVI.js} +64 -42
  109. package/chunks/{chunk-KYMBIKIW.js → chunk-HTHUX2T5.js} +1 -1
  110. package/chunks/{chunk-LQ7TMOCE.js → chunk-HTO4JFDZ.js} +1 -1
  111. package/chunks/chunk-HZYUNZDQ.js +296 -0
  112. package/chunks/chunk-IDS7MSUP.js +74 -0
  113. package/chunks/chunk-J2TDDOSM.js +493 -0
  114. package/chunks/{chunk-4CGOWHKM.js → chunk-J4MOFEOK.js} +2 -2
  115. package/chunks/{chunk-22IFUCVR.js → chunk-JESCGQM3.js} +1 -1
  116. package/chunks/chunk-JR63TOV4.js +91 -0
  117. package/chunks/chunk-K3PPUB46.js +445 -0
  118. package/chunks/{chunk-42XGFRJS.js → chunk-KKRTYONM.js} +8 -6
  119. package/chunks/{chunk-GGQQA4JW.js → chunk-KSO42X3Z.js} +15 -2
  120. package/chunks/{chunk-MRO43B25.js → chunk-KW7NOTN6.js} +1 -1
  121. package/chunks/{chunk-54YZOP7P.js → chunk-L573Z2QZ.js} +11894 -5190
  122. package/chunks/{chunk-TLWA7TPR.js → chunk-L5U3ELZX.js} +2 -2
  123. package/chunks/{chunk-WHJQ3JUS.js → chunk-LAM6CGP5.js} +10 -10
  124. package/chunks/{chunk-H6EMK6QK.js → chunk-LQIDP6K5.js} +11913 -5207
  125. package/chunks/{chunk-MZ7BABX3.js → chunk-LXLTBIDP.js} +44 -7
  126. package/chunks/{chunk-HLKG6CZN.js → chunk-M5GB774H.js} +1 -1
  127. package/chunks/{chunk-EEN2TKST.js → chunk-MBJ3D6SF.js} +2 -2
  128. package/chunks/{chunk-PMFULMLX.js → chunk-MBP3K324.js} +2234 -377
  129. package/chunks/chunk-MR3PXB6E.js +48 -0
  130. package/chunks/{chunk-ZE6E424U.js → chunk-N7FCSERB.js} +2 -2
  131. package/chunks/{chunk-332PWN27.js → chunk-NHDKSOEY.js} +1 -1
  132. package/chunks/chunk-OATTJGPJ.js +448 -0
  133. package/chunks/{chunk-UX6OTBVD.js → chunk-OCC3UTWA.js} +2 -2
  134. package/chunks/{chunk-P7M4GA57.js → chunk-OCPBI7J5.js} +1 -1
  135. package/chunks/chunk-OJAMDVF5.js +66 -0
  136. package/chunks/{chunk-IJRL2S3D.js → chunk-OKAIGAYW.js} +6 -6
  137. package/chunks/{chunk-WQTHLB5T.js → chunk-P3S67A5R.js} +7 -7
  138. package/chunks/{chunk-FBET5XZ2.js → chunk-PEJWA3QQ.js} +29 -10
  139. package/chunks/{chunk-J7RCB6N5.js → chunk-PHYCWSDG.js} +2 -2
  140. package/chunks/{chunk-LAXNEOBG.js → chunk-PMRH4YYW.js} +18 -3
  141. package/chunks/{chunk-AGHU5VRK.js → chunk-PZL23GTM.js} +1 -1
  142. package/chunks/{chunk-PC4ZXHU2.js → chunk-Q6TUALBE.js} +3 -3
  143. package/chunks/{chunk-FXGLL2HL.js → chunk-Q7YDKOGY.js} +1 -1
  144. package/chunks/{chunk-P3XEEI3X.js → chunk-QABSSDQH.js} +36 -7
  145. package/chunks/{chunk-XOHNA2S6.js → chunk-QAW7PIHT.js} +3 -3
  146. package/chunks/{chunk-LGFAYIKX.js → chunk-QHTIBUWB.js} +1 -1
  147. package/chunks/{chunk-P3MYAZBY.js → chunk-QMGX2KO2.js} +1 -1
  148. package/chunks/{chunk-Z3I3QJK3.js → chunk-QRUIS3DN.js} +1 -1
  149. package/chunks/{chunk-ITOGNELQ.js → chunk-QSWDGAIC.js} +2 -2
  150. package/chunks/{chunk-GHOTR7HL.js → chunk-QUPXZXLV.js} +1 -1
  151. package/chunks/{chunk-W7EEOR7D.js → chunk-RCEEXIOO.js} +8 -6
  152. package/chunks/{chunk-2EM7ECZD.js → chunk-RJL5T4WJ.js} +281 -65
  153. package/chunks/{chunk-TLRYABYP.js → chunk-RKUWKYED.js} +1 -1
  154. package/chunks/{chunk-RNBYOUGV.js → chunk-RXFQM6FQ.js} +1 -1
  155. package/chunks/{chunk-JRQ7EVGE.js → chunk-S2QXYLUB.js} +2 -2
  156. package/chunks/{chunk-QXPI7FEC.js → chunk-S3TWXGKA.js} +4 -4
  157. package/chunks/{chunk-O33TBKDC.js → chunk-SE74CIZD.js} +155 -19
  158. package/chunks/{chunk-FV7425LN.js → chunk-SPJQO2CE.js} +18 -5
  159. package/chunks/{chunk-3GNOQZDC.js → chunk-SSFDPGFN.js} +11866 -11542
  160. package/chunks/{chunk-DCZWC4PF.js → chunk-SUWGUGAD.js} +5 -5
  161. package/chunks/{chunk-IBY3Q3HG.js → chunk-SXU3KKNI.js} +963 -181
  162. package/chunks/{chunk-MLZQVCF3.js → chunk-SZRN75WQ.js} +1 -1
  163. package/chunks/{chunk-M7S4GK5Z.js → chunk-T2L6SGQY.js} +115 -29
  164. package/chunks/{chunk-7RYW5LQV.js → chunk-T2NCM2ET.js} +2 -2
  165. package/chunks/{chunk-JPALE3PA.js → chunk-T5C2OUCI.js} +6 -6
  166. package/chunks/{chunk-BUZ6HGL4.js → chunk-T7FSRWQ5.js} +248 -55
  167. package/chunks/{chunk-Z2Z3GUXZ.js → chunk-TB6UDU4T.js} +1 -1
  168. package/chunks/{chunk-EXPMGZZV.js → chunk-TEGEBB2I.js} +1 -1
  169. package/chunks/{chunk-MX2YXRER.js → chunk-TJTKSVIV.js} +1 -1
  170. package/chunks/{chunk-CCGOFQV3.js → chunk-TQBODCFD.js} +8 -7
  171. package/chunks/chunk-TV6K2FB4.js +224 -0
  172. package/chunks/{chunk-5MBO76SL.js → chunk-TXY2C3D2.js} +3 -3
  173. package/chunks/{chunk-H6BD2ELD.js → chunk-TYAMGABM.js} +2 -2
  174. package/chunks/{chunk-QYNNN7BK.js → chunk-TYLOFD2U.js} +2 -2
  175. package/chunks/{chunk-VRDMOSQS.js → chunk-UDXSXLER.js} +2 -2
  176. package/chunks/{chunk-UXEW557D.js → chunk-UI3W56WF.js} +3 -3
  177. package/chunks/{chunk-CJCKDMWO.js → chunk-URK542T4.js} +1 -1
  178. package/chunks/{channel-worker-supervisor-NZQUOEFJ.js → chunk-URU5UEK6.js} +190 -34
  179. package/chunks/{chunk-AHNXYU4O.js → chunk-V6WHFGST.js} +1 -1
  180. package/chunks/chunk-V75IOTWF.js +71 -0
  181. package/chunks/{chunk-ZTQ26VBE.js → chunk-VDDGDZMA.js} +1 -1
  182. package/chunks/{chunk-OMX7CUOE.js → chunk-VGC4I5JJ.js} +1 -1
  183. package/chunks/{chunk-43W4YSO6.js → chunk-VJNBRRZG.js} +2 -2
  184. package/chunks/{chunk-ER3BKOLB.js → chunk-W7FJ3N32.js} +1 -1
  185. package/chunks/{chunk-3HX5LZ6R.js → chunk-WBL3FJEU.js} +2 -2
  186. package/chunks/{chunk-7LTB54MK.js → chunk-WIEO4CWB.js} +2 -2
  187. package/chunks/{chunk-BMFMJINR.js → chunk-WL4L7EZH.js} +1 -1
  188. package/chunks/{chunk-6VK6FIMQ.js → chunk-WM5HY72H.js} +415 -379
  189. package/chunks/{chunk-BOBRZZKD.js → chunk-WN4D7YCI.js} +5 -5
  190. package/chunks/{chunk-DHOLNQLC.js → chunk-WWQ3QIJS.js} +60 -40
  191. package/chunks/{chunk-FEJ2FZ3U.js → chunk-WX6SD4IQ.js} +2 -2
  192. package/chunks/{chunk-DICGXFAI.js → chunk-X7EBAABW.js} +11 -9
  193. package/chunks/{chunk-3RW4AZJV.js → chunk-XFSFZCM5.js} +1 -1
  194. package/chunks/{chunk-YHKAK72D.js → chunk-XHW5VUIQ.js} +102 -16
  195. package/chunks/{chunk-2MPVVENX.js → chunk-XU457J4V.js} +2 -2
  196. package/chunks/{chunk-SIUQ3YYX.js → chunk-XVNQMZ2I.js} +1 -1
  197. package/chunks/{chunk-SYCJMSIJ.js → chunk-XWRJCPHC.js} +1 -1
  198. package/chunks/{chunk-SUAKHHK7.js → chunk-Y66VOBRP.js} +3 -3
  199. package/chunks/chunk-YAF2MQZ6.js +19 -0
  200. package/chunks/{chunk-FQNC62B2.js → chunk-YH4J5XI3.js} +11 -11
  201. package/chunks/chunk-YHN5SUIJ.js +219 -0
  202. package/chunks/{chunk-BR4QREVK.js → chunk-YQ3U5MUC.js} +1 -1
  203. package/chunks/{chunk-Y6Z2O3WR.js → chunk-YUZI3WAC.js} +1 -1
  204. package/chunks/{chunk-II73RK2S.js → chunk-YVEDCAUE.js} +1 -1
  205. package/chunks/{chunk-XYR5RUA5.js → chunk-YWUK7OS7.js} +10 -3
  206. package/chunks/{chunk-27BHARDE.js → chunk-Z56JO4JZ.js} +2124 -30
  207. package/chunks/{chunk-TSPB77TG.js → chunk-ZLM3KXBT.js} +1015 -2967
  208. package/chunks/{chunk-AHNJGLFV.js → chunk-ZPAHLFZU.js} +3 -3
  209. package/chunks/chunk-ZRKBI3DP.js +34 -0
  210. package/chunks/cli-entry-path-4VJ3Y6T2.js +10 -0
  211. package/chunks/{computer-use-WMY3UOBX.js → computer-use-DIP5BWXP.js} +51 -50
  212. package/chunks/config-utils-CFT33LTP.js +24 -0
  213. package/chunks/contextCommand-QU4GJWWD.js +69 -0
  214. package/chunks/create-sub-session-TCLIYVGR.js +376 -0
  215. package/chunks/create-sub-session-WNX2OQVX.js +207 -0
  216. package/chunks/{cron-create-JSXEIPVS.js → cron-create-36TIFKRT.js} +9 -9
  217. package/chunks/{cron-delete-OIFVEPGU.js → cron-delete-OQD3WULU.js} +7 -7
  218. package/chunks/{cron-list-D4ZX4IOE.js → cron-list-4533T2FH.js} +14 -10
  219. package/chunks/{daemon-WPAENEBW.js → daemon-CEZ27OH4.js} +734 -24
  220. package/chunks/daemon-status-provider-SIBFMLBQ.js +77 -0
  221. package/chunks/{de-ZFPPQVSF.js → de-2VCDRDGU.js} +68 -6
  222. package/chunks/{devtools-FM6GJPYG.js → devtools-4QFYJT6U.js} +3 -3
  223. package/chunks/{dist-E6UANPIM.js → dist-3V3ZV6ML.js} +1011 -197
  224. package/chunks/{dist-SCFLLYMK.js → dist-ERCPDVA6.js} +12 -11
  225. package/chunks/{dist-Z34QPAQW.js → dist-HNN7DR2L.js} +529 -79
  226. package/chunks/{dist-O2IRTRPP.js → dist-JZE7F6YR.js} +10 -10
  227. package/chunks/{dist-BEXOZXLQ.js → dist-MOEC47TR.js} +36 -15
  228. package/chunks/{dist-H2AEJCZ5.js → dist-PHEPJLXD.js} +5 -5
  229. package/chunks/{dist-63IS3ZMI.js → dist-PZV5RKM6.js} +4 -4
  230. package/chunks/earlyInputCapture-L66BEG2C.js +70 -0
  231. package/chunks/{edit-OTYWAXGP.js → edit-Y5LAJSST.js} +52 -51
  232. package/chunks/{en-N4EPZAQI.js → en-NJCA3TAA.js} +78 -6
  233. package/chunks/{enter-worktree-HNYBDVCX.js → enter-worktree-X5LML7T4.js} +51 -50
  234. package/chunks/{enterPlanMode-CJCNGT63.js → enterPlanMode-XWF32QOW.js} +67 -51
  235. package/chunks/environment-YVMA5F4I.js +90 -0
  236. package/chunks/errors-4Y5SUAOC.js +76 -0
  237. package/chunks/{exit-worktree-DUUKOE3X.js → exit-worktree-SFHU7XYC.js} +51 -50
  238. package/chunks/{exitPlanMode-AMMSXOAJ.js → exitPlanMode-FP3NAN6E.js} +52 -51
  239. package/chunks/{fast-path-OV6NIP3K.js → fast-path-ZJNFFCBM.js} +8 -8
  240. package/chunks/{fast-path-settings-7RIFI3PK.js → fast-path-settings-DAOVFADC.js} +8 -6
  241. package/chunks/{fileFromPath-IBEHA3CO.js → fileFromPath-UDALK7FM.js} +3 -3
  242. package/chunks/{fr-5WWMY53B.js → fr-5F3E7WKD.js} +68 -6
  243. package/chunks/{gemini-NQ3WWBKB.js → gemini-5CAB22BI.js} +122 -109
  244. package/chunks/{geminiContentGenerator-CDUNEJQE.js → geminiContentGenerator-GE3HPIFB.js} +9 -9
  245. package/chunks/{getMachineId-bsd-4CASPIU4.js → getMachineId-bsd-EXV7SWPA.js} +3 -3
  246. package/chunks/{getMachineId-darwin-HPQPEMZR.js → getMachineId-darwin-IUOMFXU3.js} +3 -3
  247. package/chunks/{getMachineId-linux-AUARKYHL.js → getMachineId-linux-K7XJYFHL.js} +2 -2
  248. package/chunks/{getMachineId-unsupported-S32ZDA2T.js → getMachineId-unsupported-EA5FDRJ6.js} +2 -2
  249. package/chunks/{getMachineId-win-4EFLHYIJ.js → getMachineId-win-KBA6RAI5.js} +3 -3
  250. package/chunks/{glob-ROV3YS4R.js → glob-YPACZAEL.js} +98 -75
  251. package/chunks/{grep-NRITKDCD.js → grep-IPR4XW37.js} +51 -50
  252. package/chunks/handleAutoUpdate-P2KEP56V.js +70 -0
  253. package/chunks/i18n-BRCT66AA.js +85 -0
  254. package/chunks/initializer-34HXSK3A.js +74 -0
  255. package/chunks/installationInfo-WOTDQMSC.js +66 -0
  256. package/chunks/{ja-CUHZOLEJ.js → ja-66J6B53L.js} +69 -7
  257. package/chunks/{keychain-token-storage-UJV5XP4Z.js → keychain-token-storage-AU22CQI6.js} +4 -4
  258. package/chunks/{kittyProtocolDetector-OJRCJLIU.js → kittyProtocolDetector-HCNNKJTI.js} +2 -2
  259. package/chunks/list-XOGP7UPP.js +77 -0
  260. package/chunks/loadedSettingsAdapter-L4YKGU6F.js +71 -0
  261. package/chunks/{loop-wakeup-OHWEMFP5.js → loop-wakeup-MVUKDVCP.js} +10 -10
  262. package/chunks/{lowlight-FYAAUU5J.js → lowlight-J2OZNPCA.js} +1 -1
  263. package/chunks/{ls-7MFU2QYW.js → ls-RXNIAQDE.js} +6 -6
  264. package/chunks/{lsp-XHDTPTGV.js → lsp-HB5LM5IL.js} +4 -4
  265. package/chunks/mcp-HH7DIP7Y.js +71 -0
  266. package/chunks/{monitor-FL2ZO33W.js → monitor-25DEBT6U.js} +51 -50
  267. package/chunks/{multipart-parser-AJ4WASWR.js → multipart-parser-AWZKXSQN.js} +3 -3
  268. package/chunks/nonInteractiveCli-CT3VSSLK.js +130 -0
  269. package/chunks/{notebook-edit-6PULTHL5.js → notebook-edit-TAVXSWQ6.js} +52 -51
  270. package/chunks/openaiContentGenerator-6I7DKUAN.js +56 -0
  271. package/chunks/pidfile-SIQGCFLZ.js +74 -0
  272. package/chunks/{pt-OLYN42DS.js → pt-TFZO5Y6T.js} +68 -6
  273. package/chunks/{qwenContentGenerator-NX2E7PB7.js → qwenContentGenerator-5DDIXI2N.js} +53 -52
  274. package/chunks/{qwenOAuth2-ZV7YLMND.js → qwenOAuth2-LEYOU7RU.js} +9 -9
  275. package/chunks/read-file-WDOAYRFU.js +30 -0
  276. package/chunks/{read-mcp-resource-CNQHBSJM.js → read-mcp-resource-6LRTZKXI.js} +5 -5
  277. package/chunks/{read-package-up-ER5OJUGP.js → read-package-up-TCM6I7S2.js} +2 -2
  278. package/chunks/{record-artifact-SQ2OKRJW.js → record-artifact-PMDTY4OS.js} +4 -4
  279. package/chunks/ripGrep-MI7PHN3Q.js +61 -0
  280. package/chunks/{ru-LDM3GWVQ.js → ru-4L4LFHIT.js} +68 -6
  281. package/chunks/{run-qwen-serve-JK2DL7PI.js → run-qwen-serve-PNTYF3RE.js} +1289 -256
  282. package/chunks/runtime-V3FBMUTG.js +100 -0
  283. package/chunks/{scheduler-O4IGVZKK.js → scheduler-4TAUIJBM.js} +52 -51
  284. package/chunks/{send-message-76GT3JMC.js → send-message-SR4WSXP2.js} +7 -7
  285. package/chunks/serve-WB2TR7XM.js +77 -0
  286. package/chunks/{server-SGNPKX2O.js → server-AF6LNFPK.js} +8094 -2800
  287. package/chunks/{session-5BNM25EZ.js → session-BIGK4NRW.js} +341 -135
  288. package/chunks/settings-IXF5FIQO.js +121 -0
  289. package/chunks/shell-5VWJ2PPG.js +69 -0
  290. package/chunks/{skill-I22QK5XS.js → skill-SI667Y3B.js} +24 -24
  291. package/chunks/spawnChannel-IKX6DD7J.js +71 -0
  292. package/chunks/{src-BBQSM46M.js → src-55DZWDAK.js} +151 -52
  293. package/chunks/{src-7XL4G4DC.js → src-VLI3TKEY.js} +4 -4
  294. package/chunks/standalone-update-MHLSFHE6.js +80 -0
  295. package/chunks/{startInteractiveUI-JII36UGN.js → startInteractiveUI-V2EDWLAX.js} +2239 -1846
  296. package/chunks/stdioHelpers-UMY72QRP.js +14 -0
  297. package/chunks/{syntheticOutput-F7LSDCAR.js → syntheticOutput-YKFNUQZD.js} +5 -5
  298. package/chunks/task-create-NUFOHU53.js +23 -0
  299. package/chunks/{task-list-TGGJX7EA.js → task-list-Z2IKQY3S.js} +11 -10
  300. package/chunks/{task-stop-W7NGTMYQ.js → task-stop-KQFIVQTJ.js} +4 -4
  301. package/chunks/{task-update-XYWMHJGJ.js → task-update-HKADXSTD.js} +13 -12
  302. package/chunks/{team-create-A7NUU5AQ.js → team-create-IZAMLBJS.js} +51 -50
  303. package/chunks/{team-delete-UHQQ2QQX.js → team-delete-SDNTGZLG.js} +11 -10
  304. package/chunks/{team-plan-approval-TOQRJ2KI.js → team-plan-approval-3R4RCKCP.js} +51 -50
  305. package/chunks/theme-manager-LCOXZ5DO.js +65 -0
  306. package/chunks/{todoWrite-C4ZAMSR3.js → todoWrite-YNXB27GB.js} +6 -6
  307. package/chunks/{tool-search-SZ4EFS2T.js → tool-search-NYNCD5LF.js} +24 -24
  308. package/chunks/total-session-admission-PJWGOMQE.js +73 -0
  309. package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
  310. package/chunks/trustedFolders-DOJDHNYP.js +81 -0
  311. package/chunks/{types-QX5C3CHJ.js → types-JNKGKUJT.js} +2 -2
  312. package/chunks/updateCheck-ZXL66KIG.js +70 -0
  313. package/chunks/updateEventEmitter-5MKC7BLQ.js +10 -0
  314. package/chunks/validateNonInterActiveAuth-JSNJZCYY.js +195 -0
  315. package/chunks/{version-NO2XSNNP.js → version-3NLBENG5.js} +3 -3
  316. package/chunks/{web-fetch-UYGMOHW4.js → web-fetch-ZSPR3PRR.js} +8 -8
  317. package/chunks/{workflow-WO2H6NRI.js → workflow-BQYLF7XP.js} +52 -51
  318. package/chunks/workspace-providers-status-FA2DGEZW.js +74 -0
  319. package/chunks/workspace-registration-store-TARTAGMI.js +27 -0
  320. package/chunks/workspace-registry-AGE7WAXX.js +77 -0
  321. package/chunks/workspace-service-ERC5VR2B.js +83 -0
  322. package/chunks/workspace-skills-status-FKYWGNCN.js +73 -0
  323. package/chunks/{write-file-PX2Z7IBE.js → write-file-S47KSK7Z.js} +52 -51
  324. package/chunks/{yargs-B64EYTCF.js → yargs-6H2AUULL.js} +2 -2
  325. package/chunks/{zh-J4F6QWQV.js → zh-FSAH32JB.js} +79 -7
  326. package/chunks/{zh-TW-XVDWOLSW.js → zh-TW-D2YIE2LO.js} +79 -7
  327. package/cli.js +18 -17
  328. package/locales/ca.js +91 -7
  329. package/locales/de.js +90 -7
  330. package/locales/en.js +109 -7
  331. package/locales/fr.js +91 -7
  332. package/locales/ja.js +93 -7
  333. package/locales/pt.js +90 -7
  334. package/locales/ru.js +90 -7
  335. package/locales/zh-TW.js +106 -7
  336. package/locales/zh.js +106 -7
  337. package/package.json +3 -6
  338. package/web-shell/assets/{arc-BWyoJpY2.js → arc-Zj4EkBUY.js} +1 -1
  339. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BT0mGrz2.js → architectureDiagram-3BPJPVTR-DAk1Ua3Y.js} +1 -1
  340. package/web-shell/assets/{blockDiagram-GPEHLZMM-BLgUWvyf.js → blockDiagram-GPEHLZMM-DBNqUthM.js} +1 -1
  341. package/web-shell/assets/{c4Diagram-AAUBKEIU-DYx9M7oU.js → c4Diagram-AAUBKEIU-Dq5QGJ53.js} +1 -1
  342. package/web-shell/assets/channel-DWfYijFS.js +1 -0
  343. package/web-shell/assets/{chunk-2J33WTMH-CfMHWbuZ.js → chunk-2J33WTMH-DY0AeGru.js} +1 -1
  344. package/web-shell/assets/{chunk-4BX2VUAB-B1URoqEV.js → chunk-4BX2VUAB-COX3OyIi.js} +1 -1
  345. package/web-shell/assets/{chunk-55IACEB6-DAIaM4QF.js → chunk-55IACEB6-Csoyddbh.js} +1 -1
  346. package/web-shell/assets/{chunk-727SXJPM-B2X34knw.js → chunk-727SXJPM-BJPONdxX.js} +1 -1
  347. package/web-shell/assets/{chunk-AQP2D5EJ-Cif-zLTQ.js → chunk-AQP2D5EJ-syLVH6fg.js} +1 -1
  348. package/web-shell/assets/{chunk-FMBD7UC4-H18WCXdY.js → chunk-FMBD7UC4-Cfm59Nhw.js} +1 -1
  349. package/web-shell/assets/{chunk-ND2GUHAM-YFtetHi0.js → chunk-ND2GUHAM-DZf6tAqS.js} +1 -1
  350. package/web-shell/assets/{chunk-QZHKN3VN-By2hiH3r.js → chunk-QZHKN3VN-DKBp_v5q.js} +1 -1
  351. package/web-shell/assets/classDiagram-4FO5ZUOK-DDht-78J.js +1 -0
  352. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DDht-78J.js +1 -0
  353. package/web-shell/assets/{cose-bilkent-S5V4N54A-VrcnnLZu.js → cose-bilkent-S5V4N54A-DUU3mMQ5.js} +1 -1
  354. package/web-shell/assets/{dagre-BM42HDAG-CGo-IaVV.js → dagre-BM42HDAG-BUgNfbh-.js} +1 -1
  355. package/web-shell/assets/{diagram-2AECGRRQ-Dl4QjzIB.js → diagram-2AECGRRQ-DT7MVfAg.js} +1 -1
  356. package/web-shell/assets/{diagram-5GNKFQAL-qMLmsO0u.js → diagram-5GNKFQAL-Cv4YG-ec.js} +1 -1
  357. package/web-shell/assets/{diagram-KO2AKTUF-CHlmuxPI.js → diagram-KO2AKTUF-BAe9LLkn.js} +1 -1
  358. package/web-shell/assets/{diagram-LMA3HP47-BUwU3GwT.js → diagram-LMA3HP47-DW8wqTIP.js} +1 -1
  359. package/web-shell/assets/{diagram-OG6HWLK6-HEhwPDUM.js → diagram-OG6HWLK6-CmkuWbaK.js} +1 -1
  360. package/web-shell/assets/{erDiagram-TEJ5UH35-1n0llBmM.js → erDiagram-TEJ5UH35-DwvdHjZ9.js} +1 -1
  361. package/web-shell/assets/{flowDiagram-I6XJVG4X-BN74uMnt.js → flowDiagram-I6XJVG4X-CSsXrhW_.js} +1 -1
  362. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BoOq78i3.js → ganttDiagram-6RSMTGT7-BtuznCdi.js} +3 -3
  363. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CN8b00c8.js → gitGraphDiagram-PVQCEYII-DGmAm06g.js} +1 -1
  364. package/web-shell/assets/index-B9Xwf4OS.css +5 -0
  365. package/web-shell/assets/index-BEtz1cvN.js +3 -0
  366. package/web-shell/assets/index-BUkM4ZXX.js +1088 -0
  367. package/web-shell/assets/{infoDiagram-5YYISTIA-CCurnIna.js → infoDiagram-5YYISTIA-OAiZ1q0K.js} +1 -1
  368. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AwuRqdUP.js → ishikawaDiagram-YF4QCWOH-DyK0KTIT.js} +1 -1
  369. package/web-shell/assets/{journeyDiagram-JHISSGLW-B7IICk-E.js → journeyDiagram-JHISSGLW-DzYJlwfO.js} +1 -1
  370. package/web-shell/assets/{kanban-definition-UN3LZRKU-BYF0OKhx.js → kanban-definition-UN3LZRKU-CU_tcDwi.js} +1 -1
  371. package/web-shell/assets/{linear-GWWguGfD.js → linear-DvZXjF17.js} +1 -1
  372. package/web-shell/assets/{mermaid.core-JqtkxvCl.js → mermaid.core-_ZFEQlOl.js} +5 -5
  373. package/web-shell/assets/{mindmap-definition-RKZ34NQL-B0MmHsZ6.js → mindmap-definition-RKZ34NQL-Or4p64HB.js} +1 -1
  374. package/web-shell/assets/{pieDiagram-4H26LBE5-DhImUZLQ.js → pieDiagram-4H26LBE5-lXE-zZ6b.js} +1 -1
  375. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DGeSC3DT.js → quadrantDiagram-W4KKPZXB-DUXb9mUV.js} +1 -1
  376. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DkspY6Re.js → requirementDiagram-4Y6WPE33-D_10uHfo.js} +1 -1
  377. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CaOofS2x.js → sankeyDiagram-5OEKKPKP-E8c0fPqe.js} +1 -1
  378. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DFQ_kFnN.js → sequenceDiagram-3UESZ5HK-CJMtFttK.js} +1 -1
  379. package/web-shell/assets/{stateDiagram-AJRCARHV-D3snw0Tz.js → stateDiagram-AJRCARHV-DhbviRbB.js} +1 -1
  380. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CntljfwW.js +1 -0
  381. package/web-shell/assets/{timeline-definition-PNZ67QCA-l4zH8nLM.js → timeline-definition-PNZ67QCA-CM5yMkFK.js} +1 -1
  382. package/web-shell/assets/{vennDiagram-CIIHVFJN-BnRlA98M.js → vennDiagram-CIIHVFJN-BCi-zWNN.js} +1 -1
  383. package/web-shell/assets/{wardley-L42UT6IY-BS0xUdmd.js → wardley-L42UT6IY-BJ_yJNjJ.js} +1 -1
  384. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DKGBUWyQ.js → wardleyDiagram-YWT4CUSO-TjtLk-qN.js} +1 -1
  385. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DVb2HuOB.js → xychartDiagram-2RQKCTM6-D1TjyoQ3.js} +1 -1
  386. package/web-shell/index.html +16 -4
  387. package/chunks/MaxSizedBox-5DT2SD7B.js +0 -71
  388. package/chunks/agent-H2DGKS77.js +0 -68
  389. package/chunks/agent-headless-KFMFIT6J.js +0 -62
  390. package/chunks/bridge-NA3ZQQKJ.js +0 -78
  391. package/chunks/chunk-6SHO7WFF.js +0 -79
  392. package/chunks/chunk-IFEWJXFS.js +0 -37
  393. package/chunks/chunk-XNXVCNAT.js +0 -88
  394. package/chunks/contextCommand-LXFZRP4L.js +0 -68
  395. package/chunks/daemon-status-provider-GJRXY5EN.js +0 -76
  396. package/chunks/earlyInputCapture-KNOYZ4MJ.js +0 -69
  397. package/chunks/environment-ATFTYMLZ.js +0 -88
  398. package/chunks/errors-A54HAADA.js +0 -75
  399. package/chunks/handleAutoUpdate-CEZJAARW.js +0 -65
  400. package/chunks/initializer-BRFJKRRX.js +0 -71
  401. package/chunks/list-KVHF7O4X.js +0 -73
  402. package/chunks/loadedSettingsAdapter-LL5PSFKX.js +0 -68
  403. package/chunks/mcp-3GCXRTOQ.js +0 -68
  404. package/chunks/nonInteractiveCli-PTQI3DV6.js +0 -119
  405. package/chunks/openaiContentGenerator-YE42PKCY.js +0 -56
  406. package/chunks/pidfile-NZYSCFRK.js +0 -73
  407. package/chunks/read-file-33XGP5HF.js +0 -30
  408. package/chunks/ripGrep-QWZLGTAN.js +0 -60
  409. package/chunks/serve-JTMIGANH.js +0 -74
  410. package/chunks/settings-3MI4XXP6.js +0 -118
  411. package/chunks/shell-YJKBE67T.js +0 -68
  412. package/chunks/spawnChannel-UNV6W4DU.js +0 -70
  413. package/chunks/task-create-WCHTB435.js +0 -22
  414. package/chunks/theme-manager-WZ4RRMMB.js +0 -64
  415. package/chunks/total-session-admission-ULXJWXFV.js +0 -72
  416. package/chunks/trustedFolders-LAZZPZ3D.js +0 -79
  417. package/chunks/updateCheck-KONLM73X.js +0 -65
  418. package/chunks/validateNonInterActiveAuth-MPKSRCXD.js +0 -184
  419. package/chunks/workspace-providers-status-3W7E7DFW.js +0 -71
  420. package/chunks/workspace-registry-SXJZNN3O.js +0 -74
  421. package/chunks/workspace-service-CZRQZ4Q4.js +0 -80
  422. package/chunks/workspace-skills-status-K7WFREPD.js +0 -70
  423. package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +0 -35
  424. package/node_modules/@qwen-code/audio-capture/dist/index.js +0 -48
  425. package/node_modules/@qwen-code/audio-capture/dist/index.js.map +0 -1
  426. package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +0 -7
  427. package/node_modules/@qwen-code/audio-capture/dist/platform.js +0 -18
  428. package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +0 -1
  429. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +0 -21
  430. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +0 -58
  431. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +0 -5
  432. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +0 -84
  433. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +0 -19
  434. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +0 -6
  435. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +0 -207
  436. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +0 -7
  437. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +0 -43
  438. package/node_modules/@qwen-code/audio-capture/package.json +0 -30
  439. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  440. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  441. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
  442. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
  443. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  444. package/web-shell/assets/channel-wmPUGHtg.js +0 -1
  445. package/web-shell/assets/classDiagram-4FO5ZUOK-BA2ljEjW.js +0 -1
  446. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BA2ljEjW.js +0 -1
  447. package/web-shell/assets/index-CNwoO1Cn.js +0 -783
  448. package/web-shell/assets/index-CWQ0z6kZ.css +0 -5
  449. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BbSm_9d0.js +0 -1
@@ -5,10 +5,10 @@ import {
5
5
  TaggedThinkingParser,
6
6
  getRateLimitErrorDetails,
7
7
  openaiRequestCaptureContext
8
- } from "./chunk-BUZ6HGL4.js";
8
+ } from "./chunk-T7FSRWQ5.js";
9
9
  import {
10
10
  RequestTokenizer
11
- } from "./chunk-44NROQYV.js";
11
+ } from "./chunk-GDQQRV43.js";
12
12
  import {
13
13
  DASHSCOPE_PROXY_BASE_URL,
14
14
  DEFAULT_DASHSCOPE_BASE_URL,
@@ -16,34 +16,36 @@ import {
16
16
  DEFAULT_STREAM_IDLE_TIMEOUT_MS,
17
17
  MAX_STREAM_IDLE_TIMEOUT_MS,
18
18
  QWEN_STREAM_IDLE_TIMEOUT_MS_ENV,
19
+ defaultOutputCeiling,
19
20
  hasExplicitOutputLimit,
20
21
  parsePositiveIntegerEnvValue,
22
+ reconcileMaxTokens,
21
23
  resolveRequestTimeout,
22
24
  tokenLimit
23
- } from "./chunk-HW4N45EE.js";
25
+ } from "./chunk-B7NUUEXC.js";
24
26
  import {
25
27
  runtimeDiagnostics,
26
28
  safeJsonParse
27
- } from "./chunk-CCGOFQV3.js";
29
+ } from "./chunk-TQBODCFD.js";
28
30
  import {
29
31
  GenerateContentResponse
30
- } from "./chunk-55ZMG67I.js";
32
+ } from "./chunk-4LD5APFL.js";
31
33
  import {
32
34
  createChildAbortController
33
- } from "./chunk-64WXLC72.js";
35
+ } from "./chunk-DJ2GSRLV.js";
34
36
  import {
35
37
  buildRuntimeFetchOptions,
36
38
  redactProxyError
37
- } from "./chunk-H6EMK6QK.js";
39
+ } from "./chunk-LQIDP6K5.js";
38
40
  import {
39
41
  createDebugLogger,
40
42
  getErrorStatus,
41
43
  getErrorType,
42
44
  isAbortError
43
- } from "./chunk-22MNNNXE.js";
45
+ } from "./chunk-7NFB7LBQ.js";
44
46
  import {
45
47
  init_esbuild_shims
46
- } from "./chunk-A4BMJM77.js";
48
+ } from "./chunk-5O2XNYP6.js";
47
49
  import {
48
50
  __name
49
51
  } from "./chunk-J2S4EL5Y.js";
@@ -7002,7 +7004,8 @@ var DefaultOpenAICompatibleProvider = class {
7002
7004
  * configured value entirely (backend may support larger limits)
7003
7005
  * 2. If user didn't configure max_tokens:
7004
7006
  * - Check QWEN_CODE_MAX_OUTPUT_TOKENS env var first
7005
- * - Otherwise use the model's output limit
7007
+ * - Otherwise use the model's output limit, clipped to
7008
+ * OUTPUT_TOKEN_CEILING (64K)
7006
7009
  * 3. If model has no specific limit (tokenLimit returns default):
7007
7010
  * - Use DEFAULT_OUTPUT_TOKEN_LIMIT
7008
7011
  *
@@ -7038,7 +7041,7 @@ var DefaultOpenAICompatibleProvider = class {
7038
7041
  if (envMaxTokens !== void 0) {
7039
7042
  effectiveMaxTokens = isKnownModel ? Math.min(envMaxTokens, modelLimit) : envMaxTokens;
7040
7043
  } else {
7041
- effectiveMaxTokens = modelLimit;
7044
+ effectiveMaxTokens = defaultOutputCeiling(request.model);
7042
7045
  }
7043
7046
  }
7044
7047
  return {
@@ -8181,6 +8184,24 @@ var NonSSEResponseError = class extends Error {
8181
8184
  status;
8182
8185
  request_id;
8183
8186
  };
8187
+ var PROVIDER_OUTPUT_BUDGET_KEYS = ["max_completion_tokens", "max_new_tokens"];
8188
+ function hasProviderOutputBudgetKey(samplingParams) {
8189
+ return PROVIDER_OUTPUT_BUDGET_KEYS.some(
8190
+ (key) => samplingParams[key] !== void 0
8191
+ );
8192
+ }
8193
+ __name(hasProviderOutputBudgetKey, "hasProviderOutputBudgetKey");
8194
+ function clampProviderOutputBudgetKeys(samplingParams, requestMaxTokens) {
8195
+ if (typeof requestMaxTokens !== "number") return samplingParams;
8196
+ for (const key of PROVIDER_OUTPUT_BUDGET_KEYS) {
8197
+ const value = samplingParams[key];
8198
+ if (typeof value === "number" && value > requestMaxTokens) {
8199
+ samplingParams[key] = requestMaxTokens;
8200
+ }
8201
+ }
8202
+ return samplingParams;
8203
+ }
8204
+ __name(clampProviderOutputBudgetKeys, "clampProviderOutputBudgetKeys");
8184
8205
  function resolveStreamIdleTimeoutMs(config) {
8185
8206
  const fromConfig = config.streamIdleTimeoutMs;
8186
8207
  if (typeof fromConfig === "number") {
@@ -8562,7 +8583,12 @@ var ContentGenerationPipeline = class {
8562
8583
  return value !== void 0 ? { [key]: value } : {};
8563
8584
  }, "addParameterIfDefined");
8564
8585
  if (configSamplingParams !== void 0) {
8565
- return { ...configSamplingParams };
8586
+ const requestMaxTokens = request.config?.maxOutputTokens;
8587
+ const maxTokens = reconcileMaxTokens(configSamplingParams.max_tokens, requestMaxTokens) ?? configSamplingParams.max_tokens ?? (hasProviderOutputBudgetKey(configSamplingParams) ? void 0 : requestMaxTokens);
8588
+ return clampProviderOutputBudgetKeys(
8589
+ maxTokens !== void 0 ? { ...configSamplingParams, max_tokens: maxTokens } : { ...configSamplingParams },
8590
+ requestMaxTokens
8591
+ );
8566
8592
  }
8567
8593
  const params = {
8568
8594
  // Parameters with request fallback but no defaults
@@ -2,10 +2,10 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-22MNNNXE.js";
5
+ } from "./chunk-7NFB7LBQ.js";
6
6
  import {
7
7
  init_esbuild_shims
8
- } from "./chunk-A4BMJM77.js";
8
+ } from "./chunk-5O2XNYP6.js";
9
9
  import {
10
10
  __commonJS,
11
11
  __name,
@@ -15622,6 +15622,7 @@ var ToolNames = {
15622
15622
  CRON_LIST: "cron_list",
15623
15623
  CRON_DELETE: "cron_delete",
15624
15624
  LOOP_WAKEUP: "loop_wakeup",
15625
+ CREATE_SUB_SESSION: "create_sub_session",
15625
15626
  TASK_STOP: "task_stop",
15626
15627
  TASK_CREATE: "task_create",
15627
15628
  TASK_UPDATE: "task_update",
@@ -15668,6 +15669,7 @@ var ToolDisplayNames = {
15668
15669
  CRON_LIST: "CronList",
15669
15670
  CRON_DELETE: "CronDelete",
15670
15671
  LOOP_WAKEUP: "LoopWakeup",
15672
+ CREATE_SUB_SESSION: "CreateSubSession",
15671
15673
  TASK_STOP: "TaskStop",
15672
15674
  TASK_CREATE: "TaskCreate",
15673
15675
  TASK_UPDATE: "TaskUpdate",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  init_esbuild_shims
5
- } from "./chunk-A4BMJM77.js";
5
+ } from "./chunk-5O2XNYP6.js";
6
6
  import {
7
7
  __commonJS,
8
8
  __require
@@ -2,10 +2,10 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-22MNNNXE.js";
5
+ } from "./chunk-7NFB7LBQ.js";
6
6
  import {
7
7
  init_esbuild_shims
8
- } from "./chunk-A4BMJM77.js";
8
+ } from "./chunk-5O2XNYP6.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-J2S4EL5Y.js";
@@ -0,0 +1,516 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ ChannelWebhookEnqueueError
5
+ } from "./chunk-OJAMDVF5.js";
6
+ import {
7
+ init_esbuild_shims
8
+ } from "./chunk-5O2XNYP6.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-J2S4EL5Y.js";
12
+
13
+ // packages/cli/src/serve/channel-worker-group.ts
14
+ init_esbuild_shims();
15
+ var ChannelWorkerReconcileError = class extends Error {
16
+ static {
17
+ __name(this, "ChannelWorkerReconcileError");
18
+ }
19
+ rolledBack;
20
+ rollbackError;
21
+ stopFailed;
22
+ constructor(message, options) {
23
+ super(message);
24
+ this.name = "ChannelWorkerReconcileError";
25
+ this.rolledBack = options.rolledBack;
26
+ this.rollbackError = options.rollbackError;
27
+ this.stopFailed = options.stopFailed === true;
28
+ }
29
+ };
30
+ var DISABLED_SNAPSHOT = {
31
+ enabled: false,
32
+ state: "disabled",
33
+ channels: []
34
+ };
35
+ function selectionsEqual(left, right) {
36
+ if (left.mode !== right.mode) return false;
37
+ if (left.mode === "all") return true;
38
+ if (right.mode === "all" || left.names.length !== right.names.length) {
39
+ return false;
40
+ }
41
+ return left.names.every((name, index) => name === right.names[index]);
42
+ }
43
+ __name(selectionsEqual, "selectionsEqual");
44
+ function errorMessage(error) {
45
+ return error instanceof Error ? error.message : String(error);
46
+ }
47
+ __name(errorMessage, "errorMessage");
48
+ function createChannelWorkerGroup(opts) {
49
+ let generation = 0;
50
+ let entries = /* @__PURE__ */ new Map();
51
+ const groupsByWorkspace = new Map(
52
+ opts.groups.map((group2) => [group2.workspaceCwd, group2])
53
+ );
54
+ const pendingEntries = /* @__PURE__ */ new Set();
55
+ const pendingGenerations = /* @__PURE__ */ new Map();
56
+ const drainingWorkspaces = /* @__PURE__ */ new Set();
57
+ const removalPromises = /* @__PURE__ */ new Map();
58
+ let reconciling;
59
+ let stopping = false;
60
+ let groupStarted = false;
61
+ const withMeta = /* @__PURE__ */ __name((entry, snapshot) => ({
62
+ ...snapshot,
63
+ workspaceId: entry.workspaceId,
64
+ workspaceCwd: entry.workspaceCwd,
65
+ primary: entry.primary
66
+ }), "withMeta");
67
+ const createEntry = /* @__PURE__ */ __name((group2) => {
68
+ const runtime = opts.registry.getByWorkspaceCwd(group2.workspaceCwd);
69
+ if (!runtime) {
70
+ throw new Error(
71
+ `Channel worker group references unregistered workspace "${group2.workspaceCwd}".`
72
+ );
73
+ }
74
+ if (!runtime.trusted) {
75
+ throw Object.assign(
76
+ new Error(
77
+ `Channel worker group workspace "${runtime.workspaceCwd}" is not trusted.`
78
+ ),
79
+ { code: "untrusted_workspace" }
80
+ );
81
+ }
82
+ const entryGeneration = ++generation;
83
+ const withRuntimeMeta = /* @__PURE__ */ __name((snapshot) => ({
84
+ ...snapshot,
85
+ workspaceId: runtime.workspaceId,
86
+ workspaceCwd: runtime.workspaceCwd,
87
+ primary: runtime.primary
88
+ }), "withRuntimeMeta");
89
+ const supervisor = opts.createSupervisor({
90
+ cliEntryPath: opts.shared.cliEntryPath,
91
+ daemonUrl: opts.shared.daemonUrl,
92
+ ...opts.shared.daemonToken ? { daemonToken: opts.shared.daemonToken } : {},
93
+ workspace: runtime.workspaceCwd,
94
+ selection: group2.selection,
95
+ // Multi-workspace runtimes expose a per-workspace env overlay; a
96
+ // parent-process runtime leaves it undefined so the supervisor inherits
97
+ // process.env exactly as before.
98
+ ...runtime.env.effectiveEnv ? { workerBaseEnv: runtime.env.effectiveEnv } : {},
99
+ ...opts.shared.restartPolicy ? { restartPolicy: opts.shared.restartPolicy } : {},
100
+ ...opts.shared.startupTimeoutMs !== void 0 ? { startupTimeoutMs: opts.shared.startupTimeoutMs } : {},
101
+ ...opts.shared.heartbeatTimeoutMs !== void 0 ? { heartbeatTimeoutMs: opts.shared.heartbeatTimeoutMs } : {},
102
+ ...opts.onReady ? {
103
+ onReady: /* @__PURE__ */ __name((snapshot) => {
104
+ if (entries.get(runtime.workspaceCwd)?.generation === entryGeneration) {
105
+ opts.onReady(withRuntimeMeta(snapshot));
106
+ } else if (pendingGenerations.get(runtime.workspaceCwd) !== entryGeneration) {
107
+ opts.onLog?.({
108
+ stream: "stderr",
109
+ line: `Ignored stale channel worker ready (generation=${entryGeneration}).`,
110
+ workspaceCwd: runtime.workspaceCwd
111
+ });
112
+ }
113
+ }, "onReady")
114
+ } : {},
115
+ ...opts.onExit ? {
116
+ onExit: /* @__PURE__ */ __name((snapshot) => {
117
+ if (entries.get(runtime.workspaceCwd)?.generation === entryGeneration) {
118
+ opts.onExit(withRuntimeMeta(snapshot));
119
+ } else if (pendingGenerations.get(runtime.workspaceCwd) !== entryGeneration) {
120
+ opts.onLog?.({
121
+ stream: "stderr",
122
+ line: `Ignored stale channel worker exit (generation=${entryGeneration}).`,
123
+ workspaceCwd: runtime.workspaceCwd
124
+ });
125
+ }
126
+ }, "onExit")
127
+ } : {},
128
+ ...opts.onLog ? {
129
+ onLog: /* @__PURE__ */ __name((logEntry) => opts.onLog({
130
+ ...logEntry,
131
+ workspaceCwd: runtime.workspaceCwd
132
+ }), "onLog")
133
+ } : {}
134
+ });
135
+ return {
136
+ workspaceId: runtime.workspaceId,
137
+ workspaceCwd: runtime.workspaceCwd,
138
+ primary: runtime.primary,
139
+ selection: group2.selection,
140
+ generation: entryGeneration,
141
+ supervisor
142
+ };
143
+ }, "createEntry");
144
+ for (const group2 of opts.groups) {
145
+ const entry = createEntry(group2);
146
+ entries.set(entry.workspaceCwd, entry);
147
+ }
148
+ const entrySnapshots = /* @__PURE__ */ __name(() => [...entries.values()].map(
149
+ (entry) => withMeta(entry, entry.supervisor.snapshot())
150
+ ), "entrySnapshots");
151
+ const stopEntry = /* @__PURE__ */ __name((entry) => {
152
+ if (!entry.stopPromise) {
153
+ const stopPromise = entry.supervisor.stop().finally(() => opts.onStateChange?.());
154
+ entry.stopPromise = stopPromise;
155
+ void stopPromise.then(
156
+ () => {
157
+ if (entry.stopPromise === stopPromise) entry.stopPromise = void 0;
158
+ },
159
+ () => {
160
+ if (entry.stopPromise === stopPromise) entry.stopPromise = void 0;
161
+ }
162
+ );
163
+ }
164
+ return entry.stopPromise;
165
+ }, "stopEntry");
166
+ const stopEntriesBestEffort = /* @__PURE__ */ __name(async (entriesToStop) => {
167
+ await Promise.allSettled(entriesToStop.map((entry) => stopEntry(entry)));
168
+ }, "stopEntriesBestEffort");
169
+ const stopAllEntries = /* @__PURE__ */ __name(async (entriesToStop) => {
170
+ const results = await Promise.allSettled(
171
+ entriesToStop.map((entry) => stopEntry(entry))
172
+ );
173
+ const failure = results.find(
174
+ (result) => result.status === "rejected"
175
+ );
176
+ if (failure) throw failure.reason;
177
+ }, "stopAllEntries");
178
+ const stopEntriesForRollback = /* @__PURE__ */ __name(async (entriesToStop) => {
179
+ let firstError;
180
+ const failedEntries = [];
181
+ for (const entry of entriesToStop) {
182
+ try {
183
+ await stopEntry(entry);
184
+ } catch (error) {
185
+ firstError ??= errorMessage(error);
186
+ failedEntries.push(entry);
187
+ }
188
+ }
189
+ return {
190
+ ...firstError ? { error: firstError } : {},
191
+ failedEntries
192
+ };
193
+ }, "stopEntriesForRollback");
194
+ const restoreEntries = /* @__PURE__ */ __name(async (entriesToRestore) => {
195
+ let firstError;
196
+ for (const entry of entriesToRestore) {
197
+ try {
198
+ await entry.supervisor.start();
199
+ } catch (error) {
200
+ firstError ??= errorMessage(error);
201
+ }
202
+ }
203
+ return firstError ? { rolledBack: false, rollbackError: firstError } : { rolledBack: true };
204
+ }, "restoreEntries");
205
+ const routeEntry = /* @__PURE__ */ __name((channelName) => {
206
+ for (const entry of entries.values()) {
207
+ if (entry.selection.mode === "all" || entry.selection.names.includes(channelName)) {
208
+ return entry;
209
+ }
210
+ }
211
+ return void 0;
212
+ }, "routeEntry");
213
+ const detachEntry = /* @__PURE__ */ __name((entry) => {
214
+ if (entries.get(entry.workspaceCwd)?.generation === entry.generation) {
215
+ entries.delete(entry.workspaceCwd);
216
+ }
217
+ pendingEntries.delete(entry);
218
+ if (pendingGenerations.get(entry.workspaceCwd) === entry.generation) {
219
+ pendingGenerations.delete(entry.workspaceCwd);
220
+ }
221
+ }, "detachEntry");
222
+ const group = {
223
+ async start() {
224
+ stopping = false;
225
+ const started = [];
226
+ try {
227
+ for (const entry of entries.values()) {
228
+ if (drainingWorkspaces.has(entry.workspaceCwd)) {
229
+ throw new Error("Workspace drained during channel worker startup.");
230
+ }
231
+ if (stopping) {
232
+ throw new Error("Channel worker group stopped during startup.");
233
+ }
234
+ started.push(entry);
235
+ await entry.supervisor.start();
236
+ if (stopping) {
237
+ throw new Error("Channel worker group stopped during startup.");
238
+ }
239
+ if (entries.get(entry.workspaceCwd)?.generation !== entry.generation || drainingWorkspaces.has(entry.workspaceCwd)) {
240
+ throw new Error("Workspace drained during channel worker startup.");
241
+ }
242
+ }
243
+ groupStarted = true;
244
+ } catch (error) {
245
+ groupStarted = false;
246
+ await stopEntriesBestEffort(started);
247
+ throw error;
248
+ }
249
+ },
250
+ async stop() {
251
+ stopping = true;
252
+ groupStarted = false;
253
+ await reconciling?.catch(() => {
254
+ });
255
+ await stopAllEntries([...entries.values()]);
256
+ },
257
+ reconcile(targetGroups, reconcileOptions) {
258
+ if (stopping) {
259
+ return Promise.reject(
260
+ new ChannelWorkerReconcileError(
261
+ "Channel worker group has not completed stopping.",
262
+ { rolledBack: true, stopFailed: true }
263
+ )
264
+ );
265
+ }
266
+ if (drainingWorkspaces.size > 0) {
267
+ return Promise.reject(
268
+ new ChannelWorkerReconcileError(
269
+ "Channel worker configuration cannot change while a workspace is draining.",
270
+ { rolledBack: true }
271
+ )
272
+ );
273
+ }
274
+ if (reconciling) return reconciling;
275
+ reconciling = (async () => {
276
+ const targets = new Map(
277
+ targetGroups.map((target) => [target.workspaceCwd, target])
278
+ );
279
+ const unchanged = /* @__PURE__ */ new Map();
280
+ const oldAffected = [];
281
+ const newEntries = [];
282
+ for (const [workspaceCwd, entry] of entries) {
283
+ const target = targets.get(workspaceCwd);
284
+ const healthy = entry.supervisor.snapshot().state === "running";
285
+ if (target && !reconcileOptions?.force && healthy && selectionsEqual(entry.selection, target.selection)) {
286
+ unchanged.set(workspaceCwd, entry);
287
+ targets.delete(workspaceCwd);
288
+ } else {
289
+ oldAffected.push(entry);
290
+ }
291
+ }
292
+ for (const target of targets.values()) {
293
+ const entry = createEntry(target);
294
+ newEntries.push(entry);
295
+ pendingEntries.add(entry);
296
+ pendingGenerations.set(entry.workspaceCwd, entry.generation);
297
+ }
298
+ if (oldAffected.length === 0 && newEntries.length === 0) {
299
+ return { changed: false, workers: entrySnapshots() };
300
+ }
301
+ const stoppedOld = [];
302
+ try {
303
+ for (const entry of oldAffected) {
304
+ await stopEntry(entry);
305
+ stoppedOld.push(entry);
306
+ }
307
+ } catch (error) {
308
+ reconcileOptions?.onRollingBack?.();
309
+ const rollback = await restoreEntries(stoppedOld);
310
+ throw new ChannelWorkerReconcileError(errorMessage(error), {
311
+ ...rollback,
312
+ stopFailed: true
313
+ });
314
+ }
315
+ const startedNew = [];
316
+ try {
317
+ for (const entry of newEntries) {
318
+ if (drainingWorkspaces.has(entry.workspaceCwd)) {
319
+ throw new Error(
320
+ "Workspace drained during channel worker reconcile."
321
+ );
322
+ }
323
+ if (stopping) {
324
+ throw new Error("Channel worker group stopped during reconcile.");
325
+ }
326
+ startedNew.push(entry);
327
+ await entry.supervisor.start();
328
+ if (stopping) {
329
+ throw new Error("Channel worker group stopped during reconcile.");
330
+ }
331
+ if (drainingWorkspaces.has(entry.workspaceCwd)) {
332
+ throw new Error(
333
+ "Workspace drained during channel worker reconcile."
334
+ );
335
+ }
336
+ }
337
+ if (drainingWorkspaces.size > 0) {
338
+ throw new Error(
339
+ "Workspace drained during channel worker reconcile."
340
+ );
341
+ }
342
+ } catch (error) {
343
+ reconcileOptions?.onRollingBack?.();
344
+ const cleanup = await stopEntriesForRollback(startedNew);
345
+ if (cleanup.error) {
346
+ for (const entry of cleanup.failedEntries) {
347
+ entries.set(entry.workspaceCwd, entry);
348
+ }
349
+ throw new ChannelWorkerReconcileError(errorMessage(error), {
350
+ rolledBack: false,
351
+ rollbackError: cleanup.error
352
+ });
353
+ }
354
+ if (stopping) {
355
+ throw new ChannelWorkerReconcileError(errorMessage(error), {
356
+ rolledBack: false
357
+ });
358
+ }
359
+ const rollback = await restoreEntries(stoppedOld);
360
+ throw new ChannelWorkerReconcileError(errorMessage(error), rollback);
361
+ }
362
+ const committed = new Map(unchanged);
363
+ for (const entry of newEntries) {
364
+ committed.set(entry.workspaceCwd, entry);
365
+ }
366
+ entries = committed;
367
+ const targetWorkspaceCwds = new Set(
368
+ targetGroups.map((target) => target.workspaceCwd)
369
+ );
370
+ for (const workspaceCwd of groupsByWorkspace.keys()) {
371
+ if (!targetWorkspaceCwds.has(workspaceCwd)) {
372
+ groupsByWorkspace.delete(workspaceCwd);
373
+ }
374
+ }
375
+ for (const target of targetGroups) {
376
+ groupsByWorkspace.set(target.workspaceCwd, target);
377
+ }
378
+ return { changed: true, workers: entrySnapshots() };
379
+ })().finally(() => {
380
+ pendingEntries.clear();
381
+ pendingGenerations.clear();
382
+ reconciling = void 0;
383
+ });
384
+ return reconciling;
385
+ },
386
+ isHealthy() {
387
+ return entries.size > 0 && [...entries.values()].every(
388
+ (entry) => entry.supervisor.snapshot().state === "running"
389
+ );
390
+ },
391
+ killAllSync() {
392
+ stopping = true;
393
+ groupStarted = false;
394
+ for (const entry of entries.values()) {
395
+ entry.supervisor.killAllSync();
396
+ }
397
+ for (const entry of pendingEntries) {
398
+ entry.supervisor.killAllSync();
399
+ }
400
+ },
401
+ snapshots: entrySnapshots,
402
+ primarySnapshot() {
403
+ const primary = [...entries.values()].find((entry) => entry.primary);
404
+ return primary?.supervisor.snapshot() ?? { ...DISABLED_SNAPSHOT };
405
+ },
406
+ beginWorkspaceDrain(workspaceCwd) {
407
+ drainingWorkspaces.add(workspaceCwd);
408
+ },
409
+ cancelWorkspaceDrain(workspaceCwd) {
410
+ drainingWorkspaces.delete(workspaceCwd);
411
+ },
412
+ workspaceActivity(workspaceCwd) {
413
+ if (pendingGenerations.has(workspaceCwd)) return 1;
414
+ const entry = entries.get(workspaceCwd);
415
+ if (!entry) return 0;
416
+ const snapshot = entry.supervisor.snapshot();
417
+ return snapshot.state === "starting" || snapshot.state === "running" || snapshot.nextRestartAt !== void 0 ? 1 : 0;
418
+ },
419
+ removeWorkspace(workspaceCwd) {
420
+ const existing = removalPromises.get(workspaceCwd);
421
+ if (existing) return existing;
422
+ drainingWorkspaces.add(workspaceCwd);
423
+ const removal = (async () => {
424
+ try {
425
+ await reconciling?.catch(() => {
426
+ });
427
+ const entry = entries.get(workspaceCwd);
428
+ if (!entry) return;
429
+ let killError;
430
+ try {
431
+ await stopEntry(entry);
432
+ } catch {
433
+ try {
434
+ entry.supervisor.killAllSync();
435
+ } catch (err) {
436
+ killError = err;
437
+ }
438
+ } finally {
439
+ detachEntry(entry);
440
+ }
441
+ if (killError) throw killError;
442
+ } finally {
443
+ drainingWorkspaces.delete(workspaceCwd);
444
+ }
445
+ })();
446
+ removalPromises.set(workspaceCwd, removal);
447
+ void removal.then(
448
+ () => {
449
+ if (removalPromises.get(workspaceCwd) === removal) {
450
+ removalPromises.delete(workspaceCwd);
451
+ }
452
+ },
453
+ () => {
454
+ if (removalPromises.get(workspaceCwd) === removal) {
455
+ removalPromises.delete(workspaceCwd);
456
+ }
457
+ }
458
+ );
459
+ return removal;
460
+ },
461
+ async restoreWorkspace(workspaceCwd) {
462
+ if (entries.has(workspaceCwd)) return;
463
+ const target = groupsByWorkspace.get(workspaceCwd);
464
+ if (!target) return;
465
+ const entry = createEntry(target);
466
+ entries.set(workspaceCwd, entry);
467
+ if (!groupStarted || stopping) {
468
+ detachEntry(entry);
469
+ return;
470
+ }
471
+ try {
472
+ await entry.supervisor.start();
473
+ if (stopping || !groupStarted) {
474
+ await stopEntry(entry).catch(() => {
475
+ try {
476
+ entry.supervisor.killAllSync();
477
+ } catch {
478
+ }
479
+ });
480
+ detachEntry(entry);
481
+ }
482
+ } catch (err) {
483
+ await stopEntry(entry).catch(() => {
484
+ try {
485
+ entry.supervisor.killAllSync();
486
+ } catch {
487
+ }
488
+ });
489
+ detachEntry(entry);
490
+ throw err;
491
+ }
492
+ },
493
+ async enqueueWebhookTask(task) {
494
+ const entry = routeEntry(task.channelName);
495
+ if (!entry || drainingWorkspaces.has(entry.workspaceCwd)) {
496
+ throw new ChannelWebhookEnqueueError(
497
+ "channel_worker_unavailable",
498
+ `No channel worker owns channel "${task.channelName}".`
499
+ );
500
+ }
501
+ return entry.supervisor.enqueueWebhookTask(task);
502
+ }
503
+ };
504
+ return group;
505
+ }
506
+ __name(createChannelWorkerGroup, "createChannelWorkerGroup");
507
+
508
+ export {
509
+ ChannelWorkerReconcileError,
510
+ createChannelWorkerGroup
511
+ };
512
+ /**
513
+ * @license
514
+ * Copyright 2026 Qwen Team
515
+ * SPDX-License-Identifier: Apache-2.0
516
+ */