@qwen-code/qwen-code 0.21.9 → 0.21.10-nightly.20260812.a64d1291d2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +1 -1
- package/bundled/qc-helper/docs/extension/_meta.ts +1 -0
- package/bundled/qc-helper/docs/extension/agent-plugins.md +50 -0
- package/bundled/qc-helper/docs/extension/extension-releasing.md +3 -3
- package/bundled/qc-helper/docs/extension/introduction.md +17 -3
- package/bundled/qc-helper/docs/features/status-line.md +13 -13
- package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +14 -10
- package/bundled/review/SKILL.md +2 -2
- package/chunks/{MaxSizedBox-6BZANW7X.js → MaxSizedBox-K4E5KPIT.js} +5 -5
- package/chunks/{StandaloneSessionPicker-VDC5KE7T.js → StandaloneSessionPicker-5PG5MX6M.js} +19 -19
- package/chunks/{acp-startup-profiler-B5BYAMYQ.js → acp-startup-profiler-VNTFWYAC.js} +2 -2
- package/chunks/{acpAgent-F2NSBCUF.js → acpAgent-IPOVQXM7.js} +96 -44
- package/chunks/{agent-VOHJOEBB.js → agent-VMXQF6MJ.js} +5 -5
- package/chunks/{agent-headless-J5NFOPHP.js → agent-headless-VT7HJGQV.js} +5 -5
- package/chunks/{anthropicContentGenerator-SSFE2753.js → anthropicContentGenerator-D3Y4RFT4.js} +1 -1
- package/chunks/{bridge-NQIZZLAS.js → bridge-BAC6ACMF.js} +9 -9
- package/chunks/{channel-settings-store-VIY2OENO.js → channel-settings-store-GAA4CJAG.js} +11 -11
- package/chunks/{channel-worker-group-MSHT6CWR.js → channel-worker-group-WQP4RCDO.js} +3 -3
- package/chunks/{channel-worker-manager-XXD3GDSK.js → channel-worker-manager-MRDFAKIM.js} +3 -3
- package/chunks/{chunk-UYAUA63Q.js → chunk-2KRG55OF.js} +1 -1
- package/chunks/{chunk-K4ADGWHU.js → chunk-2YE6NWAN.js} +1 -1
- package/chunks/{chunk-UJUM2SRN.js → chunk-3MJEGPUL.js} +30 -27
- package/chunks/{chunk-3XVDTHBJ.js → chunk-47BN53GH.js} +2 -2
- package/chunks/{chunk-LZZLUCRS.js → chunk-4H4DGTRN.js} +3 -3
- package/chunks/{chunk-46YJDYCU.js → chunk-55OIMPSA.js} +7 -7
- package/chunks/{chunk-BIRWP6LU.js → chunk-5AJYBHLB.js} +1 -1
- package/chunks/{chunk-LP2QGNSP.js → chunk-624NHDGB.js} +3 -1
- package/chunks/{chunk-TZ6KJ44L.js → chunk-6NBNKITT.js} +1 -1
- package/chunks/{chunk-ATMO54WE.js → chunk-7OZLORD6.js} +2 -2
- package/chunks/{chunk-W3FSZSF2.js → chunk-AYIDPTXZ.js} +1 -1
- package/chunks/{chunk-GAKGOXTC.js → chunk-BK57YU3Q.js} +1 -1
- package/chunks/{chunk-AKJQSWV4.js → chunk-BSI645OU.js} +2 -2
- package/chunks/{chunk-MHP476D3.js → chunk-BSQSQRS4.js} +52 -39
- package/chunks/{chunk-5RBDAGC6.js → chunk-CH3TTBXT.js} +2 -2
- package/chunks/{chunk-TQCYNLNJ.js → chunk-DQFFENP5.js} +1 -1
- package/chunks/{chunk-MTCYGTWH.js → chunk-E5QWOI62.js} +4 -4
- package/chunks/{chunk-HZGBKOX3.js → chunk-EE6LY6EF.js} +2 -2
- package/chunks/{chunk-I5VM3SKY.js → chunk-EV3LZGGK.js} +332 -34
- package/chunks/{chunk-II6G3EY6.js → chunk-F2ZNVJEW.js} +339 -213
- package/chunks/{chunk-RBHQXGDK.js → chunk-F64B4CZT.js} +1 -1
- package/chunks/{chunk-OGNFHGIG.js → chunk-FOELNQMQ.js} +4 -4
- package/chunks/{chunk-CG3WBKJK.js → chunk-JT7XS4YW.js} +1 -1
- package/chunks/{chunk-FCLHHEUK.js → chunk-JVL4RMIC.js} +11 -11
- package/chunks/{chunk-T5RLUXWJ.js → chunk-K54PS4L2.js} +2 -2
- package/chunks/{chunk-KSAFZ5TA.js → chunk-KEN4RQXD.js} +1 -1
- package/chunks/{chunk-DGEIYUC3.js → chunk-KM73TBQ4.js} +7 -1
- package/chunks/{chunk-SCAZZ3Q4.js → chunk-L7TNB7A6.js} +4 -4
- package/chunks/{scheduler-YNQNOU2E.js → chunk-LQANGKTR.js} +238 -110
- package/chunks/{chunk-ZTQSOV56.js → chunk-LVMQKGBL.js} +3 -3
- package/chunks/{chunk-WGK4TSB7.js → chunk-MOTN72IT.js} +3 -3
- package/chunks/{chunk-XX7QFP34.js → chunk-NX2E4GYA.js} +3899 -3062
- package/chunks/{chunk-THIKWITR.js → chunk-P2IS6EBV.js} +2 -2
- package/chunks/{chunk-CMOBWHWW.js → chunk-QBJYSIQ4.js} +1 -1
- package/chunks/{chunk-DH5YXSIF.js → chunk-QLCMCSLN.js} +2 -2
- package/chunks/{chunk-67N6HB5H.js → chunk-QUI267ZP.js} +1 -0
- package/chunks/{chunk-QSNSL4R4.js → chunk-QUOFZM2M.js} +1 -1
- package/chunks/{chunk-ZOSTTOUJ.js → chunk-RBO66BYX.js} +1 -1
- package/chunks/{chunk-KTQGGPGV.js → chunk-RE46EJ3D.js} +4 -4
- package/chunks/{chunk-4XQNB3KN.js → chunk-RLTM3QF6.js} +2 -2
- package/chunks/{chunk-PVOGHGSF.js → chunk-RNIXJDUJ.js} +6 -6
- package/chunks/{chunk-ZBXGWQ4S.js → chunk-S3UYEZ5P.js} +2 -2
- package/chunks/{chunk-IOEZE2YT.js → chunk-U23YG4FX.js} +1 -1
- package/chunks/{chunk-WP5VOXF7.js → chunk-U2S2BLXV.js} +1 -1
- package/chunks/{chunk-XTY5DN4Y.js → chunk-U46N7DPC.js} +1 -1
- package/chunks/{chunk-BAMN6XSD.js → chunk-U6Z72YG7.js} +1 -1
- package/chunks/{chunk-23VQTELM.js → chunk-UH3IULYM.js} +1 -1
- package/chunks/{chunk-T6HEQR2Q.js → chunk-V54U4DJ5.js} +1 -1
- package/chunks/{chunk-G2TX5ZXC.js → chunk-VHZGWFFR.js} +3 -3
- package/chunks/{chunk-3WDYBTTI.js → chunk-VNKZDFWC.js} +4 -4
- package/chunks/{chunk-JUWS2Z5K.js → chunk-VXIWAZOB.js} +5 -5
- package/chunks/{chunk-D7BXVKSF.js → chunk-VZXRAUBT.js} +1 -1
- package/chunks/{chunk-M2PNLYGY.js → chunk-W5UC37EE.js} +2 -0
- package/chunks/{chunk-7AEPJGL4.js → chunk-W7YVDFWW.js} +1 -1
- package/chunks/{chunk-P4ZEZSJZ.js → chunk-WBLEKO7Y.js} +301 -88
- package/chunks/{chunk-OGDIJKHK.js → chunk-WDNJKDCV.js} +1 -1
- package/chunks/{chunk-BT6GQIEJ.js → chunk-X2UOOG5V.js} +1 -1
- package/chunks/{chunk-RVSTTOJ4.js → chunk-X34IHISE.js} +2 -2
- package/chunks/{chunk-7S4JBJLU.js → chunk-XL4L56BA.js} +3 -3
- package/chunks/{chunk-HADWBW5R.js → chunk-YDXGES66.js} +10 -8
- package/chunks/{chunk-7GOYZQPR.js → chunk-YG7HIT5G.js} +3 -3
- package/chunks/{chunk-P3RBMQ4P.js → chunk-YPQWPADW.js} +4 -4
- package/chunks/{chunk-P2FK2HBV.js → chunk-YRZGVOGK.js} +2 -2
- package/chunks/{chunk-BZP4QPNK.js → chunk-ZH3OJWOH.js} +9 -9
- package/chunks/{chunk-PNBBJOCP.js → chunk-ZKVJ7KFA.js} +1 -1
- package/chunks/{chunk-FBMCDU63.js → chunk-ZYHPUNBD.js} +4 -4
- package/chunks/{chunk-KTKYGS2P.js → chunk-ZZCWJWTF.js} +8 -1
- package/chunks/{computer-use-PMZ7ICGY.js → computer-use-TVZGVQPC.js} +5 -5
- package/chunks/{contextCommand-GEZU7YHE.js → contextCommand-EQC4CBSS.js} +7 -7
- package/chunks/{core-runtime-HRJI2MN6.js → core-runtime-BG5F54ZP.js} +5 -5
- package/chunks/{create-sub-session-VBNVI4YU.js → create-sub-session-SLZLFXSO.js} +6 -6
- package/chunks/{daemon-POSQPD3G.js → daemon-GWD7BT6E.js} +46 -5
- package/chunks/{daemon-status-provider-N4CRQKFI.js → daemon-status-provider-N5BYCQDQ.js} +13 -13
- package/chunks/{daemon-trust-policy-BHO3JUHM.js → daemon-trust-policy-LD5SCDI7.js} +11 -11
- package/chunks/{daemon-trust-policy-monitor-YEKJ2726.js → daemon-trust-policy-monitor-A243C45J.js} +11 -11
- package/chunks/{deferred-core-runtime-SH57E3J3.js → deferred-core-runtime-DBIT7BLE.js} +5 -5
- package/chunks/{earlyInputCapture-B2JJ2HME.js → earlyInputCapture-4XHUKK24.js} +5 -5
- package/chunks/{edit-7FTXENAN.js → edit-LESWHF3T.js} +5 -5
- package/chunks/{enter-worktree-JPHV2PBG.js → enter-worktree-FTOEWQUC.js} +5 -5
- package/chunks/{enterPlanMode-CGBJ3AHJ.js → enterPlanMode-NVN7AHQQ.js} +5 -5
- package/chunks/{environment-LXASZAHD.js → environment-D2DDDREF.js} +7 -7
- package/chunks/{errors-XIGVT2AD.js → errors-RNZVUHHZ.js} +7 -7
- package/chunks/{exit-worktree-DKSGXW65.js → exit-worktree-YY7VLO4V.js} +5 -5
- package/chunks/{exitPlanMode-THFL2HYN.js → exitPlanMode-NTVZE4EW.js} +5 -5
- package/chunks/{fast-path-4NXAT5UL.js → fast-path-FBGTJPOT.js} +2 -2
- package/chunks/{gemini-B3N6FACU.js → gemini-4EAKD6ZK.js} +76 -52
- package/chunks/{geminiContentGenerator-YYFE2HIE.js → geminiContentGenerator-B2OSGUGH.js} +1 -1
- package/chunks/{glob-BPHSCFJP.js → glob-Q2FCGTR4.js} +5 -5
- package/chunks/{goal-tools-PXWN5VK3.js → goal-tools-SWNB6GP4.js} +1 -1
- package/chunks/{grep-ROZIRFLU.js → grep-A6GL7D2F.js} +5 -5
- package/chunks/{handleAutoUpdate-WV6SPZQB.js → handleAutoUpdate-2BH5LSGN.js} +9 -9
- package/chunks/{i18n-YWJWPQKD.js → i18n-Q2HJLEMO.js} +6 -6
- package/chunks/{image-gen-SISRZ6FS.js → image-gen-J5CH33LV.js} +1 -1
- package/chunks/{initializer-66OAD6GO.js → initializer-ESQCOGMA.js} +11 -11
- package/chunks/{installationInfo-3YUGIP36.js → installationInfo-LEQKYZUV.js} +6 -6
- package/chunks/{list-VEYR66XB.js → list-HGYJO3XP.js} +14 -14
- package/chunks/{loadedSettingsAdapter-V2JCPCYD.js → loadedSettingsAdapter-5UE5WA63.js} +11 -11
- package/chunks/{loggingContentGenerator-RBLNDREC.js → loggingContentGenerator-4EJPPA6R.js} +1 -1
- package/chunks/{managed-npm-update-C5ID5R4R.js → managed-npm-update-NXWCMWAJ.js} +6 -6
- package/chunks/{mcp-OZ54NZJQ.js → mcp-AJO665OX.js} +11 -11
- package/chunks/{monitor-7Y4TVFTK.js → monitor-WTLK3MYH.js} +5 -5
- package/chunks/{nonInteractiveCli-QEK4LHAC.js → nonInteractiveCli-HVBK2CZX.js} +35 -35
- package/chunks/{notebook-edit-OG35EBGY.js → notebook-edit-RBKPQF32.js} +5 -5
- package/chunks/{openaiContentGenerator-443BNRPJ.js → openaiContentGenerator-GYQWXOHX.js} +1 -1
- package/chunks/{pidfile-ZK4OLRZA.js → pidfile-Y7VFMJYS.js} +5 -5
- package/chunks/{processUtils-4YGB4RUZ.js → processUtils-QR4XBRHA.js} +2 -2
- package/chunks/{qwenContentGenerator-D5C2LCSZ.js → qwenContentGenerator-PLMPJ7AT.js} +5 -5
- package/chunks/{qwenOAuth2-Z4YQBMYN.js → qwenOAuth2-IJJTZK6N.js} +1 -1
- package/chunks/{read-file-EXTJLWMU.js → read-file-K724KK2A.js} +1 -1
- package/chunks/{resumeHistoryUtils-UPCGRJUL.js → resumeHistoryUtils-DLHDUD2M.js} +8 -8
- package/chunks/{ripGrep-QBVIRCU4.js → ripGrep-FMIC7FNP.js} +5 -5
- package/chunks/{run-qwen-serve-ZYGJNE3E.js → run-qwen-serve-JRQ2HD5U.js} +38 -34
- package/chunks/{runtime-BZZ4LWCP.js → runtime-ER7P3KUI.js} +12 -12
- package/chunks/scheduler-KWLBM3NK.js +108 -0
- package/chunks/{serve-LJHAXDCH.js → serve-YB47EMXO.js} +11 -11
- package/chunks/{server-ADMLELR6.js → server-JYXJCDIX.js} +629 -252
- package/chunks/{session-YKZXFFTM.js → session-GHU5Q4AW.js} +43 -44
- package/chunks/{settings-EQBUAQ7Y.js → settings-CKL2MBGB.js} +10 -10
- package/chunks/{shell-3QZOJGTT.js → shell-YVEUL4QQ.js} +5 -5
- package/chunks/{skill-UWSSMXE7.js → skill-LGVJVPZV.js} +1 -1
- package/chunks/{skill-settings-T6MLB7NU.js → skill-settings-SSSOSSPI.js} +10 -10
- package/chunks/{spawnChannel-VS7ZFUFP.js → spawnChannel-FQHJA372.js} +8 -6
- package/chunks/{standalone-update-2W26SRRO.js → standalone-update-UAKUIJVX.js} +7 -7
- package/chunks/{startInteractiveUI-CVS7K3D6.js → startInteractiveUI-HT57X3GG.js} +1210 -926
- package/chunks/{team-create-4WFTNNUL.js → team-create-5JHJVRFA.js} +5 -5
- package/chunks/{team-plan-approval-DBYI33S3.js → team-plan-approval-HBJP76ID.js} +5 -5
- package/chunks/{terminal-image-renderer-S5WPPQKH.js → terminal-image-renderer-32M7VTOP.js} +5 -5
- package/chunks/{theme-manager-LI2RIOVR.js → theme-manager-JKURLTQE.js} +5 -5
- package/chunks/{tool-search-4773EUQ4.js → tool-search-AMC7FXYI.js} +1 -1
- package/chunks/{total-session-admission-PAY5CH2Z.js → total-session-admission-TK2UUJZG.js} +10 -10
- package/chunks/{trustedFolders-FRSLE674.js → trustedFolders-YAPOBY37.js} +6 -6
- package/chunks/{update-relaunch-ZSFQTU6M.js → update-relaunch-4CMYTESD.js} +5 -5
- package/chunks/{updateCheck-AXWSO7KA.js → updateCheck-526AK4W6.js} +8 -8
- package/chunks/{useAutoAcceptIndicator-VHLXIA7U.js → useAutoAcceptIndicator-GZMVYIAH.js} +11 -11
- package/chunks/{validateNonInterActiveAuth-PDJECMFU.js → validateNonInterActiveAuth-RTMLOTRO.js} +32 -32
- package/chunks/{version-RBN764QS.js → version-4HU3RJQY.js} +1 -1
- package/chunks/{web-fetch-7BJK42AF.js → web-fetch-AZE7YE2H.js} +1 -1
- package/chunks/{web-search-L2CILQXV.js → web-search-THKQ4CJN.js} +2 -2
- package/chunks/{workflow-5VH2R74I.js → workflow-ZGTAUCV3.js} +6 -6
- package/chunks/{workspace-providers-status-OZTQ6JFH.js → workspace-providers-status-HEKQ7HJL.js} +13 -13
- package/chunks/{workspace-registration-store-IX5RJQS5.js → workspace-registration-store-H3M2APZV.js} +1 -1
- package/chunks/{workspace-registry-73N4BGG4.js → workspace-registry-LBV2HXGB.js} +10 -10
- package/chunks/{workspace-service-I5RUPSNV.js → workspace-service-4NNBEEXD.js} +15 -15
- package/chunks/{workspace-skills-status-DMK6VYDO.js → workspace-skills-status-LJ3YCC4W.js} +11 -11
- package/chunks/{workspace-trust-reconciler-QX4RL3TC.js → workspace-trust-reconciler-OKFLBY7B.js} +16 -16
- package/chunks/{write-file-UGDD5UTS.js → write-file-YESN7WUZ.js} +5 -5
- package/chunks/{zoom-image-ZAHEO3YP.js → zoom-image-2KUEGQ6U.js} +1 -1
- package/cli.js +13 -13
- package/package.json +3 -3
- package/web-shell/assets/{arc-CHY4saMJ.js → arc-BGiARkbG.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-Bu6CwvHj.js → architectureDiagram-3BPJPVTR-3QBZDeqg.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-XGt6iGf_.js → blockDiagram-GPEHLZMM-CbJI0j0o.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CBbYl19W.js → c4Diagram-AAUBKEIU-pita1IYy.js} +1 -1
- package/web-shell/assets/channel-3vYOf77E.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BEhmVrdx.js → chunk-2J33WTMH-WzTFww1i.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-fQLyE0Bg.js → chunk-4BX2VUAB-8TIRo9bL.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-yGdtyx4a.js → chunk-55IACEB6-CuCr34qf.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DYbX2GLo.js → chunk-727SXJPM-Bb_xWEAx.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DyKTEsYn.js → chunk-AQP2D5EJ-C8T1b2Qw.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-D8Uy_GzX.js → chunk-FMBD7UC4-kjpyMkNM.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-C8wNR2K7.js → chunk-ND2GUHAM-Dm35jDmi.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BnybNxnt.js → chunk-QZHKN3VN-BPVKwuby.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Dr2aqxvr.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Dr2aqxvr.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-jq4uiFRp.js → cose-bilkent-S5V4N54A-M-7J9Xyz.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Bs7oye1U.js → dagre-BM42HDAG-u6rmS689.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BHGGJNyM.js → diagram-2AECGRRQ-nAisfOUB.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BJezVLGT.js → diagram-5GNKFQAL-CpobRd3l.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-5JzQN_rL.js → diagram-KO2AKTUF-B82W_wPq.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BlPYOgY9.js → diagram-LMA3HP47-ClTkmPW6.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CtMHEaFK.js → diagram-OG6HWLK6-42fbxGPW.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CRNdq2AB.js → erDiagram-TEJ5UH35-8_zQfzlQ.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-De1WwLzu.js → flowDiagram-I6XJVG4X-DQDoN_oV.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-YbWfL5Zn.js → ganttDiagram-6RSMTGT7-Cqd646fB.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DzCN8bmd.js → gitGraphDiagram-PVQCEYII-B6qWs_tS.js} +1 -1
- package/web-shell/assets/{index-CocPvF9Q.js → index-BCeQB_tk.js} +1 -1
- package/web-shell/assets/index-Dv9zBWC9.js +1775 -0
- package/web-shell/assets/{index-BDOGGGaN.css → index-eYjX7fQg.css} +2 -2
- package/web-shell/assets/{infoDiagram-5YYISTIA-DLHoopnE.js → infoDiagram-5YYISTIA-BVyDAHuu.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-XnbU04SS.js → ishikawaDiagram-YF4QCWOH-BBHM904I.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CipPyEeJ.js → journeyDiagram-JHISSGLW-B5Bv5Z_0.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DrSeyE5d.js → kanban-definition-UN3LZRKU-BwSTb0YF.js} +1 -1
- package/web-shell/assets/{linear-LrBKnAo_.js → linear-CHtTm36c.js} +1 -1
- package/web-shell/assets/{mermaid.core-C3U9UVmf.js → mermaid.core-vBCuAUkf.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DqRWgC9H.js → mindmap-definition-RKZ34NQL-CNfKHJrA.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BNXY5p6H.js → pieDiagram-4H26LBE5-DT6QMLhc.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Ccj9QzE4.js → quadrantDiagram-W4KKPZXB-Rb2Dar4i.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CjPM2_gx.js → requirementDiagram-4Y6WPE33-CA9YzPUY.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-C0RsvKbj.js → sankeyDiagram-5OEKKPKP-CJ5SkhJw.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-ClN1P5z7.js → sequenceDiagram-3UESZ5HK-T31AiuVM.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-By0eiB2Y.js → stateDiagram-AJRCARHV-f7Xpd_Xh.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-wucbNzkr.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-g_iaSQgv.js → timeline-definition-PNZ67QCA-dCwsTscr.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-y9ZqJ-TD.js → vennDiagram-CIIHVFJN-SQtBFYkQ.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-BVVfaxpF.js → wardley-L42UT6IY-Dfh4eW0B.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D3ooZKZT.js → wardleyDiagram-YWT4CUSO-BWBKXBsC.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-6GXrY6M1.js → xychartDiagram-2RQKCTM6-DVqzcaxh.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/assets/channel-B40srHOa.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-qumcXQW_.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-qumcXQW_.js +0 -1
- package/web-shell/assets/index-DSH2KrMc.js +0 -1771
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Ds0WlK3F.js +0 -1
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
shouldSuppressRememberErrorDetails,
|
|
27
27
|
workspaceMemoryFailureCode,
|
|
28
28
|
workspaceMemoryFailureDiagnostics
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZYHPUNBD.js";
|
|
30
30
|
import {
|
|
31
31
|
SetupGithubError,
|
|
32
32
|
collectSessionData,
|
|
@@ -38,12 +38,12 @@ import {
|
|
|
38
38
|
toJson,
|
|
39
39
|
toJsonl,
|
|
40
40
|
toMarkdown
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-YPQWPADW.js";
|
|
42
42
|
import {
|
|
43
43
|
OBSERVED_CONTACT_MAX_FRESH_WITHIN_SECONDS,
|
|
44
44
|
ObservedChannelContactStore
|
|
45
45
|
} from "./chunk-OWMAZHIX.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-2KRG55OF.js";
|
|
47
47
|
import {
|
|
48
48
|
escapeAnsiCtrlCodes
|
|
49
49
|
} from "./chunk-4NFY2S7N.js";
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
setRateLimiter,
|
|
108
108
|
unsafeRevealSecret,
|
|
109
109
|
validateMcpRuntimeServerName
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-ZZCWJWTF.js";
|
|
111
111
|
import "./chunk-VGHZT6JR.js";
|
|
112
112
|
import {
|
|
113
113
|
isLoopbackBind,
|
|
@@ -128,14 +128,14 @@ import {
|
|
|
128
128
|
validateWorkspaceSkillName,
|
|
129
129
|
validateWorkspaceVoiceState,
|
|
130
130
|
voiceSettingsScopeToWire
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-55OIMPSA.js";
|
|
132
132
|
import {
|
|
133
133
|
PermissionRulesValidationError,
|
|
134
134
|
buildPermissionSettings,
|
|
135
135
|
isPermissionRuleType,
|
|
136
136
|
normalizePermissionRules,
|
|
137
137
|
readPermissionRuleSet
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-U6Z72YG7.js";
|
|
139
139
|
import {
|
|
140
140
|
assertVoiceBaseUrlNetworkAllowed,
|
|
141
141
|
isStreamingVoiceModel,
|
|
@@ -143,21 +143,21 @@ import {
|
|
|
143
143
|
resolveVoiceTranscriptionConfig,
|
|
144
144
|
sanitizeVoiceErrorMessage,
|
|
145
145
|
transcribeVoiceAudio
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-F64B4CZT.js";
|
|
147
147
|
import {
|
|
148
148
|
isVoiceEnabled,
|
|
149
149
|
isVoiceMode,
|
|
150
150
|
readVoiceModel
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-BK57YU3Q.js";
|
|
152
152
|
import "./chunk-AOHJKPKL.js";
|
|
153
153
|
import {
|
|
154
154
|
createTotalSessionAdmissionController
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-X2UOOG5V.js";
|
|
156
156
|
import {
|
|
157
157
|
WorkspaceGenerationClosedError,
|
|
158
158
|
createSingleWorkspaceRegistry,
|
|
159
159
|
createWorkspaceSessionOwnerIndex
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-QBJYSIQ4.js";
|
|
161
161
|
import "./chunk-OIBUG24X.js";
|
|
162
162
|
import {
|
|
163
163
|
MAX_SESSION_RESTORE_TIMEOUT_MS,
|
|
@@ -166,26 +166,26 @@ import {
|
|
|
166
166
|
} from "./chunk-4JRM2BSM.js";
|
|
167
167
|
import {
|
|
168
168
|
assertValidChannelSecretUpdates
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-QUOFZM2M.js";
|
|
170
170
|
import {
|
|
171
171
|
createDaemonStatusProvider
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-LVMQKGBL.js";
|
|
173
173
|
import "./chunk-NTTBXH7U.js";
|
|
174
|
-
import "./chunk-
|
|
174
|
+
import "./chunk-XL4L56BA.js";
|
|
175
175
|
import "./chunk-3SH53ANB.js";
|
|
176
176
|
import {
|
|
177
177
|
createWorkspaceProvidersStatusProvider
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-VNKZDFWC.js";
|
|
179
179
|
import {
|
|
180
180
|
getAuthTypeFromEnv,
|
|
181
181
|
resolveCliGenerationConfig
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-RE46EJ3D.js";
|
|
183
183
|
import {
|
|
184
184
|
snapshotProcessEnv
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-UH3IULYM.js";
|
|
186
186
|
import {
|
|
187
187
|
createWorkspaceSkillsStatusProvider
|
|
188
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-S3UYEZ5P.js";
|
|
189
189
|
import "./chunk-BGXZBI5B.js";
|
|
190
190
|
import "./chunk-Z4X5MTRT.js";
|
|
191
191
|
import {
|
|
@@ -204,12 +204,12 @@ import {
|
|
|
204
204
|
import {
|
|
205
205
|
evaluateDaemonWorkspaceTrust,
|
|
206
206
|
readDaemonTrustPolicySnapshot
|
|
207
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-VHZGWFFR.js";
|
|
208
208
|
import {
|
|
209
209
|
daemonObservedContactsPath,
|
|
210
210
|
loadChannelsConfig
|
|
211
|
-
} from "./chunk-
|
|
212
|
-
import "./chunk-
|
|
211
|
+
} from "./chunk-7OZLORD6.js";
|
|
212
|
+
import "./chunk-YDXGES66.js";
|
|
213
213
|
import "./chunk-57OAHC2Y.js";
|
|
214
214
|
import {
|
|
215
215
|
parseChannelWebhookConfigLenient
|
|
@@ -228,7 +228,7 @@ import {
|
|
|
228
228
|
SessionArtifactValidationError,
|
|
229
229
|
createAcpSessionBridge,
|
|
230
230
|
parseSessionSource
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-WBLEKO7Y.js";
|
|
232
232
|
import {
|
|
233
233
|
EVENT_SCHEMA_VERSION,
|
|
234
234
|
EventBus,
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
} from "./chunk-MZSJ43WV.js";
|
|
237
237
|
import "./chunk-XCGIMOLN.js";
|
|
238
238
|
import "./chunk-OCPBI7J5.js";
|
|
239
|
-
import "./chunk-
|
|
239
|
+
import "./chunk-EV3LZGGK.js";
|
|
240
240
|
import {
|
|
241
241
|
STATUS_SCHEMA_VERSION,
|
|
242
242
|
SessionRestoreTimeoutError,
|
|
@@ -254,11 +254,11 @@ import {
|
|
|
254
254
|
WorkspaceRegistrationStoreLimitError,
|
|
255
255
|
normalizeWorkspaceDisplayName,
|
|
256
256
|
workspaceRegistrationId
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-AYIDPTXZ.js";
|
|
258
258
|
import {
|
|
259
259
|
REQUESTED_SESSION_ID_META_KEY,
|
|
260
260
|
gradeActiveWorkCoverage
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-W5UC37EE.js";
|
|
262
262
|
import {
|
|
263
263
|
BranchWhilePromptActiveError,
|
|
264
264
|
BridgeChannelQuarantinedError,
|
|
@@ -292,7 +292,7 @@ import {
|
|
|
292
292
|
WorkspaceInitRaceError,
|
|
293
293
|
WorkspaceInitSymlinkError,
|
|
294
294
|
WorkspaceMismatchError
|
|
295
|
-
} from "./chunk-
|
|
295
|
+
} from "./chunk-624NHDGB.js";
|
|
296
296
|
import {
|
|
297
297
|
MAX_WORKSPACE_PATH_LENGTH,
|
|
298
298
|
canonicalizeWorkspace,
|
|
@@ -334,26 +334,26 @@ import {
|
|
|
334
334
|
getWritableScopes,
|
|
335
335
|
loadSettings,
|
|
336
336
|
validateSettingValue
|
|
337
|
-
} from "./chunk-
|
|
338
|
-
import "./chunk-
|
|
337
|
+
} from "./chunk-VXIWAZOB.js";
|
|
338
|
+
import "./chunk-YG7HIT5G.js";
|
|
339
339
|
import "./chunk-RKUWKYED.js";
|
|
340
340
|
import "./chunk-GOXKNSDZ.js";
|
|
341
341
|
import "./chunk-IDS7MSUP.js";
|
|
342
342
|
import {
|
|
343
343
|
detectSystemLanguage,
|
|
344
344
|
resolveLanguageSetting
|
|
345
|
-
} from "./chunk-
|
|
345
|
+
} from "./chunk-U2S2BLXV.js";
|
|
346
346
|
import {
|
|
347
347
|
SUPPORTED_LANGUAGES,
|
|
348
348
|
resolveSupportedLanguage
|
|
349
349
|
} from "./chunk-5EJZE3FP.js";
|
|
350
|
-
import "./chunk-
|
|
350
|
+
import "./chunk-V54U4DJ5.js";
|
|
351
351
|
import "./chunk-VFMASYQA.js";
|
|
352
|
-
import "./chunk-
|
|
352
|
+
import "./chunk-U23YG4FX.js";
|
|
353
353
|
import "./chunk-VJNBRRZG.js";
|
|
354
354
|
import {
|
|
355
355
|
getWorkspaceTrustStatus
|
|
356
|
-
} from "./chunk-
|
|
356
|
+
} from "./chunk-RBO66BYX.js";
|
|
357
357
|
import "./chunk-NPQ5ZKRP.js";
|
|
358
358
|
import {
|
|
359
359
|
isWithinRoot as isWithinRoot2
|
|
@@ -433,7 +433,7 @@ import {
|
|
|
433
433
|
writeWorkspaceContextFile,
|
|
434
434
|
writeWorktreeSession,
|
|
435
435
|
writeWorktreeSessionMarker
|
|
436
|
-
} from "./chunk-
|
|
436
|
+
} from "./chunk-NX2E4GYA.js";
|
|
437
437
|
import "./chunk-GOFAQQZA.js";
|
|
438
438
|
import "./chunk-5M6IDOMF.js";
|
|
439
439
|
import "./chunk-TWPJO254.js";
|
|
@@ -446,7 +446,7 @@ import "./chunk-MVUQRLOH.js";
|
|
|
446
446
|
import "./chunk-XCWO3SMQ.js";
|
|
447
447
|
import "./chunk-7MH4J33A.js";
|
|
448
448
|
import "./chunk-6PVPNMXU.js";
|
|
449
|
-
import "./chunk-
|
|
449
|
+
import "./chunk-2YE6NWAN.js";
|
|
450
450
|
import {
|
|
451
451
|
nextFireTime,
|
|
452
452
|
parseCron
|
|
@@ -470,7 +470,7 @@ import "./chunk-KRXPRVGL.js";
|
|
|
470
470
|
import "./chunk-GM463R2B.js";
|
|
471
471
|
import "./chunk-SEZ556DZ.js";
|
|
472
472
|
import "./chunk-2FRY5CRX.js";
|
|
473
|
-
import "./chunk-
|
|
473
|
+
import "./chunk-QUI267ZP.js";
|
|
474
474
|
import {
|
|
475
475
|
APPROVAL_MODES
|
|
476
476
|
} from "./chunk-WAUGQKUU.js";
|
|
@@ -515,7 +515,7 @@ import "./chunk-4PYCZH2V.js";
|
|
|
515
515
|
import "./chunk-P3QQPMQA.js";
|
|
516
516
|
import "./chunk-SR7RZ4MS.js";
|
|
517
517
|
import "./chunk-M6HMMKVG.js";
|
|
518
|
-
import "./chunk-
|
|
518
|
+
import "./chunk-KM73TBQ4.js";
|
|
519
519
|
import "./chunk-MPHPFVKK.js";
|
|
520
520
|
import "./chunk-AXMWHKXA.js";
|
|
521
521
|
import "./chunk-GLCZKT5V.js";
|
|
@@ -540,7 +540,7 @@ import "./chunk-FVKHVJZQ.js";
|
|
|
540
540
|
import "./chunk-COBO5EBO.js";
|
|
541
541
|
import "./chunk-6ZRFAKXK.js";
|
|
542
542
|
import "./chunk-PYQADEFD.js";
|
|
543
|
-
import "./chunk-
|
|
543
|
+
import "./chunk-RNIXJDUJ.js";
|
|
544
544
|
import "./chunk-F6WFNA7U.js";
|
|
545
545
|
import "./chunk-46UV252V.js";
|
|
546
546
|
import "./chunk-ZBVS26BY.js";
|
|
@@ -1200,11 +1200,11 @@ function decodeTextCursor(cursor) {
|
|
|
1200
1200
|
return { off, size, dev, ino };
|
|
1201
1201
|
}
|
|
1202
1202
|
__name(decodeTextCursor, "decodeTextCursor");
|
|
1203
|
-
function assertCursorMatchesFile(cursor, stats,
|
|
1203
|
+
function assertCursorMatchesFile(cursor, stats, path16) {
|
|
1204
1204
|
if (String(stats.dev) !== cursor.dev || String(stats.ino) !== cursor.ino || stats.size < cursor.size) {
|
|
1205
1205
|
throw new FsError(
|
|
1206
1206
|
"hash_mismatch",
|
|
1207
|
-
`cursor no longer matches the file it was issued for: ${
|
|
1207
|
+
`cursor no longer matches the file it was issued for: ${path16}`,
|
|
1208
1208
|
{ hint: "re-read the file from the beginning to get a fresh cursor" }
|
|
1209
1209
|
);
|
|
1210
1210
|
}
|
|
@@ -8620,6 +8620,7 @@ var MAX_NAME_LENGTH = 256;
|
|
|
8620
8620
|
var DEFAULT_FILE_GLOB_MAX_RESULTS = 5e3;
|
|
8621
8621
|
var MAX_FILE_GLOB_MAX_RESULTS = 5e4;
|
|
8622
8622
|
var MAX_FILE_LINE_LIMIT2 = 2e3;
|
|
8623
|
+
var HTTP_ACP_CONFIG_OPTION_IDS = ["model", "mode"];
|
|
8623
8624
|
var AcpParamError = class extends Error {
|
|
8624
8625
|
static {
|
|
8625
8626
|
__name(this, "AcpParamError");
|
|
@@ -9075,6 +9076,20 @@ var AcpDispatcher = class {
|
|
|
9075
9076
|
__name(this, "AcpDispatcher");
|
|
9076
9077
|
}
|
|
9077
9078
|
agentManager;
|
|
9079
|
+
invalidateSessionLists(archiveStates) {
|
|
9080
|
+
invalidateWorkspaceSessionListCache({
|
|
9081
|
+
runtimeBaseDir: this.sessionRuntimeBaseDir,
|
|
9082
|
+
workspaceCwd: this.boundWorkspace,
|
|
9083
|
+
archiveStates
|
|
9084
|
+
});
|
|
9085
|
+
}
|
|
9086
|
+
async runWithSessionListInvalidation(archiveStates, mutation) {
|
|
9087
|
+
try {
|
|
9088
|
+
return await mutation();
|
|
9089
|
+
} finally {
|
|
9090
|
+
this.invalidateSessionLists(archiveStates);
|
|
9091
|
+
}
|
|
9092
|
+
}
|
|
9078
9093
|
removeOrphanSession(sessionId, removePersistedSession = false, runtime = this.getSessionRuntimeContext()) {
|
|
9079
9094
|
const cleanup = removePersistedSession ? deleteDaemonSessionIfOrphan({
|
|
9080
9095
|
sessionId,
|
|
@@ -9192,15 +9207,22 @@ var AcpDispatcher = class {
|
|
|
9192
9207
|
return { clientId, fromLoopback };
|
|
9193
9208
|
}
|
|
9194
9209
|
/**
|
|
9195
|
-
* The session's ACP-shaped config options
|
|
9196
|
-
* child's own session state.
|
|
9197
|
-
*
|
|
9210
|
+
* The session's ACP-shaped config options supported by this HTTP transport
|
|
9211
|
+
* (currently model and mode), read from the child's own session state.
|
|
9212
|
+
* Every response built from this helper (`session/new`,
|
|
9213
|
+
* `session/load`/`session/resume`, `session/fork`, and the
|
|
9214
|
+
* `session/set_config_option` result) is gated to the ids the transport
|
|
9215
|
+
* can route. Raw-state surfaces (context status, REST load/resume state)
|
|
9216
|
+
* intentionally carry the child's full unfiltered set — they report session
|
|
9217
|
+
* state. Best-effort — `undefined` on error.
|
|
9198
9218
|
*/
|
|
9199
9219
|
async configOptionsFor(sessionId, bridge = this.bridge) {
|
|
9200
9220
|
try {
|
|
9201
9221
|
const ctx = await bridge.getSessionContextStatus(sessionId);
|
|
9202
9222
|
const co = ctx?.state?.configOptions;
|
|
9203
|
-
return Array.isArray(co) ? co
|
|
9223
|
+
return Array.isArray(co) ? co.filter(
|
|
9224
|
+
(option) => isObject(option) && HTTP_ACP_CONFIG_OPTION_IDS.includes(option["id"])
|
|
9225
|
+
) : void 0;
|
|
9204
9226
|
} catch (err) {
|
|
9205
9227
|
writeStderrLine(
|
|
9206
9228
|
`qwen serve: /acp configOptionsFor(${logSafe(sessionId)}) failed: ${logSafe(errMsg(err))}`
|
|
@@ -9828,7 +9850,8 @@ var AcpDispatcher = class {
|
|
|
9828
9850
|
group,
|
|
9829
9851
|
parentSessionId,
|
|
9830
9852
|
...parsedSource
|
|
9831
|
-
}
|
|
9853
|
+
},
|
|
9854
|
+
{ runtimeBaseDir: this.sessionRuntimeBaseDir }
|
|
9832
9855
|
);
|
|
9833
9856
|
this.replyConn(conn, id, {
|
|
9834
9857
|
sessions: result.sessions.map((s) => ({
|
|
@@ -9912,6 +9935,7 @@ var AcpDispatcher = class {
|
|
|
9912
9935
|
throw err;
|
|
9913
9936
|
} finally {
|
|
9914
9937
|
conn.closingSessions.delete(sessionId);
|
|
9938
|
+
this.invalidateSessionLists(["active"]);
|
|
9915
9939
|
}
|
|
9916
9940
|
closeLocalSessionStream();
|
|
9917
9941
|
this.replyConn(conn, id, {});
|
|
@@ -10267,7 +10291,7 @@ var AcpDispatcher = class {
|
|
|
10267
10291
|
error(
|
|
10268
10292
|
id,
|
|
10269
10293
|
RPC.INVALID_PARAMS,
|
|
10270
|
-
`
|
|
10294
|
+
`ConfigId not supported by this transport: ${configId} (supported: ${HTTP_ACP_CONFIG_OPTION_IDS.join(", ")})`
|
|
10271
10295
|
)
|
|
10272
10296
|
);
|
|
10273
10297
|
}
|
|
@@ -10388,11 +10412,16 @@ var AcpDispatcher = class {
|
|
|
10388
10412
|
const sessionId = String(params["sessionId"] ?? "");
|
|
10389
10413
|
await this.withMutableOwned(conn, sessionId, id, async () => {
|
|
10390
10414
|
const metadata = isObject(params["metadata"]) ? params["metadata"] : {};
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10415
|
+
let result;
|
|
10416
|
+
try {
|
|
10417
|
+
result = this.bridge.updateSessionMetadata(
|
|
10418
|
+
sessionId,
|
|
10419
|
+
metadata,
|
|
10420
|
+
this.sessionCtx(conn, sessionId, loopback)
|
|
10421
|
+
);
|
|
10422
|
+
} finally {
|
|
10423
|
+
this.invalidateSessionLists(["active"]);
|
|
10424
|
+
}
|
|
10396
10425
|
this.replyConn(conn, id, result);
|
|
10397
10426
|
});
|
|
10398
10427
|
return;
|
|
@@ -11914,19 +11943,22 @@ var AcpDispatcher = class {
|
|
|
11914
11943
|
const ids = this.parseSessionIds(params);
|
|
11915
11944
|
if (this.rejectActiveLiveSessionMutation(conn, id, ids)) return;
|
|
11916
11945
|
const svc = new SessionService(this.boundWorkspace);
|
|
11917
|
-
const result = await
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11946
|
+
const result = await this.runWithSessionListInvalidation(
|
|
11947
|
+
["active", "archived"],
|
|
11948
|
+
() => deleteDaemonSessions({
|
|
11949
|
+
sessionIds: ids,
|
|
11950
|
+
service: svc,
|
|
11951
|
+
bridge: this.bridge,
|
|
11952
|
+
coordinator: this.archiveCoordinator,
|
|
11953
|
+
onError: /* @__PURE__ */ __name(({ phase, sessionId, error: error2 }) => {
|
|
11954
|
+
const safeSessionId = logSafe(sessionId.slice(0, 8));
|
|
11955
|
+
const safeMessage = logSafe(error2);
|
|
11956
|
+
writeStderrLine(
|
|
11957
|
+
`qwen serve: /acp sessions/delete ${phase}Session(${safeSessionId}) failed: ${safeMessage}`
|
|
11958
|
+
);
|
|
11959
|
+
}, "onError")
|
|
11960
|
+
})
|
|
11961
|
+
);
|
|
11930
11962
|
this.replyConn(conn, id, result);
|
|
11931
11963
|
return;
|
|
11932
11964
|
}
|
|
@@ -11936,12 +11968,15 @@ var AcpDispatcher = class {
|
|
|
11936
11968
|
const svc = new SessionService(this.boundWorkspace, {
|
|
11937
11969
|
onWarning: logSessionArchiveWarning
|
|
11938
11970
|
});
|
|
11939
|
-
const result = await
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11971
|
+
const result = await this.runWithSessionListInvalidation(
|
|
11972
|
+
["active", "archived"],
|
|
11973
|
+
() => archiveDaemonSessions({
|
|
11974
|
+
sessionIds: ids,
|
|
11975
|
+
service: svc,
|
|
11976
|
+
bridge: this.bridge,
|
|
11977
|
+
coordinator: this.archiveCoordinator
|
|
11978
|
+
})
|
|
11979
|
+
);
|
|
11945
11980
|
this.replyConn(conn, id, {
|
|
11946
11981
|
archived: result.archived,
|
|
11947
11982
|
alreadyArchived: result.alreadyArchived,
|
|
@@ -11955,11 +11990,14 @@ var AcpDispatcher = class {
|
|
|
11955
11990
|
const svc = new SessionService(this.boundWorkspace, {
|
|
11956
11991
|
onWarning: logSessionArchiveWarning
|
|
11957
11992
|
});
|
|
11958
|
-
const result = await
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11993
|
+
const result = await this.runWithSessionListInvalidation(
|
|
11994
|
+
["active", "archived"],
|
|
11995
|
+
() => unarchiveDaemonSessions({
|
|
11996
|
+
sessionIds: ids,
|
|
11997
|
+
service: svc,
|
|
11998
|
+
coordinator: this.archiveCoordinator
|
|
11999
|
+
})
|
|
12000
|
+
);
|
|
11963
12001
|
this.replyConn(conn, id, {
|
|
11964
12002
|
unarchived: result.unarchived,
|
|
11965
12003
|
alreadyActive: result.alreadyActive,
|
|
@@ -14532,7 +14570,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14532
14570
|
const archiveCoordinator = opts.archiveCoordinator ?? new SessionArchiveCoordinator();
|
|
14533
14571
|
const requestedSessionIdAdmission = opts.requestedSessionIdAdmission;
|
|
14534
14572
|
const getPrimaryEnv = /* @__PURE__ */ __name(() => opts.workspaceRegistry ? runtimeEffectiveEnv(opts.workspaceRegistry.primary, daemonEnv) : daemonEnv, "getPrimaryEnv");
|
|
14535
|
-
const
|
|
14573
|
+
const path16 = opts.path ?? "/acp";
|
|
14536
14574
|
const dispatcherRef = {};
|
|
14537
14575
|
let disposed = false;
|
|
14538
14576
|
const rejectIfDisposed = /* @__PURE__ */ __name((res) => {
|
|
@@ -14716,7 +14754,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14716
14754
|
const primaryMount = {
|
|
14717
14755
|
primary: true,
|
|
14718
14756
|
workspaceCwd: opts.boundWorkspace,
|
|
14719
|
-
routeLabel: logSafe(
|
|
14757
|
+
routeLabel: logSafe(path16),
|
|
14720
14758
|
rateLimitScope: opts.workspaceRegistry?.primary.workspaceId ?? "primary",
|
|
14721
14759
|
registry,
|
|
14722
14760
|
dispatcher,
|
|
@@ -14870,7 +14908,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14870
14908
|
});
|
|
14871
14909
|
}, "handleAcpPost");
|
|
14872
14910
|
app.post(
|
|
14873
|
-
|
|
14911
|
+
path16,
|
|
14874
14912
|
(req, res) => handleAcpPost(primaryMount, req, res)
|
|
14875
14913
|
);
|
|
14876
14914
|
const handleAcpGet = /* @__PURE__ */ __name((mount, req, res) => {
|
|
@@ -14969,10 +15007,10 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14969
15007
|
onPumpSettled();
|
|
14970
15008
|
});
|
|
14971
15009
|
}, "handleAcpGet");
|
|
14972
|
-
app.get(
|
|
15010
|
+
app.get(path16, (req, res) => {
|
|
14973
15011
|
handleAcpGet(primaryMount, req, res);
|
|
14974
15012
|
});
|
|
14975
|
-
app.delete(
|
|
15013
|
+
app.delete(path16, (req, res) => {
|
|
14976
15014
|
handleAcpDelete(primaryMount, req, res);
|
|
14977
15015
|
});
|
|
14978
15016
|
const createSecondaryAcpMount = /* @__PURE__ */ __name((rt) => {
|
|
@@ -15181,7 +15219,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
15181
15219
|
const isPluralAcpShape = pluralRawSelector !== null;
|
|
15182
15220
|
const pluralVoiceRawSelector = opts.workspaceVoiceConnection ? pluralWorkspaceRawSelector(rawPath, PLURAL_VOICE_WS_SUFFIX) : null;
|
|
15183
15221
|
const isPluralVoiceShape = pluralVoiceRawSelector !== null;
|
|
15184
|
-
if (rawPath !==
|
|
15222
|
+
if (rawPath !== path16 && !isCdpPath && !extraRoute && !isPluralAcpShape && !isPluralVoiceShape) {
|
|
15185
15223
|
logReject(`unknown-path ${logSafe(rawPath)}`);
|
|
15186
15224
|
socket.destroy();
|
|
15187
15225
|
return;
|
|
@@ -15719,7 +15757,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
15719
15757
|
});
|
|
15720
15758
|
}, "upgradeListener");
|
|
15721
15759
|
httpServer.on("upgrade", upgradeListener);
|
|
15722
|
-
writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${
|
|
15760
|
+
writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${path16}`);
|
|
15723
15761
|
}
|
|
15724
15762
|
__name(setupWebSocket, "setupWebSocket");
|
|
15725
15763
|
return {
|
|
@@ -20404,6 +20442,12 @@ var legacySessionTelemetryRoutes = [
|
|
|
20404
20442
|
attribution: "handler_resolved",
|
|
20405
20443
|
route: "DELETE /session/:id/mid-turn-messages/:messageId"
|
|
20406
20444
|
},
|
|
20445
|
+
{
|
|
20446
|
+
method: "GET",
|
|
20447
|
+
path: "/session/:id/mid-turn-messages",
|
|
20448
|
+
attribution: "handler_resolved",
|
|
20449
|
+
route: "GET /session/:id/mid-turn-messages"
|
|
20450
|
+
},
|
|
20407
20451
|
{
|
|
20408
20452
|
method: "GET",
|
|
20409
20453
|
path: "/session/:id/pending-prompts",
|
|
@@ -20481,8 +20525,8 @@ function decodePathSegment(value) {
|
|
|
20481
20525
|
}
|
|
20482
20526
|
__name(decodePathSegment, "decodePathSegment");
|
|
20483
20527
|
function matchLegacySessionTelemetryRoute(method, requestPath) {
|
|
20484
|
-
const
|
|
20485
|
-
const requestSegments =
|
|
20528
|
+
const path16 = requestPath.length > 1 && requestPath.endsWith("/") ? requestPath.slice(0, -1) : requestPath;
|
|
20529
|
+
const requestSegments = path16.split("/").slice(1);
|
|
20486
20530
|
const prefix = requestSegments[0]?.toLowerCase();
|
|
20487
20531
|
if (prefix !== "session" && prefix !== "sessions" && prefix !== "permission") {
|
|
20488
20532
|
return void 0;
|
|
@@ -20534,23 +20578,23 @@ __name(setDaemonTelemetryWorkspace, "setDaemonTelemetryWorkspace");
|
|
|
20534
20578
|
function resolveDaemonTelemetryRoute(req) {
|
|
20535
20579
|
const legacyRoute = matchLegacySessionTelemetryRoute(req.method, req.path);
|
|
20536
20580
|
if (legacyRoute) return legacyRoute;
|
|
20537
|
-
const
|
|
20538
|
-
if (req.method === "GET" &&
|
|
20581
|
+
const path16 = req.path.replace(/\/$/, "") || "/";
|
|
20582
|
+
if (req.method === "GET" && path16 === "/daemon/status") {
|
|
20539
20583
|
return { route: "GET /daemon/status" };
|
|
20540
20584
|
}
|
|
20541
|
-
if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(
|
|
20585
|
+
if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(path16)) {
|
|
20542
20586
|
return { route: "GET /workspace/:id/sessions" };
|
|
20543
20587
|
}
|
|
20544
|
-
if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(
|
|
20588
|
+
if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(path16)) {
|
|
20545
20589
|
return { route: "GET /workspace/:id/sessions" };
|
|
20546
20590
|
}
|
|
20547
|
-
if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(
|
|
20591
|
+
if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(path16)) {
|
|
20548
20592
|
return { route: "GET /workspace/:id/session-info" };
|
|
20549
20593
|
}
|
|
20550
|
-
if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(
|
|
20594
|
+
if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(path16)) {
|
|
20551
20595
|
return { route: "GET /workspace/:id/session-info" };
|
|
20552
20596
|
}
|
|
20553
|
-
const workspaceTranscript =
|
|
20597
|
+
const workspaceTranscript = path16.match(
|
|
20554
20598
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/transcript$/
|
|
20555
20599
|
);
|
|
20556
20600
|
if (workspaceTranscript?.[1] && req.method === "GET") {
|
|
@@ -20559,7 +20603,7 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20559
20603
|
sessionId: decodePathSegment(workspaceTranscript[1])
|
|
20560
20604
|
};
|
|
20561
20605
|
}
|
|
20562
|
-
const workspaceExport =
|
|
20606
|
+
const workspaceExport = path16.match(
|
|
20563
20607
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/export$/
|
|
20564
20608
|
);
|
|
20565
20609
|
if (workspaceExport?.[1] && req.method === "GET") {
|
|
@@ -20568,7 +20612,7 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20568
20612
|
sessionId: decodePathSegment(workspaceExport[1])
|
|
20569
20613
|
};
|
|
20570
20614
|
}
|
|
20571
|
-
const workspaceArchivedExport =
|
|
20615
|
+
const workspaceArchivedExport = path16.match(
|
|
20572
20616
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/archive\/export$/
|
|
20573
20617
|
);
|
|
20574
20618
|
if (workspaceArchivedExport?.[1] && req.method === "GET") {
|
|
@@ -20578,8 +20622,8 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20578
20622
|
};
|
|
20579
20623
|
}
|
|
20580
20624
|
const pluralWorkspacePrefix = /^\/workspaces\/[^/]+/;
|
|
20581
|
-
if (pluralWorkspacePrefix.test(
|
|
20582
|
-
const suffix =
|
|
20625
|
+
if (pluralWorkspacePrefix.test(path16)) {
|
|
20626
|
+
const suffix = path16.replace(pluralWorkspacePrefix, "/workspace");
|
|
20583
20627
|
if (req.method === "GET") {
|
|
20584
20628
|
if (suffix === "/workspace/mcp" || suffix === "/workspace/skills" || suffix === "/workspace/tools" || suffix === "/workspace/providers" || suffix === "/workspace/env" || suffix === "/workspace/preflight" || suffix === "/workspace/hooks" || suffix === "/workspace/settings" || suffix === "/workspace/voice" || suffix === "/workspace/permissions" || suffix === "/workspace/trust" || suffix === "/workspace/memory" || suffix === "/workspace/agents") {
|
|
20585
20629
|
return { route: `GET ${suffix}` };
|
|
@@ -20638,58 +20682,58 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20638
20682
|
return { route: "DELETE /workspace/session-groups/:groupId" };
|
|
20639
20683
|
}
|
|
20640
20684
|
}
|
|
20641
|
-
if (req.method === "POST" &&
|
|
20685
|
+
if (req.method === "POST" && path16 === "/workspace/init") {
|
|
20642
20686
|
return { route: "POST /workspace/init" };
|
|
20643
20687
|
}
|
|
20644
|
-
if (req.method === "POST" &&
|
|
20688
|
+
if (req.method === "POST" && path16 === "/workspace/setup-github") {
|
|
20645
20689
|
return { route: "POST /workspace/setup-github" };
|
|
20646
20690
|
}
|
|
20647
|
-
if (req.method === "POST" &&
|
|
20691
|
+
if (req.method === "POST" && path16 === "/workspace/reload") {
|
|
20648
20692
|
return { route: "POST /workspace/reload" };
|
|
20649
20693
|
}
|
|
20650
|
-
const mcpRestart =
|
|
20694
|
+
const mcpRestart = path16.match(/^\/workspace\/mcp\/([^/]+)\/restart$/);
|
|
20651
20695
|
if (mcpRestart?.[1] && req.method === "POST") {
|
|
20652
20696
|
return { route: "POST /workspace/mcp/:server/restart" };
|
|
20653
20697
|
}
|
|
20654
|
-
if (req.method === "POST" &&
|
|
20698
|
+
if (req.method === "POST" && path16 === "/workspace/mcp/servers") {
|
|
20655
20699
|
return { route: "POST /workspace/mcp/servers" };
|
|
20656
20700
|
}
|
|
20657
|
-
const mcpDelete =
|
|
20701
|
+
const mcpDelete = path16.match(/^\/workspace\/mcp\/servers\/([^/]+)$/);
|
|
20658
20702
|
if (mcpDelete?.[1] && req.method === "DELETE") {
|
|
20659
20703
|
return { route: "DELETE /workspace/mcp/servers/:name" };
|
|
20660
20704
|
}
|
|
20661
|
-
if (req.method === "POST" &&
|
|
20705
|
+
if (req.method === "POST" && path16 === "/workspace/auth/device-flow") {
|
|
20662
20706
|
return { route: "POST /workspace/auth/device-flow" };
|
|
20663
20707
|
}
|
|
20664
|
-
const deviceFlowDelete =
|
|
20708
|
+
const deviceFlowDelete = path16.match(
|
|
20665
20709
|
/^\/workspace\/auth\/device-flow\/([^/]+)$/
|
|
20666
20710
|
);
|
|
20667
20711
|
if (deviceFlowDelete?.[1] && req.method === "DELETE") {
|
|
20668
20712
|
return { route: "DELETE /workspace/auth/device-flow/:id" };
|
|
20669
20713
|
}
|
|
20670
|
-
const toolEnable =
|
|
20714
|
+
const toolEnable = path16.match(/^\/workspace\/tools\/([^/]+)\/enable$/);
|
|
20671
20715
|
if (toolEnable?.[1] && req.method === "POST") {
|
|
20672
20716
|
return { route: "POST /workspace/tools/:name/enable" };
|
|
20673
20717
|
}
|
|
20674
|
-
if (
|
|
20718
|
+
if (path16 === "/workspace/settings") {
|
|
20675
20719
|
if (req.method === "GET") return { route: "GET /workspace/settings" };
|
|
20676
20720
|
if (req.method === "POST") return { route: "POST /workspace/settings" };
|
|
20677
20721
|
}
|
|
20678
|
-
if (
|
|
20722
|
+
if (path16 === "/workspace/permissions") {
|
|
20679
20723
|
if (req.method === "GET") return { route: "GET /workspace/permissions" };
|
|
20680
20724
|
if (req.method === "POST") return { route: "POST /workspace/permissions" };
|
|
20681
20725
|
}
|
|
20682
|
-
if (
|
|
20726
|
+
if (path16 === "/workspace/trust") {
|
|
20683
20727
|
if (req.method === "GET") return { route: "GET /workspace/trust" };
|
|
20684
20728
|
}
|
|
20685
|
-
if (req.method === "POST" &&
|
|
20729
|
+
if (req.method === "POST" && path16 === "/workspace/trust/request") {
|
|
20686
20730
|
return { route: "POST /workspace/trust/request" };
|
|
20687
20731
|
}
|
|
20688
|
-
if (
|
|
20732
|
+
if (path16 === "/workspace/voice") {
|
|
20689
20733
|
if (req.method === "GET") return { route: "GET /workspace/voice" };
|
|
20690
20734
|
if (req.method === "POST") return { route: "POST /workspace/voice" };
|
|
20691
20735
|
}
|
|
20692
|
-
if (req.method === "POST" &&
|
|
20736
|
+
if (req.method === "POST" && path16 === "/workspace/voice/transcribe") {
|
|
20693
20737
|
return { route: "POST /workspace/voice/transcribe" };
|
|
20694
20738
|
}
|
|
20695
20739
|
return void 0;
|
|
@@ -20958,7 +21002,7 @@ __name(registerPermissionRoutes, "registerPermissionRoutes");
|
|
|
20958
21002
|
init_esbuild_shims();
|
|
20959
21003
|
import * as crypto3 from "node:crypto";
|
|
20960
21004
|
import * as fs6 from "node:fs";
|
|
20961
|
-
import * as
|
|
21005
|
+
import * as path11 from "node:path";
|
|
20962
21006
|
|
|
20963
21007
|
// packages/cli/src/serve/server/prompt-deadline.ts
|
|
20964
21008
|
init_esbuild_shims();
|
|
@@ -20975,9 +21019,151 @@ __name(resolvePromptDeadlineMs, "resolvePromptDeadlineMs");
|
|
|
20975
21019
|
|
|
20976
21020
|
// packages/cli/src/serve/server/session-list.ts
|
|
20977
21021
|
init_esbuild_shims();
|
|
21022
|
+
|
|
21023
|
+
// packages/cli/src/serve/server/persisted-session-list-cache.ts
|
|
21024
|
+
init_esbuild_shims();
|
|
21025
|
+
import path10 from "node:path";
|
|
21026
|
+
var PersistedSessionListCache = class {
|
|
21027
|
+
constructor(ttlMs, maxRetainedSummaries) {
|
|
21028
|
+
this.ttlMs = ttlMs;
|
|
21029
|
+
this.maxRetainedSummaries = maxRetainedSummaries;
|
|
21030
|
+
}
|
|
21031
|
+
static {
|
|
21032
|
+
__name(this, "PersistedSessionListCache");
|
|
21033
|
+
}
|
|
21034
|
+
slots = /* @__PURE__ */ new Map();
|
|
21035
|
+
retainedSummaries = 0;
|
|
21036
|
+
lookup(scope, loader) {
|
|
21037
|
+
const key = this.key(scope);
|
|
21038
|
+
let slot = this.slots.get(key);
|
|
21039
|
+
if (!slot) {
|
|
21040
|
+
slot = { generation: 0 };
|
|
21041
|
+
this.slots.set(key, slot);
|
|
21042
|
+
}
|
|
21043
|
+
const now = Date.now();
|
|
21044
|
+
if (slot.value) {
|
|
21045
|
+
const cacheAgeMs = Math.max(0, now - slot.value.completedAt);
|
|
21046
|
+
if (cacheAgeMs < this.ttlMs) {
|
|
21047
|
+
return {
|
|
21048
|
+
status: "cache_hit",
|
|
21049
|
+
promise: Promise.resolve(slot.value.snapshot),
|
|
21050
|
+
cacheAgeMs
|
|
21051
|
+
};
|
|
21052
|
+
}
|
|
21053
|
+
this.removeValue(slot);
|
|
21054
|
+
}
|
|
21055
|
+
if (slot.inFlight !== void 0 && slot.inFlight.generation === slot.generation) {
|
|
21056
|
+
return {
|
|
21057
|
+
status: "single_flight",
|
|
21058
|
+
promise: slot.inFlight.promise
|
|
21059
|
+
};
|
|
21060
|
+
}
|
|
21061
|
+
const generation = slot.generation;
|
|
21062
|
+
const managed = Promise.resolve().then(loader).then(
|
|
21063
|
+
(snapshot) => {
|
|
21064
|
+
const current = this.slots.get(key);
|
|
21065
|
+
if (current === slot && current.inFlight?.promise === managed) {
|
|
21066
|
+
current.inFlight = void 0;
|
|
21067
|
+
if (current.generation === generation && snapshot.sessions.length <= this.maxRetainedSummaries) {
|
|
21068
|
+
this.installValue(key, current, snapshot);
|
|
21069
|
+
} else if (current.value === void 0) {
|
|
21070
|
+
this.slots.delete(key);
|
|
21071
|
+
}
|
|
21072
|
+
}
|
|
21073
|
+
return snapshot;
|
|
21074
|
+
},
|
|
21075
|
+
(error2) => {
|
|
21076
|
+
const current = this.slots.get(key);
|
|
21077
|
+
if (current === slot && current.inFlight?.promise === managed) {
|
|
21078
|
+
current.inFlight = void 0;
|
|
21079
|
+
if (current.value === void 0) this.slots.delete(key);
|
|
21080
|
+
}
|
|
21081
|
+
throw error2;
|
|
21082
|
+
}
|
|
21083
|
+
);
|
|
21084
|
+
slot.inFlight = { generation, promise: managed };
|
|
21085
|
+
return { status: "scan", promise: managed };
|
|
21086
|
+
}
|
|
21087
|
+
invalidate(scope) {
|
|
21088
|
+
const key = this.key(scope);
|
|
21089
|
+
const slot = this.slots.get(key);
|
|
21090
|
+
if (!slot) return;
|
|
21091
|
+
slot.generation += 1;
|
|
21092
|
+
this.removeValue(slot);
|
|
21093
|
+
if (slot.inFlight === void 0) this.slots.delete(key);
|
|
21094
|
+
}
|
|
21095
|
+
clear() {
|
|
21096
|
+
for (const slot of this.slots.values()) {
|
|
21097
|
+
if (slot.value) clearTimeout(slot.value.expiryTimer);
|
|
21098
|
+
}
|
|
21099
|
+
this.slots.clear();
|
|
21100
|
+
this.retainedSummaries = 0;
|
|
21101
|
+
}
|
|
21102
|
+
installValue(key, slot, snapshot) {
|
|
21103
|
+
const completedAt = Date.now();
|
|
21104
|
+
this.evictFor(snapshot.sessions.length);
|
|
21105
|
+
const remainingTtlMs = Math.max(0, this.ttlMs - (Date.now() - completedAt));
|
|
21106
|
+
const expiryTimer = setTimeout(() => {
|
|
21107
|
+
const current = this.slots.get(key);
|
|
21108
|
+
if (current !== slot || current.value?.expiryTimer !== expiryTimer) {
|
|
21109
|
+
return;
|
|
21110
|
+
}
|
|
21111
|
+
this.removeValue(current);
|
|
21112
|
+
if (current.inFlight === void 0) this.slots.delete(key);
|
|
21113
|
+
}, remainingTtlMs);
|
|
21114
|
+
if (typeof expiryTimer.unref === "function") expiryTimer.unref();
|
|
21115
|
+
const value = { snapshot, completedAt, expiryTimer };
|
|
21116
|
+
slot.value = value;
|
|
21117
|
+
this.retainedSummaries += snapshot.sessions.length;
|
|
21118
|
+
}
|
|
21119
|
+
evictFor(incomingSummaries) {
|
|
21120
|
+
while (this.retainedSummaries + incomingSummaries > this.maxRetainedSummaries) {
|
|
21121
|
+
let oldest;
|
|
21122
|
+
for (const [key, slot] of this.slots) {
|
|
21123
|
+
if (slot.value && (oldest === void 0 || slot.value.completedAt < oldest.completedAt)) {
|
|
21124
|
+
oldest = { key, slot, completedAt: slot.value.completedAt };
|
|
21125
|
+
}
|
|
21126
|
+
}
|
|
21127
|
+
if (!oldest) return;
|
|
21128
|
+
this.removeValue(oldest.slot);
|
|
21129
|
+
if (oldest.slot.inFlight === void 0) this.slots.delete(oldest.key);
|
|
21130
|
+
}
|
|
21131
|
+
}
|
|
21132
|
+
removeValue(slot) {
|
|
21133
|
+
const value = slot.value;
|
|
21134
|
+
if (!value) return;
|
|
21135
|
+
clearTimeout(value.expiryTimer);
|
|
21136
|
+
this.retainedSummaries -= value.snapshot.sessions.length;
|
|
21137
|
+
slot.value = void 0;
|
|
21138
|
+
}
|
|
21139
|
+
key(scope) {
|
|
21140
|
+
return JSON.stringify([
|
|
21141
|
+
path10.resolve(scope.runtimeBaseDir),
|
|
21142
|
+
scope.workspaceCwd,
|
|
21143
|
+
scope.archiveState
|
|
21144
|
+
]);
|
|
21145
|
+
}
|
|
21146
|
+
};
|
|
21147
|
+
|
|
21148
|
+
// packages/cli/src/serve/server/session-list.ts
|
|
20978
21149
|
var DEFAULT_SESSION_PAGE_SIZE = 20;
|
|
20979
21150
|
var MAX_SESSION_PAGE_SIZE = 100;
|
|
20980
21151
|
var MAX_ORGANIZED_SESSIONS = 5e4;
|
|
21152
|
+
var PERSISTED_SESSION_LIST_CACHE_TTL_MS = 2e3;
|
|
21153
|
+
var persistedSessionListCache = new PersistedSessionListCache(
|
|
21154
|
+
PERSISTED_SESSION_LIST_CACHE_TTL_MS,
|
|
21155
|
+
MAX_ORGANIZED_SESSIONS
|
|
21156
|
+
);
|
|
21157
|
+
function invalidateWorkspaceSessionListCache(options) {
|
|
21158
|
+
for (const archiveState of options.archiveStates) {
|
|
21159
|
+
persistedSessionListCache.invalidate({
|
|
21160
|
+
runtimeBaseDir: options.runtimeBaseDir,
|
|
21161
|
+
workspaceCwd: options.workspaceCwd,
|
|
21162
|
+
archiveState
|
|
21163
|
+
});
|
|
21164
|
+
}
|
|
21165
|
+
}
|
|
21166
|
+
__name(invalidateWorkspaceSessionListCache, "invalidateWorkspaceSessionListCache");
|
|
20981
21167
|
var InvalidCursorError = class extends Error {
|
|
20982
21168
|
static {
|
|
20983
21169
|
__name(this, "InvalidCursorError");
|
|
@@ -21081,11 +21267,14 @@ async function enrichWorktreeSidecars(bySessionId, sessionService, archiveState
|
|
|
21081
21267
|
)
|
|
21082
21268
|
).catch(() => null);
|
|
21083
21269
|
if (sidecar) {
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21088
|
-
|
|
21270
|
+
bySessionId.set(sessionId, {
|
|
21271
|
+
...summary,
|
|
21272
|
+
worktree: {
|
|
21273
|
+
slug: sidecar.slug,
|
|
21274
|
+
path: sidecar.worktreePath,
|
|
21275
|
+
branch: sidecar.worktreeBranch
|
|
21276
|
+
}
|
|
21277
|
+
});
|
|
21089
21278
|
}
|
|
21090
21279
|
}
|
|
21091
21280
|
}
|
|
@@ -21124,11 +21313,21 @@ function mergeLiveSessionSummary(existing, live) {
|
|
|
21124
21313
|
};
|
|
21125
21314
|
}
|
|
21126
21315
|
__name(mergeLiveSessionSummary, "mergeLiveSessionSummary");
|
|
21127
|
-
|
|
21316
|
+
function clonePersistedSummary(session) {
|
|
21317
|
+
return {
|
|
21318
|
+
...session,
|
|
21319
|
+
...session.worktree ? { worktree: { ...session.worktree } } : {}
|
|
21320
|
+
};
|
|
21321
|
+
}
|
|
21322
|
+
__name(clonePersistedSummary, "clonePersistedSummary");
|
|
21323
|
+
async function loadAllPersistedSummaries(sessionService, archiveState) {
|
|
21324
|
+
const scanStartedAt = performance.now();
|
|
21128
21325
|
const sessions = [];
|
|
21129
21326
|
let truncated = false;
|
|
21327
|
+
let scanPages = 0;
|
|
21130
21328
|
let cursor;
|
|
21131
21329
|
do {
|
|
21330
|
+
scanPages += 1;
|
|
21132
21331
|
const page = await sessionService.listSessions({
|
|
21133
21332
|
cursor,
|
|
21134
21333
|
size: 1e4,
|
|
@@ -21148,7 +21347,61 @@ async function listAllPersistedSummaries(sessionService, archiveState) {
|
|
|
21148
21347
|
break;
|
|
21149
21348
|
}
|
|
21150
21349
|
} while (cursor !== void 0);
|
|
21151
|
-
|
|
21350
|
+
const bySessionId = new Map(
|
|
21351
|
+
sessions.map((session) => [session.sessionId, session])
|
|
21352
|
+
);
|
|
21353
|
+
await enrichWorktreeSidecars(bySessionId, sessionService, archiveState);
|
|
21354
|
+
return {
|
|
21355
|
+
sessions: [...bySessionId.values()],
|
|
21356
|
+
truncated,
|
|
21357
|
+
scanPages,
|
|
21358
|
+
scanDurationMs: Math.max(0, performance.now() - scanStartedAt)
|
|
21359
|
+
};
|
|
21360
|
+
}
|
|
21361
|
+
__name(loadAllPersistedSummaries, "loadAllPersistedSummaries");
|
|
21362
|
+
async function listAllPersistedSummaries(sessionService, workspaceCwd, archiveState, runtimeBaseDir, queryKind) {
|
|
21363
|
+
const lookup = persistedSessionListCache.lookup(
|
|
21364
|
+
{ runtimeBaseDir, workspaceCwd, archiveState },
|
|
21365
|
+
() => loadAllPersistedSummaries(sessionService, archiveState)
|
|
21366
|
+
);
|
|
21367
|
+
addDaemonRequestAttribute(
|
|
21368
|
+
"qwen-code.daemon.session_list.cache_status",
|
|
21369
|
+
lookup.status
|
|
21370
|
+
);
|
|
21371
|
+
addDaemonRequestAttribute(
|
|
21372
|
+
"qwen-code.daemon.session_list.archive_state",
|
|
21373
|
+
archiveState
|
|
21374
|
+
);
|
|
21375
|
+
addDaemonRequestAttribute(
|
|
21376
|
+
"qwen-code.daemon.session_list.query_kind",
|
|
21377
|
+
queryKind
|
|
21378
|
+
);
|
|
21379
|
+
if (lookup.cacheAgeMs !== void 0) {
|
|
21380
|
+
addDaemonRequestAttribute(
|
|
21381
|
+
"qwen-code.daemon.session_list.cache_age_ms",
|
|
21382
|
+
lookup.cacheAgeMs
|
|
21383
|
+
);
|
|
21384
|
+
}
|
|
21385
|
+
const snapshot = await lookup.promise;
|
|
21386
|
+
addDaemonRequestAttribute(
|
|
21387
|
+
"qwen-code.daemon.session_list.persisted_sessions",
|
|
21388
|
+
snapshot.sessions.length
|
|
21389
|
+
);
|
|
21390
|
+
addDaemonRequestAttribute(
|
|
21391
|
+
"qwen-code.daemon.session_list.scan_pages",
|
|
21392
|
+
snapshot.scanPages
|
|
21393
|
+
);
|
|
21394
|
+
addDaemonRequestAttribute(
|
|
21395
|
+
"qwen-code.daemon.session_list.truncated",
|
|
21396
|
+
snapshot.truncated
|
|
21397
|
+
);
|
|
21398
|
+
if (lookup.status === "scan") {
|
|
21399
|
+
addDaemonRequestAttribute(
|
|
21400
|
+
"qwen-code.daemon.session_list.scan_duration_ms",
|
|
21401
|
+
snapshot.scanDurationMs
|
|
21402
|
+
);
|
|
21403
|
+
}
|
|
21404
|
+
return snapshot;
|
|
21152
21405
|
}
|
|
21153
21406
|
__name(listAllPersistedSummaries, "listAllPersistedSummaries");
|
|
21154
21407
|
function getSummaryActivityTime(session) {
|
|
@@ -21227,15 +21480,20 @@ async function listOrganizedWorkspaceSessionsForResponse(bridge, workspaceCwd, o
|
|
|
21227
21480
|
const bySessionId = /* @__PURE__ */ new Map();
|
|
21228
21481
|
const persisted = await listAllPersistedSummaries(
|
|
21229
21482
|
sessionService,
|
|
21230
|
-
|
|
21483
|
+
workspaceCwd,
|
|
21484
|
+
archiveState,
|
|
21485
|
+
readOptions.runtimeBaseDir,
|
|
21486
|
+
"organized"
|
|
21231
21487
|
);
|
|
21232
21488
|
for (const session of persisted.sessions) {
|
|
21233
21489
|
bySessionId.set(
|
|
21234
21490
|
session.sessionId,
|
|
21235
|
-
applyOrganization(
|
|
21491
|
+
applyOrganization(
|
|
21492
|
+
clonePersistedSummary(session),
|
|
21493
|
+
snapshot.sessions.get(session.sessionId)
|
|
21494
|
+
)
|
|
21236
21495
|
);
|
|
21237
21496
|
}
|
|
21238
|
-
await enrichWorktreeSidecars(bySessionId, sessionService, archiveState);
|
|
21239
21497
|
if (readOptions.mergeLive !== false && archiveState !== "archived" && isFirstPage) {
|
|
21240
21498
|
try {
|
|
21241
21499
|
const liveSessions = bridge.listWorkspaceSessions(workspaceCwd);
|
|
@@ -21326,12 +21584,14 @@ async function listWorkspaceSessionsByMetadataForResponse(bridge, workspaceCwd,
|
|
|
21326
21584
|
const bySessionId = /* @__PURE__ */ new Map();
|
|
21327
21585
|
const persisted = await listAllPersistedSummaries(
|
|
21328
21586
|
sessionService,
|
|
21329
|
-
|
|
21587
|
+
workspaceCwd,
|
|
21588
|
+
archiveState,
|
|
21589
|
+
readOptions.runtimeBaseDir,
|
|
21590
|
+
"metadata"
|
|
21330
21591
|
);
|
|
21331
21592
|
for (const session of persisted.sessions) {
|
|
21332
|
-
bySessionId.set(session.sessionId, session);
|
|
21593
|
+
bySessionId.set(session.sessionId, clonePersistedSummary(session));
|
|
21333
21594
|
}
|
|
21334
|
-
await enrichWorktreeSidecars(bySessionId, sessionService, archiveState);
|
|
21335
21595
|
let liveMergeFailed = false;
|
|
21336
21596
|
if (readOptions.mergeLive !== false && archiveState !== "archived") {
|
|
21337
21597
|
try {
|
|
@@ -21398,6 +21658,20 @@ async function listWorkspaceSessionsByMetadataForResponse(bridge, workspaceCwd,
|
|
|
21398
21658
|
}
|
|
21399
21659
|
__name(listWorkspaceSessionsByMetadataForResponse, "listWorkspaceSessionsByMetadataForResponse");
|
|
21400
21660
|
async function listWorkspaceSessionsForResponse(bridge, workspaceCwd, options, readOptions = {}) {
|
|
21661
|
+
const runtimeBaseDir = new Storage(
|
|
21662
|
+
workspaceCwd,
|
|
21663
|
+
readOptions.runtimeBaseDir
|
|
21664
|
+
).getRuntimeBaseDir();
|
|
21665
|
+
return Storage.runWithResolvedRuntimeBaseDir(
|
|
21666
|
+
runtimeBaseDir,
|
|
21667
|
+
() => listWorkspaceSessionsForResponseInRuntime(bridge, workspaceCwd, options, {
|
|
21668
|
+
...readOptions.mergeLive !== void 0 ? { mergeLive: readOptions.mergeLive } : {},
|
|
21669
|
+
runtimeBaseDir
|
|
21670
|
+
})
|
|
21671
|
+
);
|
|
21672
|
+
}
|
|
21673
|
+
__name(listWorkspaceSessionsForResponse, "listWorkspaceSessionsForResponse");
|
|
21674
|
+
async function listWorkspaceSessionsForResponseInRuntime(bridge, workspaceCwd, options, readOptions) {
|
|
21401
21675
|
const rawSize = options?.size;
|
|
21402
21676
|
const requestedSize = typeof rawSize === "number" && Number.isSafeInteger(rawSize) ? rawSize : DEFAULT_SESSION_PAGE_SIZE;
|
|
21403
21677
|
const pageSize = Math.min(Math.max(requestedSize, 1), MAX_SESSION_PAGE_SIZE);
|
|
@@ -21476,7 +21750,7 @@ async function listWorkspaceSessionsForResponse(bridge, workspaceCwd, options, r
|
|
|
21476
21750
|
const nextCursor = persisted.nextCursor != null ? String(persisted.nextCursor) : void 0;
|
|
21477
21751
|
return { sessions, nextCursor };
|
|
21478
21752
|
}
|
|
21479
|
-
__name(
|
|
21753
|
+
__name(listWorkspaceSessionsForResponseInRuntime, "listWorkspaceSessionsForResponseInRuntime");
|
|
21480
21754
|
function listLiveWorkspaceSessionsForResponse(bridge, workspaceCwd, options) {
|
|
21481
21755
|
const rawSize = options?.size;
|
|
21482
21756
|
const requestedSize = typeof rawSize === "number" && Number.isSafeInteger(rawSize) ? rawSize : DEFAULT_SESSION_PAGE_SIZE;
|
|
@@ -22570,6 +22844,20 @@ function registerSessionRoutes(app, deps) {
|
|
|
22570
22844
|
sessionShellCommandEnabled,
|
|
22571
22845
|
virtualSubagentSessions
|
|
22572
22846
|
} = deps;
|
|
22847
|
+
const invalidateSessionLists = /* @__PURE__ */ __name((runtime, archiveStates) => {
|
|
22848
|
+
invalidateWorkspaceSessionListCache({
|
|
22849
|
+
runtimeBaseDir: runtime.sessionRuntimeBaseDir,
|
|
22850
|
+
workspaceCwd: runtime.workspaceCwd,
|
|
22851
|
+
archiveStates
|
|
22852
|
+
});
|
|
22853
|
+
}, "invalidateSessionLists");
|
|
22854
|
+
const runWithSessionListInvalidation = /* @__PURE__ */ __name(async (runtime, archiveStates, mutation) => {
|
|
22855
|
+
try {
|
|
22856
|
+
return await mutation();
|
|
22857
|
+
} finally {
|
|
22858
|
+
invalidateSessionLists(runtime, archiveStates);
|
|
22859
|
+
}
|
|
22860
|
+
}, "runWithSessionListInvalidation");
|
|
22573
22861
|
const requestedSessionIdAdmission = deps.requestedSessionIdAdmission ?? createRequestedSessionIdAdmission({
|
|
22574
22862
|
archiveCoordinator,
|
|
22575
22863
|
getBridges: /* @__PURE__ */ __name(() => workspaceRegistry.listManaged().map((runtime) => runtime.bridge), "getBridges"),
|
|
@@ -22745,7 +23033,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
22745
23033
|
const workspaceParam = req.params[paramName] ?? "";
|
|
22746
23034
|
const byId = workspaceRegistry.getByWorkspaceId(workspaceParam);
|
|
22747
23035
|
if (byId) return byId;
|
|
22748
|
-
if (!
|
|
23036
|
+
if (!path11.isAbsolute(workspaceParam)) {
|
|
22749
23037
|
res.status(400).json({
|
|
22750
23038
|
error: `\`:${paramName}\` must decode to a workspace id or absolute path`
|
|
22751
23039
|
});
|
|
@@ -23602,7 +23890,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23602
23890
|
if (worktreeMeta) {
|
|
23603
23891
|
try {
|
|
23604
23892
|
const createAllowedRoots = [
|
|
23605
|
-
|
|
23893
|
+
path11.join(workspaceCwd, ".qwen", "worktrees")
|
|
23606
23894
|
];
|
|
23607
23895
|
let createRepoTop = null;
|
|
23608
23896
|
try {
|
|
@@ -23613,7 +23901,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23613
23901
|
}
|
|
23614
23902
|
if (createRepoTop && createRepoTop !== workspaceCwd) {
|
|
23615
23903
|
createAllowedRoots.push(
|
|
23616
|
-
|
|
23904
|
+
path11.join(createRepoTop, ".qwen", "worktrees")
|
|
23617
23905
|
);
|
|
23618
23906
|
}
|
|
23619
23907
|
await runtime.bridge.changeSessionCwd(session.sessionId, {
|
|
@@ -23912,7 +24200,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23912
24200
|
if (sidecar) {
|
|
23913
24201
|
let realTarget;
|
|
23914
24202
|
const candidateRoots = [
|
|
23915
|
-
|
|
24203
|
+
path11.join(workspaceCwd, ".qwen", "worktrees")
|
|
23916
24204
|
];
|
|
23917
24205
|
try {
|
|
23918
24206
|
realTarget = fs6.realpathSync(sidecar.worktreePath);
|
|
@@ -23924,13 +24212,13 @@ function registerSessionRoutes(app, deps) {
|
|
|
23924
24212
|
} catch {
|
|
23925
24213
|
}
|
|
23926
24214
|
if (repoTop && repoTop !== workspaceCwd) {
|
|
23927
|
-
candidateRoots.push(
|
|
24215
|
+
candidateRoots.push(path11.join(repoTop, ".qwen", "worktrees"));
|
|
23928
24216
|
}
|
|
23929
24217
|
const contained = candidateRoots.some((root) => {
|
|
23930
24218
|
try {
|
|
23931
24219
|
const realRoot = fs6.realpathSync(root);
|
|
23932
|
-
const rel =
|
|
23933
|
-
return !rel.startsWith("..") && !
|
|
24220
|
+
const rel = path11.relative(realRoot, realTarget);
|
|
24221
|
+
return !rel.startsWith("..") && !path11.isAbsolute(rel);
|
|
23934
24222
|
} catch {
|
|
23935
24223
|
return false;
|
|
23936
24224
|
}
|
|
@@ -24246,7 +24534,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
24246
24534
|
async (req, res, sessionId, runtime) => {
|
|
24247
24535
|
const body = safeBody(req);
|
|
24248
24536
|
const targetPath = body["path"];
|
|
24249
|
-
if (typeof targetPath !== "string" || targetPath.length === 0 || !
|
|
24537
|
+
if (typeof targetPath !== "string" || targetPath.length === 0 || !path11.isAbsolute(targetPath)) {
|
|
24250
24538
|
res.status(400).json({
|
|
24251
24539
|
error: "`path` is required and must be an absolute path",
|
|
24252
24540
|
code: "invalid_path"
|
|
@@ -24746,12 +25034,18 @@ function registerSessionRoutes(app, deps) {
|
|
|
24746
25034
|
const clientId = parseClientIdHeader(req, res);
|
|
24747
25035
|
if (clientId === null) return;
|
|
24748
25036
|
const promptId = crypto3.randomUUID();
|
|
24749
|
-
|
|
24750
|
-
|
|
24751
|
-
|
|
24752
|
-
|
|
24753
|
-
|
|
24754
|
-
|
|
25037
|
+
const result = await runtime.bridge.continueSession(sessionId, {
|
|
25038
|
+
...clientId !== void 0 ? { clientId } : {},
|
|
25039
|
+
promptId
|
|
25040
|
+
});
|
|
25041
|
+
if (daemonLog && result.accepted) {
|
|
25042
|
+
daemonLog.info("continuation enqueued", {
|
|
25043
|
+
sessionId,
|
|
25044
|
+
promptId,
|
|
25045
|
+
clientId
|
|
25046
|
+
});
|
|
25047
|
+
}
|
|
25048
|
+
res.status(200).json(result);
|
|
24755
25049
|
}
|
|
24756
25050
|
)
|
|
24757
25051
|
);
|
|
@@ -25115,11 +25409,15 @@ function registerSessionRoutes(app, deps) {
|
|
|
25115
25409
|
);
|
|
25116
25410
|
if (!runtime) return;
|
|
25117
25411
|
try {
|
|
25118
|
-
await
|
|
25119
|
-
|
|
25120
|
-
|
|
25121
|
-
|
|
25122
|
-
|
|
25412
|
+
await runWithSessionListInvalidation(
|
|
25413
|
+
runtime,
|
|
25414
|
+
["active"],
|
|
25415
|
+
() => archiveCoordinator.runExclusiveMany(
|
|
25416
|
+
[sessionId],
|
|
25417
|
+
async () => runtime.bridge.closeSession(
|
|
25418
|
+
sessionId,
|
|
25419
|
+
clientId !== void 0 ? { clientId } : void 0
|
|
25420
|
+
)
|
|
25123
25421
|
)
|
|
25124
25422
|
);
|
|
25125
25423
|
clearBranchSessionEntry(sessionId);
|
|
@@ -25140,19 +25438,23 @@ function registerSessionRoutes(app, deps) {
|
|
|
25140
25438
|
try {
|
|
25141
25439
|
const runtime = workspaceRegistry.primary;
|
|
25142
25440
|
const service = createWorkspaceRuntimeSessionService(runtime);
|
|
25143
|
-
const result = await
|
|
25441
|
+
const result = await runWithSessionListInvalidation(
|
|
25144
25442
|
runtime,
|
|
25145
|
-
|
|
25146
|
-
|
|
25147
|
-
|
|
25148
|
-
|
|
25149
|
-
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
)
|
|
25154
|
-
|
|
25155
|
-
|
|
25443
|
+
["active", "archived"],
|
|
25444
|
+
() => runWithWorkspaceRuntimeStorage(
|
|
25445
|
+
runtime,
|
|
25446
|
+
() => deleteDaemonSessions({
|
|
25447
|
+
sessionIds: uniqueIds,
|
|
25448
|
+
service,
|
|
25449
|
+
bridge,
|
|
25450
|
+
coordinator: archiveCoordinator,
|
|
25451
|
+
onError: /* @__PURE__ */ __name(({ phase, sessionId, error: error2 }) => {
|
|
25452
|
+
writeStderrLine(
|
|
25453
|
+
`qwen serve: ${phase}Session failed for ${safeLogValue(sessionId)}: ${safeLogValue(error2)}`
|
|
25454
|
+
);
|
|
25455
|
+
}, "onError")
|
|
25456
|
+
})
|
|
25457
|
+
)
|
|
25156
25458
|
);
|
|
25157
25459
|
for (const removedId of result.removed) {
|
|
25158
25460
|
clearBranchSessionEntry(removedId);
|
|
@@ -25171,14 +25473,18 @@ function registerSessionRoutes(app, deps) {
|
|
|
25171
25473
|
onWarning: logSessionArchiveWarning
|
|
25172
25474
|
});
|
|
25173
25475
|
try {
|
|
25174
|
-
const result = await
|
|
25476
|
+
const result = await runWithSessionListInvalidation(
|
|
25175
25477
|
runtime,
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25478
|
+
["active", "archived"],
|
|
25479
|
+
() => runWithWorkspaceRuntimeStorage(
|
|
25480
|
+
runtime,
|
|
25481
|
+
() => archiveDaemonSessions({
|
|
25482
|
+
sessionIds: uniqueIds,
|
|
25483
|
+
service,
|
|
25484
|
+
bridge,
|
|
25485
|
+
coordinator: archiveCoordinator
|
|
25486
|
+
})
|
|
25487
|
+
)
|
|
25182
25488
|
);
|
|
25183
25489
|
res.status(200).json({
|
|
25184
25490
|
archived: result.archived,
|
|
@@ -25198,13 +25504,17 @@ function registerSessionRoutes(app, deps) {
|
|
|
25198
25504
|
onWarning: logSessionArchiveWarning
|
|
25199
25505
|
});
|
|
25200
25506
|
try {
|
|
25201
|
-
const result = await
|
|
25507
|
+
const result = await runWithSessionListInvalidation(
|
|
25202
25508
|
runtime,
|
|
25203
|
-
|
|
25204
|
-
|
|
25205
|
-
|
|
25206
|
-
|
|
25207
|
-
|
|
25509
|
+
["active", "archived"],
|
|
25510
|
+
() => runWithWorkspaceRuntimeStorage(
|
|
25511
|
+
runtime,
|
|
25512
|
+
() => unarchiveDaemonSessions({
|
|
25513
|
+
sessionIds: uniqueIds,
|
|
25514
|
+
service,
|
|
25515
|
+
coordinator: archiveCoordinator
|
|
25516
|
+
})
|
|
25517
|
+
)
|
|
25208
25518
|
);
|
|
25209
25519
|
res.status(200).json({
|
|
25210
25520
|
unarchived: result.unarchived,
|
|
@@ -25230,19 +25540,23 @@ function registerSessionRoutes(app, deps) {
|
|
|
25230
25540
|
if (rejectActiveLiveSessionMutation(res, uniqueIds)) return;
|
|
25231
25541
|
try {
|
|
25232
25542
|
const service = createWorkspaceRuntimeSessionService(runtime);
|
|
25233
|
-
const result = await
|
|
25543
|
+
const result = await runWithSessionListInvalidation(
|
|
25234
25544
|
runtime,
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
|
|
25238
|
-
|
|
25239
|
-
|
|
25240
|
-
|
|
25241
|
-
|
|
25242
|
-
|
|
25243
|
-
)
|
|
25244
|
-
|
|
25245
|
-
|
|
25545
|
+
["active", "archived"],
|
|
25546
|
+
() => runWithWorkspaceRuntimeStorage(
|
|
25547
|
+
runtime,
|
|
25548
|
+
() => deleteDaemonSessions({
|
|
25549
|
+
sessionIds: uniqueIds,
|
|
25550
|
+
service,
|
|
25551
|
+
bridge: runtime.bridge,
|
|
25552
|
+
coordinator: archiveCoordinator,
|
|
25553
|
+
onError: /* @__PURE__ */ __name(({ phase, sessionId, error: error2 }) => {
|
|
25554
|
+
writeStderrLine(
|
|
25555
|
+
`qwen serve: ${phase}Session failed for ${safeLogValue(sessionId)}: ${safeLogValue(error2)}`
|
|
25556
|
+
);
|
|
25557
|
+
}, "onError")
|
|
25558
|
+
})
|
|
25559
|
+
)
|
|
25246
25560
|
);
|
|
25247
25561
|
for (const removedId of result.removed) {
|
|
25248
25562
|
clearBranchSessionEntry(removedId);
|
|
@@ -25267,14 +25581,18 @@ function registerSessionRoutes(app, deps) {
|
|
|
25267
25581
|
onWarning: logSessionArchiveWarning
|
|
25268
25582
|
});
|
|
25269
25583
|
try {
|
|
25270
|
-
const result = await
|
|
25584
|
+
const result = await runWithSessionListInvalidation(
|
|
25271
25585
|
runtime,
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25586
|
+
["active", "archived"],
|
|
25587
|
+
() => runWithWorkspaceRuntimeStorage(
|
|
25588
|
+
runtime,
|
|
25589
|
+
() => archiveDaemonSessions({
|
|
25590
|
+
sessionIds: uniqueIds,
|
|
25591
|
+
service,
|
|
25592
|
+
bridge: runtime.bridge,
|
|
25593
|
+
coordinator: archiveCoordinator
|
|
25594
|
+
})
|
|
25595
|
+
)
|
|
25278
25596
|
);
|
|
25279
25597
|
res.status(200).json({
|
|
25280
25598
|
archived: result.archived,
|
|
@@ -25300,13 +25618,17 @@ function registerSessionRoutes(app, deps) {
|
|
|
25300
25618
|
onWarning: logSessionArchiveWarning
|
|
25301
25619
|
});
|
|
25302
25620
|
try {
|
|
25303
|
-
const result = await
|
|
25621
|
+
const result = await runWithSessionListInvalidation(
|
|
25304
25622
|
runtime,
|
|
25305
|
-
|
|
25306
|
-
|
|
25307
|
-
|
|
25308
|
-
|
|
25309
|
-
|
|
25623
|
+
["active", "archived"],
|
|
25624
|
+
() => runWithWorkspaceRuntimeStorage(
|
|
25625
|
+
runtime,
|
|
25626
|
+
() => unarchiveDaemonSessions({
|
|
25627
|
+
sessionIds: uniqueIds,
|
|
25628
|
+
service,
|
|
25629
|
+
coordinator: archiveCoordinator
|
|
25630
|
+
})
|
|
25631
|
+
)
|
|
25310
25632
|
);
|
|
25311
25633
|
res.status(200).json({
|
|
25312
25634
|
unarchived: result.unarchived,
|
|
@@ -25338,11 +25660,16 @@ function registerSessionRoutes(app, deps) {
|
|
|
25338
25660
|
return;
|
|
25339
25661
|
}
|
|
25340
25662
|
const displayName = typeof rawDisplayName === "string" ? rawDisplayName.slice(0, 256) : void 0;
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
|
|
25344
|
-
|
|
25345
|
-
|
|
25663
|
+
let effective;
|
|
25664
|
+
try {
|
|
25665
|
+
effective = runtime.bridge.updateSessionMetadata(
|
|
25666
|
+
sessionId,
|
|
25667
|
+
{ displayName },
|
|
25668
|
+
clientId !== void 0 ? { clientId } : void 0
|
|
25669
|
+
);
|
|
25670
|
+
} finally {
|
|
25671
|
+
invalidateSessionLists(runtime, ["active"]);
|
|
25672
|
+
}
|
|
25346
25673
|
res.status(200).json({ sessionId, ...effective });
|
|
25347
25674
|
}
|
|
25348
25675
|
)
|
|
@@ -25702,7 +26029,8 @@ function registerSessionRoutes(app, deps) {
|
|
|
25702
26029
|
const result = usePersisted ? await runWorkspaceInspectionWithLogPolicy(
|
|
25703
26030
|
runtime,
|
|
25704
26031
|
() => listWorkspaceSessionsForResponse(runtime.bridge, key, options, {
|
|
25705
|
-
mergeLive: !readOnlySecondary
|
|
26032
|
+
mergeLive: !readOnlySecondary,
|
|
26033
|
+
runtimeBaseDir: runtime.sessionRuntimeBaseDir
|
|
25706
26034
|
})
|
|
25707
26035
|
) : listLiveWorkspaceSessionsForResponse(runtime.bridge, key, options);
|
|
25708
26036
|
res.status(200).json({
|
|
@@ -25881,6 +26209,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
25881
26209
|
(req, res, sessionId, runtime) => {
|
|
25882
26210
|
const body = safeBody(req);
|
|
25883
26211
|
const message = body["message"];
|
|
26212
|
+
const messageId = body["messageId"];
|
|
25884
26213
|
const trimmed = typeof message === "string" ? message.trim() : "";
|
|
25885
26214
|
if (trimmed.length === 0) {
|
|
25886
26215
|
res.status(400).json({
|
|
@@ -25894,12 +26223,19 @@ function registerSessionRoutes(app, deps) {
|
|
|
25894
26223
|
});
|
|
25895
26224
|
return;
|
|
25896
26225
|
}
|
|
26226
|
+
if (messageId !== void 0 && (typeof messageId !== "string" || messageId.length === 0 || messageId.length > 128)) {
|
|
26227
|
+
res.status(400).json({
|
|
26228
|
+
error: "`messageId` must be a non-empty string of at most 128 characters"
|
|
26229
|
+
});
|
|
26230
|
+
return;
|
|
26231
|
+
}
|
|
25897
26232
|
const clientId = parseClientIdHeader(req, res);
|
|
25898
26233
|
if (clientId === null) return;
|
|
25899
26234
|
const result = runtime.bridge.enqueueMidTurnMessage(
|
|
25900
26235
|
sessionId,
|
|
25901
26236
|
trimmed,
|
|
25902
|
-
clientId !== void 0 ? { clientId } : void 0
|
|
26237
|
+
clientId !== void 0 ? { clientId } : void 0,
|
|
26238
|
+
typeof messageId === "string" ? messageId : void 0
|
|
25903
26239
|
);
|
|
25904
26240
|
res.status(200).json(result);
|
|
25905
26241
|
}
|
|
@@ -25927,6 +26263,24 @@ function registerSessionRoutes(app, deps) {
|
|
|
25927
26263
|
}
|
|
25928
26264
|
)
|
|
25929
26265
|
);
|
|
26266
|
+
app.get("/session/:id/mid-turn-messages", (req, res) => {
|
|
26267
|
+
const route = "GET /session/:id/mid-turn-messages";
|
|
26268
|
+
const sessionId = requireSessionId(req, res);
|
|
26269
|
+
if (sessionId === null) return;
|
|
26270
|
+
const runtime = resolveLiveSessionRuntime(sessionId, res, route);
|
|
26271
|
+
if (!runtime) return;
|
|
26272
|
+
const clientId = parseClientIdHeader(req, res);
|
|
26273
|
+
if (clientId === null) return;
|
|
26274
|
+
try {
|
|
26275
|
+
const snapshot = runtime.bridge.getMidTurnMessages(
|
|
26276
|
+
sessionId,
|
|
26277
|
+
clientId !== void 0 ? { clientId } : void 0
|
|
26278
|
+
);
|
|
26279
|
+
res.status(200).json(snapshot);
|
|
26280
|
+
} catch (err) {
|
|
26281
|
+
sendBridgeError2(res, err, { route, sessionId });
|
|
26282
|
+
}
|
|
26283
|
+
});
|
|
25930
26284
|
app.get("/session/:id/pending-prompts", (req, res) => {
|
|
25931
26285
|
const sessionId = requireSessionId(req, res);
|
|
25932
26286
|
if (sessionId === null) return;
|
|
@@ -27280,7 +27634,7 @@ __name(registerUsageStatsRoutes, "registerUsageStatsRoutes");
|
|
|
27280
27634
|
// packages/cli/src/serve/scheduled-task-keepalive.ts
|
|
27281
27635
|
init_esbuild_shims();
|
|
27282
27636
|
import * as fsSync from "node:fs";
|
|
27283
|
-
import * as
|
|
27637
|
+
import * as path12 from "node:path";
|
|
27284
27638
|
var log = createDebugLogger("SCHED_KEEPALIVE");
|
|
27285
27639
|
function collectBoundSessionIds(tasks) {
|
|
27286
27640
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -27506,8 +27860,8 @@ function startScheduledTaskKeepalive(opts) {
|
|
|
27506
27860
|
opts.runtimeBaseDir,
|
|
27507
27861
|
() => getCronFilePath(boundWorkspace)
|
|
27508
27862
|
);
|
|
27509
|
-
const cronDir =
|
|
27510
|
-
const cronFileName =
|
|
27863
|
+
const cronDir = path12.dirname(cronFilePath);
|
|
27864
|
+
const cronFileName = path12.basename(cronFilePath);
|
|
27511
27865
|
let fileWatcher;
|
|
27512
27866
|
try {
|
|
27513
27867
|
fsSync.mkdirSync(cronDir, { recursive: true });
|
|
@@ -29228,7 +29582,7 @@ function sendBridgeError(res, err, ctx, daemonLog) {
|
|
|
29228
29582
|
return;
|
|
29229
29583
|
}
|
|
29230
29584
|
if (err instanceof SessionNotFoundError) {
|
|
29231
|
-
res.status(404).json({ error: err.message, sessionId: err.sessionId });
|
|
29585
|
+
res.status(404).json({ error: err.message, code: err.code, sessionId: err.sessionId });
|
|
29232
29586
|
return;
|
|
29233
29587
|
}
|
|
29234
29588
|
if (err instanceof SessionArchivedError) {
|
|
@@ -30489,7 +30843,7 @@ __name(registerWorkspaceModelsRoutes, "registerWorkspaceModelsRoutes");
|
|
|
30489
30843
|
// packages/cli/src/serve/routes/a2ui-action.ts
|
|
30490
30844
|
init_esbuild_shims();
|
|
30491
30845
|
import * as fsp4 from "node:fs/promises";
|
|
30492
|
-
import * as
|
|
30846
|
+
import * as path13 from "node:path";
|
|
30493
30847
|
var A2UI_MIME = "application/a2ui+json";
|
|
30494
30848
|
var ACTION_TOOL = "action";
|
|
30495
30849
|
var CALL_TIMEOUT_MS = 15e3;
|
|
@@ -30512,7 +30866,7 @@ __name(usableServerConfig, "usableServerConfig");
|
|
|
30512
30866
|
async function findFromSettingsFile(workspaceCwd) {
|
|
30513
30867
|
try {
|
|
30514
30868
|
const raw = await fsp4.readFile(
|
|
30515
|
-
|
|
30869
|
+
path13.join(workspaceCwd, ".qwen", "settings.json"),
|
|
30516
30870
|
"utf8"
|
|
30517
30871
|
);
|
|
30518
30872
|
const settings = JSON.parse(raw);
|
|
@@ -30673,7 +31027,7 @@ __name(registerA2uiActionRoutes, "registerA2uiActionRoutes");
|
|
|
30673
31027
|
|
|
30674
31028
|
// packages/cli/src/serve/server/fs-factory.ts
|
|
30675
31029
|
init_esbuild_shims();
|
|
30676
|
-
import * as
|
|
31030
|
+
import * as path14 from "node:path";
|
|
30677
31031
|
var IDE_WORKSPACE_PATH_ENV_VAR = "QWEN_CODE_IDE_WORKSPACE_PATH";
|
|
30678
31032
|
function createDefaultFsAuditEmit() {
|
|
30679
31033
|
const WARN_EVERY = 100;
|
|
@@ -30748,14 +31102,14 @@ function parseIdeWorkspacePathEnv(value) {
|
|
|
30748
31102
|
const parsed = JSON.parse(value);
|
|
30749
31103
|
if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
|
|
30750
31104
|
return parsed.filter(
|
|
30751
|
-
(workspace) => workspace.length > 0 &&
|
|
31105
|
+
(workspace) => workspace.length > 0 && path14.isAbsolute(workspace)
|
|
30752
31106
|
);
|
|
30753
31107
|
}
|
|
30754
31108
|
throw new Error("IDE workspace path JSON must be a string array");
|
|
30755
31109
|
} catch {
|
|
30756
31110
|
}
|
|
30757
31111
|
}
|
|
30758
|
-
return value.split(
|
|
31112
|
+
return value.split(path14.delimiter).filter((workspace) => workspace.length > 0 && path14.isAbsolute(workspace));
|
|
30759
31113
|
}
|
|
30760
31114
|
__name(parseIdeWorkspacePathEnv, "parseIdeWorkspacePathEnv");
|
|
30761
31115
|
function dropNestedWorkspacesPreservingPrimary(workspaces) {
|
|
@@ -31080,10 +31434,10 @@ function installRateLimiter(app, opts, daemonLog, options = {}) {
|
|
|
31080
31434
|
{ tier, key: key.slice(0, 64) }
|
|
31081
31435
|
);
|
|
31082
31436
|
} : void 0,
|
|
31083
|
-
onError: daemonLog ? (err,
|
|
31437
|
+
onError: daemonLog ? (err, path16) => {
|
|
31084
31438
|
daemonLog.warn(
|
|
31085
31439
|
`rate limiter error (fail-open): ${err instanceof Error ? err.message : String(err)}`,
|
|
31086
|
-
{ path:
|
|
31440
|
+
{ path: path16 }
|
|
31087
31441
|
);
|
|
31088
31442
|
} : void 0
|
|
31089
31443
|
});
|
|
@@ -31711,11 +32065,11 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31711
32065
|
const controller = new AbortController();
|
|
31712
32066
|
res.on("close", () => controller.abort());
|
|
31713
32067
|
try {
|
|
31714
|
-
const
|
|
32068
|
+
const path16 = await pickWorkspaceDirectory(controller.signal);
|
|
31715
32069
|
res.status(200).json({
|
|
31716
32070
|
kind: "workspace-directory-picker",
|
|
31717
|
-
selected:
|
|
31718
|
-
...
|
|
32071
|
+
selected: path16 !== void 0,
|
|
32072
|
+
...path16 === void 0 ? {} : { path: path16 }
|
|
31719
32073
|
});
|
|
31720
32074
|
} catch (error2) {
|
|
31721
32075
|
const detail = error2 instanceof Error ? error2.message : String(error2);
|
|
@@ -32772,8 +33126,8 @@ function buildDiffList(workspaceCwd, result) {
|
|
|
32772
33126
|
hiddenCount: 0
|
|
32773
33127
|
};
|
|
32774
33128
|
}
|
|
32775
|
-
const files = [...result.perFileStats.entries()].map(([
|
|
32776
|
-
path:
|
|
33129
|
+
const files = [...result.perFileStats.entries()].map(([path16, s]) => ({
|
|
33130
|
+
path: path16,
|
|
32777
33131
|
oldPath: s.oldPath,
|
|
32778
33132
|
added: s.added,
|
|
32779
33133
|
removed: s.removed,
|
|
@@ -39316,7 +39670,7 @@ import { createHash as createHash5, randomUUID as randomUUID11 } from "node:cryp
|
|
|
39316
39670
|
import * as fs7 from "node:fs";
|
|
39317
39671
|
import * as fsp5 from "node:fs/promises";
|
|
39318
39672
|
import * as os2 from "node:os";
|
|
39319
|
-
import * as
|
|
39673
|
+
import * as path15 from "node:path";
|
|
39320
39674
|
import { Readable, Transform } from "node:stream";
|
|
39321
39675
|
import { pipeline } from "node:stream/promises";
|
|
39322
39676
|
import { promisify as promisify3 } from "node:util";
|
|
@@ -39396,7 +39750,7 @@ async function readBundleValue(appPath, key) {
|
|
|
39396
39750
|
"raw",
|
|
39397
39751
|
"-o",
|
|
39398
39752
|
"-",
|
|
39399
|
-
|
|
39753
|
+
path15.join(appPath, "Contents", "Info.plist")
|
|
39400
39754
|
]);
|
|
39401
39755
|
}
|
|
39402
39756
|
__name(readBundleValue, "readBundleValue");
|
|
@@ -39538,11 +39892,11 @@ async function downloadLiveHostRelease(currentArchitecture, destination, onProgr
|
|
|
39538
39892
|
__name(downloadLiveHostRelease, "downloadLiveHostRelease");
|
|
39539
39893
|
async function installLatestHost(currentArchitecture, onStatus) {
|
|
39540
39894
|
const temporaryDirectory = await fsp5.mkdtemp(
|
|
39541
|
-
|
|
39895
|
+
path15.join(os2.tmpdir(), "qwen-live-host-")
|
|
39542
39896
|
);
|
|
39543
|
-
const archivePath =
|
|
39544
|
-
const extractedPath =
|
|
39545
|
-
const candidatePath =
|
|
39897
|
+
const archivePath = path15.join(temporaryDirectory, "Qwen-Live-Host.zip");
|
|
39898
|
+
const extractedPath = path15.join(temporaryDirectory, "extracted");
|
|
39899
|
+
const candidatePath = path15.join(extractedPath, LIVE_HOST_APP_NAME);
|
|
39546
39900
|
const stagingPath = `/Applications/.Qwen Live Host.install-${randomUUID11()}.app`;
|
|
39547
39901
|
const backupPath = `/Applications/.Qwen Live Host.backup-${randomUUID11()}.app`;
|
|
39548
39902
|
let movedExisting = false;
|
|
@@ -40061,13 +40415,13 @@ function openLiveAudioCapture(source, identifier) {
|
|
|
40061
40415
|
try {
|
|
40062
40416
|
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
40063
40417
|
const safeIdentifier = identifier.replace(/[^A-Za-z0-9_-]/g, "_");
|
|
40064
|
-
const
|
|
40418
|
+
const path16 = join11(
|
|
40065
40419
|
directory,
|
|
40066
40420
|
`${source}-${Date.now()}-${safeIdentifier}.pcm`
|
|
40067
40421
|
);
|
|
40068
|
-
const stream = createWriteStream2(
|
|
40422
|
+
const stream = createWriteStream2(path16, { flags: "wx", mode: 384 });
|
|
40069
40423
|
stream.on("error", () => void 0);
|
|
40070
|
-
return { source, path:
|
|
40424
|
+
return { source, path: path16, stream, hash: createHash6("sha256"), bytes: 0 };
|
|
40071
40425
|
} catch {
|
|
40072
40426
|
return void 0;
|
|
40073
40427
|
}
|
|
@@ -40924,35 +41278,52 @@ var LiveSessionCoordinator = class {
|
|
|
40924
41278
|
event.request,
|
|
40925
41279
|
event.activeTranscript
|
|
40926
41280
|
);
|
|
41281
|
+
const runAsNextTurn = /* @__PURE__ */ __name(async (notifyAdmission) => {
|
|
41282
|
+
if (!this.isCurrentSocket(context, generation) || context.realtime !== source) {
|
|
41283
|
+
return false;
|
|
41284
|
+
}
|
|
41285
|
+
let admitted = false;
|
|
41286
|
+
await this.runCoordinatorTurn(
|
|
41287
|
+
context,
|
|
41288
|
+
locator,
|
|
41289
|
+
event.request,
|
|
41290
|
+
modelPrompt,
|
|
41291
|
+
() => {
|
|
41292
|
+
admitted = true;
|
|
41293
|
+
if (notifyAdmission) onPromptAdmitted();
|
|
41294
|
+
},
|
|
41295
|
+
(message) => {
|
|
41296
|
+
if (this.isCurrentSocket(context, generation)) {
|
|
41297
|
+
source.sendBackendContext(message);
|
|
41298
|
+
}
|
|
41299
|
+
}
|
|
41300
|
+
);
|
|
41301
|
+
return admitted;
|
|
41302
|
+
}, "runAsNextTurn");
|
|
40927
41303
|
const routed = runtime.bridge.enqueueMidTurnMessage(
|
|
40928
41304
|
locator.sessionId,
|
|
40929
|
-
modelPrompt
|
|
41305
|
+
modelPrompt,
|
|
41306
|
+
void 0,
|
|
41307
|
+
void 0,
|
|
41308
|
+
{
|
|
41309
|
+
queueOnly: true,
|
|
41310
|
+
onSettledWithoutDrain: /* @__PURE__ */ __name(() => {
|
|
41311
|
+
void runAsNextTurn(false).catch((error2) => {
|
|
41312
|
+
if (this.isCurrentSocket(context, generation) && context.realtime === source) {
|
|
41313
|
+
source.sendBackendContext(
|
|
41314
|
+
`The Qwen Code agent could not complete the request: ${errorMessage4(error2)}`
|
|
41315
|
+
);
|
|
41316
|
+
}
|
|
41317
|
+
});
|
|
41318
|
+
}, "onSettledWithoutDrain")
|
|
41319
|
+
}
|
|
40930
41320
|
);
|
|
40931
41321
|
if (routed.accepted) {
|
|
40932
41322
|
onPromptAdmitted();
|
|
40933
41323
|
return true;
|
|
40934
41324
|
}
|
|
40935
41325
|
await activeHandoff.turnComplete;
|
|
40936
|
-
|
|
40937
|
-
return false;
|
|
40938
|
-
}
|
|
40939
|
-
let admitted = false;
|
|
40940
|
-
await this.runCoordinatorTurn(
|
|
40941
|
-
context,
|
|
40942
|
-
locator,
|
|
40943
|
-
event.request,
|
|
40944
|
-
modelPrompt,
|
|
40945
|
-
() => {
|
|
40946
|
-
admitted = true;
|
|
40947
|
-
onPromptAdmitted();
|
|
40948
|
-
},
|
|
40949
|
-
(message) => {
|
|
40950
|
-
if (this.isCurrentSocket(context, generation)) {
|
|
40951
|
-
source.sendBackendContext(message);
|
|
40952
|
-
}
|
|
40953
|
-
}
|
|
40954
|
-
);
|
|
40955
|
-
return admitted;
|
|
41326
|
+
return runAsNextTurn(true);
|
|
40956
41327
|
}
|
|
40957
41328
|
async handleDelegate(context, event, generation, source, onPromptAdmitted) {
|
|
40958
41329
|
if (!this.isActive(context)) return false;
|
|
@@ -41852,7 +42223,8 @@ var LiveTaskService = class {
|
|
|
41852
42223
|
view: "organized",
|
|
41853
42224
|
group: "all",
|
|
41854
42225
|
...cursor ? { cursor } : {}
|
|
41855
|
-
}
|
|
42226
|
+
},
|
|
42227
|
+
{ runtimeBaseDir: runtime.sessionRuntimeBaseDir }
|
|
41856
42228
|
);
|
|
41857
42229
|
for (const session of result.sessions) {
|
|
41858
42230
|
const pinned = session.isPinned === true;
|
|
@@ -42226,7 +42598,7 @@ var LiveTaskService = class {
|
|
|
42226
42598
|
} catch (error2) {
|
|
42227
42599
|
if (!(error2 instanceof SessionNotFoundError)) throw error2;
|
|
42228
42600
|
}
|
|
42229
|
-
const service =
|
|
42601
|
+
const service = createWorkspaceRuntimeSessionService(task.runtime);
|
|
42230
42602
|
const metadata = task.runtime.provenance === "live-conversation" ? await readLoadableLiveConversationMetadata(
|
|
42231
42603
|
task.summary.sessionId,
|
|
42232
42604
|
(sessionId) => service.readCreationMetadata(sessionId)
|
|
@@ -42275,7 +42647,10 @@ var LiveTaskService = class {
|
|
|
42275
42647
|
removed = false;
|
|
42276
42648
|
}
|
|
42277
42649
|
if (removed) {
|
|
42278
|
-
await
|
|
42650
|
+
await runWithWorkspaceRuntimeStorage(
|
|
42651
|
+
runtime,
|
|
42652
|
+
() => createWorkspaceRuntimeSessionService(runtime).removeSession(session.sessionId).catch(() => void 0)
|
|
42653
|
+
);
|
|
42279
42654
|
}
|
|
42280
42655
|
if (projectless && removed) {
|
|
42281
42656
|
await this.options.discardEmptyConversationDirectory(session.sessionId).catch(() => void 0);
|
|
@@ -42289,8 +42664,8 @@ var LiveTaskService = class {
|
|
|
42289
42664
|
const runtimes = live.kind === "found" ? [live.runtime] : (await Promise.all(
|
|
42290
42665
|
this.options.workspaceRegistry.list().map(async (runtime2) => ({
|
|
42291
42666
|
runtime: runtime2,
|
|
42292
|
-
exists: await
|
|
42293
|
-
runtime2
|
|
42667
|
+
exists: await createWorkspaceRuntimeSessionService(
|
|
42668
|
+
runtime2
|
|
42294
42669
|
).sessionExists(threadId)
|
|
42295
42670
|
}))
|
|
42296
42671
|
)).filter((entry) => entry.exists).map((entry) => entry.runtime);
|
|
@@ -42298,7 +42673,7 @@ var LiveTaskService = class {
|
|
|
42298
42673
|
if (runtimes.length > 1)
|
|
42299
42674
|
throw new Error(`Task id is ambiguous: ${threadId}`);
|
|
42300
42675
|
const runtime = runtimes[0];
|
|
42301
|
-
const service =
|
|
42676
|
+
const service = createWorkspaceRuntimeSessionService(runtime);
|
|
42302
42677
|
const persisted = await service.loadSession(threadId);
|
|
42303
42678
|
let summary;
|
|
42304
42679
|
try {
|
|
@@ -42316,7 +42691,8 @@ var LiveTaskService = class {
|
|
|
42316
42691
|
{
|
|
42317
42692
|
size: 100,
|
|
42318
42693
|
...cursor ? { cursor } : {}
|
|
42319
|
-
}
|
|
42694
|
+
},
|
|
42695
|
+
{ runtimeBaseDir: runtime.sessionRuntimeBaseDir }
|
|
42320
42696
|
);
|
|
42321
42697
|
found = listed.sessions.find((item) => item.sessionId === threadId);
|
|
42322
42698
|
cursor = listed.nextCursor;
|
|
@@ -43942,6 +44318,7 @@ export {
|
|
|
43942
44318
|
detectFromLoopback,
|
|
43943
44319
|
getActiveSseCount,
|
|
43944
44320
|
getWorkspaceSessionInfoForResponse,
|
|
44321
|
+
invalidateWorkspaceSessionListCache,
|
|
43945
44322
|
listWorkspaceSessionsForResponse,
|
|
43946
44323
|
resolveBoundWorkspacesFromIdeEnv,
|
|
43947
44324
|
resolveBridgeFsFactory,
|