@qwen-code/qwen-code 0.21.1-simplify-system-prompt.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/model-providers.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +38 -28
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/github.md +107 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
- package/bundled/qc-helper/docs/features/code-review.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +52 -15
- package/bundled/qc-helper/docs/features/mcp.md +9 -1
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
- package/bundled/qc-helper/docs/features/sub-agents.md +20 -0
- package/bundled/qc-helper/docs/qwen-serve.md +4 -2
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
- package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
- package/bundled/review/DESIGN.md +19 -0
- package/bundled/review/SKILL.md +120 -61
- package/chunks/MaxSizedBox-VI3ROJJA.js +84 -0
- package/chunks/{StandaloneSessionPicker-O6RKBPU4.js → StandaloneSessionPicker-LYXKD2EV.js} +66 -68
- package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-DFVPFQ6C.js} +2 -2
- package/chunks/{acpAgent-HYFVXVDR.js → acpAgent-WN5SRDQO.js} +1317 -542
- package/chunks/agent-K6ECSM64.js +80 -0
- package/chunks/agent-headless-NO4Y2HOE.js +74 -0
- package/chunks/{anthropicContentGenerator-LXUXMOE7.js → anthropicContentGenerator-V2QOGVYD.js} +61 -20
- package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-6K6U7XYJ.js} +4 -4
- package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-GD2IJJ7I.js} +4 -4
- package/chunks/bridge-3KJEWDNE.js +90 -0
- package/chunks/{build-RV63TIRH.js → build-S6DO7LMM.js} +1 -1
- package/chunks/{ca-25EDXPFZ.js → ca-6W3SK7OQ.js} +6 -1
- package/chunks/{channel-management-service-G74LFADV.js → channel-management-service-XR7GZSWF.js} +4 -4
- package/chunks/channel-settings-store-HW4FXXUA.js +87 -0
- package/chunks/{channel-worker-group-PTJIJSKC.js → channel-worker-group-XDPTDWTX.js} +9 -5
- package/chunks/{channel-worker-manager-WIMGM2FD.js → channel-worker-manager-YYEHVRRE.js} +9 -5
- package/chunks/{channel-worker-supervisor-KUFTR6P5.js → channel-worker-supervisor-74HTWA2G.js} +5 -4
- package/chunks/{chunk-M5JM7OSF.js → chunk-2DN4J57Y.js} +2 -3
- package/chunks/{chunk-WDSWXQU3.js → chunk-2FAK6PNM.js} +2 -2
- package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
- package/chunks/{chunk-EPDRMGT4.js → chunk-2LKVPASC.js} +4 -28
- package/chunks/{chunk-PWTZEM3C.js → chunk-2LQTH543.js} +3 -37
- package/chunks/{chunk-PANH4R3B.js → chunk-2N7CODY5.js} +18 -12
- package/chunks/{chunk-ER5LWJR6.js → chunk-2XSLTRFZ.js} +3 -3
- package/chunks/{chunk-6PSLCFQ2.js → chunk-3EFXSQCM.js} +18 -9
- package/chunks/{chunk-HIJQF5B5.js → chunk-3L2SPEBH.js} +1 -1
- package/chunks/{chunk-BIQWWWJN.js → chunk-4G2BISNC.js} +1 -1
- package/chunks/{chunk-B4UMZKMU.js → chunk-52ZSWYEG.js} +1 -1
- package/chunks/{chunk-YAF5VNU7.js → chunk-5KTQXHPY.js} +4 -5
- package/chunks/{chunk-2YZJCM5T.js → chunk-5MKRTI4T.js} +4 -4
- package/chunks/{chunk-DHHOYAPR.js → chunk-5TBMQLGG.js} +7 -7
- package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
- package/chunks/{chunk-FY3M44RD.js → chunk-5YKDXHUY.js} +3 -3
- package/chunks/{chunk-TF2X2WCT.js → chunk-5ZF5XXTS.js} +2 -2
- package/chunks/{chunk-K4XWPEWB.js → chunk-64LQLPL7.js} +4 -33
- package/chunks/{chunk-B7QDM6Z7.js → chunk-657BH7VM.js} +2 -2
- package/chunks/{chunk-5THCYPLO.js → chunk-65PQENQP.js} +14 -7
- package/chunks/{chunk-J6D3VXCC.js → chunk-6PE7N3A4.js} +17 -6
- package/chunks/{chunk-JZA3JUDJ.js → chunk-6QIGFD5W.js} +1 -1
- package/chunks/{chunk-Z5BLYMZM.js → chunk-6RPMI2AB.js} +6 -6
- package/chunks/{chunk-OHNBB4XR.js → chunk-75GFAX4R.js} +1 -1
- package/chunks/{chunk-BO4XCS7P.js → chunk-75MIQ3LV.js} +20 -85
- package/chunks/{chunk-52O2CIUL.js → chunk-7AEJDLRA.js} +130 -5
- package/chunks/{chunk-BYFNTGKI.js → chunk-7BAU433D.js} +2287 -941
- package/chunks/{chunk-ZE5WPL4I.js → chunk-7DXQIJID.js} +3 -3
- package/chunks/{chunk-ML52PL6O.js → chunk-7I5GTCT4.js} +483 -248
- package/chunks/{chunk-A5L3JMUA.js → chunk-7XATOOE7.js} +18 -4
- package/chunks/{chunk-C3NS4F2Q.js → chunk-A2D5BAVP.js} +1 -1
- package/chunks/{chunk-5I2IWRSH.js → chunk-A3NDJ5SB.js} +2 -2
- package/chunks/{chunk-2JM6GZ5D.js → chunk-A4COXFB3.js} +8 -13
- package/chunks/{chunk-CC4N4M36.js → chunk-AQIDMUGU.js} +1 -1
- package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
- package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
- package/chunks/{chunk-BJX6ZSUK.js → chunk-BCZFQXWK.js} +2 -2
- package/chunks/{chunk-SRZ6DXVG.js → chunk-BGTQCTQW.js} +44 -136
- package/chunks/{chunk-PSWQZHEA.js → chunk-BMFALVGQ.js} +1 -1
- package/chunks/{chunk-XHRTVPG2.js → chunk-BNWB5CYE.js} +7 -7
- package/chunks/{chunk-P5V4T7NK.js → chunk-BPZKP57P.js} +11 -3
- package/chunks/{chunk-2OM7GEXO.js → chunk-CAPPWD3X.js} +3 -3
- package/chunks/{chunk-LNURQEMZ.js → chunk-CQL64ESB.js} +7 -7
- package/chunks/{chunk-TOFQCPDC.js → chunk-CVHIL5IG.js} +4 -5
- package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
- package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
- package/chunks/{chunk-SQBYH7PX.js → chunk-DZLYR4U3.js} +1 -1
- package/chunks/{chunk-JALU3ZDU.js → chunk-EIF3FXTB.js} +117 -24
- package/chunks/{chunk-TQCBGUHN.js → chunk-EJGJIBRS.js} +5 -5
- package/chunks/{chunk-5U4IPFBR.js → chunk-EVKE2FZL.js} +4 -4
- package/chunks/{chunk-OKY7HXPG.js → chunk-FNMZK765.js} +2 -2
- package/chunks/{chunk-KU5XMLDK.js → chunk-FTD6DP4T.js} +3 -1
- package/chunks/chunk-FYJ7W2PI.js +194 -0
- package/chunks/{chunk-L5UHQJTJ.js → chunk-GATT5TKW.js} +1 -1
- package/chunks/{chunk-MVS3NS2N.js → chunk-GEBV2JGB.js} +28 -5
- package/chunks/{chunk-VAK25FTU.js → chunk-GKX7E4CO.js} +1 -1
- package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
- package/chunks/{chunk-N3FAY5CM.js → chunk-GNR2RNMP.js} +157 -4
- package/chunks/{chunk-YH6G52F2.js → chunk-GXIJHV66.js} +4 -4
- package/chunks/{chunk-HV3G62R6.js → chunk-GZ3RCT54.js} +1 -1
- package/chunks/{chunk-QY5MMZ6O.js → chunk-HMRM2A3U.js} +3 -3
- package/chunks/chunk-HV26XH34.js +319 -0
- package/chunks/{chunk-M4UKFCZ2.js → chunk-J7OACQDE.js} +193 -155
- package/chunks/{chunk-3HBZKBMQ.js → chunk-JFMA7Y5M.js} +5 -5
- package/chunks/{chunk-OJGCZBB7.js → chunk-JHNRZMHI.js} +41 -36
- package/chunks/{chunk-63P4EL5V.js → chunk-JMONIXMJ.js} +1 -1
- package/chunks/{chunk-L26JL52R.js → chunk-JSD33JG6.js} +47 -64
- package/chunks/{chunk-KIUFNBHR.js → chunk-JTV5K7NH.js} +1 -1
- package/chunks/{chunk-PHVR5UUY.js → chunk-JX27F6QS.js} +1 -1
- package/chunks/chunk-JYBU6YUE.js +378 -0
- package/chunks/{chunk-A6UO2C7C.js → chunk-KAMYKP7E.js} +167 -81
- package/chunks/{chunk-LG4GZIVV.js → chunk-KCO4FLFJ.js} +4 -4
- package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
- package/chunks/{chunk-RHLZR4E5.js → chunk-LGAOC3ZS.js} +1 -1
- package/chunks/{chunk-DM22XS4K.js → chunk-LO4ROVP4.js} +261 -15
- package/chunks/{chunk-NH6KE4JX.js → chunk-LW3RFMG7.js} +3 -3
- package/chunks/{chunk-J56UI34H.js → chunk-M7OONWYU.js} +2 -2
- package/chunks/{chunk-V6VRAM7B.js → chunk-MHAIJPTD.js} +12 -12
- package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
- package/chunks/{chunk-LZEMEFKY.js → chunk-MR5EAQ5M.js} +1 -1
- package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
- package/chunks/{chunk-H5FFA6TH.js → chunk-NOKIVHOL.js} +16 -3
- package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
- package/chunks/{chunk-B6ZJ7SI6.js → chunk-OCESJA77.js} +391 -328
- package/chunks/chunk-OCPBI7J5.js +18 -0
- package/chunks/{chunk-E5TUC6CA.js → chunk-OKF7JF3R.js} +3 -3
- package/chunks/{chunk-2Q3OT4OV.js → chunk-P4WOAOJW.js} +141 -64
- package/chunks/{chunk-4M377AZG.js → chunk-PB3MBFKG.js} +6 -6
- package/chunks/{chunk-QPDRAXDJ.js → chunk-PLDQBIO6.js} +1 -1
- package/chunks/{chunk-FNQ6T3CV.js → chunk-PONHVBRT.js} +10 -7
- package/chunks/{chunk-RWS5VYWC.js → chunk-PT722TDT.js} +267 -378
- package/chunks/chunk-Q43KPN7X.js +2196 -0
- package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
- package/chunks/{chunk-SASBXAQL.js → chunk-QIZKCVM3.js} +4 -4
- package/chunks/{chunk-32MVHM4T.js → chunk-RCUQIPTN.js} +1 -1
- package/chunks/{chunk-6FGBXPWM.js → chunk-RPLGZJV2.js} +38 -44
- package/chunks/{chunk-3IXOIAKE.js → chunk-S4WJVPZW.js} +18 -6
- package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
- package/chunks/{chunk-INADJJGW.js → chunk-S7W2GKIO.js} +0 -2
- package/chunks/{chunk-MUP3T3AD.js → chunk-SGFT55XI.js} +1 -35
- package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
- package/chunks/chunk-T26EAKDL.js +13 -0
- package/chunks/{chunk-3MSHSCSN.js → chunk-T2QMKU3R.js} +79 -1
- package/chunks/{chunk-VFSJ5VRH.js → chunk-T3O2B4XO.js} +3 -3
- package/chunks/{chunk-MSLKI6C2.js → chunk-T4TXDL7G.js} +32 -21
- package/chunks/{chunk-E5WH5O3C.js → chunk-TBBV36Y4.js} +4 -4
- package/chunks/{chunk-VV6XU5L7.js → chunk-TCIFAA7K.js} +16 -11
- package/chunks/{chunk-DN6ZX5AY.js → chunk-TDL6LB4K.js} +46 -11
- package/chunks/{chunk-W4CQXHT6.js → chunk-TFRMVU6R.js} +1 -1
- package/chunks/{chunk-GDIPH4JY.js → chunk-TV64SXKD.js} +6 -6
- package/chunks/{chunk-FQK6JAFG.js → chunk-U3E3UQAA.js} +4 -4
- package/chunks/{chunk-7FZEBPKS.js → chunk-UBEPNVDI.js} +23 -18
- package/chunks/{chunk-NL7LTRLR.js → chunk-UHUSJ6X7.js} +29 -68
- package/chunks/{chunk-ZOIFNCKL.js → chunk-UPUG4GXM.js} +3 -23
- package/chunks/{chunk-6GMVPFB2.js → chunk-UWMLWVCA.js} +19 -6
- package/chunks/{chunk-U7TXFVUN.js → chunk-VCPIZRYH.js} +118 -95
- package/chunks/{chunk-LNARWLZQ.js → chunk-VWOOBLTY.js} +2 -2
- package/chunks/{chunk-I7XZ3RY5.js → chunk-VYOXCEPJ.js} +1 -1
- package/chunks/{chunk-USTWD7QV.js → chunk-W4MIWP6M.js} +26 -16
- package/chunks/{chunk-DLWL3Z7A.js → chunk-WBSMNTSV.js} +3 -3
- package/chunks/{chunk-G4WFQUYQ.js → chunk-WUZ7H6DP.js} +1 -1
- package/chunks/{chunk-2JZBVYTU.js → chunk-WZRWHXFE.js} +1 -8
- package/chunks/{chunk-DM4Q4JJH.js → chunk-X5WNMMIA.js} +22506 -33611
- package/chunks/{chunk-MK7VQDN3.js → chunk-XBYYDKAZ.js} +7 -6
- package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
- package/chunks/{chunk-BRRAJXPA.js → chunk-XFZYFU3I.js} +1 -1
- package/chunks/{chunk-3QMGYBFN.js → chunk-XWWKIXVD.js} +1 -80
- package/chunks/{chunk-3SJ43L4W.js → chunk-XZC5VLBZ.js} +2 -0
- package/chunks/{chunk-UUUTRMI2.js → chunk-Y4IHBGBP.js} +1 -1
- package/chunks/{chunk-PR75REBZ.js → chunk-Y6AXW2OG.js} +12 -82
- package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
- package/chunks/{chunk-3JAQDSXN.js → chunk-YGF33UXG.js} +70 -8
- package/chunks/chunk-Z4X5MTRT.js +133 -0
- package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
- package/chunks/{chunk-ZD6UTE4A.js → chunk-ZHBO7WVX.js} +1 -1
- package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
- package/chunks/{chunk-66RMLJHC.js → chunk-ZURDMIDR.js} +355 -143
- package/chunks/{computer-use-DOFAHZAB.js → computer-use-ZTIDHMMA.js} +48 -50
- package/chunks/{config-utils-VFQXVGNR.js → config-utils-NYSXDMEQ.js} +4 -4
- package/chunks/contextCommand-2PIEU37Z.js +79 -0
- package/chunks/core-runtime-3XEYLQFK.js +133 -0
- package/chunks/{create-sub-session-7543K2QA.js → create-sub-session-R76FVXCI.js} +45 -47
- package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-SBYUMSSS.js} +3 -3
- package/chunks/{cron-create-YIID5XAW.js → cron-create-2QK6TCEC.js} +6 -6
- package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-FDCDFYMG.js} +5 -5
- package/chunks/{cron-list-XEGS463Q.js → cron-list-XN3WVBTP.js} +6 -6
- package/chunks/{daemon-VOMQW7KZ.js → daemon-Q2AB5Z23.js} +167 -15
- package/chunks/daemon-status-provider-3XJI6CAL.js +89 -0
- package/chunks/daemon-trust-policy-ILUDTLHD.js +84 -0
- package/chunks/daemon-trust-policy-monitor-HS3PKKRO.js +171 -0
- package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
- package/chunks/deferred-core-runtime-X4QV662U.js +88 -0
- package/chunks/dist-BSTVRPMT.js +4227 -0
- package/chunks/{dist-NNVBBOGU.js → dist-DOLYHMXE.js} +2 -2
- package/chunks/{dist-RTJFMNEZ.js → dist-HVRQ2CFL.js} +271 -11
- package/chunks/{dist-ANLAT3GS.js → dist-IXQEQWRG.js} +2 -1
- package/chunks/{dist-BRB6EXK4.js → dist-SSU66DM4.js} +3 -3
- package/chunks/{dist-KTYYJ2C5.js → dist-SV7Q3AWJ.js} +1 -1
- package/chunks/{dist-K6Y4E7FX.js → dist-YGBBMK3Z.js} +1 -1
- package/chunks/earlyInputCapture-XKLZT7ZD.js +81 -0
- package/chunks/{edit-RIEOJWKB.js → edit-HHGIOTQ2.js} +47 -49
- package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
- package/chunks/{enter-worktree-OGK5FQ3R.js → enter-worktree-ZN7PUQ46.js} +47 -49
- package/chunks/{enterPlanMode-IWZYALIB.js → enterPlanMode-EIFIDSIV.js} +47 -49
- package/chunks/{environment-VZ7BRI4Q.js → environment-XXQ75D2Q.js} +47 -49
- package/chunks/errors-4GMVU7CK.js +87 -0
- package/chunks/esm-K5FARBNI.js +5548 -0
- package/chunks/{exit-worktree-4TEYVIVP.js → exit-worktree-GXMI4ATY.js} +47 -49
- package/chunks/exitPlanMode-34UVY7M6.js +72 -0
- package/chunks/{fast-path-HYE7IFEV.js → fast-path-VPIVA7L6.js} +13 -3
- package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
- package/chunks/{gemini-NGRQX3YJ.js → gemini-4BWIK4WD.js} +103 -103
- package/chunks/{geminiContentGenerator-FQHPFZSR.js → geminiContentGenerator-3XVV5MSS.js} +7 -7
- package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
- package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
- package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
- package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
- package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
- package/chunks/{glob-FRTM3X2E.js → glob-TZ2ABCJG.js} +47 -49
- package/chunks/{grep-RKWVROCW.js → grep-BEF463NA.js} +49 -50
- package/chunks/handleAutoUpdate-L6ERF36Y.js +80 -0
- package/chunks/i18n-FMM5FDXR.js +96 -0
- package/chunks/{image-gen-WIEM7KZA.js → image-gen-HHVLF7HS.js} +12 -12
- package/chunks/initializer-625TIAIO.js +85 -0
- package/chunks/installationInfo-6AM4I2Y3.js +79 -0
- package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
- package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-72IYCAZV.js} +3 -3
- package/chunks/lib-RUF3WZA6.js +9 -0
- package/chunks/list-L2GA674Y.js +88 -0
- package/chunks/{list-agents-5KJJHR6I.js → list-agents-R6KDXQR3.js} +3 -3
- package/chunks/loadedSettingsAdapter-SPUTNKAV.js +82 -0
- package/chunks/{loggingContentGenerator-WGM27QAW.js → loggingContentGenerator-LKOF7XI7.js} +31 -30
- package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-3IQKCYAH.js} +7 -7
- package/chunks/{ls-NTK6VOQJ.js → ls-DKZ37A7N.js} +5 -5
- package/chunks/{lsp-2JI24STP.js → lsp-QNWN7KN3.js} +3 -3
- package/chunks/{managed-npm-update-JQ2CG3RH.js → managed-npm-update-ACQGGIN5.js} +46 -48
- package/chunks/mcp-SZLHKFJW.js +82 -0
- package/chunks/{monitor-7FEWXX5F.js → monitor-DF52UVHI.js} +47 -49
- package/chunks/nonInteractiveCli-5T7KYKLK.js +144 -0
- package/chunks/{notebook-edit-JGJV2K6J.js → notebook-edit-FCWS4XVN.js} +47 -49
- package/chunks/{openaiContentGenerator-JPVXDTAO.js → openaiContentGenerator-7LDK3DCJ.js} +25 -27
- package/chunks/pidfile-6ERW3DF4.js +85 -0
- package/chunks/process-registry-2CHQBXH5.js +157 -0
- package/chunks/{processUtils-V2LCK6T6.js → processUtils-COKZAMUP.js} +2 -2
- package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
- package/chunks/{qwenContentGenerator-TICV2W2Z.js → qwenContentGenerator-TKWUMR7N.js} +51 -53
- package/chunks/{qwenOAuth2-XGFI5XJG.js → qwenOAuth2-7HMU47SF.js} +10 -10
- package/chunks/read-file-X6DRC574.js +29 -0
- package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-GFTWYXMK.js} +4 -4
- package/chunks/{record-artifact-RQKFYO5B.js → record-artifact-XAMSFSW4.js} +3 -3
- package/chunks/resumeHistoryUtils-PFPM2GWM.js +90 -0
- package/chunks/ripGrep-OWV2IVJC.js +72 -0
- package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
- package/chunks/{run-qwen-serve-3VCV4I7E.js → run-qwen-serve-TSTCO4XE.js} +917 -249
- package/chunks/{runtime-AXJWIEDU.js → runtime-DAUPSUKI.js} +55 -57
- package/chunks/{scheduler-RS2I6RU5.js → scheduler-KMADMT26.js} +45 -47
- package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
- package/chunks/{sdk-exporters-http-FS6ZV7MF.js → sdk-exporters-http-WO556XNU.js} +7 -7
- package/chunks/{sdk-impl-7FZSCSXB.js → sdk-impl-LPAVACSF.js} +10 -10
- package/chunks/{send-message-Q6OOR6BR.js → send-message-SAWK4DZX.js} +6 -6
- package/chunks/serve-NNRWS6F4.js +88 -0
- package/chunks/{server-HRZ23U7M.js → server-WEH7DVCH.js} +3304 -842
- package/chunks/{session-7XHZKTVV.js → session-WXC56V2I.js} +94 -94
- package/chunks/{settings-7ZGZDXAS.js → settings-DJDXFDZ3.js} +54 -56
- package/chunks/shell-JN5VRQXD.js +82 -0
- package/chunks/{skill-LIWXNLDW.js → skill-SGXPKJCS.js} +20 -22
- package/chunks/skill-settings-VJ5PDMZI.js +90 -0
- package/chunks/spawnChannel-ETMJW7YX.js +81 -0
- package/chunks/standalone-update-MK3Z7KBI.js +91 -0
- package/chunks/{startInteractiveUI-IW3CSKHA.js → startInteractiveUI-ZCGIXPGT.js} +715 -373
- package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-355CB6CJ.js} +4 -4
- package/chunks/{task-create-N7WQSGYA.js → task-create-INGWNUG4.js} +10 -10
- package/chunks/{task-list-FOPULZEP.js → task-list-5XNNGTF4.js} +7 -7
- package/chunks/{task-stop-H6RHXFVQ.js → task-stop-4ROAOBXH.js} +3 -3
- package/chunks/{task-update-M57TFZJT.js → task-update-CRK5VWWZ.js} +10 -10
- package/chunks/{team-create-O2FROQ4R.js → team-create-QQGAJG7P.js} +49 -51
- package/chunks/{team-delete-QE2UXJL7.js → team-delete-S2RCXA4P.js} +7 -7
- package/chunks/{team-plan-approval-Q6WDBXTQ.js → team-plan-approval-RT7Q5R6O.js} +47 -49
- package/chunks/theme-manager-EEWIQJ7J.js +76 -0
- package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-7WM3VDMY.js} +7 -7
- package/chunks/{tool-search-APECNQ3Z.js → tool-search-Z3Z4AYKP.js} +19 -21
- package/chunks/total-session-admission-44JKRWQD.js +84 -0
- package/chunks/{tree-sitter-FS4VPMZA.js → tree-sitter-4D7QS7F6.js} +1 -1
- package/chunks/{tree-sitter-bash-6B46JJCV.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
- package/chunks/trustedFolders-X2JEIO57.js +94 -0
- package/chunks/{update-relaunch-ON5MDJQG.js → update-relaunch-VWNPYDIP.js} +5 -5
- package/chunks/updateCheck-KAQH67DV.js +91 -0
- package/chunks/useAutoAcceptIndicator-JH6BCF7S.js +92 -0
- package/chunks/{validateNonInterActiveAuth-JBLKBKRD.js → validateNonInterActiveAuth-GIUJ2UFS.js} +88 -88
- package/chunks/{version-LTNUBQJY.js → version-BGLYIJUY.js} +1 -1
- package/chunks/{web-fetch-L5UTI53V.js → web-fetch-OTDU4VQF.js} +19 -21
- package/chunks/{web-search-KM33JOS3.js → web-search-FP6SIHPR.js} +13 -13
- package/chunks/{workflow-K7FAWV77.js → workflow-YCIVBYSB.js} +48 -50
- package/chunks/workspace-providers-status-S35YAIUS.js +85 -0
- package/chunks/{workspace-registration-store-6TGVDJV5.js → workspace-registration-store-OTMS3H4C.js} +1 -1
- package/chunks/workspace-registry-O63R6IZ4.js +92 -0
- package/chunks/workspace-service-M6LLHKJ5.js +99 -0
- package/chunks/workspace-skills-status-C2V7BAIS.js +85 -0
- package/chunks/workspace-trust-reconciler-IBUPOUJN.js +345 -0
- package/chunks/write-file-3BZC3EAE.js +72 -0
- package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
- package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
- package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
- package/chunks/zoom-image-TZ6S2O57.js +351 -0
- package/cli.js +13 -13
- package/locales/ca.js +7 -2
- package/locales/de.js +7 -2
- package/locales/en.js +10 -2
- package/locales/fr.js +7 -2
- package/locales/ja.js +7 -2
- package/locales/pt.js +7 -2
- package/locales/ru.js +7 -2
- package/locales/zh-TW.js +10 -2
- package/locales/zh.js +10 -2
- package/package.json +5 -4
- package/web-shell/assets/{arc-BbHijhiN.js → arc-75-Wdeo3.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-Cb4B_JD0.js → architectureDiagram-3BPJPVTR-FKeXQbyP.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-Dsjlh3H-.js → blockDiagram-GPEHLZMM-CY0vc-A3.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Cp5AeR4U.js → c4Diagram-AAUBKEIU-CNP-A-8u.js} +1 -1
- package/web-shell/assets/channel-DPYMT76A.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CLcY7W2e.js → chunk-2J33WTMH-GybS4Gii.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BUhvY2LR.js → chunk-4BX2VUAB-02H91V8v.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-kDIFC_71.js → chunk-55IACEB6-D3M-2VT6.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CIBO15f2.js → chunk-727SXJPM-CCu29u4H.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BJ_T_slV.js → chunk-AQP2D5EJ-CaFKWgrn.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BEkW35J8.js → chunk-FMBD7UC4-ZZpPqIwQ.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-GGPxofay.js → chunk-ND2GUHAM-D22DqGs8.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-Bifllrb6.js → chunk-QZHKN3VN-Bu85S0fw.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-C-Add_Dp.js → cose-bilkent-S5V4N54A-f1CK1Gwe.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-B7MfwNq2.js → dagre-BM42HDAG-D0Ow8F_n.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CY_0zuDz.js → diagram-2AECGRRQ-BPrmTWp8.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-VyYSbCgA.js → diagram-5GNKFQAL-HccuFAzy.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CBiIZ2PL.js → diagram-KO2AKTUF-BrS76mbA.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BL3CrVOx.js → diagram-LMA3HP47-V7T9lU-5.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CZUPx96P.js → diagram-OG6HWLK6-DKidyJMR.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-B81xHr1-.js → erDiagram-TEJ5UH35-DBadZIkp.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-EZWhir-J.js → flowDiagram-I6XJVG4X-BymfqdNJ.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CVFSuIAg.js → ganttDiagram-6RSMTGT7-DOw340jf.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-C1H2uQDv.js → gitGraphDiagram-PVQCEYII-_8EiD8sl.js} +1 -1
- package/web-shell/assets/{index-BYo99NBH.js → index-CKIadvET.js} +1 -1
- package/web-shell/assets/index-D1eXNRHe.js +1389 -0
- package/web-shell/assets/index-DVLD4CQq.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-BwyFMlF8.js → infoDiagram-5YYISTIA-D61KYQBu.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CQ7Yhn2Y.js → ishikawaDiagram-YF4QCWOH-CsiXSpNx.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CJn2sf0l.js → journeyDiagram-JHISSGLW-Sdfionyh.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DaNRqwVN.js → kanban-definition-UN3LZRKU-C3WI3Cnl.js} +1 -1
- package/web-shell/assets/{linear-DCKODZe2.js → linear-Dpigcc62.js} +1 -1
- package/web-shell/assets/{mermaid.core-CTGJOk27.js → mermaid.core-Ct97pqgW.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BKU3_3rg.js → mindmap-definition-RKZ34NQL-BzeaN0rB.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-COcwBJ82.js → pieDiagram-4H26LBE5-CvjgcbVD.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CQnQ443x.js → quadrantDiagram-W4KKPZXB-BUzgTNdH.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ2oj5cD.js → requirementDiagram-4Y6WPE33-B7zKlgUQ.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BxAv5mNu.js → sankeyDiagram-5OEKKPKP-Bb9CQgrT.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CztaySPs.js → sequenceDiagram-3UESZ5HK-DJ6V7itG.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CTQT1oGD.js → stateDiagram-AJRCARHV-IImflERY.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-K9Mkex5A.js → timeline-definition-PNZ67QCA-6Q_uWHKh.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-B2rVIw76.js → vennDiagram-CIIHVFJN-TmyKyjwv.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-Z1w2JR4M.js → wardley-L42UT6IY-CRh9uiPv.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CIX9aKXf.js → wardleyDiagram-YWT4CUSO-59TKAW8w.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-CI9DLIKB.js → xychartDiagram-2RQKCTM6-GCSUIK2L.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-INHRH72H.js +0 -86
- package/chunks/agent-VXDAN5JK.js +0 -82
- package/chunks/agent-headless-K4ZMMNBD.js +0 -76
- package/chunks/bridge-LGPZCFHO.js +0 -91
- package/chunks/channel-settings-store-CHCDRTPY.js +0 -89
- package/chunks/chunk-SZRN75WQ.js +0 -29
- package/chunks/chunk-UGYMA4EI.js +0 -219
- package/chunks/chunk-VCBZUOSI.js +0 -8575
- package/chunks/contextCommand-QIZYHDR5.js +0 -81
- package/chunks/daemon-status-provider-OS5UWBHV.js +0 -90
- package/chunks/earlyInputCapture-WQT24RWD.js +0 -83
- package/chunks/errors-PCX25DVP.js +0 -89
- package/chunks/exitPlanMode-GHPUHBZJ.js +0 -423
- package/chunks/handleAutoUpdate-2CZQRJ66.js +0 -82
- package/chunks/i18n-XEQVMRKN.js +0 -98
- package/chunks/initializer-OVGZ4FLY.js +0 -87
- package/chunks/installationInfo-5UUQJI6Y.js +0 -81
- package/chunks/list-HODU6RXD.js +0 -90
- package/chunks/loadedSettingsAdapter-TYNLBALY.js +0 -84
- package/chunks/mcp-J3DFWX4A.js +0 -84
- package/chunks/nonInteractiveCli-F4GYSMHT.js +0 -144
- package/chunks/pidfile-4VNAR3EP.js +0 -87
- package/chunks/read-file-LZXUR4TO.js +0 -31
- package/chunks/resumeHistoryUtils-65OX3SGJ.js +0 -92
- package/chunks/ripGrep-2U2FRGMV.js +0 -74
- package/chunks/serve-W2GC47CM.js +0 -90
- package/chunks/shell-45IPBDP5.js +0 -84
- package/chunks/spawnChannel-PVXQ5AGV.js +0 -83
- package/chunks/src-AY65BYR7.js +0 -3166
- package/chunks/standalone-update-ZMFNKAEY.js +0 -93
- package/chunks/theme-manager-YYPZFBAH.js +0 -78
- package/chunks/total-session-admission-JXES723M.js +0 -85
- package/chunks/trustedFolders-HVI7IXUH.js +0 -94
- package/chunks/updateCheck-WUJGHWZZ.js +0 -93
- package/chunks/useAutoAcceptIndicator-CHSTZLZD.js +0 -94
- package/chunks/workspace-providers-status-GAKSF4LL.js +0 -87
- package/chunks/workspace-registry-A7NQUONG.js +0 -89
- package/chunks/workspace-service-STGVSO4N.js +0 -99
- package/chunks/workspace-skills-status-66AK3DUA.js +0 -86
- package/chunks/write-file-HUUCEG4P.js +0 -74
- package/web-shell/assets/channel-Bzdx6E8P.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Cd6wbiuK.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cd6wbiuK.js +0 -1
- package/web-shell/assets/index-B2bXx96W.js +0 -1249
- package/web-shell/assets/index-_8mKjx8q.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BjMdT6E_.js +0 -1
- package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
- package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
- /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
|
@@ -8,8 +8,25 @@ import {
|
|
|
8
8
|
serializedBridgeEventByteLength
|
|
9
9
|
} from "./chunk-GLWP3FDB.js";
|
|
10
10
|
import {
|
|
11
|
-
normalizeCompactedReplayMaxBytes
|
|
12
|
-
|
|
11
|
+
normalizeCompactedReplayMaxBytes,
|
|
12
|
+
normalizeMaxJournalBytes,
|
|
13
|
+
normalizeMaxJournalEvents
|
|
14
|
+
} from "./chunk-XCGIMOLN.js";
|
|
15
|
+
import {
|
|
16
|
+
MCP_RESTART_SERVER_DEADLINE_MS
|
|
17
|
+
} from "./chunk-OCPBI7J5.js";
|
|
18
|
+
import {
|
|
19
|
+
defaultSpawnChannelFactory
|
|
20
|
+
} from "./chunk-KAMYKP7E.js";
|
|
21
|
+
import {
|
|
22
|
+
BridgeChannelClosedError,
|
|
23
|
+
BridgeTimeoutError,
|
|
24
|
+
SERVE_CONTROL_EXT_METHODS,
|
|
25
|
+
SERVE_STATUS_EXT_METHODS,
|
|
26
|
+
STATUS_SCHEMA_VERSION,
|
|
27
|
+
createIdleWorkspaceExtensionsStatus,
|
|
28
|
+
createIdleWorkspaceHooksStatus
|
|
29
|
+
} from "./chunk-FTD6DP4T.js";
|
|
13
30
|
import {
|
|
14
31
|
CHANNEL_STARTUP_PROFILE_META_KEY,
|
|
15
32
|
CHANNEL_STARTUP_PROFILE_VERSION,
|
|
@@ -21,8 +38,9 @@ import {
|
|
|
21
38
|
LOAD_REPLAY_VERSION,
|
|
22
39
|
MID_TURN_QUEUE_DRAIN_METHOD,
|
|
23
40
|
PROMPT_CANCEL_METHOD,
|
|
41
|
+
TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD,
|
|
24
42
|
TODO_STOP_GUARD_QUEUE_RELEASE_METHOD
|
|
25
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-XZC5VLBZ.js";
|
|
26
44
|
import {
|
|
27
45
|
BranchWhilePromptActiveError,
|
|
28
46
|
CancelSentinelCollisionError,
|
|
@@ -32,7 +50,6 @@ import {
|
|
|
32
50
|
InvalidRewindTargetError,
|
|
33
51
|
InvalidSessionMetadataError,
|
|
34
52
|
InvalidSessionScopeError,
|
|
35
|
-
MCP_RESTART_SERVER_DEADLINE_MS,
|
|
36
53
|
PermissionForbiddenError,
|
|
37
54
|
PromptDeadlineExceededError,
|
|
38
55
|
PromptQueueFullError,
|
|
@@ -44,19 +61,7 @@ import {
|
|
|
44
61
|
SessionShellDisabledError,
|
|
45
62
|
WorkspaceMismatchError,
|
|
46
63
|
isNotCurrentlyGeneratingCancelError
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import {
|
|
49
|
-
defaultSpawnChannelFactory
|
|
50
|
-
} from "./chunk-A6UO2C7C.js";
|
|
51
|
-
import {
|
|
52
|
-
BridgeChannelClosedError,
|
|
53
|
-
BridgeTimeoutError,
|
|
54
|
-
SERVE_CONTROL_EXT_METHODS,
|
|
55
|
-
SERVE_STATUS_EXT_METHODS,
|
|
56
|
-
STATUS_SCHEMA_VERSION,
|
|
57
|
-
createIdleWorkspaceExtensionsStatus,
|
|
58
|
-
createIdleWorkspaceHooksStatus
|
|
59
|
-
} from "./chunk-KU5XMLDK.js";
|
|
64
|
+
} from "./chunk-B4AJNNOL.js";
|
|
60
65
|
import {
|
|
61
66
|
canonicalizeWorkspace,
|
|
62
67
|
translateAndCheckAbsoluteWorkspacePath
|
|
@@ -82,16 +87,16 @@ import {
|
|
|
82
87
|
metadataBudgetBytes,
|
|
83
88
|
normalizeSnapshotPayload,
|
|
84
89
|
stableSessionArtifactId
|
|
85
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-X5WNMMIA.js";
|
|
86
91
|
import {
|
|
87
92
|
DAEMON_TRACEPARENT_META_KEY,
|
|
88
93
|
DAEMON_TRACESTATE_META_KEY
|
|
89
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-75MIQ3LV.js";
|
|
90
95
|
import {
|
|
91
96
|
INVOCATION_CONTEXT_META_KEY,
|
|
92
97
|
PRIVATE_ACP_CAPABILITY_ENV,
|
|
93
98
|
PRIVATE_PARENT_CAPABILITY_META_KEY
|
|
94
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-PT722TDT.js";
|
|
95
100
|
import {
|
|
96
101
|
init_esbuild_shims
|
|
97
102
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -136,16 +141,14 @@ function replayRecordId(event) {
|
|
|
136
141
|
return typeof recordId === "string" ? recordId : void 0;
|
|
137
142
|
}
|
|
138
143
|
__name(replayRecordId, "replayRecordId");
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
if (!Number.isSafeInteger(value) || value < 1) {
|
|
144
|
-
throw new TypeError(`${name} must be a positive safe integer`);
|
|
144
|
+
function lastRecordIdIn(events) {
|
|
145
|
+
for (let i = events.length - 1; i >= 0; i--) {
|
|
146
|
+
const id = replayRecordId(events[i]);
|
|
147
|
+
if (id !== void 0) return id;
|
|
145
148
|
}
|
|
146
|
-
return
|
|
149
|
+
return void 0;
|
|
147
150
|
}
|
|
148
|
-
__name(
|
|
151
|
+
__name(lastRecordIdIn, "lastRecordIdIn");
|
|
149
152
|
var TurnBoundaryCompactionEngine = class {
|
|
150
153
|
static {
|
|
151
154
|
__name(this, "TurnBoundaryCompactionEngine");
|
|
@@ -166,6 +169,24 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
166
169
|
closed = false;
|
|
167
170
|
truncatedEvents = 0;
|
|
168
171
|
truncatedTurns = 0;
|
|
172
|
+
// Most recent `qwen.session.recordId` observed on an ingested or seeded
|
|
173
|
+
// `session_update`. Surfaced on the `history_truncated` marker emitted by
|
|
174
|
+
// `snapshot()` so clients that lost every turn-boundary event from their
|
|
175
|
+
// retained window (e.g. a live-journal truncation during a single long
|
|
176
|
+
// in-flight turn) still have an anchor for `beforeRecordId` transcript
|
|
177
|
+
// pagination. Undefined until at least one recordId has been observed;
|
|
178
|
+
// omitted from the marker in that case.
|
|
179
|
+
activeRecordId;
|
|
180
|
+
// Pagination anchor for the replay-path `history_truncated` marker,
|
|
181
|
+
// frozen at the first replay-window eviction. Prefers the first
|
|
182
|
+
// retained recordId (the eviction boundary, so `beforeRecordId`
|
|
183
|
+
// fetches exactly the dropped records with no overlap); falls back to
|
|
184
|
+
// the last dropped recordId when the retained window carries no
|
|
185
|
+
// recordId. Deliberately NOT `activeRecordId` — that one is advanced
|
|
186
|
+
// by `ingest()` on every turn boundary and, when a retained segment
|
|
187
|
+
// carries the last seed recordId, would place the anchor inside the
|
|
188
|
+
// retained window and re-fetch records the client already displays.
|
|
189
|
+
replayAnchorRecordId;
|
|
169
190
|
slots = [];
|
|
170
191
|
toolSlotIndex = /* @__PURE__ */ new Map();
|
|
171
192
|
textSlotIndex = {
|
|
@@ -174,16 +195,8 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
174
195
|
};
|
|
175
196
|
constructor(opts = {}) {
|
|
176
197
|
this.maxReplayBytes = normalizeCompactedReplayMaxBytes(opts.maxReplayBytes);
|
|
177
|
-
this.maxJournalEvents =
|
|
178
|
-
|
|
179
|
-
DEFAULT_MAX_JOURNAL_EVENTS,
|
|
180
|
-
"maxJournalEvents"
|
|
181
|
-
);
|
|
182
|
-
this.maxJournalBytes = normalizeJournalCap(
|
|
183
|
-
opts.maxJournalBytes,
|
|
184
|
-
DEFAULT_MAX_JOURNAL_BYTES,
|
|
185
|
-
"maxJournalBytes"
|
|
186
|
-
);
|
|
198
|
+
this.maxJournalEvents = normalizeMaxJournalEvents(opts.maxJournalEvents);
|
|
199
|
+
this.maxJournalBytes = normalizeMaxJournalBytes(opts.maxJournalBytes);
|
|
187
200
|
this.onReplayWindowEviction = opts.onReplayWindowEviction;
|
|
188
201
|
}
|
|
189
202
|
ingest(event, byteLength) {
|
|
@@ -192,6 +205,10 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
192
205
|
this.lastEventId = event.id;
|
|
193
206
|
}
|
|
194
207
|
if (TRANSIENT_TYPES.has(event.type)) return;
|
|
208
|
+
const seenRecordId = replayRecordId(event);
|
|
209
|
+
if (seenRecordId !== void 0) {
|
|
210
|
+
this.activeRecordId = seenRecordId;
|
|
211
|
+
}
|
|
195
212
|
this.liveJournal.push(event);
|
|
196
213
|
const bytes = byteLength ?? serializedBridgeEventByteLength(event) ?? 0;
|
|
197
214
|
this.journalEntryBytes.push(bytes);
|
|
@@ -230,6 +247,8 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
230
247
|
retainedEvents: this.liveJournal.length,
|
|
231
248
|
maxBytes: this.maxJournalBytes,
|
|
232
249
|
maxEvents: this.maxJournalEvents,
|
|
250
|
+
// Pagination anchor — see makeHistoryTruncatedEvent.
|
|
251
|
+
...this.activeRecordId !== void 0 ? { recordId: this.activeRecordId } : {},
|
|
233
252
|
fullTranscriptAvailable: true
|
|
234
253
|
}
|
|
235
254
|
});
|
|
@@ -244,6 +263,8 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
244
263
|
if (this.closed) return;
|
|
245
264
|
this.resetReplayWindow();
|
|
246
265
|
this.lastEventId = snapshot.lastEventId;
|
|
266
|
+
this.activeRecordId = void 0;
|
|
267
|
+
this.activeRecordId = lastRecordIdIn(snapshot.compactedTurns);
|
|
247
268
|
for (const event of snapshot.compactedTurns) {
|
|
248
269
|
if (TRANSIENT_TYPES.has(event.type)) continue;
|
|
249
270
|
this.addReplaySegment([event], 0);
|
|
@@ -256,6 +277,8 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
256
277
|
seedReplayEvents(events) {
|
|
257
278
|
if (this.closed) return;
|
|
258
279
|
this.resetReplayWindow();
|
|
280
|
+
this.activeRecordId = void 0;
|
|
281
|
+
this.activeRecordId = lastRecordIdIn(events);
|
|
259
282
|
let recordEvents = [];
|
|
260
283
|
let recordId;
|
|
261
284
|
const flushRecord = /* @__PURE__ */ __name(() => {
|
|
@@ -289,6 +312,7 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
289
312
|
this.closed = true;
|
|
290
313
|
this.resetReplayWindow();
|
|
291
314
|
this.resetJournal();
|
|
315
|
+
this.activeRecordId = void 0;
|
|
292
316
|
this.slots = [];
|
|
293
317
|
this.toolSlotIndex.clear();
|
|
294
318
|
this.clearTextSlotIndex();
|
|
@@ -487,6 +511,7 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
487
511
|
let droppedBytes = 0;
|
|
488
512
|
let droppedEvents = 0;
|
|
489
513
|
let droppedTurns = 0;
|
|
514
|
+
let lastDroppedRecordId;
|
|
490
515
|
while (this.replayBytes > this.maxReplayBytes && this.activeReplaySegmentCount() > 1) {
|
|
491
516
|
const dropped = this.replaySegments[this.replaySegmentStart];
|
|
492
517
|
this.replaySegmentStart += 1;
|
|
@@ -497,8 +522,13 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
497
522
|
this.replayBytes -= dropped.bytes;
|
|
498
523
|
this.truncatedEvents += dropped.events.length;
|
|
499
524
|
this.truncatedTurns += dropped.turnCount;
|
|
525
|
+
const droppedRecordId = lastRecordIdIn(dropped.events);
|
|
526
|
+
if (droppedRecordId !== void 0) {
|
|
527
|
+
lastDroppedRecordId = droppedRecordId;
|
|
528
|
+
}
|
|
500
529
|
}
|
|
501
530
|
if (droppedSegmentCount > 0) {
|
|
531
|
+
this.replayAnchorRecordId ??= this.firstRetainedReplayRecordId() ?? lastDroppedRecordId;
|
|
502
532
|
this.compactReplaySegmentQueueIfNeeded();
|
|
503
533
|
this.notifyReplayWindowEviction({
|
|
504
534
|
droppedBytes,
|
|
@@ -511,6 +541,13 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
511
541
|
});
|
|
512
542
|
}
|
|
513
543
|
}
|
|
544
|
+
firstRetainedReplayRecordId() {
|
|
545
|
+
for (let i = this.replaySegmentStart; i < this.replaySegments.length; i++) {
|
|
546
|
+
const recordId = lastRecordIdIn(this.replaySegments[i].events);
|
|
547
|
+
if (recordId !== void 0) return recordId;
|
|
548
|
+
}
|
|
549
|
+
return void 0;
|
|
550
|
+
}
|
|
514
551
|
flattenReplaySegments() {
|
|
515
552
|
return this.replaySegments.slice(this.replaySegmentStart).flatMap((segment) => segment.events);
|
|
516
553
|
}
|
|
@@ -538,6 +575,15 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
538
575
|
retainedEvents,
|
|
539
576
|
maxBytes: this.maxReplayBytes,
|
|
540
577
|
...this.truncatedTurns > 0 ? { truncatedTurns: this.truncatedTurns } : {},
|
|
578
|
+
// Pagination anchor for clients whose retained window lost every
|
|
579
|
+
// turn-boundary event (e.g. live-journal truncation during one
|
|
580
|
+
// long in-flight turn). Uses the eviction-time anchor, not
|
|
581
|
+
// `activeRecordId`, so a post-seed `ingest()` can't push it past
|
|
582
|
+
// records the client already displays. Undefined when no recordId
|
|
583
|
+
// was observed before the first eviction — the field is
|
|
584
|
+
// intentionally omitted in that case so old clients continue to
|
|
585
|
+
// validate the marker shape.
|
|
586
|
+
...this.replayAnchorRecordId !== void 0 ? { recordId: this.replayAnchorRecordId } : {},
|
|
541
587
|
fullTranscriptAvailable: true
|
|
542
588
|
}
|
|
543
589
|
};
|
|
@@ -548,6 +594,7 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
548
594
|
this.replayBytes = 0;
|
|
549
595
|
this.truncatedEvents = 0;
|
|
550
596
|
this.truncatedTurns = 0;
|
|
597
|
+
this.replayAnchorRecordId = void 0;
|
|
551
598
|
}
|
|
552
599
|
clearTextSlotIndex() {
|
|
553
600
|
this.textSlotIndex.text.clear();
|
|
@@ -1760,7 +1807,7 @@ function sliceLineRange(content, startLine, endLine) {
|
|
|
1760
1807
|
}
|
|
1761
1808
|
__name(sliceLineRange, "sliceLineRange");
|
|
1762
1809
|
var BridgeClient = class {
|
|
1763
|
-
constructor(resolveEntry, resolvePendingRestoreEvents, mediator, permissionTimeoutMs, maxPendingPerSession, fileSystem, onModelPromoted, onModePromoted, clientMcpSender, ownsSession = () => true, onTokenUsage, onCreateSubSession, onGenerationEvent, onWorkspaceGenerationEvent, onChannelDelivery) {
|
|
1810
|
+
constructor(resolveEntry, resolvePendingRestoreEvents, mediator, permissionTimeoutMs, maxPendingPerSession, fileSystem, onModelPromoted, onModePromoted, clientMcpSender, ownsSession = () => true, onTokenUsage, onCreateSubSession, onGenerationEvent, onWorkspaceGenerationEvent, onChannelDelivery, hasSessionSpawnInFlight = () => false) {
|
|
1764
1811
|
this.resolveEntry = resolveEntry;
|
|
1765
1812
|
this.resolvePendingRestoreEvents = resolvePendingRestoreEvents;
|
|
1766
1813
|
this.mediator = mediator;
|
|
@@ -1776,6 +1823,7 @@ var BridgeClient = class {
|
|
|
1776
1823
|
this.onGenerationEvent = onGenerationEvent;
|
|
1777
1824
|
this.onWorkspaceGenerationEvent = onWorkspaceGenerationEvent;
|
|
1778
1825
|
this.onChannelDelivery = onChannelDelivery;
|
|
1826
|
+
this.hasSessionSpawnInFlight = hasSessionSpawnInFlight;
|
|
1779
1827
|
}
|
|
1780
1828
|
static {
|
|
1781
1829
|
__name(this, "BridgeClient");
|
|
@@ -2056,6 +2104,9 @@ var BridgeClient = class {
|
|
|
2056
2104
|
if (method === SERVE_CONTROL_EXT_METHODS.channelDelivery) {
|
|
2057
2105
|
return this.handleChannelDelivery(params);
|
|
2058
2106
|
}
|
|
2107
|
+
if (method === TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD) {
|
|
2108
|
+
return this.handleTodoStopGuardContinuationClaim(params);
|
|
2109
|
+
}
|
|
2059
2110
|
if (method !== MID_TURN_QUEUE_DRAIN_METHOD) {
|
|
2060
2111
|
throw RequestError.methodNotFound(method);
|
|
2061
2112
|
}
|
|
@@ -2068,9 +2119,6 @@ var BridgeClient = class {
|
|
|
2068
2119
|
const hasQueuedPrompt = entry.pendingPromptList.some(
|
|
2069
2120
|
(prompt) => prompt.state === "queued" && !prompt.abortController.signal.aborted
|
|
2070
2121
|
);
|
|
2071
|
-
if (params["todoStopGuardWatchQueuedPrompt"] === true) {
|
|
2072
|
-
entry.todoStopGuardAwaitingQueuedPrompt = hasQueuedPrompt;
|
|
2073
|
-
}
|
|
2074
2122
|
if (drained.length > 0) {
|
|
2075
2123
|
const byOriginator = /* @__PURE__ */ new Map();
|
|
2076
2124
|
for (const item of drained) {
|
|
@@ -2092,6 +2140,45 @@ var BridgeClient = class {
|
|
|
2092
2140
|
}
|
|
2093
2141
|
return { messages, hasQueuedPrompt };
|
|
2094
2142
|
}
|
|
2143
|
+
handleTodoStopGuardContinuationClaim(params) {
|
|
2144
|
+
const sessionId = typeof params["sessionId"] === "string" && params["sessionId"].length > 0 ? params["sessionId"] : void 0;
|
|
2145
|
+
if (!sessionId) return { claimed: false, hasQueuedPrompt: false };
|
|
2146
|
+
if (!this.ownsSession(sessionId)) {
|
|
2147
|
+
return { claimed: false, hasQueuedPrompt: false };
|
|
2148
|
+
}
|
|
2149
|
+
const entry = this.resolveEntry(sessionId);
|
|
2150
|
+
if (!entry) return { claimed: false, hasQueuedPrompt: false };
|
|
2151
|
+
const livePrompts = entry.pendingPromptList.filter(
|
|
2152
|
+
(prompt) => !prompt.abortController.signal.aborted
|
|
2153
|
+
);
|
|
2154
|
+
const promptId = typeof params["promptId"] === "string" && params["promptId"].length > 0 ? params["promptId"] : void 0;
|
|
2155
|
+
if (promptId) {
|
|
2156
|
+
const ownsRunningPrompt = entry.activePromptId === promptId && livePrompts.some(
|
|
2157
|
+
(prompt) => prompt.promptId === promptId && prompt.state === "running"
|
|
2158
|
+
);
|
|
2159
|
+
const hasCompetingRunningPrompt = livePrompts.some(
|
|
2160
|
+
(prompt) => prompt.promptId !== promptId && prompt.state === "running"
|
|
2161
|
+
);
|
|
2162
|
+
if (!ownsRunningPrompt || hasCompetingRunningPrompt) {
|
|
2163
|
+
return { claimed: false, hasQueuedPrompt: false };
|
|
2164
|
+
}
|
|
2165
|
+
const hasQueuedPrompt = livePrompts.some(
|
|
2166
|
+
(prompt) => prompt.state === "queued"
|
|
2167
|
+
);
|
|
2168
|
+
if (hasQueuedPrompt) {
|
|
2169
|
+
entry.todoStopGuardAwaitingQueuedPromptOwnerPromptId = promptId;
|
|
2170
|
+
return { claimed: false, hasQueuedPrompt: true };
|
|
2171
|
+
}
|
|
2172
|
+
if (entry.todoStopGuardAwaitingQueuedPromptOwnerPromptId === promptId) {
|
|
2173
|
+
delete entry.todoStopGuardAwaitingQueuedPromptOwnerPromptId;
|
|
2174
|
+
}
|
|
2175
|
+
return { claimed: true, hasQueuedPrompt: false };
|
|
2176
|
+
}
|
|
2177
|
+
if (entry.promptActive || livePrompts.length > 0) {
|
|
2178
|
+
return { claimed: false, hasQueuedPrompt: false };
|
|
2179
|
+
}
|
|
2180
|
+
return { claimed: true, hasQueuedPrompt: false };
|
|
2181
|
+
}
|
|
2095
2182
|
async handleChannelDelivery(params) {
|
|
2096
2183
|
if (!this.onChannelDelivery) {
|
|
2097
2184
|
throw RequestError.methodNotFound(
|
|
@@ -2227,7 +2314,29 @@ var BridgeClient = class {
|
|
|
2227
2314
|
`client-hosted MCP server '${server}' is not currently connected`
|
|
2228
2315
|
);
|
|
2229
2316
|
}
|
|
2230
|
-
const
|
|
2317
|
+
const sessionId = params["sessionId"];
|
|
2318
|
+
if (sessionId !== void 0 && (typeof sessionId !== "string" || sessionId.length === 0)) {
|
|
2319
|
+
throw RequestError.invalidParams(
|
|
2320
|
+
void 0,
|
|
2321
|
+
"`sessionId` must be a non-empty string when provided"
|
|
2322
|
+
);
|
|
2323
|
+
}
|
|
2324
|
+
const ownsSession = typeof sessionId === "string" && this.ownsSession(sessionId);
|
|
2325
|
+
if (typeof sessionId === "string" && !ownsSession && !this.hasSessionSpawnInFlight()) {
|
|
2326
|
+
throw RequestError.invalidParams(
|
|
2327
|
+
void 0,
|
|
2328
|
+
`Session not owned by this channel: ${sessionId}`
|
|
2329
|
+
);
|
|
2330
|
+
}
|
|
2331
|
+
if (typeof sessionId === "string" && !ownsSession) {
|
|
2332
|
+
writeStderrLine(
|
|
2333
|
+
`[demux] session=${sessionId} type=client_mcp_message action=forwarded_without_session reason=session_registration_pending`
|
|
2334
|
+
);
|
|
2335
|
+
}
|
|
2336
|
+
const response = await send(
|
|
2337
|
+
payload,
|
|
2338
|
+
typeof sessionId === "string" && ownsSession ? { sessionId } : void 0
|
|
2339
|
+
);
|
|
2231
2340
|
return { payload: response };
|
|
2232
2341
|
}
|
|
2233
2342
|
/**
|
|
@@ -5844,6 +5953,8 @@ function createAcpSessionBridge(opts) {
|
|
|
5844
5953
|
const compactedReplayMaxBytes = normalizeCompactedReplayMaxBytes(
|
|
5845
5954
|
opts.compactedReplayMaxBytes
|
|
5846
5955
|
);
|
|
5956
|
+
const maxJournalEvents = normalizeMaxJournalEvents(opts.maxJournalEvents);
|
|
5957
|
+
const maxJournalBytes = normalizeMaxJournalBytes(opts.maxJournalBytes);
|
|
5847
5958
|
const channelFactory = opts.channelFactory ?? defaultSpawnChannelFactory;
|
|
5848
5959
|
const childEnvOverrides = opts.childEnvOverrides ? Object.freeze({ ...opts.childEnvOverrides }) : Object.freeze({});
|
|
5849
5960
|
const initTimeoutMs = opts.initializeTimeoutMs ?? DEFAULT_INIT_TIMEOUT_MS;
|
|
@@ -6259,98 +6370,124 @@ function createAcpSessionBridge(opts) {
|
|
|
6259
6370
|
})
|
|
6260
6371
|
);
|
|
6261
6372
|
const sessionIds = /* @__PURE__ */ new Set();
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6373
|
+
let client;
|
|
6374
|
+
let connection;
|
|
6375
|
+
try {
|
|
6376
|
+
client = new BridgeClient(
|
|
6377
|
+
// BfFut: ACP today carries a sessionId on every per-session
|
|
6378
|
+
// notification / request, so the no-sessionId branch is
|
|
6379
|
+
// technically unreachable. But the channel is multi-session
|
|
6380
|
+
// (Stage 1.5 multiplex), so if ACP ever grows a no-sessionId
|
|
6381
|
+
// call we'd silently drop it on a multi-session channel
|
|
6382
|
+
// instead of throwing. Surface that ambiguity loudly.
|
|
6383
|
+
(sessionId) => {
|
|
6384
|
+
if (sessionId) return byId.get(sessionId);
|
|
6385
|
+
if (channelInfo && channelInfo.sessionIds.size > 1) {
|
|
6386
|
+
throw new Error(
|
|
6387
|
+
"BridgeClient: ACP call without sessionId on a multi-session channel cannot be routed \u2014 workspace=" + boundWorkspace
|
|
6388
|
+
);
|
|
6389
|
+
}
|
|
6390
|
+
return void 0;
|
|
6391
|
+
},
|
|
6392
|
+
(sessionId) => sessionId ? pendingRestoreEvents.get(sessionId) : void 0,
|
|
6393
|
+
permissionMediator,
|
|
6394
|
+
permissionTimeoutMs,
|
|
6395
|
+
maxPendingPerSession,
|
|
6396
|
+
// Forward the optional `BridgeFileSystem` injection so
|
|
6397
|
+
// production `qwen serve` can wire the `WorkspaceFileSystem`
|
|
6398
|
+
// adapter into BridgeClient's fs proxy methods. Tests + Mode A
|
|
6399
|
+
// consumers + channels / IDE companion omit it; BridgeClient
|
|
6400
|
+
// falls back to its inline fs proxy.
|
|
6401
|
+
opts.fileSystem,
|
|
6402
|
+
// §2.3: centralised model_switched publish — keeps cache + generation
|
|
6403
|
+
// update atomic. BridgeClient calls this instead of inlining publish.
|
|
6404
|
+
(entry, modelId, originator) => publishModelSwitched(entry, modelId, originator),
|
|
6405
|
+
// A2: centralised approval_mode_changed publish on in-session mode
|
|
6406
|
+
// promotion. `previous` is read from the bridge state cache.
|
|
6407
|
+
(entry, modeId, originator) => {
|
|
6408
|
+
const se = entry;
|
|
6409
|
+
publishApprovalModeChanged(
|
|
6410
|
+
se,
|
|
6411
|
+
{
|
|
6412
|
+
previous: se.currentApprovalMode ?? "default",
|
|
6413
|
+
next: modeId,
|
|
6414
|
+
persisted: false
|
|
6415
|
+
},
|
|
6416
|
+
originator
|
|
6274
6417
|
);
|
|
6275
|
-
}
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6418
|
+
},
|
|
6419
|
+
// Reverse tool channel (issue #5626, Phase 2): forward the optional
|
|
6420
|
+
// client-hosted-MCP sender lookup so `BridgeClient.extMethod` can
|
|
6421
|
+
// answer `qwen/control/client_mcp/message` from the child by reaching
|
|
6422
|
+
// the per-WS-connection `ClientMcpRegistrar`. Omitted callers (tests,
|
|
6423
|
+
// Mode A) never host a client MCP server, so the method stays
|
|
6424
|
+
// unreachable.
|
|
6425
|
+
opts.clientMcpSender,
|
|
6426
|
+
(sessionId) => sessionIds.has(sessionId),
|
|
6427
|
+
// Daemon token-burn accounting: forward per-round token usage observed
|
|
6428
|
+
// at the session/update fan-in to the daemon host's metrics ring via
|
|
6429
|
+
// the telemetry seam. Optional-chained so non-daemon callers (tests,
|
|
6430
|
+
// Mode A) that wire no `tokenUsage` metric are a silent no-op.
|
|
6431
|
+
(inputTokens, outputTokens, durationMs, apiErrors, apiRetries) => telemetry.metrics?.tokenUsage?.(
|
|
6432
|
+
inputTokens,
|
|
6433
|
+
outputTokens,
|
|
6434
|
+
durationMs,
|
|
6435
|
+
apiErrors,
|
|
6436
|
+
apiRetries
|
|
6437
|
+
),
|
|
6438
|
+
// `create_sub_session` tool: forward the request/response hook so a child
|
|
6439
|
+
// tool can ask the daemon to spawn a sub-session and (for 'first-turn')
|
|
6440
|
+
// return its result. Omitted → the method reports daemon-only.
|
|
6441
|
+
opts.onCreateSubSession,
|
|
6442
|
+
(sessionId, event) => {
|
|
6443
|
+
const request = generationRequests.get(event.requestId);
|
|
6444
|
+
if (!request || request.sessionId !== sessionId) return;
|
|
6445
|
+
if (request.queue.push(event)) return;
|
|
6446
|
+
request.settled = true;
|
|
6447
|
+
generationRequests.delete(event.requestId);
|
|
6448
|
+
request.queue.fail(
|
|
6449
|
+
new Error("Generation stream consumer too slow")
|
|
6450
|
+
);
|
|
6451
|
+
void request.connection.extMethod(SERVE_CONTROL_EXT_METHODS.sessionGenerationCancel, {
|
|
6452
|
+
sessionId,
|
|
6453
|
+
requestId: event.requestId
|
|
6454
|
+
}).catch(() => void 0);
|
|
6455
|
+
},
|
|
6456
|
+
(event) => {
|
|
6457
|
+
const request = workspaceGenerationRequests.get(event.requestId);
|
|
6458
|
+
if (!request) return;
|
|
6459
|
+
if (request.queue.push(event)) return;
|
|
6460
|
+
request.settled = true;
|
|
6461
|
+
workspaceGenerationRequests.delete(event.requestId);
|
|
6462
|
+
request.queue.fail(
|
|
6463
|
+
new Error("Generation stream consumer too slow")
|
|
6464
|
+
);
|
|
6465
|
+
void request.connection?.extMethod(SERVE_CONTROL_EXT_METHODS.workspaceGenerationCancel, {
|
|
6466
|
+
requestId: event.requestId
|
|
6467
|
+
}).catch(() => void 0);
|
|
6468
|
+
},
|
|
6469
|
+
opts.onChannelDelivery,
|
|
6470
|
+
() => channelInfo?.sessionIds === sessionIds && channelInfo.sessionSpawnsInFlight > 0
|
|
6471
|
+
);
|
|
6472
|
+
connection = new ClientSideConnection(() => client, channel.stream);
|
|
6473
|
+
} catch (error) {
|
|
6474
|
+
try {
|
|
6475
|
+
channel.killSync();
|
|
6476
|
+
} catch {
|
|
6477
|
+
}
|
|
6478
|
+
try {
|
|
6479
|
+
await Promise.race([
|
|
6480
|
+
channel.exited.then(() => void 0),
|
|
6481
|
+
channel.kill()
|
|
6482
|
+
]);
|
|
6483
|
+
} catch (teardownError) {
|
|
6484
|
+
throw new AggregateError(
|
|
6485
|
+
[error, teardownError],
|
|
6486
|
+
"ACP channel construction and teardown failed"
|
|
6303
6487
|
);
|
|
6304
|
-
}
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
// answer `qwen/control/client_mcp/message` from the child by reaching
|
|
6308
|
-
// the per-WS-connection `ClientMcpRegistrar`. Omitted callers (tests,
|
|
6309
|
-
// Mode A) never host a client MCP server, so the method stays
|
|
6310
|
-
// unreachable.
|
|
6311
|
-
opts.clientMcpSender,
|
|
6312
|
-
(sessionId) => sessionIds.has(sessionId),
|
|
6313
|
-
// Daemon token-burn accounting: forward per-round token usage observed
|
|
6314
|
-
// at the session/update fan-in to the daemon host's metrics ring via
|
|
6315
|
-
// the telemetry seam. Optional-chained so non-daemon callers (tests,
|
|
6316
|
-
// Mode A) that wire no `tokenUsage` metric are a silent no-op.
|
|
6317
|
-
(inputTokens, outputTokens, durationMs, apiErrors, apiRetries) => telemetry.metrics?.tokenUsage?.(
|
|
6318
|
-
inputTokens,
|
|
6319
|
-
outputTokens,
|
|
6320
|
-
durationMs,
|
|
6321
|
-
apiErrors,
|
|
6322
|
-
apiRetries
|
|
6323
|
-
),
|
|
6324
|
-
// `create_sub_session` tool: forward the request/response hook so a child
|
|
6325
|
-
// tool can ask the daemon to spawn a sub-session and (for 'first-turn')
|
|
6326
|
-
// return its result. Omitted → the method reports daemon-only.
|
|
6327
|
-
opts.onCreateSubSession,
|
|
6328
|
-
(sessionId, event) => {
|
|
6329
|
-
const request = generationRequests.get(event.requestId);
|
|
6330
|
-
if (!request || request.sessionId !== sessionId) return;
|
|
6331
|
-
if (request.queue.push(event)) return;
|
|
6332
|
-
request.settled = true;
|
|
6333
|
-
generationRequests.delete(event.requestId);
|
|
6334
|
-
request.queue.fail(new Error("Generation stream consumer too slow"));
|
|
6335
|
-
void request.connection.extMethod(SERVE_CONTROL_EXT_METHODS.sessionGenerationCancel, {
|
|
6336
|
-
sessionId,
|
|
6337
|
-
requestId: event.requestId
|
|
6338
|
-
}).catch(() => void 0);
|
|
6339
|
-
},
|
|
6340
|
-
(event) => {
|
|
6341
|
-
const request = workspaceGenerationRequests.get(event.requestId);
|
|
6342
|
-
if (!request) return;
|
|
6343
|
-
if (request.queue.push(event)) return;
|
|
6344
|
-
request.settled = true;
|
|
6345
|
-
workspaceGenerationRequests.delete(event.requestId);
|
|
6346
|
-
request.queue.fail(new Error("Generation stream consumer too slow"));
|
|
6347
|
-
void request.connection?.extMethod(SERVE_CONTROL_EXT_METHODS.workspaceGenerationCancel, {
|
|
6348
|
-
requestId: event.requestId
|
|
6349
|
-
}).catch(() => void 0);
|
|
6350
|
-
},
|
|
6351
|
-
opts.onChannelDelivery
|
|
6352
|
-
);
|
|
6353
|
-
const connection = new ClientSideConnection(() => client, channel.stream);
|
|
6488
|
+
}
|
|
6489
|
+
throw error;
|
|
6490
|
+
}
|
|
6354
6491
|
const info = {
|
|
6355
6492
|
id: acpChannelId,
|
|
6356
6493
|
channel,
|
|
@@ -7109,7 +7246,7 @@ function createAcpSessionBridge(opts) {
|
|
|
7109
7246
|
cpuPercent: info.childCpuPercent ?? 0
|
|
7110
7247
|
};
|
|
7111
7248
|
}, "getChildResourceSnapshot");
|
|
7112
|
-
const requestSessionStatus = /* @__PURE__ */ __name(async (sessionId, method, params = {}) => {
|
|
7249
|
+
const requestSessionStatus = /* @__PURE__ */ __name(async (sessionId, method, params = {}, timeoutMs = initTimeoutMs) => {
|
|
7113
7250
|
const entry = byId.get(sessionId);
|
|
7114
7251
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
7115
7252
|
const info = channelInfoForEntry(entry);
|
|
@@ -7117,7 +7254,7 @@ function createAcpSessionBridge(opts) {
|
|
|
7117
7254
|
const response = await Promise.race([
|
|
7118
7255
|
withTimeout(
|
|
7119
7256
|
entry.connection.extMethod(method, { ...params, sessionId }),
|
|
7120
|
-
|
|
7257
|
+
timeoutMs,
|
|
7121
7258
|
method
|
|
7122
7259
|
),
|
|
7123
7260
|
getTransportClosedReject(entry)
|
|
@@ -7207,6 +7344,8 @@ function createAcpSessionBridge(opts) {
|
|
|
7207
7344
|
void 0,
|
|
7208
7345
|
new TurnBoundaryCompactionEngine({
|
|
7209
7346
|
maxReplayBytes: compactedReplayMaxBytes,
|
|
7347
|
+
maxJournalEvents,
|
|
7348
|
+
maxJournalBytes,
|
|
7210
7349
|
onReplayWindowEviction: /* @__PURE__ */ __name((eviction) => {
|
|
7211
7350
|
teeServeDebugLine(
|
|
7212
7351
|
`replay window evicted ${JSON.stringify(eviction)}`
|
|
@@ -7592,6 +7731,46 @@ function createAcpSessionBridge(opts) {
|
|
|
7592
7731
|
return replayFieldsFor(entry, "load");
|
|
7593
7732
|
}
|
|
7594
7733
|
__name(refreshedReplayFieldsFor, "refreshedReplayFieldsFor");
|
|
7734
|
+
function transcriptEventRecordId(event) {
|
|
7735
|
+
if (event.type !== "session_update") return void 0;
|
|
7736
|
+
const data = event.data;
|
|
7737
|
+
if (!data || typeof data !== "object" || Array.isArray(data))
|
|
7738
|
+
return void 0;
|
|
7739
|
+
const rec = data;
|
|
7740
|
+
const update = rec["update"];
|
|
7741
|
+
const meta = update && typeof update === "object" && !Array.isArray(update) ? update["_meta"] : rec["_meta"];
|
|
7742
|
+
if (!meta || typeof meta !== "object" || Array.isArray(meta))
|
|
7743
|
+
return void 0;
|
|
7744
|
+
const recordId = meta["qwen.session.recordId"];
|
|
7745
|
+
return typeof recordId === "string" ? recordId : void 0;
|
|
7746
|
+
}
|
|
7747
|
+
__name(transcriptEventRecordId, "transcriptEventRecordId");
|
|
7748
|
+
async function resolveHistoryAnchorRecordId(entry, replayFields) {
|
|
7749
|
+
const events = [
|
|
7750
|
+
...replayFields.compactedReplay ?? [],
|
|
7751
|
+
...replayFields.liveJournal ?? []
|
|
7752
|
+
];
|
|
7753
|
+
const hasMarker = events.some((e) => e.type === "history_truncated");
|
|
7754
|
+
if (!hasMarker) return void 0;
|
|
7755
|
+
const hasRecordId = events.some(
|
|
7756
|
+
(e) => transcriptEventRecordId(e) !== void 0 || e.type === "history_truncated" && isRecord3(e.data) && typeof e.data["recordId"] === "string"
|
|
7757
|
+
);
|
|
7758
|
+
if (hasRecordId) return void 0;
|
|
7759
|
+
try {
|
|
7760
|
+
const page = await requestSessionTranscriptPage({
|
|
7761
|
+
sessionId: entry.sessionId,
|
|
7762
|
+
direction: "backward",
|
|
7763
|
+
limit: 50
|
|
7764
|
+
});
|
|
7765
|
+
for (const event of page.events) {
|
|
7766
|
+
const recordId = transcriptEventRecordId(event);
|
|
7767
|
+
if (recordId !== void 0) return recordId;
|
|
7768
|
+
}
|
|
7769
|
+
} catch {
|
|
7770
|
+
}
|
|
7771
|
+
return void 0;
|
|
7772
|
+
}
|
|
7773
|
+
__name(resolveHistoryAnchorRecordId, "resolveHistoryAnchorRecordId");
|
|
7595
7774
|
async function restoreSession(action, req, options = {}) {
|
|
7596
7775
|
if (shuttingDown) {
|
|
7597
7776
|
throw new Error("AcpSessionBridge is shutting down");
|
|
@@ -7612,6 +7791,7 @@ function createAcpSessionBridge(opts) {
|
|
|
7612
7791
|
);
|
|
7613
7792
|
}
|
|
7614
7793
|
const replayFields = action === "load" && req.historyPageSize !== void 0 ? await refreshedReplayFieldsFor(existing, req.historyPageSize) : replayFieldsFor(existing, action);
|
|
7794
|
+
const historyAnchorRecordId = action === "load" ? await resolveHistoryAnchorRecordId(existing, replayFields) : void 0;
|
|
7615
7795
|
if (byId.get(req.sessionId) !== existing || existing.closing) {
|
|
7616
7796
|
throw new SessionNotFoundError(req.sessionId);
|
|
7617
7797
|
}
|
|
@@ -7633,7 +7813,8 @@ function createAcpSessionBridge(opts) {
|
|
|
7633
7813
|
// caller saw; spawn-only sessions don't carry a state payload.
|
|
7634
7814
|
state: existing.restoreState ?? {},
|
|
7635
7815
|
hasActivePrompt: existing.promptActive,
|
|
7636
|
-
...replayFields
|
|
7816
|
+
...replayFields,
|
|
7817
|
+
...historyAnchorRecordId !== void 0 ? { historyAnchorRecordId } : {}
|
|
7637
7818
|
};
|
|
7638
7819
|
}
|
|
7639
7820
|
const inFlight = inFlightRestores.get(req.sessionId);
|
|
@@ -8046,6 +8227,8 @@ function createAcpSessionBridge(opts) {
|
|
|
8046
8227
|
maxPendingPromptsPerSession: maxPendingPromptsPerSession === Infinity ? null : maxPendingPromptsPerSession,
|
|
8047
8228
|
eventRingSize,
|
|
8048
8229
|
compactedReplayMaxBytes,
|
|
8230
|
+
maxJournalEvents,
|
|
8231
|
+
maxJournalBytes,
|
|
8049
8232
|
channelIdleTimeoutMs: resolvedChannelIdleTimeoutMs(),
|
|
8050
8233
|
sessionIdleTimeoutMs
|
|
8051
8234
|
},
|
|
@@ -8348,13 +8531,17 @@ function createAcpSessionBridge(opts) {
|
|
|
8348
8531
|
"abort",
|
|
8349
8532
|
() => {
|
|
8350
8533
|
if (pendingEntry.state !== "queued") return;
|
|
8351
|
-
|
|
8534
|
+
const waitingOwnerPromptId = entry.todoStopGuardAwaitingQueuedPromptOwnerPromptId;
|
|
8535
|
+
if (!waitingOwnerPromptId) return;
|
|
8352
8536
|
const hasAnotherQueuedPrompt = entry.pendingPromptList.some(
|
|
8353
8537
|
(candidate) => candidate !== pendingEntry && candidate.state === "queued" && !candidate.abortController.signal.aborted
|
|
8354
8538
|
);
|
|
8355
8539
|
if (hasAnotherQueuedPrompt) return;
|
|
8356
|
-
entry.
|
|
8357
|
-
void entry.connection.extMethod(TODO_STOP_GUARD_QUEUE_RELEASE_METHOD, {
|
|
8540
|
+
delete entry.todoStopGuardAwaitingQueuedPromptOwnerPromptId;
|
|
8541
|
+
void entry.connection.extMethod(TODO_STOP_GUARD_QUEUE_RELEASE_METHOD, {
|
|
8542
|
+
sessionId,
|
|
8543
|
+
promptId: waitingOwnerPromptId
|
|
8544
|
+
}).catch((error) => {
|
|
8358
8545
|
writeStderrLine(
|
|
8359
8546
|
`qwen serve: Todo Stop Guard queued-prompt release failed for ${JSON.stringify(sessionId)}: ${error instanceof Error ? error.message : String(error)}`
|
|
8360
8547
|
);
|
|
@@ -8385,7 +8572,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8385
8572
|
throw new DOMException("Prompt aborted", "AbortError");
|
|
8386
8573
|
}
|
|
8387
8574
|
if (pendingEntry.state === "queued") {
|
|
8388
|
-
entry.
|
|
8575
|
+
delete entry.todoStopGuardAwaitingQueuedPromptOwnerPromptId;
|
|
8389
8576
|
pendingEntry.state = "running";
|
|
8390
8577
|
entry.events.publish({
|
|
8391
8578
|
type: "pending_prompt_started",
|
|
@@ -10398,6 +10585,22 @@ function createAcpSessionBridge(opts) {
|
|
|
10398
10585
|
}
|
|
10399
10586
|
return response;
|
|
10400
10587
|
},
|
|
10588
|
+
async addSessionRuntimeMcpServer(sessionId, name, config, originatorClientId) {
|
|
10589
|
+
return requestSessionStatus(
|
|
10590
|
+
sessionId,
|
|
10591
|
+
SERVE_CONTROL_EXT_METHODS.sessionMcpRuntimeAdd,
|
|
10592
|
+
{ name, config, originatorClientId },
|
|
10593
|
+
MCP_RESTART_SERVER_DEADLINE_MS
|
|
10594
|
+
);
|
|
10595
|
+
},
|
|
10596
|
+
async removeSessionRuntimeMcpServer(sessionId, name, originatorClientId) {
|
|
10597
|
+
return requestSessionStatus(
|
|
10598
|
+
sessionId,
|
|
10599
|
+
SERVE_CONTROL_EXT_METHODS.sessionMcpRuntimeRemove,
|
|
10600
|
+
{ name, originatorClientId },
|
|
10601
|
+
MCP_RESTART_SERVER_DEADLINE_MS
|
|
10602
|
+
);
|
|
10603
|
+
},
|
|
10401
10604
|
async killSession(sessionId, opts2) {
|
|
10402
10605
|
const entry = byId.get(sessionId);
|
|
10403
10606
|
if (!entry) return false;
|
|
@@ -10583,13 +10786,22 @@ function createAcpSessionBridge(opts) {
|
|
|
10583
10786
|
() => void 0,
|
|
10584
10787
|
() => void 0
|
|
10585
10788
|
) : Promise.resolve();
|
|
10586
|
-
await Promise.
|
|
10587
|
-
...channels.map((ci) => ci.channel.kill()
|
|
10588
|
-
})),
|
|
10789
|
+
const teardownResults = await Promise.allSettled([
|
|
10790
|
+
...channels.map((ci) => ci.channel.kill()),
|
|
10589
10791
|
...inFlightSessionAwaits,
|
|
10590
10792
|
...inFlightRestoreAwaits,
|
|
10591
10793
|
inFlightChannelAwait
|
|
10592
10794
|
]);
|
|
10795
|
+
const teardownFailures = teardownResults.flatMap(
|
|
10796
|
+
(result) => result.status === "rejected" ? [result.reason] : []
|
|
10797
|
+
);
|
|
10798
|
+
if (teardownFailures.length === 1) throw teardownFailures[0];
|
|
10799
|
+
if (teardownFailures.length > 1) {
|
|
10800
|
+
throw new AggregateError(
|
|
10801
|
+
teardownFailures,
|
|
10802
|
+
"ACP bridge shutdown failed"
|
|
10803
|
+
);
|
|
10804
|
+
}
|
|
10593
10805
|
})().then(resolveShutdown, rejectShutdown);
|
|
10594
10806
|
return shutdownPromise;
|
|
10595
10807
|
},
|