@qwen-code/qwen-code 0.19.3-nightly.20260701.a974594d7 → 0.19.4
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/loop/loop-tick-resolver.test.ts +42 -0
- package/bundled/loop/loop-tick-resolver.ts +1 -1
- package/bundled/qc-helper/docs/configuration/auth.md +1 -1
- package/bundled/qc-helper/docs/configuration/settings.md +23 -11
- package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
- package/bundled/qc-helper/docs/features/auto-mode.md +40 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +81 -18
- package/bundled/qc-helper/docs/features/code-review.md +17 -61
- package/bundled/qc-helper/docs/features/commands.md +6 -6
- package/bundled/qc-helper/docs/features/mcp.md +3 -1
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +10 -0
- package/bundled/qc-helper/docs/qwen-serve.md +19 -0
- package/bundled/review/DESIGN.md +21 -26
- package/bundled/review/SKILL.md +45 -129
- package/chunks/{MaxSizedBox-UZHJ73JB.js → MaxSizedBox-ERTNFI22.js} +20 -18
- package/chunks/{StandaloneSessionPicker-GGUIZWCE.js → StandaloneSessionPicker-Y5NGRLRY.js} +32 -29
- package/chunks/{acpAgent-QYZFICEZ.js → acpAgent-UMN6OYTR.js} +473 -187
- package/chunks/{agent-2EN7YNSW.js → agent-56DZU4ZU.js} +17 -15
- package/chunks/{agent-headless-SLTEZ5LV.js → agent-headless-SR7N2IJG.js} +17 -15
- package/chunks/{anthropicContentGenerator-CA3JTAMO.js → anthropicContentGenerator-5OZFO6WQ.js} +1 -1
- package/chunks/{artifact-tool-RM7WINJO.js → artifact-tool-JVZMHA4B.js} +1 -1
- package/chunks/{askUserQuestion-J3P6QAJ7.js → askUserQuestion-CMJZ2F3D.js} +1 -1
- package/chunks/{bridge-HZVAUTMX.js → bridge-AUHNFOUS.js} +23 -21
- package/chunks/channel-worker-supervisor-A74FV522.js +308 -0
- package/chunks/{chunk-N4V4VBP6.js → chunk-2X2JUE47.js} +2 -2
- package/chunks/{chunk-JV7A66DR.js → chunk-4VZH35PN.js} +528 -358
- package/chunks/{chunk-M2U5NM24.js → chunk-54YZOP7P.js} +309 -72
- package/chunks/{chunk-WGY3GIPP.js → chunk-6AQR7732.js} +1 -1
- package/chunks/{chunk-FR3II765.js → chunk-6CIIP6OE.js} +4 -4
- package/chunks/{chunk-IKO44NAT.js → chunk-6TLY5W3B.js} +2 -2
- package/chunks/{chunk-VN4CKYUW.js → chunk-73H73ASU.js} +1 -1
- package/chunks/{chunk-IBEM64M4.js → chunk-75X2VLSH.js} +36 -25
- package/chunks/{chunk-PLQTLKMR.js → chunk-7KPI4LAI.js} +3 -3
- package/chunks/{chunk-NVTRORSK.js → chunk-7VPC7D7O.js} +2 -2
- package/chunks/chunk-AHNXYU4O.js +24 -0
- package/chunks/{chunk-MTJVHQDP.js → chunk-B7KGXIPZ.js} +302 -257
- package/chunks/{chunk-35FH347N.js → chunk-BFG6OZN7.js} +16097 -16236
- package/chunks/{chunk-T44AF4I6.js → chunk-BNJLLAQ7.js} +1 -1
- package/chunks/{chunk-OEY3YAL2.js → chunk-BQNJBEUA.js} +2 -2
- package/chunks/{chunk-Q7TDHJ2G.js → chunk-C2IHHGBZ.js} +10 -10
- package/chunks/chunk-CG7SVARK.js +367 -0
- package/chunks/{chunk-7SP275SH.js → chunk-CS5XYDBO.js} +5 -5
- package/chunks/{chunk-V5YJAUHW.js → chunk-CUGEBAKG.js} +1 -1
- package/chunks/{chunk-FQDMX5IL.js → chunk-D5KISTLW.js} +309 -72
- package/chunks/{chunk-I4MXURND.js → chunk-DQ74W65K.js} +356 -468
- package/chunks/chunk-E5A7LHNN.js +51 -0
- package/chunks/{chunk-3PJXIDKI.js → chunk-E6US47KI.js} +3 -27
- package/chunks/chunk-EDAGQADF.js +21 -0
- package/chunks/{chunk-HUGAEYZR.js → chunk-FNLXLI4I.js} +2 -2
- package/chunks/{chunk-WJAY4WXR.js → chunk-FYKX6XOT.js} +1 -1
- package/chunks/{chunk-CA4ML3VH.js → chunk-G7OQ3RFJ.js} +1 -1
- package/chunks/{chunk-VHRREANT.js → chunk-GICCHL2Q.js} +3 -1
- package/chunks/{chunk-QHHNFG22.js → chunk-GLPV75ES.js} +1 -1
- package/chunks/{chunk-LD2XBG6Z.js → chunk-GO6LNQXT.js} +1 -39
- package/chunks/chunk-HI55Z6PR.js +3523 -0
- package/chunks/{chunk-B5MPZI4K.js → chunk-HJDF3ZVU.js} +2670 -1233
- package/chunks/{chunk-GDIG7TMG.js → chunk-HRZB5CSC.js} +1 -1
- package/chunks/{chunk-LDWTYE33.js → chunk-J3F7X3LW.js} +1 -1
- package/chunks/{chunk-FV4SQ54H.js → chunk-KVPFPC4J.js} +227 -85
- package/chunks/{chunk-Q3JOGB4U.js → chunk-L7QPM2YD.js} +1 -1
- package/chunks/{chunk-4722VFFU.js → chunk-L7VH7HQA.js} +6 -6
- package/chunks/{chunk-HWG4XLD7.js → chunk-LKWAVAB5.js} +1 -1
- package/chunks/{chunk-YCRTJYSQ.js → chunk-MEQWZGK5.js} +1 -1
- package/chunks/{chunk-6FIWYVN4.js → chunk-MKHC4BYZ.js} +30 -5
- package/chunks/{chunk-YCEHOJZJ.js → chunk-MNDTD5E5.js} +65 -38
- package/chunks/{chunk-ZGSV5ORL.js → chunk-MVZXZWGT.js} +809 -759
- package/chunks/chunk-MX2YXRER.js +44 -0
- package/chunks/{chunk-TMILTLP3.js → chunk-ND25GXEU.js} +21 -4
- package/chunks/{chunk-AIBPG5MB.js → chunk-OAFUMTWW.js} +2 -2
- package/chunks/chunk-OJCECIJA.js +238 -0
- package/chunks/{chunk-EUURTJY7.js → chunk-PIYV6COW.js} +1 -1
- package/chunks/{chunk-LXEW6BHF.js → chunk-Q7VHIRDD.js} +1 -1
- package/chunks/{chunk-DBR7PF4B.js → chunk-QAFQLTXG.js} +1 -1
- package/chunks/{chunk-3TK7FSCP.js → chunk-QMIND2AS.js} +3 -3
- package/chunks/{chunk-ESVSWG6Z.js → chunk-QOMAHFYI.js} +1 -1
- package/chunks/{chunk-J37FGIOA.js → chunk-QXPI7FEC.js} +38 -4
- package/chunks/chunk-RM3PGSGL.js +66 -0
- package/chunks/chunk-RNBYOUGV.js +42 -0
- package/chunks/chunk-S5EQPDTM.js +91 -0
- package/chunks/{chunk-GZKQ36JS.js → chunk-SFN4TEHY.js} +4 -4
- package/chunks/{chunk-DHXWNSJA.js → chunk-T22H4V4R.js} +42 -0
- package/chunks/{chunk-LXGWLOCM.js → chunk-TENOUWY2.js} +1 -1
- package/chunks/{chunk-BLAE2TCO.js → chunk-TTFNVEO5.js} +3 -3
- package/chunks/{chunk-FZY7NH37.js → chunk-UANCYOOQ.js} +1 -1
- package/chunks/{chunk-E5I6YSNO.js → chunk-UQFP2FEF.js} +1 -1
- package/chunks/{chunk-3O2BJMFW.js → chunk-UQYOMM6J.js} +4 -4
- package/chunks/{chunk-JERW36RG.js → chunk-UT5JU5DJ.js} +15 -15
- package/chunks/{chunk-DJ25MIU2.js → chunk-VKGG724L.js} +8 -8
- package/chunks/{chunk-G525INVW.js → chunk-W2ZOAX7F.js} +3 -3
- package/chunks/{chunk-HIYUAXBG.js → chunk-W6X4FGWX.js} +1 -1
- package/chunks/{chunk-OE5J6UA7.js → chunk-XCUFHOAD.js} +1 -1
- package/chunks/{chunk-KXVVXAAC.js → chunk-YBDZ63KI.js} +3 -3
- package/chunks/{chunk-Z34RYLRO.js → chunk-ZJP5T7IA.js} +1 -1
- package/chunks/{chunk-NOYV2NXI.js → chunk-ZXCVPMIK.js} +411 -43
- package/chunks/{computer-use-FCNWHVPW.js → computer-use-VWN5HH6A.js} +20 -18
- package/chunks/{contextCommand-FVFMZZEU.js → contextCommand-DFFG5KDJ.js} +19 -17
- package/chunks/{cron-create-IY5NMIHQ.js → cron-create-CSSWJ67I.js} +1 -1
- package/chunks/{cron-delete-OLNEQWKO.js → cron-delete-E56CFQ7A.js} +1 -1
- package/chunks/{cron-list-YAUAUV24.js → cron-list-BKSINY6Y.js} +1 -1
- package/chunks/daemon-5T6IHWJV.js +8430 -0
- package/chunks/{daemon-status-provider-42JEXENZ.js → daemon-status-provider-V5UY7O7J.js} +26 -24
- package/chunks/{dist-4FCNM6KJ.js → dist-2HDL5SHQ.js} +2 -2
- package/chunks/{dist-SU6L7ZNJ.js → dist-B7SSDVWT.js} +3 -3
- package/chunks/{dist-VD7HXTML.js → dist-BL3SL665.js} +1 -1
- package/chunks/{dist-UKPWQJCL.js → dist-TAVAGZU6.js} +37 -13
- package/chunks/{dist-K4XZILIO.js → dist-XBOVZ3R5.js} +26 -5
- package/chunks/{earlyInputCapture-FFFEC6P4.js → earlyInputCapture-VVYU4FDO.js} +17 -15
- package/chunks/{edit-32ILSGZY.js → edit-F35PTMBA.js} +17 -15
- package/chunks/{en-U3LWGSFX.js → en-FZREZFPO.js} +18 -0
- package/chunks/{enter-worktree-XWZKIN6A.js → enter-worktree-3DIW7EGJ.js} +17 -15
- package/chunks/{enterPlanMode-LPFFY7BJ.js → enterPlanMode-QNXT77KP.js} +27 -15
- package/chunks/{errors-UXBPYPI2.js → errors-M53YG76R.js} +19 -17
- package/chunks/{exit-worktree-IBS4UIU7.js → exit-worktree-BSDWNWHZ.js} +17 -15
- package/chunks/{exitPlanMode-JA72YHII.js → exitPlanMode-EL7AY327.js} +41 -23
- package/chunks/{fast-path-7UU67Y2W.js → fast-path-DUCSMUFW.js} +2 -2
- package/chunks/{gemini-GMVKJNMX.js → gemini-F3IERB37.js} +59 -51
- package/chunks/{geminiContentGenerator-7NIFF2L4.js → geminiContentGenerator-6OULAKFQ.js} +1 -1
- package/chunks/{glob-4NJCW5HI.js → glob-ZMLFTD4T.js} +17 -15
- package/chunks/{grep-PAIMLQEL.js → grep-H5X66EI7.js} +17 -15
- package/chunks/{initializer-R6KU4VYM.js → initializer-LEOT2OLH.js} +21 -19
- package/chunks/{list-H7LXAO64.js → list-M3DKXML6.js} +23 -21
- package/chunks/{loadedSettingsAdapter-H27JMTLU.js → loadedSettingsAdapter-OKMQFGGG.js} +21 -19
- package/chunks/{loop-wakeup-Y3OIRQFM.js → loop-wakeup-FPBAVVPR.js} +2 -2
- package/chunks/{ls-TVJEYS7O.js → ls-UGWQXPTY.js} +1 -1
- package/chunks/{lsp-JZSDVR3F.js → lsp-24WV7NXB.js} +1 -1
- package/chunks/{monitor-JSIHDPXP.js → monitor-ARL5P45R.js} +19 -16
- package/chunks/{nonInteractiveCli-Y4CHOETG.js → nonInteractiveCli-NUVLF3YR.js} +53 -45
- package/chunks/{notebook-edit-SHRNL2UM.js → notebook-edit-ANTZ2DDY.js} +17 -15
- package/chunks/{openaiContentGenerator-ORZZ7VFO.js → openaiContentGenerator-TFGMKGHN.js} +6 -6
- package/chunks/pidfile-AWTL4C63.js +72 -0
- package/chunks/{qwenContentGenerator-H643PL2G.js → qwenContentGenerator-6QWAYTWS.js} +18 -16
- package/chunks/{qwenOAuth2-OI2B7PES.js → qwenOAuth2-LWLA6MQG.js} +3 -3
- package/chunks/{read-file-5PRNPTTY.js → read-file-EJY73XQ3.js} +4 -4
- package/chunks/{read-mcp-resource-QTXGKTEV.js → read-mcp-resource-NCBTPP7X.js} +1 -1
- package/chunks/{ripGrep-JIKZMABJ.js → ripGrep-HC4SA6CQ.js} +17 -15
- package/chunks/{run-qwen-serve-PQV7QOHZ.js → run-qwen-serve-AGLZ642J.js} +291 -55
- package/chunks/{scheduler-OS3R5MGU.js → scheduler-TURO7NGY.js} +17 -15
- package/chunks/{send-message-DKGHWSTF.js → send-message-3S2NYS3O.js} +5 -3
- package/chunks/{serve-LVYZDKCZ.js → serve-5DAMOIDW.js} +22 -19
- package/chunks/{server-P4YIH35I.js → server-4AGEK2HC.js} +2268 -1222
- package/chunks/{session-DE4TZBKH.js → session-7ZOQUC4Y.js} +54 -46
- package/chunks/{settings-DFTYMJYF.js → settings-DR4V6L5Y.js} +20 -18
- package/chunks/{shell-3GNQLNV7.js → shell-H5WFKUXH.js} +17 -15
- package/chunks/{skill-NCNG4KKZ.js → skill-ANHU5ZCR.js} +4 -4
- package/chunks/{spawnChannel-DHRIMDVL.js → spawnChannel-VN5LJV7Z.js} +19 -17
- package/chunks/{src-PNZYGM3R.js → src-OVZLTVVM.js} +49 -17
- package/chunks/{startInteractiveUI-P6GZBFQW.js → startInteractiveUI-OA22V32P.js} +11110 -10670
- package/chunks/{syntheticOutput-X7L5HWLN.js → syntheticOutput-SV7GBHZ5.js} +2 -2
- package/chunks/{task-create-AWEUI4GI.js → task-create-W2H2UJCH.js} +6 -5
- package/chunks/{task-list-KZ3VJLDU.js → task-list-THBOPV4G.js} +5 -4
- package/chunks/{task-stop-GUNOZKJ5.js → task-stop-33FVCNCJ.js} +1 -1
- package/chunks/{task-update-Y56GP6DU.js → task-update-LVFQLXEI.js} +6 -5
- package/chunks/{team-create-6JMW3KQK.js → team-create-OYL5CAQO.js} +17 -15
- package/chunks/{team-delete-6AFRGDJY.js → team-delete-NTUQ25UY.js} +5 -4
- package/chunks/{theme-manager-FEHQO22G.js → theme-manager-XCMPF2SI.js} +17 -15
- package/chunks/{todoWrite-JRS6NOEU.js → todoWrite-SEPO2RI3.js} +1 -1
- package/chunks/{tool-search-IXAEKS7J.js → tool-search-YXW55X6Z.js} +29 -5
- package/chunks/{trustedFolders-SJRXNHZE.js → trustedFolders-TEPGM5YL.js} +18 -16
- package/chunks/{validateNonInterActiveAuth-HCH7OBDH.js → validateNonInterActiveAuth-OQIS7WUE.js} +50 -42
- package/chunks/{web-fetch-RELNL37A.js → web-fetch-OE7LHURA.js} +4 -4
- package/chunks/{workflow-M2COBI7R.js → workflow-RTUWORAP.js} +48 -27
- package/chunks/{workspace-providers-status-GOCWYDMK.js → workspace-providers-status-DM2XANVB.js} +23 -21
- package/chunks/{workspace-service-34C7SUBU.js → workspace-service-VKBI2KZD.js} +27 -25
- package/chunks/{write-file-E52WRXZL.js → write-file-WGALQ53L.js} +17 -15
- package/chunks/{zh-TW-LKLBTZHE.js → zh-TW-6GIKXEAN.js} +18 -0
- package/chunks/{zh-F5T4WWZO.js → zh-V3B4TFWL.js} +18 -0
- package/cli.js +6 -6
- package/locales/en.js +30 -0
- package/locales/fr.js +1 -2
- package/locales/ja.js +1 -2
- package/locales/zh-TW.js +29 -0
- package/locales/zh.js +29 -0
- package/node_modules/@qwen-code/audio-capture/package.json +1 -1
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-C2DILvUl.js → arc-Det5Ccum.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-b8gZ2cNw.js → architectureDiagram-3BPJPVTR-DqNWVFpl.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-BuRpghMj.js → blockDiagram-GPEHLZMM-CYl7tYBi.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-2ItdhFmE.js → c4Diagram-AAUBKEIU-DaAEi0NQ.js} +1 -1
- package/web-shell/assets/channel-Bm0bFauD.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-B1QXa0q3.js → chunk-2J33WTMH-Df2CDEE2.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DXfhKlNq.js → chunk-4BX2VUAB-DNBFcyL2.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-ClSNjxLo.js → chunk-55IACEB6-BKjF-0HI.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-Dsh2wisB.js → chunk-727SXJPM-DYwAwfIM.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-C1TkY5AR.js → chunk-AQP2D5EJ-C6FswLqy.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CGtN9XR6.js → chunk-FMBD7UC4-DRWAcZSY.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BHiPi1SS.js → chunk-ND2GUHAM-AoL16mNR.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CzG3I5o1.js → chunk-QZHKN3VN-a8PtLMck.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK--NgUfb55.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2--NgUfb55.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-EgrIoH_K.js → cose-bilkent-S5V4N54A-C4Aeu5qf.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BUnpdX8S.js → dagre-BM42HDAG-BOulamjo.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BlLUCVYu.js → diagram-2AECGRRQ-D1wt2ykO.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-FG-enmjQ.js → diagram-5GNKFQAL-BRseus-O.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BlzmTONk.js → diagram-KO2AKTUF-XSMkNzpZ.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-CoBQ8mIx.js → diagram-LMA3HP47-21KNLqoi.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DvxV6sX8.js → diagram-OG6HWLK6-DnUI8F5G.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-Jq1tpAoj.js → erDiagram-TEJ5UH35-BVSOMuM2.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-CbtYOry5.js → flowDiagram-I6XJVG4X-fYtDPJsW.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-ZEn2VEKR.js → ganttDiagram-6RSMTGT7-CmRXosW_.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BZh-LkhJ.js → gitGraphDiagram-PVQCEYII-DPrmySxO.js} +1 -1
- package/web-shell/assets/index-BpKnmyFV.js +717 -0
- package/web-shell/assets/index-fLrtxpOG.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-B9HuZygK.js → infoDiagram-5YYISTIA-x3VbEuCV.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D76cNpYG.js → ishikawaDiagram-YF4QCWOH-SmitHRMC.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-6bGo7P1t.js → journeyDiagram-JHISSGLW-BxvA551S.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DuYyRBvB.js → kanban-definition-UN3LZRKU-DNHC16jY.js} +1 -1
- package/web-shell/assets/{linear-CpdSW1BC.js → linear-CQ6irBL9.js} +1 -1
- package/web-shell/assets/{mermaid.core-s5xbZMMj.js → mermaid.core-DtB6NO1e.js} +72 -72
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-go01fZ2y.js → mindmap-definition-RKZ34NQL-QKMAgV2v.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BfuZiEHO.js → pieDiagram-4H26LBE5-bvb6dGn6.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DsoINqV6.js → quadrantDiagram-W4KKPZXB-DLgdlG4D.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-B7FU4LiU.js → requirementDiagram-4Y6WPE33-2M9YH4GF.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BEDjFnGB.js → sankeyDiagram-5OEKKPKP-DzwfclTH.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-gzmmL5tK.js → sequenceDiagram-3UESZ5HK-BvPmTuy2.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-BtHD4IN_.js → stateDiagram-AJRCARHV-BjwUmrJF.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C4L8zXeL.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-T_8gmMCf.js → timeline-definition-PNZ67QCA-CXzS6qqz.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DdjuqnjO.js → vennDiagram-CIIHVFJN-yRSolF5B.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-Cgtrvb37.js → wardley-L42UT6IY-ClLJjHPG.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BW3f3-yW.js → wardleyDiagram-YWT4CUSO-VIa6t2p2.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BUS9IKkc.js → xychartDiagram-2RQKCTM6-CtmrkezW.js} +1 -1
- package/web-shell/index.html +18 -2
- package/chunks/chunk-2JKEQWDZ.js +0 -1596
- package/chunks/chunk-32MCHZQC.js +0 -73
- package/chunks/chunk-UAKXW3DN.js +0 -30
- package/web-shell/assets/channel-eRvn2UA3.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-YZNwy1rx.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-YZNwy1rx.js +0 -1
- package/web-shell/assets/index-5FhE0ORO.css +0 -5
- package/web-shell/assets/index-CDTGmqVm.js +0 -720
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DFy6gLDd.js +0 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
findCliEntryPath
|
|
5
|
+
} from "./chunk-AHNXYU4O.js";
|
|
3
6
|
import {
|
|
4
7
|
RUNTIME_STARTUP_CANCELLED_MESSAGE
|
|
5
8
|
} from "./chunk-GHOTR7HL.js";
|
|
@@ -17,23 +20,31 @@ import {
|
|
|
17
20
|
getRateLimiter,
|
|
18
21
|
getServeProtocolVersions,
|
|
19
22
|
hostAllowlist,
|
|
20
|
-
isLoopbackBind,
|
|
21
23
|
listenerMaxConnections,
|
|
22
24
|
parseAllowOriginPatterns,
|
|
23
25
|
parseDaemonStatusDetail,
|
|
24
26
|
positiveFiniteOrNull,
|
|
25
27
|
require_express,
|
|
26
28
|
resolveWebShellDir
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-B7KGXIPZ.js";
|
|
30
|
+
import {
|
|
31
|
+
isLoopbackBind
|
|
32
|
+
} from "./chunk-RNBYOUGV.js";
|
|
28
33
|
import "./chunk-3HX5LZ6R.js";
|
|
29
34
|
import "./chunk-7RYW5LQV.js";
|
|
30
35
|
import {
|
|
31
36
|
getCliVersion
|
|
32
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-W6X4FGWX.js";
|
|
33
38
|
import "./chunk-EWALXUAD.js";
|
|
34
39
|
import {
|
|
35
40
|
canonicalizeWorkspace
|
|
36
41
|
} from "./chunk-SEZC2725.js";
|
|
42
|
+
import {
|
|
43
|
+
QWEN_SERVER_TOKEN_ENV
|
|
44
|
+
} from "./chunk-EDAGQADF.js";
|
|
45
|
+
import {
|
|
46
|
+
channelSelectionNames
|
|
47
|
+
} from "./chunk-MX2YXRER.js";
|
|
37
48
|
import {
|
|
38
49
|
loadServeFastPathSettings,
|
|
39
50
|
preResolveServeFastPathHomeEnvOverrides
|
|
@@ -352,7 +363,6 @@ function initDaemonLogger(opts) {
|
|
|
352
363
|
__name(initDaemonLogger, "initDaemonLogger");
|
|
353
364
|
|
|
354
365
|
// packages/cli/src/serve/run-qwen-serve.ts
|
|
355
|
-
var QWEN_SERVER_TOKEN_ENV = "QWEN_SERVER_TOKEN";
|
|
356
366
|
var QWEN_SERVE_CLIENT_MCP_OVER_WS_ENV = "QWEN_SERVE_CLIENT_MCP_OVER_WS";
|
|
357
367
|
var QWEN_SERVE_CDP_TUNNEL_OVER_WS_ENV = "QWEN_SERVE_CDP_TUNNEL_OVER_WS";
|
|
358
368
|
var QWEN_SERVE_PROMPT_DEADLINE_MS_ENV = "QWEN_SERVE_PROMPT_DEADLINE_MS";
|
|
@@ -401,6 +411,18 @@ function parseDeadlineEnv(envName, raw) {
|
|
|
401
411
|
return parsed;
|
|
402
412
|
}
|
|
403
413
|
__name(parseDeadlineEnv, "parseDeadlineEnv");
|
|
414
|
+
function envFlagDisabled(raw) {
|
|
415
|
+
if (raw === void 0) return false;
|
|
416
|
+
const normalized = raw.trim().toLowerCase();
|
|
417
|
+
return normalized === "0" || normalized === "false";
|
|
418
|
+
}
|
|
419
|
+
__name(envFlagDisabled, "envFlagDisabled");
|
|
420
|
+
function hasChromeExtensionOrigin(origins) {
|
|
421
|
+
return origins?.some(
|
|
422
|
+
(origin) => origin.trim().toLowerCase().startsWith("chrome-extension://")
|
|
423
|
+
) === true;
|
|
424
|
+
}
|
|
425
|
+
__name(hasChromeExtensionOrigin, "hasChromeExtensionOrigin");
|
|
404
426
|
function createDaemonTelemetryRuntimeConfig(telemetry, cliVersion, daemonSessionId, defaults) {
|
|
405
427
|
return {
|
|
406
428
|
getTelemetryEnabled: /* @__PURE__ */ __name(() => telemetry.enabled ?? false, "getTelemetryEnabled"),
|
|
@@ -471,6 +493,14 @@ function formatHostForUrl(host) {
|
|
|
471
493
|
return host;
|
|
472
494
|
}
|
|
473
495
|
__name(formatHostForUrl, "formatHostForUrl");
|
|
496
|
+
function formatChannelWorkerDaemonUrl(host, port) {
|
|
497
|
+
const normalized = host.trim().toLowerCase();
|
|
498
|
+
if (normalized === "" || normalized === "0.0.0.0" || normalized === "::" || normalized === "[::]") {
|
|
499
|
+
return `http://127.0.0.1:${port}`;
|
|
500
|
+
}
|
|
501
|
+
return `http://${formatHostForUrl(host)}:${port}`;
|
|
502
|
+
}
|
|
503
|
+
__name(formatChannelWorkerDaemonUrl, "formatChannelWorkerDaemonUrl");
|
|
474
504
|
function extractContextFilename(value) {
|
|
475
505
|
if (typeof value === "string") {
|
|
476
506
|
const trimmed = value.trim();
|
|
@@ -496,6 +526,52 @@ function withSettingsLock(workspace, fn) {
|
|
|
496
526
|
return next;
|
|
497
527
|
}
|
|
498
528
|
__name(withSettingsLock, "withSettingsLock");
|
|
529
|
+
var channelWorkerRuntimePromise;
|
|
530
|
+
async function loadChannelWorkerRuntime() {
|
|
531
|
+
channelWorkerRuntimePromise ??= Promise.all([
|
|
532
|
+
import("./channel-worker-supervisor-A74FV522.js"),
|
|
533
|
+
import("./pidfile-AWTL4C63.js")
|
|
534
|
+
]).then(([supervisor, pidfile]) => ({
|
|
535
|
+
createChannelWorkerSupervisor: supervisor.createChannelWorkerSupervisor,
|
|
536
|
+
channelServicePidfile: pidfile
|
|
537
|
+
})).catch((err) => {
|
|
538
|
+
channelWorkerRuntimePromise = void 0;
|
|
539
|
+
throw err;
|
|
540
|
+
});
|
|
541
|
+
return channelWorkerRuntimePromise;
|
|
542
|
+
}
|
|
543
|
+
__name(loadChannelWorkerRuntime, "loadChannelWorkerRuntime");
|
|
544
|
+
function createDisabledChannelWorkerSupervisor() {
|
|
545
|
+
const snapshot = {
|
|
546
|
+
enabled: false,
|
|
547
|
+
state: "disabled",
|
|
548
|
+
channels: []
|
|
549
|
+
};
|
|
550
|
+
return {
|
|
551
|
+
async start() {
|
|
552
|
+
},
|
|
553
|
+
async stop() {
|
|
554
|
+
},
|
|
555
|
+
killAllSync() {
|
|
556
|
+
},
|
|
557
|
+
snapshot: /* @__PURE__ */ __name(() => ({ ...snapshot, channels: [] }), "snapshot")
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
__name(createDisabledChannelWorkerSupervisor, "createDisabledChannelWorkerSupervisor");
|
|
561
|
+
function writeServeChannelReservation(channelServicePidfile, channels) {
|
|
562
|
+
channelServicePidfile.reserveServeServiceInfo({
|
|
563
|
+
channels,
|
|
564
|
+
servePid: process.pid
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
__name(writeServeChannelReservation, "writeServeChannelReservation");
|
|
568
|
+
function channelServicePidfileConflictError(info) {
|
|
569
|
+
const owner = info.owner === "serve" ? "qwen serve" : "qwen channel start";
|
|
570
|
+
return new Error(
|
|
571
|
+
`Channel service is already running under ${owner} (PID ${info.pid}). Stop it before starting qwen serve --channel.`
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
__name(channelServicePidfileConflictError, "channelServicePidfileConflictError");
|
|
499
575
|
function normalizeInstallModelIds(req, provider, getDefaultModelIds) {
|
|
500
576
|
const fromRequest = req.modelIds?.map((id) => id.trim()).filter((id) => id.length > 0);
|
|
501
577
|
const modelIds = fromRequest && fromRequest.length > 0 ? fromRequest : getDefaultModelIds(provider);
|
|
@@ -525,7 +601,7 @@ function shouldPreheatBridge(deps) {
|
|
|
525
601
|
__name(shouldPreheatBridge, "shouldPreheatBridge");
|
|
526
602
|
var coreRuntimePromise;
|
|
527
603
|
function loadCoreRuntime() {
|
|
528
|
-
coreRuntimePromise ??= import("./src-
|
|
604
|
+
coreRuntimePromise ??= import("./src-OVZLTVVM.js");
|
|
529
605
|
return coreRuntimePromise;
|
|
530
606
|
}
|
|
531
607
|
__name(loadCoreRuntime, "loadCoreRuntime");
|
|
@@ -555,9 +631,9 @@ __name(resolveDaemonLogBaseDirForRun, "resolveDaemonLogBaseDirForRun");
|
|
|
555
631
|
var settingsRuntimePromise;
|
|
556
632
|
function loadSettingsRuntimeModules() {
|
|
557
633
|
settingsRuntimePromise ??= Promise.all([
|
|
558
|
-
import("./settings-
|
|
559
|
-
import("./loadedSettingsAdapter-
|
|
560
|
-
import("./trustedFolders-
|
|
634
|
+
import("./settings-DR4V6L5Y.js"),
|
|
635
|
+
import("./loadedSettingsAdapter-OKMQFGGG.js"),
|
|
636
|
+
import("./trustedFolders-TEPGM5YL.js")
|
|
561
637
|
]).then(([settings, loadedSettingsAdapter, trustedFolders]) => ({
|
|
562
638
|
settings,
|
|
563
639
|
loadedSettingsAdapter,
|
|
@@ -576,13 +652,13 @@ async function loadServeRuntimeModules() {
|
|
|
576
652
|
daemonStatusProviderModule,
|
|
577
653
|
workspaceProvidersStatusModule
|
|
578
654
|
] = await Promise.all([
|
|
579
|
-
import("./server-
|
|
580
|
-
import("./bridge-
|
|
581
|
-
import("./spawnChannel-
|
|
582
|
-
import("./workspace-service-
|
|
655
|
+
import("./server-4AGEK2HC.js"),
|
|
656
|
+
import("./bridge-AUHNFOUS.js"),
|
|
657
|
+
import("./spawnChannel-VN5LJV7Z.js"),
|
|
658
|
+
import("./workspace-service-VKBI2KZD.js"),
|
|
583
659
|
import("./types-QX5C3CHJ.js"),
|
|
584
|
-
import("./daemon-status-provider-
|
|
585
|
-
import("./workspace-providers-status-
|
|
660
|
+
import("./daemon-status-provider-V5UY7O7J.js"),
|
|
661
|
+
import("./workspace-providers-status-DM2XANVB.js")
|
|
586
662
|
]);
|
|
587
663
|
return {
|
|
588
664
|
createServeApp: serverModule.createServeApp,
|
|
@@ -775,6 +851,7 @@ function createBootstrapServeApp(input) {
|
|
|
775
851
|
sessionShellCommandEnabled,
|
|
776
852
|
permissionPolicy,
|
|
777
853
|
getRuntimeError,
|
|
854
|
+
getChannelWorkerSnapshot,
|
|
778
855
|
onHealthServed
|
|
779
856
|
} = input;
|
|
780
857
|
const app = (0, import_express.default)();
|
|
@@ -829,6 +906,7 @@ function createBootstrapServeApp(input) {
|
|
|
829
906
|
return;
|
|
830
907
|
}
|
|
831
908
|
const runtimeError = getRuntimeError();
|
|
909
|
+
const channelWorker = getChannelWorkerSnapshot();
|
|
832
910
|
const runtimeFailed = runtimeError !== void 0;
|
|
833
911
|
const issue = runtimeError ? {
|
|
834
912
|
code: "daemon_runtime_failed",
|
|
@@ -895,6 +973,7 @@ function createBootstrapServeApp(input) {
|
|
|
895
973
|
policy: permissionPolicy ?? "first-responder"
|
|
896
974
|
},
|
|
897
975
|
channel: { live: false },
|
|
976
|
+
channelWorker,
|
|
898
977
|
transport: {
|
|
899
978
|
restSseActive: 0,
|
|
900
979
|
acp: {
|
|
@@ -1021,21 +1100,78 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1021
1100
|
QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS_ENV,
|
|
1022
1101
|
process.env[QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS_ENV]
|
|
1023
1102
|
);
|
|
1103
|
+
const clientMcpOverWsEnv = process.env[QWEN_SERVE_CLIENT_MCP_OVER_WS_ENV];
|
|
1104
|
+
const cdpTunnelOverWsEnv = process.env[QWEN_SERVE_CDP_TUNNEL_OVER_WS_ENV];
|
|
1105
|
+
const chromeExtensionOriginAllowed = hasChromeExtensionOrigin(
|
|
1106
|
+
optsIn.allowOrigins
|
|
1107
|
+
);
|
|
1024
1108
|
const opts = {
|
|
1025
1109
|
...optsIn,
|
|
1026
1110
|
token,
|
|
1027
1111
|
promptDeadlineMs,
|
|
1028
1112
|
writerIdleTimeoutMs,
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
// and the child↔parent `client_mcp/message` round-trip stay dormant
|
|
1032
|
-
// otherwise. An explicit `clientMcpOverWs` in `optsIn` (embedded callers)
|
|
1033
|
-
// still wins.
|
|
1034
|
-
clientMcpOverWs: optsIn.clientMcpOverWs ?? process.env[QWEN_SERVE_CLIENT_MCP_OVER_WS_ENV] === "1",
|
|
1035
|
-
// CDP tunnel (Plan C, issue #5626). Opt-in via env until the contract
|
|
1036
|
-
// settles; an explicit `cdpTunnelOverWs` in `optsIn` still wins.
|
|
1037
|
-
cdpTunnelOverWs: optsIn.cdpTunnelOverWs ?? process.env[QWEN_SERVE_CDP_TUNNEL_OVER_WS_ENV] === "1"
|
|
1113
|
+
clientMcpOverWs: optsIn.clientMcpOverWs ?? (!envFlagDisabled(clientMcpOverWsEnv) && clientMcpOverWsEnv !== void 0),
|
|
1114
|
+
cdpTunnelOverWs: optsIn.cdpTunnelOverWs ?? (!envFlagDisabled(cdpTunnelOverWsEnv) && (cdpTunnelOverWsEnv !== void 0 || chromeExtensionOriginAllowed))
|
|
1038
1115
|
};
|
|
1116
|
+
const channelRuntime = opts.channelSelection ? await loadChannelWorkerRuntime() : void 0;
|
|
1117
|
+
const channelServicePidfile = deps.channelServicePidfile ?? channelRuntime?.channelServicePidfile;
|
|
1118
|
+
let channelPidfileReserved = false;
|
|
1119
|
+
const removeCurrentServePidfile = /* @__PURE__ */ __name(() => {
|
|
1120
|
+
if (!opts.channelSelection || !channelServicePidfile) return;
|
|
1121
|
+
if (!channelPidfileReserved) return;
|
|
1122
|
+
if (channelServicePidfile.removeServeServiceInfo) {
|
|
1123
|
+
if (channelServicePidfile.removeServeServiceInfo(process.pid)) {
|
|
1124
|
+
channelPidfileReserved = false;
|
|
1125
|
+
}
|
|
1126
|
+
return;
|
|
1127
|
+
}
|
|
1128
|
+
const info = channelServicePidfile.readServiceInfo();
|
|
1129
|
+
if (info?.owner === "serve" && info.pid === process.pid && info.servePid === process.pid) {
|
|
1130
|
+
channelServicePidfile.removeServiceInfo();
|
|
1131
|
+
channelPidfileReserved = false;
|
|
1132
|
+
}
|
|
1133
|
+
}, "removeCurrentServePidfile");
|
|
1134
|
+
const reserveChannelServicePidfile = /* @__PURE__ */ __name(() => {
|
|
1135
|
+
if (!opts.channelSelection) return;
|
|
1136
|
+
if (!channelServicePidfile) {
|
|
1137
|
+
throw new Error("Channel service pidfile runtime is not available.");
|
|
1138
|
+
}
|
|
1139
|
+
const channelPidfileNames = channelSelectionNames(opts.channelSelection);
|
|
1140
|
+
const existingChannelService = channelServicePidfile.readServiceInfo();
|
|
1141
|
+
if (existingChannelService) {
|
|
1142
|
+
throw channelServicePidfileConflictError(existingChannelService);
|
|
1143
|
+
}
|
|
1144
|
+
try {
|
|
1145
|
+
writeServeChannelReservation(channelServicePidfile, channelPidfileNames);
|
|
1146
|
+
channelPidfileReserved = true;
|
|
1147
|
+
} catch (err) {
|
|
1148
|
+
if (err && typeof err === "object" && "code" in err) {
|
|
1149
|
+
const code = err.code;
|
|
1150
|
+
if (code === "EEXIST") {
|
|
1151
|
+
const info = channelServicePidfile.readServiceInfo();
|
|
1152
|
+
if (info) {
|
|
1153
|
+
throw channelServicePidfileConflictError(info);
|
|
1154
|
+
}
|
|
1155
|
+
try {
|
|
1156
|
+
writeServeChannelReservation(
|
|
1157
|
+
channelServicePidfile,
|
|
1158
|
+
channelPidfileNames
|
|
1159
|
+
);
|
|
1160
|
+
channelPidfileReserved = true;
|
|
1161
|
+
return;
|
|
1162
|
+
} catch (retryErr) {
|
|
1163
|
+
if (retryErr && typeof retryErr === "object" && "code" in retryErr && retryErr.code === "EEXIST") {
|
|
1164
|
+
throw new Error(
|
|
1165
|
+
"Channel service is already starting. Retry after the current startup finishes."
|
|
1166
|
+
);
|
|
1167
|
+
}
|
|
1168
|
+
throw retryErr;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
throw err;
|
|
1173
|
+
}
|
|
1174
|
+
}, "reserveChannelServicePidfile");
|
|
1039
1175
|
validateRateLimitOptions(opts);
|
|
1040
1176
|
if (!opts.hostname.startsWith("[") && opts.hostname.split(":").length === 2) {
|
|
1041
1177
|
const [host, port] = opts.hostname.split(":");
|
|
@@ -1215,21 +1351,7 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1215
1351
|
const childEnvOverrides = {
|
|
1216
1352
|
QWEN_SERVE_MCP_CLIENT_BUDGET: opts.mcpClientBudget !== void 0 ? String(opts.mcpClientBudget) : void 0,
|
|
1217
1353
|
QWEN_SERVE_MCP_BUDGET_MODE: opts.mcpBudgetMode,
|
|
1218
|
-
|
|
1219
|
-
// ACP child can auto-register chrome-devtools-mcp against this `/cdp`
|
|
1220
|
-
// endpoint. Only meaningful with a fixed `--port`: the override map is frozen
|
|
1221
|
-
// at bridge construction, so an ephemeral `--port 0` (resolved only after
|
|
1222
|
-
// `listen`) can't be threaded here. Leave the port unset in that case so the
|
|
1223
|
-
// child surfaces a clear diagnostic instead of a bogus port "0".
|
|
1224
|
-
QWEN_SERVE_CDP_TUNNEL_OVER_WS: opts.cdpTunnelOverWs ? "1" : void 0,
|
|
1225
|
-
QWEN_SERVE_CDP_TUNNEL_PORT: opts.cdpTunnelOverWs && opts.port > 0 ? String(opts.port) : void 0,
|
|
1226
|
-
// Tell the child whether `/cdp` requires bearer auth. The ACP child can't
|
|
1227
|
-
// inherit QWEN_SERVER_TOKEN (the spawn path scrubs it) and chrome-devtools-
|
|
1228
|
-
// mcp is launched with `--wsEndpoint` only, so it can't authenticate against
|
|
1229
|
-
// an auth-gated `/cdp`. The child uses this flag to skip auto-registering the
|
|
1230
|
-
// browser tools (with a diagnostic) instead of registering tools that can't
|
|
1231
|
-
// connect. See buildCdpTunnelMcpServer in acpAgent.ts.
|
|
1232
|
-
QWEN_SERVE_CDP_TUNNEL_AUTH_REQUIRED: opts.cdpTunnelOverWs && (token || opts.requireAuth) ? "1" : void 0
|
|
1354
|
+
QWEN_SERVE_CDP_TUNNEL_OVER_WS: opts.cdpTunnelOverWs ? "1" : void 0
|
|
1233
1355
|
};
|
|
1234
1356
|
const cliVersionPromise = getCliVersion();
|
|
1235
1357
|
let cliVersion;
|
|
@@ -1273,6 +1395,23 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1273
1395
|
});
|
|
1274
1396
|
void runtimeReady.catch(() => {
|
|
1275
1397
|
});
|
|
1398
|
+
let channelWorker = createDisabledChannelWorkerSupervisor();
|
|
1399
|
+
const getChannelWorkerSnapshot = /* @__PURE__ */ __name(() => channelWorker.snapshot(), "getChannelWorkerSnapshot");
|
|
1400
|
+
const writeChannelWorkerPidfile = /* @__PURE__ */ __name(() => {
|
|
1401
|
+
if (!opts.channelSelection || !channelServicePidfile) return;
|
|
1402
|
+
const snapshot = channelWorker.snapshot();
|
|
1403
|
+
try {
|
|
1404
|
+
channelServicePidfile.writeServeServiceInfo({
|
|
1405
|
+
channels: snapshot.channels,
|
|
1406
|
+
servePid: process.pid,
|
|
1407
|
+
workerPid: snapshot.pid
|
|
1408
|
+
});
|
|
1409
|
+
} catch (err) {
|
|
1410
|
+
daemonLog.warn(
|
|
1411
|
+
`failed to write channel worker pidfile metadata: ${err instanceof Error ? err.message : String(err)}`
|
|
1412
|
+
);
|
|
1413
|
+
}
|
|
1414
|
+
}, "writeChannelWorkerPidfile");
|
|
1276
1415
|
const handleBridge = deps.bridge ?? createLazyBridgeProxy(
|
|
1277
1416
|
() => bridgeRef,
|
|
1278
1417
|
() => runtimeStartupError
|
|
@@ -1492,6 +1631,7 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1492
1631
|
startup,
|
|
1493
1632
|
fsFactory,
|
|
1494
1633
|
daemonLog,
|
|
1634
|
+
getChannelWorkerSnapshot,
|
|
1495
1635
|
workspace: workspaceService,
|
|
1496
1636
|
// Reverse tool channel (#5626): the SAME registry wired into `bridge` above,
|
|
1497
1637
|
// so the WS provider and the child-answering bridge share one sender map.
|
|
@@ -1544,8 +1684,10 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1544
1684
|
runtimeAppForCleanup = runtime.app;
|
|
1545
1685
|
runtimeApp = runtime.app;
|
|
1546
1686
|
bridgeRef = runtime.bridge;
|
|
1547
|
-
|
|
1548
|
-
|
|
1687
|
+
if (!opts.channelSelection) {
|
|
1688
|
+
runtimeStartupSettled = true;
|
|
1689
|
+
markRuntimeReady();
|
|
1690
|
+
}
|
|
1549
1691
|
}
|
|
1550
1692
|
cliVersion ??= await cliVersionPromise;
|
|
1551
1693
|
const bootstrapApp = createBootstrapServeApp({
|
|
@@ -1558,6 +1700,7 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1558
1700
|
sessionShellCommandEnabled,
|
|
1559
1701
|
permissionPolicy,
|
|
1560
1702
|
getRuntimeError: /* @__PURE__ */ __name(() => runtimeStartupError, "getRuntimeError"),
|
|
1703
|
+
getChannelWorkerSnapshot,
|
|
1561
1704
|
onHealthServed: deferRuntimeUntilFirstHealth ? () => startRuntimeAfterHealth?.() : void 0
|
|
1562
1705
|
});
|
|
1563
1706
|
const app = runtimeApp ?? createDelegatingServeApp(bootstrapApp, () => runtimeApp, {
|
|
@@ -1581,6 +1724,7 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1581
1724
|
`Invalid maxConnections: ${opts.maxConnections}. Must be >= 0 (0 / Infinity = unlimited).`
|
|
1582
1725
|
);
|
|
1583
1726
|
}
|
|
1727
|
+
reserveChannelServicePidfile();
|
|
1584
1728
|
return await new Promise((resolve, reject) => {
|
|
1585
1729
|
const server = app.listen(opts.port, listenHostname, () => {
|
|
1586
1730
|
startup.listenerReadyAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -1597,6 +1741,42 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1597
1741
|
const addr = server.address();
|
|
1598
1742
|
actualPort = typeof addr === "object" && addr ? addr.port : opts.port;
|
|
1599
1743
|
const url = `http://${formatHostForUrl(opts.hostname)}:${actualPort}`;
|
|
1744
|
+
try {
|
|
1745
|
+
if (opts.channelSelection) {
|
|
1746
|
+
const createSupervisor = deps.channelWorkerSupervisorFactory ?? channelRuntime?.createChannelWorkerSupervisor;
|
|
1747
|
+
if (!createSupervisor) {
|
|
1748
|
+
throw new Error(
|
|
1749
|
+
"Channel worker supervisor runtime is not available."
|
|
1750
|
+
);
|
|
1751
|
+
}
|
|
1752
|
+
channelWorker = createSupervisor({
|
|
1753
|
+
cliEntryPath: findCliEntryPath(),
|
|
1754
|
+
daemonUrl: formatChannelWorkerDaemonUrl(opts.hostname, actualPort),
|
|
1755
|
+
...token ? { daemonToken: token } : {},
|
|
1756
|
+
workspace: boundWorkspace,
|
|
1757
|
+
selection: opts.channelSelection,
|
|
1758
|
+
onExit: /* @__PURE__ */ __name((snapshot) => {
|
|
1759
|
+
daemonLog.warn(
|
|
1760
|
+
`channel worker exited (state=${snapshot.state}, pid=${snapshot.pid ?? "unknown"}, code=${snapshot.exitCode ?? "null"}, signal=${snapshot.signal ?? "null"}, error=${snapshot.error ?? "none"})`
|
|
1761
|
+
);
|
|
1762
|
+
removeCurrentServePidfile();
|
|
1763
|
+
}, "onExit")
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1766
|
+
} catch (err) {
|
|
1767
|
+
removeCurrentServePidfile();
|
|
1768
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
1769
|
+
server.close((closeErr) => {
|
|
1770
|
+
if (closeErr) {
|
|
1771
|
+
daemonLog.error(
|
|
1772
|
+
"server close after channel worker setup error failed",
|
|
1773
|
+
closeErr
|
|
1774
|
+
);
|
|
1775
|
+
}
|
|
1776
|
+
reject(error);
|
|
1777
|
+
});
|
|
1778
|
+
return;
|
|
1779
|
+
}
|
|
1600
1780
|
writeStdoutLine(
|
|
1601
1781
|
`qwen serve listening on ${url} (mode=${opts.mode}, workspace=${boundWorkspace})`
|
|
1602
1782
|
);
|
|
@@ -1610,6 +1790,11 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1610
1790
|
writeStderrLine(
|
|
1611
1791
|
`qwen serve: bearer auth disabled (loopback default). Set ${QWEN_SERVER_TOKEN_ENV} to enable.`
|
|
1612
1792
|
);
|
|
1793
|
+
if (opts.clientMcpOverWs === true) {
|
|
1794
|
+
writeStderrLine(
|
|
1795
|
+
`qwen serve: client-hosted MCP tools are accepted over the WebSocket without auth. Set ${QWEN_SERVE_CLIENT_MCP_OVER_WS_ENV}=0 to disable.`
|
|
1796
|
+
);
|
|
1797
|
+
}
|
|
1613
1798
|
} else if (opts.requireAuth) {
|
|
1614
1799
|
writeStderrLine(
|
|
1615
1800
|
"qwen serve: --require-auth enabled (bearer token mandatory on every route, including loopback /health)."
|
|
@@ -1664,6 +1849,14 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1664
1849
|
}
|
|
1665
1850
|
}
|
|
1666
1851
|
}, "shutdownBridgeAfterFailedStartup");
|
|
1852
|
+
const stopChannelWorkerAfterFailedStartup = /* @__PURE__ */ __name(async () => {
|
|
1853
|
+
await channelWorker.stop().catch((stopErr) => {
|
|
1854
|
+
daemonLog.error(
|
|
1855
|
+
"channel worker stop after runtime startup error failed",
|
|
1856
|
+
stopErr instanceof Error ? stopErr : null
|
|
1857
|
+
);
|
|
1858
|
+
});
|
|
1859
|
+
}, "stopChannelWorkerAfterFailedStartup");
|
|
1667
1860
|
const failRuntimeStartup = /* @__PURE__ */ __name(async (err, bridgeForCleanup) => {
|
|
1668
1861
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
1669
1862
|
if (runtimeStartupSettled) {
|
|
@@ -1680,9 +1873,34 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1680
1873
|
}
|
|
1681
1874
|
writeStderrLine(`qwen serve: runtime startup failed: ${message}`);
|
|
1682
1875
|
daemonLog.error("runtime startup failed", error);
|
|
1683
|
-
|
|
1876
|
+
await stopChannelWorkerAfterFailedStartup();
|
|
1877
|
+
removeCurrentServePidfile();
|
|
1684
1878
|
await shutdownBridgeAfterFailedStartup(bridgeForCleanup ?? bridgeRef);
|
|
1879
|
+
markRuntimeFailed(error);
|
|
1685
1880
|
}, "failRuntimeStartup");
|
|
1881
|
+
const armRuntimeStartupTimer = /* @__PURE__ */ __name(() => {
|
|
1882
|
+
if (runtimeStartupTimeoutMs <= 0 || runtimeStartupTimer) return;
|
|
1883
|
+
runtimeStartupTimer = setTimeout(() => {
|
|
1884
|
+
void failRuntimeStartup(
|
|
1885
|
+
new Error(
|
|
1886
|
+
`Daemon runtime startup timed out after ${runtimeStartupTimeoutMs}ms.`
|
|
1887
|
+
)
|
|
1888
|
+
);
|
|
1889
|
+
}, runtimeStartupTimeoutMs);
|
|
1890
|
+
runtimeStartupTimer.unref();
|
|
1891
|
+
}, "armRuntimeStartupTimer");
|
|
1892
|
+
const completeRuntimeStartup = /* @__PURE__ */ __name(async () => {
|
|
1893
|
+
if (runtimeStartupSettled) return;
|
|
1894
|
+
if (opts.channelSelection) {
|
|
1895
|
+
await channelWorker.start();
|
|
1896
|
+
if (runtimeStartupSettled) return;
|
|
1897
|
+
writeChannelWorkerPidfile();
|
|
1898
|
+
}
|
|
1899
|
+
if (runtimeStartupSettled) return;
|
|
1900
|
+
runtimeStartupSettled = true;
|
|
1901
|
+
clearRuntimeStartupTimer();
|
|
1902
|
+
markRuntimeReady();
|
|
1903
|
+
}, "completeRuntimeStartup");
|
|
1686
1904
|
const startBridgePreheat = /* @__PURE__ */ __name((bridge) => {
|
|
1687
1905
|
startup.preheat.status = "running";
|
|
1688
1906
|
const preheatStartedAt = performance.now();
|
|
@@ -1705,6 +1923,7 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1705
1923
|
}, "startBridgePreheat");
|
|
1706
1924
|
const startRuntime = /* @__PURE__ */ __name(() => {
|
|
1707
1925
|
if (runtimeStarting) return;
|
|
1926
|
+
armRuntimeStartupTimer();
|
|
1708
1927
|
clearRuntimeStartAfterHealthTimer();
|
|
1709
1928
|
clearRuntimeStartFallbackTimer();
|
|
1710
1929
|
runtimeStarting = buildRuntime().then(async (runtime) => {
|
|
@@ -1727,20 +1946,8 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1727
1946
|
if (shouldPreheat) {
|
|
1728
1947
|
startBridgePreheat(runtime.bridge);
|
|
1729
1948
|
}
|
|
1730
|
-
|
|
1731
|
-
clearRuntimeStartupTimer();
|
|
1732
|
-
markRuntimeReady();
|
|
1949
|
+
await completeRuntimeStartup();
|
|
1733
1950
|
}).catch((err) => failRuntimeStartup(err));
|
|
1734
|
-
if (runtimeStartupTimeoutMs > 0) {
|
|
1735
|
-
runtimeStartupTimer = setTimeout(() => {
|
|
1736
|
-
void failRuntimeStartup(
|
|
1737
|
-
new Error(
|
|
1738
|
-
`Daemon runtime startup timed out after ${runtimeStartupTimeoutMs}ms.`
|
|
1739
|
-
)
|
|
1740
|
-
);
|
|
1741
|
-
}, runtimeStartupTimeoutMs);
|
|
1742
|
-
runtimeStartupTimer.unref();
|
|
1743
|
-
}
|
|
1744
1951
|
}, "startRuntime");
|
|
1745
1952
|
startRuntimeForRequest = startRuntime;
|
|
1746
1953
|
const scheduleRuntimeStartFallback = /* @__PURE__ */ __name(() => {
|
|
@@ -1777,7 +1984,9 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1777
1984
|
if (shuttingDown) {
|
|
1778
1985
|
daemonLog.warn(`received ${signal} during drain \u2014 forcing exit`);
|
|
1779
1986
|
try {
|
|
1987
|
+
channelWorker.killAllSync();
|
|
1780
1988
|
bridgeRef?.killAllSync();
|
|
1989
|
+
removeCurrentServePidfile();
|
|
1781
1990
|
} catch (err) {
|
|
1782
1991
|
daemonLog.error(
|
|
1783
1992
|
"force-kill error",
|
|
@@ -1801,6 +2010,11 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1801
2010
|
process.exit(1);
|
|
1802
2011
|
}
|
|
1803
2012
|
}, "onSignal");
|
|
2013
|
+
const onUncaughtExceptionMonitor = /* @__PURE__ */ __name(() => {
|
|
2014
|
+
if (process.listenerCount("uncaughtException") === 0) {
|
|
2015
|
+
removeCurrentServePidfile();
|
|
2016
|
+
}
|
|
2017
|
+
}, "onUncaughtExceptionMonitor");
|
|
1804
2018
|
const handle = {
|
|
1805
2019
|
server,
|
|
1806
2020
|
url,
|
|
@@ -1822,6 +2036,10 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1822
2036
|
settled = true;
|
|
1823
2037
|
process.removeListener("SIGINT", onSignal);
|
|
1824
2038
|
process.removeListener("SIGTERM", onSignal);
|
|
2039
|
+
process.removeListener(
|
|
2040
|
+
"uncaughtExceptionMonitor",
|
|
2041
|
+
onUncaughtExceptionMonitor
|
|
2042
|
+
);
|
|
1825
2043
|
void (coreRuntimePromise ? coreRuntimePromise.then((core) => core.shutdownTelemetry()) : Promise.resolve()).catch((telemetryErr) => {
|
|
1826
2044
|
writeStderrLine(
|
|
1827
2045
|
`qwen serve: telemetry shutdown error: ${telemetryErr instanceof Error ? telemetryErr.message : String(telemetryErr)}`
|
|
@@ -1869,6 +2087,13 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1869
2087
|
rl.setDraining(true);
|
|
1870
2088
|
rl.dispose();
|
|
1871
2089
|
}
|
|
2090
|
+
await channelWorker.stop().catch((err) => {
|
|
2091
|
+
daemonLog.error(
|
|
2092
|
+
"channel worker stop error",
|
|
2093
|
+
err instanceof Error ? err : null
|
|
2094
|
+
);
|
|
2095
|
+
});
|
|
2096
|
+
removeCurrentServePidfile();
|
|
1872
2097
|
const bridgeForShutdown = bridgeRef;
|
|
1873
2098
|
if (bridgeForShutdown) {
|
|
1874
2099
|
await bridgeForShutdown.shutdown().catch((err) => {
|
|
@@ -1908,6 +2133,7 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1908
2133
|
};
|
|
1909
2134
|
process.on("SIGINT", onSignal);
|
|
1910
2135
|
process.on("SIGTERM", onSignal);
|
|
2136
|
+
process.on("uncaughtExceptionMonitor", onUncaughtExceptionMonitor);
|
|
1911
2137
|
server.removeAllListeners("error");
|
|
1912
2138
|
server.on("error", (err) => {
|
|
1913
2139
|
daemonLog.error("server error", err instanceof Error ? err : null);
|
|
@@ -1918,6 +2144,12 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1918
2144
|
if (shouldPreheat) {
|
|
1919
2145
|
startBridgePreheat(bridgeRef);
|
|
1920
2146
|
}
|
|
2147
|
+
if (opts.channelSelection && !runtimeStartupSettled) {
|
|
2148
|
+
armRuntimeStartupTimer();
|
|
2149
|
+
runtimeStarting = completeRuntimeStartup().catch(
|
|
2150
|
+
(err) => failRuntimeStartup(err, bridgeRef)
|
|
2151
|
+
);
|
|
2152
|
+
}
|
|
1921
2153
|
} else if (deferRuntimeUntilFirstHealth) {
|
|
1922
2154
|
scheduleRuntimeStartFallback();
|
|
1923
2155
|
} else {
|
|
@@ -1941,7 +2173,10 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
1941
2173
|
);
|
|
1942
2174
|
}
|
|
1943
2175
|
});
|
|
1944
|
-
server.once("error",
|
|
2176
|
+
server.once("error", (err) => {
|
|
2177
|
+
removeCurrentServePidfile();
|
|
2178
|
+
reject(err);
|
|
2179
|
+
});
|
|
1945
2180
|
});
|
|
1946
2181
|
}
|
|
1947
2182
|
__name(runQwenServe, "runQwenServe");
|
|
@@ -1949,6 +2184,7 @@ export {
|
|
|
1949
2184
|
InvalidPolicyConfigError,
|
|
1950
2185
|
createLazyBridgeProxy,
|
|
1951
2186
|
extractContextFilename,
|
|
2187
|
+
formatChannelWorkerDaemonUrl,
|
|
1952
2188
|
resolveRuntimeStartupTimeoutMs,
|
|
1953
2189
|
runQwenServe,
|
|
1954
2190
|
validatePolicyConfig,
|
|
@@ -6,36 +6,38 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
FILE_HISTORY_DIR,
|
|
8
8
|
getSubagentsRootDir
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-K5PGHDBN.js";
|
|
9
|
+
} from "./chunk-BFG6OZN7.js";
|
|
11
10
|
import "./chunk-5P5XGNYH.js";
|
|
11
|
+
import "./chunk-K5PGHDBN.js";
|
|
12
12
|
import "./chunk-SKAZWEV5.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-QOMAHFYI.js";
|
|
14
|
+
import "./chunk-G7OQ3RFJ.js";
|
|
15
|
+
import "./chunk-LKWAVAB5.js";
|
|
16
|
+
import "./chunk-MEQWZGK5.js";
|
|
17
|
+
import "./chunk-UANCYOOQ.js";
|
|
18
18
|
import "./chunk-2MPVVENX.js";
|
|
19
19
|
import "./chunk-ZTQ26VBE.js";
|
|
20
20
|
import "./chunk-SJBIFVD2.js";
|
|
21
21
|
import "./chunk-MLZQVCF3.js";
|
|
22
|
+
import "./chunk-S5EQPDTM.js";
|
|
22
23
|
import "./chunk-LQ7TMOCE.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-E5A7LHNN.js";
|
|
25
|
+
import "./chunk-GO6LNQXT.js";
|
|
24
26
|
import "./chunk-B236XPGF.js";
|
|
25
27
|
import "./chunk-YXK4GPYO.js";
|
|
26
28
|
import "./chunk-TOAUDIS7.js";
|
|
27
29
|
import "./chunk-NPQWQYU6.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-HJDF3ZVU.js";
|
|
31
|
+
import "./chunk-E6US47KI.js";
|
|
30
32
|
import "./chunk-UWCTAVOD.js";
|
|
31
33
|
import "./chunk-OFEVLU4C.js";
|
|
32
34
|
import "./chunk-OMX7CUOE.js";
|
|
33
35
|
import "./chunk-MOUXUCXQ.js";
|
|
34
36
|
import "./chunk-BZHLWC6T.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-UQFP2FEF.js";
|
|
38
|
+
import "./chunk-4VZH35PN.js";
|
|
39
|
+
import "./chunk-TENOUWY2.js";
|
|
40
|
+
import "./chunk-GLPV75ES.js";
|
|
39
41
|
import "./chunk-22IFUCVR.js";
|
|
40
42
|
import "./chunk-T42ACHFI.js";
|
|
41
43
|
import "./chunk-YTFBURQD.js";
|
|
@@ -46,7 +48,7 @@ import "./chunk-55ZMG67I.js";
|
|
|
46
48
|
import "./chunk-H6BD2ELD.js";
|
|
47
49
|
import "./chunk-5IFG2VC4.js";
|
|
48
50
|
import "./chunk-64WXLC72.js";
|
|
49
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-D5KISTLW.js";
|
|
50
52
|
import {
|
|
51
53
|
Storage,
|
|
52
54
|
createDebugLogger
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
|
-
LEADER_NAME
|
|
4
|
+
LEADER_NAME
|
|
5
|
+
} from "./chunk-E5A7LHNN.js";
|
|
6
|
+
import {
|
|
5
7
|
getAgentName,
|
|
6
8
|
isTeammate
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GO6LNQXT.js";
|
|
8
10
|
import {
|
|
9
11
|
BaseDeclarativeTool,
|
|
10
12
|
BaseToolInvocation,
|
|
11
13
|
ToolDisplayNames,
|
|
12
14
|
ToolNames
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4VZH35PN.js";
|
|
14
16
|
import "./chunk-AVQDCKNF.js";
|
|
15
17
|
import "./chunk-Z2Z3GUXZ.js";
|
|
16
18
|
import {
|