@qwen-code/qwen-code 0.19.11-nightly.20260717.f8e6e8931 → 0.19.11
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/qwen-serve-deploy-local.md +7 -42
- package/bundled/qc-helper/docs/qwen-serve.md +40 -42
- package/chunks/{MaxSizedBox-JGTP7YJQ.js → MaxSizedBox-L6TGYDM3.js} +2 -2
- package/chunks/{StandaloneSessionPicker-2XQDOYZ5.js → StandaloneSessionPicker-AKEQHU5P.js} +14 -14
- package/chunks/{acpAgent-RXRJA7GD.js → acpAgent-PTNBGJDN.js} +110 -209
- package/chunks/{agent-UQP53UWQ.js → agent-AJOMOZPJ.js} +2 -2
- package/chunks/{agent-headless-I52OXDCK.js → agent-headless-CYKOMAXS.js} +2 -2
- package/chunks/{bridge-3DVRNBSF.js → bridge-QKISWPCI.js} +6 -6
- package/chunks/{chunk-PNCWEDF6.js → chunk-2OG646IN.js} +1 -1
- package/chunks/{chunk-VHCSIMTF.js → chunk-3AYLDB6B.js} +1 -1
- package/chunks/{chunk-4UBEB74N.js → chunk-3M75MSVA.js} +1 -1
- package/chunks/{chunk-EMJJBXS7.js → chunk-4AGTGMCQ.js} +1 -1
- package/chunks/{chunk-6ANLV27M.js → chunk-4HUDDSO5.js} +2 -2
- package/chunks/{chunk-X5HZX4EP.js → chunk-4IJMTYCB.js} +8 -8
- package/chunks/{chunk-FEYHXPZG.js → chunk-4ROQY23C.js} +4 -4
- package/chunks/{chunk-YOJGIRTD.js → chunk-574PTLMU.js} +27 -64
- package/chunks/{chunk-UF6ZTWU5.js → chunk-5Z452MMD.js} +10 -10
- package/chunks/{chunk-3KSHYS4T.js → chunk-6EDDYPI3.js} +4 -4
- package/chunks/{chunk-AEKHQ3E5.js → chunk-6Y6ORE2G.js} +4 -4
- package/chunks/{chunk-UJG4VV2O.js → chunk-7NMU22Q3.js} +3 -3
- package/chunks/{chunk-BZ5D7OVV.js → chunk-7ZYHLN67.js} +72 -23
- package/chunks/{chunk-DD45XVOQ.js → chunk-AU3MFJPL.js} +3 -3
- package/chunks/{chunk-R3VWUU2E.js → chunk-AVEOWVOM.js} +1 -1
- package/chunks/{chunk-I6NOSIVF.js → chunk-BUAXJVNP.js} +1 -1
- package/chunks/{chunk-BDHYJ2MM.js → chunk-BXBDC476.js} +1 -1
- package/chunks/{chunk-6VMOP2Z7.js → chunk-BYB3GF2T.js} +2 -2
- package/chunks/{chunk-FXK3QMRD.js → chunk-BYH2JRK3.js} +3 -3
- package/chunks/{chunk-L263ROM6.js → chunk-CAHY5ABC.js} +1 -1
- package/chunks/{chunk-DPXB3XRN.js → chunk-CF5VJRGC.js} +1 -1
- package/chunks/{chunk-VFEZWI6F.js → chunk-CH2XVB47.js} +1 -1
- package/chunks/{chunk-6RV42SFP.js → chunk-CITWNIXJ.js} +4 -4
- package/chunks/{chunk-IIXEI2VE.js → chunk-CPFIQVZJ.js} +1 -1
- package/chunks/{chunk-46Y6SSQ7.js → chunk-FMNYGWOD.js} +3 -3
- package/chunks/{chunk-IHJRUIWN.js → chunk-FXKOAEXP.js} +10 -10
- package/chunks/{chunk-G5ZKRK2E.js → chunk-FYQ22K62.js} +1 -1
- package/chunks/{chunk-Y3TNSHKF.js → chunk-GLNHPRZT.js} +1 -1
- package/chunks/{chunk-5WWYHNAH.js → chunk-GNBBAQ6J.js} +5 -5
- package/chunks/{chunk-XQDPCQ3A.js → chunk-HASK4LMI.js} +4 -4
- package/chunks/{chunk-D7KYA6EY.js → chunk-JD44PNGJ.js} +3 -3
- package/chunks/{chunk-JY74T7PW.js → chunk-JWICTOXS.js} +1 -1
- package/chunks/{chunk-7ZFXHKKZ.js → chunk-K7VD4XLT.js} +1 -1
- package/chunks/{chunk-KW46DBFM.js → chunk-KXYJPRT5.js} +2 -15
- package/chunks/{chunk-X6YQWCIJ.js → chunk-L4Y55KIS.js} +1 -1
- package/chunks/{chunk-6WVLHULT.js → chunk-LS56TX3M.js} +1 -1
- package/chunks/{chunk-BTSE2DUP.js → chunk-MQOVXZAF.js} +25 -46
- package/chunks/{chunk-4HTHLSIH.js → chunk-N5VIZTND.js} +1 -1
- package/chunks/{chunk-R6AO7HBQ.js → chunk-NJOFRXTM.js} +36 -73
- package/chunks/{chunk-GCRFH57X.js → chunk-NVTQZXR7.js} +4 -4
- package/chunks/{chunk-T7CZYIAU.js → chunk-QDJ2R4CM.js} +3 -3
- package/chunks/{chunk-SE6GSFAO.js → chunk-QOTQH4CB.js} +2 -2
- package/chunks/{chunk-E7ECGLZW.js → chunk-QYG4BY6Q.js} +1 -1
- package/chunks/{chunk-AVAU67KP.js → chunk-RP5R7MB6.js} +10 -10
- package/chunks/{chunk-CC2UASQ4.js → chunk-S63Z5V42.js} +3 -3
- package/chunks/{chunk-NROLDLP4.js → chunk-SQ5BK3GO.js} +1 -1
- package/chunks/{chunk-W7H223ZZ.js → chunk-STZQCNN3.js} +1 -1
- package/chunks/{chunk-3LS57JZI.js → chunk-SY7NEYX4.js} +1 -1
- package/chunks/{chunk-AHAH5H6D.js → chunk-T76DGHGG.js} +3 -3
- package/chunks/{chunk-NABT4VOY.js → chunk-THXDQSTA.js} +20 -20
- package/chunks/{chunk-GLEJW7T2.js → chunk-TL4R5TRK.js} +1 -1
- package/chunks/{chunk-XK42MWWO.js → chunk-V2DXTLUE.js} +2 -2
- package/chunks/{chunk-W6J7RSCK.js → chunk-VFX7EZIR.js} +1 -1
- package/chunks/{chunk-O3WCEZEN.js → chunk-WMNXXRGL.js} +20 -11
- package/chunks/{chunk-PSDTLRAV.js → chunk-Y3KFTWVX.js} +5 -5
- package/chunks/{chunk-4YR7FSAM.js → chunk-YFVO2HOR.js} +4 -4
- package/chunks/{chunk-ZK4AMPKI.js → chunk-YGYSMY2R.js} +23 -24
- package/chunks/{chunk-AH3YAJU6.js → chunk-YLSSEUAM.js} +8 -8
- package/chunks/{chunk-WZJELXEU.js → chunk-ZIXOTAPZ.js} +3 -92
- package/chunks/{computer-use-LTW3VB6L.js → computer-use-VZZMJEQ7.js} +2 -2
- package/chunks/{contextCommand-GLMC6CTP.js → contextCommand-PORKIZSY.js} +4 -4
- package/chunks/{create-sub-session-YMWQAWSN.js → create-sub-session-XVFKHAFW.js} +2 -2
- package/chunks/{daemon-PRB64RP5.js → daemon-IHR6WSPB.js} +1 -1
- package/chunks/{daemon-status-provider-5OMM5JHF.js → daemon-status-provider-ABLBA3UJ.js} +10 -10
- package/chunks/{earlyInputCapture-A3WSRN4T.js → earlyInputCapture-DJCU5SPU.js} +2 -2
- package/chunks/{edit-7PG4AH27.js → edit-O4VV5AO6.js} +2 -2
- package/chunks/{enter-worktree-QUSB44RE.js → enter-worktree-XQYDDI2I.js} +2 -2
- package/chunks/{enterPlanMode-NVSIEL7X.js → enterPlanMode-CESVMQBV.js} +2 -2
- package/chunks/{environment-AHHXHQTI.js → environment-5KXOLZNR.js} +4 -4
- package/chunks/{errors-NSWSRXC7.js → errors-EBUTCBAQ.js} +4 -4
- package/chunks/{exit-worktree-FXYEYHPL.js → exit-worktree-MWGNSPNX.js} +2 -2
- package/chunks/{exitPlanMode-JI5GK3F6.js → exitPlanMode-HYQL4XMB.js} +2 -2
- package/chunks/{fast-path-X7EVDLKZ.js → fast-path-6V73F2T2.js} +2 -2
- package/chunks/{gemini-YRLHY5KS.js → gemini-TEFJZCIZ.js} +33 -33
- package/chunks/{geminiContentGenerator-SPLFPV5E.js → geminiContentGenerator-M56BEXWI.js} +1 -1
- package/chunks/{glob-WASUBCSA.js → glob-DMYFEEAZ.js} +2 -2
- package/chunks/{grep-DUVG3NGA.js → grep-GYE47MD4.js} +2 -2
- package/chunks/{handleAutoUpdate-NGE5AQ2N.js → handleAutoUpdate-OLUY4L7L.js} +6 -6
- package/chunks/{i18n-QNVR36NB.js → i18n-462JC7IY.js} +3 -3
- package/chunks/{initializer-ZY7ORPMH.js → initializer-Y7WD4D2I.js} +7 -7
- package/chunks/{installationInfo-4R75MFTB.js → installationInfo-I2Z3BKCE.js} +3 -3
- package/chunks/{list-36JCMZRS.js → list-XQ5MSAXP.js} +10 -10
- package/chunks/{loadedSettingsAdapter-PQIOJUSJ.js → loadedSettingsAdapter-TQOWYE7C.js} +7 -7
- package/chunks/{mcp-QXY6XA6H.js → mcp-22LLEEVM.js} +7 -7
- package/chunks/{monitor-AVEKRSY3.js → monitor-VKG324X3.js} +2 -2
- package/chunks/{nonInteractiveCli-YWIBKX4M.js → nonInteractiveCli-UMYUT643.js} +32 -32
- package/chunks/{notebook-edit-4SBTJX72.js → notebook-edit-FJJRBQ3S.js} +2 -2
- package/chunks/{openaiContentGenerator-4EBAO7LR.js → openaiContentGenerator-4T2OGTR5.js} +2 -2
- package/chunks/{pidfile-JMIUPXSU.js → pidfile-XL3MDCBM.js} +2 -2
- package/chunks/{processUtils-EOINMEIH.js → processUtils-7UCFN34D.js} +2 -2
- package/chunks/{qwenContentGenerator-M7UBL3JS.js → qwenContentGenerator-PQUXJDIZ.js} +3 -3
- package/chunks/{read-file-DXSEFHCV.js → read-file-3EYQML7E.js} +1 -1
- package/chunks/{ripGrep-VTRVFMDJ.js → ripGrep-S6WPGQNA.js} +2 -2
- package/chunks/{run-qwen-serve-P7WQDZAS.js → run-qwen-serve-NSKBT3HU.js} +26 -39
- package/chunks/{runtime-UHYO6JGN.js → runtime-LG5ZZ3VH.js} +8 -8
- package/chunks/{scheduler-WTK7ZLV5.js → scheduler-PLX3VVTB.js} +2 -2
- package/chunks/{serve-AG2AOG56.js → serve-S2ZLRZZR.js} +7 -7
- package/chunks/{server-G5MM2BRI.js → server-5ECMV4TM.js} +79 -136
- package/chunks/{session-NUAGEMVS.js → session-ILSONWG4.js} +33 -33
- package/chunks/{settings-VQA5PR2M.js → settings-BOE7WWSA.js} +6 -6
- package/chunks/{shell-X33RWGLP.js → shell-VW664JIZ.js} +2 -2
- package/chunks/{skill-PHSU2OPP.js → skill-COHV6625.js} +1 -1
- package/chunks/{spawnChannel-D6TZN4W7.js → spawnChannel-5UUR5XOZ.js} +4 -4
- package/chunks/{src-6OJFUPTL.js → src-XPKFZ3RN.js} +2 -2
- package/chunks/{standalone-update-ZARRW44Y.js → standalone-update-IOOJ2NZQ.js} +4 -4
- package/chunks/{startInteractiveUI-C6IZRTF3.js → startInteractiveUI-3NGJGXXS.js} +41 -45
- package/chunks/{team-create-H434NQP2.js → team-create-UPLVZQFX.js} +2 -2
- package/chunks/{team-plan-approval-IIOHXZU6.js → team-plan-approval-F5F432RO.js} +2 -2
- package/chunks/{theme-manager-IEOPHMX6.js → theme-manager-JJE4BJ67.js} +2 -2
- package/chunks/{tool-search-WIIEDALL.js → tool-search-LRXI4JLZ.js} +1 -1
- package/chunks/{total-session-admission-WU3DORRW.js → total-session-admission-I4DHN6UP.js} +7 -7
- package/chunks/{trustedFolders-JVUTUAJ3.js → trustedFolders-SEH7LNX2.js} +3 -3
- package/chunks/{update-relaunch-X5EQKCH5.js → update-relaunch-T6ZKBUA6.js} +5 -5
- package/chunks/{updateCheck-TGO2X735.js → updateCheck-FWLXZPRO.js} +4 -4
- package/chunks/{validateNonInterActiveAuth-2MEUL2ME.js → validateNonInterActiveAuth-X6K2VWYT.js} +28 -28
- package/chunks/{version-KBGQKZWV.js → version-LIFSOGSE.js} +1 -1
- package/chunks/{workflow-PAOSF4CG.js → workflow-NX2DFWGD.js} +3 -3
- package/chunks/{workspace-providers-status-AYHJYSVO.js → workspace-providers-status-VYD6M2NE.js} +10 -10
- package/chunks/{workspace-registration-store-GZMR53QL.js → workspace-registration-store-2Y6PWOEL.js} +1 -1
- package/chunks/{workspace-registry-C2IXZWPF.js → workspace-registry-PKBDBWCA.js} +7 -7
- package/chunks/{workspace-service-KDDAW33F.js → workspace-service-HHORUHTS.js} +12 -12
- package/chunks/{workspace-skills-status-WWEZBZXY.js → workspace-skills-status-O5Q26LIY.js} +8 -8
- package/chunks/{write-file-ACN3TAIX.js → write-file-NVAEZ3J2.js} +2 -2
- package/cli.js +11 -11
- package/package.json +3 -3
- package/web-shell/assets/{arc-Blc5_CnD.js → arc-H74fE8UR.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-Dyv1BvGP.js → architectureDiagram-3BPJPVTR-DN3kEq-I.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CVAb8DyB.js → blockDiagram-GPEHLZMM-BrqbsFUF.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-ClHPb_6S.js → c4Diagram-AAUBKEIU-ClFhU1P-.js} +1 -1
- package/web-shell/assets/channel-NFC5ADAa.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-Dad9g3ZA.js → chunk-2J33WTMH-jCIcG0_M.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-IJJSSdDs.js → chunk-4BX2VUAB-DSkGe62-.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DRcc-Hl9.js → chunk-55IACEB6-BxBHOGTd.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DOCFB-6a.js → chunk-727SXJPM-v_DS7dH7.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CRZnSjHp.js → chunk-AQP2D5EJ-1RzEKRPq.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BwUI4Yes.js → chunk-FMBD7UC4-DyrSbLOX.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-DLy8doxd.js → chunk-ND2GUHAM-BCmdsZiy.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-Bhz7iysj.js → chunk-QZHKN3VN-CphHGW2D.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DHgwjz3X.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHgwjz3X.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-jT1e8KzN.js → cose-bilkent-S5V4N54A-D5kRC7Fi.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-C1veApQk.js → dagre-BM42HDAG-DIiyJJ0U.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-C_NOwKeT.js → diagram-2AECGRRQ-BOcuB8xU.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-Bigfuz1r.js → diagram-5GNKFQAL-CMgiZ4d3.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CpXltPpU.js → diagram-KO2AKTUF-Ctx8pfN0.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DYawbYbH.js → diagram-LMA3HP47-BT5REAWC.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-D2t-ttd1.js → diagram-OG6HWLK6-CJkUqXcp.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-Buc53PB5.js → erDiagram-TEJ5UH35-DyvNNX6v.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-DwdFsCN7.js → flowDiagram-I6XJVG4X-VBf8_My8.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-XhiEKGoP.js → ganttDiagram-6RSMTGT7-CviJnR7B.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-D6We014a.js → gitGraphDiagram-PVQCEYII-BY66_Oze.js} +1 -1
- package/web-shell/assets/{index-BctAmeF3.js → index-8xIBbHV3.js} +197 -197
- package/web-shell/assets/{index-CAWqS-bZ.js → index-DhYuvi3j.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-C_iugRHQ.js → infoDiagram-5YYISTIA-D2jaewWZ.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CAn9Kaix.js → ishikawaDiagram-YF4QCWOH-BpnNTyi5.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BjDYOkEB.js → journeyDiagram-JHISSGLW-CA55GNZF.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Br_oI3Ob.js → kanban-definition-UN3LZRKU-DyiSl_Ts.js} +1 -1
- package/web-shell/assets/{linear-BqnWHE9E.js → linear-B-sN3dkV.js} +1 -1
- package/web-shell/assets/{mermaid.core-CT-sofSb.js → mermaid.core-xf9SXDdb.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BbvrZR4B.js → mindmap-definition-RKZ34NQL-DXhr2kRk.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-gAwi3h_Q.js → pieDiagram-4H26LBE5-DUXpbfGQ.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CONvBIuO.js → quadrantDiagram-W4KKPZXB-NeDQYeWw.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-lpkrcy1e.js → requirementDiagram-4Y6WPE33-BSbFRL1A.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bk6FJHqb.js → sankeyDiagram-5OEKKPKP-gg27cAaN.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-B9b9bBzt.js → sequenceDiagram-3UESZ5HK-Bi_1TSs4.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-JqBGC-S3.js → stateDiagram-AJRCARHV-CboCCRaf.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CXRqms6P.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-CCCceXDP.js → timeline-definition-PNZ67QCA-DrGpF_jn.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-EHRnmZ09.js → vennDiagram-CIIHVFJN-DCaJU67x.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CYIcHx3_.js → wardley-L42UT6IY-p0QcW1aP.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-B81AuYRl.js → wardleyDiagram-YWT4CUSO-DiEVxj1W.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DOQ6E3z7.js → xychartDiagram-2RQKCTM6-iQB8nSlA.js} +1 -1
- package/web-shell/index.html +1 -1
- package/web-shell/assets/channel-DkPTtnGS.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DBdPU8ix.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DBdPU8ix.js +0 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B_w4fDnm.js +0 -1
|
@@ -20,34 +20,6 @@ The daemon reads the bearer token from either `--token <value>` on the CLI or th
|
|
|
20
20
|
|
|
21
21
|
One shell-level `export` covers both server boot and SDK client construction (just keep it scoped to the session, per the note above).
|
|
22
22
|
|
|
23
|
-
## Workspace lifecycle and process boundaries
|
|
24
|
-
|
|
25
|
-
One daemon can host several isolated workspace runtimes under the same listener.
|
|
26
|
-
Repeat `--workspace` with absolute directories to create explicit startup
|
|
27
|
-
runtimes; the first is primary. Primary and other explicit startup/static
|
|
28
|
-
runtimes cannot be removed without restarting the process.
|
|
29
|
-
|
|
30
|
-
Additional workspaces can also be registered while the daemon is running
|
|
31
|
-
through `POST /workspaces`. Pass `persist: true` to retain a dynamic secondary
|
|
32
|
-
in the user-level registration store so it is restored on the next start.
|
|
33
|
-
Untrusted registrations remain visible for diagnostics, bounded file reads,
|
|
34
|
-
and declared persisted reads but cannot start ACP. Dynamic and
|
|
35
|
-
persisted-restored secondaries are removable: a normal removal refuses while
|
|
36
|
-
the runtime is busy, while a forced removal requests termination of active
|
|
37
|
-
resources and commits logical removal before the same cwd can be re-added.
|
|
38
|
-
Cleanup is bounded and best-effort after the persistence commit point; failures
|
|
39
|
-
are logged rather than restoring the removed runtime.
|
|
40
|
-
|
|
41
|
-
Runtime isolation covers cwd, environment overlay, filesystem/trust boundary,
|
|
42
|
-
workspace services, bridge, Voice lease state, channel worker, and the ACP/MCP
|
|
43
|
-
resource boundary. Production attempts to preheat the primary ACP child and
|
|
44
|
-
retries on first use after failure; trusted secondaries start theirs on demand,
|
|
45
|
-
and untrusted secondaries do not start ACP.
|
|
46
|
-
Authentication, HTTP rate limits, listener and Voice admission caps,
|
|
47
|
-
total-session admission, metrics, shutdown, and the process fault radius remain
|
|
48
|
-
daemon-global. Run separate daemons when those process-level boundaries must be
|
|
49
|
-
independent.
|
|
50
|
-
|
|
51
23
|
## Linux: systemd user unit
|
|
52
24
|
|
|
53
25
|
> **Find your `qwen` binary first.** The unit file's `ExecStart=` must hold an **absolute path** — service managers don't read your shell's `PATH`. Run `which qwen` to discover it. Common locations: `/usr/local/bin/qwen` (Linuxbrew, manual installs), `~/.nvm/versions/node/vX.Y.Z/bin/qwen` (nvm), `~/.fnm/aliases/default/bin/qwen` (fnm), `~/.volta/bin/qwen` (Volta). Substitute the actual path everywhere the templates below show `/PATH/TO/qwen`.
|
|
@@ -62,9 +34,9 @@ After=network.target
|
|
|
62
34
|
[Service]
|
|
63
35
|
Type=simple
|
|
64
36
|
# Replace with your project; %h expands to $HOME under user units.
|
|
65
|
-
WorkingDirectory=%h/project
|
|
37
|
+
WorkingDirectory=%h/your-project
|
|
66
38
|
# Run `which qwen` to find the absolute path. systemd does NOT read $PATH.
|
|
67
|
-
ExecStart=/PATH/TO/qwen serve --hostname 127.0.0.1 --port 4170
|
|
39
|
+
ExecStart=/PATH/TO/qwen serve --hostname 127.0.0.1 --port 4170
|
|
68
40
|
# Read the bearer token from a chmod 600 file rather than inlining it
|
|
69
41
|
# in the unit. `Environment=` would expose the token in the unit file
|
|
70
42
|
# (typically 644 = world-readable). EnvironmentFile keeps the token in
|
|
@@ -123,14 +95,10 @@ Without `loginctl enable-linger`, the user-level systemd instance shuts down whe
|
|
|
123
95
|
<string>127.0.0.1</string>
|
|
124
96
|
<string>--port</string>
|
|
125
97
|
<string>4170</string>
|
|
126
|
-
<string>--workspace</string>
|
|
127
|
-
<string>/Users/YOUR-USERNAME/project-a</string>
|
|
128
|
-
<string>--workspace</string>
|
|
129
|
-
<string>/Users/YOUR-USERNAME/project-b</string>
|
|
130
98
|
</array>
|
|
131
99
|
<!-- launchd does NOT expand `~` or `$HOME` — use absolute paths. -->
|
|
132
100
|
<key>WorkingDirectory</key>
|
|
133
|
-
<string>/Users/YOUR-USERNAME/project
|
|
101
|
+
<string>/Users/YOUR-USERNAME/your-project</string>
|
|
134
102
|
<key>EnvironmentVariables</key>
|
|
135
103
|
<dict>
|
|
136
104
|
<!-- DO NOT COMMIT this file with a real token. Also chmod 600 the
|
|
@@ -185,7 +153,7 @@ After editing the plist (e.g., rotating the token) you must `unload` then `load`
|
|
|
185
153
|
Assumes `QWEN_SERVER_TOKEN` is already exported in your shell (see the setup section above):
|
|
186
154
|
|
|
187
155
|
```bash
|
|
188
|
-
tmux new -d -s qwen-serve "qwen serve --hostname 127.0.0.1
|
|
156
|
+
tmux new -d -s qwen-serve "cd ~/your-project && qwen serve --hostname 127.0.0.1"
|
|
189
157
|
tmux attach -t qwen-serve # see live logs; Ctrl-b d to detach
|
|
190
158
|
tmux kill-session -t qwen-serve
|
|
191
159
|
```
|
|
@@ -197,14 +165,11 @@ tmux kill-session -t qwen-serve
|
|
|
197
165
|
Assumes `QWEN_SERVER_TOKEN` is already exported in your shell:
|
|
198
166
|
|
|
199
167
|
```bash
|
|
200
|
-
nohup qwen serve --hostname 127.0.0.1
|
|
201
|
-
--workspace /absolute/path/project-a \
|
|
202
|
-
--workspace /absolute/path/project-b \
|
|
203
|
-
> qwen-serve.log 2>&1 &
|
|
168
|
+
nohup bash -c 'cd ~/your-project && qwen serve --hostname 127.0.0.1' > qwen-serve.log 2>&1 &
|
|
204
169
|
echo $! # daemon PID; capture if you want to `kill` cleanly later
|
|
205
170
|
```
|
|
206
171
|
|
|
207
|
-
|
|
172
|
+
The wrapping `bash -c '...'` ensures the daemon binds to `~/your-project` rather than wherever you happened to run the command. Without that `cd`, `qwen serve` defaults to `process.cwd()` and a `POST /session` from a client expecting your project workspace returns `400 workspace_mismatch` — silent foot-gun.
|
|
208
173
|
|
|
209
174
|
OK for one-off "let me run this in the background while I poke at the API" workflows. **Not recommended** for anything beyond a single session — no restart-on-crash, log file grows unbounded, no clean way to find the daemon if you forget the PID. Prefer tmux for interactive supervision or systemd / launchd for anything you want to outlast a reboot.
|
|
210
175
|
|
|
@@ -249,7 +214,7 @@ A daemon **restart** drops all in-memory sessions; clients reconnect and start f
|
|
|
249
214
|
## Out of scope (defers to v0.16.x or later)
|
|
250
215
|
|
|
251
216
|
- **Containerized deployment** — Dockerfile, docker-compose, Kubernetes manifests, nginx + TLS reverse proxy, multi-instance token isolation. Defers to v0.16.x once an enterprise pilot is committed; the doc would otherwise rot from no-one-validating.
|
|
252
|
-
- **Cross-host federation / multi-daemon coordination on one host** —
|
|
217
|
+
- **Cross-host federation / multi-daemon coordination on one host** — `1 daemon = 1 workspace × N sessions` is enforced. Instance-path token keying + stale-token cleanup defer to v0.16.x.
|
|
253
218
|
- **Auto-generated daemon tokens** — alpha is BYO-token. Auto-gen + token-store infrastructure defers to v0.16.x.
|
|
254
219
|
- **Windows native service** (`nssm`, Service Control Manager wrapper) — for now use [WSL2](https://learn.microsoft.com/en-us/windows/wsl/) and follow the systemd section above.
|
|
255
220
|
|
|
@@ -11,7 +11,7 @@ Run Qwen Code as a local HTTP daemon so multiple clients (IDE plugins, web UIs,
|
|
|
11
11
|
## What it gives you
|
|
12
12
|
|
|
13
13
|
- **Built-in Web Shell UI** — `qwen serve` serves the browser-based Web Shell at its root (`http://127.0.0.1:4170/`) out of the box; run `qwen serve --open` to launch it in your browser automatically. It is served on the same origin as the API, so no second port or reverse proxy is needed. Pass `--no-web` for an API-only daemon.
|
|
14
|
-
- **
|
|
14
|
+
- **One agent process, many clients** — under the default `sessionScope: 'single'`, every client connecting to the daemon shares one ACP session. Live cross-client collaboration on the same conversation, the same file diffs, the same permission prompts.
|
|
15
15
|
- **Reconnect-safe streaming** — SSE with `Last-Event-ID` reconnect lets a client drop and pick up exactly where it left off (within the ring's replay window).
|
|
16
16
|
- **Paged persisted transcripts** — `GET /session/:id/transcript` returns the complete active on-disk transcript as replay pages without attaching a client or changing the live SSE replay window.
|
|
17
17
|
- **First-responder permissions** — when the agent asks for permission to run a tool, every connected client sees the request; whichever client answers first wins.
|
|
@@ -51,7 +51,7 @@ The first npm release of `qwen serve` (v0.16-alpha) is intentionally narrow —
|
|
|
51
51
|
- ⏸️ **Prometheus metrics + load test harness** — defers to v0.17 F4 Phase-1 scale instrumentation when 30-50 active sessions becomes a real target.
|
|
52
52
|
- ⏸️ **`--max-body-size` CLI flag** — daemon enforces `express.json({ limit: '10mb' })` by default which comfortably covers text-only prompts (model context windows are well under 10 MiB of chars). Tunable via flag in v0.16.x.
|
|
53
53
|
|
|
54
|
-
For the deeper "what we won't fix in Stage 1" enumeration (single-host session-state mutation model + N
|
|
54
|
+
For the deeper "what we won't fix in Stage 1" enumeration (single-host session-state mutation model + N-parallel-sessions sharing one ACP child), see [Stage 1 scope boundaries](#stage-1-scope-boundaries--what-we-wont-fix-in-stage-15) below.
|
|
55
55
|
|
|
56
56
|
## Quickstart
|
|
57
57
|
|
|
@@ -64,7 +64,7 @@ qwen serve
|
|
|
64
64
|
# → qwen serve: bearer auth disabled (loopback default). Set QWEN_SERVER_TOKEN to enable.
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
The default bind is `127.0.0.1:4170`. Bearer auth is **off** on loopback so local development "just works". The daemon
|
|
67
|
+
The default bind is `127.0.0.1:4170`. Bearer auth is **off** on loopback so local development "just works". The daemon binds to the current working directory; use `--workspace /path/to/dir` to override.
|
|
68
68
|
|
|
69
69
|
**Open the Web Shell UI.** Browse to `http://127.0.0.1:4170/` (or start the daemon with `qwen serve --open` to launch it automatically) for the full browser terminal — chat, diffs, tool calls, and permission prompts. The UI is served at the daemon root on the same origin as the API. The rest of this guide uses raw HTTP so you can script against the API directly.
|
|
70
70
|
|
|
@@ -81,7 +81,7 @@ curl http://127.0.0.1:4170/daemon/status
|
|
|
81
81
|
# → {"v":1,"detail":"summary","status":"ok","runtime":{...}}
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
The `workspaceCwd` field surfaces the
|
|
84
|
+
The `workspaceCwd` field surfaces the bound workspace so clients can pre-flight check + omit `cwd` on `POST /session`.
|
|
85
85
|
The `limits.maxPendingPromptsPerSession` field advertises the active per-session prompt admission cap; `null` means the cap is disabled. `limits.maxTotalSessions` advertises the optional daemon-wide fresh-session cap; `null` means unlimited.
|
|
86
86
|
|
|
87
87
|
### Run channels from the daemon
|
|
@@ -90,7 +90,7 @@ The `limits.maxPendingPromptsPerSession` field advertises the active per-session
|
|
|
90
90
|
# Start one configured channel under qwen serve
|
|
91
91
|
qwen serve --channel telegram
|
|
92
92
|
|
|
93
|
-
# Start several configured channels under daemon-owned
|
|
93
|
+
# Start several configured channels under one daemon-owned worker
|
|
94
94
|
qwen serve --channel telegram --channel feishu
|
|
95
95
|
|
|
96
96
|
# Start all configured channels
|
|
@@ -217,7 +217,7 @@ curl -X POST http://127.0.0.1:4170/session \
|
|
|
217
217
|
|
|
218
218
|
`cwd` may be omitted — the route falls back to the daemon's primary workspace. Posting a `cwd` that does not canonicalize to any registered workspace returns `400 workspace_mismatch`.
|
|
219
219
|
|
|
220
|
-
A second client posting to `/session`
|
|
220
|
+
A second client posting to `/session` (any matching `cwd` or none) gets `"attached": true` — they're now sharing the agent.
|
|
221
221
|
|
|
222
222
|
### 4. Subscribe to the event stream (in another terminal first)
|
|
223
223
|
|
|
@@ -327,21 +327,21 @@ Notes:
|
|
|
327
327
|
| `--tls-cert <path>` | — | Path to a PEM certificate file. Serve over **HTTPS** instead of HTTP. Must be paired with `--tls-key` (boot fails if only one is given). Unlocks secure-context browser APIs — voice input (`getUserMedia`), WebRTC — over a LAN IP, which browsers otherwise block on plain `http://`. TLS termination only; no auto-generation / ACME. See [HTTPS / TLS](#https--tls-for-mobile--cross-device-access) below. |
|
|
328
328
|
| `--tls-key <path>` | — | Path to a PEM private key file. Must be paired with `--tls-cert`. |
|
|
329
329
|
| `--max-sessions <n>` | `20` | Cap on concurrent live sessions. New `POST /session` requests that would spawn a fresh child return `503` (with `Retry-After: 5`) when the cap is hit; attaches to existing sessions are NOT counted. Set to `0` to disable. Sized for single-user / small-team usage; raise it if your deployment has the RAM/FD headroom (~30–50 MB per session). |
|
|
330
|
-
| `--max-total-sessions <n>` | derived | Optional non-negative integer daemon-wide cap on fresh session creation across all registered workspace runtimes. It applies to new child sessions, session restore, and branch/fork-created sessions; attaching to an existing live session does not consume a slot. Set to `0` for unlimited. When omitted
|
|
330
|
+
| `--max-total-sessions <n>` | derived | Optional non-negative integer daemon-wide cap on fresh session creation across all registered workspace runtimes. It applies to new child sessions, session restore, and branch/fork-created sessions; attaching to an existing live session does not consume a slot. Set to `0` for unlimited. When omitted in multi-workspace mode, the daemon derives a cap from the per-workspace limit and workspace count. |
|
|
331
331
|
| `--max-pending-prompts-per-session <n>` | `5` | Per-session cap on prompts accepted by `POST /session/:id/prompt` but not yet settled, including queued prompts and the active prompt. The bridge rejects overflow synchronously with `503`, `Retry-After: 5`, and `code: "prompt_queue_full"` before returning a `promptId`. Set to `0` to disable. `branchSession` serializes on the same FIFO but does not count against this prompt cap. |
|
|
332
|
-
| `--workspace <path>` | `process.cwd()` |
|
|
332
|
+
| `--workspace <path>` | `process.cwd()` | Workspace path registered by this daemon. Repeat the flag to host multiple workspaces in one process; the first is primary and remains the default when a request omits `cwd`. Relative paths resolve from the process working directory. Session requests whose canonical `cwd` is not registered return `400 workspace_mismatch`. |
|
|
333
333
|
| `--channel <name\|all>` | — | Experimental daemon-managed channel worker. Repeat the flag to select multiple configured channels, or pass `all` to start every configured channel. `all` cannot be combined with named channels. Selected channel `cwd` values must resolve to a registered workspace; a multi-workspace daemon runs one worker per owning workspace. The worker is owned by `qwen serve`; stop the daemon to stop serve-managed channels. |
|
|
334
334
|
| `--max-connections <n>` | `256` | Listener-level TCP connection cap (`server.maxConnections`). Bounds raw socket count irrespective of session count — slow / phantom SSE clients get rejected at accept time once full. Raise alongside `--max-sessions` if your deployment expects many SSE subscribers per session. |
|
|
335
335
|
| `--event-ring-size <n>` | `8000` | Per-session SSE replay ring depth (#3803 §02 target). Sets the backlog available to `GET /session/:id/events` with `Last-Event-ID: N`. Larger = more reconnect headroom at the cost of a few hundred KB extra RAM per session. SDK clients can additionally request a larger per-subscriber backlog cap on a specific subscription via `?maxQueued=N` (range `[16, 2048]`, default 256). Daemons also emit a non-terminal `slow_client_warning` SSE frame at 75% queue fill so clients can drain / reconnect before getting evicted. Pre-flight `caps.features.slow_client_warning`. |
|
|
336
336
|
| `--compacted-replay-max-bytes <n>` | `4194304` | Per-live-session byte cap for the retained replay events in the bounded snapshot returned by `POST /session/:id/load`. The cap applies to `compactedReplay`; the current in-flight `liveJournal` remains uncapped. Values must be positive safe integers; invalid values fail at boot, and the hard ceiling is 256 MiB. When older retained replay is dropped, the snapshot begins with `history_truncated`. This does not limit the on-disk transcript. |
|
|
337
|
-
| `--mcp-client-budget <n>` | — | Positive integer cap on live MCP clients
|
|
337
|
+
| `--mcp-client-budget <n>` | — | Positive integer cap on live MCP clients **per ACP session** (issue [#4175](https://github.com/QwenLM/qwen-code/issues/4175) PR 14 v1; PR 23 graduates this to per-workspace via the shared MCP pool). Combine with `--mcp-budget-mode`. When unset, no accounting-driven enforcement (but `GET /workspace/mcp` still reports `clientCount`). Distinct from claude-code's `MCP_SERVER_CONNECTION_BATCH_SIZE` which gates startup concurrency, not the total client count. Pre-flight `caps.features.mcp_guardrails`. |
|
|
338
338
|
| `--mcp-budget-mode <m>` | `warn` / `off` | How `--mcp-client-budget` is enforced. `warn` (default when budget set): no refusal, snapshot's `budgets[0].status` flips to `warning` at ≥75% of budget. `enforce`: connects past the cap are refused, per-server cell shows `disabledReason: 'budget'`, deterministic by `mcpServers` declaration order. `off` (default when budget unset): pure observability. Boot rejects `enforce` without a budget. |
|
|
339
|
-
| `--http-bridge` | `true` | Stage 1 mode:
|
|
339
|
+
| `--http-bridge` | `true` | Stage 1 mode: one `qwen --acp` child per registered workspace runtime; sessions targeting that workspace multiplex onto its child via ACP `newSession()`. Stage 2 native in-process becomes available later. |
|
|
340
340
|
| `--allow-origin <pat>` | — | T2.4 ([#4514](https://github.com/QwenLM/qwen-code/issues/4514)). Cross-origin allowlist for browser webui clients. Repeatable. Each value is `*` (any origin — boot refuses if no bearer token is configured; `--require-auth` on loopback is recommended so `/health` and `/demo` are also bearer-gated, since both are pre-auth on loopback by default) or a canonical URL origin (`<scheme>://<host>[:<port>]`, no trailing slash / path / userinfo / query). **Subdomain wildcards (`https://*.example.com`) are intentionally unsupported** — list each subdomain explicitly, or use `*` with a configured token (and `--require-auth` for full hardening). Matched origins receive CORS response headers (`Access-Control-Allow-Origin`, `Vary: Origin`, methods, headers, max-age, and exposed `Retry-After`); unmatched origins still get a 403 with the same envelope as today's wall. `Origin: null` (sandboxed iframes, file:// docs) is always rejected, even under `*`. Pre-flight via `caps.features.allow_origin`. Loopback self-origin hits are unaffected. |
|
|
341
341
|
| `--web` / `--no-web` | `true` | Serve the built Web Shell SPA at the daemon root (`GET /`, `/assets/*`, and SPA deep-link fallback). The static shell is registered **before** the bearer-auth gate — a browser can't attach a token to a `<script>` subresource or an address-bar navigation, the shell carries no secrets, and every API route stays token-gated regardless. On non-loopback binds a one-line stderr warning notes the UI is reachable without auth. Use `--no-web` for an API-only daemon. No effect when the build omits the Web Shell assets (the daemon logs a breadcrumb and runs API-only). |
|
|
342
342
|
| `--open` | `false` | After the listener is up, open the Web Shell in your default browser at the daemon URL (with `#token=` appended as a URL fragment when a token is configured — a fragment is never sent to the server, keeping the token out of access logs and Referer headers). No-op with `--no-web`, or in headless / CI / SSH environments where no browser is available. |
|
|
343
343
|
|
|
344
|
-
> **Sizing the load knobs.** `--max-sessions` is the per-workspace
|
|
344
|
+
> **Sizing the load knobs.** `--max-sessions` is the per-workspace **new-child** cap. `--max-total-sessions`, when set, is the daemon-wide fresh-session cap.
|
|
345
345
|
> Three other layers also limit load — when sizing for a high-concurrency
|
|
346
346
|
> deployment, tune them together:
|
|
347
347
|
>
|
|
@@ -360,20 +360,18 @@ Notes:
|
|
|
360
360
|
> over-capacity client gets a terminal `client_evicted` frame and is
|
|
361
361
|
> closed (one slow consumer can't pin the daemon).
|
|
362
362
|
>
|
|
363
|
-
> These caps interact:
|
|
364
|
-
> `--max-total-sessions` bounds
|
|
365
|
-
>
|
|
366
|
-
>
|
|
367
|
-
>
|
|
368
|
-
>
|
|
369
|
-
>
|
|
370
|
-
>
|
|
371
|
-
> admission layer. Default sizing assumes single-user / small-team load; raise
|
|
372
|
-
> progressively (and watch RSS) for larger deployments.
|
|
363
|
+
> These caps interact: the lower of `--max-sessions` and
|
|
364
|
+
> `--max-total-sessions` bounds fresh sessions in today's single-workspace
|
|
365
|
+
> daemon. `--max-sessions × 64 subscribers × 256 frames`
|
|
366
|
+
> is the worst-case in-flight memory at the EventBus layer, while
|
|
367
|
+
> `--max-sessions × --max-pending-prompts-per-session` bounds accepted
|
|
368
|
+
> prompt work at the admission layer. Default sizing assumes single-user /
|
|
369
|
+
> small-team load; raise progressively (and watch RSS) for multi-tenant
|
|
370
|
+
> deployments.
|
|
373
371
|
|
|
374
372
|
> **MCP client guardrails (issue [#4175](https://github.com/QwenLM/qwen-code/issues/4175) PR 14).** A workspace declaring 30 MCP servers in `mcpServers` will start 30 clients with no upstream cap unless you set one. `--mcp-client-budget=N` caps the live MCP client count; `--mcp-budget-mode={enforce,warn,off}` chooses the behavior. Default is `warn` when a budget is set (snapshot surfaces the warning but no client is refused — useful for measuring real-world fanout before flipping on enforcement). Refused servers under `enforce` mode get `disabledReason: 'budget'` on their per-server cell, and the `budgets[0]` cell shows `status: 'error'` + `errorKind: 'budget_exhausted'`. Slot reservation is by server name and survives reconnects / discovery timeouts — a refused server can't take a slot from a healthy one.
|
|
375
373
|
>
|
|
376
|
-
> **
|
|
374
|
+
> ⚠️ **v1 scope: per-session, not per-workspace.** Each ACP session inside the daemon has its own `Config`/`McpClientManager` (created via `newSessionConfig` per session). The budget caps live MCP clients **per session**, not aggregated across all sessions in the workspace. Snapshot at `GET /workspace/mcp` reflects the bootstrap session's view (the cell carries `scope: 'session'` for honesty). If you run 5 concurrent ACP sessions with `--mcp-client-budget=10`, you may have up to 50 live MCP clients across the daemon — the cap holds per session. **Wave 5 PR 23 (shared MCP pool)** introduces a workspace-scoped manager and graduates this to true per-workspace enforcement.
|
|
377
375
|
>
|
|
378
376
|
> ```sh
|
|
379
377
|
> qwen serve --mcp-client-budget=10 --mcp-budget-mode=warn
|
|
@@ -381,7 +379,7 @@ Notes:
|
|
|
381
379
|
> qwen serve --mcp-client-budget=10 --mcp-budget-mode=enforce
|
|
382
380
|
> ```
|
|
383
381
|
>
|
|
384
|
-
> This is **not** the same as claude-code's `MCP_SERVER_CONNECTION_BATCH_SIZE` (which gates startup concurrency); they
|
|
382
|
+
> This is **not** the same as claude-code's `MCP_SERVER_CONNECTION_BATCH_SIZE` (which gates startup concurrency); they're orthogonal. PR 23 will add a real shared MCP pool (a `scope: 'workspace'` cell in `budgets[]` alongside the per-session cell); PR 14 v1 is the in-process counter + soft enforcement on the existing per-session manager.
|
|
385
383
|
>
|
|
386
384
|
> **Push events (issue [#4175](https://github.com/QwenLM/qwen-code/issues/4175) PR 14b).** SDK clients subscribed to `GET /session/:id/events` receive typed frames when budget thresholds cross — `mcp_budget_warning` (synthetic, fires once per upward 75% crossing with hysteresis re-arm at 37.5%, advertised via `mcp_guardrail_events`) and `mcp_child_refused_batch` (coalesced once per discovery pass under `enforce` mode; length-1 from `readResource` lazy-spawn refusal). The snapshot at `GET /workspace/mcp` is still the source-of-truth for state-after-reconnect; events are change-edges. Useful when dashboarding in real-time without polling.
|
|
387
385
|
|
|
@@ -393,7 +391,7 @@ Notes:
|
|
|
393
391
|
- **Host header allowlist** — on **loopback** binds the daemon checks `Host:` matches `localhost:port` / `127.0.0.1:port` / `[::1]:port` / `host.docker.internal:port` (case-insensitive per RFC 7230 §5.4) to defend against DNS rebinding. **Non-loopback binds (`--hostname 0.0.0.0`) intentionally bypass the Host allowlist** — the operator has chosen the surface area, so the bearer-token gate is the sole authentication layer; reverse proxies / SNI / client cert pinning are the operator's responsibility, not the daemon's. If you need Host-based isolation on a non-loopback bind, terminate TLS + check Host at a front proxy.
|
|
394
392
|
- **CORS denies any browser Origin by default** — returns `403` JSON. Pass **`--allow-origin <pattern>`** (repeatable, T2.4 #4514) to opt specific browser origins through. Each value is either the literal `*` (any origin — boot refuses if no bearer token is configured; `--require-auth` on loopback is recommended for full hardening since `/health` and `/demo` remain pre-auth on loopback by default) or a canonical URL origin (`<scheme>://<host>[:<port>]`, no trailing slash / path / userinfo). Matched origins receive proper CORS response headers (`Access-Control-Allow-Origin: <echoed>`, `Vary: Origin`, plus standard methods / headers / max-age and exposed `Retry-After`); unmatched origins still get a 403 with the same envelope as the default wall. `caps.features.allow_origin` is advertised conditionally so SDK / webui clients can pre-flight whether the daemon honors cross-origin hits before issuing them. Example: `qwen serve --allow-origin http://localhost:3000 --allow-origin http://localhost:5173`. Loopback self-origin hits (e.g. the `/demo` page) are unaffected — a separate Origin-strip shim handles them regardless of `--allow-origin`. **Browser webuis without `--allow-origin` configured** still fall back to the same Stage 1 options as before: package as a native shell (Electron/Tauri) so no `Origin` header is sent, or front the daemon with a same-origin reverse proxy.
|
|
395
393
|
- **Chrome extension browser automation is separate from framing.** `qwen serve --allow-origin chrome-extension://<id>` lets the extension frame the Web Shell and connect to the daemon. Console/network/screenshot/click tools require an external CDP MCP adapter command: `QWEN_CDP_MCP_COMMAND=/path/to/cdp-mcp-adapter qwen serve --allow-origin chrome-extension://<id>`. The main CLI package does not bundle a browser automation adapter; clients can check `caps.features.includes('browser_automation_mcp')` before presenting those tools as available.
|
|
396
|
-
- **
|
|
394
|
+
- **Spawned `qwen --acp` child inherits the daemon's environment** with one explicit scrub: `QWEN_SERVER_TOKEN` is removed before the child starts (the daemon's own bearer; the agent doesn't need it). Everything else — `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` / `QWEN_*` / `DASHSCOPE_API_KEY` / your custom `modelProviders[].envKey` / etc. — passes through, because the agent legitimately needs those to authenticate to the LLM. **This is intentional, not a sandbox.** The agent runs as the same UID with shell-tool access, so anything in `~/.bashrc` / `~/.aws/credentials` / `~/.npmrc` is reachable by prompt injection regardless. The env passthrough is not the security boundary; the user-as-trust-root is. Don't run `qwen serve` under an identity that has env-resident credentials you wouldn't trust the agent with.
|
|
397
395
|
- **Per-subscriber bounded SSE queues** — a slow client that overflows its queue gets a `client_evicted` terminal frame and is closed; one stuck consumer can't pin the daemon.
|
|
398
396
|
- **Per-session prompt admission cap** — defaults to 5 accepted-but-unsettled prompts per session. A buggy client cannot enqueue unbounded prompt promises or temporary SSE waits for one session.
|
|
399
397
|
- **Graceful shutdown** — SIGINT/SIGTERM drain the agent children before closing the listener (10s deadline per child).
|
|
@@ -437,15 +435,15 @@ Both flags accept a positive integer in milliseconds; `0`, `NaN`, non-integer, o
|
|
|
437
435
|
|
|
438
436
|
## Multi-session & multi-workspace deployment
|
|
439
437
|
|
|
440
|
-
Pass `--workspace` more than once to register several non-overlapping workspaces in one `qwen serve` process. The first path is primary. Each registered workspace owns an isolated runtime boundary, while the daemon-wide listener, authentication policy, and total-session limit are shared.
|
|
438
|
+
Pass `--workspace` more than once to register several non-overlapping workspaces in one `qwen serve` process. The first path is primary. Each registered workspace owns an isolated runtime boundary, while the daemon-wide listener, authentication policy, and total-session limit are shared. Trusted workspaces start their own `qwen --acp` child on demand. Requests may select a registered workspace by canonical `cwd`; requests that omit `cwd` use the primary workspace. Use one daemon per user or security principal; workspace trust is an execution gate, not an ACL.
|
|
441
439
|
|
|
442
|
-
An untrusted secondary workspace is visible in Web Shell as `untrusted` and `read-only`. It can be expanded to inspect the persisted session catalog, but it cannot yet be selected or opened in Web Shell, resumed, used to create sessions, or fully exported. The REST API
|
|
440
|
+
An untrusted secondary workspace is visible in Web Shell as `untrusted` and `read-only`. It can be expanded to inspect the persisted session catalog, but it cannot yet be selected or opened in Web Shell, resumed, used to create sessions, or fully exported. The REST API exposes its persisted session-group catalog and, when `workspace_persisted_transcript` is advertised, its active persisted transcript through the bounded workspace-qualified pager. These reads do not include live runtime state or start an ACP child. Full workspace-qualified export requires a trusted workspace and the separate `workspace_session_export` capability. Trust the workspace and restart the daemon before using execution, mutation, or export features. An untrusted primary remains disabled in Web Shell.
|
|
443
441
|
|
|
444
442
|
Use separate daemon processes when you need a smaller fault or security boundary, independent bearer tokens, quotas, audit boundaries, operating-system isolation, or independent resource supervision. Multi-workspace mode is intended for one operator hosting several repos; it is not a multi-tenant isolation boundary. A single daemon token authorizes every route the daemon exposes, including the allowed read-only catalog for all registered workspaces.
|
|
445
443
|
|
|
446
444
|
> **Subscribe BEFORE posting `modelServiceId` on attach.** When a client `POST /session` with a `modelServiceId` and the workspace already has a session running a different model, the daemon issues an internal `setSessionModel` call — failures are NOT propagated as an HTTP error (the session stays operational on its current model). The visible failure signal is a `model_switch_failed` event on the session's SSE stream. If you call `POST /session` and only THEN open `GET /session/:id/events`, you'll miss the failure event and silently keep talking to the wrong model. Open the SSE stream first, or pass `Last-Event-ID: 0` on subscribe to replay the ring's oldest available event.
|
|
447
445
|
|
|
448
|
-
To handle multiple **users
|
|
446
|
+
To handle multiple **users** (each with their own quota, audit log, sandbox) or to scale beyond one process's reach (cold-start budget, FD count, RSS), spawn one daemon per workspace per user behind an external orchestrator. That orchestrator (multi-tenancy / OIDC / Quota / Audit / k8s) is **out of scope** for the qwen-code project — see issue [#3803](https://github.com/QwenLM/qwen-code/issues/3803) "External Reference Architecture" for the design pointers.
|
|
449
447
|
|
|
450
448
|
## Loading and resuming a persisted session
|
|
451
449
|
|
|
@@ -492,7 +490,7 @@ For a registered workspace, use `client.workspaceById(workspaceId).getSessionTra
|
|
|
492
490
|
|
|
493
491
|
For a full attachment from a trusted registered workspace, pre-flight `workspace_session_export` and call `client.workspaceById(workspaceId).exportSession(sessionId, { format: 'html' })` or the raw `/workspaces/:workspace/session/:id/export` route. Do not infer support from `session_export` or `workspace_qualified_rest_core`: older daemons can advertise both while retaining primary-only export. The current Web Shell export action remains primary-only; use the SDK or REST route for another workspace.
|
|
494
492
|
|
|
495
|
-
For an archived attachment, pre-flight `workspace_archived_session_export` and call `client.workspaceById(workspaceId).exportArchivedSession(sessionId, { format: 'html' })` or `/workspaces/:workspace/session/:id/archive/export`. This path reads archived storage in place and returns `409 session_not_archived` for an active-only id; it does not unarchive the session.
|
|
493
|
+
For an archived attachment, pre-flight `workspace_archived_session_export` and call `client.workspaceById(workspaceId).exportArchivedSession(sessionId, { format: 'html' })` or `/workspaces/:workspace/session/:id/archive/export`. This path reads archived storage in place and returns `409 session_not_archived` for an active-only id; it does not unarchive the session.
|
|
496
494
|
|
|
497
495
|
`limit` counts active chat records, not emitted replay frames; one record can produce several `session_update` events. The first response freezes the JSONL snapshot size and returns `nextCursor` while `hasMore` is true. Later pages ignore appends after page 1, but return `409` if the file is deleted, truncated, replaced, archived, or otherwise conflicts with the frozen cursor. Very large snapshots return `413 transcript_too_large` before indexing so the daemon does not scan unbounded transcript files on the request path.
|
|
498
496
|
|
|
@@ -572,26 +570,26 @@ In this mode, TUI is a **"super-client"** — it observes the same agent convers
|
|
|
572
570
|
|
|
573
571
|
(B) is the more ambitious answer but locks Stage 1.5 into a substantially larger wire surface that must also pass cleanly through the planned in-process refactor. We'd rather walk the smaller scope honestly. The session-state-event taxonomy work — enumerating which TUI flows are local-only by design vs. could plausibly graduate to wire under a future opt-in (B)-flavor extension — moves to [#3803](https://github.com/QwenLM/qwen-code/issues/3803), not Stage 1.5 code.
|
|
574
572
|
|
|
575
|
-
### N parallel sessions share one `qwen --acp` child
|
|
573
|
+
### N parallel sessions share one `qwen --acp` child
|
|
576
574
|
|
|
577
|
-
Multiple sessions on the same
|
|
575
|
+
Multiple sessions on the same workspace **share one `qwen --acp` child process** via the agent's native multi-session support (`packages/cli/src/acp-integration/acpAgent.ts:194: private sessions: Map<string, Session>`). The bridge calls `connection.newSession({cwd, mcpServers})` for each session — the agent stores them in its sessions map and demultiplexes per-call sessionId.
|
|
578
576
|
|
|
579
577
|
Concrete cost at N=5 sessions on the same workspace:
|
|
580
578
|
|
|
581
|
-
| Resource | Per session
|
|
582
|
-
| ------------------------------------ |
|
|
583
|
-
| Daemon Node process | one
|
|
584
|
-
| `qwen --acp` child | shared
|
|
585
|
-
| MCP server children |
|
|
586
|
-
| `FileReadCache` (in-child heap) | shared
|
|
587
|
-
| `CLAUDE.md` / hierarchy memory parse | shared
|
|
588
|
-
| OAuth refresh-token state | shared
|
|
589
|
-
| Auto-memory learned facts | shared
|
|
590
|
-
| Cold start | first only
|
|
579
|
+
| Resource | Per session | At N=5 |
|
|
580
|
+
| ------------------------------------ | ----------- | ---------------------------- |
|
|
581
|
+
| Daemon Node process | one | **30–50 MB** (one daemon) |
|
|
582
|
+
| `qwen --acp` child | shared | **60–100 MB** (one child) |
|
|
583
|
+
| MCP server children | per-session | 3×N if configs differ |
|
|
584
|
+
| `FileReadCache` (in-child heap) | shared | parsed once |
|
|
585
|
+
| `CLAUDE.md` / hierarchy memory parse | shared | parsed once |
|
|
586
|
+
| OAuth refresh-token state | shared | **one refresh path** |
|
|
587
|
+
| Auto-memory learned facts | shared | one knowledge base per child |
|
|
588
|
+
| Cold start | first only | <200 ms after first session |
|
|
591
589
|
|
|
592
|
-
|
|
590
|
+
The bridge keeps **one channel per daemon** (one daemon per workspace, per §02). The channel stays alive while at least one session is live; the last `killSession` (or a channel-level crash) kills the child.
|
|
593
591
|
|
|
594
|
-
**MCP server children**
|
|
592
|
+
**MCP server children** are still per-session today — each session's config can specify different servers, so they're independently spawned. Stage 1.5 follow-up: refcount MCP server children by `(workspace, config-hash)` so identical configs share. Not in scope for this PR.
|
|
595
593
|
|
|
596
594
|
**Peer agents (Cursor / Continue / Claude Code / OpenCode / Gemini CLI) all do single-process multi-session.** qwen-code matches them at the agent layer; the Stage 1 bridge in this PR makes the same architecture visible over HTTP.
|
|
597
595
|
|
|
@@ -12,7 +12,7 @@ import "./chunk-Q6TUALBE.js";
|
|
|
12
12
|
import "./chunk-SUARMD4Q.js";
|
|
13
13
|
import "./chunk-QHTIBUWB.js";
|
|
14
14
|
import "./chunk-RKUWKYED.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-NJOFRXTM.js";
|
|
16
16
|
import "./chunk-T4TZQJ7W.js";
|
|
17
17
|
import "./chunk-H6XPXXMH.js";
|
|
18
18
|
import "./chunk-5M6IDOMF.js";
|
|
@@ -33,7 +33,7 @@ import "./chunk-2Z5UX4KI.js";
|
|
|
33
33
|
import "./chunk-ARKANCNX.js";
|
|
34
34
|
import "./chunk-L5U3ELZX.js";
|
|
35
35
|
import "./chunk-TYLOFD2U.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-MQOVXZAF.js";
|
|
37
37
|
import "./chunk-4WKAA4KS.js";
|
|
38
38
|
import "./chunk-CR3C7WXL.js";
|
|
39
39
|
import "./chunk-RTV5TUYB.js";
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import {
|
|
4
4
|
ConfigContext,
|
|
5
5
|
SessionPicker
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-5Z452MMD.js";
|
|
7
|
+
import "./chunk-BYB3GF2T.js";
|
|
8
8
|
import {
|
|
9
9
|
SettingsContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FYQ22K62.js";
|
|
11
11
|
import {
|
|
12
12
|
KeypressProvider
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NVTQZXR7.js";
|
|
14
14
|
import "./chunk-4WGODMVR.js";
|
|
15
15
|
import "./chunk-KW7NOTN6.js";
|
|
16
16
|
import "./chunk-DOPUYNXO.js";
|
|
@@ -21,26 +21,26 @@ import {
|
|
|
21
21
|
use_app_default
|
|
22
22
|
} from "./chunk-OWT2CAEQ.js";
|
|
23
23
|
import "./chunk-NHDKSOEY.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-LS56TX3M.js";
|
|
25
25
|
import "./chunk-7X7TEQNX.js";
|
|
26
26
|
import {
|
|
27
27
|
require_react
|
|
28
28
|
} from "./chunk-HTHUX2T5.js";
|
|
29
29
|
import "./chunk-Q6TUALBE.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-CF5VJRGC.js";
|
|
31
31
|
import "./chunk-SUARMD4Q.js";
|
|
32
32
|
import "./chunk-QHTIBUWB.js";
|
|
33
33
|
import "./chunk-E5Z2AVNV.js";
|
|
34
34
|
import "./chunk-57OAHC2Y.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-SQ5BK3GO.js";
|
|
36
|
+
import "./chunk-GNBBAQ6J.js";
|
|
37
37
|
import "./chunk-RKUWKYED.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-4AGTGMCQ.js";
|
|
39
|
+
import "./chunk-JWICTOXS.js";
|
|
40
40
|
import "./chunk-GOXKNSDZ.js";
|
|
41
41
|
import "./chunk-IDS7MSUP.js";
|
|
42
42
|
import "./chunk-QRUIS3DN.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-2OG646IN.js";
|
|
44
44
|
import "./chunk-ALGGS7UH.js";
|
|
45
45
|
import "./chunk-MR3PXB6E.js";
|
|
46
46
|
import {
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
SessionService,
|
|
51
51
|
getGitBranch
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-NJOFRXTM.js";
|
|
53
53
|
import "./chunk-T4TZQJ7W.js";
|
|
54
54
|
import "./chunk-H6XPXXMH.js";
|
|
55
55
|
import "./chunk-5M6IDOMF.js";
|
|
@@ -70,7 +70,7 @@ import "./chunk-2Z5UX4KI.js";
|
|
|
70
70
|
import "./chunk-ARKANCNX.js";
|
|
71
71
|
import "./chunk-L5U3ELZX.js";
|
|
72
72
|
import "./chunk-TYLOFD2U.js";
|
|
73
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-MQOVXZAF.js";
|
|
74
74
|
import "./chunk-4WKAA4KS.js";
|
|
75
75
|
import "./chunk-CR3C7WXL.js";
|
|
76
76
|
import "./chunk-RTV5TUYB.js";
|
|
@@ -94,7 +94,7 @@ import "./chunk-FCMNKVXT.js";
|
|
|
94
94
|
import "./chunk-DJ2GSRLV.js";
|
|
95
95
|
import "./chunk-LQIDP6K5.js";
|
|
96
96
|
import "./chunk-7NFB7LBQ.js";
|
|
97
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-CAHY5ABC.js";
|
|
98
98
|
import "./chunk-75DOP5OR.js";
|
|
99
99
|
import "./chunk-DMTGGOSA.js";
|
|
100
100
|
import "./chunk-YQ3U5MUC.js";
|