@qwen-code/qwen-code 0.21.0 → 0.21.1

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 (406) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +38 -28
  3. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  4. package/bundled/qc-helper/docs/features/channels/github.md +107 -0
  5. package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
  6. package/bundled/qc-helper/docs/features/code-review.md +1 -1
  7. package/bundled/qc-helper/docs/features/hooks.md +52 -15
  8. package/bundled/qc-helper/docs/features/mcp.md +9 -1
  9. package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
  10. package/bundled/qc-helper/docs/features/sub-agents.md +20 -0
  11. package/bundled/qc-helper/docs/qwen-serve.md +4 -2
  12. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
  13. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  14. package/bundled/review/DESIGN.md +19 -0
  15. package/bundled/review/SKILL.md +120 -61
  16. package/chunks/MaxSizedBox-VI3ROJJA.js +84 -0
  17. package/chunks/{StandaloneSessionPicker-BIRMPLRD.js → StandaloneSessionPicker-LYXKD2EV.js} +67 -68
  18. package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-DFVPFQ6C.js} +2 -2
  19. package/chunks/{acpAgent-6J2U72PQ.js → acpAgent-WN5SRDQO.js} +1373 -553
  20. package/chunks/agent-K6ECSM64.js +80 -0
  21. package/chunks/agent-headless-NO4Y2HOE.js +74 -0
  22. package/chunks/{anthropicContentGenerator-75BKLTSP.js → anthropicContentGenerator-V2QOGVYD.js} +79 -27
  23. package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-6K6U7XYJ.js} +4 -4
  24. package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-GD2IJJ7I.js} +4 -4
  25. package/chunks/bridge-3KJEWDNE.js +90 -0
  26. package/chunks/{build-RV63TIRH.js → build-S6DO7LMM.js} +1 -1
  27. package/chunks/{ca-25EDXPFZ.js → ca-6W3SK7OQ.js} +6 -1
  28. package/chunks/channel-management-service-XR7GZSWF.js +403 -0
  29. package/chunks/channel-settings-store-HW4FXXUA.js +87 -0
  30. package/chunks/{channel-worker-group-2ZD7TVAT.js → channel-worker-group-XDPTDWTX.js} +11 -6
  31. package/chunks/{channel-worker-manager-4OA4BCGB.js → channel-worker-manager-YYEHVRRE.js} +11 -6
  32. package/chunks/{channel-worker-supervisor-V7KCFJTS.js → channel-worker-supervisor-74HTWA2G.js} +7 -5
  33. package/chunks/{chunk-M5JM7OSF.js → chunk-2DN4J57Y.js} +2 -3
  34. package/chunks/{chunk-ETSW4KLJ.js → chunk-2FAK6PNM.js} +2 -2
  35. package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
  36. package/chunks/{chunk-EPDRMGT4.js → chunk-2LKVPASC.js} +4 -28
  37. package/chunks/{chunk-PWTZEM3C.js → chunk-2LQTH543.js} +3 -37
  38. package/chunks/{chunk-LH2BYDQ5.js → chunk-2N7CODY5.js} +18 -12
  39. package/chunks/{chunk-4WIZGAH3.js → chunk-2XSLTRFZ.js} +6 -58
  40. package/chunks/{chunk-FSITMZJH.js → chunk-3EFXSQCM.js} +18 -9
  41. package/chunks/{chunk-HIJQF5B5.js → chunk-3L2SPEBH.js} +1 -1
  42. package/chunks/{chunk-BIQWWWJN.js → chunk-4G2BISNC.js} +1 -1
  43. package/chunks/{chunk-PWVFN2LF.js → chunk-52ZSWYEG.js} +1 -1
  44. package/chunks/{chunk-ZJHVAS7M.js → chunk-5KTQXHPY.js} +4 -5
  45. package/chunks/{chunk-PC6JANNU.js → chunk-5MKRTI4T.js} +4 -4
  46. package/chunks/{chunk-DHHOYAPR.js → chunk-5TBMQLGG.js} +7 -7
  47. package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
  48. package/chunks/chunk-5YKDXHUY.js +463 -0
  49. package/chunks/chunk-5ZF5XXTS.js +363 -0
  50. package/chunks/{chunk-K4XWPEWB.js → chunk-64LQLPL7.js} +4 -33
  51. package/chunks/{chunk-YPE6A4GC.js → chunk-657BH7VM.js} +2 -2
  52. package/chunks/{chunk-R5AFZNQW.js → chunk-65PQENQP.js} +14 -7
  53. package/chunks/{chunk-RIBKPMRP.js → chunk-6PE7N3A4.js} +18 -7
  54. package/chunks/{chunk-JZA3JUDJ.js → chunk-6QIGFD5W.js} +1 -1
  55. package/chunks/{chunk-JVPM2ULZ.js → chunk-6RPMI2AB.js} +6 -6
  56. package/chunks/{chunk-OHNBB4XR.js → chunk-75GFAX4R.js} +1 -1
  57. package/chunks/{chunk-NIBLUX3Y.js → chunk-75MIQ3LV.js} +148 -21
  58. package/chunks/{chunk-U7M2DMGW.js → chunk-7AEJDLRA.js} +130 -5
  59. package/chunks/{chunk-TPRQ7RZH.js → chunk-7BAU433D.js} +2293 -945
  60. package/chunks/{chunk-M4FMGVY4.js → chunk-7DXQIJID.js} +3 -3
  61. package/chunks/{chunk-RWTEFFPU.js → chunk-7I5GTCT4.js} +620 -383
  62. package/chunks/{chunk-A5L3JMUA.js → chunk-7XATOOE7.js} +18 -4
  63. package/chunks/{chunk-Y34KJKDC.js → chunk-A2D5BAVP.js} +1 -1
  64. package/chunks/{chunk-5I2IWRSH.js → chunk-A3NDJ5SB.js} +2 -2
  65. package/chunks/{chunk-OFDOK3VM.js → chunk-A4COXFB3.js} +8 -13
  66. package/chunks/{chunk-JLU636DO.js → chunk-ALMR3E6Q.js} +1 -0
  67. package/chunks/{chunk-Q4M4MDQ4.js → chunk-AQIDMUGU.js} +1 -1
  68. package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
  69. package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
  70. package/chunks/{chunk-BJX6ZSUK.js → chunk-BCZFQXWK.js} +2 -2
  71. package/chunks/{chunk-MB4MZHMJ.js → chunk-BGTQCTQW.js} +211 -522
  72. package/chunks/{chunk-MZAXJAUM.js → chunk-BMFALVGQ.js} +1 -1
  73. package/chunks/{chunk-PSOO6YXD.js → chunk-BNWB5CYE.js} +9 -7
  74. package/chunks/{chunk-BKHWX6I2.js → chunk-BPZKP57P.js} +11 -3
  75. package/chunks/{chunk-H4SBPHSA.js → chunk-CAPPWD3X.js} +3 -3
  76. package/chunks/{chunk-LQIW3YFY.js → chunk-CQL64ESB.js} +7 -7
  77. package/chunks/{chunk-TOFQCPDC.js → chunk-CVHIL5IG.js} +4 -5
  78. package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
  79. package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
  80. package/chunks/chunk-DZLYR4U3.js +1252 -0
  81. package/chunks/{chunk-TEHGS6UP.js → chunk-EIF3FXTB.js} +117 -24
  82. package/chunks/{chunk-2SCDWPXI.js → chunk-EJGJIBRS.js} +5 -5
  83. package/chunks/{chunk-7MVVZO4N.js → chunk-EVKE2FZL.js} +4 -4
  84. package/chunks/{chunk-OKY7HXPG.js → chunk-FNMZK765.js} +2 -2
  85. package/chunks/{chunk-VIA5XA4U.js → chunk-FTD6DP4T.js} +3 -1
  86. package/chunks/chunk-FYJ7W2PI.js +194 -0
  87. package/chunks/{chunk-L5UHQJTJ.js → chunk-GATT5TKW.js} +1 -1
  88. package/chunks/{chunk-X5XDDSSH.js → chunk-GEBV2JGB.js} +28 -5
  89. package/chunks/{chunk-VAK25FTU.js → chunk-GKX7E4CO.js} +1 -1
  90. package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
  91. package/chunks/{chunk-5NBDS5S6.js → chunk-GNR2RNMP.js} +162 -7
  92. package/chunks/{chunk-YH6G52F2.js → chunk-GXIJHV66.js} +4 -4
  93. package/chunks/chunk-GZ3RCT54.js +76 -0
  94. package/chunks/{chunk-2X55UKQE.js → chunk-HMRM2A3U.js} +3 -3
  95. package/chunks/chunk-HV26XH34.js +319 -0
  96. package/chunks/{chunk-LB6DUZ26.js → chunk-J7OACQDE.js} +229 -172
  97. package/chunks/{chunk-K36B6G2O.js → chunk-JFMA7Y5M.js} +5 -5
  98. package/chunks/{chunk-55DJUCI2.js → chunk-JHNRZMHI.js} +53 -43
  99. package/chunks/{chunk-63P4EL5V.js → chunk-JMONIXMJ.js} +1 -1
  100. package/chunks/{chunk-L26JL52R.js → chunk-JSD33JG6.js} +47 -64
  101. package/chunks/{chunk-YBL3QUDD.js → chunk-JTV5K7NH.js} +1 -1
  102. package/chunks/{chunk-RZIX2G32.js → chunk-JX27F6QS.js} +1 -1
  103. package/chunks/chunk-JYBU6YUE.js +378 -0
  104. package/chunks/{chunk-7JURR4JT.js → chunk-KAMYKP7E.js} +167 -81
  105. package/chunks/{chunk-KMQ33DO4.js → chunk-KCO4FLFJ.js} +4 -4
  106. package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
  107. package/chunks/{chunk-RHLZR4E5.js → chunk-LGAOC3ZS.js} +1 -1
  108. package/chunks/{chunk-EBJQ6AXW.js → chunk-LO4ROVP4.js} +262 -16
  109. package/chunks/{chunk-NH6KE4JX.js → chunk-LW3RFMG7.js} +3 -3
  110. package/chunks/{chunk-J56UI34H.js → chunk-M7OONWYU.js} +2 -2
  111. package/chunks/{chunk-2NH6DYI4.js → chunk-MHAIJPTD.js} +12 -12
  112. package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
  113. package/chunks/{chunk-VRYUBFMC.js → chunk-MR5EAQ5M.js} +1 -1
  114. package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
  115. package/chunks/{chunk-H5FFA6TH.js → chunk-NOKIVHOL.js} +16 -3
  116. package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
  117. package/chunks/{chunk-SQCQ4KO2.js → chunk-OCESJA77.js} +393 -330
  118. package/chunks/chunk-OCPBI7J5.js +18 -0
  119. package/chunks/{chunk-E5TUC6CA.js → chunk-OKF7JF3R.js} +3 -3
  120. package/chunks/{chunk-TGILQ3YH.js → chunk-P4WOAOJW.js} +141 -64
  121. package/chunks/{chunk-ZFDTEDCF.js → chunk-PB3MBFKG.js} +6 -6
  122. package/chunks/{chunk-3RN6GBKS.js → chunk-PLDQBIO6.js} +1 -1
  123. package/chunks/{chunk-FNQ6T3CV.js → chunk-PONHVBRT.js} +10 -7
  124. package/chunks/{chunk-CIKQ7KKO.js → chunk-PT722TDT.js} +271 -376
  125. package/chunks/chunk-Q43KPN7X.js +2196 -0
  126. package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
  127. package/chunks/{chunk-MVSUYZDT.js → chunk-QIZKCVM3.js} +4 -4
  128. package/chunks/{chunk-QAF7NMK7.js → chunk-RCUQIPTN.js} +1 -1
  129. package/chunks/{chunk-6FGBXPWM.js → chunk-RPLGZJV2.js} +38 -44
  130. package/chunks/{chunk-GSN55ZRI.js → chunk-S4WJVPZW.js} +19 -7
  131. package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
  132. package/chunks/{chunk-BULDBTYC.js → chunk-S7W2GKIO.js} +1 -28
  133. package/chunks/{chunk-MUP3T3AD.js → chunk-SGFT55XI.js} +1 -35
  134. package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
  135. package/chunks/chunk-T26EAKDL.js +13 -0
  136. package/chunks/{chunk-UDX5OBWR.js → chunk-T2QMKU3R.js} +80 -2
  137. package/chunks/{chunk-IKYJHJNF.js → chunk-T3O2B4XO.js} +3 -3
  138. package/chunks/{chunk-RF3EXIHJ.js → chunk-T4TXDL7G.js} +32 -21
  139. package/chunks/{chunk-J24WCGIN.js → chunk-TBBV36Y4.js} +4 -4
  140. package/chunks/{chunk-LKEJ26GS.js → chunk-TCIFAA7K.js} +16 -11
  141. package/chunks/{chunk-JXJFVC6E.js → chunk-TDL6LB4K.js} +46 -11
  142. package/chunks/{chunk-7ZCNENPP.js → chunk-TFRMVU6R.js} +1 -1
  143. package/chunks/{chunk-VULLI6WQ.js → chunk-TV64SXKD.js} +6 -6
  144. package/chunks/{chunk-FQK6JAFG.js → chunk-U3E3UQAA.js} +4 -4
  145. package/chunks/{chunk-LK7CHLVP.js → chunk-U4VTUMMK.js} +0 -60
  146. package/chunks/{chunk-ACY3A37B.js → chunk-UBEPNVDI.js} +23 -18
  147. package/chunks/{chunk-NL7LTRLR.js → chunk-UHUSJ6X7.js} +29 -68
  148. package/chunks/{chunk-ZOIFNCKL.js → chunk-UPUG4GXM.js} +3 -23
  149. package/chunks/{chunk-6GMVPFB2.js → chunk-UWMLWVCA.js} +19 -6
  150. package/chunks/{chunk-IKCX4CCL.js → chunk-VCPIZRYH.js} +118 -95
  151. package/chunks/{chunk-ZNAUOR2I.js → chunk-VWOOBLTY.js} +2 -2
  152. package/chunks/{chunk-YX324OPW.js → chunk-VYOXCEPJ.js} +1 -1
  153. package/chunks/{chunk-USTWD7QV.js → chunk-W4MIWP6M.js} +26 -16
  154. package/chunks/{chunk-HTR4WV6U.js → chunk-W4RQUHY3.js} +31 -1
  155. package/chunks/{chunk-DLWL3Z7A.js → chunk-WBSMNTSV.js} +3 -3
  156. package/chunks/{chunk-IO3IX5Q4.js → chunk-WUZ7H6DP.js} +1 -1
  157. package/chunks/{chunk-2JZBVYTU.js → chunk-WZRWHXFE.js} +1 -8
  158. package/chunks/{chunk-PHOF65IG.js → chunk-X5WNMMIA.js} +23553 -34321
  159. package/chunks/chunk-XBYYDKAZ.js +80 -0
  160. package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
  161. package/chunks/{chunk-WCXCRJYB.js → chunk-XFZYFU3I.js} +1 -1
  162. package/chunks/{chunk-3QMGYBFN.js → chunk-XWWKIXVD.js} +1 -80
  163. package/chunks/{chunk-3SJ43L4W.js → chunk-XZC5VLBZ.js} +2 -0
  164. package/chunks/{chunk-UUUTRMI2.js → chunk-Y4IHBGBP.js} +1 -1
  165. package/chunks/{chunk-PR75REBZ.js → chunk-Y6AXW2OG.js} +12 -82
  166. package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
  167. package/chunks/{chunk-IJTOWOD7.js → chunk-YGF33UXG.js} +82 -8
  168. package/chunks/chunk-Z4X5MTRT.js +133 -0
  169. package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
  170. package/chunks/{chunk-ZD6UTE4A.js → chunk-ZHBO7WVX.js} +1 -1
  171. package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
  172. package/chunks/{chunk-KIM5GUMA.js → chunk-ZURDMIDR.js} +368 -156
  173. package/chunks/{computer-use-SOQ4E3VX.js → computer-use-ZTIDHMMA.js} +49 -50
  174. package/chunks/{config-utils-7V7GGIW6.js → config-utils-NYSXDMEQ.js} +4 -3
  175. package/chunks/contextCommand-2PIEU37Z.js +79 -0
  176. package/chunks/core-runtime-3XEYLQFK.js +133 -0
  177. package/chunks/{create-sub-session-QRJLW5BV.js → create-sub-session-R76FVXCI.js} +46 -47
  178. package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-SBYUMSSS.js} +3 -3
  179. package/chunks/{cron-create-YIID5XAW.js → cron-create-2QK6TCEC.js} +6 -6
  180. package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-FDCDFYMG.js} +5 -5
  181. package/chunks/{cron-list-XEGS463Q.js → cron-list-XN3WVBTP.js} +6 -6
  182. package/chunks/{daemon-YO6433NF.js → daemon-Q2AB5Z23.js} +356 -15
  183. package/chunks/daemon-status-provider-3XJI6CAL.js +89 -0
  184. package/chunks/daemon-trust-policy-ILUDTLHD.js +84 -0
  185. package/chunks/daemon-trust-policy-monitor-HS3PKKRO.js +171 -0
  186. package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
  187. package/chunks/deferred-core-runtime-X4QV662U.js +88 -0
  188. package/chunks/dist-BSTVRPMT.js +4227 -0
  189. package/chunks/{dist-46NQKLTW.js → dist-DOLYHMXE.js} +2 -2
  190. package/chunks/{dist-AIKFMUKK.js → dist-HVRQ2CFL.js} +271 -11
  191. package/chunks/{dist-WEAHOXDM.js → dist-IXQEQWRG.js} +2 -1
  192. package/chunks/{dist-BBLXMS3N.js → dist-SSU66DM4.js} +3 -3
  193. package/chunks/{dist-F6IBUDR4.js → dist-SV7Q3AWJ.js} +1 -1
  194. package/chunks/{dist-YFNEUWSE.js → dist-YGBBMK3Z.js} +1 -1
  195. package/chunks/earlyInputCapture-XKLZT7ZD.js +81 -0
  196. package/chunks/{edit-OBDSQURM.js → edit-HHGIOTQ2.js} +47 -48
  197. package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
  198. package/chunks/{enter-worktree-U6MRPQ2P.js → enter-worktree-ZN7PUQ46.js} +47 -48
  199. package/chunks/{enterPlanMode-BC5QUZZ2.js → enterPlanMode-EIFIDSIV.js} +47 -48
  200. package/chunks/{environment-W5UFC2CH.js → environment-XXQ75D2Q.js} +48 -49
  201. package/chunks/errors-4GMVU7CK.js +87 -0
  202. package/chunks/esm-K5FARBNI.js +5548 -0
  203. package/chunks/{exit-worktree-DGNYMECB.js → exit-worktree-GXMI4ATY.js} +47 -48
  204. package/chunks/exitPlanMode-34UVY7M6.js +72 -0
  205. package/chunks/{fast-path-JJZFJANL.js → fast-path-VPIVA7L6.js} +16 -6
  206. package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
  207. package/chunks/{gemini-QS36EBZV.js → gemini-4BWIK4WD.js} +102 -99
  208. package/chunks/{geminiContentGenerator-AG4KB6CV.js → geminiContentGenerator-3XVV5MSS.js} +40 -11
  209. package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
  210. package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
  211. package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
  212. package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
  213. package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
  214. package/chunks/{glob-V7R3PSK3.js → glob-TZ2ABCJG.js} +47 -48
  215. package/chunks/{grep-QYPSK7OP.js → grep-BEF463NA.js} +49 -49
  216. package/chunks/handleAutoUpdate-L6ERF36Y.js +80 -0
  217. package/chunks/i18n-FMM5FDXR.js +96 -0
  218. package/chunks/{image-gen-Z3VPGKRC.js → image-gen-HHVLF7HS.js} +12 -12
  219. package/chunks/initializer-625TIAIO.js +85 -0
  220. package/chunks/installationInfo-6AM4I2Y3.js +79 -0
  221. package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
  222. package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-72IYCAZV.js} +3 -3
  223. package/chunks/lib-RUF3WZA6.js +9 -0
  224. package/chunks/list-L2GA674Y.js +88 -0
  225. package/chunks/{list-agents-5KJJHR6I.js → list-agents-R6KDXQR3.js} +3 -3
  226. package/chunks/loadedSettingsAdapter-SPUTNKAV.js +82 -0
  227. package/chunks/{loggingContentGenerator-HS3S5H3Q.js → loggingContentGenerator-LKOF7XI7.js} +78 -113
  228. package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-3IQKCYAH.js} +7 -7
  229. package/chunks/{ls-NTK6VOQJ.js → ls-DKZ37A7N.js} +5 -5
  230. package/chunks/{lsp-2JI24STP.js → lsp-QNWN7KN3.js} +3 -3
  231. package/chunks/{managed-npm-update-JYEMMXA3.js → managed-npm-update-ACQGGIN5.js} +47 -48
  232. package/chunks/mcp-SZLHKFJW.js +82 -0
  233. package/chunks/{monitor-R3ODH5U6.js → monitor-DF52UVHI.js} +47 -48
  234. package/chunks/nonInteractiveCli-5T7KYKLK.js +144 -0
  235. package/chunks/{notebook-edit-BNOK452R.js → notebook-edit-FCWS4XVN.js} +47 -48
  236. package/chunks/{openaiContentGenerator-WMCU3O2H.js → openaiContentGenerator-7LDK3DCJ.js} +26 -27
  237. package/chunks/pidfile-6ERW3DF4.js +85 -0
  238. package/chunks/process-registry-2CHQBXH5.js +157 -0
  239. package/chunks/{processUtils-RT7UNCC2.js → processUtils-COKZAMUP.js} +2 -2
  240. package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
  241. package/chunks/{qwenContentGenerator-HHCRK4SX.js → qwenContentGenerator-TKWUMR7N.js} +52 -53
  242. package/chunks/{qwenOAuth2-OWLB5AKH.js → qwenOAuth2-7HMU47SF.js} +10 -10
  243. package/chunks/read-file-X6DRC574.js +29 -0
  244. package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-GFTWYXMK.js} +4 -4
  245. package/chunks/{record-artifact-RQKFYO5B.js → record-artifact-XAMSFSW4.js} +3 -3
  246. package/chunks/resumeHistoryUtils-PFPM2GWM.js +90 -0
  247. package/chunks/ripGrep-OWV2IVJC.js +72 -0
  248. package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
  249. package/chunks/{run-qwen-serve-FU6HEM4J.js → run-qwen-serve-TSTCO4XE.js} +953 -249
  250. package/chunks/{runtime-XXRRTNP6.js → runtime-DAUPSUKI.js} +56 -56
  251. package/chunks/{scheduler-G2ZS2Z7E.js → scheduler-KMADMT26.js} +46 -47
  252. package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
  253. package/chunks/{sdk-exporters-http-FYBSUCPD.js → sdk-exporters-http-WO556XNU.js} +7 -7
  254. package/chunks/{sdk-impl-GMVPB7NB.js → sdk-impl-LPAVACSF.js} +14 -14
  255. package/chunks/{send-message-Q6OOR6BR.js → send-message-SAWK4DZX.js} +6 -6
  256. package/chunks/serve-NNRWS6F4.js +88 -0
  257. package/chunks/{server-4UMH7OIZ.js → server-WEH7DVCH.js} +3691 -823
  258. package/chunks/{session-K3O3Q2SV.js → session-WXC56V2I.js} +98 -95
  259. package/chunks/{settings-CR2EWTBA.js → settings-DJDXFDZ3.js} +55 -56
  260. package/chunks/shell-JN5VRQXD.js +82 -0
  261. package/chunks/{skill-I3SDA4MB.js → skill-SGXPKJCS.js} +20 -21
  262. package/chunks/skill-settings-VJ5PDMZI.js +90 -0
  263. package/chunks/spawnChannel-ETMJW7YX.js +81 -0
  264. package/chunks/standalone-update-MK3Z7KBI.js +91 -0
  265. package/chunks/{startInteractiveUI-SLZGHRPH.js → startInteractiveUI-ZCGIXPGT.js} +724 -383
  266. package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-355CB6CJ.js} +4 -4
  267. package/chunks/{task-create-N7WQSGYA.js → task-create-INGWNUG4.js} +10 -10
  268. package/chunks/{task-list-FOPULZEP.js → task-list-5XNNGTF4.js} +7 -7
  269. package/chunks/{task-stop-H6RHXFVQ.js → task-stop-4ROAOBXH.js} +3 -3
  270. package/chunks/{task-update-M57TFZJT.js → task-update-CRK5VWWZ.js} +10 -10
  271. package/chunks/{team-create-YJALH5D2.js → team-create-QQGAJG7P.js} +49 -50
  272. package/chunks/{team-delete-QE2UXJL7.js → team-delete-S2RCXA4P.js} +7 -7
  273. package/chunks/{team-plan-approval-34QFYKGN.js → team-plan-approval-RT7Q5R6O.js} +47 -48
  274. package/chunks/theme-manager-EEWIQJ7J.js +76 -0
  275. package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-7WM3VDMY.js} +7 -7
  276. package/chunks/{tool-search-NF7GB6LE.js → tool-search-Z3Z4AYKP.js} +19 -21
  277. package/chunks/total-session-admission-44JKRWQD.js +84 -0
  278. package/chunks/trustedFolders-X2JEIO57.js +94 -0
  279. package/chunks/{update-relaunch-WBUZJC5O.js → update-relaunch-VWNPYDIP.js} +5 -5
  280. package/chunks/updateCheck-KAQH67DV.js +91 -0
  281. package/chunks/useAutoAcceptIndicator-JH6BCF7S.js +92 -0
  282. package/chunks/{validateNonInterActiveAuth-3R223G3R.js → validateNonInterActiveAuth-GIUJ2UFS.js} +93 -90
  283. package/chunks/{version-HS7YSFHV.js → version-BGLYIJUY.js} +1 -1
  284. package/chunks/{web-fetch-NKCSG7ZE.js → web-fetch-OTDU4VQF.js} +19 -21
  285. package/chunks/{web-search-S62WAP4S.js → web-search-FP6SIHPR.js} +13 -13
  286. package/chunks/{workflow-QAGU5RU4.js → workflow-YCIVBYSB.js} +48 -49
  287. package/chunks/workspace-providers-status-S35YAIUS.js +85 -0
  288. package/chunks/{workspace-registration-store-24JMHDGF.js → workspace-registration-store-OTMS3H4C.js} +1 -1
  289. package/chunks/workspace-registry-O63R6IZ4.js +92 -0
  290. package/chunks/workspace-service-M6LLHKJ5.js +99 -0
  291. package/chunks/workspace-skills-status-C2V7BAIS.js +85 -0
  292. package/chunks/workspace-trust-reconciler-IBUPOUJN.js +345 -0
  293. package/chunks/write-file-3BZC3EAE.js +72 -0
  294. package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
  295. package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
  296. package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
  297. package/chunks/zoom-image-TZ6S2O57.js +351 -0
  298. package/cli.js +13 -13
  299. package/locales/ca.js +7 -2
  300. package/locales/de.js +7 -2
  301. package/locales/en.js +10 -2
  302. package/locales/fr.js +7 -2
  303. package/locales/ja.js +7 -2
  304. package/locales/pt.js +7 -2
  305. package/locales/ru.js +7 -2
  306. package/locales/zh-TW.js +10 -2
  307. package/locales/zh.js +10 -2
  308. package/package.json +5 -4
  309. package/web-shell/assets/{arc-DcbWnB9T.js → arc-75-Wdeo3.js} +1 -1
  310. package/web-shell/assets/{architectureDiagram-3BPJPVTR-kMMF5sud.js → architectureDiagram-3BPJPVTR-FKeXQbyP.js} +1 -1
  311. package/web-shell/assets/{blockDiagram-GPEHLZMM-Htl9vTJS.js → blockDiagram-GPEHLZMM-CY0vc-A3.js} +1 -1
  312. package/web-shell/assets/{c4Diagram-AAUBKEIU-BnZnm0mQ.js → c4Diagram-AAUBKEIU-CNP-A-8u.js} +1 -1
  313. package/web-shell/assets/channel-DPYMT76A.js +1 -0
  314. package/web-shell/assets/{chunk-2J33WTMH-DziB7kDG.js → chunk-2J33WTMH-GybS4Gii.js} +1 -1
  315. package/web-shell/assets/{chunk-4BX2VUAB-CmkD8daw.js → chunk-4BX2VUAB-02H91V8v.js} +1 -1
  316. package/web-shell/assets/{chunk-55IACEB6-CHAd9A_U.js → chunk-55IACEB6-D3M-2VT6.js} +1 -1
  317. package/web-shell/assets/{chunk-727SXJPM-Dqaam3fE.js → chunk-727SXJPM-CCu29u4H.js} +1 -1
  318. package/web-shell/assets/{chunk-AQP2D5EJ-D_-saBYM.js → chunk-AQP2D5EJ-CaFKWgrn.js} +1 -1
  319. package/web-shell/assets/{chunk-FMBD7UC4-B9r_veWD.js → chunk-FMBD7UC4-ZZpPqIwQ.js} +1 -1
  320. package/web-shell/assets/{chunk-ND2GUHAM-B3EaCSpL.js → chunk-ND2GUHAM-D22DqGs8.js} +1 -1
  321. package/web-shell/assets/{chunk-QZHKN3VN-CYq8x9mn.js → chunk-QZHKN3VN-Bu85S0fw.js} +1 -1
  322. package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +1 -0
  323. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +1 -0
  324. package/web-shell/assets/{cose-bilkent-S5V4N54A-D0ng4uiB.js → cose-bilkent-S5V4N54A-f1CK1Gwe.js} +1 -1
  325. package/web-shell/assets/{dagre-BM42HDAG-DCZollQv.js → dagre-BM42HDAG-D0Ow8F_n.js} +1 -1
  326. package/web-shell/assets/{diagram-2AECGRRQ-Dfk2pWS0.js → diagram-2AECGRRQ-BPrmTWp8.js} +1 -1
  327. package/web-shell/assets/{diagram-5GNKFQAL-kX38ltWR.js → diagram-5GNKFQAL-HccuFAzy.js} +1 -1
  328. package/web-shell/assets/{diagram-KO2AKTUF-CJz2vsXh.js → diagram-KO2AKTUF-BrS76mbA.js} +1 -1
  329. package/web-shell/assets/{diagram-LMA3HP47-BvMLZm_7.js → diagram-LMA3HP47-V7T9lU-5.js} +1 -1
  330. package/web-shell/assets/{diagram-OG6HWLK6-l7kfStkO.js → diagram-OG6HWLK6-DKidyJMR.js} +1 -1
  331. package/web-shell/assets/{erDiagram-TEJ5UH35-BSVa8GGT.js → erDiagram-TEJ5UH35-DBadZIkp.js} +1 -1
  332. package/web-shell/assets/{flowDiagram-I6XJVG4X-CoawKIXH.js → flowDiagram-I6XJVG4X-BymfqdNJ.js} +1 -1
  333. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DFUDH0zF.js → ganttDiagram-6RSMTGT7-DOw340jf.js} +1 -1
  334. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Y2pvpT4e.js → gitGraphDiagram-PVQCEYII-_8EiD8sl.js} +1 -1
  335. package/web-shell/assets/{index-D0GX0zZf.js → index-CKIadvET.js} +1 -1
  336. package/web-shell/assets/index-D1eXNRHe.js +1389 -0
  337. package/web-shell/assets/index-DVLD4CQq.css +5 -0
  338. package/web-shell/assets/{infoDiagram-5YYISTIA-CU8_zLiX.js → infoDiagram-5YYISTIA-D61KYQBu.js} +1 -1
  339. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AVQiV0DU.js → ishikawaDiagram-YF4QCWOH-CsiXSpNx.js} +1 -1
  340. package/web-shell/assets/{journeyDiagram-JHISSGLW-DQ0VSKa3.js → journeyDiagram-JHISSGLW-Sdfionyh.js} +1 -1
  341. package/web-shell/assets/{kanban-definition-UN3LZRKU-BqnWqsE_.js → kanban-definition-UN3LZRKU-C3WI3Cnl.js} +1 -1
  342. package/web-shell/assets/{linear-BkoihsaA.js → linear-Dpigcc62.js} +1 -1
  343. package/web-shell/assets/{mermaid.core-5RJs-31j.js → mermaid.core-Ct97pqgW.js} +5 -5
  344. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D33Bxnpd.js → mindmap-definition-RKZ34NQL-BzeaN0rB.js} +1 -1
  345. package/web-shell/assets/{pieDiagram-4H26LBE5-BuEAw3BH.js → pieDiagram-4H26LBE5-CvjgcbVD.js} +1 -1
  346. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Kox_usEq.js → quadrantDiagram-W4KKPZXB-BUzgTNdH.js} +1 -1
  347. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CNjeUif0.js → requirementDiagram-4Y6WPE33-B7zKlgUQ.js} +1 -1
  348. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BCd2OL_U.js → sankeyDiagram-5OEKKPKP-Bb9CQgrT.js} +1 -1
  349. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CF2ZTsz0.js → sequenceDiagram-3UESZ5HK-DJ6V7itG.js} +1 -1
  350. package/web-shell/assets/{stateDiagram-AJRCARHV-qenSzHtm.js → stateDiagram-AJRCARHV-IImflERY.js} +1 -1
  351. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +1 -0
  352. package/web-shell/assets/{timeline-definition-PNZ67QCA-B5DyWdgs.js → timeline-definition-PNZ67QCA-6Q_uWHKh.js} +1 -1
  353. package/web-shell/assets/{vennDiagram-CIIHVFJN-DqP4I_o_.js → vennDiagram-CIIHVFJN-TmyKyjwv.js} +1 -1
  354. package/web-shell/assets/{wardley-L42UT6IY-CJe2e4mg.js → wardley-L42UT6IY-CRh9uiPv.js} +1 -1
  355. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BMDSw-Rr.js → wardleyDiagram-YWT4CUSO-59TKAW8w.js} +1 -1
  356. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BTVZYkxD.js → xychartDiagram-2RQKCTM6-GCSUIK2L.js} +1 -1
  357. package/web-shell/index.html +2 -2
  358. package/chunks/MaxSizedBox-5DPPWPGT.js +0 -85
  359. package/chunks/agent-6ODUANDO.js +0 -81
  360. package/chunks/agent-headless-7BYQTMHW.js +0 -75
  361. package/chunks/bridge-ZUB64FAE.js +0 -90
  362. package/chunks/chunk-LEH5C7FV.js +0 -232
  363. package/chunks/chunk-SZRN75WQ.js +0 -29
  364. package/chunks/chunk-UGYMA4EI.js +0 -219
  365. package/chunks/chunk-Z2BC6UJ5.js +0 -8575
  366. package/chunks/contextCommand-JLHYA34Z.js +0 -80
  367. package/chunks/daemon-status-provider-2233Q37D.js +0 -89
  368. package/chunks/earlyInputCapture-A7NDU3PF.js +0 -82
  369. package/chunks/errors-M7CLORXH.js +0 -88
  370. package/chunks/exitPlanMode-GXTBWQAR.js +0 -403
  371. package/chunks/handleAutoUpdate-6DBEZYPV.js +0 -81
  372. package/chunks/i18n-VUJJZIMU.js +0 -97
  373. package/chunks/initializer-UWAK5U5O.js +0 -86
  374. package/chunks/installationInfo-6O2YAA52.js +0 -80
  375. package/chunks/list-GB4ESM3T.js +0 -89
  376. package/chunks/loadedSettingsAdapter-OT6JVQ7U.js +0 -83
  377. package/chunks/mcp-6DBDJPFU.js +0 -83
  378. package/chunks/nonInteractiveCli-MOYCYBBU.js +0 -141
  379. package/chunks/pidfile-TFRZZZIO.js +0 -86
  380. package/chunks/read-file-APMO3PSX.js +0 -31
  381. package/chunks/resumeHistoryUtils-6KRYEAWZ.js +0 -91
  382. package/chunks/ripGrep-BEJDEDXW.js +0 -73
  383. package/chunks/serve-7BSTXJ4T.js +0 -89
  384. package/chunks/shell-HH3PF3A2.js +0 -83
  385. package/chunks/spawnChannel-RWNDBXGA.js +0 -82
  386. package/chunks/src-GE4TTTML.js +0 -3147
  387. package/chunks/standalone-update-Q6WFRZZQ.js +0 -92
  388. package/chunks/theme-manager-SWRILQHI.js +0 -77
  389. package/chunks/total-session-admission-DLHHHLD3.js +0 -84
  390. package/chunks/trustedFolders-KHXHY6PY.js +0 -93
  391. package/chunks/updateCheck-RKL6M5XN.js +0 -92
  392. package/chunks/useAutoAcceptIndicator-CFQ5BUJL.js +0 -93
  393. package/chunks/workspace-providers-status-QSVZUETE.js +0 -86
  394. package/chunks/workspace-registry-UT4RBNBM.js +0 -88
  395. package/chunks/workspace-service-JFWRUS4V.js +0 -98
  396. package/chunks/workspace-skills-status-ZBBKJOI2.js +0 -85
  397. package/chunks/write-file-VHIXW5M7.js +0 -73
  398. package/web-shell/assets/channel-Cq7YKtfC.js +0 -1
  399. package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +0 -1
  400. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +0 -1
  401. package/web-shell/assets/index-D9haPt0X.css +0 -5
  402. package/web-shell/assets/index-ckX9Pq5k.js +0 -1230
  403. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +0 -1
  404. package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
  405. package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
  406. /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
