@qwen-code/qwen-code 0.21.13 → 0.21.14-nightly.20260822.7a4566cb3b
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 +15 -7
- package/bundled/qc-helper/docs/extension/introduction.md +2 -0
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +25 -3
- package/bundled/qc-helper/docs/features/commands.md +120 -8
- package/bundled/qc-helper/docs/features/markdown-rendering.md +6 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +3 -3
- package/bundled/qc-helper/docs/features/terminal-images.md +50 -0
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +21 -4
- package/bundled/review/SKILL.md +113 -62
- package/chunks/MaxSizedBox-NCWYES5B.js +98 -0
- package/chunks/{StandaloneSessionPicker-KEGXNUG6.js → StandaloneSessionPicker-A4V4F64Y.js} +80 -79
- package/chunks/{acp-startup-profiler-NMDXYGDN.js → acp-startup-profiler-DDVSJKJK.js} +2 -2
- package/chunks/{acpAgent-XPES32S7.js → acpAgent-YYRH7HTQ.js} +1094 -278
- package/chunks/{agent-DPTOZFEM.js → agent-NEM254CJ.js} +52 -51
- package/chunks/agent-headless-AVFYIRPV.js +88 -0
- package/chunks/{anthropicContentGenerator-G7BVXTKN.js → anthropicContentGenerator-IWFTSBSV.js} +25 -25
- package/chunks/{artifact-tool-GEXTOPVO.js → artifact-tool-SBXMTVCB.js} +3 -3
- package/chunks/{askUserQuestion-B33XRSB7.js → askUserQuestion-KEQJRFD6.js} +3 -3
- package/chunks/{bridge-YNQBAA4Z.js → bridge-2CGOUO25.js} +59 -57
- package/chunks/{ca-4CQ6MYNQ.js → ca-SLZJD6QH.js} +8 -0
- package/chunks/{channel-management-service-GWY2GAIC.js → channel-management-service-FUJ2EFTF.js} +1 -1
- package/chunks/channel-settings-store-AZKNHHDC.js +103 -0
- package/chunks/{channel-worker-group-7LXCMZ77.js → channel-worker-group-CTE54QL6.js} +8 -7
- package/chunks/{channel-worker-manager-RYEME4ZZ.js → channel-worker-manager-4EHTD3T4.js} +8 -7
- package/chunks/{channel-worker-supervisor-OEVWBHGT.js → channel-worker-supervisor-F6I6WSWW.js} +6 -5
- package/chunks/{chunk-KD5BOPLP.js → chunk-2G4QF4VI.js} +125 -31
- package/chunks/{chunk-BHILXOC3.js → chunk-2MTIAN5Z.js} +3 -3
- package/chunks/{chunk-A4QRWUDE.js → chunk-2NWPB6T4.js} +6 -6
- package/chunks/{chunk-KV27IEHM.js → chunk-2TRNCJK4.js} +1 -1
- package/chunks/{chunk-EL5SXY3T.js → chunk-32CHFLGV.js} +198 -23
- package/chunks/{chunk-5CVO7YES.js → chunk-36OF5PRW.js} +1 -1
- package/chunks/{chunk-X26JYGTD.js → chunk-37BZSWEV.js} +1 -1
- package/chunks/{chunk-WFSTRPRO.js → chunk-3CLIDIVQ.js} +3 -3
- package/chunks/{chunk-A267JX7H.js → chunk-3HWN4E7N.js} +18 -18
- package/chunks/{chunk-ZYYTZUI2.js → chunk-3LYGXZ2H.js} +3 -3
- package/chunks/chunk-3SIGAHUX.js +3969 -0
- package/chunks/{chunk-BVJS5BSP.js → chunk-3XD4PT3B.js} +1 -1
- package/chunks/{chunk-6QFDQMQX.js → chunk-3ZFJUBTP.js} +1 -1
- package/chunks/{chunk-HUTNYWBG.js → chunk-45UD2TU4.js} +19 -11
- package/chunks/{chunk-4W5U2TUT.js → chunk-4F5WV4RF.js} +4 -4
- package/chunks/{chunk-I3G5JWBV.js → chunk-4GP3MNQ2.js} +2695 -1524
- package/chunks/{chunk-V26NVGAU.js → chunk-4MIDDJLJ.js} +8 -3
- package/chunks/{chunk-TS6625XH.js → chunk-5MK45KZ3.js} +9 -5
- package/chunks/{chunk-V57QC6WW.js → chunk-5OTMZVPL.js} +11 -9
- package/chunks/{chunk-MC4TLKEI.js → chunk-5PHLBWBL.js} +3 -3
- package/chunks/chunk-64LXOKG4.js +367 -0
- package/chunks/{chunk-6HY6IF3Z.js → chunk-6NFAEG54.js} +22 -2
- package/chunks/{chunk-TIGA2IVL.js → chunk-6NJIPX6W.js} +10 -298
- package/chunks/{chunk-MRMJCLIY.js → chunk-6RB2S4QP.js} +3 -3
- package/chunks/chunk-6S2OXVJT.js +369 -0
- package/chunks/{chunk-O4D7SPJN.js → chunk-6U46RZ25.js} +3 -3
- package/chunks/{chunk-JOOFMXGF.js → chunk-6UDHEIUT.js} +6 -6
- package/chunks/{chunk-VOQXFAY5.js → chunk-74TONY4F.js} +286 -0
- package/chunks/{chunk-LJQAUZMR.js → chunk-7CPJMZVJ.js} +1627 -180
- package/chunks/{chunk-T3CHYWJZ.js → chunk-7E7UCJHS.js} +100 -4
- package/chunks/{chunk-YZHRN3CF.js → chunk-7IV52LTO.js} +2 -2
- package/chunks/{chunk-4PKCUT7F.js → chunk-7JDGSJQH.js} +7 -7
- package/chunks/{chunk-GO7STP6N.js → chunk-7VITNOH6.js} +4 -4
- package/chunks/{chunk-CU6GJD55.js → chunk-7WLFSDLG.js} +1 -1
- package/chunks/{chunk-4WKAA4KS.js → chunk-A4N4FTMH.js} +1 -11
- package/chunks/{chunk-BUQDLC2G.js → chunk-A5F2YNO6.js} +3 -3
- package/chunks/{chunk-OY5RNSV4.js → chunk-AGCLK4G7.js} +3 -3
- package/chunks/{chunk-IA2K2HJE.js → chunk-AP3B7LKD.js} +2 -2
- package/chunks/{chunk-Y3YCSWG5.js → chunk-AZF6SME3.js} +2 -2
- package/chunks/{chunk-QFJ5JHQR.js → chunk-C72BXMJ5.js} +1 -1
- package/chunks/chunk-CETB5XY4.js +3654 -0
- package/chunks/{chunk-AA2BEKV3.js → chunk-CTAP6PO3.js} +3 -3
- package/chunks/{chunk-MS7GNABG.js → chunk-CXJHQVEK.js} +8 -0
- package/chunks/{chunk-QF2NHSPB.js → chunk-D534POS2.js} +274 -225
- package/chunks/{chunk-UKMR3CKV.js → chunk-D7QQ6RUB.js} +24 -9
- package/chunks/{chunk-DXIBNLBZ.js → chunk-DB2OKNTU.js} +2 -2
- package/chunks/{chunk-DGZEMW5R.js → chunk-DJEHYM4H.js} +3 -3
- package/chunks/{chunk-O565M6A4.js → chunk-DRVS6K7A.js} +260 -16
- package/chunks/{chunk-U3VNBPUO.js → chunk-DV4375RD.js} +5 -5
- package/chunks/{chunk-OXCMMLED.js → chunk-E63A23D7.js} +3 -3
- package/chunks/{chunk-4NFY2S7N.js → chunk-E7REAOTN.js} +15 -0
- package/chunks/{chunk-6ORZ2EDC.js → chunk-EW2IQ3ID.js} +3 -3
- package/chunks/{chunk-DGK6P3BQ.js → chunk-EXVK5R7X.js} +13 -13
- package/chunks/{chunk-NWNEANAT.js → chunk-FOGQO4FG.js} +953 -660
- package/chunks/{chunk-3U3VAL47.js → chunk-FV6PXZRO.js} +1 -1
- package/chunks/{chunk-76J3IJ3M.js → chunk-FX5TGHDE.js} +8 -8
- package/chunks/{chunk-QIH2HAEN.js → chunk-GXG4PYQB.js} +1 -1
- package/chunks/{chunk-FDGGZIYW.js → chunk-HDKCKCYO.js} +3 -3
- package/chunks/{chunk-RIAABG2K.js → chunk-HERHU33B.js} +2 -2
- package/chunks/{chunk-ZYBBISBY.js → chunk-HETN3NE2.js} +18 -15
- package/chunks/{chunk-XIT3GURH.js → chunk-HGBACZGD.js} +3 -3
- package/chunks/{chunk-UZPM4XHR.js → chunk-HGH7DXNI.js} +29 -8
- package/chunks/{chunk-CHHABXPE.js → chunk-HIK2OF33.js} +1 -1
- package/chunks/{chunk-FC4KQFCS.js → chunk-HMJ2P3SV.js} +1 -1
- package/chunks/chunk-HRVMTN37.js +26 -0
- package/chunks/{chunk-PQ36L4F5.js → chunk-HZZGYJIP.js} +1 -1
- package/chunks/{chunk-PT4I7NBA.js → chunk-I432KXWD.js} +1 -1
- package/chunks/{chunk-3EZLLVDF.js → chunk-IBJ5S45N.js} +3 -3
- package/chunks/{chunk-A4MFR4C5.js → chunk-IO257NUD.js} +3 -5
- package/chunks/{chunk-MIPFDQAF.js → chunk-ISJMN3ML.js} +1 -1
- package/chunks/chunk-IWOWEENB.js +9169 -0
- package/chunks/{chunk-XHRY7BXD.js → chunk-J6SIP2IT.js} +4 -4
- package/chunks/{chunk-OD2WU5QY.js → chunk-J7JQXYVL.js} +1 -1
- package/chunks/{chunk-NEFOOD54.js → chunk-J7VPB2HF.js} +4 -4
- package/chunks/{chunk-P7MPQI75.js → chunk-JGUBDRBC.js} +2 -2
- package/chunks/{chunk-SXCOEJO4.js → chunk-JOLJTKIG.js} +1 -1
- package/chunks/{chunk-NTTBXH7U.js → chunk-JS73NNWF.js} +8 -0
- package/chunks/{chunk-QRCNA3SR.js → chunk-JXLPQTMW.js} +50 -70
- package/chunks/{chunk-NNHNLJ2X.js → chunk-K2MSGB3W.js} +317 -72
- package/chunks/{chunk-KBXKR5R2.js → chunk-K52PZNU4.js} +1 -1
- package/chunks/{chunk-OOQUVWIG.js → chunk-K5OIW3I7.js} +4 -4
- package/chunks/{chunk-SOORFWKY.js → chunk-KSPRQSB4.js} +1 -1
- package/chunks/{chunk-WSH6GRKG.js → chunk-KVGR4MCF.js} +3 -3
- package/chunks/{chunk-6YKYPVDV.js → chunk-LC5M7YVE.js} +4 -4
- package/chunks/{chunk-M6NDLY2T.js → chunk-LD5VIJ7S.js} +1 -1
- package/chunks/{chunk-OMLJNPBE.js → chunk-LDGWX737.js} +84 -4
- package/chunks/{chunk-FAAUPSY2.js → chunk-LI4YHTQK.js} +1 -1
- package/chunks/{chunk-CXAOG665.js → chunk-LIKIJAUH.js} +2 -2
- package/chunks/chunk-LJZSMWOH.js +18 -0
- package/chunks/{chunk-BKPPWD33.js → chunk-M2IL2RTA.js} +22 -2
- package/chunks/{chunk-N5YPT6PH.js → chunk-MHOY756Q.js} +25 -13
- package/chunks/{chunk-YP5KH5Y7.js → chunk-ND7NOI4P.js} +1 -1
- package/chunks/{chunk-AW4TRXOC.js → chunk-NP2LV67M.js} +1 -1
- package/chunks/{chunk-GGDBMYGZ.js → chunk-NQB52P65.js} +5 -5
- package/chunks/{chunk-E3DYKPYZ.js → chunk-NUGZAFR2.js} +3 -3
- package/chunks/{chunk-GMIEIY3Y.js → chunk-O5BDEWBC.js} +3 -3
- package/chunks/{chunk-GDXET5XU.js → chunk-O5Z7EB6Y.js} +3 -3
- package/chunks/{chunk-5EYKMUUY.js → chunk-OTXXOZKW.js} +1 -1
- package/chunks/{chunk-M732YJPW.js → chunk-PALTIYXB.js} +6 -6
- package/chunks/{chunk-7UXUJ5T3.js → chunk-PLECQWDB.js} +1 -1
- package/chunks/{chunk-MLPXSYXR.js → chunk-PMIKPGDF.js} +66 -32
- package/chunks/{chunk-IWPYVAO2.js → chunk-PSQJ24ZZ.js} +3 -3
- package/chunks/{chunk-CPHEPGAO.js → chunk-PZRUV52H.js} +2 -2
- package/chunks/{chunk-PP4FUZNV.js → chunk-Q7RPLE33.js} +2 -2
- package/chunks/{chunk-S5DWMTHO.js → chunk-QQUVPMMZ.js} +2 -0
- package/chunks/{chunk-JUEPY766.js → chunk-RNGTMHKN.js} +3 -3
- package/chunks/{chunk-TUGSVUJB.js → chunk-ROV6B34L.js} +6 -6
- package/chunks/{chunk-RVOJ2FBP.js → chunk-RPJOOK6N.js} +1576 -10633
- package/chunks/{chunk-AXN7UPYQ.js → chunk-RQJJZQOH.js} +2 -2
- package/chunks/{chunk-AFSG32D5.js → chunk-RRRCWDFO.js} +1 -1
- package/chunks/{chunk-2M55OBEB.js → chunk-S3G6YFQC.js} +1 -1
- package/chunks/{chunk-4S5337WV.js → chunk-SVU5KGR7.js} +6527 -3314
- package/chunks/chunk-TBVSALA3.js +1109 -0
- package/chunks/{chunk-QUGAUQGJ.js → chunk-TBWQLLFO.js} +2 -0
- package/chunks/{chunk-AS5IN4GK.js → chunk-THK3QUU6.js} +5 -5
- package/chunks/{chunk-JNDY2MDR.js → chunk-TLDZKNZP.js} +1 -1
- package/chunks/{chunk-ZZO74WKW.js → chunk-TNAIZBPQ.js} +115 -28
- package/chunks/{chunk-3Z43GZUQ.js → chunk-TXASDT2M.js} +1 -1
- package/chunks/{chunk-CZBYX5MY.js → chunk-U53XZHAE.js} +1 -1
- package/chunks/{chunk-HIBNSEJE.js → chunk-UDG5EZJI.js} +0 -2
- package/chunks/{chunk-QNQAPSN2.js → chunk-URN2JIAQ.js} +4 -1
- package/chunks/{chunk-EZ5RP345.js → chunk-UYQTX2P6.js} +44 -13
- package/chunks/{chunk-BZ263IKX.js → chunk-UZPYR3EV.js} +1 -1
- package/chunks/{chunk-YZOSNW4R.js → chunk-VFACN2CE.js} +1 -1
- package/chunks/{chunk-RWDNJBWN.js → chunk-VLRBJ24J.js} +2 -2
- package/chunks/{chunk-NHDR76JX.js → chunk-VMJL7RH6.js} +4 -4
- package/chunks/{chunk-E23IPNGS.js → chunk-VOTDAZR7.js} +35 -6
- package/chunks/{chunk-XLLKYULU.js → chunk-VSNPOSDN.js} +2 -2
- package/chunks/{chunk-25EYDK42.js → chunk-VUMLT7E5.js} +2 -2
- package/chunks/{chunk-H4A72DE5.js → chunk-W4CRPSC5.js} +1 -1
- package/chunks/{chunk-NM5V5OVW.js → chunk-WJJYJVQE.js} +3 -3
- package/chunks/{chunk-ROIYNTHJ.js → chunk-WRT324N6.js} +3 -3
- package/chunks/chunk-WZAD4ZNJ.js +59 -0
- package/chunks/{chunk-SG7ZP5PG.js → chunk-WZDM44SB.js} +4 -4
- package/chunks/{chunk-JE7KQ2UP.js → chunk-XIQ5HQ2F.js} +469 -77
- package/chunks/{chunk-QV5YN5YD.js → chunk-XJOHLP2A.js} +5 -5
- package/chunks/{chunk-XUJNK7Y6.js → chunk-XL5K4SVK.js} +1 -1
- package/chunks/{chunk-CKSJECTU.js → chunk-XZJKSETB.js} +9 -5
- package/chunks/{chunk-YEYY7TEP.js → chunk-Y2FEAXLP.js} +7 -7
- package/chunks/{chunk-2B2BF7P7.js → chunk-YDJRMQU4.js} +3 -3
- package/chunks/{chunk-46UV252V.js → chunk-YHC2EYYG.js} +35 -38
- package/chunks/{chunk-OVZPVYZB.js → chunk-YMVFIYHV.js} +96 -18
- package/chunks/{chunk-WGHHA7ZH.js → chunk-Z3JMO2CH.js} +1 -1
- package/chunks/{chunk-MA2HEDVP.js → chunk-ZRYQMWEP.js} +3 -3
- package/chunks/{chunk-IGGGG5CX.js → chunk-ZTAT23TL.js} +15948 -10201
- package/chunks/{computer-use-77C5FHMW.js → computer-use-H2T7IFYX.js} +55 -54
- package/chunks/{config-utils-IVHRSXWI.js → config-utils-3DY73VIJ.js} +2 -2
- package/chunks/contextCommand-5AAZFFFV.js +94 -0
- package/chunks/{core-runtime-7VMIKUTG.js → core-runtime-JWFNKO2S.js} +57 -55
- package/chunks/{create-sub-session-2L5MQRN4.js → create-sub-session-33HIYIJE.js} +58 -56
- package/chunks/{create-sub-session-KRQULJE6.js → create-sub-session-XBCVGNFU.js} +6 -4
- package/chunks/{cron-create-H7UEPDSN.js → cron-create-IKA56DAF.js} +5 -5
- package/chunks/{cron-delete-6SZK7YFM.js → cron-delete-K5Q62EGH.js} +5 -5
- package/chunks/{cron-list-H25JIHEZ.js → cron-list-QBFGAMP7.js} +5 -5
- package/chunks/{daemon-2KTG7ZBN.js → daemon-NNCQ3HWT.js} +806 -147
- package/chunks/{daemon-git-worktree-guard-DXYIMWFT.js → daemon-git-worktree-guard-6233JAPJ.js} +54 -53
- package/chunks/daemon-status-provider-3EI2KALQ.js +104 -0
- package/chunks/daemon-trust-policy-QWWU7CON.js +100 -0
- package/chunks/{daemon-trust-policy-monitor-RYYGCQ3J.js → daemon-trust-policy-monitor-FH7GBAKN.js} +60 -59
- package/chunks/{de-UBEBKG6V.js → de-AH4LGCF5.js} +8 -0
- package/chunks/{deferred-core-runtime-3SGXFXEQ.js → deferred-core-runtime-EDUZQRME.js} +52 -51
- package/chunks/{discovery-ORA5J7YP.js → discovery-X2NV535U.js} +1 -1
- package/chunks/{display-image-ON3EYFRD.js → display-image-OEJMJV3S.js} +5 -5
- package/chunks/{dist-YEPL4RAW.js → dist-5EV2G6MC.js} +2 -3
- package/chunks/{dist-MAQXAQ2Y.js → dist-EQ3Q5XHX.js} +45337 -32756
- package/chunks/{dist-WJ4BHIEW.js → dist-ESS34DHC.js} +72 -0
- package/chunks/{dist-JWMKPWT5.js → dist-EUOUPUFO.js} +3 -4
- package/chunks/{dist-IYYN3RUT.js → dist-UOFRXJT6.js} +2798 -1250
- package/chunks/{earlyInputCapture-KJMLFVQV.js → earlyInputCapture-VSP42LUR.js} +53 -52
- package/chunks/{edit-I4LQFAEC.js → edit-ZTLO5ASX.js} +60 -58
- package/chunks/{en-X6YV7GME.js → en-MD3GP5YL.js} +8 -0
- package/chunks/{enter-worktree-YNPOJSRH.js → enter-worktree-TMTPDS2S.js} +55 -54
- package/chunks/{enterPlanMode-XCPK62ER.js → enterPlanMode-UBAXFMYI.js} +55 -54
- package/chunks/{environment-S7CTIHMX.js → environment-C2CZN7CB.js} +55 -54
- package/chunks/{errors-7HB2AIDS.js → errors-ZUNFQINF.js} +54 -53
- package/chunks/{exit-worktree-AIIY7SR6.js → exit-worktree-572NWEPJ.js} +55 -54
- package/chunks/exitPlanMode-QTIXFGZT.js +86 -0
- package/chunks/{fast-path-NDJV3ZFJ.js → fast-path-CEEVHQL3.js} +3 -3
- package/chunks/{fast-path-settings-LNOFM2YP.js → fast-path-settings-WHX3J3ZI.js} +2 -2
- package/chunks/{fr-VENTC2BS.js → fr-ZEML2JWS.js} +8 -0
- package/chunks/{gemini-RSUFP5OE.js → gemini-I2YR6GMS.js} +114 -112
- package/chunks/{geminiContentGenerator-SQ5XBPZ7.js → geminiContentGenerator-GQWNDZQF.js} +7 -7
- package/chunks/getMachineId-bsd-FBOAYNSY.js +48 -0
- package/chunks/{getMachineId-bsd-FG7IUY6U.js → getMachineId-bsd-YH7RURBZ.js} +4 -4
- package/chunks/{getMachineId-darwin-GLCJI2RA.js → getMachineId-darwin-H6USQYNI.js} +4 -4
- package/chunks/getMachineId-darwin-RNJLJUXY.js +47 -0
- package/chunks/{getMachineId-linux-O6OPPAKO.js → getMachineId-linux-HF2N63ET.js} +3 -3
- package/chunks/getMachineId-linux-UEVRAIAB.js +41 -0
- package/chunks/getMachineId-unsupported-FWXYJ7HW.js +31 -0
- package/chunks/{getMachineId-unsupported-S6CKYVGC.js → getMachineId-unsupported-NYA5DXRB.js} +3 -3
- package/chunks/getMachineId-win-LRVGMHLW.js +50 -0
- package/chunks/{getMachineId-win-X5SRNEH7.js → getMachineId-win-SMEGY2DW.js} +4 -4
- package/chunks/{glob-J4RUJAHX.js → glob-XFBL2RVT.js} +58 -57
- package/chunks/{goal-tools-VHTNVOKK.js → goal-tools-TLJCE7YZ.js} +6 -6
- package/chunks/{grep-VJWPLFOT.js → grep-U675LEXE.js} +55 -54
- package/chunks/handleAutoUpdate-R6RUCIA2.js +97 -0
- package/chunks/{i18n-RM5YOICI.js → i18n-SJCZDZ4C.js} +53 -52
- package/chunks/{image-gen-EXECB5XM.js → image-gen-6VY7CA7C.js} +14 -14
- package/chunks/initializer-CRDZXJOG.js +101 -0
- package/chunks/installationInfo-EW3NEJDZ.js +95 -0
- package/chunks/{ja-QHT4EQTO.js → ja-UM5B2HMD.js} +8 -0
- package/chunks/{keychain-token-storage-3XFJ5ZB2.js → keychain-token-storage-MTFTAESK.js} +3 -3
- package/chunks/list-TZEMTXDH.js +104 -0
- package/chunks/{list-agents-OSVDFI6S.js → list-agents-43XUEXJV.js} +6 -6
- package/chunks/loadedSettingsAdapter-47DG424L.js +98 -0
- package/chunks/{loggingContentGenerator-WF4ZOJEZ.js → loggingContentGenerator-77C6O5VW.js} +31 -29
- package/chunks/{loop-wakeup-WQS6JYAG.js → loop-wakeup-E54KDUXC.js} +6 -6
- package/chunks/{ls-D3HUFHDP.js → ls-CGL2UC3H.js} +7 -7
- package/chunks/{lsp-3QDDJTCS.js → lsp-5IKUO5DX.js} +3 -3
- package/chunks/{managed-npm-update-E7IW6N7V.js → managed-npm-update-AJ5GZRUA.js} +53 -52
- package/chunks/mcp-AQK656Y4.js +98 -0
- package/chunks/{monitor-EE2UYMGE.js → monitor-UDZXKYT3.js} +55 -54
- package/chunks/nonInteractiveCli-6NC3NLZM.js +166 -0
- package/chunks/{notebook-edit-NTDY4QDU.js → notebook-edit-G6WZI2YT.js} +59 -57
- package/chunks/{openaiContentGenerator-YNFVJMRJ.js → openaiContentGenerator-IHVHP3VB.js} +32 -32
- package/chunks/{pidfile-4XSFLYBZ.js → pidfile-EBKS2HBK.js} +53 -52
- package/chunks/{processUtils-WDA2MJFD.js → processUtils-B7M35ZLR.js} +2 -2
- package/chunks/prompt-terminal-ledger-5JYOPOII.js +93 -0
- package/chunks/{pt-VL3I5RNY.js → pt-5BMJ3XYH.js} +8 -0
- package/chunks/{qwenContentGenerator-434M7QKY.js → qwenContentGenerator-WCJPPTED.js} +59 -58
- package/chunks/{qwenOAuth2-GMYZOO6A.js → qwenOAuth2-S2CLBSEZ.js} +10 -10
- package/chunks/read-file-WFM53FTW.js +33 -0
- package/chunks/{read-mcp-resource-XD54ZQMC.js → read-mcp-resource-XYES2B42.js} +3 -3
- package/chunks/{record-artifact-SEYFJEJF.js → record-artifact-W3IBTGL7.js} +10 -6
- package/chunks/{resumeHistoryUtils-EVG3WYK2.js → resumeHistoryUtils-CK4ZC6YO.js} +59 -58
- package/chunks/ripGrep-B3PBLEQ3.js +86 -0
- package/chunks/{ru-4RCKL4PY.js → ru-6GL66ORV.js} +8 -0
- package/chunks/{run-qwen-serve-3QSGRXAN.js → run-qwen-serve-DC5RXI6N.js} +537 -185
- package/chunks/{runtime-5MLLZ7DC.js → runtime-UVEETF54.js} +63 -62
- package/chunks/{scheduler-RPBJ63CH.js → scheduler-MWT3UMVN.js} +54 -53
- package/chunks/{sdk-exporters-grpc-54L4LS5L.js → sdk-exporters-grpc-6J5CKOMO.js} +194 -75
- package/chunks/{sdk-exporters-http-XUVP63H6.js → sdk-exporters-http-Q3YZ4752.js} +40 -45
- package/chunks/{sdk-impl-YXUEN2Z2.js → sdk-impl-BOMCAN2Z.js} +7211 -5454
- package/chunks/{send-message-VZENRWRH.js → send-message-J4VT46OI.js} +8 -8
- package/chunks/{serve-HS3XLPXU.js → serve-AKM75GTE.js} +60 -61
- package/chunks/{server-TC4A7AAZ.js → server-KU7XIDVT.js} +2221 -399
- package/chunks/{session-UBOFXVMN.js → session-DKVYIRWN.js} +108 -105
- package/chunks/{settings-D5644OM5.js → settings-NS3PXZDP.js} +63 -62
- package/chunks/{shell-3PZULQQV.js → shell-UXCNM2OK.js} +52 -51
- package/chunks/{skill-PEVVXQ3L.js → skill-KV7YCCTM.js} +30 -28
- package/chunks/{skill-settings-J65JKKES.js → skill-settings-EXW7ESWJ.js} +59 -58
- package/chunks/{spawnChannel-IYGXRHSQ.js → spawnChannel-FCP44P4V.js} +55 -54
- package/chunks/{standalone-update-IFM53PE7.js → standalone-update-RGW3B2DX.js} +55 -54
- package/chunks/{startInteractiveUI-3AVH7L6H.js → startInteractiveUI-UZMF2BIJ.js} +615 -392
- package/chunks/{syntheticOutput-7GWFIDXT.js → syntheticOutput-JAXMIMZP.js} +4 -4
- package/chunks/{task-create-FCBDX7UH.js → task-create-I2H322E4.js} +12 -12
- package/chunks/{task-list-YIYIUFUA.js → task-list-3OLIWFTQ.js} +21 -7
- package/chunks/{task-stop-X37KYTKB.js → task-stop-JAUY6MSY.js} +3 -3
- package/chunks/{task-update-MYPFVOVM.js → task-update-B3XO4CPI.js} +87 -16
- package/chunks/{team-create-ZAIA7KAV.js → team-create-77XY3KAE.js} +56 -56
- package/chunks/{team-delete-6UMU4XLS.js → team-delete-Q7GE7RRI.js} +6 -6
- package/chunks/{team-plan-approval-UNIUS7OD.js → team-plan-approval-TAQANDQG.js} +55 -54
- package/chunks/{terminal-image-renderer-G343P2RV.js → terminal-image-renderer-V4LIF5NS.js} +54 -53
- package/chunks/theme-manager-KKBAJ574.js +90 -0
- package/chunks/{todoWrite-U2R4NVF4.js → todoWrite-FJJTY2TI.js} +7 -7
- package/chunks/{tool-search-5R2OE4C7.js → tool-search-GZJYRK4I.js} +25 -24
- package/chunks/{total-session-admission-4KBHMQQ2.js → total-session-admission-NIBNWXHE.js} +59 -57
- package/chunks/{trustedFolders-LK6T4XC7.js → trustedFolders-7GEI2NYC.js} +53 -52
- package/chunks/{undici-PYHBDDPN.js → undici-S7WJSKGJ.js} +962 -391
- package/chunks/{update-relaunch-UBKROIC6.js → update-relaunch-OA3OEBMD.js} +5 -5
- package/chunks/{updateCheck-W4Y2GFSD.js → updateCheck-QVHQEVIY.js} +56 -55
- package/chunks/{useAutoAcceptIndicator-C7BEICBF.js → useAutoAcceptIndicator-WZ27J7NY.js} +64 -63
- package/chunks/{validateNonInterActiveAuth-LTEI2TB6.js → validateNonInterActiveAuth-OXJA2JWG.js} +99 -96
- package/chunks/{version-G5A5DGVS.js → version-KJO64WD7.js} +1 -1
- package/chunks/{web-fetch-RTEQTR5Z.js → web-fetch-CC5INI2R.js} +25 -23
- package/chunks/{web-search-5OXHEZPV.js → web-search-MOAUAN6N.js} +18 -18
- package/chunks/{web-shell-static-O73YPVVC.js → web-shell-static-3NUTRHAH.js} +4 -5
- package/chunks/{workflow-ISQJHPG2.js → workflow-BN2ZEJMK.js} +366 -105
- package/chunks/workspace-providers-status-R5QTZFK3.js +101 -0
- package/chunks/{workspace-registration-store-CYNY6IP6.js → workspace-registration-store-WMSLM36M.js} +1 -1
- package/chunks/{workspace-registry-34GTUUHB.js → workspace-registry-J3RUCXH6.js} +59 -57
- package/chunks/{workspace-service-XCDQLE2Y.js → workspace-service-JJZFPKM4.js} +66 -65
- package/chunks/workspace-skills-status-DRIOZRIA.js +101 -0
- package/chunks/{workspace-trust-reconciler-AYGXC7A3.js → workspace-trust-reconciler-YAYSN6CX.js} +69 -67
- package/chunks/write-file-7HXHFFOY.js +88 -0
- package/chunks/{zh-TW-SQ4HTSCW.js → zh-TW-LVLBK4KF.js} +8 -0
- package/chunks/{zh-LMSTK4WD.js → zh-UBMWS2BJ.js} +8 -0
- package/chunks/{zoom-image-4BFYJ3HG.js → zoom-image-EFMQMU4G.js} +24 -22
- package/cli.js +15 -15
- package/locales/ca.js +13 -0
- package/locales/de.js +12 -0
- package/locales/en.js +11 -0
- package/locales/fr.js +13 -0
- package/locales/ja.js +13 -0
- package/locales/pt.js +12 -0
- package/locales/ru.js +12 -0
- package/locales/zh-TW.js +11 -0
- package/locales/zh.js +11 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-CgOpDKvm.js → arc-BCP1f-bN.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-0Ag_m34F.js → architectureDiagram-3BPJPVTR-D-6ajMay.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-IwTwFau0.js → blockDiagram-GPEHLZMM-CcLlnVnf.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DLa5GUv8.js → c4Diagram-AAUBKEIU-C_Sp9UwQ.js} +1 -1
- package/web-shell/assets/channel-BcImYzbA.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DcYP-WFG.js → chunk-2J33WTMH-CG0ngvo9.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-C8MVPMiQ.js → chunk-4BX2VUAB-D43LsVdk.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-BUi4Yfv3.js → chunk-55IACEB6-BqNIn5rz.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-Cy3Su2YY.js → chunk-727SXJPM-BSHmO08Y.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Dp8Teqv6.js → chunk-AQP2D5EJ-CMUbr5tQ.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BDTDM-4j.js → chunk-FMBD7UC4-Cm6JflnZ.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-7HfDt0r2.js → chunk-ND2GUHAM-CBR39YQZ.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BIBU0uCF.js → chunk-QZHKN3VN-CWnqaLb-.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-OWx0rDRW.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-OWx0rDRW.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-DRLdcg9p.js → cose-bilkent-S5V4N54A-DJlTdnfD.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DCCgDwqW.js → dagre-BM42HDAG-1AFN1uVc.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CsBTBmk3.js → diagram-2AECGRRQ-gC0GGNSW.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-C9qjH8Lt.js → diagram-5GNKFQAL-CPmRPT1s.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Brjs_lj2.js → diagram-KO2AKTUF-atigp6Hr.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DtiWCl_F.js → diagram-LMA3HP47-BJnJFSRQ.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DmfKLkBT.js → diagram-OG6HWLK6-CyvJ4fG2.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-Bve_4deH.js → erDiagram-TEJ5UH35-CZac_jT6.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-C2_kXCcV.js → flowDiagram-I6XJVG4X-pd-LQxWB.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BSBIjiTF.js → ganttDiagram-6RSMTGT7-CvB1at7l.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CyebwI55.js → gitGraphDiagram-PVQCEYII-B5Y6nkil.js} +1 -1
- package/web-shell/assets/index-Bg3DAn8Z.js +1788 -0
- package/web-shell/assets/{index-d0yfnV1M.js → index-Bj3ZSUHL.js} +1 -1
- package/web-shell/assets/index-mp32EO88.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CSDGnWxU.js → infoDiagram-5YYISTIA-BdyWvU4P.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BK4jU13p.js → ishikawaDiagram-YF4QCWOH-CaHbUdvN.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-D_W6j-oF.js → journeyDiagram-JHISSGLW-DR9F3FpG.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-C7xf-SdC.js → kanban-definition-UN3LZRKU-BoEUbkw2.js} +1 -1
- package/web-shell/assets/{linear-DQmzxpxd.js → linear-DUbfzV4T.js} +1 -1
- package/web-shell/assets/{mermaid.core-9P7AGOLG.js → mermaid.core-CLLkPcpD.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DgcgMyPk.js → mindmap-definition-RKZ34NQL-FuKI3Stt.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-3wWGb9eG.js → pieDiagram-4H26LBE5-CVAHL7l5.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BeCXnQw9.js → quadrantDiagram-W4KKPZXB-BkGi5fRj.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-Bi1UOHDz.js → requirementDiagram-4Y6WPE33-B5ghV8-K.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-lrLUjjbb.js → sankeyDiagram-5OEKKPKP-CKFbVhkQ.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BFuqKz6Q.js → sequenceDiagram-3UESZ5HK-C5P9ujPd.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-8DemQLhu.js → stateDiagram-AJRCARHV-CsDn-Rez.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DpGKD1ez.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-uzEuVQXg.js → timeline-definition-PNZ67QCA-B6oLBkTr.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BQTeZ_-o.js → vennDiagram-CIIHVFJN-DvtBkYwp.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B6yM5Im7.js → wardley-L42UT6IY-D2UwTX16.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-ChM8bmgn.js → wardleyDiagram-YWT4CUSO-FnnfCxYI.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-oNG6HyB1.js → xychartDiagram-2RQKCTM6-C1SaMQ7d.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-UQALOVVT.js +0 -97
- package/chunks/agent-headless-GJCQMURW.js +0 -87
- package/chunks/channel-settings-store-WNWYFHG7.js +0 -102
- package/chunks/chunk-AZQ3DT76.js +0 -10017
- package/chunks/chunk-CR3C7WXL.js +0 -113
- package/chunks/chunk-K5IDV3PC.js +0 -519
- package/chunks/chunk-MPHPFVKK.js +0 -48
- package/chunks/chunk-RLKC46YT.js +0 -3582
- package/chunks/chunk-UPDOZBWO.js +0 -358
- package/chunks/contextCommand-PJ77GBWL.js +0 -93
- package/chunks/daemon-status-provider-ZDOYJCU6.js +0 -102
- package/chunks/daemon-trust-policy-E67OYUK2.js +0 -99
- package/chunks/exitPlanMode-R4JY7V2O.js +0 -85
- package/chunks/handleAutoUpdate-POCX2MNB.js +0 -94
- package/chunks/initializer-Z2AFGBNR.js +0 -100
- package/chunks/installationInfo-4I5FXNMH.js +0 -92
- package/chunks/list-ZMBFIGZA.js +0 -103
- package/chunks/loadedSettingsAdapter-T6TV4YJ7.js +0 -97
- package/chunks/mcp-6UNYX4HG.js +0 -97
- package/chunks/nonInteractiveCli-WAY237O4.js +0 -163
- package/chunks/read-file-TAFBKMNI.js +0 -32
- package/chunks/ripGrep-WOEK2PXS.js +0 -85
- package/chunks/theme-manager-Z3RIT7DB.js +0 -89
- package/chunks/undici-3FJYTMOF.js +0 -25914
- package/chunks/workspace-providers-status-2ZPZPUPZ.js +0 -100
- package/chunks/workspace-skills-status-RS4O7AIJ.js +0 -100
- package/chunks/write-file-EWXKVVXF.js +0 -87
- package/web-shell/assets/channel-BrGVBa2L.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +0 -1
- package/web-shell/assets/index-CIDsgxTe.js +0 -1792
- package/web-shell/assets/index-DiQnWi_E.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +0 -1
- package/chunks/{dist-BROOP2EG.js → dist-LZO24N3E.js} +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
recomputeMcpGating
|
|
5
|
+
} from "./chunk-NQB52P65.js";
|
|
3
6
|
import {
|
|
4
7
|
classifyApiError,
|
|
5
8
|
fireSessionDeleteHook
|
|
@@ -13,21 +16,15 @@ import {
|
|
|
13
16
|
matchMcpServerByRef,
|
|
14
17
|
parseExtensionRef,
|
|
15
18
|
parseMcpServerRef
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FX5TGHDE.js";
|
|
17
20
|
import {
|
|
18
21
|
getAvailableCommands,
|
|
22
|
+
getSlashCommandFirstToken,
|
|
19
23
|
handleSlashCommand,
|
|
20
24
|
insertAfterFunctionResponses,
|
|
21
25
|
isSlashCommand,
|
|
22
26
|
normalizePartList
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
collectContextData,
|
|
26
|
-
formatContextUsageText
|
|
27
|
-
} from "./chunk-N5YPT6PH.js";
|
|
28
|
-
import {
|
|
29
|
-
recomputeMcpGating
|
|
30
|
-
} from "./chunk-GGDBMYGZ.js";
|
|
27
|
+
} from "./chunk-K2MSGB3W.js";
|
|
31
28
|
import {
|
|
32
29
|
SessionIdConflictError,
|
|
33
30
|
appEvents,
|
|
@@ -35,40 +32,44 @@ import {
|
|
|
35
32
|
cleanupReviewWorktreeLeases,
|
|
36
33
|
loadCliConfig,
|
|
37
34
|
normalizeDisabledToolList
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZTAT23TL.js";
|
|
39
36
|
import {
|
|
40
37
|
getCommandSubcommandNames
|
|
41
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-RRRCWDFO.js";
|
|
42
39
|
import {
|
|
43
40
|
getEffectiveSupportedModes
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-4WGODMVR.js";
|
|
41
|
+
} from "./chunk-6U46RZ25.js";
|
|
46
42
|
import "./chunk-3SH53ANB.js";
|
|
47
43
|
import "./chunk-NYX53SV4.js";
|
|
48
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-DB2OKNTU.js";
|
|
49
45
|
import {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
collectContextData,
|
|
47
|
+
formatContextUsageText
|
|
48
|
+
} from "./chunk-MHOY756Q.js";
|
|
49
|
+
import "./chunk-4WGODMVR.js";
|
|
53
50
|
import {
|
|
54
51
|
startNonInteractiveOpenAILogHousekeeping
|
|
55
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-LC5M7YVE.js";
|
|
56
53
|
import "./chunk-KW7NOTN6.js";
|
|
57
54
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
markAcpStartup
|
|
62
|
-
} from "./chunk-CZBYX5MY.js";
|
|
63
|
-
import "./chunk-GO7STP6N.js";
|
|
64
|
-
import "./chunk-JUEPY766.js";
|
|
65
|
-
import "./chunk-NEFOOD54.js";
|
|
55
|
+
isGoalStatusKind
|
|
56
|
+
} from "./chunk-EKTCKZV5.js";
|
|
57
|
+
import "./chunk-J7VPB2HF.js";
|
|
66
58
|
import "./chunk-YAF2MQZ6.js";
|
|
59
|
+
import "./chunk-S3G6YFQC.js";
|
|
67
60
|
import {
|
|
68
61
|
computeCpuPercent
|
|
69
62
|
} from "./chunk-LBOVL47Y.js";
|
|
70
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-JXLPQTMW.js";
|
|
71
64
|
import "./chunk-6H67XLET.js";
|
|
65
|
+
import {
|
|
66
|
+
beginAcpBootstrapConfigProfiling,
|
|
67
|
+
buildAndFreezeAcpStartupProfile,
|
|
68
|
+
endAcpBootstrapConfigProfiling,
|
|
69
|
+
markAcpStartup
|
|
70
|
+
} from "./chunk-U53XZHAE.js";
|
|
71
|
+
import "./chunk-7VITNOH6.js";
|
|
72
|
+
import "./chunk-RNGTMHKN.js";
|
|
72
73
|
import {
|
|
73
74
|
GENERATION_MAX_PROMPT_BYTES,
|
|
74
75
|
GENERATION_TIMEOUT_MS,
|
|
@@ -91,7 +92,7 @@ import {
|
|
|
91
92
|
shouldSuppressRememberErrorDetails,
|
|
92
93
|
workspaceMemoryFailureCode,
|
|
93
94
|
workspaceMemoryFailureDiagnostics
|
|
94
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-TNAIZBPQ.js";
|
|
95
96
|
import {
|
|
96
97
|
BaseEmitter,
|
|
97
98
|
HistoryReplayer,
|
|
@@ -99,14 +100,16 @@ import {
|
|
|
99
100
|
ToolCallEmitter,
|
|
100
101
|
createTranscriptMessageUpdate,
|
|
101
102
|
createTranscriptUsageUpdate,
|
|
102
|
-
hasFullSessionContext
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
import "./chunk-
|
|
103
|
+
hasFullSessionContext,
|
|
104
|
+
observeAcpToolResultProjection,
|
|
105
|
+
observeAcpToolResultWire
|
|
106
|
+
} from "./chunk-3SIGAHUX.js";
|
|
107
|
+
import "./chunk-UZPYR3EV.js";
|
|
108
|
+
import "./chunk-FV6PXZRO.js";
|
|
109
|
+
import "./chunk-E7REAOTN.js";
|
|
107
110
|
import "./chunk-2MIN6GRR.js";
|
|
108
111
|
import "./chunk-QHTIBUWB.js";
|
|
109
|
-
import "./chunk-
|
|
112
|
+
import "./chunk-TXASDT2M.js";
|
|
110
113
|
import {
|
|
111
114
|
buildToolWriteOriginMeta
|
|
112
115
|
} from "./chunk-VGHZT6JR.js";
|
|
@@ -115,31 +118,43 @@ import {
|
|
|
115
118
|
parseCallerSuppliedSessionId
|
|
116
119
|
} from "./chunk-TQOF5KBL.js";
|
|
117
120
|
import "./chunk-UXEO7E3V.js";
|
|
121
|
+
import {
|
|
122
|
+
mapSkillConfigToStatus
|
|
123
|
+
} from "./chunk-BGXZBI5B.js";
|
|
118
124
|
import {
|
|
119
125
|
PERMISSION_RULE_TYPES,
|
|
120
126
|
PermissionRulesValidationError,
|
|
121
127
|
buildPermissionSettings,
|
|
122
128
|
normalizePermissionRules,
|
|
123
129
|
readPermissionRuleSet
|
|
124
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-PLECQWDB.js";
|
|
125
131
|
import {
|
|
126
132
|
MAX_AUDIO_BYTES,
|
|
127
133
|
sanitizeVoiceErrorMessage,
|
|
128
134
|
transcribeVoiceAudio
|
|
129
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-EW2IQ3ID.js";
|
|
130
136
|
import {
|
|
131
137
|
readVoiceModel
|
|
132
|
-
} from "./chunk-
|
|
133
|
-
import "./chunk-
|
|
134
|
-
import
|
|
135
|
-
|
|
138
|
+
} from "./chunk-GXG4PYQB.js";
|
|
139
|
+
import "./chunk-Z3JMO2CH.js";
|
|
140
|
+
import {
|
|
141
|
+
resolveSkillSettings
|
|
142
|
+
} from "./chunk-Z4X5MTRT.js";
|
|
143
|
+
import {
|
|
144
|
+
createLoadedSettingsAdapter
|
|
145
|
+
} from "./chunk-3XD4PT3B.js";
|
|
146
|
+
import "./chunk-JS73NNWF.js";
|
|
147
|
+
import "./chunk-J6SIP2IT.js";
|
|
136
148
|
import {
|
|
137
149
|
SESSION_SOURCE_META_KEY,
|
|
138
150
|
parseSessionSource
|
|
139
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-7CPJMZVJ.js";
|
|
140
152
|
import "./chunk-7U5G6JXI.js";
|
|
141
153
|
import "./chunk-WCCLLK7X.js";
|
|
142
154
|
import "./chunk-OCPBI7J5.js";
|
|
155
|
+
import {
|
|
156
|
+
ndJsonStream
|
|
157
|
+
} from "./chunk-VMJL7RH6.js";
|
|
143
158
|
import {
|
|
144
159
|
ACP_ROUTE_ID_PREFIX,
|
|
145
160
|
buildAcpModelOptions,
|
|
@@ -148,26 +163,7 @@ import {
|
|
|
148
163
|
parseAcpModelOption,
|
|
149
164
|
resolveAcpModelOption,
|
|
150
165
|
sanitizeProviderBaseUrl
|
|
151
|
-
} from "./chunk-
|
|
152
|
-
import {
|
|
153
|
-
mapSkillConfigToStatus
|
|
154
|
-
} from "./chunk-BGXZBI5B.js";
|
|
155
|
-
import {
|
|
156
|
-
resolveSkillSettings
|
|
157
|
-
} from "./chunk-Z4X5MTRT.js";
|
|
158
|
-
import "./chunk-TUGSVUJB.js";
|
|
159
|
-
import "./chunk-QV5YN5YD.js";
|
|
160
|
-
import "./chunk-57OAHC2Y.js";
|
|
161
|
-
import "./chunk-OD2WU5QY.js";
|
|
162
|
-
import "./chunk-45NQKMYB.js";
|
|
163
|
-
import "./chunk-A4QRWUDE.js";
|
|
164
|
-
import "./chunk-V6WHFGST.js";
|
|
165
|
-
import {
|
|
166
|
-
createLoadedSettingsAdapter
|
|
167
|
-
} from "./chunk-BVJS5BSP.js";
|
|
168
|
-
import {
|
|
169
|
-
ndJsonStream
|
|
170
|
-
} from "./chunk-NHDR76JX.js";
|
|
166
|
+
} from "./chunk-3LYGXZ2H.js";
|
|
171
167
|
import {
|
|
172
168
|
ACP_PREFLIGHT_KINDS,
|
|
173
169
|
IDLE_HOOK_EVENTS,
|
|
@@ -175,9 +171,14 @@ import {
|
|
|
175
171
|
SERVE_STATUS_EXT_METHODS,
|
|
176
172
|
STATUS_SCHEMA_VERSION,
|
|
177
173
|
mapDomainErrorToErrorKind
|
|
178
|
-
} from "./chunk-
|
|
179
|
-
import "./chunk-
|
|
180
|
-
import "./chunk-
|
|
174
|
+
} from "./chunk-URN2JIAQ.js";
|
|
175
|
+
import "./chunk-ROV6B34L.js";
|
|
176
|
+
import "./chunk-XJOHLP2A.js";
|
|
177
|
+
import "./chunk-57OAHC2Y.js";
|
|
178
|
+
import "./chunk-J7JQXYVL.js";
|
|
179
|
+
import "./chunk-45NQKMYB.js";
|
|
180
|
+
import "./chunk-2NWPB6T4.js";
|
|
181
|
+
import "./chunk-V6WHFGST.js";
|
|
181
182
|
import {
|
|
182
183
|
ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
|
|
183
184
|
ACTIVE_WORK_HEARTBEAT_META_KEY,
|
|
@@ -188,6 +189,7 @@ import {
|
|
|
188
189
|
CHANNEL_STARTUP_PROFILE_META_KEY,
|
|
189
190
|
CHANNEL_STARTUP_PROFILE_VERSION,
|
|
190
191
|
CLIENT_MCP_OVER_WS_CONFIG_FLAG,
|
|
192
|
+
DAEMON_ATTACHMENT_REFERENCES_META_KEY,
|
|
191
193
|
DAEMON_CHANNEL_DELIVERY_META_KEY,
|
|
192
194
|
DAEMON_MODEL_PROMPT_META_KEY,
|
|
193
195
|
DAEMON_PROMPT_DISPLAY_TEXT_META_KEY,
|
|
@@ -207,18 +209,17 @@ import {
|
|
|
207
209
|
WORKTREE_MCP_DEFER_META_KEY,
|
|
208
210
|
clampActiveWorkIntervalMs,
|
|
209
211
|
isValidTrustedModelPrompt
|
|
210
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-QQUVPMMZ.js";
|
|
211
213
|
import {
|
|
212
214
|
NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
|
|
213
215
|
isNotCurrentlyGeneratingCancelError
|
|
214
216
|
} from "./chunk-624NHDGB.js";
|
|
215
217
|
import "./chunk-6PLDPT2C.js";
|
|
216
218
|
import "./chunk-FYJ7W2PI.js";
|
|
217
|
-
import "./chunk-
|
|
219
|
+
import "./chunk-ND7NOI4P.js";
|
|
218
220
|
import "./chunk-A6NRNRKE.js";
|
|
219
221
|
import "./chunk-ALMR3E6Q.js";
|
|
220
|
-
import "./chunk-
|
|
221
|
-
import "./chunk-M5GB774H.js";
|
|
222
|
+
import "./chunk-UDG5EZJI.js";
|
|
222
223
|
import {
|
|
223
224
|
EXTERNAL_TOOL_GUARD_READY_META_KEY,
|
|
224
225
|
EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
|
|
@@ -228,6 +229,9 @@ import {
|
|
|
228
229
|
SHELL_EXECUTING_TOOL_NAMES,
|
|
229
230
|
isValidExternalToolGuardDenialReason
|
|
230
231
|
} from "./chunk-3VUENPWF.js";
|
|
232
|
+
import "./chunk-M5GB774H.js";
|
|
233
|
+
import "./chunk-W4CRPSC5.js";
|
|
234
|
+
import "./chunk-ZLCT4C5A.js";
|
|
231
235
|
import {
|
|
232
236
|
ACP_EVENT_LOOP_STALL_RESTART_MS,
|
|
233
237
|
CHANNEL_PROMPT_META_KEY
|
|
@@ -237,11 +241,10 @@ import {
|
|
|
237
241
|
PROTOCOL_VERSION,
|
|
238
242
|
RequestError
|
|
239
243
|
} from "./chunk-IW6RQPQB.js";
|
|
240
|
-
import "./chunk-H4A72DE5.js";
|
|
241
244
|
import {
|
|
242
245
|
assembleMcpServers,
|
|
243
246
|
loadMcpApprovals
|
|
244
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-6UDHEIUT.js";
|
|
245
248
|
import {
|
|
246
249
|
getOutputLanguageFilePath,
|
|
247
250
|
getPersistScopeForModelSelection,
|
|
@@ -250,18 +253,13 @@ import {
|
|
|
250
253
|
resolveOutputLanguageOrPreserveAuto,
|
|
251
254
|
updateOutputLanguageFile,
|
|
252
255
|
writeOutputLanguageAndRegisterPath
|
|
253
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-3HWN4E7N.js";
|
|
257
|
+
import "./chunk-VOTDAZR7.js";
|
|
254
258
|
import "./chunk-RKUWKYED.js";
|
|
255
|
-
import "./chunk-E23IPNGS.js";
|
|
256
|
-
import "./chunk-GOXKNSDZ.js";
|
|
257
|
-
import {
|
|
258
|
-
getSystemDefaultsPath,
|
|
259
|
-
getSystemSettingsPath
|
|
260
|
-
} from "./chunk-IDS7MSUP.js";
|
|
261
259
|
import {
|
|
262
260
|
getCurrentLanguage,
|
|
263
261
|
setLanguageAsync
|
|
264
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-45UD2TU4.js";
|
|
265
263
|
import {
|
|
266
264
|
SUPPORTED_LANGUAGES
|
|
267
265
|
} from "./chunk-5EJZE3FP.js";
|
|
@@ -269,20 +267,28 @@ import {
|
|
|
269
267
|
findEnvFiles,
|
|
270
268
|
preResolveHomeEnvOverrides,
|
|
271
269
|
reloadEnvironment
|
|
272
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-5PHLBWBL.js";
|
|
271
|
+
import "./chunk-M2IL2RTA.js";
|
|
272
|
+
import "./chunk-GOXKNSDZ.js";
|
|
273
273
|
import {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
getSystemDefaultsPath,
|
|
275
|
+
getSystemSettingsPath
|
|
276
|
+
} from "./chunk-IDS7MSUP.js";
|
|
277
|
+
import {
|
|
278
|
+
ENV_ACP_REPEATED_TOOL_FAILURE_GUARD,
|
|
279
|
+
QWEN_CODE_SERVE_ENV
|
|
280
|
+
} from "./chunk-CXJHQVEK.js";
|
|
281
|
+
import "./chunk-XFSFZCM5.js";
|
|
282
|
+
import "./chunk-7WLFSDLG.js";
|
|
277
283
|
import "./chunk-WZMH7II3.js";
|
|
278
284
|
import {
|
|
279
285
|
isFolderTrustEnabled,
|
|
280
286
|
isWorkspaceTrusted,
|
|
281
287
|
loadTrustedFolders
|
|
282
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-PSQJ24ZZ.js";
|
|
283
289
|
import "./chunk-NPQ5ZKRP.js";
|
|
284
290
|
import "./chunk-MR3PXB6E.js";
|
|
285
|
-
import "./chunk-
|
|
291
|
+
import "./chunk-LJZSMWOH.js";
|
|
286
292
|
import {
|
|
287
293
|
ALL_PROVIDERS,
|
|
288
294
|
APPROVAL_MODE_INFO,
|
|
@@ -310,6 +316,7 @@ import {
|
|
|
310
316
|
SESSION_TRANSCRIPT_MAX_LIMIT,
|
|
311
317
|
SESSION_TRANSCRIPT_MAX_PAGE_BYTES,
|
|
312
318
|
SESSION_WRITER_RPC_CODES,
|
|
319
|
+
SessionIdCaseConflictError,
|
|
313
320
|
SessionService,
|
|
314
321
|
SessionTranscriptPageTooLargeError,
|
|
315
322
|
SessionTranscriptReader,
|
|
@@ -318,6 +325,8 @@ import {
|
|
|
318
325
|
SessionWriterError,
|
|
319
326
|
SessionWriterUnavailableError,
|
|
320
327
|
TURN_INTERRUPTION_HISTORY_TAIL_COUNT,
|
|
328
|
+
TURN_RESULT_CODE_TEXT_TRUNCATED,
|
|
329
|
+
TURN_RESULT_TEXT_MAX_CHARS,
|
|
321
330
|
WorkspaceMcpBudget,
|
|
322
331
|
abortGoalForStopHookCap,
|
|
323
332
|
acquireSleepInhibitor,
|
|
@@ -370,6 +379,7 @@ import {
|
|
|
370
379
|
getDefaultBaseUrlForProtocol,
|
|
371
380
|
getDefaultModelIds,
|
|
372
381
|
getEffectivePermissionForConfirmation,
|
|
382
|
+
getFunctionCallFingerprint,
|
|
373
383
|
getMCPDiscoveryState,
|
|
374
384
|
getPlanModeSystemReminder,
|
|
375
385
|
getProviderToolCallId,
|
|
@@ -382,17 +392,22 @@ import {
|
|
|
382
392
|
isDenialFallbackReason,
|
|
383
393
|
isGatedMcpScope,
|
|
384
394
|
isPlanModeBlocked,
|
|
395
|
+
isReplayOfHandledToolCall,
|
|
396
|
+
isTurnResultRecordPayload,
|
|
385
397
|
markDuplicateProviderToolCallResponseSent,
|
|
386
398
|
matchesAnyServerPattern,
|
|
387
399
|
mcpServerRequiresOAuth,
|
|
388
400
|
needsConfirmation,
|
|
389
401
|
normalizeEventPayload,
|
|
390
402
|
normalizeSnapshotPayload,
|
|
403
|
+
normalizeTurnResultError,
|
|
404
|
+
observeToolResultBoundary,
|
|
391
405
|
persistPermissionOutcome,
|
|
392
406
|
projectGoalStateToLegacy,
|
|
393
407
|
readManyFiles,
|
|
394
408
|
recordAllow,
|
|
395
409
|
recordFallbackApprove,
|
|
410
|
+
recordHandledToolCall,
|
|
396
411
|
refreshMemoryAfterManagedWrite,
|
|
397
412
|
refreshMemoryInstruction,
|
|
398
413
|
resolveBaseUrl,
|
|
@@ -407,103 +422,101 @@ import {
|
|
|
407
422
|
shouldHaltOnTurnToolCallCap,
|
|
408
423
|
shouldRunAutoModeForCall,
|
|
409
424
|
subagentGenerator,
|
|
425
|
+
toolResultBoundaryArtifact,
|
|
426
|
+
toolResultPartDiagnosticValues,
|
|
410
427
|
truncateNotificationLabel,
|
|
411
428
|
updateSetting,
|
|
412
429
|
validatePlanModeShellApproval,
|
|
413
430
|
validatePlanModeShellContext
|
|
414
|
-
} from "./chunk-
|
|
431
|
+
} from "./chunk-SVU5KGR7.js";
|
|
415
432
|
import "./chunk-GOFAQQZA.js";
|
|
416
|
-
import "./chunk-5M6IDOMF.js";
|
|
417
433
|
import "./chunk-TWPJO254.js";
|
|
418
434
|
import {
|
|
419
435
|
external_exports
|
|
420
436
|
} from "./chunk-CQ35AJ4Z.js";
|
|
421
|
-
import "./chunk-
|
|
422
|
-
import "./chunk-
|
|
423
|
-
import "./chunk-
|
|
424
|
-
import "./chunk-
|
|
437
|
+
import "./chunk-5M6IDOMF.js";
|
|
438
|
+
import "./chunk-KVGR4MCF.js";
|
|
439
|
+
import "./chunk-XZJKSETB.js";
|
|
440
|
+
import "./chunk-YMVFIYHV.js";
|
|
425
441
|
import {
|
|
426
442
|
parsePositiveIntegerEnv
|
|
427
443
|
} from "./chunk-6PVPNMXU.js";
|
|
428
|
-
import "./chunk-
|
|
444
|
+
import "./chunk-OTXXOZKW.js";
|
|
445
|
+
import "./chunk-DJEHYM4H.js";
|
|
429
446
|
import "./chunk-IRH27ZC2.js";
|
|
430
447
|
import "./chunk-QHWCP53L.js";
|
|
431
|
-
import "./chunk-
|
|
432
|
-
import "./chunk-
|
|
448
|
+
import "./chunk-AZF6SME3.js";
|
|
449
|
+
import "./chunk-TBVSALA3.js";
|
|
433
450
|
import {
|
|
434
451
|
promptIdContext,
|
|
435
452
|
todoWorkChainContext
|
|
436
453
|
} from "./chunk-O6GEWCJA.js";
|
|
437
454
|
import "./chunk-T26EAKDL.js";
|
|
438
|
-
import "./chunk-ZPJWUGCS.js";
|
|
439
455
|
import "./chunk-CPBF7KYF.js";
|
|
440
|
-
import
|
|
441
|
-
APPROVAL_MODES
|
|
442
|
-
} from "./chunk-RWDNJBWN.js";
|
|
443
|
-
import "./chunk-25EYDK42.js";
|
|
456
|
+
import "./chunk-VUMLT7E5.js";
|
|
444
457
|
import {
|
|
445
458
|
HookEventName,
|
|
446
459
|
createHookOutput
|
|
447
|
-
} from "./chunk-
|
|
448
|
-
import "./chunk-
|
|
449
|
-
import "./chunk-
|
|
450
|
-
import "./chunk-E3DYKPYZ.js";
|
|
460
|
+
} from "./chunk-ISJMN3ML.js";
|
|
461
|
+
import "./chunk-2TRNCJK4.js";
|
|
462
|
+
import "./chunk-NUGZAFR2.js";
|
|
451
463
|
import {
|
|
464
|
+
GoalConflictError,
|
|
465
|
+
GoalInvalidTransitionError,
|
|
452
466
|
GoalPersistenceUnavailableError,
|
|
453
467
|
emptyGoalSnapshot,
|
|
454
468
|
goalTurnContext,
|
|
469
|
+
parseGoalControlRequest,
|
|
455
470
|
parseGoalSnapshotV2,
|
|
456
471
|
parseGoalStateCause,
|
|
457
472
|
wrapUserPromptSubmitContext
|
|
458
|
-
} from "./chunk-
|
|
459
|
-
import
|
|
473
|
+
} from "./chunk-LDGWX737.js";
|
|
474
|
+
import {
|
|
475
|
+
APPROVAL_MODES
|
|
476
|
+
} from "./chunk-VLRBJ24J.js";
|
|
477
|
+
import "./chunk-ZPJWUGCS.js";
|
|
478
|
+
import "./chunk-MLXTMF7H.js";
|
|
479
|
+
import {
|
|
480
|
+
clearCachedCredentialFile,
|
|
481
|
+
qwenOAuth2Events
|
|
482
|
+
} from "./chunk-O5BDEWBC.js";
|
|
483
|
+
import "./chunk-NAVJD2PQ.js";
|
|
484
|
+
import "./chunk-WRT324N6.js";
|
|
485
|
+
import "./chunk-YDJRMQU4.js";
|
|
486
|
+
import {
|
|
487
|
+
REASONING_EFFORT_TIERS,
|
|
488
|
+
applyReasoningEffort
|
|
489
|
+
} from "./chunk-KM73TBQ4.js";
|
|
490
|
+
import "./chunk-E63A23D7.js";
|
|
460
491
|
import {
|
|
461
492
|
AgentOutputMessageCapture,
|
|
462
493
|
addAgentInputMessageAttributes,
|
|
463
|
-
addDaemonRequestAttribute,
|
|
464
494
|
addToolArgumentsAttributes,
|
|
465
495
|
addToolCallResultAttributes,
|
|
466
|
-
extractDaemonTraceContext,
|
|
467
496
|
registerAcpEventLoopLagGauge,
|
|
468
|
-
startEventLoopLagMonitor
|
|
497
|
+
startEventLoopLagMonitor
|
|
498
|
+
} from "./chunk-6NJIPX6W.js";
|
|
499
|
+
import "./chunk-P3QQPMQA.js";
|
|
500
|
+
import {
|
|
501
|
+
addDaemonRequestAttribute,
|
|
502
|
+
extractDaemonTraceContext,
|
|
469
503
|
withDaemonSpan
|
|
470
|
-
} from "./chunk-
|
|
504
|
+
} from "./chunk-6S2OXVJT.js";
|
|
471
505
|
import "./chunk-SAH4BD2J.js";
|
|
472
|
-
import "./chunk-
|
|
506
|
+
import "./chunk-VSNPOSDN.js";
|
|
473
507
|
import {
|
|
474
508
|
runWithRuntimeContentGenerator
|
|
475
|
-
} from "./chunk-
|
|
509
|
+
} from "./chunk-I432KXWD.js";
|
|
476
510
|
import "./chunk-S6LOFUVP.js";
|
|
477
|
-
import "./chunk-
|
|
478
|
-
import {
|
|
479
|
-
FORK_SUBAGENT_TYPE,
|
|
480
|
-
getStartupContextLength,
|
|
481
|
-
isSystemReminderContent
|
|
482
|
-
} from "./chunk-SG7ZP5PG.js";
|
|
483
|
-
import "./chunk-K623ENWT.js";
|
|
484
|
-
import "./chunk-AQ37AY7B.js";
|
|
485
|
-
import "./chunk-KBXKR5R2.js";
|
|
486
|
-
import {
|
|
487
|
-
clearCachedCredentialFile,
|
|
488
|
-
qwenOAuth2Events
|
|
489
|
-
} from "./chunk-GMIEIY3Y.js";
|
|
490
|
-
import "./chunk-NAVJD2PQ.js";
|
|
491
|
-
import "./chunk-ROIYNTHJ.js";
|
|
492
|
-
import "./chunk-2B2BF7P7.js";
|
|
493
|
-
import "./chunk-P3QQPMQA.js";
|
|
494
|
-
import "./chunk-YZHRN3CF.js";
|
|
495
|
-
import "./chunk-FAAUPSY2.js";
|
|
496
|
-
import {
|
|
497
|
-
REASONING_EFFORT_TIERS,
|
|
498
|
-
applyReasoningEffort
|
|
499
|
-
} from "./chunk-KM73TBQ4.js";
|
|
500
|
-
import "./chunk-MPHPFVKK.js";
|
|
511
|
+
import "./chunk-7IV52LTO.js";
|
|
501
512
|
import "./chunk-AXMWHKXA.js";
|
|
513
|
+
import "./chunk-DJ2GSRLV.js";
|
|
514
|
+
import "./chunk-2J3OJGTL.js";
|
|
515
|
+
import "./chunk-LI4YHTQK.js";
|
|
502
516
|
import {
|
|
503
517
|
getToolCallPreparations
|
|
504
518
|
} from "./chunk-GLCZKT5V.js";
|
|
505
|
-
import "./chunk-
|
|
506
|
-
import "./chunk-QFJ5JHQR.js";
|
|
519
|
+
import "./chunk-C72BXMJ5.js";
|
|
507
520
|
import {
|
|
508
521
|
ConversationFinishedEvent,
|
|
509
522
|
DiscoveredMCPTool,
|
|
@@ -517,11 +530,9 @@ import {
|
|
|
517
530
|
apiActivityTracker,
|
|
518
531
|
formatFullTurnVisionNotice,
|
|
519
532
|
formatVisionBridgeNotice,
|
|
520
|
-
getAllGeminiMdFilenames,
|
|
521
533
|
getFullTurnVisionModelSelector,
|
|
522
534
|
getInvocationContext,
|
|
523
535
|
getMCPServerStatus,
|
|
524
|
-
getSpecificMimeType,
|
|
525
536
|
hasImageParts,
|
|
526
537
|
logConversationFinishedEvent,
|
|
527
538
|
logLoopDetected,
|
|
@@ -536,38 +547,35 @@ import {
|
|
|
536
547
|
shouldRunVisionBridge,
|
|
537
548
|
splitImageParts,
|
|
538
549
|
uiTelemetryService
|
|
539
|
-
} from "./chunk-
|
|
550
|
+
} from "./chunk-RPJOOK6N.js";
|
|
540
551
|
import "./chunk-YRLW2MSX.js";
|
|
541
552
|
import "./chunk-VGC4I5JJ.js";
|
|
553
|
+
import {
|
|
554
|
+
getAllGeminiMdFilenames,
|
|
555
|
+
getSpecificMimeType
|
|
556
|
+
} from "./chunk-IWOWEENB.js";
|
|
542
557
|
import {
|
|
543
558
|
getAutoMemoryRoot,
|
|
544
559
|
getUserAutoMemoryRoot
|
|
545
|
-
} from "./chunk-
|
|
560
|
+
} from "./chunk-HIK2OF33.js";
|
|
546
561
|
import {
|
|
547
562
|
runSideQuery
|
|
548
|
-
} from "./chunk-
|
|
549
|
-
import "./chunk-XUJNK7Y6.js";
|
|
550
|
-
import {
|
|
551
|
-
BaseDeclarativeTool,
|
|
552
|
-
BaseToolInvocation,
|
|
553
|
-
ToolConfirmationOutcome,
|
|
554
|
-
ToolNames,
|
|
555
|
-
canonicalToolName,
|
|
556
|
-
isShellProgressData
|
|
557
|
-
} from "./chunk-6HY6IF3Z.js";
|
|
563
|
+
} from "./chunk-ZRYQMWEP.js";
|
|
558
564
|
import {
|
|
559
565
|
AuthType,
|
|
560
566
|
preloadContentGenerator
|
|
561
|
-
} from "./chunk-
|
|
567
|
+
} from "./chunk-7JDGSJQH.js";
|
|
562
568
|
import "./chunk-F6WFNA7U.js";
|
|
563
|
-
import "./chunk-
|
|
569
|
+
import "./chunk-WZAD4ZNJ.js";
|
|
564
570
|
import {
|
|
565
571
|
DEFAULT_TOKEN_LIMIT,
|
|
566
572
|
tokenLimit
|
|
567
573
|
} from "./chunk-FPGTNKCP.js";
|
|
568
|
-
import "./chunk-
|
|
569
|
-
import "./chunk-
|
|
570
|
-
import "./chunk-
|
|
574
|
+
import "./chunk-YHC2EYYG.js";
|
|
575
|
+
import "./chunk-PZRUV52H.js";
|
|
576
|
+
import "./chunk-JGUBDRBC.js";
|
|
577
|
+
import "./chunk-HDKCKCYO.js";
|
|
578
|
+
import "./chunk-HHJLM3WQ.js";
|
|
571
579
|
import {
|
|
572
580
|
endToolExecutionSpan,
|
|
573
581
|
endToolSpan,
|
|
@@ -575,26 +583,40 @@ import {
|
|
|
575
583
|
initializeTelemetry,
|
|
576
584
|
redactUrlCredentials,
|
|
577
585
|
runInToolSpanContext,
|
|
586
|
+
sessionIdContext,
|
|
578
587
|
startToolExecutionSpan,
|
|
579
588
|
startToolSpan,
|
|
580
589
|
withInteractionSpan
|
|
581
|
-
} from "./chunk-
|
|
582
|
-
import "./chunk-
|
|
590
|
+
} from "./chunk-32CHFLGV.js";
|
|
591
|
+
import "./chunk-74TONY4F.js";
|
|
592
|
+
import "./chunk-XL5K4SVK.js";
|
|
583
593
|
import {
|
|
584
|
-
|
|
585
|
-
|
|
594
|
+
FORK_SUBAGENT_TYPE,
|
|
595
|
+
getStartupContextLength,
|
|
596
|
+
isSystemReminderContent
|
|
597
|
+
} from "./chunk-WZDM44SB.js";
|
|
598
|
+
import "./chunk-K623ENWT.js";
|
|
599
|
+
import "./chunk-AQ37AY7B.js";
|
|
600
|
+
import "./chunk-K52PZNU4.js";
|
|
601
|
+
import {
|
|
602
|
+
BaseDeclarativeTool,
|
|
603
|
+
BaseToolInvocation,
|
|
604
|
+
ToolConfirmationOutcome,
|
|
605
|
+
ToolNames,
|
|
606
|
+
canonicalToolName,
|
|
607
|
+
isShellProgressData
|
|
608
|
+
} from "./chunk-6NFAEG54.js";
|
|
586
609
|
import {
|
|
587
610
|
Storage,
|
|
588
611
|
createDebugLogger,
|
|
589
612
|
getErrorMessage,
|
|
590
613
|
getErrorStatus,
|
|
591
614
|
isSubpath
|
|
592
|
-
} from "./chunk-
|
|
593
|
-
import "./chunk-
|
|
594
|
-
import "./chunk-AW4TRXOC.js";
|
|
615
|
+
} from "./chunk-A5F2YNO6.js";
|
|
616
|
+
import "./chunk-NP2LV67M.js";
|
|
595
617
|
import {
|
|
596
618
|
runExitCleanup
|
|
597
|
-
} from "./chunk-
|
|
619
|
+
} from "./chunk-37BZSWEV.js";
|
|
598
620
|
import {
|
|
599
621
|
writeStderrLine,
|
|
600
622
|
writeStderrLineSafe
|
|
@@ -603,7 +625,7 @@ import "./chunk-75DOP5OR.js";
|
|
|
603
625
|
import "./chunk-DMTGGOSA.js";
|
|
604
626
|
import "./chunk-YQ3U5MUC.js";
|
|
605
627
|
import "./chunk-AMDSOFFV.js";
|
|
606
|
-
import "./chunk-
|
|
628
|
+
import "./chunk-TBWQLLFO.js";
|
|
607
629
|
import {
|
|
608
630
|
init_esbuild_shims
|
|
609
631
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -2213,6 +2235,7 @@ var SubAgentTracker = class {
|
|
|
2213
2235
|
success: event.success,
|
|
2214
2236
|
message: event.responseParts ?? [],
|
|
2215
2237
|
resultDisplay: event.resultDisplay,
|
|
2238
|
+
boundaryArtifact: event.boundaryArtifact,
|
|
2216
2239
|
args: state?.args,
|
|
2217
2240
|
subagentMeta: this.subagentMeta
|
|
2218
2241
|
}).catch((error) => {
|
|
@@ -3034,6 +3057,30 @@ var NEW_PROMPT_ABORT_REASON = "qwen:new-prompt";
|
|
|
3034
3057
|
var SESSION_DISPOSE_ABORT_REASON = "qwen:session-dispose";
|
|
3035
3058
|
var DAEMON_RETRY_META_KEY = "qwen.daemon.retry";
|
|
3036
3059
|
var DAEMON_CONTINUE_META_KEY = "qwen.daemon.continueLastTurn";
|
|
3060
|
+
var MAX_DAEMON_ATTACHMENT_REFERENCES = 256;
|
|
3061
|
+
function readDaemonAttachmentReferences(value) {
|
|
3062
|
+
if (!Array.isArray(value) || value.length === 0 || value.length > MAX_DAEMON_ATTACHMENT_REFERENCES) {
|
|
3063
|
+
return void 0;
|
|
3064
|
+
}
|
|
3065
|
+
const references = [];
|
|
3066
|
+
for (const item of value) {
|
|
3067
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
3068
|
+
return void 0;
|
|
3069
|
+
}
|
|
3070
|
+
const reference = item;
|
|
3071
|
+
if (reference["type"] !== "image" && reference["type"] !== "resource" || typeof reference["attachmentId"] !== "string" || reference["attachmentId"].length === 0 || reference["attachmentId"].length > 255 || typeof reference["mimeType"] !== "string" || reference["mimeType"].length === 0 || reference["mimeType"].length > 128 || typeof reference["size"] !== "number" || !Number.isSafeInteger(reference["size"]) || reference["size"] < 0 || reference["type"] === "image" && reference["size"] === 0) {
|
|
3072
|
+
return void 0;
|
|
3073
|
+
}
|
|
3074
|
+
references.push({
|
|
3075
|
+
type: reference["type"],
|
|
3076
|
+
attachmentId: reference["attachmentId"],
|
|
3077
|
+
mimeType: reference["mimeType"],
|
|
3078
|
+
size: reference["size"]
|
|
3079
|
+
});
|
|
3080
|
+
}
|
|
3081
|
+
return references;
|
|
3082
|
+
}
|
|
3083
|
+
__name(readDaemonAttachmentReferences, "readDaemonAttachmentReferences");
|
|
3037
3084
|
var TODO_STOP_GUARD_PROMPT_PREFIX = "[Todo Stop Guard] ";
|
|
3038
3085
|
var TODO_STOP_GUARD_PROMPT_BODY_SUFFIX = " todo item(s) are still pending or in progress. Continue executing the current task now. Do not ask the user whether to continue. If progress requires user input, use the structured question or permission flow. If progress depends on external state, report the blocker explicitly.";
|
|
3039
3086
|
var TODO_STOP_GUARD_FINAL_PROMPT_SUFFIX = " This is the final automatic continuation. Before ending, either complete/update the todos or report the completed progress and the exact blocker.";
|
|
@@ -3382,10 +3429,68 @@ function isEmbeddedResourceResource(value) {
|
|
|
3382
3429
|
return typeof value["blob"] === "string";
|
|
3383
3430
|
}
|
|
3384
3431
|
__name(isEmbeddedResourceResource, "isEmbeddedResourceResource");
|
|
3385
|
-
function
|
|
3386
|
-
return content.some(
|
|
3432
|
+
function hasInlineAttachmentContentBlock(content) {
|
|
3433
|
+
return content.some(
|
|
3434
|
+
(part) => part.type === "image" || part.type === "audio" || part.type === "resource"
|
|
3435
|
+
);
|
|
3387
3436
|
}
|
|
3388
|
-
__name(
|
|
3437
|
+
__name(hasInlineAttachmentContentBlock, "hasInlineAttachmentContentBlock");
|
|
3438
|
+
function extractTurnPromptText(content) {
|
|
3439
|
+
let hasImage = false;
|
|
3440
|
+
for (const block of content) {
|
|
3441
|
+
if (block.type === "image") hasImage = true;
|
|
3442
|
+
if (block.type === "text" && block.text.length > 0) return block.text;
|
|
3443
|
+
}
|
|
3444
|
+
return hasImage ? "[image]" : "";
|
|
3445
|
+
}
|
|
3446
|
+
__name(extractTurnPromptText, "extractTurnPromptText");
|
|
3447
|
+
function truncateTurnText(text) {
|
|
3448
|
+
if (text.length <= TURN_RESULT_TEXT_MAX_CHARS) {
|
|
3449
|
+
return { text, truncated: false };
|
|
3450
|
+
}
|
|
3451
|
+
return { text: text.slice(0, TURN_RESULT_TEXT_MAX_CHARS), truncated: true };
|
|
3452
|
+
}
|
|
3453
|
+
__name(truncateTurnText, "truncateTurnText");
|
|
3454
|
+
function stripReferencedAttachmentDataParts(parts, content) {
|
|
3455
|
+
const inlineDataCounts = /* @__PURE__ */ new Map();
|
|
3456
|
+
const textCounts = /* @__PURE__ */ new Map();
|
|
3457
|
+
for (const block of content) {
|
|
3458
|
+
if (block.type === "image") {
|
|
3459
|
+
const key = `${block.mimeType}\0${block.data}`;
|
|
3460
|
+
inlineDataCounts.set(key, (inlineDataCounts.get(key) ?? 0) + 1);
|
|
3461
|
+
continue;
|
|
3462
|
+
}
|
|
3463
|
+
if (block.type !== "resource") continue;
|
|
3464
|
+
const resource = block.resource;
|
|
3465
|
+
if ("blob" in resource) {
|
|
3466
|
+
const key = `${resource.mimeType ?? "application/octet-stream"}\0${resource.blob}`;
|
|
3467
|
+
inlineDataCounts.set(key, (inlineDataCounts.get(key) ?? 0) + 1);
|
|
3468
|
+
} else if (resource.text) {
|
|
3469
|
+
const text = `File: ${resource.uri}
|
|
3470
|
+
${resource.text}`;
|
|
3471
|
+
textCounts.set(text, (textCounts.get(text) ?? 0) + 1);
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3474
|
+
return parts.filter((part) => {
|
|
3475
|
+
if (part.inlineData && typeof part.inlineData.data === "string") {
|
|
3476
|
+
const key = `${part.inlineData.mimeType ?? ""}\0${part.inlineData.data}`;
|
|
3477
|
+
const remaining = inlineDataCounts.get(key) ?? 0;
|
|
3478
|
+
if (remaining > 0) {
|
|
3479
|
+
inlineDataCounts.set(key, remaining - 1);
|
|
3480
|
+
return false;
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
if (typeof part.text === "string") {
|
|
3484
|
+
const remaining = textCounts.get(part.text) ?? 0;
|
|
3485
|
+
if (remaining > 0) {
|
|
3486
|
+
textCounts.set(part.text, remaining - 1);
|
|
3487
|
+
return false;
|
|
3488
|
+
}
|
|
3489
|
+
}
|
|
3490
|
+
return true;
|
|
3491
|
+
});
|
|
3492
|
+
}
|
|
3493
|
+
__name(stripReferencedAttachmentDataParts, "stripReferencedAttachmentDataParts");
|
|
3389
3494
|
function capMidTurnDrainItems(items, fieldName) {
|
|
3390
3495
|
if (items.length <= MAX_MID_TURN_DRAIN_ITEMS) return items;
|
|
3391
3496
|
debugLogger6.warn(
|
|
@@ -3422,14 +3527,18 @@ function getValidMidTurnContentBlocks(content, displayText) {
|
|
|
3422
3527
|
return validBlocks;
|
|
3423
3528
|
}
|
|
3424
3529
|
__name(getValidMidTurnContentBlocks, "getValidMidTurnContentBlocks");
|
|
3425
|
-
function getStructuredMidTurnDisplayText(content, displayText) {
|
|
3530
|
+
function getStructuredMidTurnDisplayText(content, displayText, willPersistReferences) {
|
|
3426
3531
|
if (typeof displayText === "string" && displayText.trim().length > 0) {
|
|
3427
3532
|
return displayText.trim();
|
|
3428
3533
|
}
|
|
3429
3534
|
const text = content.filter(
|
|
3430
3535
|
(part) => part.type === "text"
|
|
3431
3536
|
).map((part) => part.text).join("\n").trim();
|
|
3432
|
-
|
|
3537
|
+
if (text) return text;
|
|
3538
|
+
if (!willPersistReferences && hasInlineAttachmentContentBlock(content)) {
|
|
3539
|
+
return "[User message with attachments]";
|
|
3540
|
+
}
|
|
3541
|
+
return text;
|
|
3433
3542
|
}
|
|
3434
3543
|
__name(getStructuredMidTurnDisplayText, "getStructuredMidTurnDisplayText");
|
|
3435
3544
|
function parseMidTurnDrainResponse(response) {
|
|
@@ -3445,14 +3554,22 @@ function parseMidTurnDrainResponse(response) {
|
|
|
3445
3554
|
item["displayText"]
|
|
3446
3555
|
);
|
|
3447
3556
|
if (content.length === 0) return [];
|
|
3557
|
+
const attachmentReferences = readDaemonAttachmentReferences(
|
|
3558
|
+
item["attachmentReferences"]
|
|
3559
|
+
);
|
|
3560
|
+
const willPersistReferences = attachmentReferences !== void 0 && attachmentReferences.length === content.filter(
|
|
3561
|
+
(block) => block.type === "image" || block.type === "resource"
|
|
3562
|
+
).length;
|
|
3448
3563
|
return [
|
|
3449
3564
|
{
|
|
3450
3565
|
kind: "structured",
|
|
3451
3566
|
content,
|
|
3452
3567
|
displayText: getStructuredMidTurnDisplayText(
|
|
3453
3568
|
content,
|
|
3454
|
-
item["displayText"]
|
|
3455
|
-
|
|
3569
|
+
item["displayText"],
|
|
3570
|
+
willPersistReferences
|
|
3571
|
+
),
|
|
3572
|
+
...attachmentReferences ? { attachmentReferences } : {}
|
|
3456
3573
|
}
|
|
3457
3574
|
];
|
|
3458
3575
|
}
|
|
@@ -3477,7 +3594,7 @@ function isValidMidTurnDrainResponse(response, requireQueuedPromptState) {
|
|
|
3477
3594
|
}
|
|
3478
3595
|
if (Array.isArray(response["items"])) {
|
|
3479
3596
|
return response["items"].every(
|
|
3480
|
-
(item) => isRecord2(item) && Array.isArray(item["content"]) && item["content"].length > 0 && item["content"].every(isContentBlock)
|
|
3597
|
+
(item) => isRecord2(item) && Array.isArray(item["content"]) && item["content"].length > 0 && item["content"].every(isContentBlock) && (item["attachmentReferences"] === void 0 || readDaemonAttachmentReferences(item["attachmentReferences"]) !== void 0)
|
|
3481
3598
|
);
|
|
3482
3599
|
}
|
|
3483
3600
|
return Array.isArray(response["messages"]) && response["messages"].every(
|
|
@@ -3507,15 +3624,37 @@ var TodoStopGuardClaimTimeoutError = class extends Error {
|
|
|
3507
3624
|
};
|
|
3508
3625
|
function beginChannelDeliveryResponseBlock(capture) {
|
|
3509
3626
|
capture?.agentOutput.beginResponse();
|
|
3510
|
-
if (
|
|
3511
|
-
capture.
|
|
3512
|
-
return
|
|
3627
|
+
if (capture?.channelDelivery) capture.channelDelivery.finalText = "";
|
|
3628
|
+
if (capture?.turnResult) capture.turnResult.finalText = "";
|
|
3629
|
+
if (!capture?.channelDelivery && !capture?.turnResult) return void 0;
|
|
3630
|
+
return {
|
|
3631
|
+
parts: [],
|
|
3632
|
+
chars: 0,
|
|
3633
|
+
...capture?.channelDelivery ? {} : { capChars: TURN_RESULT_TEXT_MAX_CHARS + 1 }
|
|
3634
|
+
};
|
|
3513
3635
|
}
|
|
3514
3636
|
__name(beginChannelDeliveryResponseBlock, "beginChannelDeliveryResponseBlock");
|
|
3637
|
+
function appendChannelDeliveryResponseText(responseBlock, text) {
|
|
3638
|
+
if (!responseBlock) return;
|
|
3639
|
+
if (responseBlock.capChars !== void 0 && responseBlock.chars >= responseBlock.capChars) {
|
|
3640
|
+
return;
|
|
3641
|
+
}
|
|
3642
|
+
responseBlock.parts.push(text);
|
|
3643
|
+
responseBlock.chars += text.length;
|
|
3644
|
+
}
|
|
3645
|
+
__name(appendChannelDeliveryResponseText, "appendChannelDeliveryResponseText");
|
|
3646
|
+
function rewindChannelDeliveryResponseBlock(responseBlock, checkpoint) {
|
|
3647
|
+
if (!responseBlock) return;
|
|
3648
|
+
const removed = responseBlock.parts.splice(checkpoint);
|
|
3649
|
+
for (const part of removed) responseBlock.chars -= part.length;
|
|
3650
|
+
}
|
|
3651
|
+
__name(rewindChannelDeliveryResponseBlock, "rewindChannelDeliveryResponseBlock");
|
|
3515
3652
|
function commitChannelDeliveryResponseBlock(capture, responseBlock, hasFunctionCalls) {
|
|
3516
3653
|
capture?.agentOutput.commitResponse(hasFunctionCalls);
|
|
3517
|
-
if (
|
|
3518
|
-
|
|
3654
|
+
if (responseBlock && !hasFunctionCalls) {
|
|
3655
|
+
const finalText = responseBlock.parts.join("");
|
|
3656
|
+
if (capture?.channelDelivery) capture.channelDelivery.finalText = finalText;
|
|
3657
|
+
if (capture?.turnResult) capture.turnResult.finalText = finalText;
|
|
3519
3658
|
}
|
|
3520
3659
|
}
|
|
3521
3660
|
__name(commitChannelDeliveryResponseBlock, "commitChannelDeliveryResponseBlock");
|
|
@@ -4067,8 +4206,10 @@ var Session = class {
|
|
|
4067
4206
|
this.goalProcessing = true;
|
|
4068
4207
|
this.activeGoalTurn = turn;
|
|
4069
4208
|
const parts = buildGoalContinuationParts(turn);
|
|
4209
|
+
let result;
|
|
4210
|
+
await this.#emitGoalStartTurn();
|
|
4070
4211
|
try {
|
|
4071
|
-
await this.prompt(
|
|
4212
|
+
result = await this.prompt(
|
|
4072
4213
|
{
|
|
4073
4214
|
sessionId: this.sessionId,
|
|
4074
4215
|
prompt: parts.map((part) => ({
|
|
@@ -4087,6 +4228,7 @@ var Session = class {
|
|
|
4087
4228
|
`ACP Goal turn failed: ${error instanceof Error ? error.message : String(error)}`
|
|
4088
4229
|
);
|
|
4089
4230
|
} finally {
|
|
4231
|
+
await this.#emitGoalEndTurn(result);
|
|
4090
4232
|
if (this.activeGoalTurn === turn) this.activeGoalTurn = void 0;
|
|
4091
4233
|
this.goalProcessing = false;
|
|
4092
4234
|
void this.#drainCronQueue();
|
|
@@ -5208,6 +5350,42 @@ var Session = class {
|
|
|
5208
5350
|
}
|
|
5209
5351
|
}
|
|
5210
5352
|
async prompt(params, invocationContext, admissionCancellation, modelPrompt, scheduledGoalTurn) {
|
|
5353
|
+
if (invocationContext !== void 0 && invocationContext.sessionId !== this.config.getSessionId()) {
|
|
5354
|
+
throw RequestError.invalidParams(
|
|
5355
|
+
void 0,
|
|
5356
|
+
"Invocation context session does not match the active session"
|
|
5357
|
+
);
|
|
5358
|
+
}
|
|
5359
|
+
const turnRecording = this.#beginTurnRecording(params, invocationContext);
|
|
5360
|
+
try {
|
|
5361
|
+
const result = await this.#promptWithTurnRecording(
|
|
5362
|
+
params,
|
|
5363
|
+
invocationContext,
|
|
5364
|
+
admissionCancellation,
|
|
5365
|
+
modelPrompt,
|
|
5366
|
+
scheduledGoalTurn,
|
|
5367
|
+
turnRecording
|
|
5368
|
+
);
|
|
5369
|
+
this.#settleTurnRecording(
|
|
5370
|
+
result.stopReason === "cancelled" ? "cancelled" : "completed",
|
|
5371
|
+
turnRecording,
|
|
5372
|
+
result
|
|
5373
|
+
);
|
|
5374
|
+
return result;
|
|
5375
|
+
} catch (error) {
|
|
5376
|
+
const pendingSend = turnRecording?.abortController;
|
|
5377
|
+
const abortReason = pendingSend?.signal.aborted === true ? pendingSend.signal.reason : void 0;
|
|
5378
|
+
const controlledAbort = abortReason === USER_CANCEL_ABORT_REASON || abortReason === SESSION_DISPOSE_ABORT_REASON || abortReason === NEW_PROMPT_ABORT_REASON && this.#isAbortError(error);
|
|
5379
|
+
if (controlledAbort) {
|
|
5380
|
+
const result = { stopReason: "cancelled" };
|
|
5381
|
+
this.#settleTurnRecording("cancelled", turnRecording, result);
|
|
5382
|
+
return result;
|
|
5383
|
+
}
|
|
5384
|
+
this.#settleTurnRecording("error", turnRecording, void 0, error);
|
|
5385
|
+
throw error;
|
|
5386
|
+
}
|
|
5387
|
+
}
|
|
5388
|
+
async #promptWithTurnRecording(params, invocationContext, admissionCancellation, modelPrompt, scheduledGoalTurn, turnRecording) {
|
|
5211
5389
|
if (this.closing) {
|
|
5212
5390
|
throw RequestError.invalidParams(void 0, "Session is closing");
|
|
5213
5391
|
}
|
|
@@ -5267,6 +5445,7 @@ var Session = class {
|
|
|
5267
5445
|
}
|
|
5268
5446
|
this.pendingPrompt?.abort(NEW_PROMPT_ABORT_REASON);
|
|
5269
5447
|
const pendingSend = goalTurn?.controller ?? new AbortController();
|
|
5448
|
+
if (turnRecording) turnRecording.abortController = pendingSend;
|
|
5270
5449
|
const cancelPendingSend = /* @__PURE__ */ __name(() => pendingSend.abort(USER_CANCEL_ABORT_REASON), "cancelPendingSend");
|
|
5271
5450
|
if (admissionCancellation) {
|
|
5272
5451
|
admissionCancellation.addEventListener("abort", cancelPendingSend, {
|
|
@@ -5372,6 +5551,7 @@ var Session = class {
|
|
|
5372
5551
|
const channelDelivery = parsePromptChannelDelivery(params);
|
|
5373
5552
|
const responseCapture = {
|
|
5374
5553
|
...channelDelivery ? { channelDelivery: { finalText: "" } } : {},
|
|
5554
|
+
...turnRecording ? { turnResult: turnRecording.finalAnswer } : {},
|
|
5375
5555
|
agentOutput: new AgentOutputMessageCapture(this.config)
|
|
5376
5556
|
};
|
|
5377
5557
|
let resolveCompletion;
|
|
@@ -5381,6 +5561,7 @@ var Session = class {
|
|
|
5381
5561
|
let rejectedByLoopProtection = false;
|
|
5382
5562
|
let promptResult;
|
|
5383
5563
|
let promptFailed = false;
|
|
5564
|
+
if (turnRecording) turnRecording.startedAt = Date.now();
|
|
5384
5565
|
try {
|
|
5385
5566
|
const result = await this.#executePrompt(
|
|
5386
5567
|
params,
|
|
@@ -5518,7 +5699,7 @@ var Session = class {
|
|
|
5518
5699
|
* `qwen/notify/session/prompt-suggestion` extNotification. Mirrors
|
|
5519
5700
|
* the CLI's `AppContainer.tsx` integration: same `generatePromptSuggestion`
|
|
5520
5701
|
* call, same `enableCacheSharing` flag forwarding, same curated
|
|
5521
|
-
* history
|
|
5702
|
+
* history tail (`getHistoryTail(40, true)`).
|
|
5522
5703
|
*
|
|
5523
5704
|
* Differences from the CLI:
|
|
5524
5705
|
* - Triggers only on `stopReason === 'end_turn'` (the daemon
|
|
@@ -5548,21 +5729,25 @@ var Session = class {
|
|
|
5548
5729
|
const promptId = this.config.getSessionId() + "########" + String(this.turn);
|
|
5549
5730
|
void (async () => {
|
|
5550
5731
|
try {
|
|
5551
|
-
const
|
|
5552
|
-
const lastEntry =
|
|
5732
|
+
const conversationHistory = chat.getHistoryTail(40, true);
|
|
5733
|
+
const lastEntry = conversationHistory[conversationHistory.length - 1];
|
|
5553
5734
|
if (!lastEntry || lastEntry.role !== "model") {
|
|
5554
5735
|
debugLogger6.debug(
|
|
5555
5736
|
"Skipping followup suggestion: last history entry is not model"
|
|
5556
5737
|
);
|
|
5557
5738
|
return;
|
|
5558
5739
|
}
|
|
5559
|
-
const conversationHistory = fullHistory.length > 40 ? fullHistory.slice(-40) : fullHistory;
|
|
5560
5740
|
const r = await generatePromptSuggestion(
|
|
5561
5741
|
this.config,
|
|
5562
5742
|
conversationHistory,
|
|
5563
5743
|
ac.signal,
|
|
5564
5744
|
{
|
|
5565
|
-
|
|
5745
|
+
// On by default: the schema declares `default: true`, but
|
|
5746
|
+
// `mergeSettings` doesn't apply schema defaults, so an unset value
|
|
5747
|
+
// is `undefined` and a `=== true` gate left the cache-aware fork
|
|
5748
|
+
// as dead code unless the flag was explicitly set (#9230). Mirrors
|
|
5749
|
+
// AppContainer — only an explicit `false` opts out.
|
|
5750
|
+
enableCacheSharing: this.settings.merged.ui?.enableCacheSharing !== false
|
|
5566
5751
|
}
|
|
5567
5752
|
);
|
|
5568
5753
|
if (ac.signal.aborted) return;
|
|
@@ -5648,7 +5833,8 @@ var Session = class {
|
|
|
5648
5833
|
},
|
|
5649
5834
|
async () => {
|
|
5650
5835
|
const promptText = params.prompt.filter((block) => block.type === "text").map((block) => block.type === "text" ? block.text : "").join(" ");
|
|
5651
|
-
const
|
|
5836
|
+
const promptDisplayTextValue = promptMetadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
5837
|
+
const promptDisplayText = typeof promptDisplayTextValue === "string" ? promptDisplayTextValue : void 0;
|
|
5652
5838
|
const modelPromptBlocks = modelPrompt === void 0 ? params.prompt : [{ type: "text", text: modelPrompt }];
|
|
5653
5839
|
logUserPrompt(
|
|
5654
5840
|
this.config,
|
|
@@ -5671,6 +5857,12 @@ var Session = class {
|
|
|
5671
5857
|
);
|
|
5672
5858
|
}
|
|
5673
5859
|
}
|
|
5860
|
+
const firstTextBlock = modelPromptBlocks.find(
|
|
5861
|
+
(block) => block.type === "text"
|
|
5862
|
+
);
|
|
5863
|
+
const inputText = firstTextBlock?.text || "";
|
|
5864
|
+
const isSlashInput = !isContinue && isSlashCommand(inputText);
|
|
5865
|
+
const slashCommandName = getSlashCommandFirstToken(inputText);
|
|
5674
5866
|
let continuationParts = null;
|
|
5675
5867
|
let strippedOrphanEntries = null;
|
|
5676
5868
|
let orphanPushCountSnapshot = 0;
|
|
@@ -5709,12 +5901,16 @@ var Session = class {
|
|
|
5709
5901
|
} else if (isContinue) {
|
|
5710
5902
|
} else if (isRetry) {
|
|
5711
5903
|
this.#getCurrentChat().stripOrphanedUserEntriesFromHistory();
|
|
5712
|
-
} else {
|
|
5904
|
+
} else if (!isSlashInput || slashCommandName !== "advisor") {
|
|
5905
|
+
const attachmentReferences = readDaemonAttachmentReferences(
|
|
5906
|
+
promptMetadata?.[DAEMON_ATTACHMENT_REFERENCES_META_KEY]
|
|
5907
|
+
);
|
|
5713
5908
|
const recorder = this.config.getChatRecordingService();
|
|
5714
|
-
if (promptDisplayText !== void 0) {
|
|
5909
|
+
if (promptDisplayText !== void 0 || attachmentReferences) {
|
|
5715
5910
|
recorder?.recordUserMessage(promptText, goalTurn?.permit, {
|
|
5716
|
-
displayText: promptDisplayText,
|
|
5717
|
-
hookContext: ""
|
|
5911
|
+
displayText: promptDisplayText ?? promptText,
|
|
5912
|
+
hookContext: "",
|
|
5913
|
+
...attachmentReferences ? { attachmentReferences } : {}
|
|
5718
5914
|
});
|
|
5719
5915
|
} else if (goalTurn) {
|
|
5720
5916
|
recorder?.recordUserMessage(promptText, goalTurn.permit);
|
|
@@ -5722,11 +5918,6 @@ var Session = class {
|
|
|
5722
5918
|
recorder?.recordUserMessage(promptText);
|
|
5723
5919
|
}
|
|
5724
5920
|
}
|
|
5725
|
-
const firstTextBlock = modelPromptBlocks.find(
|
|
5726
|
-
(block) => block.type === "text"
|
|
5727
|
-
);
|
|
5728
|
-
const inputText = firstTextBlock?.text || "";
|
|
5729
|
-
const isSlashInput = !isContinue && isSlashCommand(inputText);
|
|
5730
5921
|
if (!isSlashInput && !isContinue && !isRetry) {
|
|
5731
5922
|
this.refreshContextFilesOnWrite = false;
|
|
5732
5923
|
}
|
|
@@ -5757,13 +5948,58 @@ var Session = class {
|
|
|
5757
5948
|
startNewSession: /* @__PURE__ */ __name(() => this.rebindGoalRuntimeForNewSession(), "startNewSession")
|
|
5758
5949
|
}
|
|
5759
5950
|
);
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5951
|
+
if (slashCommandName === "advisor" && pendingSend.signal.aborted && slashCommandResult.type === "message") {
|
|
5952
|
+
this.todoStopGuard.suspend();
|
|
5953
|
+
logConversationFinishedEvent(
|
|
5954
|
+
this.config,
|
|
5955
|
+
new ConversationFinishedEvent(
|
|
5956
|
+
this.config.getApprovalMode(),
|
|
5957
|
+
0
|
|
5958
|
+
)
|
|
5959
|
+
);
|
|
5960
|
+
return { stopReason: "cancelled" };
|
|
5961
|
+
}
|
|
5962
|
+
const resolvedCommandInfo = slashCommandResult.resolvedCommand;
|
|
5963
|
+
const shouldRecordSlashCommand = !(resolvedCommandInfo?.kind === "built-in" /* BUILT_IN */ && resolvedCommandInfo.name === "advisor");
|
|
5964
|
+
if (slashCommandName === "advisor" && shouldRecordSlashCommand && goalTurn?.origin !== "runtime" && !isRetry) {
|
|
5965
|
+
const recorder = this.config.getChatRecordingService();
|
|
5966
|
+
if (promptDisplayText !== void 0) {
|
|
5967
|
+
recorder?.recordUserMessage(promptText, goalTurn?.permit, {
|
|
5968
|
+
displayText: promptDisplayText,
|
|
5969
|
+
hookContext: ""
|
|
5970
|
+
});
|
|
5971
|
+
} else if (goalTurn) {
|
|
5972
|
+
recorder?.recordUserMessage(promptText, goalTurn.permit);
|
|
5973
|
+
} else {
|
|
5974
|
+
recorder?.recordUserMessage(promptText);
|
|
5975
|
+
}
|
|
5976
|
+
}
|
|
5977
|
+
try {
|
|
5978
|
+
parts = await this.#processSlashCommandResult(
|
|
5979
|
+
slashCommandResult,
|
|
5980
|
+
modelPromptBlocks,
|
|
5981
|
+
pendingSend.signal,
|
|
5982
|
+
onFullTurnModel,
|
|
5983
|
+
shouldRecordSlashCommand
|
|
5984
|
+
);
|
|
5985
|
+
} catch (error) {
|
|
5986
|
+
logConversationFinishedEvent(
|
|
5987
|
+
this.config,
|
|
5988
|
+
new ConversationFinishedEvent(
|
|
5989
|
+
this.config.getApprovalMode(),
|
|
5990
|
+
0
|
|
5991
|
+
)
|
|
5992
|
+
);
|
|
5993
|
+
throw error;
|
|
5994
|
+
}
|
|
5766
5995
|
if (parts === null) {
|
|
5996
|
+
logConversationFinishedEvent(
|
|
5997
|
+
this.config,
|
|
5998
|
+
new ConversationFinishedEvent(
|
|
5999
|
+
this.config.getApprovalMode(),
|
|
6000
|
+
0
|
|
6001
|
+
)
|
|
6002
|
+
);
|
|
5767
6003
|
return { stopReason: "end_turn" };
|
|
5768
6004
|
}
|
|
5769
6005
|
} else {
|
|
@@ -5909,7 +6145,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
5909
6145
|
const responseStream = sendResult.responseStream;
|
|
5910
6146
|
nextMessage = null;
|
|
5911
6147
|
channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(responseCapture);
|
|
5912
|
-
channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
|
|
6148
|
+
channelDeliveryCheckpoint = channelDeliveryResponseBlock?.parts.length ?? 0;
|
|
5913
6149
|
let streamFailed = false;
|
|
5914
6150
|
try {
|
|
5915
6151
|
for await (const resp of responseStream) {
|
|
@@ -5930,7 +6166,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
5930
6166
|
);
|
|
5931
6167
|
if (!part.thought) {
|
|
5932
6168
|
responseCapture.agentOutput.appendText(part.text);
|
|
5933
|
-
|
|
6169
|
+
appendChannelDeliveryResponseText(
|
|
6170
|
+
channelDeliveryResponseBlock,
|
|
6171
|
+
part.text
|
|
6172
|
+
);
|
|
5934
6173
|
messageDisplay?.addChunk(part.text);
|
|
5935
6174
|
}
|
|
5936
6175
|
}
|
|
@@ -5953,9 +6192,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
5953
6192
|
resp.type === "retry" /* RETRY */ && resp.isContinuation === true
|
|
5954
6193
|
);
|
|
5955
6194
|
if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
|
|
5956
|
-
|
|
5957
|
-
channelDeliveryResponseBlock
|
|
5958
|
-
|
|
6195
|
+
rewindChannelDeliveryResponseBlock(
|
|
6196
|
+
channelDeliveryResponseBlock,
|
|
6197
|
+
channelDeliveryCheckpoint
|
|
6198
|
+
);
|
|
5959
6199
|
}
|
|
5960
6200
|
await finalizeToolCallPreparations(
|
|
5961
6201
|
preparationTracker,
|
|
@@ -6668,7 +6908,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6668
6908
|
channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(
|
|
6669
6909
|
options.responseCapture
|
|
6670
6910
|
);
|
|
6671
|
-
channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
|
|
6911
|
+
channelDeliveryCheckpoint = channelDeliveryResponseBlock?.parts.length ?? 0;
|
|
6672
6912
|
initialSend = false;
|
|
6673
6913
|
if (guardForThisSend) {
|
|
6674
6914
|
const guardCommitted = this.todoStopGuard.commitContinuation(
|
|
@@ -6701,7 +6941,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6701
6941
|
);
|
|
6702
6942
|
if (!part.thought) {
|
|
6703
6943
|
options.responseCapture?.agentOutput.appendText(part.text);
|
|
6704
|
-
|
|
6944
|
+
appendChannelDeliveryResponseText(
|
|
6945
|
+
channelDeliveryResponseBlock,
|
|
6946
|
+
part.text
|
|
6947
|
+
);
|
|
6705
6948
|
messageDisplay?.addChunk(part.text);
|
|
6706
6949
|
}
|
|
6707
6950
|
}
|
|
@@ -6724,9 +6967,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6724
6967
|
response.type === "retry" /* RETRY */ && response.isContinuation === true
|
|
6725
6968
|
);
|
|
6726
6969
|
if (response.type === "model_fallback" /* MODEL_FALLBACK */ || !response.isContinuation) {
|
|
6727
|
-
|
|
6728
|
-
channelDeliveryResponseBlock
|
|
6729
|
-
|
|
6970
|
+
rewindChannelDeliveryResponseBlock(
|
|
6971
|
+
channelDeliveryResponseBlock,
|
|
6972
|
+
channelDeliveryCheckpoint
|
|
6973
|
+
);
|
|
6730
6974
|
}
|
|
6731
6975
|
await finalizeToolCallPreparations(
|
|
6732
6976
|
preparationTracker,
|
|
@@ -6918,9 +7162,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6918
7162
|
}
|
|
6919
7163
|
}
|
|
6920
7164
|
async sendUpdate(update) {
|
|
7165
|
+
const projectedUpdate = projectAcpToolResultUpdate(update);
|
|
7166
|
+
observeAcpToolResultProjection(update, projectedUpdate, this.sessionId);
|
|
6921
7167
|
const params = {
|
|
6922
7168
|
sessionId: this.sessionId,
|
|
6923
|
-
update:
|
|
7169
|
+
update: projectedUpdate
|
|
6924
7170
|
};
|
|
6925
7171
|
if (update.sessionUpdate === "plan") {
|
|
6926
7172
|
this.activeTodoPlanRevision = void 0;
|
|
@@ -6951,6 +7197,52 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6951
7197
|
}, 0);
|
|
6952
7198
|
timer.unref();
|
|
6953
7199
|
}
|
|
7200
|
+
#beginTurnRecording(params, invocationContext) {
|
|
7201
|
+
if (!invocationContext) return null;
|
|
7202
|
+
const promptMetadata = params._meta;
|
|
7203
|
+
const rawPromptDisplayText = promptMetadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
7204
|
+
const promptDisplayText = typeof rawPromptDisplayText === "string" && rawPromptDisplayText !== "" ? rawPromptDisplayText : void 0;
|
|
7205
|
+
const { text, truncated } = truncateTurnText(
|
|
7206
|
+
promptDisplayText ?? extractTurnPromptText(params.prompt)
|
|
7207
|
+
);
|
|
7208
|
+
const recordingService = this.config.getChatRecordingService();
|
|
7209
|
+
return {
|
|
7210
|
+
promptId: invocationContext.promptId,
|
|
7211
|
+
...invocationContext.originatorClientId !== void 0 ? { originatorClientId: invocationContext.originatorClientId } : {},
|
|
7212
|
+
promptText: text,
|
|
7213
|
+
promptTextTruncated: truncated,
|
|
7214
|
+
finalAnswer: { finalText: "" },
|
|
7215
|
+
...recordingService !== void 0 ? { recordingService } : {}
|
|
7216
|
+
};
|
|
7217
|
+
}
|
|
7218
|
+
#settleTurnRecording(state, recording, response, error) {
|
|
7219
|
+
if (recording === null) return;
|
|
7220
|
+
const finalAnswer = truncateTurnText(recording.finalAnswer.finalText);
|
|
7221
|
+
const stopReason = response?.stopReason ?? (state === "cancelled" ? "cancelled" : void 0);
|
|
7222
|
+
const payload = {
|
|
7223
|
+
promptId: recording.promptId,
|
|
7224
|
+
state,
|
|
7225
|
+
...stopReason !== void 0 ? { stopReason } : {},
|
|
7226
|
+
...state === "error" ? { error: normalizeTurnResultError(error) } : {},
|
|
7227
|
+
...recording.startedAt !== void 0 ? { startedAt: recording.startedAt } : {},
|
|
7228
|
+
endedAt: Date.now(),
|
|
7229
|
+
promptText: recording.promptText,
|
|
7230
|
+
...recording.promptTextTruncated ? { promptTextTruncated: true } : {},
|
|
7231
|
+
...finalAnswer.text.length > 0 ? { resultText: finalAnswer.text } : {},
|
|
7232
|
+
...finalAnswer.truncated ? {
|
|
7233
|
+
resultTruncated: true,
|
|
7234
|
+
resultCode: TURN_RESULT_CODE_TEXT_TRUNCATED
|
|
7235
|
+
} : {},
|
|
7236
|
+
...recording.originatorClientId !== void 0 ? { originatorClientId: recording.originatorClientId } : {}
|
|
7237
|
+
};
|
|
7238
|
+
try {
|
|
7239
|
+
recording.recordingService?.recordTurnResult(payload);
|
|
7240
|
+
} catch (recordError) {
|
|
7241
|
+
debugLogger6.warn(
|
|
7242
|
+
`Failed to record turn result: ${this.#formatError(recordError)}`
|
|
7243
|
+
);
|
|
7244
|
+
}
|
|
7245
|
+
}
|
|
6954
7246
|
#getCurrentChat() {
|
|
6955
7247
|
return this.config.getGeminiClient().getChat();
|
|
6956
7248
|
}
|
|
@@ -7146,13 +7438,6 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7146
7438
|
debugLogger6.debug("Stopping ACP turn after daemon loop detection.");
|
|
7147
7439
|
return { message: null, hadMidTurnUserInput: false };
|
|
7148
7440
|
}
|
|
7149
|
-
if (toolRun.repeatedDuplicateProviderToolCall) {
|
|
7150
|
-
this.todoStopGuard.suspend();
|
|
7151
|
-
debugLogger6.debug(
|
|
7152
|
-
"Stopping ACP turn after dropping repeated duplicate provider tool-call response."
|
|
7153
|
-
);
|
|
7154
|
-
return { message: null, hadMidTurnUserInput: false };
|
|
7155
|
-
}
|
|
7156
7441
|
const drained = await this.#drainMidTurnInput(abortSignal, {
|
|
7157
7442
|
watchQueuedPrompt: toolLoopState.repeatedToolFailureMode !== "off",
|
|
7158
7443
|
onFullTurnModel
|
|
@@ -7476,12 +7761,29 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7476
7761
|
);
|
|
7477
7762
|
}
|
|
7478
7763
|
rawParts = [{ text: displayText }];
|
|
7479
|
-
if (message.kind === "structured" &&
|
|
7764
|
+
if (message.kind === "structured" && hasInlineAttachmentContentBlock(message.content)) {
|
|
7480
7765
|
rawParts.push({ text: MID_TURN_ATTACHMENT_PROCESSING_FAILURE_TEXT });
|
|
7481
7766
|
}
|
|
7482
7767
|
}
|
|
7483
7768
|
const built = prefixMidTurnUserMessageParts(rawParts, displayText);
|
|
7484
|
-
this.config.getChatRecordingService()
|
|
7769
|
+
const recorder = this.config.getChatRecordingService();
|
|
7770
|
+
if (message.kind === "structured" && message.attachmentReferences) {
|
|
7771
|
+
const everyAttachmentBlockHasAReference = message.attachmentReferences.length === message.content.filter(
|
|
7772
|
+
(block) => block.type === "image" || block.type === "resource"
|
|
7773
|
+
).length;
|
|
7774
|
+
if (everyAttachmentBlockHasAReference) {
|
|
7775
|
+
recorder?.recordMidTurnUserMessage(
|
|
7776
|
+
stripReferencedAttachmentDataParts(built, message.content),
|
|
7777
|
+
displayText,
|
|
7778
|
+
void 0,
|
|
7779
|
+
message.attachmentReferences
|
|
7780
|
+
);
|
|
7781
|
+
} else {
|
|
7782
|
+
recorder?.recordMidTurnUserMessage(built, displayText);
|
|
7783
|
+
}
|
|
7784
|
+
} else {
|
|
7785
|
+
recorder?.recordMidTurnUserMessage(built, displayText);
|
|
7786
|
+
}
|
|
7485
7787
|
parts.push(...built);
|
|
7486
7788
|
}
|
|
7487
7789
|
return parts;
|
|
@@ -7803,7 +8105,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7803
8105
|
}
|
|
7804
8106
|
const responseStream = sendResult.responseStream;
|
|
7805
8107
|
const channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(responseCapture);
|
|
7806
|
-
const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
|
|
8108
|
+
const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.parts.length ?? 0;
|
|
7807
8109
|
if (loopTick && turnCount === 1) {
|
|
7808
8110
|
this.loopTickResolver?.markDelivered();
|
|
7809
8111
|
}
|
|
@@ -7829,7 +8131,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7829
8131
|
);
|
|
7830
8132
|
if (!part.thought) {
|
|
7831
8133
|
responseCapture.agentOutput.appendText(part.text);
|
|
7832
|
-
|
|
8134
|
+
appendChannelDeliveryResponseText(
|
|
8135
|
+
channelDeliveryResponseBlock,
|
|
8136
|
+
part.text
|
|
8137
|
+
);
|
|
7833
8138
|
messageDisplay?.addChunk(part.text);
|
|
7834
8139
|
}
|
|
7835
8140
|
}
|
|
@@ -7852,9 +8157,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7852
8157
|
resp.type === "retry" /* RETRY */ && resp.isContinuation === true
|
|
7853
8158
|
);
|
|
7854
8159
|
if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
|
|
7855
|
-
|
|
7856
|
-
channelDeliveryResponseBlock
|
|
7857
|
-
|
|
8160
|
+
rewindChannelDeliveryResponseBlock(
|
|
8161
|
+
channelDeliveryResponseBlock,
|
|
8162
|
+
channelDeliveryCheckpoint
|
|
8163
|
+
);
|
|
7858
8164
|
}
|
|
7859
8165
|
await finalizeToolCallPreparations(
|
|
7860
8166
|
preparationTracker,
|
|
@@ -8541,6 +8847,38 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8541
8847
|
);
|
|
8542
8848
|
}
|
|
8543
8849
|
}
|
|
8850
|
+
/**
|
|
8851
|
+
* Goal turns run inside this child via `prompt()` directly, so the daemon
|
|
8852
|
+
* bridge never observes a `session/prompt` RPC boundary for them and would
|
|
8853
|
+
* otherwise publish no `turn_complete` — leaving SSE clients (Web Shell,
|
|
8854
|
+
* SDK) with a streaming state that never settles.
|
|
8855
|
+
*/
|
|
8856
|
+
async #emitGoalStartTurn() {
|
|
8857
|
+
try {
|
|
8858
|
+
await this.client.extNotification("_qwencode/start_turn", {
|
|
8859
|
+
sessionId: this.sessionId,
|
|
8860
|
+
source: "goal"
|
|
8861
|
+
});
|
|
8862
|
+
} catch (error) {
|
|
8863
|
+
debugLogger6.debug(
|
|
8864
|
+
`Goal start-turn extNotification dropped: ${this.#formatError(error)}`
|
|
8865
|
+
);
|
|
8866
|
+
}
|
|
8867
|
+
}
|
|
8868
|
+
async #emitGoalEndTurn(result) {
|
|
8869
|
+
try {
|
|
8870
|
+
await this.client.extNotification("_qwencode/end_turn", {
|
|
8871
|
+
sessionId: this.sessionId,
|
|
8872
|
+
reason: result?.stopReason ?? "cancelled",
|
|
8873
|
+
source: "goal",
|
|
8874
|
+
promptId: this.config.getSessionId() + "########" + String(this.turn)
|
|
8875
|
+
});
|
|
8876
|
+
} catch (error) {
|
|
8877
|
+
debugLogger6.debug(
|
|
8878
|
+
`Goal end-turn extNotification dropped: ${this.#formatError(error)}`
|
|
8879
|
+
);
|
|
8880
|
+
}
|
|
8881
|
+
}
|
|
8544
8882
|
async sendAvailableCommandsUpdate() {
|
|
8545
8883
|
try {
|
|
8546
8884
|
await this.sendAvailableCommandsUpdateOrThrow();
|
|
@@ -8834,11 +9172,17 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8834
9172
|
callId: record.callId,
|
|
8835
9173
|
toolName: record.toolName,
|
|
8836
9174
|
responseParts: record.responseParts,
|
|
8837
|
-
persistedOutputFiles: record.persistedOutputFiles
|
|
8838
|
-
|
|
9175
|
+
persistedOutputFiles: record.persistedOutputFiles,
|
|
9176
|
+
artifacts: record.metadata.artifacts
|
|
9177
|
+
})),
|
|
9178
|
+
new Map(orderedRecords.map((record) => [record.callId, promptId]))
|
|
8839
9179
|
);
|
|
8840
9180
|
orderedRecords.forEach((record, index) => {
|
|
8841
|
-
this.config.getChatRecordingService()?.recordToolResult(finalized[index].responseParts,
|
|
9181
|
+
this.config.getChatRecordingService()?.recordToolResult(finalized[index].responseParts, {
|
|
9182
|
+
...record.metadata,
|
|
9183
|
+
persistedOutputFiles: finalized[index].persistedOutputFiles,
|
|
9184
|
+
artifacts: finalized[index].artifacts
|
|
9185
|
+
});
|
|
8842
9186
|
});
|
|
8843
9187
|
return {
|
|
8844
9188
|
...result,
|
|
@@ -8887,25 +9231,53 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8887
9231
|
return part;
|
|
8888
9232
|
}, "recordSkippedToolCall");
|
|
8889
9233
|
const batches = [];
|
|
8890
|
-
const
|
|
8891
|
-
this.#getCurrentChat().
|
|
9234
|
+
const handledToolCallFingerprints = new Map(
|
|
9235
|
+
this.#getCurrentChat().getHistoryToolCallFingerprints()
|
|
8892
9236
|
);
|
|
9237
|
+
const isReplayOfHandledCall = /* @__PURE__ */ __name((fc) => {
|
|
9238
|
+
const providerCallId = getProviderToolCallId(fc) ?? fc.id;
|
|
9239
|
+
return providerCallId ? isReplayOfHandledToolCall(
|
|
9240
|
+
handledToolCallFingerprints,
|
|
9241
|
+
providerCallId,
|
|
9242
|
+
getFunctionCallFingerprint(fc)
|
|
9243
|
+
) : false;
|
|
9244
|
+
}, "isReplayOfHandledCall");
|
|
8893
9245
|
const repeatedDuplicateCall = findRepeatedDuplicateProviderToolCall(
|
|
8894
9246
|
dedupedFunctionCalls,
|
|
8895
9247
|
(fc) => getProviderToolCallId(fc) ?? fc.id,
|
|
8896
|
-
|
|
9248
|
+
isReplayOfHandledCall,
|
|
8897
9249
|
this.duplicateProviderToolCallResponseIds
|
|
8898
9250
|
);
|
|
8899
9251
|
if (repeatedDuplicateCall) {
|
|
8900
9252
|
const providerCallId = getProviderToolCallId(repeatedDuplicateCall) ?? repeatedDuplicateCall.id;
|
|
8901
|
-
|
|
8902
|
-
|
|
9253
|
+
const message = `Stopping ACP turn after repeated duplicate provider tool-call id: ${providerCallId} (tool: ${repeatedDuplicateCall.name ?? "unknown_tool"}).`;
|
|
9254
|
+
if (toolLoopState) {
|
|
9255
|
+
recordDaemonLoopDetected(
|
|
9256
|
+
this.config,
|
|
9257
|
+
promptId,
|
|
9258
|
+
"global_tool_call_duplicate" /* GLOBAL_TOOL_CALL_DUPLICATE */,
|
|
9259
|
+
message,
|
|
9260
|
+
toolLoopState
|
|
9261
|
+
);
|
|
9262
|
+
} else {
|
|
9263
|
+
debugLogger6.warn(message);
|
|
9264
|
+
}
|
|
9265
|
+
await Promise.all(
|
|
9266
|
+
dedupedFunctionCalls.map(
|
|
9267
|
+
(fc) => recordSkippedToolCall(
|
|
9268
|
+
fc,
|
|
9269
|
+
LOOP_DETECTED_SKIP_MESSAGE,
|
|
9270
|
+
false,
|
|
9271
|
+
"unknown" /* UNKNOWN */
|
|
9272
|
+
)
|
|
9273
|
+
)
|
|
8903
9274
|
);
|
|
8904
|
-
|
|
9275
|
+
const result = await finalizeRunToolResult({
|
|
8905
9276
|
parts: [],
|
|
8906
9277
|
stopAfterPermissionCancel: false,
|
|
8907
|
-
|
|
9278
|
+
loopDetected: true
|
|
8908
9279
|
});
|
|
9280
|
+
return { ...result, parts: [] };
|
|
8909
9281
|
}
|
|
8910
9282
|
const pushDuplicateBatch = /* @__PURE__ */ __name((fc, request) => {
|
|
8911
9283
|
const providerCallId = request.providerCallId ?? request.callId;
|
|
@@ -8954,7 +9326,9 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8954
9326
|
message: response.responseParts,
|
|
8955
9327
|
resultDisplay: response.resultDisplay,
|
|
8956
9328
|
error: response.error,
|
|
8957
|
-
success: false
|
|
9329
|
+
success: false,
|
|
9330
|
+
artifacts: response.artifacts,
|
|
9331
|
+
persistedOutputFiles: response.persistedOutputFiles
|
|
8958
9332
|
});
|
|
8959
9333
|
}
|
|
8960
9334
|
} catch (emitError) {
|
|
@@ -8975,14 +9349,15 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8975
9349
|
executionStatus: response.executionStatus ?? "not_started",
|
|
8976
9350
|
resultDisplay: response.resultDisplay,
|
|
8977
9351
|
error: response.error,
|
|
8978
|
-
errorType: response.errorType
|
|
9352
|
+
errorType: response.errorType,
|
|
9353
|
+
artifacts: response.artifacts
|
|
8979
9354
|
}
|
|
8980
9355
|
});
|
|
8981
9356
|
}, "emitDuplicateBatch");
|
|
8982
9357
|
for (const fc of dedupedFunctionCalls) {
|
|
8983
9358
|
const providerCallId = getProviderToolCallId(fc) ?? fc.id;
|
|
8984
9359
|
if (providerCallId) {
|
|
8985
|
-
if (
|
|
9360
|
+
if (isReplayOfHandledCall(fc)) {
|
|
8986
9361
|
const callId = executionCallIds.get(fc);
|
|
8987
9362
|
pushDuplicateBatch(fc, {
|
|
8988
9363
|
callId,
|
|
@@ -8994,7 +9369,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8994
9369
|
});
|
|
8995
9370
|
continue;
|
|
8996
9371
|
}
|
|
8997
|
-
|
|
9372
|
+
recordHandledToolCall(
|
|
9373
|
+
handledToolCallFingerprints,
|
|
9374
|
+
providerCallId,
|
|
9375
|
+
getFunctionCallFingerprint(fc)
|
|
9376
|
+
);
|
|
8998
9377
|
}
|
|
8999
9378
|
const isAgent = canonicalToolName(fc.name ?? "") === ToolNames.AGENT;
|
|
9000
9379
|
const last = batches[batches.length - 1];
|
|
@@ -9231,7 +9610,6 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9231
9610
|
return await finalizeRunToolResult({
|
|
9232
9611
|
parts,
|
|
9233
9612
|
stopAfterPermissionCancel: true,
|
|
9234
|
-
repeatedDuplicateProviderToolCall: false,
|
|
9235
9613
|
memoryWriteCandidates
|
|
9236
9614
|
});
|
|
9237
9615
|
}
|
|
@@ -9269,7 +9647,6 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9269
9647
|
return await finalizeRunToolResult({
|
|
9270
9648
|
parts,
|
|
9271
9649
|
stopAfterPermissionCancel: true,
|
|
9272
|
-
repeatedDuplicateProviderToolCall: false,
|
|
9273
9650
|
memoryWriteCandidates
|
|
9274
9651
|
});
|
|
9275
9652
|
}
|
|
@@ -9279,7 +9656,6 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9279
9656
|
return await finalizeRunToolResult({
|
|
9280
9657
|
parts,
|
|
9281
9658
|
stopAfterPermissionCancel: false,
|
|
9282
|
-
repeatedDuplicateProviderToolCall: false,
|
|
9283
9659
|
memoryWriteCandidates
|
|
9284
9660
|
});
|
|
9285
9661
|
} finally {
|
|
@@ -9322,6 +9698,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9322
9698
|
let executionStatus = "not_started";
|
|
9323
9699
|
let executionErrorType;
|
|
9324
9700
|
let executeReturned = false;
|
|
9701
|
+
let executeAttempted = false;
|
|
9702
|
+
let producerObserved = false;
|
|
9325
9703
|
let terminalStatus;
|
|
9326
9704
|
let toolType = "native";
|
|
9327
9705
|
let mcpServerName = void 0;
|
|
@@ -9401,9 +9779,28 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9401
9779
|
terminalStatus = opts.status;
|
|
9402
9780
|
spanError = opts.status === "error" ? error.message : void 0;
|
|
9403
9781
|
cleanupAgentToolResources();
|
|
9782
|
+
const errorParts = errorResponse(
|
|
9783
|
+
error,
|
|
9784
|
+
toolName2,
|
|
9785
|
+
opts.status,
|
|
9786
|
+
opts.errorType
|
|
9787
|
+
);
|
|
9404
9788
|
if (toolName2 !== ToolNames.TODO_WRITE) {
|
|
9405
9789
|
try {
|
|
9406
|
-
|
|
9790
|
+
if (opts.settledMetadata) {
|
|
9791
|
+
await this.toolCallEmitter.emitResult({
|
|
9792
|
+
callId,
|
|
9793
|
+
toolName: toolName2,
|
|
9794
|
+
args,
|
|
9795
|
+
message: errorParts,
|
|
9796
|
+
error,
|
|
9797
|
+
success: false,
|
|
9798
|
+
artifacts: opts.settledMetadata.artifacts,
|
|
9799
|
+
persistedOutputFiles: opts.settledMetadata.persistedOutputFiles
|
|
9800
|
+
});
|
|
9801
|
+
} else {
|
|
9802
|
+
await this.toolCallEmitter.emitError(callId, toolName2, error);
|
|
9803
|
+
}
|
|
9407
9804
|
} catch (emitError) {
|
|
9408
9805
|
debugLogger6.debug(
|
|
9409
9806
|
"[Session.runTool] Failed to emit terminal tool update",
|
|
@@ -9411,16 +9808,28 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9411
9808
|
);
|
|
9412
9809
|
}
|
|
9413
9810
|
}
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9811
|
+
if (executeAttempted && !producerObserved) {
|
|
9812
|
+
observeToolResultBoundary({
|
|
9813
|
+
stage: "producer",
|
|
9814
|
+
sessionId: this.sessionId,
|
|
9815
|
+
promptId,
|
|
9816
|
+
toolCallId: callId,
|
|
9817
|
+
toolName: toolName2,
|
|
9818
|
+
artifacts: [
|
|
9819
|
+
opts.settledMetadata ? toolResultBoundaryArtifact(
|
|
9820
|
+
opts.settledMetadata.persistedOutputFiles,
|
|
9821
|
+
opts.settledMetadata.artifacts
|
|
9822
|
+
) : toolResultBoundaryArtifact([], [])
|
|
9823
|
+
],
|
|
9824
|
+
values: /* @__PURE__ */ __name(() => toolResultPartDiagnosticValues(errorParts), "values")
|
|
9825
|
+
});
|
|
9826
|
+
producerObserved = true;
|
|
9827
|
+
}
|
|
9420
9828
|
queueToolResultRecord?.(fc, {
|
|
9421
9829
|
callId,
|
|
9422
9830
|
toolName: toolName2,
|
|
9423
9831
|
responseParts: errorParts,
|
|
9832
|
+
persistedOutputFiles: opts.settledMetadata?.persistedOutputFiles,
|
|
9424
9833
|
policyToolName: guardContext.policyToolName,
|
|
9425
9834
|
toolType,
|
|
9426
9835
|
executionErrorType: executionStatus === "error" ? executionErrorType ?? opts.errorType : void 0,
|
|
@@ -9429,6 +9838,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9429
9838
|
status: opts.status,
|
|
9430
9839
|
executionStatus,
|
|
9431
9840
|
resultDisplay: void 0,
|
|
9841
|
+
artifacts: opts.settledMetadata?.artifacts,
|
|
9432
9842
|
error: opts.status === "error" ? error : void 0,
|
|
9433
9843
|
errorType: opts.status === "error" ? opts.errorType : void 0
|
|
9434
9844
|
}
|
|
@@ -10348,6 +10758,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10348
10758
|
}
|
|
10349
10759
|
}
|
|
10350
10760
|
} : void 0, "heartbeatSpanAttributes");
|
|
10761
|
+
let settledArtifacts;
|
|
10762
|
+
let settledPersistedOutputFiles;
|
|
10351
10763
|
const sleepInhibitorHandle = acquireSleepInhibitor(
|
|
10352
10764
|
this.config,
|
|
10353
10765
|
`Qwen Code is executing tool ${toolName}`
|
|
@@ -10369,12 +10781,21 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10369
10781
|
callId
|
|
10370
10782
|
});
|
|
10371
10783
|
executionStatus = "error";
|
|
10784
|
+
executeAttempted = true;
|
|
10372
10785
|
try {
|
|
10373
10786
|
toolResult = await invocation.execute(
|
|
10374
10787
|
activeToolAbortSignal,
|
|
10375
10788
|
onToolProgress
|
|
10376
10789
|
);
|
|
10377
10790
|
executeReturned = true;
|
|
10791
|
+
try {
|
|
10792
|
+
settledArtifacts = toolResult.artifacts;
|
|
10793
|
+
} catch {
|
|
10794
|
+
}
|
|
10795
|
+
try {
|
|
10796
|
+
settledPersistedOutputFiles = toolResult.persistedOutputFiles;
|
|
10797
|
+
} catch {
|
|
10798
|
+
}
|
|
10378
10799
|
parentAbortedAtExecutionSettle = activeToolAbortSignal.aborted;
|
|
10379
10800
|
isExecutionTimeout = toolResult.error?.type === "execution_timeout" /* EXECUTION_TIMEOUT */;
|
|
10380
10801
|
aborted = parentAbortedAtExecutionSettle && !isExecutionTimeout;
|
|
@@ -10409,6 +10830,32 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10409
10830
|
toolSettled = true;
|
|
10410
10831
|
sleepInhibitorHandle.release();
|
|
10411
10832
|
}
|
|
10833
|
+
producerObserved = true;
|
|
10834
|
+
try {
|
|
10835
|
+
observeToolResultBoundary({
|
|
10836
|
+
stage: "producer",
|
|
10837
|
+
sessionId: this.sessionId,
|
|
10838
|
+
promptId,
|
|
10839
|
+
toolCallId: callId,
|
|
10840
|
+
toolName,
|
|
10841
|
+
artifacts: [
|
|
10842
|
+
toolResultBoundaryArtifact(
|
|
10843
|
+
settledPersistedOutputFiles,
|
|
10844
|
+
settledArtifacts
|
|
10845
|
+
)
|
|
10846
|
+
],
|
|
10847
|
+
values: /* @__PURE__ */ __name(() => [
|
|
10848
|
+
...toolResultPartDiagnosticValues(toolResult.llmContent),
|
|
10849
|
+
...typeof toolResult.returnDisplay === "string" ? [
|
|
10850
|
+
{
|
|
10851
|
+
representation: "display",
|
|
10852
|
+
value: toolResult.returnDisplay
|
|
10853
|
+
}
|
|
10854
|
+
] : []
|
|
10855
|
+
], "values")
|
|
10856
|
+
});
|
|
10857
|
+
} catch {
|
|
10858
|
+
}
|
|
10412
10859
|
cleanupAgentToolResources();
|
|
10413
10860
|
if ((isEnterPlanModeTool || isExitPlanModeTool) && !toolResult.error && this.config.getApprovalMode() !== approvalMode) {
|
|
10414
10861
|
await this.sendCurrentModeUpdateNotification();
|
|
@@ -10462,7 +10909,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10462
10909
|
{
|
|
10463
10910
|
status: "cancelled",
|
|
10464
10911
|
errorType: void 0,
|
|
10465
|
-
executionStatus
|
|
10912
|
+
executionStatus,
|
|
10913
|
+
settledMetadata: {
|
|
10914
|
+
artifacts: settledArtifacts,
|
|
10915
|
+
persistedOutputFiles: settledPersistedOutputFiles
|
|
10916
|
+
}
|
|
10466
10917
|
}
|
|
10467
10918
|
);
|
|
10468
10919
|
}
|
|
@@ -10475,7 +10926,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10475
10926
|
return earlyErrorResponse(new Error(stopMessage), toolName, {
|
|
10476
10927
|
status: "error",
|
|
10477
10928
|
errorType: "execution_denied" /* EXECUTION_DENIED */,
|
|
10478
|
-
executionStatus
|
|
10929
|
+
executionStatus,
|
|
10930
|
+
settledMetadata: {
|
|
10931
|
+
artifacts: settledArtifacts,
|
|
10932
|
+
persistedOutputFiles: settledPersistedOutputFiles
|
|
10933
|
+
}
|
|
10479
10934
|
});
|
|
10480
10935
|
}
|
|
10481
10936
|
if (postHookResult.additionalContext) {
|
|
@@ -10579,7 +11034,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10579
11034
|
resultDisplay: toolResult.returnDisplay,
|
|
10580
11035
|
error: responseError,
|
|
10581
11036
|
success: succeeded,
|
|
10582
|
-
artifacts:
|
|
11037
|
+
artifacts: settledArtifacts,
|
|
11038
|
+
persistedOutputFiles: settledPersistedOutputFiles
|
|
10583
11039
|
});
|
|
10584
11040
|
} catch (emitError) {
|
|
10585
11041
|
debugLogger6.debug(
|
|
@@ -10618,7 +11074,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10618
11074
|
callId,
|
|
10619
11075
|
toolName,
|
|
10620
11076
|
responseParts,
|
|
10621
|
-
persistedOutputFiles:
|
|
11077
|
+
persistedOutputFiles: settledPersistedOutputFiles,
|
|
10622
11078
|
policyToolName,
|
|
10623
11079
|
toolType,
|
|
10624
11080
|
executionErrorType: executionStatus === "error" ? executionErrorType : void 0,
|
|
@@ -10628,6 +11084,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10628
11084
|
executionStatus,
|
|
10629
11085
|
resultDisplay: toolResult.returnDisplay,
|
|
10630
11086
|
...visionBridgeNotice !== void 0 ? { visionBridgeNotice } : {},
|
|
11087
|
+
artifacts: settledArtifacts,
|
|
10631
11088
|
error: status === "error" && toolResult.error ? new Error(toolResult.error.message) : void 0,
|
|
10632
11089
|
errorType: status === "error" ? executionErrorType : void 0
|
|
10633
11090
|
}
|
|
@@ -10736,19 +11193,18 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10736
11193
|
*
|
|
10737
11194
|
* Supported result types in ACP mode:
|
|
10738
11195
|
* - submit_prompt: Submits content to the model
|
|
11196
|
+
* - message: Emits a single message to the client
|
|
10739
11197
|
* - stream_messages: Streams multiple messages to the client (ACP-specific)
|
|
10740
11198
|
* - unsupported: Command cannot be executed in ACP mode
|
|
10741
11199
|
* - no_command: No command was found, use original prompt
|
|
10742
11200
|
*
|
|
10743
|
-
* Note: 'message' type is not supported in ACP mode - commands should use
|
|
10744
|
-
* 'stream_messages' instead for consistent async handling.
|
|
10745
|
-
*
|
|
10746
11201
|
* @param result The result from handleSlashCommand
|
|
10747
11202
|
* @param originalPrompt The original prompt blocks
|
|
10748
11203
|
* @returns Parts to use for the prompt, or null if command was handled without needing model interaction
|
|
10749
11204
|
*/
|
|
10750
|
-
async #processSlashCommandResult(result, originalPrompt, abortSignal, onFullTurnModel) {
|
|
11205
|
+
async #processSlashCommandResult(result, originalPrompt, abortSignal, onFullTurnModel, shouldRecordResult) {
|
|
10751
11206
|
this.refreshContextFilesOnWrite = result.type === "submit_prompt" && Boolean(result.refreshContextFilesOnWrite);
|
|
11207
|
+
const recorder = shouldRecordResult ? this.config.getChatRecordingService() : void 0;
|
|
10752
11208
|
switch (result.type) {
|
|
10753
11209
|
case "submit_prompt":
|
|
10754
11210
|
return this.#applyBridgeConversionsIfNeeded(
|
|
@@ -10762,7 +11218,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10762
11218
|
}
|
|
10763
11219
|
const rendered = (result.content || "").replace(/\n/g, " \n");
|
|
10764
11220
|
await this.messageEmitter.emitSlashCommandOutput(rendered);
|
|
10765
|
-
|
|
11221
|
+
recorder?.recordSlashCommand({
|
|
10766
11222
|
phase: "result",
|
|
10767
11223
|
rawCommand: originalPrompt.filter((b) => b.type === "text").map((b) => b.type === "text" ? b.text : "").join(" "),
|
|
10768
11224
|
outputHistoryItems: [
|
|
@@ -10783,7 +11239,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10783
11239
|
chunks.push(msg.content || "");
|
|
10784
11240
|
}
|
|
10785
11241
|
if (chunks.length > 0) {
|
|
10786
|
-
|
|
11242
|
+
recorder?.recordSlashCommand({
|
|
10787
11243
|
phase: "result",
|
|
10788
11244
|
rawCommand: originalPrompt.filter((b) => b.type === "text").map((b) => b.type === "text" ? b.text : "").join(" "),
|
|
10789
11245
|
outputHistoryItems: [
|
|
@@ -10959,7 +11415,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10959
11415
|
initialQueryText += `@${pathName}`;
|
|
10960
11416
|
}
|
|
10961
11417
|
}
|
|
10962
|
-
const referenceParts = [
|
|
11418
|
+
const referenceParts = [
|
|
11419
|
+
...partsToSend.filter((part) => "inlineData" in part),
|
|
11420
|
+
...extensionParts,
|
|
11421
|
+
...mcpServerParts
|
|
11422
|
+
];
|
|
10963
11423
|
if (pathSpecsToRead.length > 0) {
|
|
10964
11424
|
const readResult = await readManyFiles(this.config, {
|
|
10965
11425
|
paths: pathSpecsToRead,
|
|
@@ -11355,9 +11815,137 @@ var ActiveWorkReporter = class {
|
|
|
11355
11815
|
}
|
|
11356
11816
|
};
|
|
11357
11817
|
|
|
11818
|
+
// packages/cli/src/acp-integration/child-heap-probe.ts
|
|
11819
|
+
init_esbuild_shims();
|
|
11820
|
+
import {
|
|
11821
|
+
constants as perfConstants,
|
|
11822
|
+
PerformanceObserver
|
|
11823
|
+
} from "node:perf_hooks";
|
|
11824
|
+
import * as v8 from "node:v8";
|
|
11825
|
+
var OLD_GENERATION_SPACES = /* @__PURE__ */ new Set([
|
|
11826
|
+
"old_space",
|
|
11827
|
+
"large_object_space",
|
|
11828
|
+
"code_space",
|
|
11829
|
+
"code_large_object_space",
|
|
11830
|
+
"trusted_space",
|
|
11831
|
+
"trusted_large_object_space",
|
|
11832
|
+
"shared_space",
|
|
11833
|
+
"shared_large_object_space",
|
|
11834
|
+
"shared_trusted_space",
|
|
11835
|
+
"shared_trusted_large_object_space"
|
|
11836
|
+
]);
|
|
11837
|
+
var NON_OLD_GENERATION_SPACES = /* @__PURE__ */ new Set([
|
|
11838
|
+
"new_space",
|
|
11839
|
+
"new_large_object_space",
|
|
11840
|
+
"read_only_space"
|
|
11841
|
+
]);
|
|
11842
|
+
var SAMPLE_INTERVAL_MS = 3e4;
|
|
11843
|
+
function shouldProbeChildHeap(env) {
|
|
11844
|
+
return env[QWEN_CODE_SERVE_ENV] === "1";
|
|
11845
|
+
}
|
|
11846
|
+
__name(shouldProbeChildHeap, "shouldProbeChildHeap");
|
|
11847
|
+
function startChildHeapProbe(options = {}) {
|
|
11848
|
+
const readSpaces = options.heapSpaceStatistics ?? (() => v8.getHeapSpaceStatistics());
|
|
11849
|
+
const readHeap = options.heapStatistics ?? (() => v8.getHeapStatistics());
|
|
11850
|
+
let peakOldGenerationBytes = 0;
|
|
11851
|
+
let peakLiveSetBytes = 0;
|
|
11852
|
+
let peakTotalHeapBytes = 0;
|
|
11853
|
+
let majorGcCount = 0;
|
|
11854
|
+
let majorGcMs = 0;
|
|
11855
|
+
let sampled = false;
|
|
11856
|
+
const unclassified = /* @__PURE__ */ new Set();
|
|
11857
|
+
const sample = /* @__PURE__ */ __name((afterMajorGc) => {
|
|
11858
|
+
try {
|
|
11859
|
+
let committed = 0;
|
|
11860
|
+
let live = 0;
|
|
11861
|
+
for (const space of readSpaces()) {
|
|
11862
|
+
const name = space.space_name;
|
|
11863
|
+
if (OLD_GENERATION_SPACES.has(name)) {
|
|
11864
|
+
committed += space.space_size;
|
|
11865
|
+
live += space.space_used_size;
|
|
11866
|
+
} else if (!NON_OLD_GENERATION_SPACES.has(name)) {
|
|
11867
|
+
unclassified.add(name);
|
|
11868
|
+
}
|
|
11869
|
+
}
|
|
11870
|
+
if (committed > peakOldGenerationBytes)
|
|
11871
|
+
peakOldGenerationBytes = committed;
|
|
11872
|
+
if (afterMajorGc && live > peakLiveSetBytes) peakLiveSetBytes = live;
|
|
11873
|
+
sampled = true;
|
|
11874
|
+
} catch {
|
|
11875
|
+
}
|
|
11876
|
+
try {
|
|
11877
|
+
const total = readHeap().total_heap_size;
|
|
11878
|
+
if (total > peakTotalHeapBytes) peakTotalHeapBytes = total;
|
|
11879
|
+
} catch {
|
|
11880
|
+
}
|
|
11881
|
+
}, "sample");
|
|
11882
|
+
sample(false);
|
|
11883
|
+
let observer;
|
|
11884
|
+
try {
|
|
11885
|
+
const observe = options.gcObserver ?? ((callback) => {
|
|
11886
|
+
const performanceObserver = new PerformanceObserver(
|
|
11887
|
+
(list) => callback(list.getEntries())
|
|
11888
|
+
);
|
|
11889
|
+
performanceObserver.observe({ entryTypes: ["gc"] });
|
|
11890
|
+
return performanceObserver;
|
|
11891
|
+
});
|
|
11892
|
+
observer = observe((entries) => {
|
|
11893
|
+
for (const entry of entries) {
|
|
11894
|
+
const isMajor = entry.detail?.kind === perfConstants.NODE_PERFORMANCE_GC_MAJOR;
|
|
11895
|
+
if (isMajor) {
|
|
11896
|
+
majorGcCount += 1;
|
|
11897
|
+
majorGcMs += entry.duration;
|
|
11898
|
+
}
|
|
11899
|
+
sample(isMajor);
|
|
11900
|
+
}
|
|
11901
|
+
});
|
|
11902
|
+
} catch {
|
|
11903
|
+
observer = void 0;
|
|
11904
|
+
}
|
|
11905
|
+
const timer = setInterval(
|
|
11906
|
+
() => sample(false),
|
|
11907
|
+
options.intervalMs ?? SAMPLE_INTERVAL_MS
|
|
11908
|
+
);
|
|
11909
|
+
timer.unref?.();
|
|
11910
|
+
return {
|
|
11911
|
+
snapshot() {
|
|
11912
|
+
sample(false);
|
|
11913
|
+
if (!sampled) return void 0;
|
|
11914
|
+
return {
|
|
11915
|
+
peakOldGenerationBytes,
|
|
11916
|
+
peakLiveSetBytes,
|
|
11917
|
+
peakTotalHeapBytes,
|
|
11918
|
+
majorGcCount,
|
|
11919
|
+
majorGcMs,
|
|
11920
|
+
unclassifiedSpaceNames: [...unclassified]
|
|
11921
|
+
};
|
|
11922
|
+
},
|
|
11923
|
+
stop() {
|
|
11924
|
+
clearInterval(timer);
|
|
11925
|
+
observer?.disconnect();
|
|
11926
|
+
}
|
|
11927
|
+
};
|
|
11928
|
+
}
|
|
11929
|
+
__name(startChildHeapProbe, "startChildHeapProbe");
|
|
11930
|
+
|
|
11358
11931
|
// packages/cli/src/acp-integration/model-configuration.ts
|
|
11359
11932
|
init_esbuild_shims();
|
|
11360
11933
|
var MODEL_CONFIGURATIONS = {
|
|
11934
|
+
"qwen3.5-plus": {
|
|
11935
|
+
reasoning: { thinking: true, toggleOnly: true }
|
|
11936
|
+
},
|
|
11937
|
+
"qwen3.6-plus": {
|
|
11938
|
+
reasoning: { thinking: true, toggleOnly: true }
|
|
11939
|
+
},
|
|
11940
|
+
"qwen3.6-flash": {
|
|
11941
|
+
reasoning: { thinking: true, toggleOnly: true }
|
|
11942
|
+
},
|
|
11943
|
+
"qwen3.7-plus": {
|
|
11944
|
+
reasoning: { thinking: true, toggleOnly: true }
|
|
11945
|
+
},
|
|
11946
|
+
"qwen3.7-max": {
|
|
11947
|
+
reasoning: { thinking: true, toggleOnly: true }
|
|
11948
|
+
},
|
|
11361
11949
|
"qwen3.8-max": {
|
|
11362
11950
|
reasoning: {
|
|
11363
11951
|
thinking: true,
|
|
@@ -11367,7 +11955,7 @@ var MODEL_CONFIGURATIONS = {
|
|
|
11367
11955
|
}
|
|
11368
11956
|
};
|
|
11369
11957
|
function getModelConfiguration(modelId) {
|
|
11370
|
-
return modelId
|
|
11958
|
+
return modelId ? MODEL_CONFIGURATIONS[modelId] : void 0;
|
|
11371
11959
|
}
|
|
11372
11960
|
__name(getModelConfiguration, "getModelConfiguration");
|
|
11373
11961
|
|
|
@@ -11517,6 +12105,86 @@ var ACP_REASONING_EFFORT_NAMES = {
|
|
|
11517
12105
|
max: "Max"
|
|
11518
12106
|
};
|
|
11519
12107
|
var WORKSPACE_MEMORY_REMEMBER_CHILD_TIMEOUT_MS = 295e3;
|
|
12108
|
+
function currentGoalSnapshot(config, runtime) {
|
|
12109
|
+
try {
|
|
12110
|
+
return (runtime ?? config.getGoalRuntime()).getSnapshot();
|
|
12111
|
+
} catch {
|
|
12112
|
+
return emptyGoalSnapshot();
|
|
12113
|
+
}
|
|
12114
|
+
}
|
|
12115
|
+
__name(currentGoalSnapshot, "currentGoalSnapshot");
|
|
12116
|
+
function mapGoalControlError(error, config, runtime) {
|
|
12117
|
+
if (error instanceof GoalConflictError) {
|
|
12118
|
+
return new RequestError(-32009, error.message, {
|
|
12119
|
+
errorKind: "goal_conflict",
|
|
12120
|
+
current: error.current
|
|
12121
|
+
});
|
|
12122
|
+
}
|
|
12123
|
+
if (error instanceof GoalInvalidTransitionError) {
|
|
12124
|
+
return new RequestError(-32009, error.message, {
|
|
12125
|
+
errorKind: "goal_invalid_transition",
|
|
12126
|
+
current: error.current
|
|
12127
|
+
});
|
|
12128
|
+
}
|
|
12129
|
+
return new RequestError(
|
|
12130
|
+
-32603,
|
|
12131
|
+
error instanceof Error ? error.message : "Goal persistence failed",
|
|
12132
|
+
{
|
|
12133
|
+
errorKind: "goal_persist_failed",
|
|
12134
|
+
current: currentGoalSnapshot(config, runtime)
|
|
12135
|
+
}
|
|
12136
|
+
);
|
|
12137
|
+
}
|
|
12138
|
+
__name(mapGoalControlError, "mapGoalControlError");
|
|
12139
|
+
async function dispatchGoalControl(config, request) {
|
|
12140
|
+
const requiresTrustedWorkspace = request.action === "create" || request.action === "replace" || request.action === "edit" || request.action === "resume";
|
|
12141
|
+
if (requiresTrustedWorkspace && !config.isTrustedFolder()) {
|
|
12142
|
+
throw new RequestError(-32003, "Workspace is not trusted.", {
|
|
12143
|
+
errorKind: "untrusted_workspace",
|
|
12144
|
+
httpStatus: 403
|
|
12145
|
+
});
|
|
12146
|
+
}
|
|
12147
|
+
let runtime;
|
|
12148
|
+
try {
|
|
12149
|
+
runtime = await config.getGoalRuntimeReady();
|
|
12150
|
+
return await runtime.dispatch(request);
|
|
12151
|
+
} catch (error) {
|
|
12152
|
+
throw mapGoalControlError(error, config, runtime);
|
|
12153
|
+
}
|
|
12154
|
+
}
|
|
12155
|
+
__name(dispatchGoalControl, "dispatchGoalControl");
|
|
12156
|
+
var TURN_STATUS_SCAN_PAGE_LIMIT = 500;
|
|
12157
|
+
var TURN_STATUS_SCAN_MAX_PAGES = 10;
|
|
12158
|
+
async function findSettledTurnResult(reader, sessionId, promptId, workspaceCwd) {
|
|
12159
|
+
let cursor;
|
|
12160
|
+
for (let page = 0; page < TURN_STATUS_SCAN_MAX_PAGES; page++) {
|
|
12161
|
+
const result = await reader.readPage(sessionId, {
|
|
12162
|
+
...cursor !== void 0 ? { cursor } : { direction: "backward" },
|
|
12163
|
+
limit: TURN_STATUS_SCAN_PAGE_LIMIT,
|
|
12164
|
+
maxBytes: SESSION_TRANSCRIPT_MAX_PAGE_BYTES
|
|
12165
|
+
});
|
|
12166
|
+
for (let i = result.records.length - 1; i >= 0; i--) {
|
|
12167
|
+
const record = result.records[i];
|
|
12168
|
+
if (record.type !== "system" || record.subtype !== "turn_result") {
|
|
12169
|
+
continue;
|
|
12170
|
+
}
|
|
12171
|
+
const payload = record.systemPayload;
|
|
12172
|
+
if (!isTurnResultRecordPayload(payload)) continue;
|
|
12173
|
+
if (promptId === void 0 || payload.promptId === promptId) {
|
|
12174
|
+
return payload;
|
|
12175
|
+
}
|
|
12176
|
+
}
|
|
12177
|
+
if (!result.hasMore || result.nextCursorState === void 0) {
|
|
12178
|
+
return void 0;
|
|
12179
|
+
}
|
|
12180
|
+
cursor = encodeSessionTranscriptCursor(
|
|
12181
|
+
result.nextCursorState,
|
|
12182
|
+
workspaceCwd
|
|
12183
|
+
);
|
|
12184
|
+
}
|
|
12185
|
+
return void 0;
|
|
12186
|
+
}
|
|
12187
|
+
__name(findSettledTurnResult, "findSettledTurnResult");
|
|
11520
12188
|
function createAcpSessionProfiler(span, attributePrefix) {
|
|
11521
12189
|
let failedStage;
|
|
11522
12190
|
const setAttribute = /* @__PURE__ */ __name((name, value) => {
|
|
@@ -13563,7 +14231,10 @@ async function runAcpAgent(config, settings, argv, options) {
|
|
|
13563
14231
|
let initializeRequestId;
|
|
13564
14232
|
const pendingNewSessionRequestIds = /* @__PURE__ */ new Set();
|
|
13565
14233
|
const stream = ndJsonStream(stdout, stdin, {
|
|
13566
|
-
onMessageObserved: /* @__PURE__ */ __name(({ direction, message }) => {
|
|
14234
|
+
onMessageObserved: /* @__PURE__ */ __name(({ direction, bytes, message }) => {
|
|
14235
|
+
if (direction === "sent") {
|
|
14236
|
+
observeAcpToolResultWire(message, bytes);
|
|
14237
|
+
}
|
|
13567
14238
|
if (direction === "received" && "id" in message && "method" in message) {
|
|
13568
14239
|
if (message.method === "session/new") {
|
|
13569
14240
|
pendingNewSessionRequestIds.add(message.id);
|
|
@@ -13988,6 +14659,15 @@ var QwenAgent = class {
|
|
|
13988
14659
|
}
|
|
13989
14660
|
})();
|
|
13990
14661
|
prevChildCpuAt = Date.now();
|
|
14662
|
+
/**
|
|
14663
|
+
* Lifetime old-generation high-water marks, for the daemon's
|
|
14664
|
+
* `workspaceResource` poll. `undefined` outside a daemon-spawned child — see
|
|
14665
|
+
* {@link shouldProbeChildHeap} for why the gate is where it is.
|
|
14666
|
+
*
|
|
14667
|
+
* Started at construction rather than on the first poll: the peaks that
|
|
14668
|
+
* matter include the ones reached before anyone asks.
|
|
14669
|
+
*/
|
|
14670
|
+
childHeapProbe = shouldProbeChildHeap(process.env) ? startChildHeapProbe() : void 0;
|
|
13991
14671
|
/**
|
|
13992
14672
|
* Workspace-shared MCP transport pool. Eagerly constructed; lazy
|
|
13993
14673
|
* w.r.t. actual MCP work — spawns nothing until `pool.acquire`.
|
|
@@ -14764,7 +15444,7 @@ var QwenAgent = class {
|
|
|
14764
15444
|
}
|
|
14765
15445
|
this.clientCapabilities = args.clientCapabilities;
|
|
14766
15446
|
const authMethods = buildAuthMethods();
|
|
14767
|
-
const version = "0.21.
|
|
15447
|
+
const version = "0.21.14-nightly.20260822.7a4566cb3b";
|
|
14768
15448
|
const response = {
|
|
14769
15449
|
protocolVersion: PROTOCOL_VERSION,
|
|
14770
15450
|
agentInfo: {
|
|
@@ -14930,7 +15610,7 @@ var QwenAgent = class {
|
|
|
14930
15610
|
);
|
|
14931
15611
|
} catch (error) {
|
|
14932
15612
|
return this.cleanupAfterRequestFailure(error, async () => {
|
|
14933
|
-
if (this.sessions.get(config.getSessionId())?.getConfig() !== config) {
|
|
15613
|
+
if (this.sessions.get(normalizeSessionIdForLookup(config.getSessionId()))?.getConfig() !== config) {
|
|
14934
15614
|
await this.cleanupUnstoredConfig(config);
|
|
14935
15615
|
}
|
|
14936
15616
|
});
|
|
@@ -15068,10 +15748,17 @@ var QwenAgent = class {
|
|
|
15068
15748
|
"existence_check",
|
|
15069
15749
|
() => this.runWithPinnedRuntimeBaseDir(settings, params.cwd, async () => {
|
|
15070
15750
|
const sessionService = new SessionService(params.cwd);
|
|
15071
|
-
|
|
15072
|
-
return sessionId;
|
|
15751
|
+
try {
|
|
15752
|
+
return await sessionService.findSessionIdIgnoringCase(sessionId);
|
|
15753
|
+
} catch (error) {
|
|
15754
|
+
if (error instanceof SessionIdCaseConflictError) {
|
|
15755
|
+
throw RequestError.internalError(
|
|
15756
|
+
{ errorKind: "session_conflict", sessionId },
|
|
15757
|
+
error.message
|
|
15758
|
+
);
|
|
15759
|
+
}
|
|
15760
|
+
throw error;
|
|
15073
15761
|
}
|
|
15074
|
-
return sessionService.findSessionIdIgnoringCase?.(sessionId);
|
|
15075
15762
|
})
|
|
15076
15763
|
);
|
|
15077
15764
|
if (!persistedSessionId) {
|
|
@@ -15278,7 +15965,7 @@ var QwenAgent = class {
|
|
|
15278
15965
|
return this.cleanupAfterRequestFailure(
|
|
15279
15966
|
error,
|
|
15280
15967
|
async () => {
|
|
15281
|
-
if (this.sessions.get(config.getSessionId())?.getConfig() !== config) {
|
|
15968
|
+
if (this.sessions.get(normalizeSessionIdForLookup(config.getSessionId()))?.getConfig() !== config) {
|
|
15282
15969
|
await this.cleanupUnstoredConfig(config);
|
|
15283
15970
|
}
|
|
15284
15971
|
},
|
|
@@ -15346,10 +16033,17 @@ var QwenAgent = class {
|
|
|
15346
16033
|
"existence_check",
|
|
15347
16034
|
() => this.runWithPinnedRuntimeBaseDir(settings, params.cwd, async () => {
|
|
15348
16035
|
const sessionService = new SessionService(params.cwd);
|
|
15349
|
-
|
|
15350
|
-
return sessionId;
|
|
16036
|
+
try {
|
|
16037
|
+
return await sessionService.findSessionIdIgnoringCase(sessionId);
|
|
16038
|
+
} catch (error) {
|
|
16039
|
+
if (error instanceof SessionIdCaseConflictError) {
|
|
16040
|
+
throw RequestError.internalError(
|
|
16041
|
+
{ errorKind: "session_conflict", sessionId },
|
|
16042
|
+
error.message
|
|
16043
|
+
);
|
|
16044
|
+
}
|
|
16045
|
+
throw error;
|
|
15351
16046
|
}
|
|
15352
|
-
return sessionService.findSessionIdIgnoringCase?.(sessionId);
|
|
15353
16047
|
})
|
|
15354
16048
|
);
|
|
15355
16049
|
if (!persistedSessionId) {
|
|
@@ -15420,7 +16114,7 @@ var QwenAgent = class {
|
|
|
15420
16114
|
return this.cleanupAfterRequestFailure(
|
|
15421
16115
|
error,
|
|
15422
16116
|
async () => {
|
|
15423
|
-
if (this.sessions.get(config.getSessionId())?.getConfig() !== config) {
|
|
16117
|
+
if (this.sessions.get(normalizeSessionIdForLookup(config.getSessionId()))?.getConfig() !== config) {
|
|
15424
16118
|
await this.cleanupUnstoredConfig(config);
|
|
15425
16119
|
}
|
|
15426
16120
|
},
|
|
@@ -15537,16 +16231,23 @@ var QwenAgent = class {
|
|
|
15537
16231
|
session.getConfig()
|
|
15538
16232
|
);
|
|
15539
16233
|
if (modelReasoning) {
|
|
15540
|
-
const
|
|
16234
|
+
const effortValues = modelReasoning.toggleOnly ? void 0 : modelReasoning.efforts;
|
|
16235
|
+
const selected = value === ACP_REASONING_EFFORT_NONE ? ACP_REASONING_EFFORT_NONE : modelReasoning.toggleOnly ? value === ACP_REASONING_EFFORT_DEFAULT ? ACP_REASONING_EFFORT_DEFAULT : void 0 : effortValues?.find((effort2) => effort2 === value);
|
|
15541
16236
|
if (!selected) {
|
|
16237
|
+
const choices = [
|
|
16238
|
+
ACP_REASONING_EFFORT_NONE,
|
|
16239
|
+
...effortValues ?? [ACP_REASONING_EFFORT_DEFAULT]
|
|
16240
|
+
];
|
|
15542
16241
|
throw RequestError.invalidParams(
|
|
15543
16242
|
void 0,
|
|
15544
|
-
`Unknown reasoning effort: ${value}. Choose one of: ${
|
|
16243
|
+
`Unknown reasoning effort: ${value}. Choose one of: ${choices.join(", ")}`
|
|
15545
16244
|
);
|
|
15546
16245
|
}
|
|
15547
16246
|
const generation = session.getConfig().getContentGeneratorConfig();
|
|
15548
16247
|
if (selected === ACP_REASONING_EFFORT_NONE) {
|
|
15549
16248
|
generation.reasoning = false;
|
|
16249
|
+
} else if (selected === ACP_REASONING_EFFORT_DEFAULT) {
|
|
16250
|
+
generation.reasoning = void 0;
|
|
15550
16251
|
} else {
|
|
15551
16252
|
const current = generation.reasoning;
|
|
15552
16253
|
generation.reasoning = {
|
|
@@ -17701,9 +18402,11 @@ var QwenAgent = class {
|
|
|
17701
18402
|
rssBytes = process.memoryUsage().rss;
|
|
17702
18403
|
} catch {
|
|
17703
18404
|
}
|
|
18405
|
+
const childHeap = this.childHeapProbe?.snapshot();
|
|
17704
18406
|
return {
|
|
17705
18407
|
rssBytes,
|
|
17706
|
-
cpuPercent
|
|
18408
|
+
cpuPercent,
|
|
18409
|
+
...childHeap ? { heap: childHeap } : {}
|
|
17707
18410
|
};
|
|
17708
18411
|
}
|
|
17709
18412
|
case SERVE_STATUS_EXT_METHODS.sessionContext: {
|
|
@@ -19761,6 +20464,28 @@ ${outputText}
|
|
|
19761
20464
|
snapshot: response.snapshot
|
|
19762
20465
|
};
|
|
19763
20466
|
}
|
|
20467
|
+
case SERVE_CONTROL_EXT_METHODS.sessionGoalControl: {
|
|
20468
|
+
const sessionId = params["sessionId"];
|
|
20469
|
+
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
20470
|
+
throw RequestError.invalidParams(
|
|
20471
|
+
void 0,
|
|
20472
|
+
"Invalid or missing sessionId"
|
|
20473
|
+
);
|
|
20474
|
+
}
|
|
20475
|
+
const request = parseGoalControlRequest(params["request"]);
|
|
20476
|
+
if (!request) {
|
|
20477
|
+
throw RequestError.invalidParams(
|
|
20478
|
+
void 0,
|
|
20479
|
+
"Invalid or missing Goal control request"
|
|
20480
|
+
);
|
|
20481
|
+
}
|
|
20482
|
+
const session = this.sessionOrThrow(sessionId);
|
|
20483
|
+
const response = await dispatchGoalControl(
|
|
20484
|
+
session.getConfig(),
|
|
20485
|
+
request
|
|
20486
|
+
);
|
|
20487
|
+
return { snapshot: response.snapshot };
|
|
20488
|
+
}
|
|
19764
20489
|
case SERVE_CONTROL_EXT_METHODS.sessionGoalGet: {
|
|
19765
20490
|
const sessionId = params["sessionId"];
|
|
19766
20491
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
@@ -19788,6 +20513,91 @@ ${outputText}
|
|
|
19788
20513
|
} : null
|
|
19789
20514
|
};
|
|
19790
20515
|
}
|
|
20516
|
+
case SERVE_CONTROL_EXT_METHODS.sessionTurnStatus: {
|
|
20517
|
+
const sessionId = params["sessionId"];
|
|
20518
|
+
if (typeof sessionId !== "string" || !SESSION_ID_RE.test(sessionId)) {
|
|
20519
|
+
throw RequestError.invalidParams(
|
|
20520
|
+
void 0,
|
|
20521
|
+
"Invalid or missing sessionId"
|
|
20522
|
+
);
|
|
20523
|
+
}
|
|
20524
|
+
const rawPromptId = params["promptId"];
|
|
20525
|
+
if (rawPromptId !== void 0 && (typeof rawPromptId !== "string" || rawPromptId.length === 0)) {
|
|
20526
|
+
throw RequestError.invalidParams(
|
|
20527
|
+
void 0,
|
|
20528
|
+
"Invalid or missing promptId"
|
|
20529
|
+
);
|
|
20530
|
+
}
|
|
20531
|
+
const session = this.sessionOrThrow(sessionId);
|
|
20532
|
+
const settings = loadSettingsCached(cwd);
|
|
20533
|
+
return await runWithAcpRuntimeOutputDir(settings, cwd, async () => {
|
|
20534
|
+
try {
|
|
20535
|
+
await session.getConfig().getChatRecordingService()?.flush();
|
|
20536
|
+
} catch {
|
|
20537
|
+
}
|
|
20538
|
+
let reader;
|
|
20539
|
+
try {
|
|
20540
|
+
reader = new SessionTranscriptReader(cwd);
|
|
20541
|
+
const turnResult = await findSettledTurnResult(
|
|
20542
|
+
reader,
|
|
20543
|
+
sessionId,
|
|
20544
|
+
typeof rawPromptId === "string" ? rawPromptId : void 0,
|
|
20545
|
+
cwd
|
|
20546
|
+
);
|
|
20547
|
+
return {
|
|
20548
|
+
v: 1,
|
|
20549
|
+
sessionId,
|
|
20550
|
+
turnResult: turnResult ?? null
|
|
20551
|
+
};
|
|
20552
|
+
} catch (error) {
|
|
20553
|
+
if (error.code === "ENOENT") {
|
|
20554
|
+
return { v: 1, sessionId, turnResult: null };
|
|
20555
|
+
}
|
|
20556
|
+
if (error instanceof SessionTranscriptSnapshotUnavailableError && reader) {
|
|
20557
|
+
try {
|
|
20558
|
+
const transcript = await fs2.stat(
|
|
20559
|
+
reader.getSessionFilePath(sessionId)
|
|
20560
|
+
);
|
|
20561
|
+
if (transcript.size === 0) {
|
|
20562
|
+
return { v: 1, sessionId, turnResult: null };
|
|
20563
|
+
}
|
|
20564
|
+
} catch (statError) {
|
|
20565
|
+
if (statError.code === "ENOENT") {
|
|
20566
|
+
return { v: 1, sessionId, turnResult: null };
|
|
20567
|
+
}
|
|
20568
|
+
}
|
|
20569
|
+
}
|
|
20570
|
+
if (error instanceof InvalidSessionTranscriptCursorError) {
|
|
20571
|
+
throw new RequestError(-32602, error.message, {
|
|
20572
|
+
errorKind: "invalid_transcript_cursor"
|
|
20573
|
+
});
|
|
20574
|
+
}
|
|
20575
|
+
if (error instanceof SessionTranscriptSnapshotUnavailableError) {
|
|
20576
|
+
throw new RequestError(-32010, error.message, {
|
|
20577
|
+
errorKind: "transcript_snapshot_unavailable",
|
|
20578
|
+
sessionId
|
|
20579
|
+
});
|
|
20580
|
+
}
|
|
20581
|
+
if (error instanceof SessionTranscriptTooLargeError) {
|
|
20582
|
+
throw new RequestError(-32011, error.message, {
|
|
20583
|
+
errorKind: "transcript_too_large",
|
|
20584
|
+
sessionId,
|
|
20585
|
+
snapshotSize: error.snapshotSize,
|
|
20586
|
+
maxBytes: error.maxBytes
|
|
20587
|
+
});
|
|
20588
|
+
}
|
|
20589
|
+
if (error instanceof SessionTranscriptPageTooLargeError) {
|
|
20590
|
+
throw new RequestError(-32012, error.message, {
|
|
20591
|
+
errorKind: "transcript_page_too_large",
|
|
20592
|
+
sessionId,
|
|
20593
|
+
pageBytes: error.pageBytes,
|
|
20594
|
+
maxBytes: error.maxBytes
|
|
20595
|
+
});
|
|
20596
|
+
}
|
|
20597
|
+
throw error;
|
|
20598
|
+
}
|
|
20599
|
+
});
|
|
20600
|
+
}
|
|
19791
20601
|
case SERVE_CONTROL_EXT_METHODS.sessionContinue: {
|
|
19792
20602
|
const sessionId = params["sessionId"];
|
|
19793
20603
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
@@ -21275,7 +22085,7 @@ ${outputText}
|
|
|
21275
22085
|
description: `Thinking and reasoning effort for ${rawCurrentModelId}`,
|
|
21276
22086
|
category: "thought_level",
|
|
21277
22087
|
type: "select",
|
|
21278
|
-
currentValue: config.getContentGeneratorConfig().reasoning === false ? ACP_REASONING_EFFORT_NONE : modelReasoning.efforts.find(
|
|
22088
|
+
currentValue: config.getContentGeneratorConfig().reasoning === false ? ACP_REASONING_EFFORT_NONE : modelReasoning.toggleOnly ? ACP_REASONING_EFFORT_DEFAULT : modelReasoning.efforts.find(
|
|
21279
22089
|
(effort) => effort === currentModelEffort
|
|
21280
22090
|
) ?? modelReasoning.defaultEffort,
|
|
21281
22091
|
options: [
|
|
@@ -21284,7 +22094,13 @@ ${outputText}
|
|
|
21284
22094
|
name: "Thinking off",
|
|
21285
22095
|
description: "Disable thinking for this session"
|
|
21286
22096
|
},
|
|
21287
|
-
...modelReasoning.
|
|
22097
|
+
...modelReasoning.toggleOnly ? [
|
|
22098
|
+
{
|
|
22099
|
+
value: ACP_REASONING_EFFORT_DEFAULT,
|
|
22100
|
+
name: "Thinking on",
|
|
22101
|
+
description: "Use the model or provider thinking default"
|
|
22102
|
+
}
|
|
22103
|
+
] : modelReasoning.efforts.map((effort) => ({
|
|
21288
22104
|
value: effort,
|
|
21289
22105
|
name: ACP_REASONING_EFFORT_NAMES[effort],
|
|
21290
22106
|
description: "Apply this effort to the next request"
|
|
@@ -21292,7 +22108,7 @@ ${outputText}
|
|
|
21292
22108
|
],
|
|
21293
22109
|
_meta: {
|
|
21294
22110
|
"qwenCode/reasoning": {
|
|
21295
|
-
defaultEffort: modelReasoning.defaultEffort
|
|
22111
|
+
...modelReasoning.toggleOnly ? { toggleOnly: true } : { defaultEffort: modelReasoning.defaultEffort }
|
|
21296
22112
|
}
|
|
21297
22113
|
}
|
|
21298
22114
|
} : {
|
|
@@ -21323,7 +22139,7 @@ ${outputText}
|
|
|
21323
22139
|
}
|
|
21324
22140
|
const reasoning = getModelConfiguration(config.getModel())?.reasoning;
|
|
21325
22141
|
const currentEffort = config.getReasoningEffort?.();
|
|
21326
|
-
return reasoning?.thinking && (!currentEffort || reasoning.efforts.includes(currentEffort)) ? reasoning : void 0;
|
|
22142
|
+
return reasoning?.thinking && (reasoning.toggleOnly || !currentEffort || reasoning.efforts.includes(currentEffort)) ? reasoning : void 0;
|
|
21327
22143
|
}
|
|
21328
22144
|
buildSelectableModelOptions(config) {
|
|
21329
22145
|
const currentAuthType = config.getAuthType();
|