@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
@@ -1,5 +1,12 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ CHANNEL_LOOP_MCP_IPC_TIMEOUT_MS,
5
+ MAX_CHANNEL_LOOP_MCP_IN_FLIGHT,
6
+ createChannelLoopMcpRequest,
7
+ isChannelLoopMcpControlMessage,
8
+ isChannelLoopMcpResultMessage
9
+ } from "./chunk-FYJ7W2PI.js";
3
10
  import {
4
11
  CHANNEL_DAEMON_WORKER_SENTINEL,
5
12
  CHANNEL_DELIVERY_IPC_TIMEOUT_MS,
@@ -18,26 +25,28 @@ import {
18
25
  QWEN_SERVER_TOKEN_ENV,
19
26
  createChannelDeliveryMessage,
20
27
  createChannelWebhookTaskMessage,
21
- createWorkerDiagnosticRedactor,
22
28
  isChannelDeliveryResultMessage,
23
29
  isChannelStartupReportMessage,
24
30
  isChannelStartupReportType,
25
31
  isChannelWebhookEnqueueErrorCode,
26
- isChannelWebhookTaskResultMessage,
32
+ isChannelWebhookTaskResultMessage
33
+ } from "./chunk-U4VTUMMK.js";
34
+ import {
35
+ createWorkerDiagnosticRedactor,
27
36
  normalizeWorkerDiagnostic,
28
37
  sanitizeWorkerDiagnostic
29
- } from "./chunk-LK7CHLVP.js";
38
+ } from "./chunk-GZ3RCT54.js";
30
39
  import {
31
40
  channelSelectionNames
32
- } from "./chunk-JLU636DO.js";
33
- import {
34
- sanitizeLogText
35
- } from "./chunk-RWTEFFPU.js";
41
+ } from "./chunk-ALMR3E6Q.js";
36
42
  import {
37
43
  CHANNEL_WORKER_KILL_GRACE_MS,
38
44
  CHANNEL_WORKER_STARTUP_TIMEOUT_MS,
39
45
  CHANNEL_WORKER_STOP_GRACE_MS
40
46
  } from "./chunk-5HBA2Z7V.js";
47
+ import {
48
+ sanitizeLogText
49
+ } from "./chunk-7I5GTCT4.js";
41
50
  import {
42
51
  init_esbuild_shims
43
52
  } from "./chunk-5O2XNYP6.js";
