@qwen-code/qwen-code 0.19.9 → 0.19.10
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.
- package/bundled/qc-helper/docs/configuration/settings.md +7 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +3 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +11 -3
- package/bundled/qc-helper/docs/features/code-review.md +88 -44
- package/bundled/qc-helper/docs/features/commands.md +6 -6
- package/bundled/qc-helper/docs/features/hooks.md +29 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +21 -0
- package/bundled/qc-helper/docs/qwen-serve.md +46 -20
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/review/DESIGN.md +219 -33
- package/bundled/review/SKILL.md +449 -153
- package/chunks/{MaxSizedBox-6HYJ3ZPJ.js → MaxSizedBox-67ODZ4SZ.js} +31 -31
- package/chunks/{StandaloneSessionPicker-WS4GXYOG.js → StandaloneSessionPicker-SIPBQT5Z.js} +51 -49
- package/chunks/{acpAgent-5FWSOZL5.js → acpAgent-VPZJXLFX.js} +528 -478
- package/chunks/{agent-HOLHB3RT.js → agent-Z7NWL6XL.js} +26 -26
- package/chunks/{agent-headless-SXL6H56A.js → agent-headless-73HZ6ROQ.js} +26 -26
- package/chunks/{anthropicContentGenerator-L73TO3DB.js → anthropicContentGenerator-56U3YCP2.js} +5 -5
- package/chunks/{artifact-tool-U7IRTLIV.js → artifact-tool-BWZZJ42H.js} +2 -2
- package/chunks/{askUserQuestion-2DLUUZZG.js → askUserQuestion-WU3S5A5T.js} +2 -2
- package/chunks/{bridge-BCJQ7BBB.js → bridge-XFKW6S7Q.js} +32 -32
- package/chunks/{ca-UJ6HC4H2.js → ca-C2JTT2N5.js} +4 -1
- package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
- package/chunks/channel-worker-manager-5RWKSGEU.js +418 -0
- package/chunks/channel-worker-supervisor-PCDAZN4D.js +20 -0
- package/chunks/{chunk-LXNEJD34.js → chunk-2FO5GFKZ.js} +1 -1
- package/chunks/{chunk-B5ORX3FG.js → chunk-2UUAIFQO.js} +1 -1
- package/chunks/{chunk-L36P3NBD.js → chunk-2W3OOD4W.js} +2 -0
- package/chunks/{chunk-7R3CZA3Q.js → chunk-2Z5UX4KI.js} +1 -1
- package/chunks/chunk-3MX7D6QN.js +516 -0
- package/chunks/{chunk-E2IY465S.js → chunk-3XJFUTNM.js} +10 -10
- package/chunks/{chunk-JZETEN3Z.js → chunk-422XAKCK.js} +3 -3
- package/chunks/{chunk-N3EMS75V.js → chunk-4FMG7EDJ.js} +1268 -1233
- package/chunks/{chunk-HKMAENAO.js → chunk-4YWLED2A.js} +8 -6
- package/chunks/{chunk-SCGXUJBT.js → chunk-5EBKKSBX.js} +3 -3
- package/chunks/chunk-5HBA2Z7V.js +28 -0
- package/chunks/{chunk-XYQSMABS.js → chunk-5LROA5W4.js} +4 -4
- package/chunks/{chunk-ZJE7NSL3.js → chunk-5M6IDOMF.js} +34 -97
- package/chunks/{chunk-VA4KQY6V.js → chunk-65N2J6V2.js} +3 -3
- package/chunks/{chunk-4C5BQ2D2.js → chunk-6GETGQWP.js} +71 -12
- package/chunks/{chunk-PVZM22CK.js → chunk-6GKMJPOC.js} +5 -5
- package/chunks/{chunk-W2UIXQDL.js → chunk-6OATMEYN.js} +1 -1
- package/chunks/{chunk-GZRTYZ2R.js → chunk-6W6DI34P.js} +154 -1
- package/chunks/{chunk-EMDMPBJ4.js → chunk-7L4XBYVW.js} +3 -3
- package/chunks/{chunk-EAXLGSFP.js → chunk-7MJAZMXK.js} +8 -8
- package/chunks/{chunk-K434OPES.js → chunk-7NAWTFVY.js} +3 -3
- package/chunks/{chunk-J4TSQ5EQ.js → chunk-7NFB7LBQ.js} +8 -1
- package/chunks/{chunk-5SFOMFG4.js → chunk-7R4DPSRA.js} +36 -2
- package/chunks/{chunk-P67PFTUT.js → chunk-AAR5SGMD.js} +4 -4
- package/chunks/{chunk-RDJSGHZE.js → chunk-ALGGS7UH.js} +1 -38
- package/chunks/{chunk-GWHYEOV2.js → chunk-ARKANCNX.js} +2 -1
- package/chunks/{chunk-D2GFWEXB.js → chunk-B5I2IIWY.js} +6 -6
- package/chunks/{chunk-524RQP4Q.js → chunk-B7NUUEXC.js} +10 -4
- package/chunks/{chunk-CUMMSHH6.js → chunk-BBNVFRGD.js} +1 -1
- package/chunks/{chunk-5HOMWMCL.js → chunk-CEW4HDPK.js} +4166 -1338
- package/chunks/chunk-CJFNEBYB.js +91 -0
- package/chunks/{chunk-VWPVHAMO.js → chunk-CUUXANEQ.js} +5 -1
- package/chunks/{chunk-GWLSNBG4.js → chunk-DK33QJ3V.js} +30 -26
- package/chunks/{chunk-HPDUL5MF.js → chunk-DPFBNG72.js} +1 -1
- package/chunks/{chunk-KKNMOEZH.js → chunk-E2UVIFI2.js} +185 -398
- package/chunks/{chunk-MC23XKFE.js → chunk-E67NFMF4.js} +3 -3
- package/chunks/{chunk-OQ4DRIOA.js → chunk-EQY6POVO.js} +2 -2
- package/chunks/{chunk-XUOOWUZS.js → chunk-F7NXQH4Y.js} +1 -1
- package/chunks/{chunk-YLV3XXFB.js → chunk-FBU7WRZI.js} +17 -1
- package/chunks/{chunk-LK7KUE55.js → chunk-FSA7ERJ2.js} +1 -1
- package/chunks/{chunk-PDZ7MBDG.js → chunk-FXMC7SL2.js} +27 -6
- package/chunks/{chunk-SJHDYNHF.js → chunk-GDQQRV43.js} +3 -3
- package/chunks/{chunk-34MW4KTI.js → chunk-GGJII3FM.js} +2 -2
- package/chunks/{chunk-3BTRNWWD.js → chunk-GOXKNSDZ.js} +1 -64
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-HVY356M2.js → chunk-H3FQOPPS.js} +3 -3
- package/chunks/{chunk-YVEDCAUE.js → chunk-HGT6JR3U.js} +19 -0
- package/chunks/{chunk-WQUQVGTF.js → chunk-HHEFI4RP.js} +183 -96
- package/chunks/chunk-IDS7MSUP.js +74 -0
- package/chunks/{chunk-6PESIEKJ.js → chunk-JSJFKYWT.js} +68 -6
- package/chunks/{chunk-CNEIYWSA.js → chunk-K4PZ5F5T.js} +5 -5
- package/chunks/{chunk-NVYTCB5Z.js → chunk-K7CRWKOE.js} +14534 -13980
- package/chunks/{chunk-ORBGV7NJ.js → chunk-KKRTYONM.js} +6 -4
- package/chunks/{chunk-IAVB3HM3.js → chunk-KSO42X3Z.js} +13 -0
- package/chunks/chunk-L37RC7MQ.js +493 -0
- package/chunks/{chunk-4QLQE5WJ.js → chunk-L5U3ELZX.js} +1 -1
- package/chunks/{chunk-3G7CIHVV.js → chunk-L62SEJWY.js} +4 -4
- package/chunks/{chunk-EGYZ275M.js → chunk-LNUXFLLJ.js} +4 -4
- package/chunks/{chunk-4ZVWQHEQ.js → chunk-LQIDP6K5.js} +1 -1
- package/chunks/{chunk-VTU57BWZ.js → chunk-LQU7EVFA.js} +1 -1
- package/chunks/{chunk-B4G2WOFA.js → chunk-LTNI523B.js} +2 -2
- package/chunks/{chunk-DC5Z3DU6.js → chunk-LXLTBIDP.js} +43 -6
- package/chunks/{chunk-KHUQZZJ6.js → chunk-MO7O5722.js} +370 -36
- package/chunks/chunk-MR3PXB6E.js +48 -0
- package/chunks/{chunk-5VXNZWGF.js → chunk-N6FXRR6P.js} +1 -1
- package/chunks/{chunk-WL4L7EZH.js → chunk-OA4JVLSA.js} +27 -1
- package/chunks/{chunk-TO6QE22P.js → chunk-OATTJGPJ.js} +26 -22
- package/chunks/{chunk-X6TJ3YZV.js → chunk-OFEVHGVU.js} +159 -57
- package/chunks/{chunk-X4NKFGFJ.js → chunk-OJAMDVF5.js} +0 -15
- package/chunks/{chunk-BZIFY5TF.js → chunk-OKAIGAYW.js} +3 -3
- package/chunks/{chunk-3VAGG5T5.js → chunk-P6LART6G.js} +116 -15
- package/chunks/{chunk-3SJSQXNS.js → chunk-PEJWA3QQ.js} +12 -8
- package/chunks/{chunk-BAPGSC7U.js → chunk-Q5GLXH5Q.js} +23 -9
- package/chunks/{chunk-MXL5UP4X.js → chunk-Q6TUALBE.js} +1 -1
- package/chunks/{chunk-QYMQSECS.js → chunk-QAW7PIHT.js} +2 -2
- package/chunks/{chunk-LUODI7WD.js → chunk-RCEEXIOO.js} +6 -4
- package/chunks/{chunk-YAUFFXDS.js → chunk-RDRVMDWV.js} +12 -11
- package/chunks/{chunk-CEA3E3JB.js → chunk-SPJQO2CE.js} +2 -2
- package/chunks/{chunk-U2NNEY4R.js → chunk-SPUYQB4T.js} +1 -1
- package/chunks/{chunk-34Z3U5RQ.js → chunk-SXU3KKNI.js} +514 -114
- package/chunks/{chunk-ECNYL4AA.js → chunk-TISZXPAX.js} +1 -1
- package/chunks/{chunk-JSG7ZSBC.js → chunk-TQBODCFD.js} +1 -1
- package/chunks/{chunk-AKIVHSJR.js → chunk-TTUO4DNG.js} +111 -93
- package/chunks/chunk-TV6K2FB4.js +224 -0
- package/chunks/{chunk-4GORAUCN.js → chunk-TXY2C3D2.js} +1 -1
- package/chunks/{chunk-5XUCZNSY.js → chunk-TYLOFD2U.js} +1 -1
- package/chunks/{chunk-CLFKOZEK.js → chunk-UFOKA4PR.js} +1 -1
- package/chunks/{channel-worker-supervisor-WSOAAYUO.js → chunk-URU5UEK6.js} +67 -35
- package/chunks/{chunk-D5SKC4YG.js → chunk-V7EQTZYR.js} +41 -13
- package/chunks/{chunk-L6P4KPHR.js → chunk-VBRRNQB7.js} +59 -39
- package/chunks/{chunk-BMGVRZN4.js → chunk-W34A5MJH.js} +1 -1
- package/chunks/{chunk-PODM4SZ4.js → chunk-WDW64OW3.js} +5 -5
- package/chunks/{chunk-W3JHSWRP.js → chunk-WDWJ4OQJ.js} +4 -4
- package/chunks/{chunk-Q4YQW46J.js → chunk-WIASPMLX.js} +31 -17
- package/chunks/{chunk-ZLXQN2QS.js → chunk-WIEO4CWB.js} +1 -1
- package/chunks/{chunk-A3XKDTSH.js → chunk-WLXYAKV7.js} +4 -4
- package/chunks/{chunk-Q6I5QHMH.js → chunk-WTSXKLG5.js} +1 -1
- package/chunks/{chunk-J3JA76CF.js → chunk-WX6SD4IQ.js} +1 -1
- package/chunks/{chunk-77XJ3SWN.js → chunk-X362TMXZ.js} +5 -5
- package/chunks/{chunk-CCDMCZPP.js → chunk-XLIRF7IK.js} +1 -1
- package/chunks/{chunk-AURZZYMD.js → chunk-XXJKGHZV.js} +4 -4
- package/chunks/{chunk-TDEXZKMT.js → chunk-Y66VOBRP.js} +2 -2
- package/chunks/{chunk-CC2ITGCF.js → chunk-YHN5SUIJ.js} +49 -6
- package/chunks/{chunk-3AHXV67U.js → chunk-YU56QGXX.js} +1 -1
- package/chunks/{chunk-5U27BZ72.js → chunk-YX4LLZ3D.js} +187 -75
- package/chunks/{chunk-ATAKVRIF.js → chunk-YYPXHMWO.js} +7 -7
- package/chunks/{chunk-XLA62MYB.js → chunk-ZKMGAFYV.js} +2 -2
- package/chunks/{chunk-UOZWKTQG.js → chunk-ZPAHLFZU.js} +2 -2
- package/chunks/{chunk-7PU4FYLG.js → chunk-ZQTZXVHP.js} +4 -4
- package/chunks/chunk-ZRKBI3DP.js +34 -0
- package/chunks/{computer-use-HM37RX6A.js → computer-use-IYTX45WA.js} +26 -26
- package/chunks/{config-utils-NV2SVGPB.js → config-utils-CFT33LTP.js} +3 -2
- package/chunks/{contextCommand-OF5SFGH2.js → contextCommand-272V77WU.js} +28 -28
- package/chunks/{create-sub-session-KPRT7ECJ.js → create-sub-session-CBJMQLYP.js} +26 -26
- package/chunks/{create-sub-session-INX7TXJI.js → create-sub-session-WNX2OQVX.js} +2 -2
- package/chunks/{cron-create-AMBKGZX6.js → cron-create-36TIFKRT.js} +4 -4
- package/chunks/{cron-delete-LRU4OJYG.js → cron-delete-OQD3WULU.js} +4 -4
- package/chunks/{cron-list-WVP2JXER.js → cron-list-4533T2FH.js} +4 -4
- package/chunks/{daemon-ARHTSTXP.js → daemon-RNGFPMAB.js} +575 -58
- package/chunks/{daemon-status-provider-B2UTZUJ2.js → daemon-status-provider-L4STG5VO.js} +36 -36
- package/chunks/{de-EBJN3OVN.js → de-2VCDRDGU.js} +4 -1
- package/chunks/{dist-VHV4EVHG.js → dist-3V3ZV6ML.js} +1 -1
- package/chunks/{dist-XKU3ABM5.js → dist-ERCPDVA6.js} +1 -1
- package/chunks/{dist-PNVLTKTL.js → dist-HNN7DR2L.js} +158 -4
- package/chunks/{dist-WKPOYU7O.js → dist-JZE7F6YR.js} +1 -1
- package/chunks/{dist-QYCAEZIT.js → dist-MOEC47TR.js} +5 -1
- package/chunks/{dist-R7LN5AZE.js → dist-PHEPJLXD.js} +2 -2
- package/chunks/{earlyInputCapture-3VTHRC4C.js → earlyInputCapture-EN4BRREQ.js} +27 -27
- package/chunks/{edit-VNI4NJ73.js → edit-OMAF2QDR.js} +27 -27
- package/chunks/{en-5A6LA7RK.js → en-NJCA3TAA.js} +5 -1
- package/chunks/{enter-worktree-IYYBKPZT.js → enter-worktree-BBZX52HG.js} +26 -26
- package/chunks/{enterPlanMode-GMC5FD5A.js → enterPlanMode-5NNFMBUY.js} +42 -27
- package/chunks/{environment-5HSSRMJ7.js → environment-7TEWMJYN.js} +30 -29
- package/chunks/{errors-HMFCJJ7P.js → errors-I4VKVX3F.js} +28 -28
- package/chunks/{exit-worktree-6BHCMP5G.js → exit-worktree-FUWRJI33.js} +26 -26
- package/chunks/{exitPlanMode-CJW7G74W.js → exitPlanMode-IHCJ5EEI.js} +26 -26
- package/chunks/{fast-path-FRDMDVHG.js → fast-path-ZA57TOH4.js} +3 -3
- package/chunks/{fast-path-settings-5QZE64HR.js → fast-path-settings-DAOVFADC.js} +6 -4
- package/chunks/{fr-YXRABLYZ.js → fr-5F3E7WKD.js} +4 -1
- package/chunks/{gemini-QYSEGHAX.js → gemini-UOAKVXBG.js} +139 -76
- package/chunks/{geminiContentGenerator-J7YNZDYP.js → geminiContentGenerator-G6UCE6MW.js} +4 -4
- package/chunks/{glob-BRCSGFOT.js → glob-4GJQ2UFF.js} +28 -27
- package/chunks/{grep-EE2DUOSY.js → grep-5QSYXF2E.js} +26 -26
- package/chunks/{handleAutoUpdate-5NWTLR67.js → handleAutoUpdate-ULHNWL6R.js} +30 -30
- package/chunks/{i18n-BASPENNQ.js → i18n-CYDUTF6F.js} +27 -27
- package/chunks/initializer-NRFKUGIO.js +73 -0
- package/chunks/{installationInfo-W6V4DT7W.js → installationInfo-WELKRHHE.js} +27 -27
- package/chunks/{ja-7VQOANVG.js → ja-66J6B53L.js} +5 -2
- package/chunks/{keychain-token-storage-VKUBNCP4.js → keychain-token-storage-AU22CQI6.js} +2 -2
- package/chunks/list-JVDXEG2E.js +76 -0
- package/chunks/loadedSettingsAdapter-WAM4VUTG.js +70 -0
- package/chunks/{loop-wakeup-WX7BLWWP.js → loop-wakeup-MVUKDVCP.js} +5 -5
- package/chunks/{ls-ZB2BDP6T.js → ls-RXNIAQDE.js} +4 -4
- package/chunks/{lsp-V5DN4YUJ.js → lsp-HB5LM5IL.js} +2 -2
- package/chunks/mcp-YHOZN3ZM.js +70 -0
- package/chunks/{monitor-X5Z3H4FY.js → monitor-R7XZPJHQ.js} +26 -26
- package/chunks/nonInteractiveCli-NSOB6D74.js +129 -0
- package/chunks/{notebook-edit-TRM2QIJK.js → notebook-edit-6RNKE2L2.js} +27 -27
- package/chunks/{openaiContentGenerator-AAYONPMF.js → openaiContentGenerator-XNS5S64I.js} +12 -12
- package/chunks/{pidfile-D4I4FTVA.js → pidfile-XE4RRR2P.js} +27 -27
- package/chunks/{pt-2C6YCSHL.js → pt-TFZO5Y6T.js} +4 -1
- package/chunks/{qwenContentGenerator-K3HZ2H76.js → qwenContentGenerator-APDPJ3VN.js} +28 -28
- package/chunks/{qwenOAuth2-PJQ27GSO.js → qwenOAuth2-LEYOU7RU.js} +5 -5
- package/chunks/{read-file-7SZSIZOL.js → read-file-XSUWXSR7.js} +8 -8
- package/chunks/{read-mcp-resource-SM5DA4RG.js → read-mcp-resource-6LRTZKXI.js} +2 -2
- package/chunks/{record-artifact-4XKZX3UW.js → record-artifact-PMDTY4OS.js} +2 -2
- package/chunks/{ripGrep-YNPFVCZP.js → ripGrep-APB3CDMU.js} +26 -26
- package/chunks/{ru-6BBHVZZV.js → ru-4L4LFHIT.js} +4 -1
- package/chunks/{run-qwen-serve-DMWV5N6L.js → run-qwen-serve-NWTGPERT.js} +1232 -371
- package/chunks/{runtime-57WWRVHN.js → runtime-EIO3NQKR.js} +42 -37
- package/chunks/{scheduler-YBLGWSIL.js → scheduler-JJDZBDRN.js} +26 -26
- package/chunks/{send-message-F36YD6KQ.js → send-message-SR4WSXP2.js} +3 -3
- package/chunks/{serve-R63NK3CV.js → serve-WTIPB3EI.js} +36 -34
- package/chunks/{server-Z22GCAXP.js → server-NJPHQHLH.js} +5238 -1328
- package/chunks/{session-HKAAI7BN.js → session-O4AO7FTS.js} +298 -98
- package/chunks/{settings-3EYN66GK.js → settings-HQNDK7TG.js} +34 -32
- package/chunks/{shell-6YXINTWJ.js → shell-UIXM6PWG.js} +26 -26
- package/chunks/{skill-OO57P4X6.js → skill-3XMB4ULV.js} +10 -10
- package/chunks/{spawnChannel-JD7G4VU6.js → spawnChannel-3R632QRM.js} +28 -28
- package/chunks/{src-G5UPLZSZ.js → src-USZKPUOC.js} +85 -27
- package/chunks/{standalone-update-OB7F4JPZ.js → standalone-update-L5XW3D7K.js} +28 -28
- package/chunks/{startInteractiveUI-73EGLIIH.js → startInteractiveUI-CPZOL2WB.js} +730 -397
- package/chunks/{syntheticOutput-34H7LGA7.js → syntheticOutput-YKFNUQZD.js} +3 -3
- package/chunks/{task-create-FRGOEIKY.js → task-create-NUFOHU53.js} +8 -7
- package/chunks/{task-list-OW766BXZ.js → task-list-Z2IKQY3S.js} +6 -5
- package/chunks/{task-stop-SIR5SNBN.js → task-stop-KQFIVQTJ.js} +2 -2
- package/chunks/{task-update-YRA532MT.js → task-update-HKADXSTD.js} +8 -7
- package/chunks/{team-create-PECAAPXK.js → team-create-XXPRF3IQ.js} +26 -26
- package/chunks/{team-delete-6OSECUZC.js → team-delete-SDNTGZLG.js} +6 -5
- package/chunks/{team-plan-approval-L6F434RY.js → team-plan-approval-EOTTKHDW.js} +26 -26
- package/chunks/{theme-manager-ZG4RY6GU.js → theme-manager-P6UITO2L.js} +27 -27
- package/chunks/{todoWrite-YDMFEV4G.js → todoWrite-YNXB27GB.js} +4 -4
- package/chunks/{tool-search-THVIWAPB.js → tool-search-DDNGK2LR.js} +9 -9
- package/chunks/{total-session-admission-JOKNRIIA.js → total-session-admission-PL5N7DNY.js} +33 -33
- package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
- package/chunks/{trustedFolders-EOGT3UVS.js → trustedFolders-C5LMF3UR.js} +29 -28
- package/chunks/types-ML3TRJQ5.js +16 -0
- package/chunks/{updateCheck-2KYEYVSB.js → updateCheck-QTVVISH7.js} +29 -29
- package/chunks/{validateNonInterActiveAuth-EN6ZQSR2.js → validateNonInterActiveAuth-RY4RKBQG.js} +75 -71
- package/chunks/{version-3UEA6ZIR.js → version-U45RYOSD.js} +1 -1
- package/chunks/{web-fetch-PAAEQKBW.js → web-fetch-ZSPR3PRR.js} +5 -5
- package/chunks/{workflow-QCCCMYP3.js → workflow-TCIAQYOA.js} +27 -27
- package/chunks/workspace-providers-status-I3G2HYLY.js +73 -0
- package/chunks/workspace-registration-store-IH5GLZ6Y.js +27 -0
- package/chunks/{workspace-registry-24QFLQYH.js → workspace-registry-QEKBELIX.js} +33 -33
- package/chunks/workspace-service-ORKHGLP3.js +86 -0
- package/chunks/workspace-skills-status-D7QCNDYY.js +72 -0
- package/chunks/{write-file-I3MUDRIE.js → write-file-JGRQR5VM.js} +27 -27
- package/chunks/{zh-RQE7I22T.js → zh-FSAH32JB.js} +6 -2
- package/chunks/{zh-TW-TBPQGHKH.js → zh-TW-D2YIE2LO.js} +6 -2
- package/cli.js +11 -11
- package/locales/ca.js +6 -0
- package/locales/de.js +6 -0
- package/locales/en.js +8 -0
- package/locales/fr.js +6 -0
- package/locales/ja.js +7 -1
- package/locales/pt.js +6 -0
- package/locales/ru.js +6 -0
- package/locales/zh-TW.js +9 -1
- package/locales/zh.js +9 -1
- package/package.json +3 -3
- package/web-shell/assets/{arc-C15hqnJe.js → arc-CUeDlxvE.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-B-At37J_.js → architectureDiagram-3BPJPVTR-PiUszkQA.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-B51wjcU7.js → blockDiagram-GPEHLZMM-s2wYSO7e.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-xBK7BAwN.js → c4Diagram-AAUBKEIU-DyLxZoz9.js} +1 -1
- package/web-shell/assets/channel-DkuJJ0qd.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-xKmLg7Yr.js → chunk-2J33WTMH-Dsdai7Tk.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BfkdKZCM.js → chunk-4BX2VUAB-DEosOjV7.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DT713sZf.js → chunk-55IACEB6-sNsRLTXf.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CYEeAamv.js → chunk-727SXJPM-DkRNZzmh.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DBN-5CFd.js → chunk-AQP2D5EJ-BrsRNpzd.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CGZKk4PH.js → chunk-FMBD7UC4-CI039lpl.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-qQbC2O-y.js → chunk-ND2GUHAM-M-pkeIfu.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-B3zeXwsX.js → chunk-QZHKN3VN-C4ckGNbH.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CwqHc0TB.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwqHc0TB.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BKsl1Wvy.js → cose-bilkent-S5V4N54A-BciKUAFq.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-CuuuLiBK.js → dagre-BM42HDAG-C1nTSgU6.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CG4_eKiV.js → diagram-2AECGRRQ-BDPNWr1m.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-DSFTmZB1.js → diagram-5GNKFQAL-CNFhTszL.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BxwlEHn8.js → diagram-KO2AKTUF-CjPa4p5a.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BUAg-jMG.js → diagram-LMA3HP47-ZzPykSyG.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BFM2jlO5.js → diagram-OG6HWLK6-0UVtZ9A4.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CerbFPa2.js → erDiagram-TEJ5UH35-CajDZCat.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BNeZz5Zz.js → flowDiagram-I6XJVG4X-BRuFBIvL.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CTOogLaM.js → ganttDiagram-6RSMTGT7-BevGmJqG.js} +3 -3
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-yxSFkXPj.js → gitGraphDiagram-PVQCEYII-DvPMpBMb.js} +1 -1
- package/web-shell/assets/index-Cnvv4VcI.css +5 -0
- package/web-shell/assets/index-D1Uyklxa.js +1088 -0
- package/web-shell/assets/index-DzHwQkQq.js +3 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DYdAUevm.js → infoDiagram-5YYISTIA-Oixn7tA9.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CNuijZ90.js → ishikawaDiagram-YF4QCWOH-BgKpeg-j.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BTyiuonf.js → journeyDiagram-JHISSGLW-74mwxIaA.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DPJo0Uow.js → kanban-definition-UN3LZRKU-D4D6cEqA.js} +1 -1
- package/web-shell/assets/{linear-C8wKCbIC.js → linear-atZRE_L2.js} +1 -1
- package/web-shell/assets/{mermaid.core-BV5o7nW5.js → mermaid.core-KKudX-JC.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtLcBmSt.js → mindmap-definition-RKZ34NQL-CMCej9yG.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-C22J7A9Q.js → pieDiagram-4H26LBE5-nhx40X7q.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DSL10wiL.js → quadrantDiagram-W4KKPZXB-CUmVcN3M.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-feqh0UpX.js → requirementDiagram-4Y6WPE33-C_vyEwyy.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Z4OVaWaZ.js → sankeyDiagram-5OEKKPKP-DU6G4VWR.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DIluIcb1.js → sequenceDiagram-3UESZ5HK-DdeRR_KJ.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-hlhnuoYH.js → stateDiagram-AJRCARHV-C6iCI8ps.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C0_6nR6C.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-Dqf_CqgL.js → timeline-definition-PNZ67QCA-B_Ea8Cb7.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DD2QhaTX.js → vennDiagram-CIIHVFJN-BPUVZEJA.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B2uI85U_.js → wardley-L42UT6IY-BWEj0lKY.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-U1aJX71g.js → wardleyDiagram-YWT4CUSO-BvDsdIQw.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-C0ODHUee.js → xychartDiagram-2RQKCTM6-crz0QhF_.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-CU3L64TP.js +0 -93
- package/chunks/initializer-UTQ7FB7G.js +0 -71
- package/chunks/list-DEICDL65.js +0 -74
- package/chunks/loadedSettingsAdapter-NOWEGDYJ.js +0 -68
- package/chunks/mcp-L5JXEEIA.js +0 -68
- package/chunks/nonInteractiveCli-LS2K4X6A.js +0 -124
- package/chunks/types-JNKGKUJT.js +0 -12
- package/chunks/workspace-providers-status-4KMGETOJ.js +0 -71
- package/chunks/workspace-service-RVLBMSMZ.js +0 -80
- package/chunks/workspace-skills-status-DS4ZVFTO.js +0 -70
- package/web-shell/assets/channel-CLiQD50f.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-D3sYqow5.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-D3sYqow5.js +0 -1
- package/web-shell/assets/index-D5IWFVk1.css +0 -5
- package/web-shell/assets/index-KFJRDhX7.js +0 -783
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BhQMwgpl.js +0 -1
|
@@ -6,21 +6,18 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
CLIENT_MCP_OVER_WS_CONFIG_FLAG
|
|
8
8
|
} from "./chunk-PZL23GTM.js";
|
|
9
|
-
import {
|
|
10
|
-
MAX_WORKSPACE_PATH_LENGTH
|
|
11
|
-
} from "./chunk-W7FJ3N32.js";
|
|
12
9
|
import {
|
|
13
10
|
require_lib
|
|
14
11
|
} from "./chunk-WBL3FJEU.js";
|
|
12
|
+
import {
|
|
13
|
+
MAX_WORKSPACE_PATH_LENGTH
|
|
14
|
+
} from "./chunk-W7FJ3N32.js";
|
|
15
15
|
import {
|
|
16
16
|
require_mime_db
|
|
17
17
|
} from "./chunk-T2NCM2ET.js";
|
|
18
18
|
import {
|
|
19
19
|
writeStderrLine
|
|
20
20
|
} from "./chunk-YUZI3WAC.js";
|
|
21
|
-
import {
|
|
22
|
-
require_once
|
|
23
|
-
} from "./chunk-CU3L64TP.js";
|
|
24
21
|
import {
|
|
25
22
|
require_safer
|
|
26
23
|
} from "./chunk-XWRJCPHC.js";
|
|
@@ -11322,6 +11319,86 @@ var require_utils2 = __commonJS({
|
|
|
11322
11319
|
}
|
|
11323
11320
|
});
|
|
11324
11321
|
|
|
11322
|
+
// node_modules/wrappy/wrappy.js
|
|
11323
|
+
var require_wrappy = __commonJS({
|
|
11324
|
+
"node_modules/wrappy/wrappy.js"(exports, module) {
|
|
11325
|
+
init_esbuild_shims();
|
|
11326
|
+
module.exports = wrappy;
|
|
11327
|
+
function wrappy(fn, cb) {
|
|
11328
|
+
if (fn && cb) return wrappy(fn)(cb);
|
|
11329
|
+
if (typeof fn !== "function")
|
|
11330
|
+
throw new TypeError("need wrapper function");
|
|
11331
|
+
Object.keys(fn).forEach(function(k) {
|
|
11332
|
+
wrapper[k] = fn[k];
|
|
11333
|
+
});
|
|
11334
|
+
return wrapper;
|
|
11335
|
+
function wrapper() {
|
|
11336
|
+
var args = new Array(arguments.length);
|
|
11337
|
+
for (var i = 0; i < args.length; i++) {
|
|
11338
|
+
args[i] = arguments[i];
|
|
11339
|
+
}
|
|
11340
|
+
var ret = fn.apply(this, args);
|
|
11341
|
+
var cb2 = args[args.length - 1];
|
|
11342
|
+
if (typeof ret === "function" && ret !== cb2) {
|
|
11343
|
+
Object.keys(cb2).forEach(function(k) {
|
|
11344
|
+
ret[k] = cb2[k];
|
|
11345
|
+
});
|
|
11346
|
+
}
|
|
11347
|
+
return ret;
|
|
11348
|
+
}
|
|
11349
|
+
__name(wrapper, "wrapper");
|
|
11350
|
+
}
|
|
11351
|
+
__name(wrappy, "wrappy");
|
|
11352
|
+
}
|
|
11353
|
+
});
|
|
11354
|
+
|
|
11355
|
+
// node_modules/once/once.js
|
|
11356
|
+
var require_once = __commonJS({
|
|
11357
|
+
"node_modules/once/once.js"(exports, module) {
|
|
11358
|
+
init_esbuild_shims();
|
|
11359
|
+
var wrappy = require_wrappy();
|
|
11360
|
+
module.exports = wrappy(once);
|
|
11361
|
+
module.exports.strict = wrappy(onceStrict);
|
|
11362
|
+
once.proto = once(function() {
|
|
11363
|
+
Object.defineProperty(Function.prototype, "once", {
|
|
11364
|
+
value: /* @__PURE__ */ __name(function() {
|
|
11365
|
+
return once(this);
|
|
11366
|
+
}, "value"),
|
|
11367
|
+
configurable: true
|
|
11368
|
+
});
|
|
11369
|
+
Object.defineProperty(Function.prototype, "onceStrict", {
|
|
11370
|
+
value: /* @__PURE__ */ __name(function() {
|
|
11371
|
+
return onceStrict(this);
|
|
11372
|
+
}, "value"),
|
|
11373
|
+
configurable: true
|
|
11374
|
+
});
|
|
11375
|
+
});
|
|
11376
|
+
function once(fn) {
|
|
11377
|
+
var f = /* @__PURE__ */ __name(function() {
|
|
11378
|
+
if (f.called) return f.value;
|
|
11379
|
+
f.called = true;
|
|
11380
|
+
return f.value = fn.apply(this, arguments);
|
|
11381
|
+
}, "f");
|
|
11382
|
+
f.called = false;
|
|
11383
|
+
return f;
|
|
11384
|
+
}
|
|
11385
|
+
__name(once, "once");
|
|
11386
|
+
function onceStrict(fn) {
|
|
11387
|
+
var f = /* @__PURE__ */ __name(function() {
|
|
11388
|
+
if (f.called)
|
|
11389
|
+
throw new Error(f.onceError);
|
|
11390
|
+
f.called = true;
|
|
11391
|
+
return f.value = fn.apply(this, arguments);
|
|
11392
|
+
}, "f");
|
|
11393
|
+
var name = fn.name || "Function wrapped with `once`";
|
|
11394
|
+
f.onceError = name + " shouldn't be called more than once";
|
|
11395
|
+
f.called = false;
|
|
11396
|
+
return f;
|
|
11397
|
+
}
|
|
11398
|
+
__name(onceStrict, "onceStrict");
|
|
11399
|
+
}
|
|
11400
|
+
});
|
|
11401
|
+
|
|
11325
11402
|
// node_modules/is-promise/index.js
|
|
11326
11403
|
var require_is_promise = __commonJS({
|
|
11327
11404
|
"node_modules/is-promise/index.js"(exports, module) {
|
|
@@ -16553,6 +16630,7 @@ var SERVE_CAPABILITY_REGISTRY = {
|
|
|
16553
16630
|
// unregistered — the toggle takes effect on the next ACP child spawn
|
|
16554
16631
|
// (`tools.disabled` is consulted at `Config` construction time).
|
|
16555
16632
|
workspace_tool_toggle: { since: "v1" },
|
|
16633
|
+
workspace_skill_toggle: { since: "v1" },
|
|
16556
16634
|
workspace_settings: { since: "v1" },
|
|
16557
16635
|
// `GET /workspace/permissions` is always available when this tag is
|
|
16558
16636
|
// advertised. `POST /workspace/permissions` updates the active ACP
|
|
@@ -16674,20 +16752,53 @@ var SERVE_CAPABILITY_REGISTRY = {
|
|
|
16674
16752
|
// `POST /workspace/channel/reload`. The worker is stopped and relaunched;
|
|
16675
16753
|
// on relaunch it re-reads settings.json (channels / proxy / per-channel
|
|
16676
16754
|
// model), so channel settings changes apply without a full daemon restart.
|
|
16677
|
-
// Advertised CONDITIONALLY
|
|
16678
|
-
//
|
|
16755
|
+
// Advertised CONDITIONALLY while the runtime manager has a committed or
|
|
16756
|
+
// recoverable channel worker selection.
|
|
16679
16757
|
channel_reload: { since: "v1" },
|
|
16758
|
+
// Runtime GET/PUT/DELETE control for daemon-managed channel selection.
|
|
16759
|
+
// The route exists even when no selection was supplied at daemon boot.
|
|
16760
|
+
channel_control: { since: "v1" },
|
|
16680
16761
|
// Multi-workspace sessions closed loop (issue #6378 Phase 2a). Advertised
|
|
16681
16762
|
// only when one daemon hosts more than one registered workspace runtime.
|
|
16682
16763
|
multi_workspace_sessions: { since: "v1" },
|
|
16764
|
+
// Singular session rewind routes resolve the owning live workspace runtime.
|
|
16765
|
+
multi_workspace_session_rewind: { since: "v1" },
|
|
16766
|
+
// Singular session shell routes resolve the owning live workspace runtime.
|
|
16767
|
+
multi_workspace_session_shell: { since: "v1" },
|
|
16768
|
+
persistent_workspace_registration: { since: "v1" },
|
|
16769
|
+
workspace_runtime_removal: { since: "v1" },
|
|
16683
16770
|
// Workspace-qualified core REST routes under `/workspaces/:workspace/...`.
|
|
16684
16771
|
// Covers core file/status/permissions/trust/lifecycle/MCP/tool, memory,
|
|
16685
16772
|
// workspace agent CRUD, and persisted session organization surfaces.
|
|
16686
16773
|
// Workspace-qualified settings also require the existing
|
|
16687
16774
|
// `workspace_settings` tag because that surface depends on settings
|
|
16688
|
-
// persistence. ACP/WebSocket
|
|
16689
|
-
//
|
|
16775
|
+
// persistence. ACP/WebSocket and auth stay outside this core tag;
|
|
16776
|
+
// workspace-qualified Voice REST/WebSocket routes use their separate
|
|
16777
|
+
// `workspace_qualified_voice` capability below. V2 extension management
|
|
16778
|
+
// is advertised separately via `extension_management_v2`.
|
|
16690
16779
|
workspace_qualified_rest_core: { since: "v1" },
|
|
16780
|
+
// Workspace-qualified Voice REST and WebSocket routes. This tag is enough
|
|
16781
|
+
// to discover plural modalities because legacy Voice tags describe only
|
|
16782
|
+
// the primary runtime and may be absent for a secondary-only setup.
|
|
16783
|
+
workspace_qualified_voice: { since: "v1" },
|
|
16784
|
+
// Global extension catalog/mutations plus workspace-qualified activation
|
|
16785
|
+
// projections. This is additive to the legacy primary-workspace
|
|
16786
|
+
// `workspace_extensions` contract.
|
|
16787
|
+
extension_management_v2: { since: "v1" },
|
|
16788
|
+
// Workspace-qualified, daemon-local persisted transcript paging. The tag is
|
|
16789
|
+
// unconditional because the route also serves a trusted single-workspace
|
|
16790
|
+
// primary; authorization is evaluated for the selected runtime per request.
|
|
16791
|
+
workspace_persisted_transcript: { since: "v1" },
|
|
16792
|
+
// Workspace-qualified full session export from active persisted storage.
|
|
16793
|
+
// This is separate from `session_export` so clients do not infer the plural
|
|
16794
|
+
// route from the legacy primary-workspace export capability.
|
|
16795
|
+
workspace_session_export: { since: "v1" },
|
|
16796
|
+
// Workspace-qualified ACP transport (issue #6378 Phase 4):
|
|
16797
|
+
// `/workspaces/:workspace/acp` mounts a per-runtime ACP dispatcher (HTTP +
|
|
16798
|
+
// WebSocket) for each registered workspace, with per-runtime device-flow and
|
|
16799
|
+
// reverse client-MCP. Legacy `/acp` stays bound to the primary runtime.
|
|
16800
|
+
// Advertised only when the daemon hosts more than one workspace runtime.
|
|
16801
|
+
workspace_qualified_acp: { since: "v1" },
|
|
16691
16802
|
// Phase 2 "reverse tool channel" (issue #5626). A connected WS client (e.g.
|
|
16692
16803
|
// the Chrome extension) can host an MCP server that the daemon's agent
|
|
16693
16804
|
// calls by carrying `mcp_message` JSON-RPC frames over the daemon WS,
|
|
@@ -16751,10 +16862,41 @@ var CONDITIONAL_SERVE_FEATURES = /* @__PURE__ */ new Map([
|
|
|
16751
16862
|
["rate_limit", (toggles) => toggles.rateLimit === true],
|
|
16752
16863
|
["workspace_reload", (toggles) => toggles.reloadAvailable === true],
|
|
16753
16864
|
["channel_reload", (toggles) => toggles.channelReloadAvailable === true],
|
|
16865
|
+
["channel_control", (toggles) => toggles.channelControlAvailable === true],
|
|
16754
16866
|
[
|
|
16755
16867
|
"multi_workspace_sessions",
|
|
16756
16868
|
(toggles) => toggles.multiWorkspaceSessionsEnabled === true
|
|
16757
16869
|
],
|
|
16870
|
+
[
|
|
16871
|
+
"multi_workspace_session_rewind",
|
|
16872
|
+
(toggles) => toggles.multiWorkspaceSessionsEnabled === true
|
|
16873
|
+
],
|
|
16874
|
+
[
|
|
16875
|
+
"multi_workspace_session_shell",
|
|
16876
|
+
(toggles) => toggles.multiWorkspaceSessionsEnabled === true && toggles.sessionShellCommandEnabled === true
|
|
16877
|
+
],
|
|
16878
|
+
[
|
|
16879
|
+
"persistent_workspace_registration",
|
|
16880
|
+
(toggles) => toggles.persistentWorkspaceRegistrationAvailable === true
|
|
16881
|
+
],
|
|
16882
|
+
[
|
|
16883
|
+
"workspace_runtime_removal",
|
|
16884
|
+
(toggles) => toggles.workspaceRuntimeRemovalAvailable === true
|
|
16885
|
+
],
|
|
16886
|
+
[
|
|
16887
|
+
"workspace_qualified_acp",
|
|
16888
|
+
// The plural routes are pre-mounted for workspaces registered after app
|
|
16889
|
+
// creation, but the capability becomes meaningful only once a secondary
|
|
16890
|
+
// runtime exists. Until then the qualified primary route is only an alias
|
|
16891
|
+
// for the always-available legacy `/acp` surface.
|
|
16892
|
+
(toggles) => toggles.acpHttpEnabled === true && toggles.multiWorkspaceSessionsEnabled === true
|
|
16893
|
+
],
|
|
16894
|
+
[
|
|
16895
|
+
"workspace_qualified_voice",
|
|
16896
|
+
// Like qualified ACP, the plural Voice surface is mounted ahead of time
|
|
16897
|
+
// but only becomes useful once the daemon has a secondary runtime.
|
|
16898
|
+
(toggles) => toggles.acpHttpEnabled === true && toggles.multiWorkspaceSessionsEnabled === true
|
|
16899
|
+
],
|
|
16758
16900
|
["client_mcp_over_ws", (toggles) => toggles.clientMcpOverWsEnabled === true],
|
|
16759
16901
|
["cdp_tunnel_over_ws", (toggles) => toggles.cdpTunnelOverWsEnabled === true],
|
|
16760
16902
|
[
|
|
@@ -16826,6 +16968,7 @@ var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set([
|
|
|
16826
16968
|
var CLIENT_ID_HEADER = "x-qwen-client-id";
|
|
16827
16969
|
var MAX_CLIENT_ID_LENGTH = 128;
|
|
16828
16970
|
var MAX_TOOL_NAME_LENGTH = 256;
|
|
16971
|
+
var MAX_SKILL_NAME_LENGTH = 256;
|
|
16829
16972
|
var MAX_SERVER_NAME_LENGTH = 256;
|
|
16830
16973
|
var CLIENT_ID_RE = /^[A-Za-z0-9._:-]+$/;
|
|
16831
16974
|
var INVALID_PERMISSION_OUTCOME_ERROR = '`outcome` must be `{ outcome: "cancelled" }` or `{ outcome: "selected", optionId: string }`';
|
|
@@ -16928,7 +17071,8 @@ __name(validateMcpRuntimeServerName, "validateMcpRuntimeServerName");
|
|
|
16928
17071
|
function parseAndValidateWorkspaceClientId(req, res, bridge) {
|
|
16929
17072
|
const raw = parseClientIdHeader(req, res);
|
|
16930
17073
|
if (raw === null || raw === void 0) return raw;
|
|
16931
|
-
|
|
17074
|
+
const bridges = Array.isArray(bridge) ? bridge : [bridge];
|
|
17075
|
+
if (!bridges.some((candidate) => candidate.knownClientIds().has(raw))) {
|
|
16932
17076
|
res.status(400).json({
|
|
16933
17077
|
error: `Client id "${raw}" is not registered for this workspace`,
|
|
16934
17078
|
code: "invalid_client_id",
|
|
@@ -17024,7 +17168,8 @@ init_esbuild_shims();
|
|
|
17024
17168
|
var MAX_BUCKETS = 1e4;
|
|
17025
17169
|
var GC_REQUEST_INTERVAL = 1e3;
|
|
17026
17170
|
var GC_TIMER_INTERVAL_MS = 5 * 60 * 1e3;
|
|
17027
|
-
|
|
17171
|
+
var WORKSPACE_QUALIFIED_ACP_PATH = /^\/workspaces\/[^/]+\/acp$/i;
|
|
17172
|
+
function resolveTier(method, path3, workspaceQualifiedAcpEnabled) {
|
|
17028
17173
|
const p = path3.endsWith("/") && path3.length > 1 ? path3.slice(0, -1) : path3;
|
|
17029
17174
|
if (method === "OPTIONS") return null;
|
|
17030
17175
|
if ((method === "GET" || method === "HEAD") && (p === "/health" || p === "/demo"))
|
|
@@ -17034,6 +17179,8 @@ function resolveTier(method, path3) {
|
|
|
17034
17179
|
if (method === "GET" && p.startsWith("/session/") && p.endsWith("/events"))
|
|
17035
17180
|
return null;
|
|
17036
17181
|
if (p === "/acp" || p.startsWith("/acp/")) return null;
|
|
17182
|
+
if (workspaceQualifiedAcpEnabled && WORKSPACE_QUALIFIED_ACP_PATH.test(p))
|
|
17183
|
+
return null;
|
|
17037
17184
|
if (method === "POST" && p.startsWith("/session/") && p.endsWith("/prompt"))
|
|
17038
17185
|
return "prompt";
|
|
17039
17186
|
if (method !== "GET" && method !== "HEAD") return "mutation";
|
|
@@ -17137,7 +17284,11 @@ function createRateLimiter(config) {
|
|
|
17137
17284
|
next();
|
|
17138
17285
|
return;
|
|
17139
17286
|
}
|
|
17140
|
-
const tier = resolveTier(
|
|
17287
|
+
const tier = resolveTier(
|
|
17288
|
+
req.method,
|
|
17289
|
+
req.path,
|
|
17290
|
+
config.workspaceQualifiedAcpEnabled === true
|
|
17291
|
+
);
|
|
17141
17292
|
if (tier === null) {
|
|
17142
17293
|
next();
|
|
17143
17294
|
return;
|
|
@@ -17298,6 +17449,7 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
17298
17449
|
null
|
|
17299
17450
|
);
|
|
17300
17451
|
const acpSnapshot = input.acpHandle?.registry.getSnapshot();
|
|
17452
|
+
const acpAggregate = input.acpHandle?.getSnapshot();
|
|
17301
17453
|
const rateLimitHits = input.rateLimiter?.getHitCounts() ?? zeroRateHits();
|
|
17302
17454
|
let pendingPrompts = 0;
|
|
17303
17455
|
let derivedQueuedPrompts = 0;
|
|
@@ -17324,22 +17476,25 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
17324
17476
|
state: "disabled",
|
|
17325
17477
|
channels: []
|
|
17326
17478
|
};
|
|
17479
|
+
const channelWorkers = (workspaceRuntimes?.length ?? 1) > 1 ? input.getChannelWorkerSnapshots?.() : void 0;
|
|
17327
17480
|
const totalAdmissionSnapshot = input.getTotalSessionAdmissionSnapshot?.();
|
|
17328
17481
|
const issues = [];
|
|
17329
17482
|
let full;
|
|
17330
17483
|
pushRuntimeIssues(
|
|
17331
17484
|
issues,
|
|
17332
17485
|
acpSnapshot,
|
|
17486
|
+
acpAggregate,
|
|
17333
17487
|
rateLimitHits,
|
|
17334
17488
|
input,
|
|
17335
17489
|
channelWorker,
|
|
17490
|
+
channelWorkers,
|
|
17336
17491
|
totalAdmissionSnapshot,
|
|
17337
17492
|
workspaceSnapshots
|
|
17338
17493
|
);
|
|
17339
17494
|
if (detail === "full") {
|
|
17340
17495
|
full = await buildFullStatus(
|
|
17341
17496
|
input,
|
|
17342
|
-
|
|
17497
|
+
acpAggregate,
|
|
17343
17498
|
workspaceSnapshots.flatMap((item) => item.snapshot.sessions)
|
|
17344
17499
|
);
|
|
17345
17500
|
pushFullIssues(issues, full);
|
|
@@ -17404,16 +17559,17 @@ async function buildDaemonStatusResponse(detail, input) {
|
|
|
17404
17559
|
},
|
|
17405
17560
|
channel: { live: aggregatedChannelLive },
|
|
17406
17561
|
channelWorker,
|
|
17562
|
+
...channelWorkers && channelWorkers.length > 0 ? { channelWorkers } : {},
|
|
17407
17563
|
transport: {
|
|
17408
17564
|
restSseActive: input.getRestSseActive(),
|
|
17409
17565
|
acp: {
|
|
17410
17566
|
enabled: acpSnapshot !== void 0,
|
|
17411
|
-
connections:
|
|
17412
|
-
connectionStreams:
|
|
17413
|
-
sessionStreams:
|
|
17414
|
-
sseStreams:
|
|
17415
|
-
wsStreams:
|
|
17416
|
-
pendingClientRequests:
|
|
17567
|
+
connections: acpAggregate?.connectionCount ?? 0,
|
|
17568
|
+
connectionStreams: acpAggregate?.connectionStreams ?? 0,
|
|
17569
|
+
sessionStreams: acpAggregate?.sessionStreams ?? 0,
|
|
17570
|
+
sseStreams: acpAggregate?.sseStreams ?? 0,
|
|
17571
|
+
wsStreams: acpAggregate?.wsStreams ?? 0,
|
|
17572
|
+
pendingClientRequests: acpAggregate?.pendingClientRequests ?? 0
|
|
17417
17573
|
}
|
|
17418
17574
|
},
|
|
17419
17575
|
rateLimit: {
|
|
@@ -17550,7 +17706,7 @@ async function withTimeout(promise, section, timeoutMs) {
|
|
|
17550
17706
|
}
|
|
17551
17707
|
}
|
|
17552
17708
|
__name(withTimeout, "withTimeout");
|
|
17553
|
-
function pushRuntimeIssues(issues, acpSnapshot, rateLimitHits, input, channelWorker, totalAdmissionSnapshot, workspaceSnapshots) {
|
|
17709
|
+
function pushRuntimeIssues(issues, acpSnapshot, acpAggregate, rateLimitHits, input, channelWorker, channelWorkers, totalAdmissionSnapshot, workspaceSnapshots) {
|
|
17554
17710
|
for (const { workspaceCwd, snapshot } of workspaceSnapshots) {
|
|
17555
17711
|
if (snapshot.limits.maxSessions !== null && snapshot.limits.maxSessions > 0 && snapshot.sessionCount / snapshot.limits.maxSessions >= CAPACITY_WARNING_RATIO) {
|
|
17556
17712
|
issues.push({
|
|
@@ -17575,12 +17731,19 @@ function pushRuntimeIssues(issues, acpSnapshot, rateLimitHits, input, channelWor
|
|
|
17575
17731
|
});
|
|
17576
17732
|
}
|
|
17577
17733
|
}
|
|
17578
|
-
if (acpSnapshot !== void 0 && acpSnapshot.connectionCap !== null && acpSnapshot.connectionCap > 0
|
|
17579
|
-
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17583
|
-
|
|
17734
|
+
if (acpSnapshot !== void 0 && acpSnapshot.connectionCap !== null && acpSnapshot.connectionCap > 0) {
|
|
17735
|
+
const cap = acpSnapshot.connectionCap;
|
|
17736
|
+
const busiest = (acpAggregate?.mounts ?? []).reduce(
|
|
17737
|
+
(max, m) => Math.max(max, m.connectionCount),
|
|
17738
|
+
acpSnapshot.connectionCount
|
|
17739
|
+
);
|
|
17740
|
+
if (busiest / cap >= CAPACITY_WARNING_RATIO) {
|
|
17741
|
+
issues.push({
|
|
17742
|
+
code: "connection_capacity_high",
|
|
17743
|
+
severity: "warning",
|
|
17744
|
+
message: `ACP connections are at ${busiest}/${cap} on the busiest workspace mount.`
|
|
17745
|
+
});
|
|
17746
|
+
}
|
|
17584
17747
|
}
|
|
17585
17748
|
const pendingPermissionCount = workspaceSnapshots.reduce(
|
|
17586
17749
|
(sum, item) => sum + item.snapshot.pendingPermissionCount,
|
|
@@ -17610,6 +17773,16 @@ function pushRuntimeIssues(issues, acpSnapshot, rateLimitHits, input, channelWor
|
|
|
17610
17773
|
message: `${sumRateHits(rateLimitHits)} request(s) have been rejected by rate limiting since start.`
|
|
17611
17774
|
});
|
|
17612
17775
|
}
|
|
17776
|
+
const groupedWorkers = channelWorkers && channelWorkers.length > 0 ? channelWorkers : void 0;
|
|
17777
|
+
const workers = groupedWorkers ?? [channelWorker];
|
|
17778
|
+
for (const worker of workers) {
|
|
17779
|
+
pushChannelWorkerIssues(issues, worker, groupedWorkers !== void 0);
|
|
17780
|
+
}
|
|
17781
|
+
}
|
|
17782
|
+
__name(pushRuntimeIssues, "pushRuntimeIssues");
|
|
17783
|
+
function pushChannelWorkerIssues(issues, channelWorker, grouped) {
|
|
17784
|
+
const workspace = "workspaceCwd" in channelWorker ? ` for workspace ${channelWorker.workspaceCwd}` : "";
|
|
17785
|
+
const section = grouped ? "runtime.channelWorkers" : "runtime.channelWorker";
|
|
17613
17786
|
if (channelWorker.enabled && (channelWorker.state === "exited" || channelWorker.state === "failed")) {
|
|
17614
17787
|
const detailParts = [
|
|
17615
17788
|
channelWorker.pid !== void 0 ? `pid=${channelWorker.pid}` : void 0,
|
|
@@ -17628,8 +17801,8 @@ function pushRuntimeIssues(issues, acpSnapshot, rateLimitHits, input, channelWor
|
|
|
17628
17801
|
issues.push({
|
|
17629
17802
|
code: "channel_worker_exited",
|
|
17630
17803
|
severity: isPermanentFailure ? "error" : "warning",
|
|
17631
|
-
message: `Channel worker is ${channelWorker.state}${details}${error}.`,
|
|
17632
|
-
section
|
|
17804
|
+
message: `Channel worker${workspace} is ${channelWorker.state}${details}${error}.`,
|
|
17805
|
+
section
|
|
17633
17806
|
});
|
|
17634
17807
|
}
|
|
17635
17808
|
if (channelWorker.enabled && channelWorker.state === "running" && channelWorker.requestedChannels !== void 0) {
|
|
@@ -17641,13 +17814,13 @@ function pushRuntimeIssues(issues, acpSnapshot, rateLimitHits, input, channelWor
|
|
|
17641
17814
|
issues.push({
|
|
17642
17815
|
code: "channel_worker_partial_connect",
|
|
17643
17816
|
severity: "warning",
|
|
17644
|
-
message: `Channel worker connected ${channelWorker.channels.length}/${channelWorker.requestedChannels.length} channel(s). Failed: ${failed.join(", ")}.`,
|
|
17645
|
-
section
|
|
17817
|
+
message: `Channel worker${workspace} connected ${channelWorker.channels.length}/${channelWorker.requestedChannels.length} channel(s). Failed: ${failed.join(", ")}.`,
|
|
17818
|
+
section
|
|
17646
17819
|
});
|
|
17647
17820
|
}
|
|
17648
17821
|
}
|
|
17649
17822
|
}
|
|
17650
|
-
__name(
|
|
17823
|
+
__name(pushChannelWorkerIssues, "pushChannelWorkerIssues");
|
|
17651
17824
|
function pushFullIssues(issues, full) {
|
|
17652
17825
|
for (const [name, section] of Object.entries(full.workspace)) {
|
|
17653
17826
|
if (section.status === "unavailable") {
|
|
@@ -17865,20 +18038,177 @@ function copyNumber(from, to, key) {
|
|
|
17865
18038
|
}
|
|
17866
18039
|
__name(copyNumber, "copyNumber");
|
|
17867
18040
|
|
|
18041
|
+
// packages/cli/src/serve/acp-http-enabled.ts
|
|
18042
|
+
init_esbuild_shims();
|
|
18043
|
+
function resolveAcpHttpEnabled(env = process.env) {
|
|
18044
|
+
return env["QWEN_SERVE_ACP_HTTP"] !== "0";
|
|
18045
|
+
}
|
|
18046
|
+
__name(resolveAcpHttpEnabled, "resolveAcpHttpEnabled");
|
|
18047
|
+
|
|
17868
18048
|
// packages/cli/src/serve/cdp-mcp-command.ts
|
|
17869
18049
|
init_esbuild_shims();
|
|
17870
18050
|
var QWEN_CDP_MCP_COMMAND_ENV = "QWEN_CDP_MCP_COMMAND";
|
|
17871
|
-
var QWEN_SERVE_ACP_HTTP_ENV = "QWEN_SERVE_ACP_HTTP";
|
|
17872
18051
|
function resolveCdpMcpCommand(env) {
|
|
17873
18052
|
const command = env[QWEN_CDP_MCP_COMMAND_ENV]?.trim();
|
|
17874
18053
|
return command ? command : void 0;
|
|
17875
18054
|
}
|
|
17876
18055
|
__name(resolveCdpMcpCommand, "resolveCdpMcpCommand");
|
|
17877
18056
|
function isBrowserAutomationMcpAvailable(opts, env) {
|
|
17878
|
-
return opts.cdpTunnelOverWs === true && !opts.token && env
|
|
18057
|
+
return opts.cdpTunnelOverWs === true && !opts.token && resolveAcpHttpEnabled(env) && resolveCdpMcpCommand(env) !== void 0;
|
|
17879
18058
|
}
|
|
17880
18059
|
__name(isBrowserAutomationMcpAvailable, "isBrowserAutomationMcpAvailable");
|
|
17881
18060
|
|
|
18061
|
+
// packages/cli/src/serve/voice/workspace-voice-coordinator.ts
|
|
18062
|
+
init_esbuild_shims();
|
|
18063
|
+
var MAX_CONCURRENT_VOICE_SESSIONS = 8;
|
|
18064
|
+
var DISPOSE_WAIT_MS = 5e3;
|
|
18065
|
+
var VoiceLeaseAbortError = class extends Error {
|
|
18066
|
+
constructor(kind, message) {
|
|
18067
|
+
super(message);
|
|
18068
|
+
this.kind = kind;
|
|
18069
|
+
this.name = "VoiceLeaseAbortError";
|
|
18070
|
+
}
|
|
18071
|
+
static {
|
|
18072
|
+
__name(this, "VoiceLeaseAbortError");
|
|
18073
|
+
}
|
|
18074
|
+
};
|
|
18075
|
+
var Lease = class {
|
|
18076
|
+
constructor(onRelease) {
|
|
18077
|
+
this.onRelease = onRelease;
|
|
18078
|
+
}
|
|
18079
|
+
static {
|
|
18080
|
+
__name(this, "Lease");
|
|
18081
|
+
}
|
|
18082
|
+
controller = new AbortController();
|
|
18083
|
+
signal = this.controller.signal;
|
|
18084
|
+
released = false;
|
|
18085
|
+
release() {
|
|
18086
|
+
if (this.released) return;
|
|
18087
|
+
this.released = true;
|
|
18088
|
+
this.onRelease(this);
|
|
18089
|
+
}
|
|
18090
|
+
abort(reason) {
|
|
18091
|
+
if (!this.signal.aborted) this.controller.abort(reason);
|
|
18092
|
+
}
|
|
18093
|
+
};
|
|
18094
|
+
var WorkspaceVoiceCoordinator = class {
|
|
18095
|
+
static {
|
|
18096
|
+
__name(this, "WorkspaceVoiceCoordinator");
|
|
18097
|
+
}
|
|
18098
|
+
states = /* @__PURE__ */ new Map();
|
|
18099
|
+
disposed = /* @__PURE__ */ new WeakSet();
|
|
18100
|
+
active = 0;
|
|
18101
|
+
acquire(runtime) {
|
|
18102
|
+
if (this.disposed.has(runtime)) {
|
|
18103
|
+
return { kind: "rejected", reason: "draining" };
|
|
18104
|
+
}
|
|
18105
|
+
const state = this.stateFor(runtime);
|
|
18106
|
+
if (state.draining) return { kind: "rejected", reason: "draining" };
|
|
18107
|
+
if (this.active >= MAX_CONCURRENT_VOICE_SESSIONS) {
|
|
18108
|
+
return { kind: "rejected", reason: "capacity" };
|
|
18109
|
+
}
|
|
18110
|
+
const lease = new Lease((current) => this.release(runtime, current));
|
|
18111
|
+
state.leases.add(lease);
|
|
18112
|
+
this.active++;
|
|
18113
|
+
return { kind: "admitted", lease };
|
|
18114
|
+
}
|
|
18115
|
+
beginWorkspaceDrain(runtime) {
|
|
18116
|
+
this.stateFor(runtime).draining = true;
|
|
18117
|
+
}
|
|
18118
|
+
cancelWorkspaceDrain(runtime) {
|
|
18119
|
+
const state = this.states.get(runtime);
|
|
18120
|
+
if (!state || state.completed) return;
|
|
18121
|
+
state.draining = false;
|
|
18122
|
+
if (state.leases.size === 0) this.states.delete(runtime);
|
|
18123
|
+
}
|
|
18124
|
+
completeWorkspaceDrain(runtime) {
|
|
18125
|
+
this.disposed.add(runtime);
|
|
18126
|
+
const state = this.states.get(runtime);
|
|
18127
|
+
if (!state) return;
|
|
18128
|
+
state.draining = true;
|
|
18129
|
+
state.completed = true;
|
|
18130
|
+
const abortReason = new VoiceLeaseAbortError(
|
|
18131
|
+
"workspace_removed",
|
|
18132
|
+
"Workspace drain completed"
|
|
18133
|
+
);
|
|
18134
|
+
for (const lease of state.leases) lease.abort(abortReason);
|
|
18135
|
+
this.deleteIfIdle(runtime, state);
|
|
18136
|
+
}
|
|
18137
|
+
getWorkspaceActivity(runtime) {
|
|
18138
|
+
return this.states.get(runtime)?.leases.size ?? 0;
|
|
18139
|
+
}
|
|
18140
|
+
async disposeRuntime(runtime, reason) {
|
|
18141
|
+
this.disposed.add(runtime);
|
|
18142
|
+
const state = this.states.get(runtime);
|
|
18143
|
+
if (!state) return;
|
|
18144
|
+
state.draining = true;
|
|
18145
|
+
state.completed = true;
|
|
18146
|
+
const abortReason = new VoiceLeaseAbortError(
|
|
18147
|
+
reason,
|
|
18148
|
+
reason === "workspace_removed" ? "Workspace runtime was removed" : "Daemon is shutting down"
|
|
18149
|
+
);
|
|
18150
|
+
for (const lease of state.leases) lease.abort(abortReason);
|
|
18151
|
+
if (state.leases.size === 0) {
|
|
18152
|
+
this.deleteIfIdle(runtime, state);
|
|
18153
|
+
return;
|
|
18154
|
+
}
|
|
18155
|
+
let resolveIdle;
|
|
18156
|
+
const idle = new Promise((resolve) => {
|
|
18157
|
+
resolveIdle = resolve;
|
|
18158
|
+
state.idleWaiters.add(resolve);
|
|
18159
|
+
});
|
|
18160
|
+
let timeout;
|
|
18161
|
+
let timedOut = false;
|
|
18162
|
+
try {
|
|
18163
|
+
await Promise.race([
|
|
18164
|
+
idle,
|
|
18165
|
+
new Promise((resolve) => {
|
|
18166
|
+
timeout = setTimeout(() => {
|
|
18167
|
+
timedOut = true;
|
|
18168
|
+
resolve();
|
|
18169
|
+
}, DISPOSE_WAIT_MS);
|
|
18170
|
+
timeout.unref?.();
|
|
18171
|
+
})
|
|
18172
|
+
]);
|
|
18173
|
+
} finally {
|
|
18174
|
+
if (timeout) clearTimeout(timeout);
|
|
18175
|
+
if (resolveIdle) state.idleWaiters.delete(resolveIdle);
|
|
18176
|
+
}
|
|
18177
|
+
if (timedOut && state.leases.size > 0) {
|
|
18178
|
+
process.stderr.write(
|
|
18179
|
+
`qwen serve: Voice runtime disposal timed out with ${state.leases.size} active lease(s).
|
|
18180
|
+
`
|
|
18181
|
+
);
|
|
18182
|
+
}
|
|
18183
|
+
}
|
|
18184
|
+
stateFor(runtime) {
|
|
18185
|
+
let state = this.states.get(runtime);
|
|
18186
|
+
if (!state) {
|
|
18187
|
+
state = {
|
|
18188
|
+
draining: false,
|
|
18189
|
+
completed: false,
|
|
18190
|
+
leases: /* @__PURE__ */ new Set(),
|
|
18191
|
+
idleWaiters: /* @__PURE__ */ new Set()
|
|
18192
|
+
};
|
|
18193
|
+
this.states.set(runtime, state);
|
|
18194
|
+
}
|
|
18195
|
+
return state;
|
|
18196
|
+
}
|
|
18197
|
+
release(runtime, lease) {
|
|
18198
|
+
const state = this.states.get(runtime);
|
|
18199
|
+
if (!state || !state.leases.delete(lease)) return;
|
|
18200
|
+
this.active--;
|
|
18201
|
+
if (state.leases.size === 0) {
|
|
18202
|
+
for (const resolve of state.idleWaiters) resolve();
|
|
18203
|
+
state.idleWaiters.clear();
|
|
18204
|
+
}
|
|
18205
|
+
this.deleteIfIdle(runtime, state);
|
|
18206
|
+
}
|
|
18207
|
+
deleteIfIdle(runtime, state) {
|
|
18208
|
+
if (state.completed && state.leases.size === 0) this.states.delete(runtime);
|
|
18209
|
+
}
|
|
18210
|
+
};
|
|
18211
|
+
|
|
17882
18212
|
export {
|
|
17883
18213
|
require_express2 as require_express,
|
|
17884
18214
|
sanitizeForStderr,
|
|
@@ -17909,6 +18239,7 @@ export {
|
|
|
17909
18239
|
CLIENT_ID_HEADER,
|
|
17910
18240
|
MAX_CLIENT_ID_LENGTH,
|
|
17911
18241
|
MAX_TOOL_NAME_LENGTH,
|
|
18242
|
+
MAX_SKILL_NAME_LENGTH,
|
|
17912
18243
|
MAX_SERVER_NAME_LENGTH,
|
|
17913
18244
|
CLIENT_ID_RE,
|
|
17914
18245
|
safeBody,
|
|
@@ -17931,10 +18262,13 @@ export {
|
|
|
17931
18262
|
allowOriginMode,
|
|
17932
18263
|
listenerMaxConnections,
|
|
17933
18264
|
positiveFiniteOrNull,
|
|
18265
|
+
resolveAcpHttpEnabled,
|
|
17934
18266
|
QWEN_CDP_MCP_COMMAND_ENV,
|
|
17935
|
-
QWEN_SERVE_ACP_HTTP_ENV,
|
|
17936
18267
|
resolveCdpMcpCommand,
|
|
17937
|
-
isBrowserAutomationMcpAvailable
|
|
18268
|
+
isBrowserAutomationMcpAvailable,
|
|
18269
|
+
MAX_CONCURRENT_VOICE_SESSIONS,
|
|
18270
|
+
VoiceLeaseAbortError,
|
|
18271
|
+
WorkspaceVoiceCoordinator
|
|
17938
18272
|
};
|
|
17939
18273
|
/**
|
|
17940
18274
|
* @license
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
init_esbuild_shims
|
|
5
|
+
} from "./chunk-5O2XNYP6.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
9
|
+
|
|
10
|
+
// packages/cli/src/config/path-comparison.ts
|
|
11
|
+
init_esbuild_shims();
|
|
12
|
+
import * as fs from "node:fs";
|
|
13
|
+
import * as path from "node:path";
|
|
14
|
+
function isWithinRoot(childPath, parentPath) {
|
|
15
|
+
const relativePath = path.relative(parentPath, childPath);
|
|
16
|
+
return relativePath === "" || !relativePath.startsWith(`..${path.sep}`) && relativePath !== ".." && !path.isAbsolute(relativePath);
|
|
17
|
+
}
|
|
18
|
+
__name(isWithinRoot, "isWithinRoot");
|
|
19
|
+
function getPathComparisonVariants(rawPath) {
|
|
20
|
+
const variants = /* @__PURE__ */ new Set([path.normalize(path.resolve(rawPath))]);
|
|
21
|
+
try {
|
|
22
|
+
variants.add(path.normalize(fs.realpathSync(rawPath)));
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
return variants;
|
|
26
|
+
}
|
|
27
|
+
__name(getPathComparisonVariants, "getPathComparisonVariants");
|
|
28
|
+
function arePathsEquivalent(left, right) {
|
|
29
|
+
const rightVariants = getPathComparisonVariants(right);
|
|
30
|
+
for (const leftVariant of getPathComparisonVariants(left)) {
|
|
31
|
+
if (rightVariants.has(leftVariant)) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
__name(arePathsEquivalent, "arePathsEquivalent");
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
isWithinRoot,
|
|
41
|
+
getPathComparisonVariants,
|
|
42
|
+
arePathsEquivalent
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright 2025 Qwen Team
|
|
47
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/
|