@qwen-code/qwen-code 0.21.6 → 0.21.7-nightly.20260808.4ec0371e6
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 +50 -31
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +41 -3
- package/bundled/qc-helper/docs/features/channels/feishu.md +13 -2
- package/bundled/qc-helper/docs/features/channels/github.md +13 -11
- package/bundled/qc-helper/docs/features/channels/gitlab.md +13 -11
- package/bundled/qc-helper/docs/features/channels/overview.md +49 -31
- package/bundled/qc-helper/docs/features/channels/plugins.md +2 -2
- package/bundled/qc-helper/docs/features/channels/qqbot.md +4 -2
- package/bundled/qc-helper/docs/features/channels/telegram.md +4 -2
- package/bundled/qc-helper/docs/features/channels/wecom.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +31 -0
- package/bundled/qc-helper/docs/features/hooks.md +2 -0
- package/bundled/qc-helper/docs/qwen-serve.md +4 -1
- package/bundled/review/SKILL.md +52 -16
- package/chunks/{MaxSizedBox-2HFKP4LI.js → MaxSizedBox-COZBVNCI.js} +42 -41
- package/chunks/{StandaloneSessionPicker-RBV72M5N.js → StandaloneSessionPicker-3OF2FS6S.js} +59 -57
- package/chunks/{acpAgent-WO6JFCVQ.js → acpAgent-3JCJ6KWG.js} +236 -185
- package/chunks/{agent-AHGLYNZ4.js → agent-DBSC47CD.js} +39 -38
- package/chunks/{agent-headless-NTXKKGRO.js → agent-headless-ZJHZ7I3S.js} +39 -38
- package/chunks/{anthropicContentGenerator-3CAHEZBM.js → anthropicContentGenerator-SSFE2753.js} +15 -15
- package/chunks/{artifact-tool-RROCCJDA.js → artifact-tool-N652YE4L.js} +2 -2
- package/chunks/{askUserQuestion-2EPPBPUZ.js → askUserQuestion-ONW74PKJ.js} +2 -2
- package/chunks/{bridge-RPAU64CA.js → bridge-NFBYT4ZI.js} +43 -42
- package/chunks/{channel-management-service-IGEUOVRT.js → channel-management-service-LXSJXQGM.js} +19 -10
- package/chunks/{channel-settings-store-ON64MF7G.js → channel-settings-store-LABKDKSI.js} +46 -45
- package/chunks/{channel-worker-group-JWQK224X.js → channel-worker-group-MTW2AGT3.js} +4 -4
- package/chunks/{channel-worker-manager-77E3OXRQ.js → channel-worker-manager-UU6PTQSI.js} +4 -4
- package/chunks/{channel-worker-supervisor-62YWUGP2.js → channel-worker-supervisor-5SRD24FG.js} +3 -3
- package/chunks/{chunk-XC656O42.js → chunk-22NBYCPD.js} +3 -3
- package/chunks/{chunk-K2B3X3E7.js → chunk-26ISE5EG.js} +4 -4
- package/chunks/{chunk-Z7JILXGX.js → chunk-2UUMVNYT.js} +3 -3
- package/chunks/{chunk-ACZRB7AD.js → chunk-3ARO4N5G.js} +3 -3
- package/chunks/{chunk-CJ5WLD5Y.js → chunk-3HS6Y4UA.js} +96 -22
- package/chunks/{chunk-MBEMTXQT.js → chunk-3K7FH2KQ.js} +1 -32
- package/chunks/{chunk-QYPT3QUD.js → chunk-3ULCB3NE.js} +3 -3
- package/chunks/{chunk-IMOQO6YL.js → chunk-4Q6N3SNL.js} +1 -1
- package/chunks/{chunk-3UOLYNTF.js → chunk-4QJJHIZ5.js} +23 -14
- package/chunks/{chunk-VGFPFM4U.js → chunk-5PGKKSO6.js} +42 -16
- package/chunks/{chunk-NGJOAKJY.js → chunk-5YT3Y33M.js} +3 -3
- package/chunks/{chunk-T4JSA7KU.js → chunk-64YLXLMY.js} +3 -3
- package/chunks/{chunk-5L6CQ4ZU.js → chunk-6M26GBKX.js} +2 -2
- package/chunks/{chunk-ZPPP6VCL.js → chunk-6ZRFAKXK.js} +1 -1
- package/chunks/{chunk-OP2OHZ7K.js → chunk-764F335K.js} +18 -9
- package/chunks/{chunk-PPUOYL77.js → chunk-77WOUGCA.js} +53 -22
- package/chunks/{chunk-33FNCQSY.js → chunk-7MH4J33A.js} +2 -2
- package/chunks/{chunk-S7CV4KO6.js → chunk-AB4A73VL.js} +2 -2
- package/chunks/{chunk-O7V7N4G7.js → chunk-ACHMWGC5.js} +198 -35
- package/chunks/{chunk-NKSF7HYF.js → chunk-AG3P2RES.js} +1 -1
- package/chunks/{chunk-6PEXNQTX.js → chunk-ALFTV7GA.js} +26 -2
- package/chunks/{chunk-JELIWHXD.js → chunk-AOHJKPKL.js} +1 -1
- package/chunks/{chunk-XA4TMLFN.js → chunk-APMRLB2H.js} +580 -394
- package/chunks/{chunk-75QMRMO7.js → chunk-APNNM3JC.js} +3 -3
- package/chunks/{chunk-GLNBDYUX.js → chunk-AXMWHKXA.js} +6 -2
- package/chunks/{chunk-VNQCPBC2.js → chunk-B23P3YWE.js} +3 -3
- package/chunks/{chunk-H36SETQS.js → chunk-B2GJNDTV.js} +1 -1
- package/chunks/{chunk-Q5RM32DR.js → chunk-BCMJPTXV.js} +1 -1
- package/chunks/{chunk-A4VTILZT.js → chunk-BFSQBXHV.js} +714 -398
- package/chunks/{chunk-QMBEW7EW.js → chunk-BGG4MBYD.js} +2 -2
- package/chunks/{chunk-SLSWFHDF.js → chunk-BJKFFPX2.js} +4 -4
- package/chunks/{chunk-N2GJU6KI.js → chunk-BN3OROB3.js} +12 -12
- package/chunks/chunk-CE5UCTKO.js +3508 -0
- package/chunks/{chunk-2UISUFHQ.js → chunk-CJXIIILK.js} +3 -3
- package/chunks/{chunk-WK4TJUEA.js → chunk-CKASRHZI.js} +1 -1
- package/chunks/chunk-CPG6P4GG.js +82 -0
- package/chunks/{chunk-KKN2IE7Q.js → chunk-CTJLZLB5.js} +1 -1
- package/chunks/{chunk-DIEFUBV6.js → chunk-DIWZNWZT.js} +205 -35
- package/chunks/{chunk-CA4UIDFU.js → chunk-DPH3MUAP.js} +1 -1
- package/chunks/{chunk-4LKVQFHM.js → chunk-DREZZAZM.js} +2 -2
- package/chunks/{chunk-2DNKEBXY.js → chunk-EI3HZX6C.js} +1 -1
- package/chunks/{chunk-U25CMJYY.js → chunk-EKPKKXY2.js} +1 -1
- package/chunks/{chunk-432XCUHF.js → chunk-EQL65XGA.js} +1 -1
- package/chunks/{chunk-TYERNYH4.js → chunk-EUNWC2VS.js} +2 -2
- package/chunks/{chunk-4JH77A2U.js → chunk-EZ53KMUN.js} +1 -1
- package/chunks/{chunk-HY25ULVN.js → chunk-F3LPXDJP.js} +157 -56
- package/chunks/{chunk-D3UEZIQH.js → chunk-FJ6YHWHZ.js} +2 -2
- package/chunks/{chunk-UH7Z7Y45.js → chunk-FOGU3LJX.js} +1 -1
- package/chunks/{chunk-E4WHKETF.js → chunk-FVKHVJZQ.js} +2 -49
- package/chunks/{chunk-YZQTA3ID.js → chunk-GDXET5XU.js} +31 -3396
- package/chunks/{chunk-A5YZ3FA2.js → chunk-GM463R2B.js} +1 -1
- package/chunks/{chunk-MOHAWIAW.js → chunk-GNPNYXJB.js} +2 -2
- package/chunks/{chunk-SUKEUUAA.js → chunk-GUFY6D3E.js} +1 -1
- package/chunks/{chunk-FZFP7RZI.js → chunk-H2352CX2.js} +3 -3
- package/chunks/{chunk-GWRHVJY2.js → chunk-HKCYGZZ4.js} +22 -22
- package/chunks/{chunk-3PRJYMXC.js → chunk-HUWENAHO.js} +1 -1
- package/chunks/{chunk-G5NNWEYE.js → chunk-HY2INPTA.js} +4 -4
- package/chunks/{chunk-WVAESIM6.js → chunk-IA7TGCN2.js} +4 -4
- package/chunks/{chunk-HU5TUALO.js → chunk-IIJEYBNH.js} +3 -3
- package/chunks/{chunk-XM2O73NC.js → chunk-IMK3SJ43.js} +5703 -4343
- package/chunks/{chunk-4S4OEQ6U.js → chunk-J6SZID63.js} +2 -2
- package/chunks/{chunk-OWSW7EYP.js → chunk-JACAHYEN.js} +7 -7
- package/chunks/{chunk-R5RBXLNC.js → chunk-JRIJOZXO.js} +5 -5
- package/chunks/{chunk-SQOMTWQT.js → chunk-JSJTZ6GO.js} +4 -4
- package/chunks/{chunk-VWOVHOTT.js → chunk-KJZ26VBX.js} +1 -1
- package/chunks/{chunk-BFHXDAR7.js → chunk-KKBPOU75.js} +1 -1
- package/chunks/{chunk-TGGEZINK.js → chunk-KKRGVSHC.js} +7 -7
- package/chunks/{chunk-RK2EE3T7.js → chunk-KPMB4JEZ.js} +4 -4
- package/chunks/{chunk-MKVZE4ZJ.js → chunk-KTJFU7RT.js} +3 -2
- package/chunks/{chunk-MGSSJT27.js → chunk-L4N6TIP7.js} +5 -3
- package/chunks/{chunk-U4AF3QLU.js → chunk-L4OW63GW.js} +8 -8
- package/chunks/{chunk-C4CBJQKY.js → chunk-LDUGDB5H.js} +1 -1
- package/chunks/{chunk-W5DXUTXD.js → chunk-LDY4J4G6.js} +8 -8
- package/chunks/{chunk-GK2H5GRC.js → chunk-LMEIS6WW.js} +16 -6
- package/chunks/{chunk-6O5DVH27.js → chunk-M6HMMKVG.js} +1 -1
- package/chunks/{chunk-TOGZTG4X.js → chunk-MIA37QO3.js} +2 -2
- package/chunks/{chunk-536SWZTA.js → chunk-MV7VUCIG.js} +4 -4
- package/chunks/{chunk-T5U6IM4C.js → chunk-MVUQRLOH.js} +3 -3
- package/chunks/{chunk-GLWP3FDB.js → chunk-MZSJ43WV.js} +31 -2
- package/chunks/{chunk-UGTWD35F.js → chunk-NLREQJFK.js} +1 -1
- package/chunks/{chunk-RFUHDCNF.js → chunk-O7VQ3F22.js} +1 -1
- package/chunks/{chunk-3RXUYQJI.js → chunk-OIVKILPI.js} +49 -0
- package/chunks/{chunk-LBWNSLJK.js → chunk-ONSZH6VM.js} +2 -2
- package/chunks/{chunk-4WTAQEHV.js → chunk-OQTXYMKW.js} +3 -3
- package/chunks/{chunk-DYA25Y7U.js → chunk-OWMAZHIX.js} +1 -1
- package/chunks/{chunk-LAAFLUQV.js → chunk-P74TZRXD.js} +2 -2
- package/chunks/{chunk-BOGOR4HB.js → chunk-P7HUJDBZ.js} +7 -7
- package/chunks/chunk-PJRW65JO.js +107 -0
- package/chunks/{chunk-D7D7RXIJ.js → chunk-PYQADEFD.js} +6 -1
- package/chunks/{chunk-WO2B5E5B.js → chunk-Q3JQ7OSU.js} +1 -1
- package/chunks/{chunk-3LZKY4V4.js → chunk-QKJT5K4Q.js} +5 -5
- package/chunks/{chunk-OXX3FG2N.js → chunk-R2KZWK5Z.js} +3 -3
- package/chunks/{chunk-QZKYZCN3.js → chunk-REHWPCG2.js} +3 -3
- package/chunks/{chunk-2POQWYM6.js → chunk-RFA6VDCR.js} +3 -3
- package/chunks/{chunk-DIT4V3XH.js → chunk-RGTB44BO.js} +1 -1
- package/chunks/{chunk-SQC6K5HI.js → chunk-RPWVIXDB.js} +19 -2
- package/chunks/{chunk-ODPXHGLL.js → chunk-RZMGG3HP.js} +2 -2
- package/chunks/{chunk-2AGOQ7QO.js → chunk-S6HYI3MF.js} +118 -6
- package/chunks/chunk-SAH4BD2J.js +92 -0
- package/chunks/{chunk-JE44IPH6.js → chunk-SDUDZNF4.js} +2 -2
- package/chunks/{chunk-YAVY33G4.js → chunk-SEZ556DZ.js} +1 -1
- package/chunks/chunk-SOORFWKY.js +155 -0
- package/chunks/{chunk-KHUA3NQV.js → chunk-TAOSTUHI.js} +2 -2
- package/chunks/{chunk-VSALQLT7.js → chunk-TSYIQDG7.js} +1 -1
- package/chunks/{chunk-ULPQQSDN.js → chunk-TX3KSSDN.js} +3 -3
- package/chunks/{chunk-KVUBYJDM.js → chunk-TZEZYNYD.js} +1 -1
- package/chunks/{chunk-24ER7UV4.js → chunk-UFALT4LK.js} +1 -1
- package/chunks/{chunk-GESMMPAK.js → chunk-UKAYEQDU.js} +91 -63
- package/chunks/{chunk-XC2VAFVZ.js → chunk-UVX4Y6IN.js} +1 -1
- package/chunks/chunk-VDS2WYM5.js +244 -0
- package/chunks/{chunk-DVBEGGLG.js → chunk-VLFX3L3X.js} +10 -9
- package/chunks/{chunk-WNU7TZTO.js → chunk-VT3VNFVW.js} +3 -3
- package/chunks/{chunk-6WBWIPBF.js → chunk-WAUGQKUU.js} +4 -64
- package/chunks/{chunk-URN76TKR.js → chunk-WCG5O7IP.js} +2 -2
- package/chunks/{chunk-PX5DNLSA.js → chunk-XCG76UE6.js} +18 -10
- package/chunks/{chunk-TSERKWCX.js → chunk-XCWO3SMQ.js} +3 -3
- package/chunks/{chunk-5MJGUQU5.js → chunk-XIDHBXUI.js} +3 -3
- package/chunks/{chunk-3LGZEYOF.js → chunk-YHEEE624.js} +2 -2
- package/chunks/{chunk-SKNE3KQC.js → chunk-Z5ZAWED3.js} +19 -10
- package/chunks/{chunk-YMBOEAF4.js → chunk-Z6W3XDLN.js} +1 -1
- package/chunks/{chunk-EXCEQD22.js → chunk-ZKUJ4AO7.js} +4 -4
- package/chunks/{chunk-RHTTKJTP.js → chunk-ZQGHESAS.js} +1 -1
- package/chunks/{chunk-WUC6ZFXO.js → chunk-ZWBUH5UP.js} +1 -1
- package/chunks/{computer-use-5HXJ2P4X.js → computer-use-QLJ27OCZ.js} +39 -38
- package/chunks/{config-utils-VXD4SPVR.js → config-utils-KIEXWA4F.js} +4 -4
- package/chunks/{contextCommand-7BEHRX2H.js → contextCommand-JDTOJRBO.js} +41 -40
- package/chunks/{core-runtime-U4VJ5TIV.js → core-runtime-MZIAVYQC.js} +43 -42
- package/chunks/{create-sub-session-6EWLAZD5.js → create-sub-session-QIDZUOPU.js} +2 -2
- package/chunks/{create-sub-session-QZNQY332.js → create-sub-session-YBBCNSHE.js} +39 -38
- package/chunks/{cron-create-CCRIULJE.js → cron-create-VONA5JYY.js} +4 -4
- package/chunks/{cron-delete-FCFW6BGP.js → cron-delete-5JXSP2MI.js} +4 -4
- package/chunks/{cron-list-QDBVCHRF.js → cron-list-KE4F2CIR.js} +4 -4
- package/chunks/{daemon-YI5RY62O.js → daemon-SCTQMM7Z.js} +50 -2
- package/chunks/{daemon-status-provider-UJUGTDTL.js → daemon-status-provider-BZ7RD4ZJ.js} +47 -46
- package/chunks/{daemon-trust-policy-ZHDD5VYQ.js → daemon-trust-policy-2E4C3M7S.js} +45 -44
- package/chunks/{daemon-trust-policy-monitor-5SHYBDGA.js → daemon-trust-policy-monitor-UYLFH6RW.js} +45 -44
- package/chunks/{deferred-core-runtime-QWAEBTR5.js → deferred-core-runtime-6XZYMJZB.js} +39 -38
- package/chunks/{display-image-GUJA352B.js → display-image-NQRSIBXM.js} +4 -4
- package/chunks/{dist-SFQ34F4M.js → dist-26RK5XZO.js} +1 -1
- package/chunks/{dist-DPPHJAVL.js → dist-BATY7GI4.js} +187 -6
- package/chunks/{dist-A7H2KKUC.js → dist-HIACTZEK.js} +332 -113
- package/chunks/{dist-3BMEUGTG.js → dist-IRL7WA5Z.js} +1 -1
- package/chunks/{dist-HVBMEYWK.js → dist-KVISB2O2.js} +1 -1
- package/chunks/{dist-KS4O2NKE.js → dist-MBF3I5MX.js} +14 -8
- package/chunks/{dist-7JGAAQSC.js → dist-RCH3I7SS.js} +2 -2
- package/chunks/{dist-C5U4LJKW.js → dist-TUSWNE2I.js} +5 -4
- package/chunks/{earlyInputCapture-5BMSGKOI.js → earlyInputCapture-LATQCGDC.js} +40 -39
- package/chunks/{edit-IVQQVYYK.js → edit-72DP57CD.js} +39 -38
- package/chunks/{enter-worktree-P3DF2N6O.js → enter-worktree-B4FY2ZPP.js} +39 -38
- package/chunks/{enterPlanMode-KKTDVLAD.js → enterPlanMode-TQBWGCPL.js} +39 -38
- package/chunks/{environment-W5TRDM3G.js → environment-MOGZGZDS.js} +42 -41
- package/chunks/{errors-GJJB36IG.js → errors-PGON5GH7.js} +41 -40
- package/chunks/{exit-worktree-LV5RLOCU.js → exit-worktree-EYUD4YP2.js} +39 -38
- package/chunks/{exitPlanMode-TUGOB2LL.js → exitPlanMode-4Q7BSQXR.js} +39 -38
- package/chunks/{fast-path-2FU23PAQ.js → fast-path-WI7D5MER.js} +23 -3
- package/chunks/{fast-path-settings-WQJU2LAT.js → fast-path-settings-YBRL24DB.js} +2 -2
- package/chunks/{gemini-KDULDQPP.js → gemini-ZXURGM6Y.js} +87 -82
- package/chunks/{geminiContentGenerator-LOCFHNVA.js → geminiContentGenerator-EOODO75Y.js} +6 -6
- package/chunks/{glob-Z4NQFKWS.js → glob-QNRIUOS6.js} +39 -38
- package/chunks/{goal-tools-3AZKX5WQ.js → goal-tools-QSYW65HV.js} +3 -3
- package/chunks/{grep-Z67Z7EN6.js → grep-56MTW67B.js} +39 -38
- package/chunks/{handleAutoUpdate-DFUZE6I6.js → handleAutoUpdate-XGFIPVT4.js} +43 -42
- package/chunks/{i18n-R4FMZ7N2.js → i18n-RZB35L4B.js} +40 -39
- package/chunks/{image-gen-4CQJPQP5.js → image-gen-OE2EEKN3.js} +9 -9
- package/chunks/{initializer-DK672ZVE.js → initializer-YPVMTMKD.js} +46 -45
- package/chunks/{installationInfo-PO4Z3ES7.js → installationInfo-ZTMTMYNW.js} +40 -39
- package/chunks/{keychain-token-storage-7BT4TQ2A.js → keychain-token-storage-TVAMTNP7.js} +2 -2
- package/chunks/{list-QXQF6C53.js → list-NIW3WID5.js} +48 -47
- package/chunks/{list-agents-GC4BRET7.js → list-agents-Z4WABFDZ.js} +2 -2
- package/chunks/{loadedSettingsAdapter-4D7GUGW6.js → loadedSettingsAdapter-VSLILTOZ.js} +45 -44
- package/chunks/{loggingContentGenerator-2P3MNACM.js → loggingContentGenerator-KFZYVAGV.js} +17 -17
- package/chunks/{loop-wakeup-SQQSBMEY.js → loop-wakeup-UZ5RL5Y2.js} +5 -5
- package/chunks/{ls-63CC3NNX.js → ls-TVHDGIES.js} +4 -4
- package/chunks/{lsp-P6NVJVNT.js → lsp-CVN6OQPI.js} +2 -2
- package/chunks/{managed-npm-update-LWVJQTWO.js → managed-npm-update-WHTA2K5V.js} +40 -39
- package/chunks/{mcp-GHETAR6V.js → mcp-7KGK3CS3.js} +45 -44
- package/chunks/{monitor-4T7W4M6Q.js → monitor-FDWEJQWP.js} +39 -38
- package/chunks/nonInteractiveCli-2MVJ6TCS.js +155 -0
- package/chunks/{notebook-edit-OC2V7U5D.js → notebook-edit-ZUVK2XWE.js} +47 -38
- package/chunks/{openaiContentGenerator-RAJUFWQY.js → openaiContentGenerator-TNLWOPH5.js} +28 -21
- package/chunks/{pidfile-HVPYVRLS.js → pidfile-BB6SKPH2.js} +40 -39
- package/chunks/{process-registry-2CHQBXH5.js → process-registry-PMJOA5CO.js} +15 -0
- package/chunks/{processUtils-VIQ4JHVX.js → processUtils-WKHJOPDH.js} +2 -2
- package/chunks/{qwenContentGenerator-2QLCUFNZ.js → qwenContentGenerator-FZS2DYF7.js} +48 -46
- package/chunks/{qwenOAuth2-J2X3EN43.js → qwenOAuth2-UYMYRXBB.js} +9 -9
- package/chunks/{read-file-ZNAN2B26.js → read-file-FMTE6LPA.js} +10 -10
- package/chunks/{read-mcp-resource-RTSSEER5.js → read-mcp-resource-PZ4ZF6YL.js} +2 -2
- package/chunks/{record-artifact-E6AWQU2Z.js → record-artifact-P4HFMS7X.js} +3 -3
- package/chunks/{resumeHistoryUtils-RCY7AL5Y.js → resumeHistoryUtils-Z34RCZFF.js} +45 -43
- package/chunks/{ripGrep-C3KMLZM5.js → ripGrep-DUIYUZGM.js} +39 -38
- package/chunks/{run-qwen-serve-3JN75CIQ.js → run-qwen-serve-KOHHR3F4.js} +145 -62
- package/chunks/{runtime-VUA4WQYD.js → runtime-K4NTZSAU.js} +50 -49
- package/chunks/{scheduler-Z4IBXCOY.js → scheduler-6G6AMURS.js} +39 -38
- package/chunks/{sdk-exporters-http-IL2346MJ.js → sdk-exporters-http-KHAB5JSD.js} +2 -2
- package/chunks/{sdk-impl-SYKGVWOZ.js → sdk-impl-KD7FSTC3.js} +2 -2
- package/chunks/{send-message-TL6FIMMN.js → send-message-CAMSLG2L.js} +6 -5
- package/chunks/{serve-67T3P7XI.js → serve-NMG2TM5K.js} +46 -45
- package/chunks/{server-46ZO2CLV.js → server-FS7KDELS.js} +679 -360
- package/chunks/{session-B4IFAFC4.js → session-XZADUVKJ.js} +82 -81
- package/chunks/{settings-AI2BTBOZ.js → settings-G75R6FOA.js} +44 -43
- package/chunks/{shell-BKII3B6E.js → shell-3D3PMQHE.js} +39 -38
- package/chunks/{skill-6CFOWVGA.js → skill-TSEYMVQ2.js} +14 -14
- package/chunks/{skill-settings-6BFQWMW4.js → skill-settings-HJC2CPBJ.js} +44 -43
- package/chunks/{spawnChannel-FJXW35U7.js → spawnChannel-YWCN74G5.js} +41 -40
- package/chunks/{standalone-update-WVINHRNS.js → standalone-update-HLYOLX6V.js} +41 -40
- package/chunks/{startInteractiveUI-YE57CJ57.js → startInteractiveUI-ROUIQ5KU.js} +486 -187
- package/chunks/{syntheticOutput-BN7E626U.js → syntheticOutput-PEBJQYJV.js} +3 -3
- package/chunks/{task-create-Q727MXHJ.js → task-create-5NWCQSJF.js} +10 -9
- package/chunks/{task-list-G6KPQ5JT.js → task-list-53265TRZ.js} +5 -5
- package/chunks/{task-stop-TNXRNAL2.js → task-stop-FPCOIRYX.js} +2 -2
- package/chunks/{task-update-YB7PXO4R.js → task-update-5HN577LS.js} +10 -9
- package/chunks/{team-create-GNC7NFY6.js → team-create-OTP5SSB2.js} +39 -38
- package/chunks/{team-delete-GDO7H2T4.js → team-delete-MMQB4OSC.js} +5 -5
- package/chunks/{team-plan-approval-ECALJLIO.js → team-plan-approval-TQX5TMXU.js} +39 -38
- package/chunks/{terminal-image-renderer-II74TFVW.js → terminal-image-renderer-KF3GKNWW.js} +45 -39
- package/chunks/{theme-manager-2MGEDD22.js → theme-manager-XVWAAGAM.js} +40 -39
- package/chunks/{todoWrite-MHWHO5UO.js → todoWrite-JGV6VLOX.js} +4 -4
- package/chunks/{tool-search-S6LRRACA.js → tool-search-7N4D4O56.js} +14 -13
- package/chunks/{total-session-admission-7WVAWQPU.js → total-session-admission-ZQ4VKIRW.js} +43 -42
- package/chunks/{trustedFolders-NFS4KHO4.js → trustedFolders-4XYFPWVV.js} +40 -39
- package/chunks/{update-relaunch-Q5HLZ6UW.js → update-relaunch-L4GSBLUU.js} +5 -5
- package/chunks/{updateCheck-UOVZSTP7.js → updateCheck-PCUTVRFE.js} +42 -41
- package/chunks/{useAutoAcceptIndicator-PC6MOJCO.js → useAutoAcceptIndicator-WMXY7MND.js} +47 -46
- package/chunks/{validateNonInterActiveAuth-YMQP3ZM7.js → validateNonInterActiveAuth-5S3U2D56.js} +78 -77
- package/chunks/{version-T4AQFZJH.js → version-P57IQU2T.js} +1 -1
- package/chunks/{web-fetch-JQCJHEEX.js → web-fetch-5ZLLLCDD.js} +13 -13
- package/chunks/{web-search-QGZ2KY4G.js → web-search-NELKANTW.js} +10 -10
- package/chunks/web-shell-static-O73YPVVC.js +33 -0
- package/chunks/{workflow-YIT27YWZ.js → workflow-RXKBF3LO.js} +42 -40
- package/chunks/{workspace-providers-status-FIDZQ2PL.js → workspace-providers-status-HAEMNAWC.js} +48 -47
- package/chunks/{workspace-registration-store-RCSPE4DU.js → workspace-registration-store-U3U3YM6V.js} +1 -1
- package/chunks/{workspace-registry-5PEUCY6E.js → workspace-registry-ZFP33GVB.js} +43 -42
- package/chunks/{workspace-service-LANDVPL7.js → workspace-service-QMISJBMA.js} +50 -49
- package/chunks/{workspace-skills-status-2IQVJNIN.js → workspace-skills-status-K7EOUGXL.js} +46 -45
- package/chunks/{workspace-trust-reconciler-CZPZZCZC.js → workspace-trust-reconciler-BFPKULDZ.js} +50 -49
- package/chunks/{write-file-G5VNGCOG.js → write-file-2F76RRFE.js} +39 -38
- package/chunks/{zoom-image-6RBLD7X6.js → zoom-image-DPR22XWY.js} +10 -10
- package/cli.js +12 -12
- package/package.json +3 -3
- package/web-shell/assets/{arc-B-Vtkp1W.js → arc-CunFPPcQ.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-qmTXIj64.js → architectureDiagram-3BPJPVTR-D3SqCgeM.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-ZlnXEtdP.js → blockDiagram-GPEHLZMM-CPRx90S_.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Wyoirf6Z.js → c4Diagram-AAUBKEIU-CahP9Ue4.js} +1 -1
- package/web-shell/assets/channel-zbv7GWAw.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-WQwbq9d8.js → chunk-2J33WTMH-DckIWZ12.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DQKnAXC4.js → chunk-4BX2VUAB-D2Kfctyn.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DIdgXNcO.js → chunk-55IACEB6-DkI11FTX.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CUwGOLEd.js → chunk-727SXJPM-rR-TSCIi.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CCBGZFZ4.js → chunk-AQP2D5EJ-DFGKcGRO.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DMGXProk.js → chunk-FMBD7UC4-CjWqcTPE.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-yejcFqsh.js → chunk-ND2GUHAM-RXe-87UV.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-DxCyqTf7.js → chunk-QZHKN3VN-Dz0c_Yrn.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DSjLkJJZ.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DSjLkJJZ.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-DOrF3cg_.js → cose-bilkent-S5V4N54A-ZHF0-jvV.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Be6CdYQ_.js → dagre-BM42HDAG-7Umz_ygJ.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-B_Rjsft2.js → diagram-2AECGRRQ-DomN8nxq.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BvQbKSm1.js → diagram-5GNKFQAL-eebvj2OL.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BsdmMdpS.js → diagram-KO2AKTUF-IR1mmn9d.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-CrQlBaNr.js → diagram-LMA3HP47-CKysx5KF.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-aB1MD_DL.js → diagram-OG6HWLK6-cBy5puHn.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-F-eUUn9n.js → erDiagram-TEJ5UH35-B5RJagPG.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-DY_d8lUK.js → flowDiagram-I6XJVG4X-CfHgDmPg.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dqu7KBPg.js → ganttDiagram-6RSMTGT7-DUfFF5nb.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-2IkU_VEj.js → gitGraphDiagram-PVQCEYII-M9dt57k5.js} +1 -1
- package/web-shell/assets/{index-QQlUCJGg.css → index-B8e-CkuC.css} +2 -2
- package/web-shell/assets/{index-BuSbqggh.js → index-CKjO4myk.js} +1 -1
- package/web-shell/assets/index-Dc-fTO0V.js +1768 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-C4orwzPw.js → infoDiagram-5YYISTIA-CTKMmIro.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-fXUEfef_.js → ishikawaDiagram-YF4QCWOH-DJIJDP4s.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-Bs0I1_J5.js → journeyDiagram-JHISSGLW-DgRnvn6S.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-BPRj1dw_.js → kanban-definition-UN3LZRKU-VUwO8yrg.js} +1 -1
- package/web-shell/assets/{linear-DFS6ZDpW.js → linear-BCvgV5I_.js} +1 -1
- package/web-shell/assets/{mermaid.core-CZxjWMaO.js → mermaid.core-mv_kVV6q.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-Dsr3PmNs.js → mindmap-definition-RKZ34NQL-sfnjMlOd.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-D5Ngpz5Y.js → pieDiagram-4H26LBE5-BlhICse4.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-WJK9I25z.js → quadrantDiagram-W4KKPZXB-BgTQzwen.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CmrYcwOH.js → requirementDiagram-4Y6WPE33-CZ-FTrrN.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-7SjCc4Mv.js → sankeyDiagram-5OEKKPKP-G5Wp_jn3.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Dl9E0IRM.js → sequenceDiagram-3UESZ5HK-C8MKZ3i1.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CRRio7yV.js → stateDiagram-AJRCARHV-Bo0ZDm7y.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-31TSCPcH.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DVyXjjfq.js → timeline-definition-PNZ67QCA-M3L9E01f.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-Nb2Lckzq.js → vennDiagram-CIIHVFJN-DD4eHCrm.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-DuL_otIP.js → wardley-L42UT6IY-DNEL_3g4.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DVI9Q4Aa.js → wardleyDiagram-YWT4CUSO-q484OoqI.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BNjAm7KD.js → xychartDiagram-2RQKCTM6-4mcNt1Yg.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-EMYZIABH.js +0 -81
- package/chunks/nonInteractiveCli-P4UKCJFM.js +0 -154
- package/web-shell/assets/channel-DXaHnfjS.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BigU82A0.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BigU82A0.js +0 -1
- package/web-shell/assets/index-DrfC2e9s.js +0 -1768
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-1atT7XaU.js +0 -1
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
shouldSuppressRememberErrorDetails,
|
|
22
22
|
workspaceMemoryFailureCode,
|
|
23
23
|
workspaceMemoryFailureDiagnostics
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-L4OW63GW.js";
|
|
25
25
|
import {
|
|
26
26
|
deriveWebSocketBase,
|
|
27
27
|
openQwenAsrRealtimeStream,
|
|
28
28
|
openVoiceStream,
|
|
29
29
|
openVoiceStreamWithRetry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-Q3JQ7OSU.js";
|
|
31
31
|
import {
|
|
32
32
|
SetupGithubError,
|
|
33
33
|
collectSessionData,
|
|
@@ -39,15 +39,15 @@ import {
|
|
|
39
39
|
toJson,
|
|
40
40
|
toJsonl,
|
|
41
41
|
toMarkdown
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LDY4J4G6.js";
|
|
43
43
|
import {
|
|
44
44
|
OBSERVED_CONTACT_MAX_FRESH_WITHIN_SECONDS,
|
|
45
45
|
ObservedChannelContactStore
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-OWMAZHIX.js";
|
|
47
|
+
import "./chunk-O7VQ3F22.js";
|
|
47
48
|
import {
|
|
48
49
|
escapeAnsiCtrlCodes
|
|
49
50
|
} from "./chunk-4NFY2S7N.js";
|
|
50
|
-
import "./chunk-RFUHDCNF.js";
|
|
51
51
|
import "./chunk-2MIN6GRR.js";
|
|
52
52
|
import "./chunk-QHTIBUWB.js";
|
|
53
53
|
import "./chunk-EKTCKZV5.js";
|
|
@@ -98,7 +98,6 @@ import {
|
|
|
98
98
|
parseOptionalWorkspaceCwd,
|
|
99
99
|
parsePermissionVoteBody,
|
|
100
100
|
requireSessionId,
|
|
101
|
-
require_express,
|
|
102
101
|
resolveAcpHttpEnabled,
|
|
103
102
|
resolveCdpMcpCommand,
|
|
104
103
|
safeBody,
|
|
@@ -109,34 +108,46 @@ import {
|
|
|
109
108
|
setRateLimiter,
|
|
110
109
|
unsafeRevealSecret,
|
|
111
110
|
validateMcpRuntimeServerName
|
|
112
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-CE5UCTKO.js";
|
|
113
112
|
import {
|
|
114
113
|
isLoopbackBind
|
|
115
114
|
} from "./chunk-RXFQM6FQ.js";
|
|
116
115
|
import "./chunk-HGCQ5SE7.js";
|
|
117
116
|
import {
|
|
118
|
-
|
|
119
|
-
} from "./chunk-
|
|
117
|
+
createTotalSessionAdmissionController
|
|
118
|
+
} from "./chunk-AKA24BGO.js";
|
|
120
119
|
import {
|
|
121
120
|
WorkspaceGenerationClosedError,
|
|
122
121
|
createSingleWorkspaceRegistry,
|
|
123
122
|
createWorkspaceSessionOwnerIndex
|
|
124
123
|
} from "./chunk-2M5N3DHY.js";
|
|
124
|
+
import "./chunk-GRC5HGPI.js";
|
|
125
|
+
import {
|
|
126
|
+
assertValidChannelSecretUpdates
|
|
127
|
+
} from "./chunk-3HS6Y4UA.js";
|
|
125
128
|
import {
|
|
126
129
|
createWorkspaceProvidersStatusProvider
|
|
127
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-KKRGVSHC.js";
|
|
128
131
|
import {
|
|
129
132
|
getAuthTypeFromEnv,
|
|
130
133
|
resolveCliGenerationConfig
|
|
131
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-XIDHBXUI.js";
|
|
132
135
|
import {
|
|
133
136
|
createWorkspaceSkillsStatusProvider
|
|
134
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-VT3VNFVW.js";
|
|
135
138
|
import "./chunk-BGXZBI5B.js";
|
|
139
|
+
import {
|
|
140
|
+
isServeDebugMode,
|
|
141
|
+
mountWebShellAssets,
|
|
142
|
+
mountWebShellSpaFallback
|
|
143
|
+
} from "./chunk-SOORFWKY.js";
|
|
144
|
+
import {
|
|
145
|
+
require_express
|
|
146
|
+
} from "./chunk-GDXET5XU.js";
|
|
136
147
|
import {
|
|
137
148
|
evaluateDaemonWorkspaceTrust,
|
|
138
149
|
readDaemonTrustPolicySnapshot
|
|
139
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-B23P3YWE.js";
|
|
140
151
|
import {
|
|
141
152
|
EMPTY_WORKSPACE_VOICE_UPDATE_ERROR,
|
|
142
153
|
MAX_WORKSPACE_SKILL_NAME_LENGTH,
|
|
@@ -150,14 +161,14 @@ import {
|
|
|
150
161
|
validateWorkspaceSkillName,
|
|
151
162
|
validateWorkspaceVoiceState,
|
|
152
163
|
voiceSettingsScopeToWire
|
|
153
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-VLFX3L3X.js";
|
|
154
165
|
import {
|
|
155
166
|
PermissionRulesValidationError,
|
|
156
167
|
buildPermissionSettings,
|
|
157
168
|
isPermissionRuleType,
|
|
158
169
|
normalizePermissionRules,
|
|
159
170
|
readPermissionRuleSet
|
|
160
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-DPH3MUAP.js";
|
|
161
172
|
import {
|
|
162
173
|
assertVoiceBaseUrlNetworkAllowed,
|
|
163
174
|
isStreamingVoiceModel,
|
|
@@ -165,13 +176,13 @@ import {
|
|
|
165
176
|
resolveVoiceTranscriptionConfig,
|
|
166
177
|
sanitizeVoiceErrorMessage,
|
|
167
178
|
transcribeVoiceAudio
|
|
168
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-ACHMWGC5.js";
|
|
169
180
|
import {
|
|
170
181
|
isVoiceEnabled,
|
|
171
182
|
isVoiceMode,
|
|
172
183
|
readVoiceModel
|
|
173
|
-
} from "./chunk-
|
|
174
|
-
import "./chunk-
|
|
184
|
+
} from "./chunk-LDUGDB5H.js";
|
|
185
|
+
import "./chunk-AOHJKPKL.js";
|
|
175
186
|
import "./chunk-Z4X5MTRT.js";
|
|
176
187
|
import {
|
|
177
188
|
WorkspacePermissionRulesSessionRequiredError,
|
|
@@ -179,15 +190,11 @@ import {
|
|
|
179
190
|
WorkspaceSkillNotFoundError,
|
|
180
191
|
WorkspaceSkillNotToggleableError
|
|
181
192
|
} from "./chunk-OA4JVLSA.js";
|
|
182
|
-
import {
|
|
183
|
-
createTotalSessionAdmissionController
|
|
184
|
-
} from "./chunk-AKA24BGO.js";
|
|
185
|
-
import "./chunk-GRC5HGPI.js";
|
|
186
193
|
import {
|
|
187
194
|
daemonObservedContactsPath,
|
|
188
195
|
loadChannelsConfig
|
|
189
|
-
} from "./chunk-
|
|
190
|
-
import "./chunk-
|
|
196
|
+
} from "./chunk-JACAHYEN.js";
|
|
197
|
+
import "./chunk-HY2INPTA.js";
|
|
191
198
|
import "./chunk-57OAHC2Y.js";
|
|
192
199
|
import {
|
|
193
200
|
LIVE_HOST_BUNDLE_ID,
|
|
@@ -196,42 +203,42 @@ import {
|
|
|
196
203
|
} from "./chunk-NKLP3DCK.js";
|
|
197
204
|
import {
|
|
198
205
|
createDaemonStatusProvider
|
|
199
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-JSJTZ6GO.js";
|
|
200
207
|
import "./chunk-VXZBKKQR.js";
|
|
201
|
-
import "./chunk-
|
|
208
|
+
import "./chunk-26ISE5EG.js";
|
|
202
209
|
import "./chunk-3SH53ANB.js";
|
|
203
210
|
import {
|
|
204
211
|
snapshotProcessEnv
|
|
205
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-TX3KSSDN.js";
|
|
206
213
|
import {
|
|
207
214
|
SessionArtifactAuthorizationError,
|
|
208
215
|
SessionArtifactValidationError,
|
|
209
216
|
createAcpSessionBridge,
|
|
210
217
|
parseSessionSource
|
|
211
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-764F335K.js";
|
|
212
219
|
import {
|
|
213
220
|
EVENT_SCHEMA_VERSION,
|
|
214
221
|
EventBus,
|
|
215
222
|
SubscriberLimitExceededError
|
|
216
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-MZSJ43WV.js";
|
|
217
224
|
import "./chunk-XCGIMOLN.js";
|
|
218
225
|
import "./chunk-OCPBI7J5.js";
|
|
219
|
-
import "./chunk-
|
|
226
|
+
import "./chunk-RPWVIXDB.js";
|
|
220
227
|
import {
|
|
221
228
|
STATUS_SCHEMA_VERSION,
|
|
222
229
|
createIdleWorkspaceMemoryStatus,
|
|
223
230
|
mapDomainErrorToErrorKind
|
|
224
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-NLREQJFK.js";
|
|
225
232
|
import "./chunk-K6KS3LTN.js";
|
|
226
233
|
import "./chunk-FC4KQFCS.js";
|
|
227
234
|
import "./chunk-T3CHYWJZ.js";
|
|
228
235
|
import {
|
|
229
236
|
parseChannelWebhookConfigLenient
|
|
230
|
-
} from "./chunk-
|
|
231
|
-
import "./chunk-
|
|
237
|
+
} from "./chunk-P74TZRXD.js";
|
|
238
|
+
import "./chunk-KJZ26VBX.js";
|
|
232
239
|
import {
|
|
233
240
|
supportedChannelCatalog
|
|
234
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-VDS2WYM5.js";
|
|
235
242
|
import "./chunk-V6WHFGST.js";
|
|
236
243
|
import {
|
|
237
244
|
MAX_REGISTERED_WORKSPACES,
|
|
@@ -240,7 +247,7 @@ import {
|
|
|
240
247
|
WorkspaceRegistrationStoreLimitError,
|
|
241
248
|
normalizeWorkspaceDisplayName,
|
|
242
249
|
workspaceRegistrationId
|
|
243
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-EZ53KMUN.js";
|
|
244
251
|
import "./chunk-R574ATRM.js";
|
|
245
252
|
import {
|
|
246
253
|
BranchWhilePromptActiveError,
|
|
@@ -293,7 +300,7 @@ import {
|
|
|
293
300
|
} from "./chunk-YP5KH5Y7.js";
|
|
294
301
|
import {
|
|
295
302
|
normalizeWorkerDiagnostic
|
|
296
|
-
} from "./chunk-
|
|
303
|
+
} from "./chunk-UFALT4LK.js";
|
|
297
304
|
import {
|
|
298
305
|
normalizeServeChannelSelection
|
|
299
306
|
} from "./chunk-ALMR3E6Q.js";
|
|
@@ -305,7 +312,7 @@ import {
|
|
|
305
312
|
import "./chunk-5HBA2Z7V.js";
|
|
306
313
|
import {
|
|
307
314
|
sanitizeLogText
|
|
308
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-DIWZNWZT.js";
|
|
309
316
|
import "./chunk-UDXSXLER.js";
|
|
310
317
|
import {
|
|
311
318
|
getDialogSettingKeys,
|
|
@@ -316,7 +323,7 @@ import {
|
|
|
316
323
|
getWritableScopes,
|
|
317
324
|
loadSettings,
|
|
318
325
|
validateSettingValue
|
|
319
|
-
} from "./chunk-
|
|
326
|
+
} from "./chunk-77WOUGCA.js";
|
|
320
327
|
import "./chunk-RKUWKYED.js";
|
|
321
328
|
import "./chunk-GOXKNSDZ.js";
|
|
322
329
|
import "./chunk-IDS7MSUP.js";
|
|
@@ -325,14 +332,14 @@ import {
|
|
|
325
332
|
detectSystemLanguage,
|
|
326
333
|
resolveLanguageSetting,
|
|
327
334
|
resolveSupportedLanguage
|
|
328
|
-
} from "./chunk-
|
|
329
|
-
import "./chunk-
|
|
330
|
-
import "./chunk-
|
|
331
|
-
import "./chunk-
|
|
335
|
+
} from "./chunk-TAOSTUHI.js";
|
|
336
|
+
import "./chunk-KPMB4JEZ.js";
|
|
337
|
+
import "./chunk-ALFTV7GA.js";
|
|
338
|
+
import "./chunk-Z6W3XDLN.js";
|
|
332
339
|
import "./chunk-VJNBRRZG.js";
|
|
333
340
|
import {
|
|
334
341
|
getWorkspaceTrustStatus
|
|
335
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-3ARO4N5G.js";
|
|
336
343
|
import "./chunk-ALGGS7UH.js";
|
|
337
344
|
import {
|
|
338
345
|
isWithinRoot as isWithinRoot2
|
|
@@ -353,6 +360,7 @@ import {
|
|
|
353
360
|
MAX_LOG_LIMIT,
|
|
354
361
|
ModelsConfig,
|
|
355
362
|
RUNTIME_MCP_IF_ABSENT_CONFIG_FLAG,
|
|
363
|
+
SESSION_TRANSCRIPT_MAX_EXPANDED_PAGE_BYTES,
|
|
356
364
|
SESSION_TRANSCRIPT_MAX_INDEX_BYTES,
|
|
357
365
|
SESSION_TRANSCRIPT_MAX_LIMIT,
|
|
358
366
|
SESSION_TRANSCRIPT_MAX_PAGE_BYTES,
|
|
@@ -411,7 +419,7 @@ import {
|
|
|
411
419
|
writeWorkspaceContextFile,
|
|
412
420
|
writeWorktreeSession,
|
|
413
421
|
writeWorktreeSessionMarker
|
|
414
|
-
} from "./chunk-
|
|
422
|
+
} from "./chunk-BFSQBXHV.js";
|
|
415
423
|
import "./chunk-GOFAQQZA.js";
|
|
416
424
|
import "./chunk-5M6IDOMF.js";
|
|
417
425
|
import "./chunk-TWPJO254.js";
|
|
@@ -419,12 +427,12 @@ import "./chunk-H6XPXXMH.js";
|
|
|
419
427
|
import {
|
|
420
428
|
MAX_JOBS,
|
|
421
429
|
nextDurableFireMs
|
|
422
|
-
} from "./chunk-
|
|
423
|
-
import "./chunk-
|
|
424
|
-
import "./chunk-
|
|
425
|
-
import "./chunk-
|
|
430
|
+
} from "./chunk-2UUMVNYT.js";
|
|
431
|
+
import "./chunk-MVUQRLOH.js";
|
|
432
|
+
import "./chunk-XCWO3SMQ.js";
|
|
433
|
+
import "./chunk-7MH4J33A.js";
|
|
426
434
|
import "./chunk-6PVPNMXU.js";
|
|
427
|
-
import "./chunk-
|
|
435
|
+
import "./chunk-RGTB44BO.js";
|
|
428
436
|
import {
|
|
429
437
|
nextFireTime,
|
|
430
438
|
parseCron
|
|
@@ -437,32 +445,47 @@ import {
|
|
|
437
445
|
readCronTasks,
|
|
438
446
|
taskHasLegacyCondition,
|
|
439
447
|
updateCronTasks
|
|
440
|
-
} from "./chunk-
|
|
441
|
-
import "./chunk-
|
|
448
|
+
} from "./chunk-GNPNYXJB.js";
|
|
449
|
+
import "./chunk-HUWENAHO.js";
|
|
442
450
|
import "./chunk-O6GEWCJA.js";
|
|
443
451
|
import "./chunk-T26EAKDL.js";
|
|
444
452
|
import "./chunk-ZPJWUGCS.js";
|
|
445
453
|
import "./chunk-CPBF7KYF.js";
|
|
446
|
-
import "./chunk-
|
|
454
|
+
import "./chunk-J6SZID63.js";
|
|
447
455
|
import "./chunk-KRXPRVGL.js";
|
|
448
|
-
import "./chunk-
|
|
449
|
-
import "./chunk-
|
|
450
|
-
import "./chunk-
|
|
451
|
-
import "./chunk-
|
|
456
|
+
import "./chunk-GM463R2B.js";
|
|
457
|
+
import "./chunk-SEZ556DZ.js";
|
|
458
|
+
import "./chunk-CJXIIILK.js";
|
|
459
|
+
import "./chunk-3K7FH2KQ.js";
|
|
452
460
|
import {
|
|
453
461
|
APPROVAL_MODES
|
|
454
|
-
} from "./chunk-
|
|
462
|
+
} from "./chunk-WAUGQKUU.js";
|
|
463
|
+
import "./chunk-REHWPCG2.js";
|
|
464
|
+
import {
|
|
465
|
+
addDaemonRequestAttribute,
|
|
466
|
+
captureDaemonTelemetryContext,
|
|
467
|
+
emitDaemonLog,
|
|
468
|
+
hashDaemonWorkspace,
|
|
469
|
+
recordDaemonBridgeError,
|
|
470
|
+
recordDaemonError,
|
|
471
|
+
recordDaemonHttpRequest,
|
|
472
|
+
recordDaemonHttpResponse,
|
|
473
|
+
runWithDaemonTelemetryContext,
|
|
474
|
+
withDaemonRequestSpan
|
|
475
|
+
} from "./chunk-L4N6TIP7.js";
|
|
476
|
+
import "./chunk-SAH4BD2J.js";
|
|
477
|
+
import "./chunk-CPG6P4GG.js";
|
|
455
478
|
import "./chunk-S6LOFUVP.js";
|
|
479
|
+
import "./chunk-2J3OJGTL.js";
|
|
456
480
|
import {
|
|
457
481
|
SubagentError,
|
|
458
482
|
SubagentErrorCode
|
|
459
|
-
} from "./chunk-
|
|
483
|
+
} from "./chunk-IA7TGCN2.js";
|
|
460
484
|
import "./chunk-K623ENWT.js";
|
|
461
485
|
import {
|
|
462
486
|
escapeXml
|
|
463
487
|
} from "./chunk-AQ37AY7B.js";
|
|
464
|
-
import "./chunk-
|
|
465
|
-
import "./chunk-HU5TUALO.js";
|
|
488
|
+
import "./chunk-EQL65XGA.js";
|
|
466
489
|
import {
|
|
467
490
|
QwenOAuth2Client,
|
|
468
491
|
QwenOAuthPollError,
|
|
@@ -471,30 +494,18 @@ import {
|
|
|
471
494
|
isDeviceAuthorizationSuccess,
|
|
472
495
|
isDeviceTokenPending,
|
|
473
496
|
isDeviceTokenSuccess
|
|
474
|
-
} from "./chunk-
|
|
497
|
+
} from "./chunk-22NBYCPD.js";
|
|
475
498
|
import "./chunk-NAVJD2PQ.js";
|
|
476
|
-
import "./chunk-
|
|
477
|
-
import "./chunk-
|
|
499
|
+
import "./chunk-3ULCB3NE.js";
|
|
500
|
+
import "./chunk-BGG4MBYD.js";
|
|
501
|
+
import "./chunk-P3QQPMQA.js";
|
|
502
|
+
import "./chunk-M6HMMKVG.js";
|
|
478
503
|
import "./chunk-DGEIYUC3.js";
|
|
479
504
|
import "./chunk-MPHPFVKK.js";
|
|
480
|
-
import "./chunk-
|
|
481
|
-
import "./chunk-DJ2GSRLV.js";
|
|
482
|
-
import "./chunk-QZKYZCN3.js";
|
|
483
|
-
import {
|
|
484
|
-
addDaemonRequestAttribute,
|
|
485
|
-
emitDaemonLog,
|
|
486
|
-
hashDaemonWorkspace,
|
|
487
|
-
recordDaemonBridgeError,
|
|
488
|
-
recordDaemonError,
|
|
489
|
-
recordDaemonHttpRequest,
|
|
490
|
-
recordDaemonHttpResponse,
|
|
491
|
-
withDaemonRequestSpan
|
|
492
|
-
} from "./chunk-MGSSJT27.js";
|
|
493
|
-
import "./chunk-2J3OJGTL.js";
|
|
494
|
-
import "./chunk-P3QQPMQA.js";
|
|
495
|
-
import "./chunk-6O5DVH27.js";
|
|
505
|
+
import "./chunk-AXMWHKXA.js";
|
|
496
506
|
import "./chunk-GLCZKT5V.js";
|
|
497
|
-
import "./chunk-
|
|
507
|
+
import "./chunk-DJ2GSRLV.js";
|
|
508
|
+
import "./chunk-EI3HZX6C.js";
|
|
498
509
|
import "./chunk-CR3C7WXL.js";
|
|
499
510
|
import "./chunk-XWRJCPHC.js";
|
|
500
511
|
import {
|
|
@@ -507,19 +518,19 @@ import {
|
|
|
507
518
|
isWithinRoot,
|
|
508
519
|
parseLineTolerant,
|
|
509
520
|
read
|
|
510
|
-
} from "./chunk-
|
|
521
|
+
} from "./chunk-XCG76UE6.js";
|
|
511
522
|
import "./chunk-WOJZWRAZ.js";
|
|
512
523
|
import "./chunk-VGC4I5JJ.js";
|
|
513
|
-
import "./chunk-
|
|
514
|
-
import "./chunk-
|
|
515
|
-
import "./chunk-
|
|
516
|
-
import "./chunk-
|
|
524
|
+
import "./chunk-FVKHVJZQ.js";
|
|
525
|
+
import "./chunk-6ZRFAKXK.js";
|
|
526
|
+
import "./chunk-PYQADEFD.js";
|
|
527
|
+
import "./chunk-P7HUJDBZ.js";
|
|
517
528
|
import "./chunk-46UV252V.js";
|
|
518
529
|
import "./chunk-ZBVS26BY.js";
|
|
519
|
-
import "./chunk-
|
|
520
|
-
import "./chunk-
|
|
521
|
-
import "./chunk-
|
|
522
|
-
import "./chunk-
|
|
530
|
+
import "./chunk-KKBPOU75.js";
|
|
531
|
+
import "./chunk-EUNWC2VS.js";
|
|
532
|
+
import "./chunk-FOGU3LJX.js";
|
|
533
|
+
import "./chunk-6M26GBKX.js";
|
|
523
534
|
import "./chunk-W4RQUHY3.js";
|
|
524
535
|
import "./chunk-LKRMNRSN.js";
|
|
525
536
|
import {
|
|
@@ -527,7 +538,7 @@ import {
|
|
|
527
538
|
Storage,
|
|
528
539
|
createDebugLogger,
|
|
529
540
|
runWithoutDebugLogSession
|
|
530
|
-
} from "./chunk-
|
|
541
|
+
} from "./chunk-OIVKILPI.js";
|
|
531
542
|
import "./chunk-VOQXFAY5.js";
|
|
532
543
|
import {
|
|
533
544
|
writeStderrLine,
|
|
@@ -554,7 +565,7 @@ import {
|
|
|
554
565
|
|
|
555
566
|
// packages/cli/src/serve/server.ts
|
|
556
567
|
init_esbuild_shims();
|
|
557
|
-
var
|
|
568
|
+
var import_express4 = __toESM(require_express(), 1);
|
|
558
569
|
|
|
559
570
|
// packages/cli/src/serve/acp-http/index.ts
|
|
560
571
|
init_esbuild_shims();
|
|
@@ -1171,11 +1182,11 @@ function decodeTextCursor(cursor) {
|
|
|
1171
1182
|
return { off, size, dev, ino };
|
|
1172
1183
|
}
|
|
1173
1184
|
__name(decodeTextCursor, "decodeTextCursor");
|
|
1174
|
-
function assertCursorMatchesFile(cursor, stats,
|
|
1185
|
+
function assertCursorMatchesFile(cursor, stats, path14) {
|
|
1175
1186
|
if (String(stats.dev) !== cursor.dev || String(stats.ino) !== cursor.ino || stats.size < cursor.size) {
|
|
1176
1187
|
throw new FsError(
|
|
1177
1188
|
"hash_mismatch",
|
|
1178
|
-
`cursor no longer matches the file it was issued for: ${
|
|
1189
|
+
`cursor no longer matches the file it was issued for: ${path14}`,
|
|
1179
1190
|
{ hint: "re-read the file from the beginning to get a fresh cursor" }
|
|
1180
1191
|
);
|
|
1181
1192
|
}
|
|
@@ -5155,17 +5166,6 @@ __name(mountWorkspaceQualifiedMemoryRememberRoutes, "mountWorkspaceQualifiedMemo
|
|
|
5155
5166
|
init_esbuild_shims();
|
|
5156
5167
|
import { promises as fs2 } from "node:fs";
|
|
5157
5168
|
import * as path8 from "node:path";
|
|
5158
|
-
|
|
5159
|
-
// packages/cli/src/serve/debug-mode.ts
|
|
5160
|
-
init_esbuild_shims();
|
|
5161
|
-
function isServeDebugMode() {
|
|
5162
|
-
const value = process.env["QWEN_SERVE_DEBUG"];
|
|
5163
|
-
if (!value) return false;
|
|
5164
|
-
return !["0", "false", "off", "no"].includes(value.trim().toLowerCase());
|
|
5165
|
-
}
|
|
5166
|
-
__name(isServeDebugMode, "isServeDebugMode");
|
|
5167
|
-
|
|
5168
|
-
// packages/cli/src/serve/workspace-memory.ts
|
|
5169
5169
|
function requireTrustedWorkspace2(deps, res) {
|
|
5170
5170
|
if (deps.isWorkspaceTrusted?.() !== false) return true;
|
|
5171
5171
|
res.status(403).json({
|
|
@@ -13937,7 +13937,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
13937
13937
|
if (!enabled) return void 0;
|
|
13938
13938
|
const daemonEnv = opts.daemonEnv ?? process.env;
|
|
13939
13939
|
const getPrimaryEnv = /* @__PURE__ */ __name(() => opts.workspaceRegistry ? runtimeEffectiveEnv(opts.workspaceRegistry.primary, daemonEnv) : daemonEnv, "getPrimaryEnv");
|
|
13940
|
-
const
|
|
13940
|
+
const path14 = opts.path ?? "/acp";
|
|
13941
13941
|
const dispatcherRef = {};
|
|
13942
13942
|
let disposed = false;
|
|
13943
13943
|
const rejectIfDisposed = /* @__PURE__ */ __name((res) => {
|
|
@@ -14109,7 +14109,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14109
14109
|
const primaryMount = {
|
|
14110
14110
|
primary: true,
|
|
14111
14111
|
workspaceCwd: opts.boundWorkspace,
|
|
14112
|
-
routeLabel: logSafe(
|
|
14112
|
+
routeLabel: logSafe(path14),
|
|
14113
14113
|
rateLimitScope: opts.workspaceRegistry?.primary.workspaceId ?? "primary",
|
|
14114
14114
|
registry,
|
|
14115
14115
|
dispatcher,
|
|
@@ -14263,7 +14263,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14263
14263
|
});
|
|
14264
14264
|
}, "handleAcpPost");
|
|
14265
14265
|
app.post(
|
|
14266
|
-
|
|
14266
|
+
path14,
|
|
14267
14267
|
(req, res) => handleAcpPost(primaryMount, req, res)
|
|
14268
14268
|
);
|
|
14269
14269
|
const handleAcpGet = /* @__PURE__ */ __name((mount, req, res) => {
|
|
@@ -14361,10 +14361,10 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14361
14361
|
onPumpSettled();
|
|
14362
14362
|
});
|
|
14363
14363
|
}, "handleAcpGet");
|
|
14364
|
-
app.get(
|
|
14364
|
+
app.get(path14, (req, res) => {
|
|
14365
14365
|
handleAcpGet(primaryMount, req, res);
|
|
14366
14366
|
});
|
|
14367
|
-
app.delete(
|
|
14367
|
+
app.delete(path14, (req, res) => {
|
|
14368
14368
|
handleAcpDelete(primaryMount, req, res);
|
|
14369
14369
|
});
|
|
14370
14370
|
const createSecondaryAcpMount = /* @__PURE__ */ __name((rt) => {
|
|
@@ -14566,7 +14566,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14566
14566
|
const isPluralAcpShape = pluralRawSelector !== null;
|
|
14567
14567
|
const pluralVoiceRawSelector = opts.workspaceVoiceConnection ? pluralWorkspaceRawSelector(rawPath, PLURAL_VOICE_WS_SUFFIX) : null;
|
|
14568
14568
|
const isPluralVoiceShape = pluralVoiceRawSelector !== null;
|
|
14569
|
-
if (rawPath !==
|
|
14569
|
+
if (rawPath !== path14 && !isCdpPath && !extraRoute && !isPluralAcpShape && !isPluralVoiceShape) {
|
|
14570
14570
|
logReject(`unknown-path ${logSafe(rawPath)}`);
|
|
14571
14571
|
socket.destroy();
|
|
14572
14572
|
return;
|
|
@@ -15103,7 +15103,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
15103
15103
|
});
|
|
15104
15104
|
}, "upgradeListener");
|
|
15105
15105
|
httpServer.on("upgrade", upgradeListener);
|
|
15106
|
-
writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${
|
|
15106
|
+
writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${path14}`);
|
|
15107
15107
|
}
|
|
15108
15108
|
__name(setupWebSocket, "setupWebSocket");
|
|
15109
15109
|
return {
|
|
@@ -15287,6 +15287,7 @@ function buildModelsConfig(settings, env) {
|
|
|
15287
15287
|
return new ModelsConfig({
|
|
15288
15288
|
initialAuthType: selectedAuthType,
|
|
15289
15289
|
modelProvidersConfig: merged.modelProviders,
|
|
15290
|
+
providerProtocolConfig: merged.providerProtocol,
|
|
15290
15291
|
generationConfig: resolvedCliConfig.generationConfig,
|
|
15291
15292
|
generationConfigSources: resolvedCliConfig.sources
|
|
15292
15293
|
});
|
|
@@ -15772,105 +15773,6 @@ var CdpTunnelRegistry = class {
|
|
|
15772
15773
|
}
|
|
15773
15774
|
};
|
|
15774
15775
|
|
|
15775
|
-
// packages/cli/src/serve/web-shell-static.ts
|
|
15776
|
-
init_esbuild_shims();
|
|
15777
|
-
var import_express2 = __toESM(require_express(), 1);
|
|
15778
|
-
import * as path9 from "node:path";
|
|
15779
|
-
var WEB_SHELL_CSP_DIRECTIVES = [
|
|
15780
|
-
"default-src 'self'",
|
|
15781
|
-
"script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'",
|
|
15782
|
-
"style-src 'self' 'unsafe-inline'",
|
|
15783
|
-
"font-src 'self' data:",
|
|
15784
|
-
"img-src 'self' data: blob:",
|
|
15785
|
-
"connect-src 'self'",
|
|
15786
|
-
"worker-src 'self' blob:",
|
|
15787
|
-
// base-uri does NOT fall back to default-src; lock it so an injected <base>
|
|
15788
|
-
// (the SPA renders AI-generated markdown) cannot repoint relative URLs to an
|
|
15789
|
-
// attacker origin.
|
|
15790
|
-
"base-uri 'none'"
|
|
15791
|
-
];
|
|
15792
|
-
function buildWebShellCsp(frameAncestors = []) {
|
|
15793
|
-
const fa = frameAncestors.length ? `frame-ancestors ${frameAncestors.join(" ")}` : "frame-ancestors 'none'";
|
|
15794
|
-
return [...WEB_SHELL_CSP_DIRECTIVES, fa].join("; ");
|
|
15795
|
-
}
|
|
15796
|
-
__name(buildWebShellCsp, "buildWebShellCsp");
|
|
15797
|
-
var WEB_SHELL_CSP = buildWebShellCsp();
|
|
15798
|
-
function isDocumentNavigation(req) {
|
|
15799
|
-
const fetchMode = req.headers["sec-fetch-mode"];
|
|
15800
|
-
const fetchDest = req.headers["sec-fetch-dest"];
|
|
15801
|
-
const accept = req.headers.accept ?? "";
|
|
15802
|
-
return fetchMode === "navigate" || fetchDest === "document" || accept.trim().toLowerCase().startsWith("text/html");
|
|
15803
|
-
}
|
|
15804
|
-
__name(isDocumentNavigation, "isDocumentNavigation");
|
|
15805
|
-
function createSendIndex(webShellDir, frameAncestors = []) {
|
|
15806
|
-
const indexPath = path9.join(webShellDir, "index.html");
|
|
15807
|
-
const csp = buildWebShellCsp(frameAncestors);
|
|
15808
|
-
return (res) => {
|
|
15809
|
-
res.status(200).set("Content-Security-Policy", csp).set("X-Content-Type-Options", "nosniff").set("Referrer-Policy", "no-referrer").set(
|
|
15810
|
-
// `microphone=(self)` lets the same-origin Web Shell document request
|
|
15811
|
-
// the mic for voice dictation (the prompt won't even appear under an
|
|
15812
|
-
// empty `microphone=()` allowlist). Still blocks cross-origin iframes;
|
|
15813
|
-
// camera/geolocation/payment stay disabled (unused).
|
|
15814
|
-
"Permissions-Policy",
|
|
15815
|
-
"camera=(), microphone=(self), geolocation=(), payment=()"
|
|
15816
|
-
).set("Cache-Control", "no-cache");
|
|
15817
|
-
if (frameAncestors.length === 0) {
|
|
15818
|
-
res.set("X-Frame-Options", "DENY");
|
|
15819
|
-
}
|
|
15820
|
-
res.sendFile(
|
|
15821
|
-
indexPath,
|
|
15822
|
-
{ cacheControl: false, dotfiles: "allow" },
|
|
15823
|
-
(err) => {
|
|
15824
|
-
if (!err) return;
|
|
15825
|
-
writeStderrLine(
|
|
15826
|
-
`qwen serve: Web Shell index send failed: ${err instanceof Error ? err.message : String(err)}`
|
|
15827
|
-
);
|
|
15828
|
-
if (!res.headersSent) {
|
|
15829
|
-
res.status(500).type("text/plain").send("Failed to load Web Shell");
|
|
15830
|
-
} else {
|
|
15831
|
-
res.end();
|
|
15832
|
-
}
|
|
15833
|
-
}
|
|
15834
|
-
);
|
|
15835
|
-
};
|
|
15836
|
-
}
|
|
15837
|
-
__name(createSendIndex, "createSendIndex");
|
|
15838
|
-
function mountWebShellAssets(app, webShellDir, frameAncestors = []) {
|
|
15839
|
-
const sendIndex = createSendIndex(webShellDir, frameAncestors);
|
|
15840
|
-
app.use(
|
|
15841
|
-
"/assets",
|
|
15842
|
-
import_express2.default.static(path9.join(webShellDir, "assets"), {
|
|
15843
|
-
index: false,
|
|
15844
|
-
immutable: true,
|
|
15845
|
-
maxAge: "1y"
|
|
15846
|
-
})
|
|
15847
|
-
);
|
|
15848
|
-
app.use("/assets", (req, res) => {
|
|
15849
|
-
if (isServeDebugMode()) {
|
|
15850
|
-
writeStderrLine(
|
|
15851
|
-
`qwen serve: Web Shell asset not found: ${req.originalUrl}`
|
|
15852
|
-
);
|
|
15853
|
-
}
|
|
15854
|
-
res.status(404).type("text/plain").send("Not found");
|
|
15855
|
-
});
|
|
15856
|
-
app.get("/", (_req, res) => sendIndex(res));
|
|
15857
|
-
}
|
|
15858
|
-
__name(mountWebShellAssets, "mountWebShellAssets");
|
|
15859
|
-
function mountWebShellSpaFallback(app, webShellDir, frameAncestors = []) {
|
|
15860
|
-
const sendIndex = createSendIndex(webShellDir, frameAncestors);
|
|
15861
|
-
app.use((req, res, next) => {
|
|
15862
|
-
if (req.method !== "GET" && req.method !== "HEAD") return next();
|
|
15863
|
-
if (!isDocumentNavigation(req)) return next();
|
|
15864
|
-
if (isServeDebugMode()) {
|
|
15865
|
-
writeStderrLine(
|
|
15866
|
-
`qwen serve: Web Shell SPA fallback served for ${req.method} ${req.originalUrl}`
|
|
15867
|
-
);
|
|
15868
|
-
}
|
|
15869
|
-
sendIndex(res);
|
|
15870
|
-
});
|
|
15871
|
-
}
|
|
15872
|
-
__name(mountWebShellSpaFallback, "mountWebShellSpaFallback");
|
|
15873
|
-
|
|
15874
15776
|
// packages/cli/src/serve/workspace-generation.ts
|
|
15875
15777
|
init_esbuild_shims();
|
|
15876
15778
|
|
|
@@ -16030,7 +15932,8 @@ function registerDaemonStatusRoutes(app, deps) {
|
|
|
16030
15932
|
getChannelWorkerSnapshots: deps.getChannelWorkerSnapshots,
|
|
16031
15933
|
getPerfSnapshot: deps.getPerfSnapshot,
|
|
16032
15934
|
getMetricsSeries: deps.getMetricsSeries,
|
|
16033
|
-
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot
|
|
15935
|
+
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot,
|
|
15936
|
+
getChildHeapPolicySnapshot: deps.getChildHeapPolicySnapshot
|
|
16034
15937
|
})
|
|
16035
15938
|
);
|
|
16036
15939
|
} catch (err) {
|
|
@@ -20437,8 +20340,8 @@ function decodePathSegment(value) {
|
|
|
20437
20340
|
}
|
|
20438
20341
|
__name(decodePathSegment, "decodePathSegment");
|
|
20439
20342
|
function matchLegacySessionTelemetryRoute(method, requestPath) {
|
|
20440
|
-
const
|
|
20441
|
-
const requestSegments =
|
|
20343
|
+
const path14 = requestPath.length > 1 && requestPath.endsWith("/") ? requestPath.slice(0, -1) : requestPath;
|
|
20344
|
+
const requestSegments = path14.split("/").slice(1);
|
|
20442
20345
|
const prefix = requestSegments[0]?.toLowerCase();
|
|
20443
20346
|
if (prefix !== "session" && prefix !== "sessions" && prefix !== "permission") {
|
|
20444
20347
|
return void 0;
|
|
@@ -20490,23 +20393,23 @@ __name(setDaemonTelemetryWorkspace, "setDaemonTelemetryWorkspace");
|
|
|
20490
20393
|
function resolveDaemonTelemetryRoute(req) {
|
|
20491
20394
|
const legacyRoute = matchLegacySessionTelemetryRoute(req.method, req.path);
|
|
20492
20395
|
if (legacyRoute) return legacyRoute;
|
|
20493
|
-
const
|
|
20494
|
-
if (req.method === "GET" &&
|
|
20396
|
+
const path14 = req.path.replace(/\/$/, "") || "/";
|
|
20397
|
+
if (req.method === "GET" && path14 === "/daemon/status") {
|
|
20495
20398
|
return { route: "GET /daemon/status" };
|
|
20496
20399
|
}
|
|
20497
|
-
if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(
|
|
20400
|
+
if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(path14)) {
|
|
20498
20401
|
return { route: "GET /workspace/:id/sessions" };
|
|
20499
20402
|
}
|
|
20500
|
-
if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(
|
|
20403
|
+
if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(path14)) {
|
|
20501
20404
|
return { route: "GET /workspace/:id/sessions" };
|
|
20502
20405
|
}
|
|
20503
|
-
if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(
|
|
20406
|
+
if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(path14)) {
|
|
20504
20407
|
return { route: "GET /workspace/:id/session-info" };
|
|
20505
20408
|
}
|
|
20506
|
-
if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(
|
|
20409
|
+
if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(path14)) {
|
|
20507
20410
|
return { route: "GET /workspace/:id/session-info" };
|
|
20508
20411
|
}
|
|
20509
|
-
const workspaceTranscript =
|
|
20412
|
+
const workspaceTranscript = path14.match(
|
|
20510
20413
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/transcript$/
|
|
20511
20414
|
);
|
|
20512
20415
|
if (workspaceTranscript?.[1] && req.method === "GET") {
|
|
@@ -20515,7 +20418,7 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20515
20418
|
sessionId: decodePathSegment(workspaceTranscript[1])
|
|
20516
20419
|
};
|
|
20517
20420
|
}
|
|
20518
|
-
const workspaceExport =
|
|
20421
|
+
const workspaceExport = path14.match(
|
|
20519
20422
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/export$/
|
|
20520
20423
|
);
|
|
20521
20424
|
if (workspaceExport?.[1] && req.method === "GET") {
|
|
@@ -20524,7 +20427,7 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20524
20427
|
sessionId: decodePathSegment(workspaceExport[1])
|
|
20525
20428
|
};
|
|
20526
20429
|
}
|
|
20527
|
-
const workspaceArchivedExport =
|
|
20430
|
+
const workspaceArchivedExport = path14.match(
|
|
20528
20431
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/archive\/export$/
|
|
20529
20432
|
);
|
|
20530
20433
|
if (workspaceArchivedExport?.[1] && req.method === "GET") {
|
|
@@ -20534,8 +20437,8 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20534
20437
|
};
|
|
20535
20438
|
}
|
|
20536
20439
|
const pluralWorkspacePrefix = /^\/workspaces\/[^/]+/;
|
|
20537
|
-
if (pluralWorkspacePrefix.test(
|
|
20538
|
-
const suffix =
|
|
20440
|
+
if (pluralWorkspacePrefix.test(path14)) {
|
|
20441
|
+
const suffix = path14.replace(pluralWorkspacePrefix, "/workspace");
|
|
20539
20442
|
if (req.method === "GET") {
|
|
20540
20443
|
if (suffix === "/workspace/mcp" || suffix === "/workspace/skills" || suffix === "/workspace/tools" || suffix === "/workspace/providers" || suffix === "/workspace/env" || suffix === "/workspace/preflight" || suffix === "/workspace/hooks" || suffix === "/workspace/settings" || suffix === "/workspace/voice" || suffix === "/workspace/permissions" || suffix === "/workspace/trust" || suffix === "/workspace/memory" || suffix === "/workspace/agents") {
|
|
20541
20444
|
return { route: `GET ${suffix}` };
|
|
@@ -20594,58 +20497,58 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20594
20497
|
return { route: "DELETE /workspace/session-groups/:groupId" };
|
|
20595
20498
|
}
|
|
20596
20499
|
}
|
|
20597
|
-
if (req.method === "POST" &&
|
|
20500
|
+
if (req.method === "POST" && path14 === "/workspace/init") {
|
|
20598
20501
|
return { route: "POST /workspace/init" };
|
|
20599
20502
|
}
|
|
20600
|
-
if (req.method === "POST" &&
|
|
20503
|
+
if (req.method === "POST" && path14 === "/workspace/setup-github") {
|
|
20601
20504
|
return { route: "POST /workspace/setup-github" };
|
|
20602
20505
|
}
|
|
20603
|
-
if (req.method === "POST" &&
|
|
20506
|
+
if (req.method === "POST" && path14 === "/workspace/reload") {
|
|
20604
20507
|
return { route: "POST /workspace/reload" };
|
|
20605
20508
|
}
|
|
20606
|
-
const mcpRestart =
|
|
20509
|
+
const mcpRestart = path14.match(/^\/workspace\/mcp\/([^/]+)\/restart$/);
|
|
20607
20510
|
if (mcpRestart?.[1] && req.method === "POST") {
|
|
20608
20511
|
return { route: "POST /workspace/mcp/:server/restart" };
|
|
20609
20512
|
}
|
|
20610
|
-
if (req.method === "POST" &&
|
|
20513
|
+
if (req.method === "POST" && path14 === "/workspace/mcp/servers") {
|
|
20611
20514
|
return { route: "POST /workspace/mcp/servers" };
|
|
20612
20515
|
}
|
|
20613
|
-
const mcpDelete =
|
|
20516
|
+
const mcpDelete = path14.match(/^\/workspace\/mcp\/servers\/([^/]+)$/);
|
|
20614
20517
|
if (mcpDelete?.[1] && req.method === "DELETE") {
|
|
20615
20518
|
return { route: "DELETE /workspace/mcp/servers/:name" };
|
|
20616
20519
|
}
|
|
20617
|
-
if (req.method === "POST" &&
|
|
20520
|
+
if (req.method === "POST" && path14 === "/workspace/auth/device-flow") {
|
|
20618
20521
|
return { route: "POST /workspace/auth/device-flow" };
|
|
20619
20522
|
}
|
|
20620
|
-
const deviceFlowDelete =
|
|
20523
|
+
const deviceFlowDelete = path14.match(
|
|
20621
20524
|
/^\/workspace\/auth\/device-flow\/([^/]+)$/
|
|
20622
20525
|
);
|
|
20623
20526
|
if (deviceFlowDelete?.[1] && req.method === "DELETE") {
|
|
20624
20527
|
return { route: "DELETE /workspace/auth/device-flow/:id" };
|
|
20625
20528
|
}
|
|
20626
|
-
const toolEnable =
|
|
20529
|
+
const toolEnable = path14.match(/^\/workspace\/tools\/([^/]+)\/enable$/);
|
|
20627
20530
|
if (toolEnable?.[1] && req.method === "POST") {
|
|
20628
20531
|
return { route: "POST /workspace/tools/:name/enable" };
|
|
20629
20532
|
}
|
|
20630
|
-
if (
|
|
20533
|
+
if (path14 === "/workspace/settings") {
|
|
20631
20534
|
if (req.method === "GET") return { route: "GET /workspace/settings" };
|
|
20632
20535
|
if (req.method === "POST") return { route: "POST /workspace/settings" };
|
|
20633
20536
|
}
|
|
20634
|
-
if (
|
|
20537
|
+
if (path14 === "/workspace/permissions") {
|
|
20635
20538
|
if (req.method === "GET") return { route: "GET /workspace/permissions" };
|
|
20636
20539
|
if (req.method === "POST") return { route: "POST /workspace/permissions" };
|
|
20637
20540
|
}
|
|
20638
|
-
if (
|
|
20541
|
+
if (path14 === "/workspace/trust") {
|
|
20639
20542
|
if (req.method === "GET") return { route: "GET /workspace/trust" };
|
|
20640
20543
|
}
|
|
20641
|
-
if (req.method === "POST" &&
|
|
20544
|
+
if (req.method === "POST" && path14 === "/workspace/trust/request") {
|
|
20642
20545
|
return { route: "POST /workspace/trust/request" };
|
|
20643
20546
|
}
|
|
20644
|
-
if (
|
|
20547
|
+
if (path14 === "/workspace/voice") {
|
|
20645
20548
|
if (req.method === "GET") return { route: "GET /workspace/voice" };
|
|
20646
20549
|
if (req.method === "POST") return { route: "POST /workspace/voice" };
|
|
20647
20550
|
}
|
|
20648
|
-
if (req.method === "POST" &&
|
|
20551
|
+
if (req.method === "POST" && path14 === "/workspace/voice/transcribe") {
|
|
20649
20552
|
return { route: "POST /workspace/voice/transcribe" };
|
|
20650
20553
|
}
|
|
20651
20554
|
return void 0;
|
|
@@ -20914,7 +20817,7 @@ __name(registerPermissionRoutes, "registerPermissionRoutes");
|
|
|
20914
20817
|
init_esbuild_shims();
|
|
20915
20818
|
import * as crypto3 from "node:crypto";
|
|
20916
20819
|
import * as fs5 from "node:fs";
|
|
20917
|
-
import * as
|
|
20820
|
+
import * as path9 from "node:path";
|
|
20918
20821
|
|
|
20919
20822
|
// packages/cli/src/serve/server/prompt-deadline.ts
|
|
20920
20823
|
init_esbuild_shims();
|
|
@@ -22339,7 +22242,7 @@ var GIT_RESERVED_BRANCH = "HEAD";
|
|
|
22339
22242
|
var MAX_BRANCH_NAME_BYTES = 1e3;
|
|
22340
22243
|
var MAX_BRANCH_COMPONENT_BYTES = 200;
|
|
22341
22244
|
var HTTP_SESSION_ID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
22342
|
-
var WORKSPACE_TRANSCRIPT_RESPONSE_MAX_BYTES =
|
|
22245
|
+
var WORKSPACE_TRANSCRIPT_RESPONSE_MAX_BYTES = 2 * SESSION_TRANSCRIPT_MAX_EXPANDED_PAGE_BYTES;
|
|
22343
22246
|
var WORKSPACE_TRANSCRIPT_CURSOR_MAX_BYTES = 64 * 1024;
|
|
22344
22247
|
var TRANSCRIPT_CURSOR_TOO_LARGE_REPLAY_ERROR = "Transcript pagination state exceeds the safe limit";
|
|
22345
22248
|
var CHANNEL_DELIVERY_AUTHORIZATION_GRACE_MS = 6e4;
|
|
@@ -22682,7 +22585,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
22682
22585
|
const workspaceParam = req.params[paramName] ?? "";
|
|
22683
22586
|
const byId = workspaceRegistry.getByWorkspaceId(workspaceParam);
|
|
22684
22587
|
if (byId) return byId;
|
|
22685
|
-
if (!
|
|
22588
|
+
if (!path9.isAbsolute(workspaceParam)) {
|
|
22686
22589
|
res.status(400).json({
|
|
22687
22590
|
error: `\`:${paramName}\` must decode to a workspace id or absolute path`
|
|
22688
22591
|
});
|
|
@@ -23573,7 +23476,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23573
23476
|
if (worktreeMeta) {
|
|
23574
23477
|
try {
|
|
23575
23478
|
const createAllowedRoots = [
|
|
23576
|
-
|
|
23479
|
+
path9.join(workspaceCwd, ".qwen", "worktrees")
|
|
23577
23480
|
];
|
|
23578
23481
|
let createRepoTop = null;
|
|
23579
23482
|
try {
|
|
@@ -23584,7 +23487,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23584
23487
|
}
|
|
23585
23488
|
if (createRepoTop && createRepoTop !== workspaceCwd) {
|
|
23586
23489
|
createAllowedRoots.push(
|
|
23587
|
-
|
|
23490
|
+
path9.join(createRepoTop, ".qwen", "worktrees")
|
|
23588
23491
|
);
|
|
23589
23492
|
}
|
|
23590
23493
|
await runtime.bridge.changeSessionCwd(session.sessionId, {
|
|
@@ -23883,7 +23786,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23883
23786
|
if (sidecar) {
|
|
23884
23787
|
let realTarget;
|
|
23885
23788
|
const candidateRoots = [
|
|
23886
|
-
|
|
23789
|
+
path9.join(workspaceCwd, ".qwen", "worktrees")
|
|
23887
23790
|
];
|
|
23888
23791
|
try {
|
|
23889
23792
|
realTarget = fs5.realpathSync(sidecar.worktreePath);
|
|
@@ -23895,13 +23798,13 @@ function registerSessionRoutes(app, deps) {
|
|
|
23895
23798
|
} catch {
|
|
23896
23799
|
}
|
|
23897
23800
|
if (repoTop && repoTop !== workspaceCwd) {
|
|
23898
|
-
candidateRoots.push(
|
|
23801
|
+
candidateRoots.push(path9.join(repoTop, ".qwen", "worktrees"));
|
|
23899
23802
|
}
|
|
23900
23803
|
const contained = candidateRoots.some((root) => {
|
|
23901
23804
|
try {
|
|
23902
23805
|
const realRoot = fs5.realpathSync(root);
|
|
23903
|
-
const rel =
|
|
23904
|
-
return !rel.startsWith("..") && !
|
|
23806
|
+
const rel = path9.relative(realRoot, realTarget);
|
|
23807
|
+
return !rel.startsWith("..") && !path9.isAbsolute(rel);
|
|
23905
23808
|
} catch {
|
|
23906
23809
|
return false;
|
|
23907
23810
|
}
|
|
@@ -24217,7 +24120,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
24217
24120
|
async (req, res, sessionId, runtime) => {
|
|
24218
24121
|
const body = safeBody(req);
|
|
24219
24122
|
const targetPath = body["path"];
|
|
24220
|
-
if (typeof targetPath !== "string" || targetPath.length === 0 || !
|
|
24123
|
+
if (typeof targetPath !== "string" || targetPath.length === 0 || !path9.isAbsolute(targetPath)) {
|
|
24221
24124
|
res.status(400).json({
|
|
24222
24125
|
error: "`path` is required and must be an absolute path",
|
|
24223
24126
|
code: "invalid_path"
|
|
@@ -27251,7 +27154,7 @@ __name(registerUsageStatsRoutes, "registerUsageStatsRoutes");
|
|
|
27251
27154
|
// packages/cli/src/serve/scheduled-task-keepalive.ts
|
|
27252
27155
|
init_esbuild_shims();
|
|
27253
27156
|
import * as fsSync from "node:fs";
|
|
27254
|
-
import * as
|
|
27157
|
+
import * as path10 from "node:path";
|
|
27255
27158
|
var log = createDebugLogger("SCHED_KEEPALIVE");
|
|
27256
27159
|
function collectBoundSessionIds(tasks) {
|
|
27257
27160
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -27477,8 +27380,8 @@ function startScheduledTaskKeepalive(opts) {
|
|
|
27477
27380
|
opts.runtimeBaseDir,
|
|
27478
27381
|
() => getCronFilePath(boundWorkspace)
|
|
27479
27382
|
);
|
|
27480
|
-
const cronDir =
|
|
27481
|
-
const cronFileName =
|
|
27383
|
+
const cronDir = path10.dirname(cronFilePath);
|
|
27384
|
+
const cronFileName = path10.basename(cronFilePath);
|
|
27482
27385
|
let fileWatcher;
|
|
27483
27386
|
try {
|
|
27484
27387
|
fsSync.mkdirSync(cronDir, { recursive: true });
|
|
@@ -28942,6 +28845,8 @@ __name(registerWorkspaceQualifiedSettingsRoutes, "registerWorkspaceQualifiedSett
|
|
|
28942
28845
|
|
|
28943
28846
|
// packages/cli/src/serve/routes/sse-events.ts
|
|
28944
28847
|
init_esbuild_shims();
|
|
28848
|
+
import { randomUUID as randomUUID7 } from "node:crypto";
|
|
28849
|
+
import { performance as performance2 } from "node:perf_hooks";
|
|
28945
28850
|
|
|
28946
28851
|
// packages/cli/src/serve/server/error-response.ts
|
|
28947
28852
|
init_esbuild_shims();
|
|
@@ -29526,6 +29431,39 @@ __name(errorPayload, "errorPayload");
|
|
|
29526
29431
|
|
|
29527
29432
|
// packages/cli/src/serve/routes/sse-events.ts
|
|
29528
29433
|
var activeSseCount = 0;
|
|
29434
|
+
var SSE_STREAM_ID_HEADER = "X-Qwen-SSE-Stream-Id";
|
|
29435
|
+
var SSE_STREAM_ID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
29436
|
+
var SSE_CONNECT_REASONS = [
|
|
29437
|
+
"initial",
|
|
29438
|
+
"resume",
|
|
29439
|
+
"prompt_restart",
|
|
29440
|
+
"stream_end",
|
|
29441
|
+
"transport_error",
|
|
29442
|
+
"state_resync",
|
|
29443
|
+
"unknown"
|
|
29444
|
+
];
|
|
29445
|
+
var SSE_CONNECT_REASON_SET = new Set(
|
|
29446
|
+
SSE_CONNECT_REASONS
|
|
29447
|
+
);
|
|
29448
|
+
function parseSseConnectReason(raw) {
|
|
29449
|
+
return typeof raw === "string" && SSE_CONNECT_REASON_SET.has(raw) ? raw : "unknown";
|
|
29450
|
+
}
|
|
29451
|
+
__name(parseSseConnectReason, "parseSseConnectReason");
|
|
29452
|
+
function parsePreviousSseStreamId(raw) {
|
|
29453
|
+
return typeof raw === "string" && SSE_STREAM_ID_RE.test(raw) ? raw.toLowerCase() : void 0;
|
|
29454
|
+
}
|
|
29455
|
+
__name(parsePreviousSseStreamId, "parsePreviousSseStreamId");
|
|
29456
|
+
function parseSseClientId(raw) {
|
|
29457
|
+
return typeof raw === "string" && raw.length > 0 && raw.length <= MAX_CLIENT_ID_LENGTH && CLIENT_ID_RE.test(raw) ? raw : void 0;
|
|
29458
|
+
}
|
|
29459
|
+
__name(parseSseClientId, "parseSseClientId");
|
|
29460
|
+
function boundedDiagnosticString(value) {
|
|
29461
|
+
return Array.from(value.slice(0, 256)).slice(0, 128).map((character) => {
|
|
29462
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
29463
|
+
return codePoint <= 31 || codePoint >= 127 && codePoint <= 159 || codePoint === 8232 || codePoint === 8233 || codePoint >= 8234 && codePoint <= 8238 || codePoint >= 8294 && codePoint <= 8297 ? " " : character;
|
|
29464
|
+
}).join("");
|
|
29465
|
+
}
|
|
29466
|
+
__name(boundedDiagnosticString, "boundedDiagnosticString");
|
|
29529
29467
|
function getActiveSseCount() {
|
|
29530
29468
|
return activeSseCount;
|
|
29531
29469
|
}
|
|
@@ -29551,6 +29489,134 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29551
29489
|
const { workspaceRegistry, daemonLog, sendBridgeError: sendBridgeError2, writerIdleTimeoutMs } = deps;
|
|
29552
29490
|
app.get("/session/:id/events", async (req, res) => {
|
|
29553
29491
|
const sessionId = req.params["id"];
|
|
29492
|
+
const diagnosticSessionId = boundedDiagnosticString(sessionId);
|
|
29493
|
+
const streamId = randomUUID7();
|
|
29494
|
+
const clientId = parseSseClientId(req.headers["x-qwen-client-id"]);
|
|
29495
|
+
const connectReason = parseSseConnectReason(req.query["connectReason"]);
|
|
29496
|
+
const previousStreamId = parsePreviousSseStreamId(
|
|
29497
|
+
req.query["previousStreamId"]
|
|
29498
|
+
);
|
|
29499
|
+
const telemetryContext = captureDaemonTelemetryContext();
|
|
29500
|
+
const telemetryBaseAttributes = {
|
|
29501
|
+
"session.id": sessionId,
|
|
29502
|
+
"qwen-code.daemon.sse.stream_id": streamId,
|
|
29503
|
+
"qwen-code.daemon.sse.client_reported_connect_reason": connectReason,
|
|
29504
|
+
...clientId ? { "qwen-code.client_id": clientId } : {},
|
|
29505
|
+
...previousStreamId ? {
|
|
29506
|
+
"qwen-code.daemon.sse.client_reported_previous_stream_id": previousStreamId
|
|
29507
|
+
} : {}
|
|
29508
|
+
};
|
|
29509
|
+
const emitLifecycleLog = /* @__PURE__ */ __name((eventName, body, attributes = {}) => {
|
|
29510
|
+
void runWithDaemonTelemetryContext(telemetryContext, async () => {
|
|
29511
|
+
emitDaemonLog(
|
|
29512
|
+
body,
|
|
29513
|
+
{ ...telemetryBaseAttributes, ...attributes },
|
|
29514
|
+
{ eventName }
|
|
29515
|
+
);
|
|
29516
|
+
}).catch(() => {
|
|
29517
|
+
});
|
|
29518
|
+
}, "emitLifecycleLog");
|
|
29519
|
+
let slowWarningCount = 0;
|
|
29520
|
+
let eventBusEvictionReason;
|
|
29521
|
+
const onSubscriberDiagnostic = /* @__PURE__ */ __name((diagnostic) => {
|
|
29522
|
+
const triggerEventType = boundedDiagnosticString(
|
|
29523
|
+
diagnostic.data.triggerEventType
|
|
29524
|
+
);
|
|
29525
|
+
const common = {
|
|
29526
|
+
queueSize: diagnostic.data.queueSize,
|
|
29527
|
+
maxQueued: diagnostic.data.maxQueued,
|
|
29528
|
+
queuedBytes: diagnostic.data.queuedBytes,
|
|
29529
|
+
maxQueuedBytes: diagnostic.data.maxQueuedBytes,
|
|
29530
|
+
triggerEventType,
|
|
29531
|
+
triggerEventBytes: diagnostic.data.triggerEventBytes
|
|
29532
|
+
};
|
|
29533
|
+
const telemetryCommon = {
|
|
29534
|
+
"qwen-code.daemon.sse.queue_size": common.queueSize,
|
|
29535
|
+
"qwen-code.daemon.sse.max_queued": common.maxQueued,
|
|
29536
|
+
"qwen-code.daemon.sse.queued_bytes": common.queuedBytes,
|
|
29537
|
+
"qwen-code.daemon.sse.max_queued_bytes": common.maxQueuedBytes,
|
|
29538
|
+
"qwen-code.daemon.sse.trigger_event_type": common.triggerEventType,
|
|
29539
|
+
"qwen-code.daemon.sse.trigger_event_bytes": common.triggerEventBytes
|
|
29540
|
+
};
|
|
29541
|
+
let handled = false;
|
|
29542
|
+
if (diagnostic.type === "slow_client_warning") {
|
|
29543
|
+
slowWarningCount += 1;
|
|
29544
|
+
const context = {
|
|
29545
|
+
sessionId: diagnosticSessionId,
|
|
29546
|
+
clientId,
|
|
29547
|
+
streamId,
|
|
29548
|
+
connectReason,
|
|
29549
|
+
previousStreamId,
|
|
29550
|
+
...common,
|
|
29551
|
+
threshold: diagnostic.data.threshold,
|
|
29552
|
+
lastEventId: diagnostic.data.lastEventId
|
|
29553
|
+
};
|
|
29554
|
+
try {
|
|
29555
|
+
if (daemonLog) {
|
|
29556
|
+
daemonLog.warn("SSE slow client warning", context);
|
|
29557
|
+
} else {
|
|
29558
|
+
writeStderrLine(
|
|
29559
|
+
`qwen serve: SSE slow client warning ${JSON.stringify(context)}`
|
|
29560
|
+
);
|
|
29561
|
+
}
|
|
29562
|
+
handled = true;
|
|
29563
|
+
} catch {
|
|
29564
|
+
handled = false;
|
|
29565
|
+
}
|
|
29566
|
+
emitLifecycleLog(
|
|
29567
|
+
"qwen-code.daemon.sse.slow_client_warning",
|
|
29568
|
+
"Daemon SSE slow client warning.",
|
|
29569
|
+
{
|
|
29570
|
+
...telemetryCommon,
|
|
29571
|
+
"qwen-code.daemon.sse.threshold": diagnostic.data.threshold,
|
|
29572
|
+
"qwen-code.daemon.sse.last_event_id": diagnostic.data.lastEventId
|
|
29573
|
+
}
|
|
29574
|
+
);
|
|
29575
|
+
} else {
|
|
29576
|
+
eventBusEvictionReason = boundedDiagnosticString(
|
|
29577
|
+
diagnostic.data.reason
|
|
29578
|
+
);
|
|
29579
|
+
const threshold = diagnostic.data.reason === "queue_bytes_overflow" ? "bytes" : "frames";
|
|
29580
|
+
const context = {
|
|
29581
|
+
sessionId: diagnosticSessionId,
|
|
29582
|
+
clientId,
|
|
29583
|
+
streamId,
|
|
29584
|
+
connectReason,
|
|
29585
|
+
previousStreamId,
|
|
29586
|
+
...common,
|
|
29587
|
+
threshold,
|
|
29588
|
+
reason: eventBusEvictionReason,
|
|
29589
|
+
droppedAfter: diagnostic.data.droppedAfter,
|
|
29590
|
+
...diagnostic.data.eventBytes !== void 0 ? { eventBytes: diagnostic.data.eventBytes } : {}
|
|
29591
|
+
};
|
|
29592
|
+
try {
|
|
29593
|
+
if (daemonLog) {
|
|
29594
|
+
daemonLog.warn("SSE client evicted", context);
|
|
29595
|
+
} else {
|
|
29596
|
+
writeStderrLine(
|
|
29597
|
+
`qwen serve: SSE client evicted ${JSON.stringify(context)}`
|
|
29598
|
+
);
|
|
29599
|
+
}
|
|
29600
|
+
handled = true;
|
|
29601
|
+
} catch {
|
|
29602
|
+
handled = false;
|
|
29603
|
+
}
|
|
29604
|
+
emitLifecycleLog(
|
|
29605
|
+
"qwen-code.daemon.sse.client_evicted",
|
|
29606
|
+
"Daemon SSE client evicted.",
|
|
29607
|
+
{
|
|
29608
|
+
...telemetryCommon,
|
|
29609
|
+
"qwen-code.daemon.sse.threshold": threshold,
|
|
29610
|
+
"qwen-code.daemon.sse.event_bus_eviction_reason": eventBusEvictionReason,
|
|
29611
|
+
"qwen-code.daemon.sse.dropped_after_event_id": diagnostic.data.droppedAfter,
|
|
29612
|
+
...diagnostic.data.eventBytes !== void 0 ? {
|
|
29613
|
+
"qwen-code.daemon.sse.rejected_event_bytes": diagnostic.data.eventBytes
|
|
29614
|
+
} : {}
|
|
29615
|
+
}
|
|
29616
|
+
);
|
|
29617
|
+
}
|
|
29618
|
+
return handled;
|
|
29619
|
+
}, "onSubscriberDiagnostic");
|
|
29554
29620
|
const lastEventId = parseLastEventId(req.headers["last-event-id"]);
|
|
29555
29621
|
const eventEpoch = parseEventEpochHeader(req.headers["x-qwen-event-epoch"]);
|
|
29556
29622
|
const maxQueued = parseMaxQueuedQuery(req.query["maxQueued"], res);
|
|
@@ -29572,13 +29638,15 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29572
29638
|
const iterable = virtualKey ? await deps.virtualSubagentSessions?.subscribe(runtime, sessionId, {
|
|
29573
29639
|
signal: abort.signal,
|
|
29574
29640
|
lastEventId,
|
|
29575
|
-
...maxQueued !== void 0 ? { maxQueued } : {}
|
|
29641
|
+
...maxQueued !== void 0 ? { maxQueued } : {},
|
|
29642
|
+
onSubscriberDiagnostic
|
|
29576
29643
|
}) : runtime.bridge.subscribeEvents(sessionId, {
|
|
29577
29644
|
signal: abort.signal,
|
|
29578
29645
|
lastEventId,
|
|
29579
29646
|
...eventEpoch !== void 0 ? { epoch: eventEpoch } : {},
|
|
29580
29647
|
...maxQueued !== void 0 ? { maxQueued } : {},
|
|
29581
|
-
...snapshot ? { snapshot: true } : {}
|
|
29648
|
+
...snapshot ? { snapshot: true } : {},
|
|
29649
|
+
onSubscriberDiagnostic
|
|
29582
29650
|
});
|
|
29583
29651
|
if (!iterable) {
|
|
29584
29652
|
res.status(404).json({
|
|
@@ -29599,7 +29667,7 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29599
29667
|
} catch (err) {
|
|
29600
29668
|
if (err instanceof SubscriberLimitExceededError) {
|
|
29601
29669
|
writeStderrLine(
|
|
29602
|
-
`qwen serve: subscriber limit reached for session ${
|
|
29670
|
+
`qwen serve: subscriber limit reached for session ${diagnosticSessionId} (limit=${err.limit}); rejecting new SSE client with 429`
|
|
29603
29671
|
);
|
|
29604
29672
|
res.setHeader("Retry-After", "5");
|
|
29605
29673
|
res.status(429).json({
|
|
@@ -29615,21 +29683,84 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29615
29683
|
});
|
|
29616
29684
|
return;
|
|
29617
29685
|
}
|
|
29618
|
-
|
|
29619
|
-
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29624
|
-
|
|
29625
|
-
|
|
29626
|
-
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29686
|
+
const openedAt = performance2.now();
|
|
29687
|
+
let closeReason;
|
|
29688
|
+
let terminalCandidate;
|
|
29689
|
+
let terminalEventType;
|
|
29690
|
+
let eventFramesWriteSettled = 0;
|
|
29691
|
+
let lastEventIdWritten;
|
|
29692
|
+
let backpressureCount = 0;
|
|
29693
|
+
let maxDrainWaitMs = 0;
|
|
29694
|
+
let activeDrainStartedAt;
|
|
29695
|
+
let maxLivePublishToWriteSettledMs = 0;
|
|
29696
|
+
let liveTimingEnabled = lastEventId === void 0;
|
|
29697
|
+
let finalized = false;
|
|
29698
|
+
let sseCounted = false;
|
|
29699
|
+
const finalize = /* @__PURE__ */ __name(() => {
|
|
29700
|
+
if (finalized) return;
|
|
29701
|
+
finalized = true;
|
|
29702
|
+
if (activeDrainStartedAt !== void 0) {
|
|
29703
|
+
maxDrainWaitMs = Math.max(
|
|
29704
|
+
maxDrainWaitMs,
|
|
29705
|
+
performance2.now() - activeDrainStartedAt
|
|
29706
|
+
);
|
|
29707
|
+
}
|
|
29708
|
+
const durationMs = Math.max(0, performance2.now() - openedAt);
|
|
29709
|
+
const resolvedCloseReason = closeReason ?? terminalCandidate ?? "client_disconnect";
|
|
29710
|
+
const closeAttributes = {
|
|
29711
|
+
"qwen-code.daemon.sse.duration_ms": durationMs,
|
|
29712
|
+
"qwen-code.daemon.sse.event_frames_write_settled": eventFramesWriteSettled,
|
|
29713
|
+
"qwen-code.daemon.sse.backpressure_count": backpressureCount,
|
|
29714
|
+
"qwen-code.daemon.sse.max_drain_wait_ms": maxDrainWaitMs,
|
|
29715
|
+
"qwen-code.daemon.sse.max_live_publish_to_write_settled_ms": maxLivePublishToWriteSettledMs,
|
|
29716
|
+
"qwen-code.daemon.sse.slow_warning_count": slowWarningCount,
|
|
29717
|
+
"qwen-code.daemon.sse.close_reason": resolvedCloseReason,
|
|
29718
|
+
...lastEventIdWritten !== void 0 ? {
|
|
29719
|
+
"qwen-code.daemon.sse.last_event_id_written": lastEventIdWritten
|
|
29720
|
+
} : {},
|
|
29721
|
+
...eventBusEvictionReason ? {
|
|
29722
|
+
"qwen-code.daemon.sse.event_bus_eviction_reason": eventBusEvictionReason
|
|
29723
|
+
} : {},
|
|
29724
|
+
...terminalEventType ? {
|
|
29725
|
+
"qwen-code.daemon.sse.terminal_event_type": terminalEventType
|
|
29726
|
+
} : {}
|
|
29727
|
+
};
|
|
29728
|
+
void runWithDaemonTelemetryContext(telemetryContext, async () => {
|
|
29729
|
+
for (const [key, value] of Object.entries(closeAttributes)) {
|
|
29730
|
+
addDaemonRequestAttribute(key, value);
|
|
29731
|
+
}
|
|
29732
|
+
emitDaemonLog(
|
|
29733
|
+
"Daemon SSE stream closed.",
|
|
29734
|
+
{ ...telemetryBaseAttributes, ...closeAttributes },
|
|
29735
|
+
{ eventName: "qwen-code.daemon.sse.closed" }
|
|
29736
|
+
);
|
|
29737
|
+
}).catch(() => {
|
|
29631
29738
|
});
|
|
29632
|
-
|
|
29739
|
+
try {
|
|
29740
|
+
daemonLog?.info("SSE stream closed", {
|
|
29741
|
+
sessionId: diagnosticSessionId,
|
|
29742
|
+
clientId,
|
|
29743
|
+
streamId,
|
|
29744
|
+
connectReason,
|
|
29745
|
+
previousStreamId,
|
|
29746
|
+
closeReason: resolvedCloseReason,
|
|
29747
|
+
durationMs,
|
|
29748
|
+
eventFramesWriteSettled,
|
|
29749
|
+
lastEventIdWritten,
|
|
29750
|
+
backpressureCount,
|
|
29751
|
+
maxDrainWaitMs,
|
|
29752
|
+
maxLivePublishToWriteSettledMs,
|
|
29753
|
+
slowWarningCount,
|
|
29754
|
+
eventBusEvictionReason,
|
|
29755
|
+
terminalEventType
|
|
29756
|
+
});
|
|
29757
|
+
} catch {
|
|
29758
|
+
}
|
|
29759
|
+
if (sseCounted) {
|
|
29760
|
+
sseCounted = false;
|
|
29761
|
+
activeSseCount--;
|
|
29762
|
+
}
|
|
29763
|
+
}, "finalize");
|
|
29633
29764
|
res.status(200);
|
|
29634
29765
|
res.setHeader("Content-Type", "text/event-stream");
|
|
29635
29766
|
res.setHeader("Cache-Control", "no-cache, no-transform");
|
|
@@ -29638,49 +29769,92 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29638
29769
|
if (busEpoch !== void 0) {
|
|
29639
29770
|
res.setHeader("X-Qwen-Event-Epoch", busEpoch);
|
|
29640
29771
|
}
|
|
29641
|
-
res.
|
|
29772
|
+
res.setHeader(SSE_STREAM_ID_HEADER, streamId);
|
|
29773
|
+
res.prependOnceListener("finish", finalize);
|
|
29774
|
+
res.prependOnceListener("close", finalize);
|
|
29642
29775
|
activeSseCount++;
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29776
|
+
sseCounted = true;
|
|
29777
|
+
for (const [key, value] of Object.entries(telemetryBaseAttributes)) {
|
|
29778
|
+
addDaemonRequestAttribute(key, value);
|
|
29779
|
+
}
|
|
29780
|
+
try {
|
|
29781
|
+
daemonLog?.info("SSE stream opened", {
|
|
29782
|
+
sessionId: diagnosticSessionId,
|
|
29783
|
+
clientId,
|
|
29784
|
+
streamId,
|
|
29785
|
+
connectReason,
|
|
29786
|
+
previousStreamId,
|
|
29787
|
+
lastEventId
|
|
29788
|
+
});
|
|
29789
|
+
} catch {
|
|
29790
|
+
}
|
|
29791
|
+
emitLifecycleLog(
|
|
29792
|
+
"qwen-code.daemon.sse.opened",
|
|
29793
|
+
"Daemon SSE stream opened.",
|
|
29794
|
+
{
|
|
29795
|
+
...lastEventId !== void 0 ? { "qwen-code.daemon.sse.resume_from_event_id": lastEventId } : {}
|
|
29648
29796
|
}
|
|
29649
|
-
|
|
29797
|
+
);
|
|
29798
|
+
try {
|
|
29799
|
+
res.flushHeaders();
|
|
29800
|
+
} catch {
|
|
29801
|
+
closeReason = "socket_error";
|
|
29802
|
+
abort.abort();
|
|
29803
|
+
finalize();
|
|
29804
|
+
try {
|
|
29805
|
+
if (!res.writableEnded) res.end();
|
|
29806
|
+
} catch {
|
|
29807
|
+
}
|
|
29808
|
+
return;
|
|
29809
|
+
}
|
|
29650
29810
|
let writeChain = Promise.resolve();
|
|
29651
29811
|
const trackWriterIdle = writerIdleTimeoutMs !== void 0 && writerIdleTimeoutMs > 0;
|
|
29652
29812
|
let lastWriteAt = trackWriterIdle ? Date.now() : 0;
|
|
29813
|
+
const settleDrainMeasurement = /* @__PURE__ */ __name(() => {
|
|
29814
|
+
if (activeDrainStartedAt === void 0) return;
|
|
29815
|
+
maxDrainWaitMs = Math.max(
|
|
29816
|
+
maxDrainWaitMs,
|
|
29817
|
+
performance2.now() - activeDrainStartedAt
|
|
29818
|
+
);
|
|
29819
|
+
activeDrainStartedAt = void 0;
|
|
29820
|
+
}, "settleDrainMeasurement");
|
|
29653
29821
|
const doWrite = /* @__PURE__ */ __name((chunk) => new Promise((resolve5, reject) => {
|
|
29654
29822
|
if (res.writableEnded) {
|
|
29655
|
-
resolve5();
|
|
29823
|
+
resolve5("closed");
|
|
29656
29824
|
return;
|
|
29657
29825
|
}
|
|
29658
29826
|
let ok;
|
|
29659
29827
|
try {
|
|
29660
29828
|
ok = res.write(chunk);
|
|
29661
29829
|
} catch (err) {
|
|
29830
|
+
if (!closeReason) closeReason = "socket_error";
|
|
29662
29831
|
reject(err);
|
|
29663
29832
|
return;
|
|
29664
29833
|
}
|
|
29665
29834
|
if (ok) {
|
|
29666
29835
|
if (trackWriterIdle) lastWriteAt = Date.now();
|
|
29667
|
-
resolve5();
|
|
29836
|
+
resolve5("settled");
|
|
29668
29837
|
return;
|
|
29669
29838
|
}
|
|
29839
|
+
backpressureCount += 1;
|
|
29840
|
+
activeDrainStartedAt = performance2.now();
|
|
29670
29841
|
const onDrain = /* @__PURE__ */ __name(() => {
|
|
29671
29842
|
res.off("close", onClose);
|
|
29672
29843
|
res.off("error", onError);
|
|
29844
|
+
settleDrainMeasurement();
|
|
29673
29845
|
if (trackWriterIdle) lastWriteAt = Date.now();
|
|
29674
|
-
resolve5();
|
|
29846
|
+
resolve5("settled");
|
|
29675
29847
|
}, "onDrain");
|
|
29676
29848
|
const onClose = /* @__PURE__ */ __name(() => {
|
|
29677
29849
|
res.off("drain", onDrain);
|
|
29678
29850
|
res.off("error", onError);
|
|
29679
|
-
|
|
29851
|
+
settleDrainMeasurement();
|
|
29852
|
+
resolve5("closed");
|
|
29680
29853
|
}, "onClose");
|
|
29681
29854
|
const onError = /* @__PURE__ */ __name((err) => {
|
|
29682
29855
|
res.off("drain", onDrain);
|
|
29683
29856
|
res.off("close", onClose);
|
|
29857
|
+
settleDrainMeasurement();
|
|
29684
29858
|
reject(err);
|
|
29685
29859
|
}, "onError");
|
|
29686
29860
|
res.once("drain", onDrain);
|
|
@@ -29689,7 +29863,10 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29689
29863
|
}), "doWrite");
|
|
29690
29864
|
const writeWithBackpressure = /* @__PURE__ */ __name((chunk) => {
|
|
29691
29865
|
const next = writeChain.then(() => doWrite(chunk));
|
|
29692
|
-
writeChain = next.
|
|
29866
|
+
writeChain = next.then(
|
|
29867
|
+
() => void 0,
|
|
29868
|
+
() => void 0
|
|
29869
|
+
);
|
|
29693
29870
|
return next;
|
|
29694
29871
|
}, "writeWithBackpressure");
|
|
29695
29872
|
void writeWithBackpressure("retry: 3000\n\n").catch(() => {
|
|
@@ -29717,8 +29894,10 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29717
29894
|
if (res.writableEnded) return;
|
|
29718
29895
|
const idleForMs = Date.now() - lastWriteAt;
|
|
29719
29896
|
if (idleForMs < writerIdleTimeoutMsValue) return;
|
|
29897
|
+
closeReason = "writer_idle_timeout";
|
|
29898
|
+
terminalEventType = "client_evicted";
|
|
29720
29899
|
try {
|
|
29721
|
-
res.write(
|
|
29900
|
+
const settled = res.write(
|
|
29722
29901
|
formatSseFrame({
|
|
29723
29902
|
v: 1,
|
|
29724
29903
|
type: "client_evicted",
|
|
@@ -29730,14 +29909,37 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29730
29909
|
}
|
|
29731
29910
|
})
|
|
29732
29911
|
);
|
|
29912
|
+
if (settled) eventFramesWriteSettled += 1;
|
|
29733
29913
|
} catch {
|
|
29734
29914
|
}
|
|
29915
|
+
const idleContext = {
|
|
29916
|
+
sessionId: diagnosticSessionId,
|
|
29917
|
+
clientId,
|
|
29918
|
+
streamId,
|
|
29919
|
+
connectReason,
|
|
29920
|
+
previousStreamId,
|
|
29921
|
+
idleForMs,
|
|
29922
|
+
timeoutMs: writerIdleTimeoutMsValue
|
|
29923
|
+
};
|
|
29735
29924
|
try {
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
|
|
29925
|
+
if (daemonLog) {
|
|
29926
|
+
daemonLog.warn("SSE writer idle timeout", idleContext);
|
|
29927
|
+
} else {
|
|
29928
|
+
writeStderrLine(
|
|
29929
|
+
`qwen serve: evicting SSE client (session ${diagnosticSessionId}) \u2014 writer idle for ${idleForMs}ms > ${writerIdleTimeoutMsValue}ms timeout (streamId=${streamId}${clientId ? `, clientId=${clientId}` : ""})`
|
|
29930
|
+
);
|
|
29931
|
+
}
|
|
29739
29932
|
} catch {
|
|
29740
29933
|
}
|
|
29934
|
+
emitLifecycleLog(
|
|
29935
|
+
"qwen-code.daemon.sse.client_evicted",
|
|
29936
|
+
"Daemon SSE client evicted by writer idle timeout.",
|
|
29937
|
+
{
|
|
29938
|
+
"qwen-code.daemon.sse.writer_idle_for_ms": idleForMs,
|
|
29939
|
+
"qwen-code.daemon.sse.writer_idle_timeout_ms": writerIdleTimeoutMsValue,
|
|
29940
|
+
"qwen-code.daemon.sse.eviction_reason": "writer_idle_timeout"
|
|
29941
|
+
}
|
|
29942
|
+
);
|
|
29741
29943
|
cleanup();
|
|
29742
29944
|
try {
|
|
29743
29945
|
if (!res.writableEnded) res.end();
|
|
@@ -29748,33 +29950,123 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29748
29950
|
}
|
|
29749
29951
|
req.on("close", cleanup);
|
|
29750
29952
|
res.on("error", (err) => {
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29953
|
+
if (!closeReason) closeReason = "socket_error";
|
|
29954
|
+
try {
|
|
29955
|
+
if (daemonLog) {
|
|
29956
|
+
daemonLog.error("SSE socket error", err, {
|
|
29957
|
+
sessionId: diagnosticSessionId,
|
|
29958
|
+
clientId,
|
|
29959
|
+
streamId,
|
|
29960
|
+
connectReason,
|
|
29961
|
+
previousStreamId
|
|
29962
|
+
});
|
|
29963
|
+
} else {
|
|
29964
|
+
writeStderrLine(
|
|
29965
|
+
`qwen serve: SSE socket error (session ${diagnosticSessionId}): ${err.message} (streamId=${streamId}${clientId ? `, clientId=${clientId}` : ""})`
|
|
29966
|
+
);
|
|
29967
|
+
}
|
|
29968
|
+
} catch {
|
|
29969
|
+
}
|
|
29754
29970
|
cleanup();
|
|
29755
29971
|
});
|
|
29756
29972
|
void (async () => {
|
|
29757
29973
|
try {
|
|
29758
29974
|
while (true) {
|
|
29759
29975
|
const next = await iter.next();
|
|
29760
|
-
if (next.done)
|
|
29976
|
+
if (next.done) {
|
|
29977
|
+
if (!closeReason) {
|
|
29978
|
+
closeReason = terminalCandidate ?? "source_complete";
|
|
29979
|
+
}
|
|
29980
|
+
break;
|
|
29981
|
+
}
|
|
29761
29982
|
if (res.writableEnded) break;
|
|
29983
|
+
if (next.value.type === "client_evicted") {
|
|
29984
|
+
terminalCandidate = "event_bus_evicted";
|
|
29985
|
+
terminalEventType = next.value.type;
|
|
29986
|
+
const reason = next.value.data?.reason;
|
|
29987
|
+
if (typeof reason === "string") {
|
|
29988
|
+
eventBusEvictionReason = boundedDiagnosticString(reason);
|
|
29989
|
+
}
|
|
29990
|
+
} else if (next.value.type === "session_died" || next.value.type === "session_closed") {
|
|
29991
|
+
terminalCandidate = "session_terminal";
|
|
29992
|
+
terminalEventType = next.value.type;
|
|
29993
|
+
}
|
|
29762
29994
|
if (next.value.type === "state_resync_required") {
|
|
29763
29995
|
const data = next.value.data;
|
|
29764
29996
|
const gap = typeof data.earliestAvailableId === "number" && typeof data.lastDeliveredId === "number" ? data.earliestAvailableId - data.lastDeliveredId - 1 : void 0;
|
|
29765
|
-
|
|
29766
|
-
|
|
29997
|
+
const reason = typeof data.reason === "string" ? boundedDiagnosticString(data.reason) : "unknown";
|
|
29998
|
+
const detail = typeof data.detail === "string" ? boundedDiagnosticString(data.detail) : void 0;
|
|
29999
|
+
const context = {
|
|
30000
|
+
sessionId: diagnosticSessionId,
|
|
30001
|
+
clientId,
|
|
30002
|
+
streamId,
|
|
30003
|
+
connectReason,
|
|
30004
|
+
previousStreamId,
|
|
30005
|
+
lastEventId: data.lastDeliveredId,
|
|
30006
|
+
earliestInRing: data.earliestAvailableId,
|
|
30007
|
+
gap,
|
|
30008
|
+
reason,
|
|
30009
|
+
detail
|
|
30010
|
+
};
|
|
30011
|
+
try {
|
|
30012
|
+
if (daemonLog) {
|
|
30013
|
+
daemonLog.warn(
|
|
30014
|
+
"SSE ring eviction detected; consumer must call loadSession to recover",
|
|
30015
|
+
context
|
|
30016
|
+
);
|
|
30017
|
+
} else {
|
|
30018
|
+
writeStderrLine(
|
|
30019
|
+
`qwen serve: SSE ring eviction detected (session ${diagnosticSessionId}): lastEventId=${data.lastDeliveredId ?? "?"}, earliestInRing=${data.earliestAvailableId ?? "?"}, gap=${gap ?? "?"} events, reason=${typeof data.reason === "string" ? reason : "?"}` + (detail ? `, detail=${detail}` : "") + `, streamId=${streamId}` + (clientId ? `, clientId=${clientId}` : "") + `. Consumer must call loadSession to recover.`
|
|
30020
|
+
);
|
|
30021
|
+
}
|
|
30022
|
+
} catch {
|
|
30023
|
+
}
|
|
30024
|
+
emitLifecycleLog(
|
|
30025
|
+
"qwen-code.daemon.sse.state_resync_required",
|
|
30026
|
+
"Daemon SSE state resync required.",
|
|
30027
|
+
{
|
|
30028
|
+
"qwen-code.daemon.sse.resync_reason": reason,
|
|
30029
|
+
...detail ? { "qwen-code.daemon.sse.resync_detail": detail } : {},
|
|
30030
|
+
...typeof data.lastDeliveredId === "number" ? {
|
|
30031
|
+
"qwen-code.daemon.sse.resync_last_delivered_id": data.lastDeliveredId
|
|
30032
|
+
} : {},
|
|
30033
|
+
...typeof data.earliestAvailableId === "number" ? {
|
|
30034
|
+
"qwen-code.daemon.sse.resync_earliest_available_id": data.earliestAvailableId
|
|
30035
|
+
} : {},
|
|
30036
|
+
...gap !== void 0 ? { "qwen-code.daemon.sse.resync_gap_events": gap } : {}
|
|
30037
|
+
}
|
|
30038
|
+
);
|
|
30039
|
+
}
|
|
30040
|
+
const liveEvent = liveTimingEnabled;
|
|
30041
|
+
const serverTimestamp = next.value._meta?.["serverTimestamp"];
|
|
30042
|
+
const outcome = await writeWithBackpressure(
|
|
30043
|
+
formatSseFrame(next.value)
|
|
30044
|
+
);
|
|
30045
|
+
if (outcome === "closed") break;
|
|
30046
|
+
eventFramesWriteSettled += 1;
|
|
30047
|
+
if (typeof next.value.id === "number") {
|
|
30048
|
+
lastEventIdWritten = next.value.id;
|
|
30049
|
+
}
|
|
30050
|
+
if (liveEvent && typeof serverTimestamp === "number" && Number.isFinite(serverTimestamp)) {
|
|
30051
|
+
maxLivePublishToWriteSettledMs = Math.max(
|
|
30052
|
+
maxLivePublishToWriteSettledMs,
|
|
30053
|
+
Math.max(0, Date.now() - serverTimestamp)
|
|
29767
30054
|
);
|
|
29768
30055
|
}
|
|
29769
|
-
|
|
30056
|
+
if (next.value.type === "replay_complete") {
|
|
30057
|
+
liveTimingEnabled = true;
|
|
30058
|
+
}
|
|
29770
30059
|
}
|
|
29771
30060
|
} catch (err) {
|
|
29772
|
-
if (!
|
|
30061
|
+
if (!closeReason) {
|
|
30062
|
+
closeReason = "iterator_error";
|
|
30063
|
+
}
|
|
30064
|
+
if (!res.writableEnded && closeReason !== "socket_error") {
|
|
29773
30065
|
const errorKind = mapDomainErrorToErrorKind(err);
|
|
29774
30066
|
writeStderrLine(
|
|
29775
|
-
`qwen serve: bridge iterator error (session ${
|
|
30067
|
+
`qwen serve: bridge iterator error (session ${diagnosticSessionId}): ${errorMessage2(err)}` + (errorKind ? ` [${errorKind}]` : "")
|
|
29776
30068
|
);
|
|
29777
|
-
await writeWithBackpressure(
|
|
30069
|
+
const outcome = await writeWithBackpressure(
|
|
29778
30070
|
formatSseFrame({
|
|
29779
30071
|
v: 1,
|
|
29780
30072
|
type: "stream_error",
|
|
@@ -29783,8 +30075,8 @@ function registerSseEventsRoutes(app, deps) {
|
|
|
29783
30075
|
...errorKind ? { errorKind } : {}
|
|
29784
30076
|
}
|
|
29785
30077
|
})
|
|
29786
|
-
).catch(() =>
|
|
29787
|
-
|
|
30078
|
+
).catch(() => "closed");
|
|
30079
|
+
if (outcome === "settled") eventFramesWriteSettled += 1;
|
|
29788
30080
|
}
|
|
29789
30081
|
} finally {
|
|
29790
30082
|
cleanup();
|
|
@@ -30034,7 +30326,7 @@ __name(registerWorkspaceModelsRoutes, "registerWorkspaceModelsRoutes");
|
|
|
30034
30326
|
// packages/cli/src/serve/routes/a2ui-action.ts
|
|
30035
30327
|
init_esbuild_shims();
|
|
30036
30328
|
import * as fsp4 from "node:fs/promises";
|
|
30037
|
-
import * as
|
|
30329
|
+
import * as path11 from "node:path";
|
|
30038
30330
|
var A2UI_MIME = "application/a2ui+json";
|
|
30039
30331
|
var ACTION_TOOL = "action";
|
|
30040
30332
|
var CALL_TIMEOUT_MS = 15e3;
|
|
@@ -30057,7 +30349,7 @@ __name(usableServerConfig, "usableServerConfig");
|
|
|
30057
30349
|
async function findFromSettingsFile(workspaceCwd) {
|
|
30058
30350
|
try {
|
|
30059
30351
|
const raw = await fsp4.readFile(
|
|
30060
|
-
|
|
30352
|
+
path11.join(workspaceCwd, ".qwen", "settings.json"),
|
|
30061
30353
|
"utf8"
|
|
30062
30354
|
);
|
|
30063
30355
|
const settings = JSON.parse(raw);
|
|
@@ -30218,7 +30510,7 @@ __name(registerA2uiActionRoutes, "registerA2uiActionRoutes");
|
|
|
30218
30510
|
|
|
30219
30511
|
// packages/cli/src/serve/server/fs-factory.ts
|
|
30220
30512
|
init_esbuild_shims();
|
|
30221
|
-
import * as
|
|
30513
|
+
import * as path12 from "node:path";
|
|
30222
30514
|
var IDE_WORKSPACE_PATH_ENV_VAR = "QWEN_CODE_IDE_WORKSPACE_PATH";
|
|
30223
30515
|
function createDefaultFsAuditEmit() {
|
|
30224
30516
|
const WARN_EVERY = 100;
|
|
@@ -30293,14 +30585,14 @@ function parseIdeWorkspacePathEnv(value) {
|
|
|
30293
30585
|
const parsed = JSON.parse(value);
|
|
30294
30586
|
if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
|
|
30295
30587
|
return parsed.filter(
|
|
30296
|
-
(workspace) => workspace.length > 0 &&
|
|
30588
|
+
(workspace) => workspace.length > 0 && path12.isAbsolute(workspace)
|
|
30297
30589
|
);
|
|
30298
30590
|
}
|
|
30299
30591
|
throw new Error("IDE workspace path JSON must be a string array");
|
|
30300
30592
|
} catch {
|
|
30301
30593
|
}
|
|
30302
30594
|
}
|
|
30303
|
-
return value.split(
|
|
30595
|
+
return value.split(path12.delimiter).filter((workspace) => workspace.length > 0 && path12.isAbsolute(workspace));
|
|
30304
30596
|
}
|
|
30305
30597
|
__name(parseIdeWorkspacePathEnv, "parseIdeWorkspacePathEnv");
|
|
30306
30598
|
function dropNestedWorkspacesPreservingPrimary(workspaces) {
|
|
@@ -30569,9 +30861,9 @@ __name(setupDeviceFlowRegistry, "setupDeviceFlowRegistry");
|
|
|
30569
30861
|
|
|
30570
30862
|
// packages/cli/src/serve/server/error-handlers.ts
|
|
30571
30863
|
init_esbuild_shims();
|
|
30572
|
-
var
|
|
30864
|
+
var import_express2 = __toESM(require_express(), 1);
|
|
30573
30865
|
function installJsonBodyParser(app) {
|
|
30574
|
-
app.use(
|
|
30866
|
+
app.use(import_express2.default.json({ limit: "10mb" }));
|
|
30575
30867
|
app.use((err, _req, res, next) => {
|
|
30576
30868
|
if (sendJsonBodyParserError(res, err)) return;
|
|
30577
30869
|
next(err);
|
|
@@ -30625,10 +30917,10 @@ function installRateLimiter(app, opts, daemonLog, options = {}) {
|
|
|
30625
30917
|
{ tier, key: key.slice(0, 64) }
|
|
30626
30918
|
);
|
|
30627
30919
|
} : void 0,
|
|
30628
|
-
onError: daemonLog ? (err,
|
|
30920
|
+
onError: daemonLog ? (err, path14) => {
|
|
30629
30921
|
daemonLog.warn(
|
|
30630
30922
|
`rate limiter error (fail-open): ${err instanceof Error ? err.message : String(err)}`,
|
|
30631
|
-
{ path:
|
|
30923
|
+
{ path: path14 }
|
|
30632
30924
|
);
|
|
30633
30925
|
} : void 0
|
|
30634
30926
|
});
|
|
@@ -30824,7 +31116,7 @@ __name(registerWorkspaceQualifiedLifecycleRoutes, "registerWorkspaceQualifiedLif
|
|
|
30824
31116
|
init_esbuild_shims();
|
|
30825
31117
|
import { readdir as readdir2, stat as stat2 } from "node:fs/promises";
|
|
30826
31118
|
import { realpathSync as realpathSync3 } from "node:fs";
|
|
30827
|
-
import { basename as basename4, dirname as dirname4, isAbsolute as isAbsolute7, join as
|
|
31119
|
+
import { basename as basename4, dirname as dirname4, isAbsolute as isAbsolute7, join as join7, resolve as resolve4, sep as sep3 } from "node:path";
|
|
30828
31120
|
|
|
30829
31121
|
// packages/cli/src/serve/native-directory-picker.ts
|
|
30830
31122
|
init_esbuild_shims();
|
|
@@ -31210,7 +31502,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31210
31502
|
return;
|
|
31211
31503
|
}
|
|
31212
31504
|
const endsWithSep = prefix.endsWith("/") || process.platform === "win32" && prefix.endsWith("\\");
|
|
31213
|
-
const dir = endsWithSep ?
|
|
31505
|
+
const dir = endsWithSep ? join7(prefix, ".") : dirname4(prefix);
|
|
31214
31506
|
const filter = endsWithSep ? "" : basename4(prefix);
|
|
31215
31507
|
const filterLower = filter.toLowerCase();
|
|
31216
31508
|
const suggestions = [];
|
|
@@ -31226,7 +31518,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31226
31518
|
let isDir = entry.isDirectory();
|
|
31227
31519
|
if (!isDir && entry.isSymbolicLink()) {
|
|
31228
31520
|
try {
|
|
31229
|
-
isDir = (await stat2(
|
|
31521
|
+
isDir = (await stat2(join7(dir, entry.name))).isDirectory();
|
|
31230
31522
|
} catch {
|
|
31231
31523
|
continue;
|
|
31232
31524
|
}
|
|
@@ -31236,7 +31528,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31236
31528
|
truncated = true;
|
|
31237
31529
|
break;
|
|
31238
31530
|
}
|
|
31239
|
-
suggestions.push({ name: entry.name, path:
|
|
31531
|
+
suggestions.push({ name: entry.name, path: join7(dir, entry.name) });
|
|
31240
31532
|
}
|
|
31241
31533
|
} catch {
|
|
31242
31534
|
}
|
|
@@ -31256,11 +31548,11 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31256
31548
|
const controller = new AbortController();
|
|
31257
31549
|
res.on("close", () => controller.abort());
|
|
31258
31550
|
try {
|
|
31259
|
-
const
|
|
31551
|
+
const path14 = await pickWorkspaceDirectory(controller.signal);
|
|
31260
31552
|
res.status(200).json({
|
|
31261
31553
|
kind: "workspace-directory-picker",
|
|
31262
|
-
selected:
|
|
31263
|
-
...
|
|
31554
|
+
selected: path14 !== void 0,
|
|
31555
|
+
...path14 === void 0 ? {} : { path: path14 }
|
|
31264
31556
|
});
|
|
31265
31557
|
} catch (error2) {
|
|
31266
31558
|
const detail = error2 instanceof Error ? error2.message : String(error2);
|
|
@@ -32317,8 +32609,8 @@ function buildDiffList(workspaceCwd, result) {
|
|
|
32317
32609
|
hiddenCount: 0
|
|
32318
32610
|
};
|
|
32319
32611
|
}
|
|
32320
|
-
const files = [...result.perFileStats.entries()].map(([
|
|
32321
|
-
path:
|
|
32612
|
+
const files = [...result.perFileStats.entries()].map(([path14, s]) => ({
|
|
32613
|
+
path: path14,
|
|
32322
32614
|
oldPath: s.oldPath,
|
|
32323
32615
|
added: s.added,
|
|
32324
32616
|
removed: s.removed,
|
|
@@ -34407,18 +34699,43 @@ function parsePairingCode(body, res) {
|
|
|
34407
34699
|
return code.trim().toUpperCase();
|
|
34408
34700
|
}
|
|
34409
34701
|
__name(parsePairingCode, "parsePairingCode");
|
|
34410
|
-
function
|
|
34702
|
+
function parsePairingApprovalSubject(body, res) {
|
|
34411
34703
|
const senderId = body["senderId"];
|
|
34412
|
-
|
|
34704
|
+
const groupId = body["groupId"];
|
|
34705
|
+
if (senderId !== void 0 && groupId !== void 0) {
|
|
34706
|
+
res.status(400).json({
|
|
34707
|
+
error: "Provide exactly one of `senderId` or `groupId`.",
|
|
34708
|
+
code: "invalid_channel_pairing_subject"
|
|
34709
|
+
});
|
|
34710
|
+
return void 0;
|
|
34711
|
+
}
|
|
34712
|
+
if (senderId !== void 0) {
|
|
34713
|
+
if (typeof senderId === "string" && senderId.length > 0) {
|
|
34714
|
+
return { type: "user", id: senderId };
|
|
34715
|
+
}
|
|
34413
34716
|
res.status(400).json({
|
|
34414
34717
|
error: "`senderId` must be a non-empty string.",
|
|
34415
34718
|
code: "invalid_channel_pairing_sender_id"
|
|
34416
34719
|
});
|
|
34417
34720
|
return void 0;
|
|
34418
34721
|
}
|
|
34419
|
-
|
|
34722
|
+
if (groupId !== void 0) {
|
|
34723
|
+
if (typeof groupId === "string" && groupId.length > 0) {
|
|
34724
|
+
return { type: "group", id: groupId };
|
|
34725
|
+
}
|
|
34726
|
+
res.status(400).json({
|
|
34727
|
+
error: "`groupId` must be a non-empty string.",
|
|
34728
|
+
code: "invalid_channel_pairing_group_id"
|
|
34729
|
+
});
|
|
34730
|
+
return void 0;
|
|
34731
|
+
}
|
|
34732
|
+
res.status(400).json({
|
|
34733
|
+
error: "Provide exactly one of `senderId` or `groupId`.",
|
|
34734
|
+
code: "invalid_channel_pairing_subject"
|
|
34735
|
+
});
|
|
34736
|
+
return void 0;
|
|
34420
34737
|
}
|
|
34421
|
-
__name(
|
|
34738
|
+
__name(parsePairingApprovalSubject, "parsePairingApprovalSubject");
|
|
34422
34739
|
function errorCode2(error2) {
|
|
34423
34740
|
if (!error2 || typeof error2 !== "object") return void 0;
|
|
34424
34741
|
try {
|
|
@@ -34592,11 +34909,11 @@ function registerWorkspaceChannelManagementRoutes(app, deps) {
|
|
|
34592
34909
|
if (!resolved || !validateClient(req, res, resolved.runtime)) return;
|
|
34593
34910
|
const name = parseInstanceName(req, res);
|
|
34594
34911
|
if (!name) return;
|
|
34595
|
-
const
|
|
34596
|
-
if (!
|
|
34912
|
+
const subject = parsePairingApprovalSubject(deps.safeBody(req), res);
|
|
34913
|
+
if (!subject) return;
|
|
34597
34914
|
try {
|
|
34598
34915
|
noStore(res);
|
|
34599
|
-
res.status(200).json(await resolved.service.revokePairingApproval(name,
|
|
34916
|
+
res.status(200).json(await resolved.service.revokePairingApproval(name, subject));
|
|
34600
34917
|
} catch (error2) {
|
|
34601
34918
|
sendManagementError(res, error2);
|
|
34602
34919
|
}
|
|
@@ -35200,7 +35517,7 @@ __name(registerWorkspaceQualifiedSkillsRoutes, "registerWorkspaceQualifiedSkills
|
|
|
35200
35517
|
|
|
35201
35518
|
// packages/cli/src/serve/routes/channel-webhooks.ts
|
|
35202
35519
|
init_esbuild_shims();
|
|
35203
|
-
var
|
|
35520
|
+
var import_express3 = __toESM(require_express(), 1);
|
|
35204
35521
|
import { createHash as createHash4, timingSafeEqual as timingSafeEqual2 } from "node:crypto";
|
|
35205
35522
|
var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set([
|
|
35206
35523
|
"__proto__",
|
|
@@ -35249,7 +35566,7 @@ function registerChannelWebhookRoutes(app, deps) {
|
|
|
35249
35566
|
locals.channelWebhook = { channelName, source, sourceConfig };
|
|
35250
35567
|
next();
|
|
35251
35568
|
},
|
|
35252
|
-
|
|
35569
|
+
import_express3.default.json({ limit: "1mb" }),
|
|
35253
35570
|
async (req, res) => {
|
|
35254
35571
|
const locals = res.locals;
|
|
35255
35572
|
const webhook = locals.channelWebhook;
|
|
@@ -35444,7 +35761,7 @@ init_esbuild_shims();
|
|
|
35444
35761
|
|
|
35445
35762
|
// packages/cli/src/serve/live/live-host-coordinator.ts
|
|
35446
35763
|
init_esbuild_shims();
|
|
35447
|
-
import { randomUUID as
|
|
35764
|
+
import { randomUUID as randomUUID8, timingSafeEqual as timingSafeEqual3 } from "node:crypto";
|
|
35448
35765
|
var DEFAULT_HELLO_TIMEOUT_MS = 5e3;
|
|
35449
35766
|
var DEFAULT_HEARTBEAT_INTERVAL_MS = 5e3;
|
|
35450
35767
|
var DEFAULT_HEARTBEAT_TIMEOUT_MS = 15e3;
|
|
@@ -35621,7 +35938,7 @@ __name(projectStatusForHost, "projectStatusForHost");
|
|
|
35621
35938
|
var LiveHostCoordinator = class {
|
|
35622
35939
|
constructor(options) {
|
|
35623
35940
|
this.options = options;
|
|
35624
|
-
this.daemonInstanceNonce = options.daemonInstanceNonce ??
|
|
35941
|
+
this.daemonInstanceNonce = options.daemonInstanceNonce ?? randomUUID8();
|
|
35625
35942
|
this.handlers = options.handlers ?? {};
|
|
35626
35943
|
this.now = options.now ?? Date.now;
|
|
35627
35944
|
this.helloTimeoutMs = options.helloTimeoutMs ?? DEFAULT_HELLO_TIMEOUT_MS;
|
|
@@ -35813,7 +36130,7 @@ var LiveHostCoordinator = class {
|
|
|
35813
36130
|
startCall(mode) {
|
|
35814
36131
|
const call = {
|
|
35815
36132
|
epoch: ++this.nextEpoch,
|
|
35816
|
-
callId:
|
|
36133
|
+
callId: randomUUID8(),
|
|
35817
36134
|
mode,
|
|
35818
36135
|
state: "starting",
|
|
35819
36136
|
pendingPermission: false,
|
|
@@ -35872,7 +36189,7 @@ var LiveHostCoordinator = class {
|
|
|
35872
36189
|
new Error("Qwen Live Host must be connected to change the shortcut.")
|
|
35873
36190
|
);
|
|
35874
36191
|
}
|
|
35875
|
-
const requestId =
|
|
36192
|
+
const requestId = randomUUID8();
|
|
35876
36193
|
return new Promise((resolve5, reject) => {
|
|
35877
36194
|
const timer = setTimeout(() => {
|
|
35878
36195
|
this.rejectPendingShortcut(
|
|
@@ -35962,7 +36279,7 @@ var LiveHostCoordinator = class {
|
|
|
35962
36279
|
)
|
|
35963
36280
|
);
|
|
35964
36281
|
}
|
|
35965
|
-
const requestId =
|
|
36282
|
+
const requestId = randomUUID8();
|
|
35966
36283
|
return new Promise((resolve5, reject) => {
|
|
35967
36284
|
const timer = setTimeout(() => {
|
|
35968
36285
|
this.pendingAppshots.delete(requestId);
|
|
@@ -36302,7 +36619,7 @@ var LiveHostCoordinator = class {
|
|
|
36302
36619
|
this.disconnectHost(lease, 4008, "Live Host heartbeat timed out.");
|
|
36303
36620
|
return;
|
|
36304
36621
|
}
|
|
36305
|
-
const pingId =
|
|
36622
|
+
const pingId = randomUUID8();
|
|
36306
36623
|
lease.pingId = pingId;
|
|
36307
36624
|
this.sendHost({ type: "host.ping", pingId });
|
|
36308
36625
|
}
|
|
@@ -36564,7 +36881,7 @@ init_esbuild_shims();
|
|
|
36564
36881
|
|
|
36565
36882
|
// packages/cli/src/serve/live/live-setup-controller.ts
|
|
36566
36883
|
init_esbuild_shims();
|
|
36567
|
-
import { randomUUID as
|
|
36884
|
+
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
36568
36885
|
|
|
36569
36886
|
// packages/cli/src/serve/live/provider-credentials.ts
|
|
36570
36887
|
init_esbuild_shims();
|
|
@@ -36662,7 +36979,7 @@ __name(resolveLiveProviderCredential, "resolveLiveProviderCredential");
|
|
|
36662
36979
|
|
|
36663
36980
|
// packages/cli/src/serve/live/qwen-realtime-session.ts
|
|
36664
36981
|
init_esbuild_shims();
|
|
36665
|
-
import { randomUUID as
|
|
36982
|
+
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
36666
36983
|
var QWEN_REALTIME_LIMITS = {
|
|
36667
36984
|
maxInputAudioFrameBytes: 64 * 1024,
|
|
36668
36985
|
maxOutputAudioFrameBytes: 256 * 1024,
|
|
@@ -37077,7 +37394,7 @@ function openQwenRealtimeSession(config, callbacks = {}, deps = {}) {
|
|
|
37077
37394
|
const sendJson = /* @__PURE__ */ __name((body) => {
|
|
37078
37395
|
if (terminal || closedByClient || ws.readyState !== ws.OPEN) return false;
|
|
37079
37396
|
try {
|
|
37080
|
-
ws.send(JSON.stringify({ event_id:
|
|
37397
|
+
ws.send(JSON.stringify({ event_id: randomUUID9(), ...body }));
|
|
37081
37398
|
return true;
|
|
37082
37399
|
} catch (error2) {
|
|
37083
37400
|
fail(
|
|
@@ -38440,7 +38757,7 @@ async function validateCredential(credential) {
|
|
|
38440
38757
|
apiKey: credential.apiKey,
|
|
38441
38758
|
model: credential.realtimeModel,
|
|
38442
38759
|
voice: credential.voice,
|
|
38443
|
-
callEpoch: `setup-${
|
|
38760
|
+
callEpoch: `setup-${randomUUID10()}`
|
|
38444
38761
|
});
|
|
38445
38762
|
session.close({ discardPendingInput: true });
|
|
38446
38763
|
}
|
|
@@ -38747,11 +39064,11 @@ __name(registerLiveSetupRoutes, "registerLiveSetupRoutes");
|
|
|
38747
39064
|
// packages/cli/src/serve/live/live-host-installer.ts
|
|
38748
39065
|
init_esbuild_shims();
|
|
38749
39066
|
import { execFile as execFile3 } from "node:child_process";
|
|
38750
|
-
import { createHash as createHash5, randomUUID as
|
|
39067
|
+
import { createHash as createHash5, randomUUID as randomUUID11 } from "node:crypto";
|
|
38751
39068
|
import * as fs6 from "node:fs";
|
|
38752
39069
|
import * as fsp5 from "node:fs/promises";
|
|
38753
39070
|
import * as os from "node:os";
|
|
38754
|
-
import * as
|
|
39071
|
+
import * as path13 from "node:path";
|
|
38755
39072
|
import { Readable, Transform } from "node:stream";
|
|
38756
39073
|
import { pipeline } from "node:stream/promises";
|
|
38757
39074
|
import { promisify as promisify3 } from "node:util";
|
|
@@ -38829,7 +39146,7 @@ async function readBundleValue(appPath, key) {
|
|
|
38829
39146
|
"raw",
|
|
38830
39147
|
"-o",
|
|
38831
39148
|
"-",
|
|
38832
|
-
|
|
39149
|
+
path13.join(appPath, "Contents", "Info.plist")
|
|
38833
39150
|
]);
|
|
38834
39151
|
}
|
|
38835
39152
|
__name(readBundleValue, "readBundleValue");
|
|
@@ -38935,13 +39252,13 @@ async function installLatestHost(currentArchitecture, onStatus) {
|
|
|
38935
39252
|
const manifest = await fetchManifest();
|
|
38936
39253
|
const asset = manifest.assets[currentArchitecture];
|
|
38937
39254
|
const temporaryDirectory = await fsp5.mkdtemp(
|
|
38938
|
-
|
|
39255
|
+
path13.join(os.tmpdir(), "qwen-live-host-")
|
|
38939
39256
|
);
|
|
38940
|
-
const archivePath =
|
|
38941
|
-
const extractedPath =
|
|
38942
|
-
const candidatePath =
|
|
38943
|
-
const stagingPath = `/Applications/.Qwen Live Host.install-${
|
|
38944
|
-
const backupPath = `/Applications/.Qwen Live Host.backup-${
|
|
39257
|
+
const archivePath = path13.join(temporaryDirectory, asset.name);
|
|
39258
|
+
const extractedPath = path13.join(temporaryDirectory, "extracted");
|
|
39259
|
+
const candidatePath = path13.join(extractedPath, LIVE_HOST_APP_NAME);
|
|
39260
|
+
const stagingPath = `/Applications/.Qwen Live Host.install-${randomUUID11()}.app`;
|
|
39261
|
+
const backupPath = `/Applications/.Qwen Live Host.backup-${randomUUID11()}.app`;
|
|
38945
39262
|
let movedExisting = false;
|
|
38946
39263
|
let installedCandidate = false;
|
|
38947
39264
|
try {
|
|
@@ -39085,15 +39402,15 @@ var LiveHostInstaller = class {
|
|
|
39085
39402
|
|
|
39086
39403
|
// packages/cli/src/serve/live/live-session-coordinator.ts
|
|
39087
39404
|
init_esbuild_shims();
|
|
39088
|
-
import { createHash as createHash6, randomUUID as
|
|
39405
|
+
import { createHash as createHash6, randomUUID as randomUUID12 } from "node:crypto";
|
|
39089
39406
|
import { createWriteStream as createWriteStream2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
39090
|
-
import { join as
|
|
39407
|
+
import { join as join10 } from "node:path";
|
|
39091
39408
|
|
|
39092
39409
|
// packages/cli/src/serve/live/realtime-startup-context.ts
|
|
39093
39410
|
init_esbuild_shims();
|
|
39094
39411
|
import { readdirSync } from "node:fs";
|
|
39095
39412
|
import { homedir } from "node:os";
|
|
39096
|
-
import { basename as basename5, join as
|
|
39413
|
+
import { basename as basename5, join as join9 } from "node:path";
|
|
39097
39414
|
var STARTUP_CONTEXT_HEADER = "Startup context from Qwen Code.\nThis is background context about recent work and machine/workspace layout. It may be incomplete or stale. Use it to inform responses, and do not repeat it back unless relevant.";
|
|
39098
39415
|
var CURRENT_THREAD_SECTION_TOKEN_BUDGET = 1200;
|
|
39099
39416
|
var RECENT_WORK_SECTION_TOKEN_BUDGET = 2200;
|
|
@@ -39335,7 +39652,7 @@ function collectTreeLines(directory, depth, lines) {
|
|
|
39335
39652
|
const indent = " ".repeat(depth);
|
|
39336
39653
|
lines.push(`${indent}- ${entry.name}${entry.isDirectory() ? "/" : ""}`);
|
|
39337
39654
|
if (entry.isDirectory()) {
|
|
39338
|
-
collectTreeLines(
|
|
39655
|
+
collectTreeLines(join9(directory, entry.name), depth + 1, lines);
|
|
39339
39656
|
}
|
|
39340
39657
|
}
|
|
39341
39658
|
if (entries.length > DIR_ENTRY_LIMIT) {
|
|
@@ -39454,13 +39771,13 @@ function openLiveAudioCapture(source, identifier) {
|
|
|
39454
39771
|
try {
|
|
39455
39772
|
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
39456
39773
|
const safeIdentifier = identifier.replace(/[^A-Za-z0-9_-]/g, "_");
|
|
39457
|
-
const
|
|
39774
|
+
const path14 = join10(
|
|
39458
39775
|
directory,
|
|
39459
39776
|
`${source}-${Date.now()}-${safeIdentifier}.pcm`
|
|
39460
39777
|
);
|
|
39461
|
-
const stream = createWriteStream2(
|
|
39778
|
+
const stream = createWriteStream2(path14, { flags: "wx", mode: 384 });
|
|
39462
39779
|
stream.on("error", () => void 0);
|
|
39463
|
-
return { source, path:
|
|
39780
|
+
return { source, path: path14, stream, hash: createHash6("sha256"), bytes: 0 };
|
|
39464
39781
|
} catch {
|
|
39465
39782
|
return void 0;
|
|
39466
39783
|
}
|
|
@@ -39815,7 +40132,7 @@ var LiveSessionCoordinator = class {
|
|
|
39815
40132
|
context.speechInProgress = true;
|
|
39816
40133
|
context.inputCommitPending = true;
|
|
39817
40134
|
context.inputAwaitingResponse = false;
|
|
39818
|
-
const partialItemId = itemId ?? `partial:${
|
|
40135
|
+
const partialItemId = itemId ?? `partial:${randomUUID12()}`;
|
|
39819
40136
|
context.activePartialInputItemId = partialItemId;
|
|
39820
40137
|
if (!context.partialInputTranscripts.has(partialItemId)) {
|
|
39821
40138
|
context.partialInputTranscripts.set(partialItemId, "");
|
|
@@ -39845,7 +40162,7 @@ var LiveSessionCoordinator = class {
|
|
|
39845
40162
|
}, "onInputCommitted"),
|
|
39846
40163
|
onInputTranscriptDelta: /* @__PURE__ */ __name(({ itemId, text }) => {
|
|
39847
40164
|
if (this.isCurrentSocket(context, generation)) {
|
|
39848
|
-
const partialItemId = itemId ?? context.activePartialInputItemId ?? `partial:${
|
|
40165
|
+
const partialItemId = itemId ?? context.activePartialInputItemId ?? `partial:${randomUUID12()}`;
|
|
39849
40166
|
context.activePartialInputItemId = partialItemId;
|
|
39850
40167
|
context.partialInputTranscripts.set(partialItemId, text);
|
|
39851
40168
|
this.options.host.setTranscript?.(context.epoch, text);
|
|
@@ -39855,7 +40172,7 @@ var LiveSessionCoordinator = class {
|
|
|
39855
40172
|
if (this.isCurrentSocket(context, generation)) {
|
|
39856
40173
|
context.speechInProgress = false;
|
|
39857
40174
|
context.inputCommitPending = false;
|
|
39858
|
-
const completedItemId = itemId ?? context.activePartialInputItemId ?? `unattributed:${
|
|
40175
|
+
const completedItemId = itemId ?? context.activePartialInputItemId ?? `unattributed:${randomUUID12()}`;
|
|
39859
40176
|
context.partialInputTranscripts.delete(completedItemId);
|
|
39860
40177
|
if (context.activePartialInputItemId === completedItemId) {
|
|
39861
40178
|
context.activePartialInputItemId = void 0;
|
|
@@ -40569,7 +40886,7 @@ var LiveSessionCoordinator = class {
|
|
|
40569
40886
|
const runtime = context.runtime;
|
|
40570
40887
|
if (!runtime) throw new Error("Conversation workspace is unavailable.");
|
|
40571
40888
|
const bridge = runtime.bridge;
|
|
40572
|
-
const promptId =
|
|
40889
|
+
const promptId = randomUUID12();
|
|
40573
40890
|
const lastEventId = bridge.getSessionLastEventId(locator.sessionId);
|
|
40574
40891
|
const turnAbort = new AbortController();
|
|
40575
40892
|
this.inFlightTurnAborts.add(turnAbort);
|
|
@@ -40886,7 +41203,7 @@ var LiveSessionCoordinator = class {
|
|
|
40886
41203
|
|
|
40887
41204
|
// packages/cli/src/serve/live/live-task-service.ts
|
|
40888
41205
|
init_esbuild_shims();
|
|
40889
|
-
import { randomUUID as
|
|
41206
|
+
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
40890
41207
|
var DEFAULT_LIST_LIMIT = 20;
|
|
40891
41208
|
var DEFAULT_READ_TURN_LIMIT = 3;
|
|
40892
41209
|
var DEFAULT_WAIT_TIMEOUT_MS = 12e4;
|
|
@@ -41602,7 +41919,7 @@ var LiveTaskService = class {
|
|
|
41602
41919
|
{ sessionId, prompt: [{ type: "text", text: prompt }] },
|
|
41603
41920
|
void 0,
|
|
41604
41921
|
{
|
|
41605
|
-
promptId:
|
|
41922
|
+
promptId: randomUUID13(),
|
|
41606
41923
|
onPromptAdmitted: /* @__PURE__ */ __name(() => {
|
|
41607
41924
|
admitted = true;
|
|
41608
41925
|
onAdmitted?.();
|
|
@@ -41826,7 +42143,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
|
|
|
41826
42143
|
"createServeApp: deps.workspaceRuntimeRemoval requires the matching deps.voiceCoordinator."
|
|
41827
42144
|
);
|
|
41828
42145
|
}
|
|
41829
|
-
const app = (0,
|
|
42146
|
+
const app = (0, import_express4.default)();
|
|
41830
42147
|
const injectedWorkspaceRegistry = deps.workspaceRegistry;
|
|
41831
42148
|
const boundWorkspace = injectedWorkspaceRegistry?.primary.workspaceCwd ?? deps.boundWorkspace ?? canonicalizeWorkspace(opts.workspace ?? process.cwd());
|
|
41832
42149
|
if (injectedWorkspaceRegistry) {
|
|
@@ -42003,8 +42320,9 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
|
|
|
42003
42320
|
// Wire the production status provider so direct embeds / tests
|
|
42004
42321
|
// that don't inject `deps.bridge` get daemon env + preflight cells.
|
|
42005
42322
|
statusProvider,
|
|
42006
|
-
|
|
42007
|
-
//
|
|
42323
|
+
delegateReadTextFileToClient: false,
|
|
42324
|
+
// Final ACP text writes remain delegated through WorkspaceFileSystem.
|
|
42325
|
+
// Unexpected delegated reads still fail closed at the WFS boundary.
|
|
42008
42326
|
fileSystem: createBridgeFileSystemAdapter(fsFactory),
|
|
42009
42327
|
// Reverse tool channel: answer the child's `client_mcp/message`
|
|
42010
42328
|
// ext-method by reaching the WS connection that hosts the named server.
|
|
@@ -42541,7 +42859,8 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
|
|
|
42541
42859
|
getChannelWorkerSnapshots: deps.getChannelWorkerSnapshots,
|
|
42542
42860
|
getPerfSnapshot: deps.getPerfSnapshot,
|
|
42543
42861
|
getMetricsSeries: deps.getMetricsSeries,
|
|
42544
|
-
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot ?? totalSessionAdmission?.snapshot
|
|
42862
|
+
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot ?? totalSessionAdmission?.snapshot,
|
|
42863
|
+
getChildHeapPolicySnapshot: deps.getChildHeapPolicySnapshot
|
|
42545
42864
|
});
|
|
42546
42865
|
if (liveVoiceEnabled) {
|
|
42547
42866
|
app.use("/capabilities", (_req, _res, next) => {
|