@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
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-OCPBI7J5.js";
|
|
18
18
|
import {
|
|
19
19
|
defaultSpawnChannelFactory
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EV3LZGGK.js";
|
|
21
21
|
import {
|
|
22
22
|
BridgeChannelClosedError,
|
|
23
23
|
BridgeTimeoutError,
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
LOAD_REPLAY_PAGE_SIZE_META_KEY,
|
|
51
51
|
LOAD_REPLAY_VERSION,
|
|
52
52
|
MID_TURN_QUEUE_DRAIN_METHOD,
|
|
53
|
+
MID_TURN_RECONCILIATION_RING_SIZE,
|
|
53
54
|
PROMPT_CANCEL_METHOD,
|
|
54
55
|
REQUESTED_SESSION_ID_META_KEY,
|
|
55
56
|
TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD,
|
|
@@ -57,7 +58,7 @@ import {
|
|
|
57
58
|
WORKTREE_MCP_DEFER_META_KEY,
|
|
58
59
|
clampActiveWorkIntervalMs,
|
|
59
60
|
isValidTrustedModelPrompt
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-W5UC37EE.js";
|
|
61
62
|
import {
|
|
62
63
|
BranchWhilePromptActiveError,
|
|
63
64
|
BridgeChannelQuarantinedError,
|
|
@@ -79,7 +80,7 @@ import {
|
|
|
79
80
|
SessionShellDisabledError,
|
|
80
81
|
WorkspaceMismatchError,
|
|
81
82
|
isNotCurrentlyGeneratingCancelError
|
|
82
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-624NHDGB.js";
|
|
83
84
|
import {
|
|
84
85
|
canonicalizeWorkspace,
|
|
85
86
|
translateAndCheckAbsoluteWorkspacePath
|
|
@@ -104,6 +105,7 @@ import {
|
|
|
104
105
|
} from "./chunk-UDXSXLER.js";
|
|
105
106
|
import {
|
|
106
107
|
SESSION_ARTIFACT_PERSISTENCE_VERSION,
|
|
108
|
+
SESSION_TRANSCRIPT_MAX_LIMIT,
|
|
107
109
|
ShellExecutionService,
|
|
108
110
|
TrustGateError,
|
|
109
111
|
WORKSPACE_CONTENT_MTIME_MS_METADATA_KEY,
|
|
@@ -113,7 +115,7 @@ import {
|
|
|
113
115
|
metadataBudgetBytes,
|
|
114
116
|
normalizeSnapshotPayload,
|
|
115
117
|
stableSessionArtifactId
|
|
116
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-NX2E4GYA.js";
|
|
117
119
|
import {
|
|
118
120
|
DAEMON_TRACEPARENT_META_KEY,
|
|
119
121
|
DAEMON_TRACESTATE_META_KEY
|
|
@@ -2414,34 +2416,36 @@ var BridgeClient = class {
|
|
|
2414
2416
|
const entry = this.resolveEntry(sessionId);
|
|
2415
2417
|
if (!entry) return { messages: [], hasQueuedPrompt: false };
|
|
2416
2418
|
const drained = entry.midTurnMessageQueue.splice(0);
|
|
2417
|
-
const messages = drained.map((item) => item.text);
|
|
2418
|
-
const hasQueuedPrompt = entry.pendingPromptList.some(
|
|
2419
|
-
(prompt) => prompt.state === "queued" && !prompt.abortController.signal.aborted
|
|
2420
|
-
);
|
|
2421
2419
|
if (drained.length > 0) {
|
|
2422
|
-
const byOriginator = /* @__PURE__ */ new Map();
|
|
2423
2420
|
for (const item of drained) {
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
const published = entry.events.publish({
|
|
2431
|
-
type: MID_TURN_MESSAGE_INJECTED_EVENT,
|
|
2432
|
-
...entry.activePromptId ? { promptId: entry.activePromptId } : {},
|
|
2433
|
-
data: {
|
|
2434
|
-
sessionId: entry.sessionId,
|
|
2435
|
-
messages: texts,
|
|
2436
|
-
messageIds: items.map((item) => item.messageId)
|
|
2437
|
-
},
|
|
2438
|
-
...originatorClientId ? { originatorClientId } : {}
|
|
2439
|
-
});
|
|
2440
|
-
writeStderrLine(
|
|
2441
|
-
published ? `[mid-turn] session=${entry.sessionId} drained=${texts.length}${originatorClientId ? ` originator=${originatorClientId}` : ""} injected into running turn` : `[mid-turn] session=${entry.sessionId} drained=${texts.length} echo frame dropped (bus closed); browser may resend next turn`
|
|
2421
|
+
entry.settledMidTurnMessageIds.push(item.messageId);
|
|
2422
|
+
}
|
|
2423
|
+
if (entry.settledMidTurnMessageIds.length > MID_TURN_RECONCILIATION_RING_SIZE) {
|
|
2424
|
+
entry.settledMidTurnMessageIds.splice(
|
|
2425
|
+
0,
|
|
2426
|
+
entry.settledMidTurnMessageIds.length - MID_TURN_RECONCILIATION_RING_SIZE
|
|
2442
2427
|
);
|
|
2443
2428
|
}
|
|
2444
2429
|
}
|
|
2430
|
+
const echoed = drained.filter((item) => !item.queueOnly);
|
|
2431
|
+
const messages = drained.map((item) => item.text);
|
|
2432
|
+
const hasQueuedPrompt = entry.pendingPromptList.some(
|
|
2433
|
+
(prompt) => prompt.state === "queued" && !prompt.abortController.signal.aborted
|
|
2434
|
+
);
|
|
2435
|
+
if (echoed.length > 0) {
|
|
2436
|
+
const published = entry.events.publish({
|
|
2437
|
+
type: MID_TURN_MESSAGE_INJECTED_EVENT,
|
|
2438
|
+
...entry.activePromptId ? { promptId: entry.activePromptId } : {},
|
|
2439
|
+
data: {
|
|
2440
|
+
sessionId: entry.sessionId,
|
|
2441
|
+
messages: echoed.map((item) => item.text),
|
|
2442
|
+
messageIds: echoed.map((item) => item.messageId)
|
|
2443
|
+
}
|
|
2444
|
+
});
|
|
2445
|
+
writeStderrLine(
|
|
2446
|
+
published ? `[mid-turn] session=${entry.sessionId} drained=${messages.length} echoed=${echoed.length} injected into running turn` : `[mid-turn] session=${entry.sessionId} drained=${messages.length} echoed=${echoed.length} echo frame dropped (bus closed); reconciliation required`
|
|
2447
|
+
);
|
|
2448
|
+
}
|
|
2445
2449
|
return { messages, hasQueuedPrompt };
|
|
2446
2450
|
}
|
|
2447
2451
|
async handleExternalToolGuardPrepare(params) {
|
|
@@ -6385,6 +6389,7 @@ var SESSION_GENERATION_TIMEOUT_MS = 65e3;
|
|
|
6385
6389
|
var GENERATION_STREAM_QUEUE_CAPACITY = 128;
|
|
6386
6390
|
var SESSION_BTW_TIMEOUT_MS = 6e4;
|
|
6387
6391
|
var SESSION_TRANSCRIPT_TIMEOUT_MS = 6e4;
|
|
6392
|
+
var MAX_EMPTY_TRANSCRIPT_PAGES = 20;
|
|
6388
6393
|
var SHELL_COMMAND_TIMEOUT_MS = 12e4;
|
|
6389
6394
|
var MAX_SHELL_OUTPUT_FOR_HISTORY = 1e4;
|
|
6390
6395
|
var MAX_MID_TURN_QUEUE_DEPTH = 20;
|
|
@@ -8035,7 +8040,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8035
8040
|
`ACP session close channel unavailable for ${entry.sessionId}`
|
|
8036
8041
|
);
|
|
8037
8042
|
}
|
|
8038
|
-
return;
|
|
8043
|
+
return false;
|
|
8039
8044
|
}
|
|
8040
8045
|
try {
|
|
8041
8046
|
const closeRequest = entry.connection.extMethod(
|
|
@@ -8047,7 +8052,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8047
8052
|
}
|
|
8048
8053
|
);
|
|
8049
8054
|
const observedCloseRequest = opts2?.timeoutMs ? withTimeout(closeRequest, opts2.timeoutMs, label) : closeRequest;
|
|
8050
|
-
await Promise.race([
|
|
8055
|
+
const response = await Promise.race([
|
|
8051
8056
|
opts2?.throwOnFailure === true ? observedCloseRequest : withTimeout(
|
|
8052
8057
|
observedCloseRequest,
|
|
8053
8058
|
initTimeoutMs,
|
|
@@ -8055,6 +8060,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8055
8060
|
),
|
|
8056
8061
|
getTransportClosedReject(entry)
|
|
8057
8062
|
]);
|
|
8063
|
+
return response["closed"] === true;
|
|
8058
8064
|
} catch (err) {
|
|
8059
8065
|
writeStderrLine(
|
|
8060
8066
|
`qwen serve: ${label} ACP session close notification failed for session ${JSON.stringify(entry.sessionId)}: ${String(
|
|
@@ -8064,6 +8070,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8064
8070
|
if (opts2?.throwOnFailure === true) {
|
|
8065
8071
|
throw err;
|
|
8066
8072
|
}
|
|
8073
|
+
return false;
|
|
8067
8074
|
}
|
|
8068
8075
|
}, "notifyAgentSessionClose");
|
|
8069
8076
|
const broadcastWorkspaceEvent = /* @__PURE__ */ __name((envelope, skipSessionId) => {
|
|
@@ -8236,6 +8243,8 @@ function createAcpSessionBridge(opts) {
|
|
|
8236
8243
|
pendingAgentNotificationCount: 0,
|
|
8237
8244
|
pendingPromptList: [],
|
|
8238
8245
|
midTurnMessageQueue: [],
|
|
8246
|
+
settledMidTurnMessageIds: [],
|
|
8247
|
+
promotedMidTurnMessageIds: [],
|
|
8239
8248
|
modelChangeQueue: Promise.resolve(),
|
|
8240
8249
|
approvalModeQueue: Promise.resolve(),
|
|
8241
8250
|
modelPublishGeneration: 0,
|
|
@@ -8486,11 +8495,26 @@ function createAcpSessionBridge(opts) {
|
|
|
8486
8495
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
8487
8496
|
try {
|
|
8488
8497
|
const lastEventId = entry.events.lastEventId;
|
|
8489
|
-
const
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8498
|
+
const seenCursors = /* @__PURE__ */ new Set();
|
|
8499
|
+
let emptyPageCount = 0;
|
|
8500
|
+
let cursor;
|
|
8501
|
+
let page;
|
|
8502
|
+
do {
|
|
8503
|
+
page = await requestSessionTranscriptPage({
|
|
8504
|
+
sessionId: entry.sessionId,
|
|
8505
|
+
...cursor ? { cursor } : { direction: "backward" },
|
|
8506
|
+
limit: historyPageSize
|
|
8507
|
+
});
|
|
8508
|
+
const nextCursor = page.nextCursor;
|
|
8509
|
+
if (page.events.length === 0 && page.hasMore && (nextCursor === void 0 || seenCursors.has(nextCursor))) {
|
|
8510
|
+
throw new Error("Transcript cursor did not advance");
|
|
8511
|
+
}
|
|
8512
|
+
if (page.events.length === 0 && page.hasMore && ++emptyPageCount >= MAX_EMPTY_TRANSCRIPT_PAGES) {
|
|
8513
|
+
throw new Error("Transcript empty-page limit exceeded");
|
|
8514
|
+
}
|
|
8515
|
+
cursor = nextCursor;
|
|
8516
|
+
if (cursor !== void 0) seenCursors.add(cursor);
|
|
8517
|
+
} while (page.events.length === 0 && page.hasMore && cursor !== void 0 && page.partial !== true && page.replayError === void 0);
|
|
8494
8518
|
if (byId.get(entry.sessionId) === entry && !entry.promptActive && entry.events.lastEventId === lastEventId) {
|
|
8495
8519
|
return {
|
|
8496
8520
|
compactedReplay: page.events,
|
|
@@ -8559,20 +8583,34 @@ function createAcpSessionBridge(opts) {
|
|
|
8559
8583
|
);
|
|
8560
8584
|
}
|
|
8561
8585
|
const historyReplay = action === "load" ? req.historyReplay ?? "stream" : "stream";
|
|
8586
|
+
const historyPageSize = action === "load" && historyReplay === "response" ? req.historyPageSize : void 0;
|
|
8587
|
+
if (historyPageSize !== void 0 && (!Number.isSafeInteger(historyPageSize) || historyPageSize < 1 || historyPageSize > SESSION_TRANSCRIPT_MAX_LIMIT)) {
|
|
8588
|
+
throw new Error(
|
|
8589
|
+
`Invalid historyPageSize; expected 1..${SESSION_TRANSCRIPT_MAX_LIMIT}`
|
|
8590
|
+
);
|
|
8591
|
+
}
|
|
8562
8592
|
const hideInheritedHistory = action === "load" && req.hideInheritedHistory === true;
|
|
8563
8593
|
const existing = byId.get(req.sessionId);
|
|
8564
8594
|
if (existing) {
|
|
8565
8595
|
if (isClosingOrAuthorizingClose(existing)) {
|
|
8566
8596
|
throw new SessionNotFoundError(
|
|
8567
8597
|
req.sessionId,
|
|
8568
|
-
"The session is closing; retry after close completes"
|
|
8598
|
+
"The session is closing; retry after close completes",
|
|
8599
|
+
"session_closing"
|
|
8569
8600
|
);
|
|
8570
8601
|
}
|
|
8571
|
-
const replayFields =
|
|
8602
|
+
const replayFields = historyPageSize !== void 0 ? await refreshedReplayFieldsFor(existing, historyPageSize) : replayFieldsFor(existing, action);
|
|
8572
8603
|
const historyAnchorRecordId = action === "load" ? await resolveHistoryAnchorRecordId(existing, replayFields) : void 0;
|
|
8573
|
-
if (byId.get(req.sessionId) !== existing
|
|
8604
|
+
if (byId.get(req.sessionId) !== existing) {
|
|
8574
8605
|
throw new SessionNotFoundError(req.sessionId);
|
|
8575
8606
|
}
|
|
8607
|
+
if (isClosingOrAuthorizingClose(existing)) {
|
|
8608
|
+
throw new SessionNotFoundError(
|
|
8609
|
+
req.sessionId,
|
|
8610
|
+
"The session is closing; retry after close completes",
|
|
8611
|
+
"session_closing"
|
|
8612
|
+
);
|
|
8613
|
+
}
|
|
8576
8614
|
existing.attachCount++;
|
|
8577
8615
|
const clientId = registerClient(existing, req.clientId);
|
|
8578
8616
|
recordAttachRef(existing, clientId);
|
|
@@ -8601,7 +8639,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8601
8639
|
}
|
|
8602
8640
|
const inFlight = inFlightRestores.get(req.sessionId);
|
|
8603
8641
|
if (inFlight) {
|
|
8604
|
-
if (inFlight.lifecycle.phase === "abandoned" || action !== inFlight.action || historyReplay !== inFlight.historyReplay || hideInheritedHistory !== inFlight.hideInheritedHistory) {
|
|
8642
|
+
if (inFlight.lifecycle.phase === "abandoned" || action !== inFlight.action || historyReplay !== inFlight.historyReplay || historyPageSize !== inFlight.historyPageSize || hideInheritedHistory !== inFlight.hideInheritedHistory) {
|
|
8605
8643
|
const abandoned = inFlight.lifecycle.phase === "abandoned";
|
|
8606
8644
|
throw new RestoreInProgressError(
|
|
8607
8645
|
req.sessionId,
|
|
@@ -8834,8 +8872,8 @@ function createAcpSessionBridge(opts) {
|
|
|
8834
8872
|
...sessionSourceRequestMeta(req.sourceType, req.sourceId),
|
|
8835
8873
|
...historyReplay === "response" ? {
|
|
8836
8874
|
[LOAD_REPLAY_MODE_META_KEY]: LOAD_REPLAY_BULK_MODE,
|
|
8837
|
-
...
|
|
8838
|
-
[LOAD_REPLAY_PAGE_SIZE_META_KEY]:
|
|
8875
|
+
...historyPageSize !== void 0 ? {
|
|
8876
|
+
[LOAD_REPLAY_PAGE_SIZE_META_KEY]: historyPageSize
|
|
8839
8877
|
} : {}
|
|
8840
8878
|
} : {},
|
|
8841
8879
|
...hideInheritedHistory ? { [LOAD_REPLAY_HIDE_INHERITED_META_KEY]: true } : {}
|
|
@@ -8950,7 +8988,8 @@ function createAcpSessionBridge(opts) {
|
|
|
8950
8988
|
if (isClosingOrAuthorizingClose(racedEntry)) {
|
|
8951
8989
|
throw new SessionNotFoundError(
|
|
8952
8990
|
req.sessionId,
|
|
8953
|
-
"The session is closing; retry after close completes"
|
|
8991
|
+
"The session is closing; retry after close completes",
|
|
8992
|
+
"session_closing"
|
|
8954
8993
|
);
|
|
8955
8994
|
}
|
|
8956
8995
|
racedEntry.attachCount += 1 + coalesceState.count;
|
|
@@ -9033,7 +9072,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9033
9072
|
await ci.client.seedSessionUpdates(entry, replayUpdates, {
|
|
9034
9073
|
ingestArtifacts: restoredArtifactSnapshot === void 0 || artifactRestoreFailed
|
|
9035
9074
|
});
|
|
9036
|
-
if (
|
|
9075
|
+
if (historyPageSize !== void 0 && entry.events.snapshotReplay()?.compactedTurns.some((event) => event.type === "history_truncated")) {
|
|
9037
9076
|
entry.restoreHistoryHasMore = true;
|
|
9038
9077
|
}
|
|
9039
9078
|
ci.client.drainEarlyEvents(entry.sessionId, entry);
|
|
@@ -9117,6 +9156,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9117
9156
|
inFlightRestores.set(req.sessionId, {
|
|
9118
9157
|
action,
|
|
9119
9158
|
historyReplay,
|
|
9159
|
+
...historyPageSize !== void 0 ? { historyPageSize } : {},
|
|
9120
9160
|
hideInheritedHistory,
|
|
9121
9161
|
publicPromise: promise,
|
|
9122
9162
|
settlementPromise,
|
|
@@ -9138,7 +9178,8 @@ function createAcpSessionBridge(opts) {
|
|
|
9138
9178
|
if (entry.closing) {
|
|
9139
9179
|
throw new SessionNotFoundError(
|
|
9140
9180
|
sessionId,
|
|
9141
|
-
"The session is already closing"
|
|
9181
|
+
"The session is already closing",
|
|
9182
|
+
"session_closing"
|
|
9142
9183
|
);
|
|
9143
9184
|
}
|
|
9144
9185
|
let originatorClientId;
|
|
@@ -9161,15 +9202,21 @@ function createAcpSessionBridge(opts) {
|
|
|
9161
9202
|
`qwen serve: closeSession channelInfoForEntry returned undefined for session ${JSON.stringify(sessionId)} \u2014 channel cleanup skipped (entry's channel already torn down)`
|
|
9162
9203
|
);
|
|
9163
9204
|
}
|
|
9205
|
+
let agentSessionClosed = false;
|
|
9164
9206
|
try {
|
|
9165
9207
|
permissionMediator.forgetSession(sessionId);
|
|
9166
9208
|
entry.pendingPermissionIds.clear();
|
|
9167
9209
|
entry.pendingInteractions.clear();
|
|
9168
|
-
await notifyAgentSessionClose(
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9210
|
+
agentSessionClosed = await notifyAgentSessionClose(
|
|
9211
|
+
entry,
|
|
9212
|
+
ci,
|
|
9213
|
+
"closeSession",
|
|
9214
|
+
{
|
|
9215
|
+
throwOnFailure: true,
|
|
9216
|
+
requireFlush: closeOpts?.requireAgentClose === true,
|
|
9217
|
+
...closeOpts?.agentCloseTimeoutMs !== void 0 ? { timeoutMs: closeOpts.agentCloseTimeoutMs } : {}
|
|
9218
|
+
}
|
|
9219
|
+
);
|
|
9173
9220
|
} catch (error) {
|
|
9174
9221
|
if (isDefinitiveAcpRequestError(error)) {
|
|
9175
9222
|
entry.closing = false;
|
|
@@ -9223,16 +9270,18 @@ function createAcpSessionBridge(opts) {
|
|
|
9223
9270
|
} catch {
|
|
9224
9271
|
}
|
|
9225
9272
|
entry.events.close();
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9273
|
+
if (!agentSessionClosed) {
|
|
9274
|
+
try {
|
|
9275
|
+
await telemetry.withSpan(
|
|
9276
|
+
"session.close.cancel_active_prompt",
|
|
9277
|
+
{
|
|
9278
|
+
"qwen-code.daemon.bridge.operation": "session.close.cancel_active_prompt",
|
|
9279
|
+
"session.id": sessionId
|
|
9280
|
+
},
|
|
9281
|
+
async () => await entry.connection.cancel({ sessionId })
|
|
9282
|
+
);
|
|
9283
|
+
} catch {
|
|
9284
|
+
}
|
|
9236
9285
|
}
|
|
9237
9286
|
if (ci && hasNoChannelWork(ci)) {
|
|
9238
9287
|
await reapPendingEmptyChannel(ci);
|
|
@@ -9243,6 +9292,36 @@ function createAcpSessionBridge(opts) {
|
|
|
9243
9292
|
}
|
|
9244
9293
|
__name(closeSessionImpl, "closeSessionImpl");
|
|
9245
9294
|
startSessionReaper();
|
|
9295
|
+
const rememberMidTurnId = /* @__PURE__ */ __name((ring, messageId) => {
|
|
9296
|
+
ring.push(messageId);
|
|
9297
|
+
if (ring.length > MID_TURN_RECONCILIATION_RING_SIZE) {
|
|
9298
|
+
ring.splice(0, ring.length - MID_TURN_RECONCILIATION_RING_SIZE);
|
|
9299
|
+
}
|
|
9300
|
+
}, "rememberMidTurnId");
|
|
9301
|
+
const promoteMidTurnMessage = /* @__PURE__ */ __name((entry, messageId, text, originatorClientId) => {
|
|
9302
|
+
void bridgeApi.sendPrompt(
|
|
9303
|
+
entry.sessionId,
|
|
9304
|
+
{
|
|
9305
|
+
sessionId: entry.sessionId,
|
|
9306
|
+
prompt: [{ type: "text", text }]
|
|
9307
|
+
},
|
|
9308
|
+
void 0,
|
|
9309
|
+
{
|
|
9310
|
+
promptId: messageId,
|
|
9311
|
+
promotedMidTurn: { originatorClientId },
|
|
9312
|
+
// Record the id only once sendPrompt owns its FIFO slot: an
|
|
9313
|
+
// admission failure must not land the id in the reconciliation
|
|
9314
|
+
// ring, or retries would be acked for a message that never runs.
|
|
9315
|
+
onPromptAdmitted: /* @__PURE__ */ __name(() => {
|
|
9316
|
+
rememberMidTurnId(entry.promotedMidTurnMessageIds, messageId);
|
|
9317
|
+
}, "onPromptAdmitted")
|
|
9318
|
+
}
|
|
9319
|
+
).catch((error) => {
|
|
9320
|
+
writeStderrLine(
|
|
9321
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} failed to run promoted message ${JSON.stringify(messageId)}: ${JSON.stringify(error instanceof Error ? error.message : String(error))}`
|
|
9322
|
+
);
|
|
9323
|
+
});
|
|
9324
|
+
}, "promoteMidTurnMessage");
|
|
9246
9325
|
const bridgeApi = {
|
|
9247
9326
|
setLiveScreenContextCaptureHandler(handler) {
|
|
9248
9327
|
liveScreenContextCaptureHandler = handler;
|
|
@@ -9389,7 +9468,8 @@ function createAcpSessionBridge(opts) {
|
|
|
9389
9468
|
if (isClosingOrAuthorizingClose(existing)) {
|
|
9390
9469
|
throw new SessionNotFoundError(
|
|
9391
9470
|
existing.sessionId,
|
|
9392
|
-
"The session is closing; retry after close completes"
|
|
9471
|
+
"The session is closing; retry after close completes",
|
|
9472
|
+
"session_closing"
|
|
9393
9473
|
);
|
|
9394
9474
|
}
|
|
9395
9475
|
existing.attachCount++;
|
|
@@ -9549,14 +9629,14 @@ function createAcpSessionBridge(opts) {
|
|
|
9549
9629
|
return Promise.reject(
|
|
9550
9630
|
new SessionNotFoundError(
|
|
9551
9631
|
sessionId,
|
|
9552
|
-
"The session is closing; retry after close completes"
|
|
9632
|
+
"The session is closing; retry after close completes",
|
|
9633
|
+
"session_closing"
|
|
9553
9634
|
)
|
|
9554
9635
|
);
|
|
9555
9636
|
}
|
|
9556
|
-
const
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
);
|
|
9637
|
+
const promotedMidTurn = context?.promotedMidTurn;
|
|
9638
|
+
const isPromotedMidTurn = promotedMidTurn !== void 0;
|
|
9639
|
+
const originatorClientId = promotedMidTurn ? promotedMidTurn.originatorClientId : resolveTrustedClientId(entry, context?.clientId);
|
|
9560
9640
|
const modelPrompt = context?.modelPrompt;
|
|
9561
9641
|
if (modelPrompt !== void 0 && !isValidTrustedModelPrompt(modelPrompt)) {
|
|
9562
9642
|
throw new TypeError(
|
|
@@ -9566,7 +9646,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9566
9646
|
if (signal?.aborted) {
|
|
9567
9647
|
throw new DOMException("Prompt aborted", "AbortError");
|
|
9568
9648
|
}
|
|
9569
|
-
if (entry.pendingPromptCount >= maxPendingPromptsPerSession) {
|
|
9649
|
+
if (!isPromotedMidTurn && entry.pendingPromptCount >= maxPendingPromptsPerSession) {
|
|
9570
9650
|
throw new PromptQueueFullError(
|
|
9571
9651
|
maxPendingPromptsPerSession,
|
|
9572
9652
|
entry.pendingPromptCount,
|
|
@@ -9604,6 +9684,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9604
9684
|
promptId,
|
|
9605
9685
|
queuedAt,
|
|
9606
9686
|
...originatorClientId !== void 0 ? { originatorClientId } : {},
|
|
9687
|
+
...isPromotedMidTurn ? { promotedMidTurn: true } : {},
|
|
9607
9688
|
text: extractPromptText(req.prompt),
|
|
9608
9689
|
abortController: pendingAbort,
|
|
9609
9690
|
state: isQueued ? "queued" : "running"
|
|
@@ -9697,9 +9778,11 @@ function createAcpSessionBridge(opts) {
|
|
|
9697
9778
|
}
|
|
9698
9779
|
throw new DOMException("Prompt aborted", "AbortError");
|
|
9699
9780
|
}
|
|
9700
|
-
if (pendingEntry.state === "queued") {
|
|
9701
|
-
|
|
9702
|
-
|
|
9781
|
+
if (pendingEntry.state === "queued" || isPromotedMidTurn) {
|
|
9782
|
+
if (pendingEntry.state === "queued") {
|
|
9783
|
+
delete entry.todoStopGuardAwaitingQueuedPromptOwnerPromptId;
|
|
9784
|
+
pendingEntry.state = "running";
|
|
9785
|
+
}
|
|
9703
9786
|
entry.events.publish({
|
|
9704
9787
|
type: "pending_prompt_started",
|
|
9705
9788
|
promptId: pendingEntry.promptId,
|
|
@@ -9915,12 +9998,26 @@ function createAcpSessionBridge(opts) {
|
|
|
9915
9998
|
}
|
|
9916
9999
|
}
|
|
9917
10000
|
}
|
|
10001
|
+
const shouldSettleMidTurnQueue = entry.pendingPromptCount === 1 && !entry.closing && byId.get(entry.sessionId) === entry;
|
|
10002
|
+
const undrainedMessages = shouldSettleMidTurnQueue ? entry.midTurnMessageQueue.splice(0) : [];
|
|
9918
10003
|
releasePromptSlot();
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
10004
|
+
for (const message of undrainedMessages) {
|
|
10005
|
+
if (message.queueOnly) {
|
|
10006
|
+
try {
|
|
10007
|
+
message.onSettledWithoutDrain?.();
|
|
10008
|
+
} catch (error) {
|
|
10009
|
+
writeStderrLine(
|
|
10010
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} failed to hand undrained queue-only message ${JSON.stringify(message.messageId)} back to its caller: ${JSON.stringify(error instanceof Error ? error.message : String(error))}`
|
|
10011
|
+
);
|
|
10012
|
+
}
|
|
10013
|
+
continue;
|
|
10014
|
+
}
|
|
10015
|
+
promoteMidTurnMessage(
|
|
10016
|
+
entry,
|
|
10017
|
+
message.messageId,
|
|
10018
|
+
message.text,
|
|
10019
|
+
message.originatorClientId
|
|
9922
10020
|
);
|
|
9923
|
-
entry.midTurnMessageQueue.length = 0;
|
|
9924
10021
|
}
|
|
9925
10022
|
void maybeCloseIdleSession(entry, "prompt_settled");
|
|
9926
10023
|
}).catch(() => {
|
|
@@ -11192,7 +11289,7 @@ function createAcpSessionBridge(opts) {
|
|
|
11192
11289
|
}
|
|
11193
11290
|
return { removed: true };
|
|
11194
11291
|
},
|
|
11195
|
-
enqueueMidTurnMessage(sessionId, message, context) {
|
|
11292
|
+
enqueueMidTurnMessage(sessionId, message, context, requestedMessageId, options) {
|
|
11196
11293
|
const entry = byId.get(sessionId);
|
|
11197
11294
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
11198
11295
|
const originatorClientId = resolveTrustedClientId(
|
|
@@ -11200,43 +11297,139 @@ function createAcpSessionBridge(opts) {
|
|
|
11200
11297
|
context?.clientId
|
|
11201
11298
|
);
|
|
11202
11299
|
const trimmed = message.trim();
|
|
11203
|
-
if (trimmed.length === 0
|
|
11300
|
+
if (trimmed.length === 0) {
|
|
11204
11301
|
writeStderrLine(
|
|
11205
|
-
`[mid-turn] session=${entry.sessionId} rejected:
|
|
11302
|
+
`[mid-turn] session=${entry.sessionId} rejected: empty`
|
|
11206
11303
|
);
|
|
11207
11304
|
return { accepted: false };
|
|
11208
11305
|
}
|
|
11306
|
+
if (requestedMessageId !== void 0) {
|
|
11307
|
+
const existing = entry.midTurnMessageQueue.find(
|
|
11308
|
+
(queued) => queued.messageId === requestedMessageId
|
|
11309
|
+
);
|
|
11310
|
+
if (existing) {
|
|
11311
|
+
if (existing.text === trimmed) {
|
|
11312
|
+
return { accepted: true, messageId: requestedMessageId };
|
|
11313
|
+
}
|
|
11314
|
+
writeStderrLine(
|
|
11315
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} rejected id ${JSON.stringify(requestedMessageId)}: text mismatch`
|
|
11316
|
+
);
|
|
11317
|
+
return { accepted: false };
|
|
11318
|
+
}
|
|
11319
|
+
const promoted = entry.pendingPromptList.find(
|
|
11320
|
+
(pending) => pending.promptId === requestedMessageId
|
|
11321
|
+
);
|
|
11322
|
+
if (promoted) {
|
|
11323
|
+
if (promoted.text === trimmed) {
|
|
11324
|
+
return { accepted: true, messageId: requestedMessageId };
|
|
11325
|
+
}
|
|
11326
|
+
writeStderrLine(
|
|
11327
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} rejected promoted id ${JSON.stringify(requestedMessageId)}: text mismatch`
|
|
11328
|
+
);
|
|
11329
|
+
return { accepted: false };
|
|
11330
|
+
}
|
|
11331
|
+
if (entry.settledMidTurnMessageIds.includes(requestedMessageId)) {
|
|
11332
|
+
return { accepted: true, messageId: requestedMessageId };
|
|
11333
|
+
}
|
|
11334
|
+
if (entry.promotedMidTurnMessageIds.includes(requestedMessageId)) {
|
|
11335
|
+
return { accepted: true, messageId: requestedMessageId };
|
|
11336
|
+
}
|
|
11337
|
+
}
|
|
11338
|
+
if (isClosingOrAuthorizingClose(entry)) {
|
|
11339
|
+
writeStderrLine(
|
|
11340
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} rejected: session closing`
|
|
11341
|
+
);
|
|
11342
|
+
return { accepted: false };
|
|
11343
|
+
}
|
|
11344
|
+
const messageId = requestedMessageId ?? randomUUID2();
|
|
11345
|
+
if (entry.pendingPromptCount === 0) {
|
|
11346
|
+
if (options?.queueOnly) {
|
|
11347
|
+
writeStderrLine(
|
|
11348
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} rejected id ${JSON.stringify(messageId)}: session idle`
|
|
11349
|
+
);
|
|
11350
|
+
return { accepted: false };
|
|
11351
|
+
}
|
|
11352
|
+
promoteMidTurnMessage(entry, messageId, trimmed, originatorClientId);
|
|
11353
|
+
return { accepted: true, messageId };
|
|
11354
|
+
}
|
|
11209
11355
|
if (entry.midTurnMessageQueue.length >= MAX_MID_TURN_QUEUE_DEPTH) {
|
|
11210
11356
|
writeStderrLine(
|
|
11211
|
-
`[mid-turn] session=${entry.sessionId} rejected: queue full (depth ${entry.midTurnMessageQueue.length} >= ${MAX_MID_TURN_QUEUE_DEPTH})
|
|
11357
|
+
`[mid-turn] session=${entry.sessionId} rejected: queue full (depth ${entry.midTurnMessageQueue.length} >= ${MAX_MID_TURN_QUEUE_DEPTH})`
|
|
11212
11358
|
);
|
|
11213
11359
|
return { accepted: false };
|
|
11214
11360
|
}
|
|
11215
|
-
const
|
|
11216
|
-
entry.midTurnMessageQueue.push({
|
|
11361
|
+
const queuedMessage = {
|
|
11217
11362
|
messageId,
|
|
11218
11363
|
text: trimmed,
|
|
11219
|
-
originatorClientId
|
|
11220
|
-
|
|
11364
|
+
originatorClientId,
|
|
11365
|
+
...options?.queueOnly ? {
|
|
11366
|
+
queueOnly: true,
|
|
11367
|
+
onSettledWithoutDrain: options.onSettledWithoutDrain
|
|
11368
|
+
} : {}
|
|
11369
|
+
};
|
|
11370
|
+
entry.midTurnMessageQueue.push(queuedMessage);
|
|
11371
|
+
if (originatorClientId) {
|
|
11372
|
+
try {
|
|
11373
|
+
entry.events.publish({
|
|
11374
|
+
type: "pending_prompt_added",
|
|
11375
|
+
promptId: messageId,
|
|
11376
|
+
data: {
|
|
11377
|
+
sessionId,
|
|
11378
|
+
promptId: messageId,
|
|
11379
|
+
text: trimmed,
|
|
11380
|
+
queuedAt: Date.now()
|
|
11381
|
+
},
|
|
11382
|
+
originatorClientId
|
|
11383
|
+
});
|
|
11384
|
+
} catch {
|
|
11385
|
+
}
|
|
11386
|
+
}
|
|
11221
11387
|
return { accepted: true, messageId };
|
|
11222
11388
|
},
|
|
11223
11389
|
removeMidTurnMessage(sessionId, messageId, context) {
|
|
11224
11390
|
const entry = byId.get(sessionId);
|
|
11225
11391
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
11226
|
-
|
|
11227
|
-
entry,
|
|
11228
|
-
context?.clientId
|
|
11229
|
-
);
|
|
11392
|
+
resolveTrustedClientId(entry, context?.clientId);
|
|
11230
11393
|
const index = entry.midTurnMessageQueue.findIndex(
|
|
11231
|
-
(message) => message.messageId === messageId
|
|
11394
|
+
(message) => message.messageId === messageId
|
|
11232
11395
|
);
|
|
11233
11396
|
if (index === -1) {
|
|
11397
|
+
const isPromoted = entry.pendingPromptList.some(
|
|
11398
|
+
(pending) => pending.promptId === messageId && pending.promotedMidTurn === true
|
|
11399
|
+
);
|
|
11400
|
+
if (!isPromoted) {
|
|
11401
|
+
writeStderrLine(
|
|
11402
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} remove missed messageId=${JSON.stringify(messageId)} (already drained or completed)`
|
|
11403
|
+
);
|
|
11404
|
+
return { removed: false };
|
|
11405
|
+
}
|
|
11406
|
+
const promoted = bridgeApi.removePendingPrompt(
|
|
11407
|
+
sessionId,
|
|
11408
|
+
messageId,
|
|
11409
|
+
context
|
|
11410
|
+
);
|
|
11411
|
+
if (promoted.removed) {
|
|
11412
|
+
rememberMidTurnId(entry.settledMidTurnMessageIds, messageId);
|
|
11413
|
+
return promoted;
|
|
11414
|
+
}
|
|
11234
11415
|
writeStderrLine(
|
|
11235
|
-
`[mid-turn] session=${JSON.stringify(entry.sessionId)} remove missed messageId=${JSON.stringify(messageId)} (already drained or
|
|
11416
|
+
`[mid-turn] session=${JSON.stringify(entry.sessionId)} remove missed messageId=${JSON.stringify(messageId)} (already drained or completed)`
|
|
11236
11417
|
);
|
|
11237
11418
|
return { removed: false };
|
|
11238
11419
|
}
|
|
11239
|
-
entry.midTurnMessageQueue.splice(index, 1);
|
|
11420
|
+
const [removed] = entry.midTurnMessageQueue.splice(index, 1);
|
|
11421
|
+
rememberMidTurnId(entry.settledMidTurnMessageIds, messageId);
|
|
11422
|
+
if (removed) {
|
|
11423
|
+
try {
|
|
11424
|
+
entry.events.publish({
|
|
11425
|
+
type: "pending_prompt_completed",
|
|
11426
|
+
promptId: messageId,
|
|
11427
|
+
data: { sessionId, promptId: messageId, state: "removed" },
|
|
11428
|
+
...removed.originatorClientId ? { originatorClientId: removed.originatorClientId } : {}
|
|
11429
|
+
});
|
|
11430
|
+
} catch {
|
|
11431
|
+
}
|
|
11432
|
+
}
|
|
11240
11433
|
return { removed: true };
|
|
11241
11434
|
},
|
|
11242
11435
|
async enqueueBackgroundNotification(sessionId, notification) {
|
|
@@ -11266,6 +11459,22 @@ function createAcpSessionBridge(opts) {
|
|
|
11266
11459
|
void maybeCloseIdleSession(entry, "agent_notification_settled");
|
|
11267
11460
|
}
|
|
11268
11461
|
},
|
|
11462
|
+
getMidTurnMessages(sessionId, context) {
|
|
11463
|
+
const entry = byId.get(sessionId);
|
|
11464
|
+
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
11465
|
+
resolveTrustedClientId(entry, context?.clientId);
|
|
11466
|
+
return {
|
|
11467
|
+
// Anonymous enqueues (live steering) stay off the shared surface:
|
|
11468
|
+
// their delegation text is not a user message other attached clients
|
|
11469
|
+
// should restore into their queue views.
|
|
11470
|
+
messages: entry.midTurnMessageQueue.filter((message) => message.originatorClientId !== void 0).map((message) => ({
|
|
11471
|
+
messageId: message.messageId,
|
|
11472
|
+
text: message.text
|
|
11473
|
+
})),
|
|
11474
|
+
settledMessageIds: [...entry.settledMidTurnMessageIds],
|
|
11475
|
+
promotedMessageIds: [...entry.promotedMidTurnMessageIds]
|
|
11476
|
+
};
|
|
11477
|
+
},
|
|
11269
11478
|
async generateSessionBtw(sessionId, question, signal, _context) {
|
|
11270
11479
|
const entry = byId.get(sessionId);
|
|
11271
11480
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
@@ -11506,7 +11715,11 @@ function createAcpSessionBridge(opts) {
|
|
|
11506
11715
|
const entry = byId.get(sessionId);
|
|
11507
11716
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
11508
11717
|
if (isClosingOrAuthorizingClose(entry)) {
|
|
11509
|
-
throw new SessionNotFoundError(
|
|
11718
|
+
throw new SessionNotFoundError(
|
|
11719
|
+
sessionId,
|
|
11720
|
+
"The session is closing; retry after close completes",
|
|
11721
|
+
"session_closing"
|
|
11722
|
+
);
|
|
11510
11723
|
}
|
|
11511
11724
|
const info = channelInfoForEntry(entry);
|
|
11512
11725
|
if (!info || info.isDying) throw new SessionNotFoundError(sessionId);
|