@@ -0,0 +1,378 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ SessionNotFoundError
5
+ } from "./chunk-B4AJNNOL.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/workspace-registry.ts
14
+ init_esbuild_shims();
15
+ var WorkspaceGenerationClosedError = class extends Error {
16
+ static {
17
+ __name(this, "WorkspaceGenerationClosedError");
18
+ }
19
+ code = "workspace_generation_closed";
20
+ constructor(message = "Workspace runtime generation is no longer active.") {
21
+ super(message);
22
+ this.name = "WorkspaceGenerationClosedError";
23
+ }
24
+ };
25
+ function createWorkspaceGenerationGuard() {
26
+ let closed = false;
27
+ return {
28
+ get closed() {
29
+ return closed;
30
+ },
31
+ assertOpen() {
32
+ if (closed) throw new WorkspaceGenerationClosedError();
33
+ },
34
+ close() {
35
+ closed = true;
36
+ }
37
+ };
38
+ }
39
+ __name(createWorkspaceGenerationGuard, "createWorkspaceGenerationGuard");
40
+ function createWorkspaceSessionOwnerIndex() {
41
+ const bySessionId = /* @__PURE__ */ new Map();
42
+ const register = /* @__PURE__ */ __name((sessionId, workspaceCwd) => {
43
+ let owners = bySessionId.get(sessionId);
44
+ if (!owners) {
45
+ owners = /* @__PURE__ */ new Set();
46
+ bySessionId.set(sessionId, owners);
47
+ }
48
+ owners.add(workspaceCwd);
49
+ }, "register");
50
+ const remove = /* @__PURE__ */ __name((sessionId, workspaceCwd) => {
51
+ if (workspaceCwd === void 0) {
52
+ bySessionId.delete(sessionId);
53
+ return;
54
+ }
55
+ const owners = bySessionId.get(sessionId);
56
+ if (!owners) return;
57
+ owners.delete(workspaceCwd);
58
+ if (owners.size === 0) {
59
+ bySessionId.delete(sessionId);
60
+ }
61
+ }, "remove");
62
+ return {
63
+ register,
64
+ remove,
65
+ getWorkspaceCwds: /* @__PURE__ */ __name((sessionId) => [...bySessionId.get(sessionId) ?? []], "getWorkspaceCwds"),
66
+ removeWorkspace: /* @__PURE__ */ __name((workspaceCwd) => {
67
+ for (const [sessionId, owners] of bySessionId) {
68
+ owners.delete(workspaceCwd);
69
+ if (owners.size === 0) bySessionId.delete(sessionId);
70
+ }
71
+ }, "removeWorkspace"),
72
+ handleBridgeSessionLifecycle: /* @__PURE__ */ __name((event) => {
73
+ if (event.type === "registered") {
74
+ register(event.sessionId, event.workspaceCwd);
75
+ } else {
76
+ remove(event.sessionId, event.workspaceCwd);
77
+ }
78
+ }, "handleBridgeSessionLifecycle")
79
+ };
80
+ }
81
+ __name(createWorkspaceSessionOwnerIndex, "createWorkspaceSessionOwnerIndex");
82
+ function createWorkspaceRegistry(inputRuntimes, options = {}) {
83
+ if (inputRuntimes.length === 0) {
84
+ throw new Error(
85
+ "WorkspaceRegistry requires at least one workspace runtime."
86
+ );
87
+ }
88
+ const primaryRuntimes = inputRuntimes.filter((runtime) => runtime.primary);
89
+ if (primaryRuntimes.length !== 1) {
90
+ throw new Error(
91
+ "WorkspaceRegistry requires exactly one primary workspace runtime."
92
+ );
93
+ }
94
+ const byCwd = /* @__PURE__ */ new Map();
95
+ const byId = /* @__PURE__ */ new Map();
96
+ const createEntry = /* @__PURE__ */ __name((runtime, generationId) => ({
97
+ workspaceId: runtime.workspaceId,
98
+ workspaceCwd: runtime.workspaceCwd,
99
+ ...runtime.displayName !== void 0 ? { displayName: runtime.displayName } : {},
100
+ primary: runtime.primary,
101
+ removable: runtime.removable === true,
102
+ registrationIds: Object.freeze([...runtime.registrationIds ?? []]),
103
+ lastGenerationId: generationId,
104
+ state: "active",
105
+ current: {
106
+ generationId,
107
+ policyRevision: "boot",
108
+ runtime,
109
+ guard: runtime.generationGuard ?? createWorkspaceGenerationGuard()
110
+ },
111
+ configuredRevision: "boot",
112
+ appliedRevision: "boot"
113
+ }), "createEntry");
114
+ const entries = [];
115
+ for (const runtime of inputRuntimes) {
116
+ if (byCwd.has(runtime.workspaceCwd)) {
117
+ throw new Error(
118
+ `Duplicate workspace runtime cwd ${JSON.stringify(
119
+ runtime.workspaceCwd
120
+ )}.`
121
+ );
122
+ }
123
+ const entry = createEntry(runtime, 1);
124
+ byCwd.set(runtime.workspaceCwd, entry);
125
+ if (byId.has(runtime.workspaceId)) {
126
+ throw new Error(
127
+ `Duplicate workspace runtime id ${JSON.stringify(
128
+ runtime.workspaceId
129
+ )}.`
130
+ );
131
+ }
132
+ byId.set(runtime.workspaceId, entry);
133
+ entries.push(entry);
134
+ }
135
+ const primaryEntry = entries.find((entry) => entry.primary);
136
+ const entryForRuntime = /* @__PURE__ */ __name((runtime) => {
137
+ const entry = byId.get(runtime.workspaceId);
138
+ return entry?.current?.runtime === runtime ? entry : void 0;
139
+ }, "entryForRuntime");
140
+ const activeRuntime = /* @__PURE__ */ __name((entry) => entry?.state === "active" ? entry.current?.runtime : void 0, "activeRuntime");
141
+ const requirePrimaryRuntime = /* @__PURE__ */ __name(() => {
142
+ const runtime = primaryEntry.state === "active" ? primaryEntry.current?.runtime : void 0;
143
+ if (!runtime) {
144
+ throw new WorkspaceGenerationClosedError(
145
+ "Primary workspace runtime is unavailable."
146
+ );
147
+ }
148
+ return runtime;
149
+ }, "requirePrimaryRuntime");
150
+ const sessionOwnerIndex = options.sessionOwnerIndex;
151
+ const scanLiveOwners = /* @__PURE__ */ __name((sessionId) => {
152
+ const matches = [];
153
+ for (const entry of entries) {
154
+ const runtime = activeRuntime(entry);
155
+ if (!runtime) continue;
156
+ try {
157
+ runtime.bridge.getSessionSummary(sessionId);
158
+ matches.push(runtime);
159
+ } catch (err) {
160
+ if (err instanceof SessionNotFoundError) continue;
161
+ throw err;
162
+ }
163
+ }
164
+ for (const match of matches) {
165
+ sessionOwnerIndex?.register(sessionId, match.workspaceCwd);
166
+ }
167
+ if (matches.length === 0) return { kind: "not_found" };
168
+ if (matches.length === 1) {
169
+ return { kind: "found", runtime: matches[0] };
170
+ }
171
+ return { kind: "ambiguous", runtimes: matches };
172
+ }, "scanLiveOwners");
173
+ return {
174
+ get primary() {
175
+ return requirePrimaryRuntime();
176
+ },
177
+ primaryEntry,
178
+ // Return a frozen snapshot: `runtimes` is mutable internally (see `add`),
179
+ // but callers must not be able to push/splice into the registry's state.
180
+ list: /* @__PURE__ */ __name(() => Object.freeze(
181
+ entries.flatMap((entry) => {
182
+ const runtime = activeRuntime(entry);
183
+ return runtime ? [runtime] : [];
184
+ })
185
+ ), "list"),
186
+ listEntries: /* @__PURE__ */ __name(() => Object.freeze(
187
+ entries.filter((entry) => entry.state !== "removed")
188
+ ), "listEntries"),
189
+ listManaged: /* @__PURE__ */ __name(() => Object.freeze(
190
+ entries.flatMap(
191
+ (entry) => entry.current?.runtime ? [entry.current.runtime] : []
192
+ )
193
+ ), "listManaged"),
194
+ getEntryByWorkspaceCwd: /* @__PURE__ */ __name((workspaceCwd) => byCwd.get(workspaceCwd), "getEntryByWorkspaceCwd"),
195
+ getEntryByWorkspaceId: /* @__PURE__ */ __name((workspaceId) => byId.get(workspaceId), "getEntryByWorkspaceId"),
196
+ beginReplacement: /* @__PURE__ */ __name((entry, configuredRevision) => {
197
+ if (entry.state === "blocked") {
198
+ entry.configuredRevision = configuredRevision;
199
+ entry.state = "transitioning";
200
+ entry.current?.guard.close();
201
+ sessionOwnerIndex?.removeWorkspace(entry.workspaceCwd);
202
+ delete entry.applyError;
203
+ return true;
204
+ }
205
+ if (entry.state !== "active" || !entry.current) return false;
206
+ entry.configuredRevision = configuredRevision;
207
+ entry.state = "transitioning";
208
+ entry.current.guard.close();
209
+ sessionOwnerIndex?.removeWorkspace(entry.workspaceCwd);
210
+ delete entry.applyError;
211
+ return true;
212
+ }, "beginReplacement"),
213
+ activateReplacement: /* @__PURE__ */ __name((entry, runtime, policyRevision) => {
214
+ if (entry.state !== "transitioning") {
215
+ throw new Error(
216
+ "Replacement runtime can only activate a transitioning entry."
217
+ );
218
+ }
219
+ if (runtime.workspaceId !== entry.workspaceId || runtime.workspaceCwd !== entry.workspaceCwd || runtime.primary !== entry.primary) {
220
+ throw new Error("Replacement runtime identity does not match entry.");
221
+ }
222
+ if (entry.displayName === void 0) {
223
+ delete runtime.displayName;
224
+ } else {
225
+ runtime.displayName = entry.displayName;
226
+ }
227
+ runtime.registrationIds = [...entry.registrationIds];
228
+ const generationId = entry.lastGenerationId + 1;
229
+ const generation = {
230
+ generationId,
231
+ policyRevision,
232
+ runtime,
233
+ guard: runtime.generationGuard ?? createWorkspaceGenerationGuard()
234
+ };
235
+ entry.lastGenerationId = generationId;
236
+ entry.current = generation;
237
+ entry.configuredRevision = policyRevision;
238
+ entry.appliedRevision = policyRevision;
239
+ entry.state = "active";
240
+ delete entry.applyError;
241
+ return generation;
242
+ }, "activateReplacement"),
243
+ advancePolicyRevision: /* @__PURE__ */ __name((entry, policyRevision) => {
244
+ entry.configuredRevision = policyRevision;
245
+ entry.appliedRevision = policyRevision;
246
+ if (entry.current) {
247
+ entry.current = { ...entry.current, policyRevision };
248
+ }
249
+ delete entry.applyError;
250
+ }, "advancePolicyRevision"),
251
+ blockReplacement: /* @__PURE__ */ __name((entry, error) => {
252
+ entry.current?.guard.close();
253
+ entry.state = "blocked";
254
+ entry.appliedRevision = null;
255
+ entry.applyError = error;
256
+ }, "blockReplacement"),
257
+ getByWorkspaceCwd: /* @__PURE__ */ __name((workspaceCwd) => activeRuntime(byCwd.get(workspaceCwd)), "getByWorkspaceCwd"),
258
+ getByWorkspaceId: /* @__PURE__ */ __name((workspaceId) => activeRuntime(byId.get(workspaceId)), "getByWorkspaceId"),
259
+ getManagedByWorkspaceCwd: /* @__PURE__ */ __name((workspaceCwd) => byCwd.get(workspaceCwd)?.current?.runtime, "getManagedByWorkspaceCwd"),
260
+ getManagedByWorkspaceId: /* @__PURE__ */ __name((workspaceId) => byId.get(workspaceId)?.current?.runtime, "getManagedByWorkspaceId"),
261
+ syncRuntimeMetadata: /* @__PURE__ */ __name((runtime) => {
262
+ const entry = byCwd.get(runtime.workspaceCwd);
263
+ if (!entry || entry.workspaceId !== runtime.workspaceId) return;
264
+ if (runtime.displayName === void 0) {
265
+ delete entry.displayName;
266
+ } else {
267
+ entry.displayName = runtime.displayName;
268
+ }
269
+ entry.registrationIds = Object.freeze([
270
+ ...runtime.registrationIds ?? []
271
+ ]);
272
+ const current = entry.current?.runtime;
273
+ if (!current || current === runtime) return;
274
+ if (entry.displayName === void 0) {
275
+ delete current.displayName;
276
+ } else {
277
+ current.displayName = entry.displayName;
278
+ }
279
+ current.registrationIds = [...entry.registrationIds];
280
+ }, "syncRuntimeMetadata"),
281
+ resolveWorkspaceCwd: /* @__PURE__ */ __name((workspaceCwd) => workspaceCwd === void 0 ? activeRuntime(primaryEntry) : activeRuntime(byCwd.get(workspaceCwd)), "resolveWorkspaceCwd"),
282
+ add: /* @__PURE__ */ __name((runtime) => {
283
+ if (byCwd.has(runtime.workspaceCwd)) {
284
+ throw new Error(
285
+ `Duplicate workspace runtime cwd ${JSON.stringify(runtime.workspaceCwd)}.`
286
+ );
287
+ }
288
+ if (byId.has(runtime.workspaceId)) {
289
+ throw new Error(
290
+ `Duplicate workspace runtime id ${JSON.stringify(runtime.workspaceId)}.`
291
+ );
292
+ }
293
+ const entry = createEntry(runtime, 1);
294
+ byCwd.set(runtime.workspaceCwd, entry);
295
+ byId.set(runtime.workspaceId, entry);
296
+ entries.push(entry);
297
+ }, "add"),
298
+ beginDrain: /* @__PURE__ */ __name((runtime) => {
299
+ const entry = entryForRuntime(runtime);
300
+ if (!entry || runtime.primary || entry.state !== "active") return false;
301
+ entry.state = "draining";
302
+ return true;
303
+ }, "beginDrain"),
304
+ cancelDrain: /* @__PURE__ */ __name((runtime) => {
305
+ const entry = entryForRuntime(runtime);
306
+ if (entry?.state === "draining" && entry.current?.guard.closed !== true) {
307
+ entry.state = "active";
308
+ }
309
+ }, "cancelDrain"),
310
+ commitDrain: /* @__PURE__ */ __name((runtime) => {
311
+ const entry = entryForRuntime(runtime);
312
+ if (!entry || runtime.primary || entry.state !== "draining") return;
313
+ entry.current?.guard.close();
314
+ sessionOwnerIndex?.removeWorkspace(runtime.workspaceCwd);
315
+ }, "commitDrain"),
316
+ completeDrain: /* @__PURE__ */ __name((runtime) => {
317
+ const entry = entryForRuntime(runtime);
318
+ if (!entry || runtime.primary || entry.state !== "draining") return;
319
+ entry.current?.guard.close();
320
+ entry.state = "removed";
321
+ byCwd.delete(runtime.workspaceCwd);
322
+ byId.delete(runtime.workspaceId);
323
+ const index = entries.indexOf(entry);
324
+ if (index >= 0) entries.splice(index, 1);
325
+ sessionOwnerIndex?.removeWorkspace(runtime.workspaceCwd);
326
+ }, "completeDrain"),
327
+ resolveLiveSessionOwner: /* @__PURE__ */ __name((sessionId) => {
328
+ const indexedCwds = sessionOwnerIndex?.getWorkspaceCwds(sessionId) ?? [];
329
+ if (indexedCwds.length > 0) {
330
+ const matches = [];
331
+ for (const workspaceCwd of indexedCwds) {
332
+ const entry = byCwd.get(workspaceCwd);
333
+ const runtime = entry?.current?.runtime;
334
+ if (!entry || !runtime || entry.state === "removed") {
335
+ sessionOwnerIndex?.remove(sessionId, workspaceCwd);
336
+ continue;
337
+ }
338
+ if (entry.state !== "active") continue;
339
+ try {
340
+ runtime.bridge.getSessionSummary(sessionId);
341
+ matches.push(runtime);
342
+ } catch (err) {
343
+ if (err instanceof SessionNotFoundError) {
344
+ sessionOwnerIndex?.remove(sessionId, workspaceCwd);
345
+ continue;
346
+ }
347
+ throw err;
348
+ }
349
+ }
350
+ if (matches.length === 1) {
351
+ return { kind: "found", runtime: matches[0] };
352
+ }
353
+ if (matches.length > 1) {
354
+ return { kind: "ambiguous", runtimes: matches };
355
+ }
356
+ }
357
+ return options.scanUnindexedOwners !== false ? scanLiveOwners(sessionId) : { kind: "not_found" };
358
+ }, "resolveLiveSessionOwner")
359
+ };
360
+ }
361
+ __name(createWorkspaceRegistry, "createWorkspaceRegistry");
362
+ function createSingleWorkspaceRegistry(runtime, options = {}) {
363
+ return createWorkspaceRegistry([runtime], options);
364
+ }
365
+ __name(createSingleWorkspaceRegistry, "createSingleWorkspaceRegistry");
366
+
367
+ export {
368
+ WorkspaceGenerationClosedError,
369
+ createWorkspaceGenerationGuard,
370
+ createWorkspaceSessionOwnerIndex,
371
+ createWorkspaceRegistry,
372
+ createSingleWorkspaceRegistry
373
+ };
374
+ /**
375
+ * @license
376
+ * Copyright 2026 Qwen Team
377
+ * SPDX-License-Identifier: Apache-2.0
378
+ */
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  MissingCliEntryError
5
- } from "./chunk-VIA5XA4U.js";
5
+ } from "./chunk-FTD6DP4T.js";
6
6
  import {
7
7
  redactLogCredentials
8
8
  } from "./chunk-M5GB774H.js";