@@ -269,6 +278,8 @@ function createChannelWorkerSupervisor(opts) {
269
278
  let restartAttemptTimes = [];
270
279
  const pendingWebhookTasks = /* @__PURE__ */ new Map();
271
280
  const pendingChannelDeliveries = /* @__PURE__ */ new Map();
281
+ const pendingChannelLoopMcpMessages = /* @__PURE__ */ new Map();
282
+ let cleanupChannelLoopMcpRegistrations;
272
283
  let restarting;
273
284
  let disposed = false;
274
285
  const snapshotCopy = /* @__PURE__ */ __name(() => ({
@@ -365,6 +376,28 @@ function createChannelWorkerSupervisor(opts) {
365
376
  }
366
377
  return true;
367
378
  }, "settleChannelDelivery");
379
+ const rejectPendingChannelLoopMcpMessages = /* @__PURE__ */ __name((message) => {
380
+ for (const pending of pendingChannelLoopMcpMessages.values()) {
381
+ clearTimeout(pending.timer);
382
+ pending.reject(new Error(message));
383
+ }
384
+ pendingChannelLoopMcpMessages.clear();
385
+ }, "rejectPendingChannelLoopMcpMessages");
386
+ const settleChannelLoopMcpMessage = /* @__PURE__ */ __name((message) => {
387
+ if (!isChannelLoopMcpResultMessage(message)) return false;
388
+ const pending = pendingChannelLoopMcpMessages.get(message.id);
389
+ if (!pending) return true;
390
+ pendingChannelLoopMcpMessages.delete(message.id);
391
+ clearTimeout(pending.timer);
392
+ if (message.ok) {
393
+ pending.resolve(message.payload ?? {});
394
+ } else {
395
+ pending.reject(
396
+ new Error(message.error ?? "Channel loop MCP request failed.")
397
+ );
398
+ }
399
+ return true;
400
+ }, "settleChannelLoopMcpMessage");
368
401
  const pruneRestartAttempts = /* @__PURE__ */ __name((nowMs) => {
369
402
  restartAttemptTimes = restartAttemptTimes.filter(
370
403
  (attemptMs) => nowMs - attemptMs < restartPolicy.windowMs
@@ -527,6 +560,57 @@ function createChannelWorkerSupervisor(opts) {
527
560
  if (startedChild.pid !== void 0) {
528
561
  snapshot = { ...snapshot, pid: startedChild.pid };
529
562
  }
563
+ const channelLoopMcpOwnerId = `channel-worker:${randomUUID()}`;
564
+ const registeredChannelLoopMcpSessions = /* @__PURE__ */ new Set();
565
+ const activeChannelLoopMcpControls = /* @__PURE__ */ new Set();
566
+ const sendToStartedChild = /* @__PURE__ */ __name((message, callback) => {
567
+ if (child !== startedChild || !startedChild.send) {
568
+ throw new Error("Channel worker IPC is unavailable.");
569
+ }
570
+ return callback ? startedChild.send.call(startedChild, message, callback) : startedChild.send.call(startedChild, message);
571
+ }, "sendToStartedChild");
572
+ const sendChannelLoopMcpMessage = /* @__PURE__ */ __name((sessionId, payload) => {
573
+ if (pendingChannelLoopMcpMessages.size >= MAX_CHANNEL_LOOP_MCP_IN_FLIGHT) {
574
+ return Promise.reject(new Error("Channel loop MCP IPC queue is full."));
575
+ }
576
+ const message = createChannelLoopMcpRequest(sessionId, payload);
577
+ return new Promise((resolve, reject) => {
578
+ const timer = setTimeout(() => {
579
+ pendingChannelLoopMcpMessages.delete(message.id);
580
+ reject(new Error("Channel loop MCP IPC timed out."));
581
+ }, CHANNEL_LOOP_MCP_IPC_TIMEOUT_MS);
582
+ timer.unref();
583
+ pendingChannelLoopMcpMessages.set(message.id, {
584
+ resolve,
585
+ reject,
586
+ timer
587
+ });
588
+ try {
589
+ sendToStartedChild(message, (error) => {
590
+ if (!error) return;
591
+ const pending = pendingChannelLoopMcpMessages.get(message.id);
592
+ if (!pending) return;
593
+ pendingChannelLoopMcpMessages.delete(message.id);
594
+ clearTimeout(pending.timer);
595
+ pending.reject(new Error("Channel loop MCP IPC send failed."));
596
+ });
597
+ } catch {
598
+ const pending = pendingChannelLoopMcpMessages.get(message.id);
599
+ if (!pending) return;
600
+ pendingChannelLoopMcpMessages.delete(message.id);
601
+ clearTimeout(pending.timer);
602
+ pending.reject(new Error("Channel loop MCP IPC send failed."));
603
+ }
604
+ });
605
+ }, "sendChannelLoopMcpMessage");
606
+ const cleanupLaunchChannelLoopMcpRegistrations = /* @__PURE__ */ __name(() => {
607
+ for (const sessionId of registeredChannelLoopMcpSessions) {
608
+ void opts.unregisterChannelLoopMcp?.(sessionId, channelLoopMcpOwnerId).catch(() => {
609
+ });
610
+ }
611
+ registeredChannelLoopMcpSessions.clear();
612
+ }, "cleanupLaunchChannelLoopMcpRegistrations");
613
+ cleanupChannelLoopMcpRegistrations = cleanupLaunchChannelLoopMcpRegistrations;
530
614
  await new Promise((resolve, reject) => {
531
615
  let settled = false;
532
616
  let ready = false;
@@ -723,6 +807,61 @@ function createChannelWorkerSupervisor(opts) {
723
807
  };
724
808
  armStaleHeartbeatTimer(startedChild);
725
809
  }, "handleHeartbeat");
810
+ const sendChannelLoopMcpControlResult = /* @__PURE__ */ __name((id, result) => {
811
+ try {
812
+ sendToStartedChild({
813
+ type: "channel_loop_mcp_control_result",
814
+ id,
815
+ ...result
816
+ });
817
+ } catch {
818
+ }
819
+ }, "sendChannelLoopMcpControlResult");
820
+ const handleChannelLoopMcpControl = /* @__PURE__ */ __name((message) => {
821
+ if (activeChannelLoopMcpControls.size >= MAX_CHANNEL_LOOP_MCP_IN_FLIGHT) {
822
+ sendChannelLoopMcpControlResult(message.id, {
823
+ ok: false,
824
+ error: "Channel loop MCP IPC queue is full."
825
+ });
826
+ return;
827
+ }
828
+ activeChannelLoopMcpControls.add(message.id);
829
+ const operation = message.type === "channel_loop_mcp_register" ? opts.registerChannelLoopMcp?.({
830
+ sessionId: message.sessionId,
831
+ ownerId: channelLoopMcpOwnerId,
832
+ sendMessage: /* @__PURE__ */ __name((payload) => sendChannelLoopMcpMessage(message.sessionId, payload), "sendMessage")
833
+ }).then(async () => {
834
+ if (child !== startedChild) {
835
+ await opts.unregisterChannelLoopMcp?.(
836
+ message.sessionId,
837
+ channelLoopMcpOwnerId
838
+ );
839
+ throw new Error("Channel worker exited during MCP setup.");
840
+ }
841
+ registeredChannelLoopMcpSessions.add(message.sessionId);
842
+ }) ?? Promise.reject(
843
+ new Error("Channel loop MCP registration is unavailable.")
844
+ ) : opts.unregisterChannelLoopMcp?.(
845
+ message.sessionId,
846
+ channelLoopMcpOwnerId
847
+ ).then(() => {
848
+ registeredChannelLoopMcpSessions.delete(message.sessionId);
849
+ }) ?? Promise.resolve();
850
+ void operation.then(() => {
851
+ sendChannelLoopMcpControlResult(message.id, { ok: true });
852
+ }).catch((error) => {
853
+ sendChannelLoopMcpControlResult(message.id, {
854
+ ok: false,
855
+ error: sanitizeWorkerDiagnostic(
856
+ error instanceof Error ? error.message : String(error),
857
+ 512,
858
+ redaction
859
+ ) || "Channel loop MCP operation failed."
860
+ });
861
+ }).finally(() => {
862
+ activeChannelLoopMcpControls.delete(message.id);
863
+ });
864
+ }, "handleChannelLoopMcpControl");
726
865
  function handleMessage(message) {
727
866
  if (child !== startedChild) return;
728
867
  if (settleChannelDelivery(message)) {
@@ -731,6 +870,13 @@ function createChannelWorkerSupervisor(opts) {
731
870
  if (settleWebhookTask(message)) {
732
871
  return;
733
872
  }
873
+ if (settleChannelLoopMcpMessage(message)) {
874
+ return;
875
+ }
876
+ if (isChannelLoopMcpControlMessage(message)) {
877
+ handleChannelLoopMcpControl(message);
878
+ return;
879
+ }
734
880
  if (!ready && isChannelStartupReportType(message)) {
735
881
  handleStartupReport(message);
736
882
  } else if (!ready && isReadyMessage(message)) {
@@ -760,6 +906,11 @@ function createChannelWorkerSupervisor(opts) {
760
906
  "channel_worker_unavailable",
761
907
  "Channel worker exited."
762
908
  );
909
+ rejectPendingChannelLoopMcpMessages("Channel worker exited.");
910
+ cleanupLaunchChannelLoopMcpRegistrations();
911
+ if (cleanupChannelLoopMcpRegistrations === cleanupLaunchChannelLoopMcpRegistrations) {
912
+ cleanupChannelLoopMcpRegistrations = void 0;
913
+ }
763
914
  child = void 0;
764
915
  if ((ready || kind === "restart") && !stopping) {
765
916
  scheduleRestart();
@@ -839,6 +990,7 @@ function createChannelWorkerSupervisor(opts) {
839
990
  "channel_worker_unavailable",
840
991
  "Channel worker stopped."
841
992
  );
993
+ rejectPendingChannelLoopMcpMessages("Channel worker stopped.");
842
994
  if (!child || snapshot.state === "exited" || snapshot.state === "failed" && hasObservedExit(snapshot) || snapshot.state === "stopped") {
843
995
  child = void 0;
844
996
  snapshot = { ...snapshot, state: "stopped" };
@@ -887,6 +1039,9 @@ function createChannelWorkerSupervisor(opts) {
887
1039
  "channel_worker_unavailable",
888
1040
  "Channel worker stopped."
889
1041
  );
1042
+ rejectPendingChannelLoopMcpMessages("Channel worker stopped.");
1043
+ cleanupChannelLoopMcpRegistrations?.();
1044
+ cleanupChannelLoopMcpRegistrations = void 0;
890
1045
  if (!child || snapshot.state === "exited" || snapshot.state === "failed" && hasObservedExit(snapshot) || snapshot.state === "stopped") {
891
1046
  clearRestartTimer();
892
1047
  clearStaleHeartbeatTimer();
@@ -2,20 +2,20 @@
2
2
  "use strict";
3
3
  import {
4
4
  createTask
5
- } from "./chunk-K4XWPEWB.js";
5
+ } from "./chunk-64LQLPL7.js";
6
6
  import {
7
7
  getPlanRequiredTeammatePreApprovalMessage,
8
8
  isPlanRequiredTeammateAwaitingApproval
9
- } from "./chunk-L26JL52R.js";
9
+ } from "./chunk-JSD33JG6.js";
10
10
  import {
11
11
  resolveActiveTeamName
12
- } from "./chunk-6AM5D4ME.js";
12
+ } from "./chunk-S6LOFUVP.js";
13
13
  import {
14
14
  BaseDeclarativeTool,
15
15
  BaseToolInvocation,
16
16
  ToolDisplayNames,
17
17
  ToolNames
18
- } from "./chunk-PR75REBZ.js";
18
+ } from "./chunk-Y6AXW2OG.js";
19
19
  import {
20
20
  init_esbuild_shims
21
21
  } from "./chunk-5O2XNYP6.js";
@@ -0,0 +1,76 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ redactLogCredentials
5
+ } from "./chunk-M5GB774H.js";
6
+ import {
7
+ sanitizeLogText
8
+ } from "./chunk-7I5GTCT4.js";
9
+ import {
10
+ stripAnsi
11
+ } from "./chunk-TWPJO254.js";
12
+ import {
13
+ init_esbuild_shims
14
+ } from "./chunk-5O2XNYP6.js";
15
+ import {
16
+ __name
17
+ } from "./chunk-J2S4EL5Y.js";
18
+
19
+ // packages/cli/src/serve/channel-worker-diagnostics.ts
20
+ init_esbuild_shims();
21
+ var WORKER_LOG_INVISIBLE_RE = new RegExp("[\\p{Cf}\\u2028\\u2029]|\\p{Variation_Selector}", "gu");
22
+ var WORKER_LOG_CONTROL_RE = /[\x00-\x1f\x7f-\x9f]/g;
23
+ function escapeRegExp(value) {
24
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
25
+ }
26
+ __name(escapeRegExp, "escapeRegExp");
27
+ function sensitiveEnvValues(env) {
28
+ const sensitiveKey = /(^|_)(TOKEN|SECRET|API_KEY|ACCESS_KEY|PRIVATE_KEY|CREDENTIAL|PASSWORD|PASSWD|PASSPHRASE|BASIC_AUTH|AUTH_TOKEN|AUTHORIZATION|SESSION_SECRET|SESSION_TOKEN|SESSION_KEY|SESSION_COOKIE|DSN|CONNECTION_STRING)($|_)/i;
29
+ return Object.entries(env).filter(([key, value]) => sensitiveKey.test(key) && value !== void 0).flatMap(([, value]) => {
30
+ const lines = value.split("\n").filter((line) => line.length >= 4);
31
+ return lines.length > 0 ? [value, ...lines] : [value];
32
+ }).filter((value) => value.length >= 4);
33
+ }
34
+ __name(sensitiveEnvValues, "sensitiveEnvValues");
35
+ function normalizeWorkerDiagnostic(value) {
36
+ return stripAnsi(value).replace(WORKER_LOG_INVISIBLE_RE, "").replace(WORKER_LOG_CONTROL_RE, "");
37
+ }
38
+ __name(normalizeWorkerDiagnostic, "normalizeWorkerDiagnostic");
39
+ function createWorkerDiagnosticRedactor(opts) {
40
+ const secretPatterns = [
41
+ ...new Set(
42
+ [
43
+ ...opts.daemonToken ? [opts.daemonToken] : [],
44
+ ...sensitiveEnvValues(opts.workerEnv)
45
+ ].flatMap((secret) => [
46
+ normalizeWorkerDiagnostic(secret),
47
+ normalizeWorkerDiagnostic(secret.replace(/\t/gu, " "))
48
+ ]).filter((secret) => secret.length >= 4)
49
+ )
50
+ ].sort((left, right) => right.length - left.length).map((secret) => new RegExp(escapeRegExp(secret), "g"));
51
+ return (value) => {
52
+ let redacted = value;
53
+ for (const secretPattern of secretPatterns) {
54
+ redacted = redacted.replace(secretPattern, "<redacted>");
55
+ }
56
+ return redactLogCredentials(redacted);
57
+ };
58
+ }
59
+ __name(createWorkerDiagnosticRedactor, "createWorkerDiagnosticRedactor");
60
+ function sanitizeWorkerDiagnostic(value, maxLength, opts) {
61
+ const normalized = normalizeWorkerDiagnostic(value);
62
+ const redacted = createWorkerDiagnosticRedactor(opts)(normalized);
63
+ return sanitizeLogText(redacted, maxLength);
64
+ }
65
+ __name(sanitizeWorkerDiagnostic, "sanitizeWorkerDiagnostic");
66
+
67
+ export {
68
+ normalizeWorkerDiagnostic,
69
+ createWorkerDiagnosticRedactor,
70
+ sanitizeWorkerDiagnostic
71
+ };
72
+ /**
73
+ * @license
74
+ * Copyright 2026 Qwen Team
75
+ * SPDX-License-Identifier: Apache-2.0
76
+ */
@@ -2,16 +2,16 @@
2
2
  "use strict";
3
3
  import {
4
4
  useKeypress
5
- } from "./chunk-LQIW3YFY.js";
5
+ } from "./chunk-CQL64ESB.js";
6
6
  import {
7
7
  require_react
8
8
  } from "./chunk-5QWWOFGG.js";
9
9
  import {
10
10
  t
11
- } from "./chunk-LKEJ26GS.js";
11
+ } from "./chunk-TCIFAA7K.js";
12
12
  import {
13
13
  APPROVAL_MODES
14
- } from "./chunk-L26JL52R.js";
14
+ } from "./chunk-JSD33JG6.js";
15
15
  import {
16
16
  init_esbuild_shims
17
17
  } from "./chunk-5O2XNYP6.js";
@@ -0,0 +1,319 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ getUserSettingsPath,
5
+ v1ToV2Migration
6
+ } from "./chunk-EIF3FXTB.js";
7
+ import {
8
+ getSystemDefaultsPath,
9
+ getSystemSettingsPath
10
+ } from "./chunk-IDS7MSUP.js";
11
+ import {
12
+ LoadedTrustedFolders,
13
+ TrustLevel,
14
+ getTrustedFoldersPath
15
+ } from "./chunk-Q43KPN7X.js";
16
+ import {
17
+ require_strip_json_comments
18
+ } from "./chunk-ALGGS7UH.js";
19
+ import {
20
+ arePathsEquivalent
21
+ } from "./chunk-MR3PXB6E.js";
22
+ import {
23
+ ideContextStore
24
+ } from "./chunk-X5WNMMIA.js";
25
+ import {
26
+ init_esbuild_shims
27
+ } from "./chunk-5O2XNYP6.js";
28
+ import {
29
+ __name,
30
+ __toESM
31
+ } from "./chunk-J2S4EL5Y.js";
32
+
33
+ // packages/cli/src/config/daemon-trust-policy.ts
34
+ init_esbuild_shims();
35
+ import { createHash } from "node:crypto";
36
+ import * as fs from "node:fs/promises";
37
+ var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
38
+ var MAX_TRUSTED_FOLDERS_BYTES = 1024 * 1024;
39
+ var MAX_SETTINGS_BYTES = 4 * 1024 * 1024;
40
+ function policyError(code, filePath, error) {
41
+ return {
42
+ code,
43
+ path: filePath,
44
+ message: error instanceof Error ? error.message : String(error)
45
+ };
46
+ }
47
+ __name(policyError, "policyError");
48
+ async function readJsonObject(filePath, maxBytes, requireRegularFile, retryMissing = false) {
49
+ const delays = [0, 50, 200];
50
+ let result = {};
51
+ for (const delay of delays) {
52
+ if (delay > 0) {
53
+ await new Promise((resolve) => setTimeout(resolve, delay));
54
+ }
55
+ result = await readJsonObjectOnce(filePath, maxBytes, requireRegularFile);
56
+ if (!result.error && (!result.missing || !retryMissing)) return result;
57
+ }
58
+ return result;
59
+ }
60
+ __name(readJsonObject, "readJsonObject");
61
+ async function readJsonObjectOnce(filePath, maxBytes, requireRegularFile) {
62
+ let stat2;
63
+ try {
64
+ stat2 = await fs.lstat(filePath);
65
+ } catch (error) {
66
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") {
67
+ return { value: {}, missing: true };
68
+ }
69
+ return {
70
+ error: policyError("trust_policy_unreadable", filePath, error)
71
+ };
72
+ }
73
+ if (!requireRegularFile && stat2.isSymbolicLink()) {
74
+ try {
75
+ stat2 = await fs.stat(filePath);
76
+ } catch (error) {
77
+ return {
78
+ error: policyError("trust_policy_unreadable", filePath, error)
79
+ };
80
+ }
81
+ }
82
+ if (requireRegularFile && stat2.isSymbolicLink() || !stat2.isFile()) {
83
+ return {
84
+ error: policyError(
85
+ "trust_policy_invalid",
86
+ filePath,
87
+ new Error("Trust policy input must be a regular file.")
88
+ )
89
+ };
90
+ }
91
+ if (stat2.size > maxBytes) {
92
+ return {
93
+ error: policyError(
94
+ "trust_policy_invalid",
95
+ filePath,
96
+ new Error(`Trust policy input exceeds ${maxBytes} bytes.`)
97
+ )
98
+ };
99
+ }
100
+ try {
101
+ const raw = await fs.readFile(filePath, "utf8");
102
+ const parsed = JSON.parse((0, import_strip_json_comments.default)(raw));
103
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
104
+ throw new Error("Trust policy input must contain a JSON object.");
105
+ }
106
+ return { value: parsed };
107
+ } catch (error) {
108
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") {
109
+ return { value: {}, missing: true };
110
+ }
111
+ return { error: policyError("trust_policy_invalid", filePath, error) };
112
+ }
113
+ }
114
+ __name(readJsonObjectOnce, "readJsonObjectOnce");
115
+ function migrateFolderTrustSettings(value, scope) {
116
+ if (!value || !v1ToV2Migration.shouldMigrate(value)) return value;
117
+ return v1ToV2Migration.migrate(value, scope).settings;
118
+ }
119
+ __name(migrateFolderTrustSettings, "migrateFolderTrustSettings");
120
+ function folderTrustSetting(value, filePath) {
121
+ if (!value || !("security" in value)) return {};
122
+ const security = value?.["security"];
123
+ if (typeof security !== "object" || security === null || Array.isArray(security)) {
124
+ return {
125
+ error: policyError(
126
+ "trust_policy_invalid",
127
+ filePath,
128
+ new Error("`security` must be an object.")
129
+ )
130
+ };
131
+ }
132
+ if (!("folderTrust" in security)) return {};
133
+ const folderTrust = security["folderTrust"];
134
+ if (typeof folderTrust !== "object" || folderTrust === null || Array.isArray(folderTrust)) {
135
+ return {
136
+ error: policyError(
137
+ "trust_policy_invalid",
138
+ filePath,
139
+ new Error("`security.folderTrust` must be an object.")
140
+ )
141
+ };
142
+ }
143
+ if (!("enabled" in folderTrust)) return {};
144
+ const enabled = folderTrust["enabled"];
145
+ if (typeof enabled === "boolean") return { value: enabled };
146
+ return {
147
+ error: policyError(
148
+ "trust_policy_invalid",
149
+ filePath,
150
+ new Error("`security.folderTrust.enabled` must be a boolean.")
151
+ )
152
+ };
153
+ }
154
+ __name(folderTrustSetting, "folderTrustSetting");
155
+ function parseTrustedFolders(value, filePath) {
156
+ const config = {};
157
+ for (const [rulePath, rawLevel] of Object.entries(value ?? {})) {
158
+ if (!Object.values(TrustLevel).includes(rawLevel)) {
159
+ return {
160
+ config: {},
161
+ error: policyError(
162
+ "trust_policy_invalid",
163
+ filePath,
164
+ new Error(`Invalid trust level for ${JSON.stringify(rulePath)}.`)
165
+ )
166
+ };
167
+ }
168
+ config[rulePath] = rawLevel;
169
+ }
170
+ return { config };
171
+ }
172
+ __name(parseTrustedFolders, "parseTrustedFolders");
173
+ function semanticRevision(input) {
174
+ const sortedRules = Object.entries(input.trustedFolders).sort(
175
+ ([a], [b]) => a.localeCompare(b)
176
+ );
177
+ return createHash("sha256").update(
178
+ JSON.stringify({
179
+ folderTrustEnabled: input.folderTrustEnabled,
180
+ ideTrust: input.ideTrust ?? null,
181
+ trustedFolders: sortedRules,
182
+ settingsError: input.settingsError?.code ?? null,
183
+ trustedFoldersError: input.trustedFoldersError?.code ?? null
184
+ })
185
+ ).digest("hex");
186
+ }
187
+ __name(semanticRevision, "semanticRevision");
188
+ async function readDaemonTrustPolicySnapshot() {
189
+ const [user, system, systemDefaults] = await Promise.all([
190
+ readJsonObject(getUserSettingsPath(), MAX_SETTINGS_BYTES, false),
191
+ readJsonObject(getSystemSettingsPath(), MAX_SETTINGS_BYTES, false),
192
+ readJsonObject(getSystemDefaultsPath(), MAX_SETTINGS_BYTES, false)
193
+ ]);
194
+ const systemFolderTrust = folderTrustSetting(
195
+ migrateFolderTrustSettings(system.value, "System"),
196
+ getSystemSettingsPath()
197
+ );
198
+ const userFolderTrust = folderTrustSetting(
199
+ migrateFolderTrustSettings(user.value, "User"),
200
+ getUserSettingsPath()
201
+ );
202
+ const defaultsFolderTrust = folderTrustSetting(
203
+ migrateFolderTrustSettings(systemDefaults.value, "SystemDefaults"),
204
+ getSystemDefaultsPath()
205
+ );
206
+ const settingsError = system.error ?? systemFolderTrust.error ?? user.error ?? userFolderTrust.error ?? systemDefaults.error ?? defaultsFolderTrust.error;
207
+ const folderTrustEnabled = systemFolderTrust.value ?? userFolderTrust.value ?? defaultsFolderTrust.value ?? false;
208
+ const trustedFoldersFile = await readJsonObject(
209
+ getTrustedFoldersPath(),
210
+ MAX_TRUSTED_FOLDERS_BYTES,
211
+ true,
212
+ folderTrustEnabled
213
+ );
214
+ const parsedTrustedFolders = parseTrustedFolders(
215
+ trustedFoldersFile.value,
216
+ getTrustedFoldersPath()
217
+ );
218
+ const trustedFoldersError = trustedFoldersFile.error ?? parsedTrustedFolders.error;
219
+ const ideTrust = ideContextStore.get()?.workspaceState?.isTrusted;
220
+ const revision = semanticRevision({
221
+ folderTrustEnabled,
222
+ ideTrust,
223
+ trustedFolders: parsedTrustedFolders.config,
224
+ ...settingsError ? { settingsError } : {},
225
+ ...trustedFoldersError ? { trustedFoldersError } : {}
226
+ });
227
+ return {
228
+ revision,
229
+ folderTrustEnabled,
230
+ ideTrust,
231
+ trustedFolders: Object.freeze({ ...parsedTrustedFolders.config }),
232
+ ...settingsError ? { settingsError } : {},
233
+ ...trustedFoldersError ? { trustedFoldersError } : {}
234
+ };
235
+ }
236
+ __name(readDaemonTrustPolicySnapshot, "readDaemonTrustPolicySnapshot");
237
+ function explicitTrustLevel(snapshot, workspaceCwd) {
238
+ const folders = new LoadedTrustedFolders(
239
+ {
240
+ path: getTrustedFoldersPath(),
241
+ config: { ...snapshot.trustedFolders }
242
+ },
243
+ []
244
+ );
245
+ const effective = folders.isPathTrusted(workspaceCwd);
246
+ if (effective === void 0) return null;
247
+ for (const [rulePath, trustLevel] of Object.entries(
248
+ snapshot.trustedFolders
249
+ )) {
250
+ const preview = new LoadedTrustedFolders(
251
+ { path: getTrustedFoldersPath(), config: { [rulePath]: trustLevel } },
252
+ []
253
+ ).isPathTrusted(workspaceCwd);
254
+ if (preview === effective) return trustLevel;
255
+ }
256
+ return null;
257
+ }
258
+ __name(explicitTrustLevel, "explicitTrustLevel");
259
+ function evaluateDaemonWorkspaceTrust(snapshot, workspaceCwd, processCwd = process.cwd()) {
260
+ if (snapshot.settingsError) {
261
+ return {
262
+ state: "error",
263
+ targetTrusted: false,
264
+ source: "none",
265
+ explicitTrustLevel: null,
266
+ error: snapshot.settingsError
267
+ };
268
+ }
269
+ if (!snapshot.folderTrustEnabled) {
270
+ return {
271
+ state: "trusted",
272
+ targetTrusted: true,
273
+ source: "disabled",
274
+ explicitTrustLevel: null
275
+ };
276
+ }
277
+ if (snapshot.ideTrust !== void 0 && arePathsEquivalent(workspaceCwd, processCwd)) {
278
+ return {
279
+ state: snapshot.ideTrust ? "trusted" : "untrusted",
280
+ targetTrusted: snapshot.ideTrust,
281
+ source: "ide",
282
+ explicitTrustLevel: null
283
+ };
284
+ }
285
+ if (snapshot.trustedFoldersError) {
286
+ return {
287
+ state: "error",
288
+ targetTrusted: false,
289
+ source: "none",
290
+ explicitTrustLevel: null,
291
+ error: snapshot.trustedFoldersError
292
+ };
293
+ }
294
+ const folders = new LoadedTrustedFolders(
295
+ {
296
+ path: getTrustedFoldersPath(),
297
+ config: { ...snapshot.trustedFolders }
298
+ },
299
+ []
300
+ );
301
+ const trusted = folders.isPathTrusted(workspaceCwd);
302
+ return {
303
+ state: trusted === true ? "trusted" : trusted === false ? "untrusted" : "unknown",
304
+ targetTrusted: trusted === true,
305
+ source: trusted === void 0 ? "none" : "file",
306
+ explicitTrustLevel: explicitTrustLevel(snapshot, workspaceCwd)
307
+ };
308
+ }
309
+ __name(evaluateDaemonWorkspaceTrust, "evaluateDaemonWorkspaceTrust");
310
+
311
+ export {
312
+ readDaemonTrustPolicySnapshot,
313
+ evaluateDaemonWorkspaceTrust
314
+ };
315
+ /**
316
+ * @license
317
+ * Copyright 2026 Qwen Team
318
+ * SPDX-License-Identifier: Apache-2.0
319
+ */