@qwen-code/qwen-code 0.21.5 → 0.21.6
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/model-providers.md +8 -8
- package/bundled/qc-helper/docs/configuration/settings.md +15 -15
- package/bundled/qc-helper/docs/features/channels/github.md +31 -19
- package/bundled/qc-helper/docs/features/code-review.md +5 -1
- package/bundled/qc-helper/docs/features/headless.md +31 -0
- package/bundled/qc-helper/docs/qwen-serve.md +75 -0
- package/bundled/review/SKILL.md +72 -60
- package/chunks/{MaxSizedBox-2MWU5JYB.js → MaxSizedBox-2HFKP4LI.js} +11 -10
- package/chunks/{StandaloneSessionPicker-B6MI5NTB.js → StandaloneSessionPicker-RBV72M5N.js} +26 -25
- package/chunks/{acp-startup-profiler-3RICG2YW.js → acp-startup-profiler-ORIQ2CCQ.js} +2 -2
- package/chunks/{acpAgent-MRPYN6FH.js → acpAgent-WO6JFCVQ.js} +1232 -139
- package/chunks/{agent-NAOXNW4I.js → agent-AHGLYNZ4.js} +11 -10
- package/chunks/{agent-headless-L4PPVFKW.js → agent-headless-NTXKKGRO.js} +11 -10
- package/chunks/{bridge-LHXGYNCO.js → bridge-RPAU64CA.js} +17 -15
- package/chunks/{channel-management-service-UHX56NBO.js → channel-management-service-IGEUOVRT.js} +3 -3
- package/chunks/{channel-settings-store-QB54TLYE.js → channel-settings-store-ON64MF7G.js} +18 -17
- package/chunks/{channel-worker-group-NDG4WOOZ.js → channel-worker-group-JWQK224X.js} +6 -5
- package/chunks/{channel-worker-manager-ZCW6UW34.js → channel-worker-manager-77E3OXRQ.js} +6 -5
- package/chunks/{channel-worker-supervisor-ATGFTZRN.js → channel-worker-supervisor-62YWUGP2.js} +4 -3
- package/chunks/{chunk-EXHQZBVJ.js → chunk-2POQWYM6.js} +2 -2
- package/chunks/{chunk-YMUZQ3MQ.js → chunk-3LZKY4V4.js} +3 -3
- package/chunks/{chunk-7MFQLOHZ.js → chunk-3PRJYMXC.js} +1 -1
- package/chunks/{chunk-SJMCYCUQ.js → chunk-3UOLYNTF.js} +5 -5
- package/chunks/{chunk-Q2V4AOQL.js → chunk-4JH77A2U.js} +1 -1
- package/chunks/{chunk-MISUEWB4.js → chunk-4S4OEQ6U.js} +10 -6
- package/chunks/{chunk-URJHXOSO.js → chunk-4WTAQEHV.js} +1 -1
- package/chunks/{chunk-ZLGPHA34.js → chunk-536SWZTA.js} +5 -5
- package/chunks/{chunk-WU5NBSLD.js → chunk-5MJGUQU5.js} +3 -3
- package/chunks/{chunk-3P4GP4S2.js → chunk-75QMRMO7.js} +4 -4
- package/chunks/{chunk-YLL3SC5S.js → chunk-A4VTILZT.js} +1032 -913
- package/chunks/{chunk-B3EBIZUY.js → chunk-ACZRB7AD.js} +8 -3
- package/chunks/chunk-BKHCW2BI.js +41 -0
- package/chunks/{chunk-XD2PNH3K.js → chunk-BOGOR4HB.js} +5 -5
- package/chunks/{chunk-QL4TN4HS.js → chunk-BRVWYMKV.js} +1 -1
- package/chunks/{chunk-TCOJPG2P.js → chunk-C4CBJQKY.js} +1 -1
- package/chunks/{chunk-4O6HLCOF.js → chunk-CA4UIDFU.js} +1 -1
- package/chunks/{chunk-SQTA6PAY.js → chunk-CJ5WLD5Y.js} +6 -2
- package/chunks/{chunk-7W5KOBYU.js → chunk-DIT4V3XH.js} +1 -1
- package/chunks/{chunk-OIGB253L.js → chunk-DVBEGGLG.js} +8 -8
- package/chunks/{chunk-DTAPI453.js → chunk-EMYZIABH.js} +1 -1
- package/chunks/{chunk-GBY3ODW7.js → chunk-EXCEQD22.js} +3 -3
- package/chunks/{chunk-VJPF6GF2.js → chunk-FZFP7RZI.js} +3 -3
- package/chunks/{chunk-3GOCVBYR.js → chunk-G5NNWEYE.js} +5 -5
- package/chunks/{chunk-IWYXZAGT.js → chunk-GESMMPAK.js} +33 -33
- package/chunks/{chunk-SVIEVA3L.js → chunk-GK2H5GRC.js} +29 -4
- package/chunks/{chunk-7M2RLFNX.js → chunk-GWRHVJY2.js} +11 -11
- package/chunks/{chunk-BK2UNYWD.js → chunk-HIBNSEJE.js} +12 -0
- package/chunks/{chunk-4LLUH3A7.js → chunk-HU5TUALO.js} +95 -8
- package/chunks/{chunk-J7I2BZHS.js → chunk-HY25ULVN.js} +23 -6
- package/chunks/{chunk-G2UXFO2B.js → chunk-IMOQO6YL.js} +1 -1
- package/chunks/{chunk-CAX76R46.js → chunk-JE44IPH6.js} +1 -1
- package/chunks/{chunk-IK3RYLAD.js → chunk-K2B3X3E7.js} +3 -3
- package/chunks/{chunk-OWAK7LMW.js → chunk-KGJGEEVR.js} +7 -0
- package/chunks/{chunk-K64OI7S7.js → chunk-KHUA3NQV.js} +2 -2
- package/chunks/{chunk-LEZFUYPM.js → chunk-LAAFLUQV.js} +4 -4
- package/chunks/{chunk-FHPKHXHT.js → chunk-MKVZE4ZJ.js} +5 -1
- package/chunks/{chunk-4NEBUDWS.js → chunk-N2GJU6KI.js} +9 -9
- package/chunks/{chunk-N3RERU5N.js → chunk-NGJOAKJY.js} +3 -3
- package/chunks/chunk-NKLP3DCK.js +22 -0
- package/chunks/{chunk-K6VEL5KP.js → chunk-NKSF7HYF.js} +1 -1
- package/chunks/{chunk-LMNM37OE.js → chunk-O7V7N4G7.js} +1 -1
- package/chunks/{chunk-3H5RFLTS.js → chunk-ODPXHGLL.js} +2 -2
- package/chunks/{chunk-KH2BIJ4H.js → chunk-OP2OHZ7K.js} +267 -11
- package/chunks/{chunk-VOA2UPZM.js → chunk-OWSW7EYP.js} +5 -5
- package/chunks/{chunk-B2RBYP7Z.js → chunk-OXX3FG2N.js} +2 -2
- package/chunks/{chunk-RM3F46UT.js → chunk-PPUOYL77.js} +71 -6
- package/chunks/{chunk-ZPGMDT4S.js → chunk-PX5DNLSA.js} +19 -92
- package/chunks/{chunk-FEUXV3DC.js → chunk-Q5RM32DR.js} +1 -1
- package/chunks/{chunk-AEWOKOJY.js → chunk-QZKYZCN3.js} +1 -1
- package/chunks/{chunk-UKZEXS6K.js → chunk-R574ATRM.js} +11 -0
- package/chunks/{chunk-OGAARVN7.js → chunk-R5RBXLNC.js} +3 -3
- package/chunks/{chunk-5HWAJ4BK.js → chunk-RFUHDCNF.js} +1 -1
- package/chunks/{chunk-LSYVASZS.js → chunk-RHTTKJTP.js} +1 -1
- package/chunks/{chunk-LYPXNRBX.js → chunk-RK2EE3T7.js} +1 -1
- package/chunks/{chunk-CIUUYB23.js → chunk-S7CV4KO6.js} +3 -3
- package/chunks/{chunk-4NNR24EP.js → chunk-SKNE3KQC.js} +3 -3
- package/chunks/{chunk-JDNWIXHJ.js → chunk-SLSWFHDF.js} +3 -3
- package/chunks/{chunk-UWSXFI6E.js → chunk-SQC6K5HI.js} +6 -2
- package/chunks/{chunk-P3SLTSNY.js → chunk-SQOMTWQT.js} +4 -4
- package/chunks/{chunk-D7QAZ5DF.js → chunk-SUKEUUAA.js} +1 -1
- package/chunks/{chunk-WTM5QONI.js → chunk-T4JSA7KU.js} +2 -2
- package/chunks/{chunk-I7JDGNG6.js → chunk-T5U6IM4C.js} +6 -2
- package/chunks/{chunk-2JBETW4S.js → chunk-TGGEZINK.js} +5 -5
- package/chunks/{chunk-C6ARWPCG.js → chunk-TOGZTG4X.js} +2 -2
- package/chunks/{chunk-A6SX5TAH.js → chunk-TSERKWCX.js} +6 -2
- package/chunks/{chunk-IWGMDSC3.js → chunk-U4AF3QLU.js} +355 -17
- package/chunks/{chunk-PDDYAXL2.js → chunk-UGTWD35F.js} +14 -1
- package/chunks/{chunk-BWLUCN35.js → chunk-ULPQQSDN.js} +2 -2
- package/chunks/{chunk-GEP54CHX.js → chunk-VGFPFM4U.js} +3 -3
- package/chunks/{chunk-NLQIEY6W.js → chunk-VNQCPBC2.js} +3 -3
- package/chunks/{chunk-K2ETEWG6.js → chunk-VSALQLT7.js} +1 -1
- package/chunks/{chunk-YO4JI7B4.js → chunk-W5DXUTXD.js} +12 -6
- package/chunks/{chunk-M744OFVE.js → chunk-W7U4ESW2.js} +1 -1
- package/chunks/{chunk-TJ56V3AR.js → chunk-WNU7TZTO.js} +4 -4
- package/chunks/{chunk-GTM6IHBB.js → chunk-WO2B5E5B.js} +1 -0
- package/chunks/chunk-WOJZWRAZ.js +123 -0
- package/chunks/{chunk-5XNO4AW7.js → chunk-XA4TMLFN.js} +11 -11
- package/chunks/{chunk-GP4IMBX5.js → chunk-XM2O73NC.js} +1696 -476
- package/chunks/{chunk-IZ2CMEYO.js → chunk-YMBOEAF4.js} +1 -1
- package/chunks/{chunk-QONSRAEV.js → chunk-YP5KH5Y7.js} +1 -1
- package/chunks/{chunk-ZLJQIGCH.js → chunk-YZQTA3ID.js} +28 -11
- package/chunks/{computer-use-XDOGP2KA.js → computer-use-5HXJ2P4X.js} +11 -10
- package/chunks/{config-utils-E3ZQTHGM.js → config-utils-VXD4SPVR.js} +2 -2
- package/chunks/{contextCommand-N3LQDCYJ.js → contextCommand-7BEHRX2H.js} +14 -13
- package/chunks/{core-runtime-STAFP45W.js → core-runtime-U4VJ5TIV.js} +11 -10
- package/chunks/create-sub-session-QZNQY332.js +772 -0
- package/chunks/{daemon-CCIX4BMG.js → daemon-YI5RY62O.js} +115 -3
- package/chunks/{daemon-status-provider-PPAH3ATF.js → daemon-status-provider-UJUGTDTL.js} +21 -19
- package/chunks/{daemon-trust-policy-X6XL3MB4.js → daemon-trust-policy-ZHDD5VYQ.js} +17 -16
- package/chunks/{daemon-trust-policy-monitor-M5LBL2HD.js → daemon-trust-policy-monitor-5SHYBDGA.js} +17 -16
- package/chunks/{deferred-core-runtime-O54YPTBU.js → deferred-core-runtime-QWAEBTR5.js} +11 -10
- package/chunks/discovery-XLHITE74.js +220 -0
- package/chunks/{dist-IKGVITP3.js → dist-KS4O2NKE.js} +99 -6
- package/chunks/{earlyInputCapture-CBIT2RGT.js → earlyInputCapture-5BMSGKOI.js} +11 -10
- package/chunks/{edit-KW2TOC6A.js → edit-IVQQVYYK.js} +11 -10
- package/chunks/{enter-worktree-YL34NEU5.js → enter-worktree-P3DF2N6O.js} +11 -10
- package/chunks/{enterPlanMode-JFJTDASQ.js → enterPlanMode-KKTDVLAD.js} +11 -10
- package/chunks/{environment-IATU5GXG.js → environment-W5TRDM3G.js} +14 -13
- package/chunks/{errors-SAVRDE7Q.js → errors-GJJB36IG.js} +14 -13
- package/chunks/{exit-worktree-5M43QPBB.js → exit-worktree-LV5RLOCU.js} +11 -10
- package/chunks/{exitPlanMode-W4EICZ4N.js → exitPlanMode-TUGOB2LL.js} +11 -10
- package/chunks/external-tool-guard-provider-5HTGOPGU.js +273 -0
- package/chunks/{fast-path-YQJPIKMP.js → fast-path-2FU23PAQ.js} +5 -5
- package/chunks/{gemini-FUF5SSPR.js → gemini-KDULDQPP.js} +70 -55
- package/chunks/{geminiContentGenerator-LLLZBOUG.js → geminiContentGenerator-LOCFHNVA.js} +1 -1
- package/chunks/{glob-LJFFMN4D.js → glob-Z4NQFKWS.js} +11 -10
- package/chunks/{grep-Q64EAM73.js → grep-Z67Z7EN6.js} +11 -10
- package/chunks/{handleAutoUpdate-QBMPRTSQ.js → handleAutoUpdate-DFUZE6I6.js} +16 -15
- package/chunks/{i18n-LDUW5DMN.js → i18n-R4FMZ7N2.js} +13 -12
- package/chunks/{image-gen-G7RLG3KR.js → image-gen-4CQJPQP5.js} +1 -1
- package/chunks/{initializer-74A7DMMD.js → initializer-DK672ZVE.js} +17 -16
- package/chunks/{installationInfo-OFDYLDFD.js → installationInfo-PO4Z3ES7.js} +12 -11
- package/chunks/{list-JA2EWRHJ.js → list-QXQF6C53.js} +20 -19
- package/chunks/{loadedSettingsAdapter-2GNJOQ3L.js → loadedSettingsAdapter-4D7GUGW6.js} +17 -16
- package/chunks/{loggingContentGenerator-B6B5EGB3.js → loggingContentGenerator-2P3MNACM.js} +4 -3
- package/chunks/{managed-npm-update-4YZHLUER.js → managed-npm-update-LWVJQTWO.js} +24 -14
- package/chunks/{mcp-LLK5YJVH.js → mcp-GHETAR6V.js} +17 -16
- package/chunks/{monitor-NYJPAWVP.js → monitor-4T7W4M6Q.js} +11 -10
- package/chunks/{nonInteractiveCli-HZBBBDJD.js → nonInteractiveCli-P4UKCJFM.js} +47 -45
- package/chunks/{notebook-edit-LLM6UXFX.js → notebook-edit-OC2V7U5D.js} +11 -10
- package/chunks/{openaiContentGenerator-2AEXDN55.js → openaiContentGenerator-RAJUFWQY.js} +5 -4
- package/chunks/{pidfile-3JUWX7G2.js → pidfile-HVPYVRLS.js} +11 -10
- package/chunks/{processUtils-JLLRVZHT.js → processUtils-VIQ4JHVX.js} +2 -2
- package/chunks/{qwenContentGenerator-2FESCF27.js → qwenContentGenerator-2QLCUFNZ.js} +12 -11
- package/chunks/{qwenOAuth2-2KKPYA5J.js → qwenOAuth2-J2X3EN43.js} +1 -1
- package/chunks/{read-file-5GVXLY74.js → read-file-ZNAN2B26.js} +3 -2
- package/chunks/{record-artifact-L3BAHQFN.js → record-artifact-E6AWQU2Z.js} +1 -1
- package/chunks/{resumeHistoryUtils-Z4OFBXPM.js → resumeHistoryUtils-RCY7AL5Y.js} +15 -14
- package/chunks/{ripGrep-TKOJTIAB.js → ripGrep-C3KMLZM5.js} +11 -10
- package/chunks/{run-qwen-serve-K5W6MM6M.js → run-qwen-serve-3JN75CIQ.js} +518 -75
- package/chunks/{runtime-IADXMRCY.js → runtime-VUA4WQYD.js} +20 -19
- package/chunks/{scheduler-T7AV37LD.js → scheduler-Z4IBXCOY.js} +11 -10
- package/chunks/{serve-ROEGMS3I.js → serve-67T3P7XI.js} +18 -16
- package/chunks/{server-NGXMRODI.js → server-46ZO2CLV.js} +7556 -397
- package/chunks/{session-RCDLDJA4.js → session-B4IFAFC4.js} +50 -48
- package/chunks/{settings-E6H3AURD.js → settings-AI2BTBOZ.js} +16 -15
- package/chunks/{shell-RHGGJ6BE.js → shell-BKII3B6E.js} +11 -10
- package/chunks/{skill-GQ7PBS25.js → skill-6CFOWVGA.js} +4 -3
- package/chunks/{skill-settings-E2F7OCBL.js → skill-settings-6BFQWMW4.js} +16 -15
- package/chunks/{spawnChannel-Q2IQBHME.js → spawnChannel-FJXW35U7.js} +14 -12
- package/chunks/{standalone-update-NYYZEHLD.js → standalone-update-WVINHRNS.js} +14 -13
- package/chunks/{startInteractiveUI-IX6I3Y2Z.js → startInteractiveUI-YE57CJ57.js} +140 -138
- package/chunks/{stdioHelpers-HGIYTWAY.js → stdioHelpers-7A2EE64Z.js} +5 -3
- package/chunks/{task-create-2X4UP4F3.js → task-create-Q727MXHJ.js} +2 -2
- package/chunks/{task-list-WOLJPZ64.js → task-list-G6KPQ5JT.js} +1 -1
- package/chunks/{task-update-VDUSN36E.js → task-update-YB7PXO4R.js} +2 -2
- package/chunks/{team-create-UTRVUEDA.js → team-create-GNC7NFY6.js} +11 -10
- package/chunks/{team-delete-D2VMSDOT.js → team-delete-GDO7H2T4.js} +1 -1
- package/chunks/{team-plan-approval-YZNB4U5U.js → team-plan-approval-ECALJLIO.js} +11 -10
- package/chunks/{terminal-image-renderer-QRSCS2BE.js → terminal-image-renderer-II74TFVW.js} +11 -10
- package/chunks/{theme-manager-EKZBY34I.js → theme-manager-2MGEDD22.js} +11 -10
- package/chunks/{tool-search-N2R7LVMC.js → tool-search-S6LRRACA.js} +3 -2
- package/chunks/{total-session-admission-HBIYARPO.js → total-session-admission-7WVAWQPU.js} +17 -15
- package/chunks/{trustedFolders-ZQLYRCSY.js → trustedFolders-NFS4KHO4.js} +13 -12
- package/chunks/{update-relaunch-PJWXMPCR.js → update-relaunch-Q5HLZ6UW.js} +6 -6
- package/chunks/{updateCheck-ZXRCGY66.js → updateCheck-UOVZSTP7.js} +15 -14
- package/chunks/{useAutoAcceptIndicator-ZYQW5SGJ.js → useAutoAcceptIndicator-PC6MOJCO.js} +19 -18
- package/chunks/{validateNonInterActiveAuth-M7J7OTRH.js → validateNonInterActiveAuth-YMQP3ZM7.js} +44 -42
- package/chunks/{version-2AOHMPK3.js → version-T4AQFZJH.js} +1 -1
- package/chunks/{web-fetch-DS34CJ3R.js → web-fetch-JQCJHEEX.js} +3 -2
- package/chunks/{web-search-ITFPD7V4.js → web-search-QGZ2KY4G.js} +4 -3
- package/chunks/{workflow-LZQ4PGNS.js → workflow-YIT27YWZ.js} +12 -11
- package/chunks/{workspace-providers-status-ZPTLKOBM.js → workspace-providers-status-FIDZQ2PL.js} +20 -19
- package/chunks/{workspace-registration-store-OTFKSGG7.js → workspace-registration-store-RCSPE4DU.js} +1 -1
- package/chunks/{workspace-registry-YZ3OXPHP.js → workspace-registry-5PEUCY6E.js} +17 -15
- package/chunks/{workspace-service-OCZXOOSQ.js → workspace-service-LANDVPL7.js} +21 -20
- package/chunks/{workspace-skills-status-K2ALGUCD.js → workspace-skills-status-2IQVJNIN.js} +18 -17
- package/chunks/{workspace-trust-reconciler-KMRZISJP.js → workspace-trust-reconciler-CZPZZCZC.js} +26 -24
- package/chunks/{write-file-AWBI4GJS.js → write-file-G5VNGCOG.js} +11 -10
- package/chunks/{zoom-image-NHKN6F77.js → zoom-image-6RBLD7X6.js} +3 -2
- package/cli-entry.js +14 -0
- package/cli.js +19 -15
- package/package.json +3 -3
- package/web-shell/assets/{arc-Dpg66jw7.js → arc-B-Vtkp1W.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BJ4FIBxN.js → architectureDiagram-3BPJPVTR-qmTXIj64.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-VXmYdtYT.js → blockDiagram-GPEHLZMM-ZlnXEtdP.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BNLDb8FE.js → c4Diagram-AAUBKEIU-Wyoirf6Z.js} +1 -1
- package/web-shell/assets/channel-DXaHnfjS.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DR5yHxr0.js → chunk-2J33WTMH-WQwbq9d8.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-Czkq8UZU.js → chunk-4BX2VUAB-DQKnAXC4.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DugUgM6s.js → chunk-55IACEB6-DIdgXNcO.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-Dw6quA1K.js → chunk-727SXJPM-CUwGOLEd.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BoVYOTTz.js → chunk-AQP2D5EJ-CCBGZFZ4.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4--Amcse-j.js → chunk-FMBD7UC4-DMGXProk.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-ajaEYAC8.js → chunk-ND2GUHAM-yejcFqsh.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CUNDZ7im.js → chunk-QZHKN3VN-DxCyqTf7.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BigU82A0.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BigU82A0.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BnfkD-m1.js → cose-bilkent-S5V4N54A-DOrF3cg_.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BuUdFk7Z.js → dagre-BM42HDAG-Be6CdYQ_.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-B2ZXxoab.js → diagram-2AECGRRQ-B_Rjsft2.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BsgOICzM.js → diagram-5GNKFQAL-BvQbKSm1.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-DTTjG6U-.js → diagram-KO2AKTUF-BsdmMdpS.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-temLf1x7.js → diagram-LMA3HP47-CrQlBaNr.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CRFjScs2.js → diagram-OG6HWLK6-aB1MD_DL.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-D4oaY-rQ.js → erDiagram-TEJ5UH35-F-eUUn9n.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BqG8B49b.js → flowDiagram-I6XJVG4X-DY_d8lUK.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-DffQBdd5.js → ganttDiagram-6RSMTGT7-Dqu7KBPg.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CMDPfseF.js → gitGraphDiagram-PVQCEYII-2IkU_VEj.js} +1 -1
- package/web-shell/assets/{index-qTQR_smP.js → index-BuSbqggh.js} +1 -1
- package/web-shell/assets/index-DrfC2e9s.js +1768 -0
- package/web-shell/assets/index-QQlUCJGg.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-Cn3T83MA.js → infoDiagram-5YYISTIA-C4orwzPw.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-ijFs7e25.js → ishikawaDiagram-YF4QCWOH-fXUEfef_.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CINTv8VB.js → journeyDiagram-JHISSGLW-Bs0I1_J5.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-CMGRZCxx.js → kanban-definition-UN3LZRKU-BPRj1dw_.js} +1 -1
- package/web-shell/assets/{linear-Co-2_37d.js → linear-DFS6ZDpW.js} +1 -1
- package/web-shell/assets/{mermaid.core-DijbyaN5.js → mermaid.core-CZxjWMaO.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-k_sDYDPZ.js → mindmap-definition-RKZ34NQL-Dsr3PmNs.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-CG-oz8V3.js → pieDiagram-4H26LBE5-D5Ngpz5Y.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Baq7HIG2.js → quadrantDiagram-W4KKPZXB-WJK9I25z.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CDM3ZvBt.js → requirementDiagram-4Y6WPE33-CmrYcwOH.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-C2dJbWKN.js → sankeyDiagram-5OEKKPKP-7SjCc4Mv.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Cf1_h59p.js → sequenceDiagram-3UESZ5HK-Dl9E0IRM.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CI5clUEc.js → stateDiagram-AJRCARHV-CRRio7yV.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-1atT7XaU.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-B2O8cAZX.js → timeline-definition-PNZ67QCA-DVyXjjfq.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BLsJ_h9s.js → vennDiagram-CIIHVFJN-Nb2Lckzq.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-BlPU4FTA.js → wardley-L42UT6IY-DuL_otIP.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D_U-RdU4.js → wardleyDiagram-YWT4CUSO-DVI9Q4Aa.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BynXGSTl.js → xychartDiagram-2RQKCTM6-BNjAm7KD.js} +1 -1
- package/web-shell/index.html +2 -2
- package/bundled/review/DESIGN.md +0 -724
- package/chunks/create-sub-session-2B3JENWD.js +0 -400
- package/web-shell/assets/channel-Bd9wOnaA.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-XhCT8FE3.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-XhCT8FE3.js +0 -1
- package/web-shell/assets/index-2F4RsNzd.js +0 -1756
- package/web-shell/assets/index-CaucmEO_.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BDc8asKD.js +0 -1
|
@@ -32,10 +32,11 @@ import {
|
|
|
32
32
|
positiveFiniteOrNull,
|
|
33
33
|
prepareManagedScratchRoot,
|
|
34
34
|
require_express,
|
|
35
|
+
resolveAcpHttpEnabled,
|
|
35
36
|
resolveWebShellDir,
|
|
36
37
|
setDeferredRuntimeRequestTiming,
|
|
37
38
|
toDaemonStatusMemoryLimits
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-YZQTA3ID.js";
|
|
39
40
|
import {
|
|
40
41
|
isLoopbackBind
|
|
41
42
|
} from "./chunk-RXFQM6FQ.js";
|
|
@@ -43,6 +44,9 @@ import {
|
|
|
43
44
|
formatMemoryBudgetStderr,
|
|
44
45
|
resolveDaemonMemoryBudget
|
|
45
46
|
} from "./chunk-HGCQ5SE7.js";
|
|
47
|
+
import {
|
|
48
|
+
LIVE_HOST_PROTOCOL_VERSION
|
|
49
|
+
} from "./chunk-NKLP3DCK.js";
|
|
46
50
|
import {
|
|
47
51
|
DEFAULT_COMPACTED_REPLAY_MAX_BYTES,
|
|
48
52
|
DEFAULT_MAX_JOURNAL_BYTES,
|
|
@@ -65,24 +69,24 @@ import {
|
|
|
65
69
|
MAX_REGISTERED_WORKSPACES,
|
|
66
70
|
resolveWorkspaceInputs,
|
|
67
71
|
workspaceRegistrationId
|
|
68
|
-
} from "./chunk-
|
|
69
|
-
import "./chunk-
|
|
72
|
+
} from "./chunk-4JH77A2U.js";
|
|
73
|
+
import "./chunk-S7CV4KO6.js";
|
|
70
74
|
import {
|
|
71
75
|
LOAD_REPLAY_META_KEY
|
|
72
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-R574ATRM.js";
|
|
73
77
|
import "./chunk-J26HHFI5.js";
|
|
74
78
|
import {
|
|
75
79
|
canonicalizeWorkspace,
|
|
76
80
|
translateAndCheckAbsoluteWorkspacePath
|
|
77
81
|
} from "./chunk-6PLDPT2C.js";
|
|
78
|
-
import "./chunk-
|
|
82
|
+
import "./chunk-MKVZE4ZJ.js";
|
|
79
83
|
import "./chunk-FYJ7W2PI.js";
|
|
80
84
|
import {
|
|
81
85
|
ChannelDeliveryError,
|
|
82
86
|
ChannelWebhookEnqueueError,
|
|
83
87
|
QWEN_SERVER_TOKEN_ENV,
|
|
84
88
|
isChannelDeliveryError
|
|
85
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-YP5KH5Y7.js";
|
|
86
90
|
import {
|
|
87
91
|
normalizeWorkerDiagnostic,
|
|
88
92
|
sanitizeWorkerDiagnostic
|
|
@@ -90,7 +94,12 @@ import {
|
|
|
90
94
|
import {
|
|
91
95
|
channelSelectionNames
|
|
92
96
|
} from "./chunk-ALMR3E6Q.js";
|
|
93
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-HIBNSEJE.js";
|
|
98
|
+
import {
|
|
99
|
+
EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
|
|
100
|
+
EXTERNAL_TOOL_GUARD_TOKEN_ENV,
|
|
101
|
+
PRIVATE_EXTERNAL_TOOL_GUARD_ENV
|
|
102
|
+
} from "./chunk-BKHCW2BI.js";
|
|
94
103
|
import "./chunk-M5GB774H.js";
|
|
95
104
|
import "./chunk-5HBA2Z7V.js";
|
|
96
105
|
import {
|
|
@@ -105,7 +114,7 @@ import {
|
|
|
105
114
|
import "./chunk-6PEXNQTX.js";
|
|
106
115
|
import {
|
|
107
116
|
getCliVersion
|
|
108
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-YMBOEAF4.js";
|
|
109
118
|
import "./chunk-VJNBRRZG.js";
|
|
110
119
|
import "./chunk-ALGGS7UH.js";
|
|
111
120
|
import {
|
|
@@ -128,7 +137,7 @@ import "./chunk-Q7YDKOGY.js";
|
|
|
128
137
|
import {
|
|
129
138
|
writeStderrLine,
|
|
130
139
|
writeStdoutLine
|
|
131
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-KGJGEEVR.js";
|
|
132
141
|
import "./chunk-DMTGGOSA.js";
|
|
133
142
|
import "./chunk-YQ3U5MUC.js";
|
|
134
143
|
import {
|
|
@@ -142,7 +151,7 @@ import {
|
|
|
142
151
|
// packages/cli/src/serve/run-qwen-serve.ts
|
|
143
152
|
init_esbuild_shims();
|
|
144
153
|
var import_express = __toESM(require_express(), 1);
|
|
145
|
-
import { X509Certificate, createHash as
|
|
154
|
+
import { X509Certificate, createHash as createHash3, timingSafeEqual } from "node:crypto";
|
|
146
155
|
import * as fs from "node:fs";
|
|
147
156
|
import * as https from "node:https";
|
|
148
157
|
import * as path from "node:path";
|
|
@@ -1278,7 +1287,7 @@ function createConcreteLogger(input) {
|
|
|
1278
1287
|
}
|
|
1279
1288
|
});
|
|
1280
1289
|
let timeout;
|
|
1281
|
-
const deadline = new Promise((
|
|
1290
|
+
const deadline = new Promise((resolve3) => {
|
|
1282
1291
|
timeout = setTimeout(() => {
|
|
1283
1292
|
try {
|
|
1284
1293
|
input.warnOnce(
|
|
@@ -1287,7 +1296,7 @@ function createConcreteLogger(input) {
|
|
|
1287
1296
|
);
|
|
1288
1297
|
} catch {
|
|
1289
1298
|
} finally {
|
|
1290
|
-
|
|
1299
|
+
resolve3();
|
|
1291
1300
|
}
|
|
1292
1301
|
}, input.policy.closeDrainBudgetMs);
|
|
1293
1302
|
timeout.unref();
|
|
@@ -1631,6 +1640,190 @@ ${capUtf8Record(
|
|
|
1631
1640
|
}
|
|
1632
1641
|
__name(initDaemonLogger, "initDaemonLogger");
|
|
1633
1642
|
|
|
1643
|
+
// packages/cli/src/serve/live/conversation-workspace.ts
|
|
1644
|
+
init_esbuild_shims();
|
|
1645
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
1646
|
+
import { lstat, mkdir, realpath, rmdir } from "node:fs/promises";
|
|
1647
|
+
import { homedir } from "node:os";
|
|
1648
|
+
import { isAbsolute, join as join2, relative as relative2, resolve, sep } from "node:path";
|
|
1649
|
+
var isSamePath = /* @__PURE__ */ __name((left, right) => process.platform === "win32" ? left.toLowerCase() === right.toLowerCase() : left === right, "isSamePath");
|
|
1650
|
+
function conversationDirectoryName(sessionId) {
|
|
1651
|
+
if (sessionId.length === 0 || sessionId.length > 256) {
|
|
1652
|
+
throw new Error("Live conversation session id is invalid");
|
|
1653
|
+
}
|
|
1654
|
+
return `conversation-${createHash2("sha256").update(sessionId).digest("hex")}`;
|
|
1655
|
+
}
|
|
1656
|
+
__name(conversationDirectoryName, "conversationDirectoryName");
|
|
1657
|
+
function validateRootStats(stats, label = "root") {
|
|
1658
|
+
if (stats.isSymbolicLink() || !stats.isDirectory()) {
|
|
1659
|
+
throw new Error(
|
|
1660
|
+
`Live conversation ${label} must be a non-symlink directory`
|
|
1661
|
+
);
|
|
1662
|
+
}
|
|
1663
|
+
if (process.platform !== "win32" && typeof process.getuid === "function" && stats.uid !== process.getuid()) {
|
|
1664
|
+
throw new Error(
|
|
1665
|
+
`Live conversation ${label} must be owned by the daemon user`
|
|
1666
|
+
);
|
|
1667
|
+
}
|
|
1668
|
+
if (process.platform !== "win32" && (stats.mode & 63) !== 0) {
|
|
1669
|
+
throw new Error(
|
|
1670
|
+
`Live conversation ${label} must be accessible only to its owner`
|
|
1671
|
+
);
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
__name(validateRootStats, "validateRootStats");
|
|
1675
|
+
function hasIdentity(stats, root) {
|
|
1676
|
+
return stats.dev === root.device && stats.ino === root.inode;
|
|
1677
|
+
}
|
|
1678
|
+
__name(hasIdentity, "hasIdentity");
|
|
1679
|
+
async function validateConversationDirectory(root, name, candidate, parent = root.canonicalRoot) {
|
|
1680
|
+
const before = await lstat(candidate);
|
|
1681
|
+
validateRootStats(before, "directory");
|
|
1682
|
+
const canonical = await realpath(candidate);
|
|
1683
|
+
const after = await lstat(canonical);
|
|
1684
|
+
validateRootStats(after, "directory");
|
|
1685
|
+
const child = relative2(parent, canonical);
|
|
1686
|
+
if (child !== name || child.includes(sep) || child.startsWith("..") || isAbsolute(child) || before.dev !== after.dev || before.ino !== after.ino) {
|
|
1687
|
+
throw new Error(
|
|
1688
|
+
"Live conversation directory must be an owned direct child"
|
|
1689
|
+
);
|
|
1690
|
+
}
|
|
1691
|
+
await revalidateLiveConversationRoot(root);
|
|
1692
|
+
return canonical;
|
|
1693
|
+
}
|
|
1694
|
+
__name(validateConversationDirectory, "validateConversationDirectory");
|
|
1695
|
+
function getLiveConversationRootPath(homeDir = homedir()) {
|
|
1696
|
+
return resolve(homeDir, "Documents", "Qwen Code", "Conversations");
|
|
1697
|
+
}
|
|
1698
|
+
__name(getLiveConversationRootPath, "getLiveConversationRootPath");
|
|
1699
|
+
async function createRoot(configuredRoot) {
|
|
1700
|
+
try {
|
|
1701
|
+
await mkdir(configuredRoot, { recursive: true, mode: 448 });
|
|
1702
|
+
} catch (error) {
|
|
1703
|
+
let existing;
|
|
1704
|
+
try {
|
|
1705
|
+
existing = await lstat(configuredRoot);
|
|
1706
|
+
} catch {
|
|
1707
|
+
throw error;
|
|
1708
|
+
}
|
|
1709
|
+
validateRootStats(existing);
|
|
1710
|
+
throw error;
|
|
1711
|
+
}
|
|
1712
|
+
const before = await lstat(configuredRoot);
|
|
1713
|
+
validateRootStats(before);
|
|
1714
|
+
const canonicalRoot = await realpath(configuredRoot);
|
|
1715
|
+
const after = await lstat(canonicalRoot);
|
|
1716
|
+
validateRootStats(after);
|
|
1717
|
+
if (before.dev !== after.dev || before.ino !== after.ino) {
|
|
1718
|
+
throw new Error(
|
|
1719
|
+
"Live conversation root identity changed during validation"
|
|
1720
|
+
);
|
|
1721
|
+
}
|
|
1722
|
+
return {
|
|
1723
|
+
configuredRoot,
|
|
1724
|
+
canonicalRoot,
|
|
1725
|
+
device: after.dev,
|
|
1726
|
+
inode: after.ino
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
__name(createRoot, "createRoot");
|
|
1730
|
+
async function revalidateLiveConversationRoot(root) {
|
|
1731
|
+
const configuredStats = await lstat(root.configuredRoot);
|
|
1732
|
+
validateRootStats(configuredStats);
|
|
1733
|
+
if (!hasIdentity(configuredStats, root)) {
|
|
1734
|
+
throw new Error("Live conversation root identity changed");
|
|
1735
|
+
}
|
|
1736
|
+
const canonical = await realpath(root.configuredRoot);
|
|
1737
|
+
if (!isSamePath(canonical, root.canonicalRoot)) {
|
|
1738
|
+
throw new Error("Live conversation root canonical path changed");
|
|
1739
|
+
}
|
|
1740
|
+
const canonicalStats = await lstat(root.canonicalRoot);
|
|
1741
|
+
validateRootStats(canonicalStats);
|
|
1742
|
+
if (!hasIdentity(canonicalStats, root)) {
|
|
1743
|
+
throw new Error("Live conversation root identity changed");
|
|
1744
|
+
}
|
|
1745
|
+
return root;
|
|
1746
|
+
}
|
|
1747
|
+
__name(revalidateLiveConversationRoot, "revalidateLiveConversationRoot");
|
|
1748
|
+
async function assertExactLiveConversationRoot(root, candidate) {
|
|
1749
|
+
await revalidateLiveConversationRoot(root);
|
|
1750
|
+
const resolvedCandidate = resolve(candidate);
|
|
1751
|
+
if (!isSamePath(resolvedCandidate, root.configuredRoot) && !isSamePath(resolvedCandidate, root.canonicalRoot)) {
|
|
1752
|
+
throw new Error("Workspace must be the exact Live conversation root");
|
|
1753
|
+
}
|
|
1754
|
+
const stats = await lstat(resolvedCandidate);
|
|
1755
|
+
validateRootStats(stats);
|
|
1756
|
+
const canonical = await realpath(resolvedCandidate);
|
|
1757
|
+
if (!isSamePath(canonical, root.canonicalRoot) || !hasIdentity(stats, root)) {
|
|
1758
|
+
throw new Error("Workspace must be the exact Live conversation root");
|
|
1759
|
+
}
|
|
1760
|
+
return root;
|
|
1761
|
+
}
|
|
1762
|
+
__name(assertExactLiveConversationRoot, "assertExactLiveConversationRoot");
|
|
1763
|
+
var LiveConversationWorkspace = class {
|
|
1764
|
+
static {
|
|
1765
|
+
__name(this, "LiveConversationWorkspace");
|
|
1766
|
+
}
|
|
1767
|
+
rootPath;
|
|
1768
|
+
rootPromise;
|
|
1769
|
+
constructor(options = {}) {
|
|
1770
|
+
this.rootPath = getLiveConversationRootPath(options.homeDir);
|
|
1771
|
+
}
|
|
1772
|
+
async getRoot() {
|
|
1773
|
+
if (!this.rootPromise) {
|
|
1774
|
+
const pending = createRoot(this.rootPath);
|
|
1775
|
+
this.rootPromise = pending;
|
|
1776
|
+
void pending.catch(() => {
|
|
1777
|
+
if (this.rootPromise === pending) this.rootPromise = void 0;
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
return this.rootPromise;
|
|
1781
|
+
}
|
|
1782
|
+
async revalidate() {
|
|
1783
|
+
return revalidateLiveConversationRoot(await this.getRoot());
|
|
1784
|
+
}
|
|
1785
|
+
async assertExactRoot(candidate) {
|
|
1786
|
+
return assertExactLiveConversationRoot(await this.getRoot(), candidate);
|
|
1787
|
+
}
|
|
1788
|
+
async materializeConversationDirectory(sessionId) {
|
|
1789
|
+
const root = await this.revalidate();
|
|
1790
|
+
const name = conversationDirectoryName(sessionId);
|
|
1791
|
+
const candidate = join2(root.canonicalRoot, name);
|
|
1792
|
+
try {
|
|
1793
|
+
await mkdir(candidate, { mode: 448 });
|
|
1794
|
+
} catch (error) {
|
|
1795
|
+
if (!error || typeof error !== "object" || error.code !== "EEXIST") {
|
|
1796
|
+
throw error;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
return validateConversationDirectory(root, name, candidate);
|
|
1800
|
+
}
|
|
1801
|
+
async discardEmptyConversationDirectory(sessionId) {
|
|
1802
|
+
const root = await this.revalidate();
|
|
1803
|
+
const name = conversationDirectoryName(sessionId);
|
|
1804
|
+
const candidate = join2(root.canonicalRoot, name);
|
|
1805
|
+
let canonical;
|
|
1806
|
+
try {
|
|
1807
|
+
canonical = await validateConversationDirectory(root, name, candidate);
|
|
1808
|
+
} catch (error) {
|
|
1809
|
+
if (error && typeof error === "object" && error.code === "ENOENT") {
|
|
1810
|
+
return false;
|
|
1811
|
+
}
|
|
1812
|
+
throw error;
|
|
1813
|
+
}
|
|
1814
|
+
try {
|
|
1815
|
+
await rmdir(canonical);
|
|
1816
|
+
} catch (error) {
|
|
1817
|
+
if (error && typeof error === "object" && (error.code === "ENOENT" || error.code === "ENOTEMPTY")) {
|
|
1818
|
+
return false;
|
|
1819
|
+
}
|
|
1820
|
+
throw error;
|
|
1821
|
+
}
|
|
1822
|
+
await revalidateLiveConversationRoot(root);
|
|
1823
|
+
return true;
|
|
1824
|
+
}
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1634
1827
|
// packages/cli/src/serve/daemon-metrics-ring.ts
|
|
1635
1828
|
init_esbuild_shims();
|
|
1636
1829
|
var MAX_SAMPLES_PER_WINDOW = 4096;
|
|
@@ -2287,7 +2480,10 @@ function rawChannelCwd(entry) {
|
|
|
2287
2480
|
}
|
|
2288
2481
|
__name(rawChannelCwd, "rawChannelCwd");
|
|
2289
2482
|
function resolveChannelWorkspaceGroups(input) {
|
|
2290
|
-
const {
|
|
2483
|
+
const { selection, loadChannelsConfig } = input;
|
|
2484
|
+
const workspaces = input.workspaces.filter(
|
|
2485
|
+
(workspace) => workspace.provenance !== "live-conversation"
|
|
2486
|
+
);
|
|
2291
2487
|
const primary = workspaces.find((workspace) => workspace.primary);
|
|
2292
2488
|
if (!primary) {
|
|
2293
2489
|
return {
|
|
@@ -2395,6 +2591,7 @@ var QWEN_SERVE_PROMPT_DEADLINE_MS_ENV = "QWEN_SERVE_PROMPT_DEADLINE_MS";
|
|
|
2395
2591
|
var QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS_ENV = "QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS";
|
|
2396
2592
|
var SHUTDOWN_FORCE_CLOSE_MS = 5e3;
|
|
2397
2593
|
var DAEMON_LOG_FORCED_FLUSH_BUDGET_MS = 250;
|
|
2594
|
+
var DEFAULT_LIVE_DISCOVERY_RETRY_MS = 5e3;
|
|
2398
2595
|
function channelDeliveryPublicError(code) {
|
|
2399
2596
|
switch (code) {
|
|
2400
2597
|
case "channel_worker_unavailable":
|
|
@@ -2485,8 +2682,8 @@ async function flushDaemonLogBounded(daemonLog, budgetMs) {
|
|
|
2485
2682
|
await Promise.race([
|
|
2486
2683
|
daemonLog.flush().catch(() => {
|
|
2487
2684
|
}),
|
|
2488
|
-
new Promise((
|
|
2489
|
-
timer = setTimeout(
|
|
2685
|
+
new Promise((resolve3) => {
|
|
2686
|
+
timer = setTimeout(resolve3, budgetMs);
|
|
2490
2687
|
timer.unref();
|
|
2491
2688
|
})
|
|
2492
2689
|
]);
|
|
@@ -2733,12 +2930,12 @@ var retryableChannelWorkerShutdownErrors = /* @__PURE__ */ new WeakSet();
|
|
|
2733
2930
|
var channelWorkerRuntimePromise;
|
|
2734
2931
|
async function loadChannelWorkerRuntime() {
|
|
2735
2932
|
channelWorkerRuntimePromise ??= Promise.all([
|
|
2736
|
-
import("./channel-worker-supervisor-
|
|
2737
|
-
import("./pidfile-
|
|
2738
|
-
import("./runtime-
|
|
2933
|
+
import("./channel-worker-supervisor-62YWUGP2.js"),
|
|
2934
|
+
import("./pidfile-HVPYVRLS.js"),
|
|
2935
|
+
import("./runtime-VUA4WQYD.js"),
|
|
2739
2936
|
import("./cli-entry-path-4VJ3Y6T2.js"),
|
|
2740
|
-
import("./channel-worker-group-
|
|
2741
|
-
import("./channel-worker-manager-
|
|
2937
|
+
import("./channel-worker-group-JWQK224X.js"),
|
|
2938
|
+
import("./channel-worker-manager-77E3OXRQ.js")
|
|
2742
2939
|
]).then(
|
|
2743
2940
|
([
|
|
2744
2941
|
supervisor,
|
|
@@ -2843,10 +3040,16 @@ function shouldPreheatBridge(deps) {
|
|
|
2843
3040
|
__name(shouldPreheatBridge, "shouldPreheatBridge");
|
|
2844
3041
|
var coreRuntimePromise;
|
|
2845
3042
|
function loadCoreRuntime() {
|
|
2846
|
-
coreRuntimePromise ??= import("./core-runtime-
|
|
3043
|
+
coreRuntimePromise ??= import("./core-runtime-U4VJ5TIV.js");
|
|
2847
3044
|
return coreRuntimePromise;
|
|
2848
3045
|
}
|
|
2849
3046
|
__name(loadCoreRuntime, "loadCoreRuntime");
|
|
3047
|
+
var liveDiscoveryRuntimePromise;
|
|
3048
|
+
function loadLiveDiscoveryRuntime() {
|
|
3049
|
+
liveDiscoveryRuntimePromise ??= import("./discovery-XLHITE74.js");
|
|
3050
|
+
return liveDiscoveryRuntimePromise;
|
|
3051
|
+
}
|
|
3052
|
+
__name(loadLiveDiscoveryRuntime, "loadLiveDiscoveryRuntime");
|
|
2850
3053
|
async function resolveDaemonLogBaseDirForRun(input) {
|
|
2851
3054
|
if (input.deps.daemonLogBaseDir) {
|
|
2852
3055
|
return input.deps.daemonLogBaseDir;
|
|
@@ -2873,10 +3076,10 @@ __name(resolveDaemonLogBaseDirForRun, "resolveDaemonLogBaseDirForRun");
|
|
|
2873
3076
|
var settingsRuntimePromise;
|
|
2874
3077
|
function loadSettingsRuntimeModules() {
|
|
2875
3078
|
settingsRuntimePromise ??= Promise.all([
|
|
2876
|
-
import("./settings-
|
|
2877
|
-
import("./environment-
|
|
2878
|
-
import("./loadedSettingsAdapter-
|
|
2879
|
-
import("./trustedFolders-
|
|
3079
|
+
import("./settings-AI2BTBOZ.js"),
|
|
3080
|
+
import("./environment-W5TRDM3G.js"),
|
|
3081
|
+
import("./loadedSettingsAdapter-4D7GUGW6.js"),
|
|
3082
|
+
import("./trustedFolders-NFS4KHO4.js")
|
|
2880
3083
|
]).then(([settings, environment, loadedSettingsAdapter, trustedFolders]) => ({
|
|
2881
3084
|
settings,
|
|
2882
3085
|
environment,
|
|
@@ -2889,8 +3092,8 @@ __name(loadSettingsRuntimeModules, "loadSettingsRuntimeModules");
|
|
|
2889
3092
|
var channelWebhookConfigRuntimePromise;
|
|
2890
3093
|
function loadChannelWebhookConfigRuntime() {
|
|
2891
3094
|
channelWebhookConfigRuntimePromise ??= Promise.all([
|
|
2892
|
-
import("./runtime-
|
|
2893
|
-
import("./config-utils-
|
|
3095
|
+
import("./runtime-VUA4WQYD.js"),
|
|
3096
|
+
import("./config-utils-VXD4SPVR.js")
|
|
2894
3097
|
]).then(([channelRuntime, configUtils]) => ({
|
|
2895
3098
|
loadChannelsConfig: channelRuntime.loadChannelsConfig,
|
|
2896
3099
|
parseChannelWebhookConfig: configUtils.parseChannelWebhookConfig
|
|
@@ -2915,17 +3118,17 @@ async function loadServeRuntimeModules() {
|
|
|
2915
3118
|
totalSessionAdmissionModule,
|
|
2916
3119
|
workspaceRegistryModule
|
|
2917
3120
|
] = await Promise.all([
|
|
2918
|
-
import("./server-
|
|
2919
|
-
import("./bridge-
|
|
2920
|
-
import("./spawnChannel-
|
|
3121
|
+
import("./server-46ZO2CLV.js"),
|
|
3122
|
+
import("./bridge-RPAU64CA.js"),
|
|
3123
|
+
import("./spawnChannel-FJXW35U7.js"),
|
|
2921
3124
|
import("./process-registry-2CHQBXH5.js"),
|
|
2922
|
-
import("./workspace-service-
|
|
3125
|
+
import("./workspace-service-LANDVPL7.js"),
|
|
2923
3126
|
import("./types-ML3TRJQ5.js"),
|
|
2924
|
-
import("./daemon-status-provider-
|
|
2925
|
-
import("./workspace-providers-status-
|
|
2926
|
-
import("./workspace-skills-status-
|
|
2927
|
-
import("./total-session-admission-
|
|
2928
|
-
import("./workspace-registry-
|
|
3127
|
+
import("./daemon-status-provider-UJUGTDTL.js"),
|
|
3128
|
+
import("./workspace-providers-status-FIDZQ2PL.js"),
|
|
3129
|
+
import("./workspace-skills-status-2IQVJNIN.js"),
|
|
3130
|
+
import("./total-session-admission-7WVAWQPU.js"),
|
|
3131
|
+
import("./workspace-registry-5PEUCY6E.js")
|
|
2929
3132
|
]);
|
|
2930
3133
|
return {
|
|
2931
3134
|
createServeApp: serverModule.createServeApp,
|
|
@@ -2972,6 +3175,7 @@ function currentServeFeaturesForRunQwenServe(opts, sessionShellCommandEnabled, s
|
|
|
2972
3175
|
return getAdvertisedServeFeatures(void 0, {
|
|
2973
3176
|
requireAuth: opts.requireAuth === true,
|
|
2974
3177
|
mcpPoolActive: opts.mcpPoolActive !== false,
|
|
3178
|
+
externalToolGuardActive: opts.externalToolGuard?.mode === "required",
|
|
2975
3179
|
allowOriginActive: opts.allowOrigins !== void 0 && opts.allowOrigins.length > 0,
|
|
2976
3180
|
...opts.promptDeadlineMs !== void 0 ? { promptDeadlineMs: opts.promptDeadlineMs } : {},
|
|
2977
3181
|
...opts.writerIdleTimeoutMs !== void 0 ? { writerIdleTimeoutMs: opts.writerIdleTimeoutMs } : {},
|
|
@@ -3119,12 +3323,12 @@ async function waitForRuntimeStartingForShutdown(runtimeStarting, daemonLog, tim
|
|
|
3119
3323
|
let timer;
|
|
3120
3324
|
await Promise.race([
|
|
3121
3325
|
runtimeStarting,
|
|
3122
|
-
new Promise((
|
|
3326
|
+
new Promise((resolve3) => {
|
|
3123
3327
|
timer = setTimeout(() => {
|
|
3124
3328
|
daemonLog.warn(
|
|
3125
3329
|
`${timeoutMs}ms runtime-startup wait reached during shutdown; continuing listener close`
|
|
3126
3330
|
);
|
|
3127
|
-
|
|
3331
|
+
resolve3();
|
|
3128
3332
|
}, timeoutMs);
|
|
3129
3333
|
timer.unref();
|
|
3130
3334
|
})
|
|
@@ -3490,8 +3694,8 @@ function matchesWebhookSecret(candidate, expected) {
|
|
|
3490
3694
|
if (typeof candidate !== "string" || typeof expected !== "string" || expected.length === 0) {
|
|
3491
3695
|
return false;
|
|
3492
3696
|
}
|
|
3493
|
-
const expectedDigest =
|
|
3494
|
-
const candidateDigest =
|
|
3697
|
+
const expectedDigest = createHash3("sha256").update(expected).digest();
|
|
3698
|
+
const candidateDigest = createHash3("sha256").update(candidate).digest();
|
|
3495
3699
|
return timingSafeEqual(expectedDigest, candidateDigest);
|
|
3496
3700
|
}
|
|
3497
3701
|
__name(matchesWebhookSecret, "matchesWebhookSecret");
|
|
@@ -3578,6 +3782,7 @@ async function runQwenServe(optsIn, deps = {}) {
|
|
|
3578
3782
|
__name(runQwenServe, "runQwenServe");
|
|
3579
3783
|
async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
3580
3784
|
const runStartedAt = performance2.now();
|
|
3785
|
+
delete process.env[EXTERNAL_TOOL_GUARD_TOKEN_ENV];
|
|
3581
3786
|
const channelDeliveryAuthorizations = new ChannelDeliveryAuthorizationStore();
|
|
3582
3787
|
const shouldPreheat = !deps.bridge && shouldPreheatBridge(deps);
|
|
3583
3788
|
const startup = {
|
|
@@ -3835,7 +4040,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
3835
4040
|
}
|
|
3836
4041
|
let workspaceRegistrationStore = deps.workspaceRegistrationStore;
|
|
3837
4042
|
if (workspaceRegistrationStore === void 0 && process.env["QWEN_SERVE_NO_PERSISTENT_REGISTRATION"] !== "1") {
|
|
3838
|
-
const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-
|
|
4043
|
+
const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-RCSPE4DU.js");
|
|
3839
4044
|
workspaceRegistrationStore = new WorkspaceRegistrationStore(boundWorkspace);
|
|
3840
4045
|
}
|
|
3841
4046
|
if (workspaceRegistrationStore) {
|
|
@@ -4039,6 +4244,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4039
4244
|
);
|
|
4040
4245
|
}
|
|
4041
4246
|
}
|
|
4247
|
+
const rawExternalToolGuard = opts.externalToolGuard;
|
|
4248
|
+
if (rawExternalToolGuard !== void 0 && (typeof rawExternalToolGuard !== "object" || rawExternalToolGuard === null || rawExternalToolGuard.mode !== "required")) {
|
|
4249
|
+
throw new TypeError(
|
|
4250
|
+
"Invalid externalToolGuard: omit it for off mode or set mode to 'required'."
|
|
4251
|
+
);
|
|
4252
|
+
}
|
|
4042
4253
|
opts.maxTotalSessions ??= deriveDefaultMaxTotalSessions(
|
|
4043
4254
|
opts.maxSessions,
|
|
4044
4255
|
workspaceInputs.length
|
|
@@ -4047,10 +4258,30 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4047
4258
|
if (opts.mcpPoolActive === void 0 && inheritedNoPool) {
|
|
4048
4259
|
opts.mcpPoolActive = false;
|
|
4049
4260
|
}
|
|
4261
|
+
let externalToolGuardHandler;
|
|
4262
|
+
if (opts.externalToolGuard?.mode === "required") {
|
|
4263
|
+
if (deps.bridge) {
|
|
4264
|
+
throw new Error(
|
|
4265
|
+
"Required external tool guarding cannot be combined with an injected bridge."
|
|
4266
|
+
);
|
|
4267
|
+
}
|
|
4268
|
+
const { RequiredExternalToolGuard } = await import("./external-tool-guard-provider-5HTGOPGU.js");
|
|
4269
|
+
const provider = new RequiredExternalToolGuard({
|
|
4270
|
+
endpoint: opts.externalToolGuard.endpoint,
|
|
4271
|
+
token: opts.externalToolGuard.token,
|
|
4272
|
+
...opts.externalToolGuard.timeoutMs !== void 0 ? { timeoutMs: opts.externalToolGuard.timeoutMs } : {}
|
|
4273
|
+
});
|
|
4274
|
+
await provider.initialize();
|
|
4275
|
+
externalToolGuardHandler = provider.prepare;
|
|
4276
|
+
writeStderrLine(
|
|
4277
|
+
"qwen serve: required external tool guard handshake succeeded."
|
|
4278
|
+
);
|
|
4279
|
+
}
|
|
4050
4280
|
const childEnvOverrides = {
|
|
4051
4281
|
QWEN_SERVE_MCP_CLIENT_BUDGET: opts.mcpClientBudget !== void 0 ? String(opts.mcpClientBudget) : void 0,
|
|
4052
4282
|
QWEN_SERVE_MCP_BUDGET_MODE: opts.mcpBudgetMode,
|
|
4053
|
-
QWEN_SERVE_CDP_TUNNEL_OVER_WS: opts.cdpTunnelOverWs ? "1" : void 0
|
|
4283
|
+
QWEN_SERVE_CDP_TUNNEL_OVER_WS: opts.cdpTunnelOverWs ? "1" : void 0,
|
|
4284
|
+
[PRIVATE_EXTERNAL_TOOL_GUARD_ENV]: externalToolGuardHandler ? EXTERNAL_TOOL_GUARD_REQUIRED_VALUE : void 0
|
|
4054
4285
|
};
|
|
4055
4286
|
const cliVersionPromise = getCliVersion();
|
|
4056
4287
|
let cliVersion;
|
|
@@ -4092,8 +4323,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4092
4323
|
let startRuntimeAfterHealth;
|
|
4093
4324
|
let startRuntimeForRequest;
|
|
4094
4325
|
const deferRuntimeUntilFirstHealth = deps.resolveOnListen === true && deps.deferRuntimeUntilFirstHealth === true;
|
|
4095
|
-
const runtimeReady = new Promise((
|
|
4096
|
-
markRuntimeReady =
|
|
4326
|
+
const runtimeReady = new Promise((resolve3, reject) => {
|
|
4327
|
+
markRuntimeReady = resolve3;
|
|
4097
4328
|
markRuntimeFailed = reject;
|
|
4098
4329
|
});
|
|
4099
4330
|
void runtimeReady.catch(() => {
|
|
@@ -4287,6 +4518,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4287
4518
|
}, "stopSafely");
|
|
4288
4519
|
stopSafely("scheduled-task keepalive", locals.stopScheduledTaskKeepalive);
|
|
4289
4520
|
stopSafely("workspace git state", locals.stopWorkspaceGitState);
|
|
4521
|
+
stopSafely("Live Host coordinator", locals.stopLiveCoordinator);
|
|
4290
4522
|
stopTrustPolicyMonitor(app2);
|
|
4291
4523
|
for (const stop of locals.subSessionStoppers ?? []) {
|
|
4292
4524
|
stopSafely("sub-session launcher", stop);
|
|
@@ -4346,7 +4578,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4346
4578
|
loadCoreRuntime(),
|
|
4347
4579
|
loadSettingsRuntimeModules(),
|
|
4348
4580
|
cliVersionPromise,
|
|
4349
|
-
import("./daemon-trust-policy-
|
|
4581
|
+
import("./daemon-trust-policy-ZHDD5VYQ.js")
|
|
4350
4582
|
]);
|
|
4351
4583
|
cliVersion = resolvedCliVersion;
|
|
4352
4584
|
settingsRuntime.environment.preResolveHomeEnvOverrides();
|
|
@@ -4369,6 +4601,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4369
4601
|
`qwen serve: managed scratch workspaces are unavailable: ${err instanceof Error ? err.message : String(err)}`
|
|
4370
4602
|
);
|
|
4371
4603
|
}
|
|
4604
|
+
const liveConversationWorkspace = deps.liveConversationWorkspace ?? new LiveConversationWorkspace();
|
|
4372
4605
|
let runtimeBootSettings;
|
|
4373
4606
|
try {
|
|
4374
4607
|
runtimeBootSettings = settingsRuntime.settings.loadSettings(
|
|
@@ -4711,7 +4944,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4711
4944
|
resolveSkillSettings,
|
|
4712
4945
|
skillSettingStrings,
|
|
4713
4946
|
updateWorkspaceSkillSettingLists
|
|
4714
|
-
} = await import("./skill-settings-
|
|
4947
|
+
} = await import("./skill-settings-6BFQWMW4.js");
|
|
4715
4948
|
const fresh = loadSettingsForPersistence(workspace);
|
|
4716
4949
|
const normalizedName = skillName.trim().toLowerCase();
|
|
4717
4950
|
const resolved = resolveSkillSettings(fresh);
|
|
@@ -4810,7 +5043,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4810
5043
|
);
|
|
4811
5044
|
}
|
|
4812
5045
|
}), "persistSettingsFn");
|
|
4813
|
-
const { createSubSessionLauncher } = await import("./create-sub-session-
|
|
5046
|
+
const { createSubSessionLauncher } = await import("./create-sub-session-QZNQY332.js");
|
|
4814
5047
|
const subSessionLauncher = createSubSessionLauncher({
|
|
4815
5048
|
getBridge: /* @__PURE__ */ __name(() => bridgeRef, "getBridge"),
|
|
4816
5049
|
boundWorkspace,
|
|
@@ -4852,6 +5085,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
4852
5085
|
sessionShellCommandEnabled,
|
|
4853
5086
|
childEnvOverrides,
|
|
4854
5087
|
channelFactory,
|
|
5088
|
+
...externalToolGuardHandler ? { externalToolGuard: externalToolGuardHandler } : {},
|
|
4855
5089
|
onDiagnosticLine: diagnosticSink,
|
|
4856
5090
|
telemetry: daemonTelemetry,
|
|
4857
5091
|
...permissionPolicy !== void 0 ? { permissionPolicy } : {},
|
|
@@ -5152,6 +5386,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5152
5386
|
sessionShellCommandEnabled,
|
|
5153
5387
|
childEnvOverrides,
|
|
5154
5388
|
channelFactory: secondaryChannelFactory,
|
|
5389
|
+
...externalToolGuardHandler ? { externalToolGuard: externalToolGuardHandler } : {},
|
|
5155
5390
|
onDiagnosticLine: diagnosticSink,
|
|
5156
5391
|
telemetry: createRuntimeBridgeTelemetry(secondaryWorkspaceHash),
|
|
5157
5392
|
...permissionPolicy !== void 0 ? { permissionPolicy } : {},
|
|
@@ -5399,9 +5634,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5399
5634
|
"Managed scratch runtime must use an accepted direct child directory"
|
|
5400
5635
|
);
|
|
5401
5636
|
}
|
|
5637
|
+
if (provenance === "live-conversation") {
|
|
5638
|
+
await liveConversationWorkspace.assertExactRoot(cwd);
|
|
5639
|
+
}
|
|
5402
5640
|
const snapshot = buildOptions?.snapshot ?? await trustPolicy.readDaemonTrustPolicySnapshot();
|
|
5403
5641
|
const decision = buildOptions?.decision ?? trustPolicy.evaluateDaemonWorkspaceTrust(snapshot, cwd);
|
|
5404
|
-
const trusted = provenance === "managed-scratch" ? true : buildOptions?.trusted ?? decision.targetTrusted;
|
|
5642
|
+
const trusted = provenance === "managed-scratch" || provenance === "live-conversation" ? true : buildOptions?.trusted ?? decision.targetTrusted;
|
|
5405
5643
|
let wsSettings;
|
|
5406
5644
|
try {
|
|
5407
5645
|
wsSettings = settingsRuntime.settings.loadSettings(cwd, {
|
|
@@ -5456,6 +5694,17 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5456
5694
|
const wsSubSessionLauncher = createSubSessionLauncher({
|
|
5457
5695
|
getBridge: /* @__PURE__ */ __name(() => wsBridgeRef, "getBridge"),
|
|
5458
5696
|
boundWorkspace: cwd,
|
|
5697
|
+
...provenance === "live-conversation" ? {
|
|
5698
|
+
notifySentCompletion: true,
|
|
5699
|
+
isolatedWorkspace: {
|
|
5700
|
+
materializeDirectory: /* @__PURE__ */ __name((sessionId) => liveConversationWorkspace.materializeConversationDirectory(
|
|
5701
|
+
sessionId
|
|
5702
|
+
), "materializeDirectory"),
|
|
5703
|
+
discardEmptyDirectory: /* @__PURE__ */ __name((sessionId) => liveConversationWorkspace.discardEmptyConversationDirectory(
|
|
5704
|
+
sessionId
|
|
5705
|
+
), "discardEmptyDirectory")
|
|
5706
|
+
}
|
|
5707
|
+
} : {},
|
|
5459
5708
|
...subSessionConcurrencyCapsFromSettings(
|
|
5460
5709
|
wsSettings?.merged.serve ?? {}
|
|
5461
5710
|
)
|
|
@@ -5492,6 +5741,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5492
5741
|
sessionShellCommandEnabled,
|
|
5493
5742
|
childEnvOverrides,
|
|
5494
5743
|
channelFactory: wsChannelFactory,
|
|
5744
|
+
...externalToolGuardHandler ? { externalToolGuard: externalToolGuardHandler } : {},
|
|
5495
5745
|
onDiagnosticLine: diagnosticSink,
|
|
5496
5746
|
telemetry: createRuntimeBridgeTelemetry(wsHash),
|
|
5497
5747
|
...permissionPolicy !== void 0 ? { permissionPolicy } : {},
|
|
@@ -5632,11 +5882,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5632
5882
|
workspaceId: wsHash,
|
|
5633
5883
|
workspaceCwd: cwd,
|
|
5634
5884
|
sessionRuntimeBaseDir: wsEnv.sessionRuntimeBaseDir,
|
|
5635
|
-
...buildOptions?.displayName !== void 0 ? { displayName: buildOptions.displayName } : {},
|
|
5885
|
+
...buildOptions?.displayName !== void 0 ? { displayName: buildOptions.displayName } : provenance === "live-conversation" ? { displayName: "Conversations" } : {},
|
|
5636
5886
|
primary: buildOptions?.primary ?? false,
|
|
5637
5887
|
trusted,
|
|
5638
5888
|
provenance,
|
|
5639
|
-
removable: buildOptions?.removable ??
|
|
5889
|
+
removable: buildOptions?.removable ?? provenance !== "live-conversation",
|
|
5640
5890
|
registrationIds: [...buildOptions?.registrationIds ?? []],
|
|
5641
5891
|
env: wsEnv.metadata,
|
|
5642
5892
|
bridge: wsBridge,
|
|
@@ -5650,7 +5900,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5650
5900
|
})
|
|
5651
5901
|
};
|
|
5652
5902
|
subSessionStoppersByRuntime.set(wsRuntime, wsSubSessionLauncher.stop);
|
|
5653
|
-
if (provenance
|
|
5903
|
+
if (provenance === "existing" && !buildOptions?.snapshot) {
|
|
5654
5904
|
const latest = await trustPolicy.readDaemonTrustPolicySnapshot();
|
|
5655
5905
|
if (latest.revision !== snapshot.revision) {
|
|
5656
5906
|
generationGuard.close();
|
|
@@ -5682,6 +5932,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5682
5932
|
const serveAppForRuntimeLifecycle = { current: void 0 };
|
|
5683
5933
|
const workspaceRuntimeRemoval = {
|
|
5684
5934
|
async runtimeAdded(runtimeAdded) {
|
|
5935
|
+
if (runtimeAdded.provenance === "live-conversation") return;
|
|
5685
5936
|
channelWebhookEnvByWorkspace.set(
|
|
5686
5937
|
runtimeAdded.workspaceCwd,
|
|
5687
5938
|
workspaceRuntimeEffectiveEnv(runtimeAdded, daemonRuntimeBaseEnv)
|
|
@@ -5714,7 +5965,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5714
5965
|
invalidatePrimaryServeFeaturesCache();
|
|
5715
5966
|
}
|
|
5716
5967
|
totalSessionAdmission.beginWorkspaceDrain(runtimeToDrain.workspaceCwd);
|
|
5717
|
-
|
|
5968
|
+
if (runtimeToDrain.provenance !== "live-conversation") {
|
|
5969
|
+
channelWorkerManager?.beginWorkspaceDrain(
|
|
5970
|
+
runtimeToDrain.workspaceCwd
|
|
5971
|
+
);
|
|
5972
|
+
}
|
|
5718
5973
|
workspaceVoiceCoordinator.beginWorkspaceDrain(runtimeToDrain);
|
|
5719
5974
|
channelWebhookEnvByWorkspace.delete(runtimeToDrain.workspaceCwd);
|
|
5720
5975
|
channelWebhookConfigVersion += 1;
|
|
@@ -5735,15 +5990,21 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5735
5990
|
bridgeRef = runtimeToDrain.bridge;
|
|
5736
5991
|
invalidatePrimaryServeFeaturesCache();
|
|
5737
5992
|
}
|
|
5738
|
-
|
|
5993
|
+
if (runtimeToDrain.provenance !== "live-conversation") {
|
|
5994
|
+
channelWorkerManager?.cancelWorkspaceDrain(
|
|
5995
|
+
runtimeToDrain.workspaceCwd
|
|
5996
|
+
);
|
|
5997
|
+
}
|
|
5739
5998
|
totalSessionAdmission.cancelWorkspaceDrain(runtimeToDrain.workspaceCwd);
|
|
5740
5999
|
workspaceVoiceCoordinator.cancelWorkspaceDrain(runtimeToDrain);
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
6000
|
+
if (runtimeToDrain.provenance !== "live-conversation") {
|
|
6001
|
+
channelWebhookEnvByWorkspace.set(
|
|
6002
|
+
runtimeToDrain.workspaceCwd,
|
|
6003
|
+
workspaceRuntimeEffectiveEnv(runtimeToDrain, daemonRuntimeBaseEnv)
|
|
6004
|
+
);
|
|
6005
|
+
channelWebhookConfigVersion += 1;
|
|
6006
|
+
refreshChannelWebhookConfigs?.();
|
|
6007
|
+
}
|
|
5747
6008
|
const app3 = serveAppForRuntimeLifecycle.current ?? runtimeApp ?? runtimeAppForCleanup;
|
|
5748
6009
|
const startScheduledTaskKeepaliveForWorkspace = app3?.locals?.["startScheduledTaskKeepaliveForWorkspace"];
|
|
5749
6010
|
try {
|
|
@@ -5766,7 +6027,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5766
6027
|
pendingSessionStarts: totalSessionAdmission.snapshotForWorkspace(
|
|
5767
6028
|
runtimeToDrain.workspaceCwd
|
|
5768
6029
|
).inFlight,
|
|
5769
|
-
channelWorkers: channelWorkerManager?.workspaceActivity(
|
|
6030
|
+
channelWorkers: runtimeToDrain.provenance === "live-conversation" ? 0 : channelWorkerManager?.workspaceActivity(
|
|
5770
6031
|
runtimeToDrain.workspaceCwd
|
|
5771
6032
|
) ?? 0,
|
|
5772
6033
|
voiceSessions: workspaceVoiceCoordinator.getWorkspaceActivity(runtimeToDrain)
|
|
@@ -5798,7 +6059,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5798
6059
|
stopSubSessions?.();
|
|
5799
6060
|
} catch {
|
|
5800
6061
|
}
|
|
5801
|
-
if (reason !== "daemon_shutdown" && channelWorkerManager) {
|
|
6062
|
+
if (reason !== "daemon_shutdown" && channelWorkerManager && runtimeToDrain.provenance !== "live-conversation") {
|
|
5802
6063
|
await channelWorkerManager.removeWorkspace(runtimeToDrain.workspaceCwd).catch((err) => {
|
|
5803
6064
|
daemonLog.error(
|
|
5804
6065
|
"workspace channel worker cleanup error",
|
|
@@ -5920,8 +6181,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5920
6181
|
{ createChannelManagementService },
|
|
5921
6182
|
{ WorkspaceChannelSettingsStore }
|
|
5922
6183
|
] = await Promise.all([
|
|
5923
|
-
import("./channel-management-service-
|
|
5924
|
-
import("./channel-settings-store-
|
|
6184
|
+
import("./channel-management-service-IGEUOVRT.js"),
|
|
6185
|
+
import("./channel-settings-store-ON64MF7G.js")
|
|
5925
6186
|
]);
|
|
5926
6187
|
return createChannelManagementService({
|
|
5927
6188
|
workspaceCwd: targetRuntime.workspaceCwd,
|
|
@@ -5983,6 +6244,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
5983
6244
|
getWorkspaceTrustPolicySnapshot: /* @__PURE__ */ __name(() => latestTrustPolicySnapshot, "getWorkspaceTrustPolicySnapshot")
|
|
5984
6245
|
} : {},
|
|
5985
6246
|
managedScratchRoot,
|
|
6247
|
+
liveConversationWorkspace,
|
|
5986
6248
|
workspaceRegistrationStore,
|
|
5987
6249
|
workspaceRuntimeRemoval,
|
|
5988
6250
|
workspaceTrustHotReloadAvailable,
|
|
@@ -6000,6 +6262,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6000
6262
|
primaryWorkspaceTrusted: trustedWorkspace,
|
|
6001
6263
|
primaryRuntimeEnv,
|
|
6002
6264
|
daemonEnv: daemonRuntimeBaseEnv,
|
|
6265
|
+
runtimePlatform: deps.runtimePlatform,
|
|
6003
6266
|
daemonLog,
|
|
6004
6267
|
getChannelWorkerSnapshot,
|
|
6005
6268
|
getChannelWorkerSnapshots,
|
|
@@ -6117,8 +6380,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6117
6380
|
{ createWorkspaceTrustReconciler },
|
|
6118
6381
|
{ createDaemonTrustPolicyMonitor }
|
|
6119
6382
|
] = await Promise.all([
|
|
6120
|
-
import("./workspace-trust-reconciler-
|
|
6121
|
-
import("./daemon-trust-policy-monitor-
|
|
6383
|
+
import("./workspace-trust-reconciler-CZPZZCZC.js"),
|
|
6384
|
+
import("./daemon-trust-policy-monitor-5SHYBDGA.js")
|
|
6122
6385
|
]);
|
|
6123
6386
|
const materializationFor = /* @__PURE__ */ __name((entry, snapshot, decision) => {
|
|
6124
6387
|
const boundWorkspaces2 = entry.primary && decision.targetTrusted ? runtime.resolveBoundWorkspacesFromIdeEnv(
|
|
@@ -6213,7 +6476,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6213
6476
|
handle?.disposeWorkspace(runtimeToDispose.workspaceId);
|
|
6214
6477
|
const deadline = Date.now() + 1e3;
|
|
6215
6478
|
while ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0 && Date.now() < deadline) {
|
|
6216
|
-
await new Promise((
|
|
6479
|
+
await new Promise((resolve3) => setTimeout(resolve3, 25));
|
|
6217
6480
|
}
|
|
6218
6481
|
if ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0) {
|
|
6219
6482
|
throw new Error(
|
|
@@ -6325,7 +6588,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6325
6588
|
);
|
|
6326
6589
|
}
|
|
6327
6590
|
const channelValidationSettingsRuntime = opts.channelSelection ? await loadSettingsRuntimeModules() : void 0;
|
|
6328
|
-
const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-
|
|
6591
|
+
const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-ZHDD5VYQ.js") : void 0;
|
|
6329
6592
|
const channelValidationTrustSnapshot = channelValidationTrustPolicy ? await channelValidationTrustPolicy.readDaemonTrustPolicySnapshot() : void 0;
|
|
6330
6593
|
const resolveChannelWorkspaceGroupsAtListen = /* @__PURE__ */ __name(() => {
|
|
6331
6594
|
if (!opts.channelSelection || !channelValidationSettingsRuntime || !channelRuntime) {
|
|
@@ -6431,7 +6694,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6431
6694
|
if (opts.channelSelection) {
|
|
6432
6695
|
reserveChannelServicePidfile(opts.channelSelection);
|
|
6433
6696
|
}
|
|
6434
|
-
return await new Promise((
|
|
6697
|
+
return await new Promise((resolve3, reject) => {
|
|
6435
6698
|
const onListening = /* @__PURE__ */ __name((error) => {
|
|
6436
6699
|
if (error) return;
|
|
6437
6700
|
startup.listenerReadyAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -6449,6 +6712,168 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6449
6712
|
actualPort = typeof addr === "object" && addr ? addr.port : opts.port;
|
|
6450
6713
|
const scheme = tlsOptions ? "https" : "http";
|
|
6451
6714
|
const url = `${scheme}://${formatHostForUrl(opts.hostname)}:${actualPort}`;
|
|
6715
|
+
const liveRuntimeBaseDir = path.dirname(daemonLogBaseDir);
|
|
6716
|
+
const liveDiscoveryOwners = [];
|
|
6717
|
+
let liveDiscoveryPublish;
|
|
6718
|
+
let liveDiscoveryRetryTimer;
|
|
6719
|
+
let liveDiscoveryRetryTask;
|
|
6720
|
+
let liveDiscoveryEnabled = false;
|
|
6721
|
+
let liveDiscoveryShuttingDown = false;
|
|
6722
|
+
let liveDiscoveryToggle = Promise.resolve();
|
|
6723
|
+
let attemptPendingLiveDiscovery;
|
|
6724
|
+
const pendingLiveDiscoveryBaseDirs = /* @__PURE__ */ new Set();
|
|
6725
|
+
const warnedLiveDiscoveryOwners = /* @__PURE__ */ new Set();
|
|
6726
|
+
const liveDiscoveryRetryDelayMs = deps.liveDiscoveryRetryDelayMs !== void 0 && Number.isFinite(deps.liveDiscoveryRetryDelayMs) && deps.liveDiscoveryRetryDelayMs >= 10 ? Math.min(deps.liveDiscoveryRetryDelayMs, 6e4) : DEFAULT_LIVE_DISCOVERY_RETRY_MS;
|
|
6727
|
+
const scheduleLiveDiscoveryRetry = /* @__PURE__ */ __name(() => {
|
|
6728
|
+
if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled || liveDiscoveryRetryTimer || liveDiscoveryRetryTask || pendingLiveDiscoveryBaseDirs.size === 0 || !attemptPendingLiveDiscovery) {
|
|
6729
|
+
return;
|
|
6730
|
+
}
|
|
6731
|
+
liveDiscoveryRetryTimer = setTimeout(() => {
|
|
6732
|
+
liveDiscoveryRetryTimer = void 0;
|
|
6733
|
+
if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled || !attemptPendingLiveDiscovery) {
|
|
6734
|
+
return;
|
|
6735
|
+
}
|
|
6736
|
+
const retry = attemptPendingLiveDiscovery().finally(() => {
|
|
6737
|
+
if (liveDiscoveryRetryTask === retry) {
|
|
6738
|
+
liveDiscoveryRetryTask = void 0;
|
|
6739
|
+
}
|
|
6740
|
+
scheduleLiveDiscoveryRetry();
|
|
6741
|
+
});
|
|
6742
|
+
liveDiscoveryRetryTask = retry;
|
|
6743
|
+
}, liveDiscoveryRetryDelayMs);
|
|
6744
|
+
liveDiscoveryRetryTimer.unref();
|
|
6745
|
+
}, "scheduleLiveDiscoveryRetry");
|
|
6746
|
+
const cancelLiveDiscoveryRetry = /* @__PURE__ */ __name(() => {
|
|
6747
|
+
if (!liveDiscoveryRetryTimer) return;
|
|
6748
|
+
clearTimeout(liveDiscoveryRetryTimer);
|
|
6749
|
+
liveDiscoveryRetryTimer = void 0;
|
|
6750
|
+
}, "cancelLiveDiscoveryRetry");
|
|
6751
|
+
const publishLiveDiscovery = /* @__PURE__ */ __name((candidateApp) => {
|
|
6752
|
+
if (liveDiscoveryShuttingDown) return Promise.resolve();
|
|
6753
|
+
if (!resolveAcpHttpEnabled()) return Promise.resolve();
|
|
6754
|
+
if (candidateApp.locals?.["liveVoiceEnabled"] !== true)
|
|
6755
|
+
return Promise.resolve();
|
|
6756
|
+
liveDiscoveryEnabled = true;
|
|
6757
|
+
if (liveDiscoveryPublish) return liveDiscoveryPublish;
|
|
6758
|
+
const coordinator = candidateApp.locals?.["liveCoordinator"];
|
|
6759
|
+
const instanceNonce = coordinator?.daemonInstanceNonce;
|
|
6760
|
+
if (typeof instanceNonce !== "string") return Promise.resolve();
|
|
6761
|
+
liveDiscoveryPublish = loadLiveDiscoveryRuntime().then(
|
|
6762
|
+
async ({
|
|
6763
|
+
getStableLiveDiscoveryBaseDir,
|
|
6764
|
+
LiveDiscoveryOwnerActiveError,
|
|
6765
|
+
writeLiveDiscoveryFile
|
|
6766
|
+
}) => {
|
|
6767
|
+
if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled) return;
|
|
6768
|
+
const stableBaseDir = path.resolve(
|
|
6769
|
+
deps.liveDiscoveryStableBaseDir ?? getStableLiveDiscoveryBaseDir()
|
|
6770
|
+
);
|
|
6771
|
+
const runtimeBaseDir = path.resolve(liveRuntimeBaseDir);
|
|
6772
|
+
const targetBaseDirs = /* @__PURE__ */ new Set();
|
|
6773
|
+
if (runtimeBaseDir !== stableBaseDir) {
|
|
6774
|
+
targetBaseDirs.add(runtimeBaseDir);
|
|
6775
|
+
}
|
|
6776
|
+
targetBaseDirs.add(stableBaseDir);
|
|
6777
|
+
for (const baseDir of targetBaseDirs) {
|
|
6778
|
+
pendingLiveDiscoveryBaseDirs.add(baseDir);
|
|
6779
|
+
}
|
|
6780
|
+
const record = {
|
|
6781
|
+
url,
|
|
6782
|
+
...token ? { token } : {},
|
|
6783
|
+
protocolVersion: LIVE_HOST_PROTOCOL_VERSION,
|
|
6784
|
+
pid: process.pid,
|
|
6785
|
+
instanceNonce
|
|
6786
|
+
};
|
|
6787
|
+
attemptPendingLiveDiscovery = /* @__PURE__ */ __name(async () => {
|
|
6788
|
+
for (const runtimeBaseDir2 of [
|
|
6789
|
+
...pendingLiveDiscoveryBaseDirs
|
|
6790
|
+
]) {
|
|
6791
|
+
if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled)
|
|
6792
|
+
return;
|
|
6793
|
+
try {
|
|
6794
|
+
await writeLiveDiscoveryFile(runtimeBaseDir2, record);
|
|
6795
|
+
pendingLiveDiscoveryBaseDirs.delete(runtimeBaseDir2);
|
|
6796
|
+
warnedLiveDiscoveryOwners.delete(runtimeBaseDir2);
|
|
6797
|
+
liveDiscoveryOwners.push({
|
|
6798
|
+
runtimeBaseDir: runtimeBaseDir2,
|
|
6799
|
+
instanceNonce,
|
|
6800
|
+
pid: process.pid
|
|
6801
|
+
});
|
|
6802
|
+
} catch (err) {
|
|
6803
|
+
if (err instanceof LiveDiscoveryOwnerActiveError) {
|
|
6804
|
+
if (!warnedLiveDiscoveryOwners.has(runtimeBaseDir2)) {
|
|
6805
|
+
warnedLiveDiscoveryOwners.add(runtimeBaseDir2);
|
|
6806
|
+
daemonLog.warn(
|
|
6807
|
+
`failed to publish Live Host discovery at ${runtimeBaseDir2}: ${err.message}`
|
|
6808
|
+
);
|
|
6809
|
+
}
|
|
6810
|
+
continue;
|
|
6811
|
+
}
|
|
6812
|
+
pendingLiveDiscoveryBaseDirs.delete(runtimeBaseDir2);
|
|
6813
|
+
daemonLog.warn(
|
|
6814
|
+
`failed to publish Live Host discovery at ${runtimeBaseDir2}: ${err instanceof Error ? err.message : String(err)}`
|
|
6815
|
+
);
|
|
6816
|
+
}
|
|
6817
|
+
}
|
|
6818
|
+
}, "attemptPendingLiveDiscovery");
|
|
6819
|
+
await attemptPendingLiveDiscovery();
|
|
6820
|
+
scheduleLiveDiscoveryRetry();
|
|
6821
|
+
}
|
|
6822
|
+
).catch((err) => {
|
|
6823
|
+
daemonLog.warn(
|
|
6824
|
+
`failed to publish Live Host discovery: ${err instanceof Error ? err.message : String(err)}`
|
|
6825
|
+
);
|
|
6826
|
+
});
|
|
6827
|
+
return liveDiscoveryPublish;
|
|
6828
|
+
}, "publishLiveDiscovery");
|
|
6829
|
+
const removeLiveDiscoveryOwners = /* @__PURE__ */ __name(async () => {
|
|
6830
|
+
const owners = liveDiscoveryOwners.splice(0);
|
|
6831
|
+
if (owners.length === 0) return;
|
|
6832
|
+
let removeLiveDiscoveryFile;
|
|
6833
|
+
try {
|
|
6834
|
+
({ removeLiveDiscoveryFile } = await loadLiveDiscoveryRuntime());
|
|
6835
|
+
} catch (err) {
|
|
6836
|
+
daemonLog.warn(
|
|
6837
|
+
`failed to load Live discovery runtime for cleanup: ${err instanceof Error ? err.message : String(err)}`
|
|
6838
|
+
);
|
|
6839
|
+
return;
|
|
6840
|
+
}
|
|
6841
|
+
for (const owner of owners) {
|
|
6842
|
+
try {
|
|
6843
|
+
await removeLiveDiscoveryFile(owner.runtimeBaseDir, owner);
|
|
6844
|
+
} catch (err) {
|
|
6845
|
+
daemonLog.warn(
|
|
6846
|
+
`failed to remove Live Host discovery at ${owner.runtimeBaseDir}: ${err instanceof Error ? err.message : String(err)}`
|
|
6847
|
+
);
|
|
6848
|
+
}
|
|
6849
|
+
}
|
|
6850
|
+
}, "removeLiveDiscoveryOwners");
|
|
6851
|
+
const unpublishLiveDiscovery = /* @__PURE__ */ __name(async () => {
|
|
6852
|
+
liveDiscoveryEnabled = false;
|
|
6853
|
+
cancelLiveDiscoveryRetry();
|
|
6854
|
+
pendingLiveDiscoveryBaseDirs.clear();
|
|
6855
|
+
attemptPendingLiveDiscovery = void 0;
|
|
6856
|
+
await liveDiscoveryPublish;
|
|
6857
|
+
await liveDiscoveryRetryTask;
|
|
6858
|
+
liveDiscoveryPublish = void 0;
|
|
6859
|
+
liveDiscoveryRetryTask = void 0;
|
|
6860
|
+
await removeLiveDiscoveryOwners();
|
|
6861
|
+
}, "unpublishLiveDiscovery");
|
|
6862
|
+
const attachLiveDiscoveryControl = /* @__PURE__ */ __name((candidateApp) => {
|
|
6863
|
+
candidateApp.locals.setLiveDiscoveryEnabled = (enabled) => {
|
|
6864
|
+
const operation = liveDiscoveryToggle.then(
|
|
6865
|
+
() => enabled ? publishLiveDiscovery(candidateApp) : unpublishLiveDiscovery()
|
|
6866
|
+
);
|
|
6867
|
+
liveDiscoveryToggle = operation.catch(() => void 0);
|
|
6868
|
+
return operation;
|
|
6869
|
+
};
|
|
6870
|
+
}, "attachLiveDiscoveryControl");
|
|
6871
|
+
const cleanupLiveDiscovery = /* @__PURE__ */ __name(async () => {
|
|
6872
|
+
liveDiscoveryShuttingDown = true;
|
|
6873
|
+
cancelLiveDiscoveryRetry();
|
|
6874
|
+
await liveDiscoveryToggle;
|
|
6875
|
+
await unpublishLiveDiscovery();
|
|
6876
|
+
}, "cleanupLiveDiscovery");
|
|
6452
6877
|
try {
|
|
6453
6878
|
channelWorkspaceGroups = resolveChannelWorkspaceGroupsAtListen();
|
|
6454
6879
|
} catch (err) {
|
|
@@ -6586,7 +7011,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6586
7011
|
daemonLog.error("runtime startup failed", error2);
|
|
6587
7012
|
markRuntimeFailed(error2);
|
|
6588
7013
|
if (closeServerAfterChannelWorkerStartupFailure && server.listening) {
|
|
6589
|
-
runtimeFailureListenerClose = new Promise((
|
|
7014
|
+
runtimeFailureListenerClose = new Promise((resolve4) => {
|
|
6590
7015
|
server.close((closeErr) => {
|
|
6591
7016
|
if (closeErr) {
|
|
6592
7017
|
daemonLog.error(
|
|
@@ -6594,7 +7019,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6594
7019
|
closeErr
|
|
6595
7020
|
);
|
|
6596
7021
|
}
|
|
6597
|
-
|
|
7022
|
+
resolve4();
|
|
6598
7023
|
});
|
|
6599
7024
|
});
|
|
6600
7025
|
server.closeAllConnections();
|
|
@@ -6625,7 +7050,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6625
7050
|
"Workspace registry is not available for channel workers."
|
|
6626
7051
|
);
|
|
6627
7052
|
}
|
|
6628
|
-
const runtimes = registry.list();
|
|
7053
|
+
const runtimes = registry.list().filter((runtime) => runtime.provenance !== "live-conversation");
|
|
6629
7054
|
if (runtimes.length <= 1 && operation === "initial") {
|
|
6630
7055
|
const primary = registry.primary;
|
|
6631
7056
|
if (!primary.trusted) {
|
|
@@ -6660,7 +7085,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6660
7085
|
return {
|
|
6661
7086
|
workspaceCwd: runtime.workspaceCwd,
|
|
6662
7087
|
primary: runtime.primary,
|
|
6663
|
-
trusted: runtime.trusted
|
|
7088
|
+
trusted: runtime.trusted,
|
|
7089
|
+
provenance: runtime.provenance
|
|
6664
7090
|
};
|
|
6665
7091
|
}),
|
|
6666
7092
|
selection: channelSelection,
|
|
@@ -6772,6 +7198,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6772
7198
|
const completeRuntimeStartup = /* @__PURE__ */ __name(async (candidateApp) => {
|
|
6773
7199
|
if (runtimeStartupSettled) return;
|
|
6774
7200
|
runtimeApp = candidateApp;
|
|
7201
|
+
attachLiveDiscoveryControl(candidateApp);
|
|
6775
7202
|
const acpHandle = candidateApp.locals?.["acpHandle"];
|
|
6776
7203
|
acpHandle?.attachServer?.(server);
|
|
6777
7204
|
if (opts.channelSelection) {
|
|
@@ -6781,6 +7208,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6781
7208
|
if (runtimeStartupSettled) return;
|
|
6782
7209
|
}
|
|
6783
7210
|
if (runtimeStartupSettled) return;
|
|
7211
|
+
await publishLiveDiscovery(candidateApp);
|
|
6784
7212
|
runtimeStartupSettled = true;
|
|
6785
7213
|
clearRuntimeStartupTimer();
|
|
6786
7214
|
markRuntimeReady();
|
|
@@ -6924,11 +7352,15 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6924
7352
|
if (closePromise) return closePromise;
|
|
6925
7353
|
closePromise = new Promise((res, rej) => {
|
|
6926
7354
|
shuttingDown = true;
|
|
7355
|
+
liveDiscoveryShuttingDown = true;
|
|
7356
|
+
cancelLiveDiscoveryRetry();
|
|
6927
7357
|
channelControlDraining = true;
|
|
6928
7358
|
const initiallyMountedApp = runtimeApp ?? runtimeAppForCleanup;
|
|
6929
7359
|
const initiallyMountedManagement = initiallyMountedApp?.locals?.["workspaceManagementHandle"];
|
|
6930
7360
|
const initiallyMountedSessionMaintenance = initiallyMountedApp?.locals?.["sessionArchiveCoordinator"];
|
|
6931
7361
|
const initialManagementWait = initiallyMountedManagement?.sealAndWait?.();
|
|
7362
|
+
const initiallyMountedLive = initiallyMountedApp?.locals;
|
|
7363
|
+
const initialLiveWait = initiallyMountedLive?.sealAndWaitLiveCoordinator?.();
|
|
6932
7364
|
const initialSessionMaintenanceWait = initiallyMountedSessionMaintenance?.sealMaintenanceAndWait?.();
|
|
6933
7365
|
let processRegistryShutdown;
|
|
6934
7366
|
const startProcessRegistryShutdown = /* @__PURE__ */ __name(() => {
|
|
@@ -6978,6 +7410,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
6978
7410
|
rej(retryableError);
|
|
6979
7411
|
return;
|
|
6980
7412
|
}
|
|
7413
|
+
await cleanupLiveDiscovery();
|
|
6981
7414
|
if (loggerPublished || loggerSignalOwned) {
|
|
6982
7415
|
writeDaemonLifecycleBestEffort(() => {
|
|
6983
7416
|
if (finalErr) {
|
|
@@ -7009,6 +7442,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
7009
7442
|
if (workspaceManagementHandle !== initiallyMountedManagement) {
|
|
7010
7443
|
await workspaceManagementHandle?.sealAndWait?.();
|
|
7011
7444
|
}
|
|
7445
|
+
const liveLifecycleHandle = appForCleanup?.locals;
|
|
7446
|
+
await initialLiveWait;
|
|
7447
|
+
if (liveLifecycleHandle !== initiallyMountedLive) {
|
|
7448
|
+
await liveLifecycleHandle?.sealAndWaitLiveCoordinator?.();
|
|
7449
|
+
}
|
|
7012
7450
|
await initialSessionMaintenanceWait;
|
|
7013
7451
|
if (sessionMaintenance !== initiallyMountedSessionMaintenance) {
|
|
7014
7452
|
await sessionMaintenance?.sealMaintenanceAndWait?.();
|
|
@@ -7122,6 +7560,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
7122
7560
|
});
|
|
7123
7561
|
const preparedRuntimeApp = runtimeApp ?? runtimeAppForCleanup;
|
|
7124
7562
|
if (preparedRuntimeApp && bridgeRef && deps.bridge) {
|
|
7563
|
+
attachLiveDiscoveryControl(preparedRuntimeApp);
|
|
7125
7564
|
if (shouldPreheat) {
|
|
7126
7565
|
startBridgePreheat(bridgeRef);
|
|
7127
7566
|
}
|
|
@@ -7133,6 +7572,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
7133
7572
|
} else {
|
|
7134
7573
|
const acpHandle = preparedRuntimeApp.locals?.["acpHandle"];
|
|
7135
7574
|
acpHandle?.attachServer?.(server);
|
|
7575
|
+
void publishLiveDiscovery(preparedRuntimeApp);
|
|
7136
7576
|
}
|
|
7137
7577
|
} else if (deferRuntimeUntilFirstHealth) {
|
|
7138
7578
|
scheduleRuntimeStartFallback();
|
|
@@ -7142,13 +7582,16 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
|
|
|
7142
7582
|
if (deps.resolveOnListen) {
|
|
7143
7583
|
loggerPublished = true;
|
|
7144
7584
|
loggerLifecycle.published();
|
|
7145
|
-
|
|
7585
|
+
void (liveDiscoveryPublish ?? Promise.resolve()).then(
|
|
7586
|
+
() => resolve3(handle)
|
|
7587
|
+
);
|
|
7146
7588
|
} else {
|
|
7147
7589
|
void runtimeReady.then(
|
|
7148
|
-
() => {
|
|
7590
|
+
async () => {
|
|
7591
|
+
await liveDiscoveryPublish;
|
|
7149
7592
|
loggerPublished = true;
|
|
7150
7593
|
loggerLifecycle.published();
|
|
7151
|
-
|
|
7594
|
+
resolve3(handle);
|
|
7152
7595
|
},
|
|
7153
7596
|
(err) => {
|
|
7154
7597
|
void handle.close().then(
|