@@ -125,6 +125,144 @@ function callHook(hook, value) {
125
125
  }
126
126
  __name(callHook, "callHook");
127
127
 
128
+ // packages/acp-bridge/src/process-registry.ts
129
+ init_esbuild_shims();
130
+ var TERM_GRACE_MS = 5e3;
131
+ var EXIT_DEADLINE_MS = 1e4;
132
+ var ProcessRegistry = class {
133
+ static {
134
+ __name(this, "ProcessRegistry");
135
+ }
136
+ reservations = /* @__PURE__ */ new Set();
137
+ children = /* @__PURE__ */ new Set();
138
+ draining = false;
139
+ shutdownPromise;
140
+ reserve() {
141
+ if (this.draining) {
142
+ throw new Error("ACP process registry is draining");
143
+ }
144
+ const token = Symbol("acp-child");
145
+ this.reservations.add(token);
146
+ let settled = false;
147
+ return {
148
+ attach: /* @__PURE__ */ __name((child) => {
149
+ if (settled || !this.reservations.delete(token)) {
150
+ throw new Error("ACP process reservation is no longer active");
151
+ }
152
+ settled = true;
153
+ const tracked = new TrackedChild(child, () => {
154
+ this.children.delete(tracked);
155
+ });
156
+ this.children.add(tracked);
157
+ if (this.draining) void tracked.terminate().catch(() => {
158
+ });
159
+ return tracked;
160
+ }, "attach"),
161
+ cancel: /* @__PURE__ */ __name(() => {
162
+ if (settled) return;
163
+ settled = true;
164
+ this.reservations.delete(token);
165
+ }, "cancel")
166
+ };
167
+ }
168
+ shutdown() {
169
+ if (this.shutdownPromise) return this.shutdownPromise;
170
+ this.draining = true;
171
+ this.shutdownPromise = Promise.allSettled(
172
+ [...this.children].map((child) => child.terminate())
173
+ ).then((results) => {
174
+ const failures = results.flatMap(
175
+ (result) => result.status === "rejected" ? [result.reason] : []
176
+ );
177
+ if (failures.length > 0) {
178
+ throw new AggregateError(failures, "ACP child process shutdown failed");
179
+ }
180
+ });
181
+ return this.shutdownPromise;
182
+ }
183
+ killAllSync() {
184
+ this.draining = true;
185
+ for (const child of this.children) child.killSync();
186
+ }
187
+ get activeProcessCount() {
188
+ return this.children.size;
189
+ }
190
+ };
191
+ var TrackedChild = class {
192
+ constructor(child, onExit) {
193
+ this.child = child;
194
+ this.onExit = onExit;
195
+ this.exited = new Promise((resolve) => {
196
+ const finish = /* @__PURE__ */ __name((info) => {
197
+ if (this.exitedSettled) return;
198
+ this.exitedSettled = true;
199
+ this.onExit();
200
+ resolve(info);
201
+ }, "finish");
202
+ child.once("exit", (exitCode, signalCode) => {
203
+ finish({ exitCode, signalCode });
204
+ });
205
+ child.once("spawn", () => {
206
+ this.spawnConfirmed = true;
207
+ });
208
+ child.once("error", () => {
209
+ if (!this.spawnConfirmed) finish(void 0);
210
+ });
211
+ });
212
+ }
213
+ static {
214
+ __name(this, "TrackedChild");
215
+ }
216
+ exited;
217
+ exitedSettled = false;
218
+ spawnConfirmed = false;
219
+ terminatePromise;
220
+ terminate() {
221
+ this.terminatePromise ??= this.terminateOnce();
222
+ return this.terminatePromise;
223
+ }
224
+ killSync() {
225
+ if (this.exitedSettled) return;
226
+ try {
227
+ this.child.kill("SIGKILL");
228
+ } catch {
229
+ }
230
+ }
231
+ async terminateOnce() {
232
+ if (this.exitedSettled) return;
233
+ try {
234
+ this.child.kill("SIGTERM");
235
+ } catch {
236
+ if (this.exitedSettled) return;
237
+ }
238
+ let hardKillTimer;
239
+ let deadlineTimer;
240
+ const deadline = new Promise((_, reject) => {
241
+ hardKillTimer = setTimeout(() => this.killSync(), TERM_GRACE_MS);
242
+ hardKillTimer.unref();
243
+ deadlineTimer = setTimeout(() => {
244
+ reject(
245
+ new Error(
246
+ `ACP child pid=${this.child.pid ?? "unknown"} did not exit within ${EXIT_DEADLINE_MS}ms`
247
+ )
248
+ );
249
+ }, EXIT_DEADLINE_MS);
250
+ deadlineTimer.unref();
251
+ });
252
+ try {
253
+ const exitInfo = await Promise.race([this.exited, deadline]);
254
+ if (exitInfo && (exitInfo.exitCode !== 0 || exitInfo.signalCode !== null)) {
255
+ throw new Error(
256
+ `ACP child pid=${this.child.pid ?? "unknown"} exited uncleanly during shutdown (code=${exitInfo.exitCode ?? "none"}, signal=${exitInfo.signalCode ?? "none"})`
257
+ );
258
+ }
259
+ } finally {
260
+ if (hardKillTimer) clearTimeout(hardKillTimer);
261
+ if (deadlineTimer) clearTimeout(deadlineTimer);
262
+ }
263
+ }
264
+ };
265
+
128
266
  // packages/acp-bridge/src/spawnChannel.ts
129
267
  var cachedMemoryArgs;
130
268
  function getAcpMemoryArgs() {
@@ -178,6 +316,7 @@ function createStderrForwarder(opts) {
178
316
  }
179
317
  __name(createStderrForwarder, "createStderrForwarder");
180
318
  function createSpawnChannelFactory(options = {}) {
319
+ const processRegistry = options.processRegistry ?? new ProcessRegistry();
181
320
  return async (workspaceCwd, childEnvOverrides) => {
182
321
  const sourceEnv = options.sourceEnv ?? process.env;
183
322
  const cliEntry = sourceEnv["QWEN_CLI_ENTRY"] || process.argv[1];
@@ -194,21 +333,29 @@ function createSpawnChannelFactory(options = {}) {
194
333
  const execArgs = process.execArgv.filter(
195
334
  (a) => !/^--inspect(-brk)?($|=)/.test(a)
196
335
  );
197
- const child = spawn(
198
- process.execPath,
199
- [
200
- ...execArgs,
201
- ...memoryArgs,
202
- cliEntry,
203
- "--acp",
204
- ...options.extraArgs ?? []
205
- ],
206
- {
207
- cwd: workspaceCwd,
208
- stdio: ["pipe", "pipe", "pipe"],
209
- env: childEnv
210
- }
211
- );
336
+ const reservation = processRegistry.reserve();
337
+ let child;
338
+ try {
339
+ child = spawn(
340
+ process.execPath,
341
+ [
342
+ ...execArgs,
343
+ ...memoryArgs,
344
+ cliEntry,
345
+ "--acp",
346
+ ...options.extraArgs ?? []
347
+ ],
348
+ {
349
+ cwd: workspaceCwd,
350
+ stdio: ["pipe", "pipe", "pipe"],
351
+ env: childEnv
352
+ }
353
+ );
354
+ } catch (error) {
355
+ reservation.cancel();
356
+ throw error;
357
+ }
358
+ const trackedChild = reservation.attach(child);
212
359
  if (child.stderr) {
213
360
  const prefix = `[serve pid=${child.pid} cwd=${workspaceCwd}] `;
214
361
  const forwarder = createStderrForwarder({
@@ -221,21 +368,8 @@ function createSpawnChannelFactory(options = {}) {
221
368
  child.stderr.on("error", () => {
222
369
  });
223
370
  }
224
- const exited = new Promise((resolve) => {
225
- let resolved = false;
226
- const finish = /* @__PURE__ */ __name((info) => {
227
- if (resolved) return;
228
- resolved = true;
229
- resolve(info);
230
- }, "finish");
231
- child.once(
232
- "exit",
233
- (code, signal) => finish({ exitCode: code, signalCode: signal })
234
- );
235
- child.once("error", () => finish(void 0));
236
- });
237
371
  if (!child.stdin || !child.stdout) {
238
- child.kill("SIGKILL");
372
+ trackedChild.killSync();
239
373
  throw new Error(
240
374
  "Spawned ACP child has no stdin/stdout \u2014 cannot establish NDJSON channel."
241
375
  );
@@ -245,22 +379,14 @@ function createSpawnChannelFactory(options = {}) {
245
379
  const stream = ndJsonStream(writable, readable, options.pipeHooks);
246
380
  return {
247
381
  stream,
248
- kill: /* @__PURE__ */ __name(() => killChild(child), "kill"),
249
- killSync: /* @__PURE__ */ __name(() => {
250
- if (child.exitCode === null && child.signalCode === null) {
251
- try {
252
- child.kill("SIGKILL");
253
- } catch {
254
- }
255
- }
256
- }, "killSync"),
257
- exited
382
+ kill: /* @__PURE__ */ __name(() => trackedChild.terminate(), "kill"),
383
+ killSync: /* @__PURE__ */ __name(() => trackedChild.killSync(), "killSync"),
384
+ exited: trackedChild.exited
258
385
  };
259
386
  };
260
387
  }
261
388
  __name(createSpawnChannelFactory, "createSpawnChannelFactory");
262
389
  var defaultSpawnChannelFactory = createSpawnChannelFactory();
263
- var KILL_HARD_DEADLINE_MS = 1e4;
264
390
  var SCRUBBED_CHILD_ENV_KEYS = /* @__PURE__ */ new Set([
265
391
  "QWEN_SERVER_TOKEN",
266
392
  "QWEN_CODE_SIMPLE"
@@ -283,46 +409,6 @@ function scrubChildEnv(source, scrubbed, overrides) {
283
409
  return childEnv;
284
410
  }
285
411
  __name(scrubChildEnv, "scrubChildEnv");
286
- function killChild(child) {
287
- return new Promise((resolve) => {
288
- if (child.exitCode !== null || child.signalCode !== null) {
289
- resolve();
290
- return;
291
- }
292
- let resolved = false;
293
- const finish = /* @__PURE__ */ __name(() => {
294
- if (resolved) return;
295
- resolved = true;
296
- child.removeListener("exit", finish);
297
- resolve();
298
- }, "finish");
299
- child.once("exit", finish);
300
- try {
301
- child.kill("SIGTERM");
302
- } catch {
303
- finish();
304
- return;
305
- }
306
- setTimeout(() => {
307
- if (!resolved && child.exitCode === null && child.signalCode === null) {
308
- try {
309
- child.kill("SIGKILL");
310
- } catch {
311
- }
312
- }
313
- }, 5e3).unref();
314
- setTimeout(() => {
315
- if (!resolved) {
316
- process.stderr.write(
317
- `qwen serve: killChild hard deadline (${KILL_HARD_DEADLINE_MS}ms) reached; child pid=${child.pid} still alive (uninterruptible sleep?) \u2014 abandoning. Operator should check for zombie qwen --acp processes holding workspace resources.
318
- `
319
- );
320
- finish();
321
- }
322
- }, KILL_HARD_DEADLINE_MS).unref();
323
- });
324
- }
325
- __name(killChild, "killChild");
326
412
 
327
413
  export {
328
414
  ndJsonStream,
@@ -3,21 +3,21 @@
3
3
  import {
4
4
  resolveModelConfig,
5
5
  resolveProviderProtocol
6
- } from "./chunk-PHOF65IG.js";
6
+ } from "./chunk-X5WNMMIA.js";
7
7
  import {
8
8
  external_exports
9
9
  } from "./chunk-H6XPXXMH.js";
10
10
  import {
11
11
  stripRuntimeSnapshotPrefix
12
- } from "./chunk-MZAXJAUM.js";
12
+ } from "./chunk-BMFALVGQ.js";
13
13
  import {
14
14
  REASONING_EFFORT_TIERS,
15
15
  normalizeReasoningEffort
16
- } from "./chunk-XVNQMZ2I.js";
16
+ } from "./chunk-DGEIYUC3.js";
17
17
  import {
18
18
  AuthType,
19
19
  MODEL_GENERATION_CONFIG_FIELDS
20
- } from "./chunk-IKCX4CCL.js";
20
+ } from "./chunk-VCPIZRYH.js";
21
21
  import {
22
22
  init_esbuild_shims
23
23
  } from "./chunk-5O2XNYP6.js";