@qwen-code/qwen-code 0.23.2-preview.0 → 0.23.3-nightly.20260910.c46cb85cf2
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/README.md +35 -15
- package/bundled/computer-use/SKILL.md +1 -1
- package/bundled/goal-draft/SKILL.md +2 -2
- package/bundled/qc-helper/docs/configuration/auth.md +1 -1
- package/bundled/qc-helper/docs/configuration/model-providers.md +76 -34
- package/bundled/qc-helper/docs/configuration/settings.md +5 -3
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -21
- package/bundled/qc-helper/docs/features/channels/dws.md +7 -1
- package/bundled/qc-helper/docs/features/channels/github.md +1 -9
- package/bundled/qc-helper/docs/features/channels/overview.md +30 -56
- package/bundled/qc-helper/docs/features/channels/qqbot.md +1 -2
- package/bundled/qc-helper/docs/features/commands.md +105 -18
- package/bundled/qc-helper/docs/features/computer-use.md +1 -1
- package/bundled/qc-helper/docs/features/cross-session-protocol.md +320 -0
- package/bundled/qc-helper/docs/features/goals.md +5 -3
- package/bundled/qc-helper/docs/features/hooks.md +14 -13
- package/bundled/qc-helper/docs/features/sub-agents.md +8 -0
- package/bundled/qc-helper/docs/qwen-serve.md +84 -53
- package/bundled/review/SKILL.md +82 -79
- package/bundled/review/references/posting.md +31 -14
- package/chunks/{MaxSizedBox-ZZJT3PJF.js → MaxSizedBox-UZW24XUX.js} +63 -55
- package/chunks/{StandaloneSessionPicker-DIOSZTMX.js → StandaloneSessionPicker-IDK7NAZL.js} +85 -77
- package/chunks/{acp-startup-profiler-KEU6VAYR.js → acp-startup-profiler-ARO4II44.js} +2 -2
- package/chunks/acp-subagent-executor-7TLJGISS.js +919 -0
- package/chunks/{acpAgent-62JUP5A7.js → acpAgent-YRCNNIIU.js} +939 -306
- package/chunks/{agent-NLPEQQDZ.js → agent-SGU5EE7U.js} +47 -41
- package/chunks/{agent-headless-Y2GR5F2Q.js → agent-headless-JVYBLNLT.js} +47 -41
- package/chunks/{anthropicContentGenerator-I7LQZH26.js → anthropicContentGenerator-SGIR5IKF.js} +68 -36
- package/chunks/{artifact-tool-P52OKKEF.js → artifact-tool-PMYZCYNH.js} +2 -2
- package/chunks/{askUserQuestion-I5W5S3D6.js → askUserQuestion-4M4YYIB4.js} +2 -2
- package/chunks/{bridge-Q66BD62H.js → bridge-YF6NYRPZ.js} +68 -60
- package/chunks/{ca-KC2AISNS.js → ca-MX3WCEEG.js} +1 -1
- package/chunks/{channel-management-service-TRTLQTSV.js → channel-management-service-E4HTMU7T.js} +9 -9
- package/chunks/{channel-settings-store-R5STFWUW.js → channel-settings-store-FZ5VKHQD.js} +74 -66
- package/chunks/{channel-worker-group-PIYPVCTF.js → channel-worker-group-X6WH4XWF.js} +9 -9
- package/chunks/{channel-worker-manager-FQHEDTD2.js → channel-worker-manager-SICFJDPJ.js} +19 -10
- package/chunks/{channel-worker-supervisor-XJPZZ3VK.js → channel-worker-supervisor-HSFAKML6.js} +6 -6
- package/chunks/{chunk-CLKE4IY3.js → chunk-2SZH22YO.js} +1 -1
- package/chunks/{chunk-OIPUQE3S.js → chunk-34ZYDM3F.js} +27 -12
- package/chunks/{chunk-HIXUUCGY.js → chunk-36HCNKDS.js} +1 -1
- package/chunks/{chunk-6YEOCHSE.js → chunk-3FPYT6QC.js} +101 -31
- package/chunks/{chunk-NFIDVZND.js → chunk-3I7W2POO.js} +3 -22
- package/chunks/{chunk-W3ONSAYO.js → chunk-3VPFA6L2.js} +3 -3
- package/chunks/chunk-532WHF4F.js +127 -0
- package/chunks/{chunk-J3TJH52D.js → chunk-5FFAUU4T.js} +1 -1
- package/chunks/{chunk-G5QLLD53.js → chunk-5FKZ7KFQ.js} +1864 -35
- package/chunks/{chunk-B44JBZBB.js → chunk-5GLDOLNQ.js} +132 -27
- package/chunks/{chunk-ORREXWOM.js → chunk-5ZJ3KK5J.js} +5 -5
- package/chunks/{chunk-2OR32P5M.js → chunk-6EDWSKN4.js} +125 -10
- package/chunks/{chunk-EA4NFWVG.js → chunk-6EOMQPTS.js} +4 -4
- package/chunks/{chunk-45ROPFQY.js → chunk-6NONRGYX.js} +1 -1
- package/chunks/{chunk-EHTKOO6W.js → chunk-6UK77U7D.js} +46 -3
- package/chunks/{chunk-QXXBW2G4.js → chunk-72BGC7RT.js} +4 -4
- package/chunks/{chunk-CRZBDVP2.js → chunk-74JEYK2C.js} +10 -10
- package/chunks/{chunk-B54PFQS5.js → chunk-7CLLH5TI.js} +1 -1
- package/chunks/{chunk-CG2PDIGD.js → chunk-7XM6KEVW.js} +1 -1
- package/chunks/{chunk-CALNF3Z3.js → chunk-7XVQNDFB.js} +1 -1
- package/chunks/{chunk-TK4XHPKW.js → chunk-7ZKDPTYO.js} +2 -2
- package/chunks/{chunk-ZIPYCXQP.js → chunk-7ZVIGDZF.js} +1 -1
- package/chunks/chunk-AEY27Z35.js +1411 -0
- package/chunks/{chunk-WIRYFL2L.js → chunk-ATH66AEU.js} +64 -59
- package/chunks/{chunk-33MLFMCL.js → chunk-AW2SIT3B.js} +3 -3
- package/chunks/{chunk-4BLTSTF6.js → chunk-AWMJRE5N.js} +4 -4
- package/chunks/chunk-AYEJOTIU.js +43 -0
- package/chunks/{chunk-M73KHGNR.js → chunk-B2TGBZXY.js} +420 -227
- package/chunks/{chunk-XDNFODER.js → chunk-B6BDT4RX.js} +1 -1
- package/chunks/{chunk-WZ4YULVF.js → chunk-BHR6IN2X.js} +3251 -974
- package/chunks/{chunk-GXIHBIHC.js → chunk-BI3WSRQE.js} +61 -72
- package/chunks/{chunk-NVS4Z6GT.js → chunk-BQOP3K76.js} +1 -1
- package/chunks/{chunk-R2266LQ5.js → chunk-BTWGOKHU.js} +2 -2
- package/chunks/{process-registry-OAEG6WGC.js → chunk-BYUAT5OC.js} +1 -0
- package/chunks/{chunk-XVTCSVBK.js → chunk-C4NLHK7X.js} +227 -298
- package/chunks/{chunk-NOO4QFXM.js → chunk-C75BXMPM.js} +1 -3
- package/chunks/chunk-CAAMI77K.js +937 -0
- package/chunks/chunk-CF5KXZZX.js +150 -0
- package/chunks/{chunk-SOA4HKRJ.js → chunk-CGKEUUYG.js} +2 -2
- package/chunks/{chunk-BF3RUIVP.js → chunk-CH2YDT6X.js} +36 -38
- package/chunks/{chunk-5HBA2Z7V.js → chunk-CJ3DHN5I.js} +3 -3
- package/chunks/{chunk-3BTHHXXE.js → chunk-CSHX5ZC4.js} +1 -1
- package/chunks/{chunk-UYDQYDW2.js → chunk-CUK6F5UF.js} +1 -1
- package/chunks/{chunk-RPFJJ33Z.js → chunk-DLH7YIX6.js} +3 -3
- package/chunks/{chunk-L6ZME3W7.js → chunk-DMX7RF6E.js} +1 -1
- package/chunks/{chunk-TRWQQBVH.js → chunk-DTNV6UZY.js} +1 -1
- package/chunks/{chunk-FDOGGKAA.js → chunk-E4UEO3XM.js} +5 -2
- package/chunks/{chunk-RN6V5HKE.js → chunk-E5GQNSJY.js} +3 -3
- package/chunks/chunk-ELRMZTPF.js +374 -0
- package/chunks/chunk-ERU3SDXT.js +27 -0
- package/chunks/{chunk-O2FEO2CB.js → chunk-EUURTIV6.js} +18 -2
- package/chunks/{chunk-4HOEU2OR.js → chunk-EWJTAP3Y.js} +1 -19
- package/chunks/{chunk-ZELCTN6Y.js → chunk-F23YN37B.js} +10 -0
- package/chunks/{chunk-BL6B2QS2.js → chunk-F2RKL5I2.js} +809 -1195
- package/chunks/{chunk-J4ECGDA3.js → chunk-F45SKYIQ.js} +3 -3
- package/chunks/{chunk-5WC2ECUK.js → chunk-FCQJLMA2.js} +114 -8
- package/chunks/{chunk-4JKLPTV6.js → chunk-FGRDUDCI.js} +13 -6
- package/chunks/{chunk-ZUNWKOAP.js → chunk-FGV2QEAO.js} +5 -27
- package/chunks/{chunk-4VY3ITHR.js → chunk-FN3JNDRU.js} +3 -3
- package/chunks/{chunk-XI7RST4D.js → chunk-FRVV5SSD.js} +2 -2
- package/chunks/{chunk-UXDVUFKU.js → chunk-FYZ5NZ3V.js} +2 -20
- package/chunks/{chunk-ALMR3E6Q.js → chunk-GDWE23OR.js} +3 -3
- package/chunks/{chunk-W7PXLIZJ.js → chunk-GP47UR3M.js} +6 -6
- package/chunks/{chunk-LNYV4GXX.js → chunk-GSKX53AN.js} +0 -139
- package/chunks/{chunk-MA5OUNN6.js → chunk-HG46TTAG.js} +1 -1
- package/chunks/{chunk-FETY36NQ.js → chunk-HGEUHUEV.js} +1 -1
- package/chunks/{chunk-UULHYZ4W.js → chunk-HL2DQG3Y.js} +148 -23
- package/chunks/{chunk-E6TI726I.js → chunk-HUXPEUFL.js} +1 -1
- package/chunks/{chunk-5DQ4YTIZ.js → chunk-HZTXKVSV.js} +1 -1
- package/chunks/{chunk-LYT2OU7D.js → chunk-IAEXTMED.js} +1 -1
- package/chunks/{chunk-CPJRFFPH.js → chunk-IFHJIEMN.js} +576 -169
- package/chunks/{chunk-IW6RQPQB.js → chunk-IJOS26LH.js} +1 -3
- package/chunks/{chunk-ORFIYTI2.js → chunk-IK2MWJP5.js} +1 -1
- package/chunks/{chunk-MWEF5MUK.js → chunk-IOUBOANU.js} +42 -13
- package/chunks/{chunk-KA5HR3G2.js → chunk-IUVIBDKU.js} +2 -2
- package/chunks/{chunk-PQWM4SX2.js → chunk-J2RNOJRV.js} +2 -2
- package/chunks/{chunk-VHPG7BH6.js → chunk-J5PYQVD2.js} +2 -2
- package/chunks/{chunk-JDPBJIKI.js → chunk-JDEW3V5B.js} +1 -1
- package/chunks/{chunk-RX3FYFCN.js → chunk-JEMDIKGQ.js} +7 -7
- package/chunks/chunk-JL6APGBX.js +43 -0
- package/chunks/{chunk-UHUT4IDM.js → chunk-JOMCZWX7.js} +9 -15
- package/chunks/{chunk-43CI6YWJ.js → chunk-JV5YASQA.js} +2777 -2151
- package/chunks/{chunk-N6S3NUYJ.js → chunk-JXNIF2O5.js} +1 -1
- package/chunks/chunk-K2OJUPOE.js +78 -0
- package/chunks/{chunk-QLM7D7W3.js → chunk-KFGPNCCY.js} +8 -8
- package/chunks/{chunk-7RXOEUFF.js → chunk-KHIBLKNK.js} +1 -1
- package/chunks/{chunk-5GD7LYOH.js → chunk-KVBNJ4K2.js} +5 -5
- package/chunks/{chunk-QJAFSFYA.js → chunk-KZ2CU2LH.js} +1 -1
- package/chunks/{chunk-DCPRCDSR.js → chunk-L2KF7HUE.js} +6 -6
- package/chunks/{chunk-4ALNJDHL.js → chunk-L3DTX6U4.js} +3 -1
- package/chunks/{chunk-3SH53ANB.js → chunk-LAP7X6EC.js} +12 -0
- package/chunks/{chunk-GM44O6F7.js → chunk-LEGNDA46.js} +1 -1
- package/chunks/{chunk-WXFCI3O5.js → chunk-LG5Y4OWO.js} +2 -2
- package/chunks/{chunk-3LPJ776W.js → chunk-LILGKQ4B.js} +10 -7
- package/chunks/{chunk-LBKYQ33T.js → chunk-LIR7YS2O.js} +18 -12
- package/chunks/{chunk-5Z4FCEPY.js → chunk-LK2WUCDQ.js} +625 -119
- package/chunks/{chunk-W673V2H3.js → chunk-LY2GK2PR.js} +4 -4
- package/chunks/{chunk-PQSCGZT2.js → chunk-MOS5OAOG.js} +36 -10
- package/chunks/chunk-MXOALJIL.js +691 -0
- package/chunks/chunk-NFXXBWSE.js +463 -0
- package/chunks/chunk-NUQ4GK5I.js +315 -0
- package/chunks/{chunk-J3VZF2AL.js → chunk-NUQVB25K.js} +2 -2
- package/chunks/{chunk-GNY7B3CA.js → chunk-NVIBH7WS.js} +1 -1
- package/chunks/{chunk-M6YLOETP.js → chunk-O3MKRN2I.js} +4 -4
- package/chunks/{chunk-ISPBBKJN.js → chunk-ONGZNOIP.js} +7 -2
- package/chunks/{chunk-Q2F43WTJ.js → chunk-OOLSYRZ7.js} +36 -19
- package/chunks/{chunk-63ACHB2H.js → chunk-PIGUW2U2.js} +197 -28
- package/chunks/{chunk-QAZ2MGYT.js → chunk-PLLIWEM3.js} +2 -2
- package/chunks/{chunk-ULY4ISY2.js → chunk-PMS4FVLY.js} +23 -8
- package/chunks/{chunk-NB3NDQQK.js → chunk-Q2XLNLAV.js} +1 -1
- package/chunks/{chunk-6GRDHIVI.js → chunk-Q6HXLBZF.js} +12 -12
- package/chunks/{chunk-EUXF6URV.js → chunk-QPWZX4ZV.js} +32 -34
- package/chunks/{chunk-DTB5BXRG.js → chunk-RJZTX2OF.js} +30 -17
- package/chunks/{chunk-PQEISIKS.js → chunk-SAH4BD2J.js} +0 -67
- package/chunks/{chunk-LUVXLLMS.js → chunk-SAWPURIU.js} +2 -2
- package/chunks/{chunk-WZS3X663.js → chunk-SNZWDV67.js} +43 -18
- package/chunks/{chunk-IRKQ4YYX.js → chunk-SVWWF5TZ.js} +29 -1
- package/chunks/{chunk-5VZFJTL2.js → chunk-SXEE6PND.js} +2 -2
- package/chunks/{chunk-743XE7N7.js → chunk-T4JVQR7Z.js} +2 -2
- package/chunks/{chunk-6RZX2HIH.js → chunk-TBEXLLAO.js} +2 -2
- package/chunks/{chunk-LN3WBOKU.js → chunk-TP2DUOB6.js} +8 -8
- package/chunks/{chunk-MWIO7MF6.js → chunk-TP6FYVQT.js} +2 -0
- package/chunks/{chunk-HRPFBHW7.js → chunk-TPKQIA7G.js} +1 -0
- package/chunks/{chunk-VH764G6B.js → chunk-TWC3FHUI.js} +4 -4
- package/chunks/{chunk-H3Q3RSKZ.js → chunk-U7O65WKL.js} +1 -1
- package/chunks/{chunk-IUJLW6ZI.js → chunk-UBEYS536.js} +7 -7
- package/chunks/{chunk-VEQBVJYH.js → chunk-UGS62IR2.js} +3 -3
- package/chunks/{chunk-VF6D6EGV.js → chunk-UKMWZ5NS.js} +109 -842
- package/chunks/{chunk-7GZCCHJL.js → chunk-VHKOULAI.js} +6 -5
- package/chunks/{chunk-ODBNTMZW.js → chunk-VID4BW52.js} +97 -86
- package/chunks/{chunk-7L35FKPF.js → chunk-VLZOU6UH.js} +7 -7
- package/chunks/{chunk-XBLG564H.js → chunk-VTBPMLRO.js} +12 -12
- package/chunks/{chunk-QTNCGZHQ.js → chunk-VX63RJXE.js} +9 -0
- package/chunks/{chunk-7VEYUF3N.js → chunk-W5ZQMAEM.js} +1 -1
- package/chunks/{chunk-XQ4RDO5B.js → chunk-WBCPROWX.js} +1 -1
- package/chunks/{chunk-RDV4NLI3.js → chunk-WS7MOFK6.js} +3 -3
- package/chunks/{chunk-FV4DM2M4.js → chunk-WXFK4MH7.js} +32 -12
- package/chunks/{chunk-XAXTQURR.js → chunk-WY4N6KS7.js} +4 -4
- package/chunks/{chunk-CABDNUJ4.js → chunk-XDQUDARC.js} +11 -14
- package/chunks/{chunk-YHDGABDC.js → chunk-XKBFYTCD.js} +1 -1
- package/chunks/{chunk-2EKVPSIJ.js → chunk-Y2MYW47X.js} +1 -1
- package/chunks/{chunk-Y6ZWXM44.js → chunk-YIU5PEAT.js} +2 -2
- package/chunks/{chunk-PSPAM24S.js → chunk-YKK2XXHF.js} +4 -0
- package/chunks/{chunk-HZ2HUXX7.js → chunk-YS2ZJSOA.js} +29 -12
- package/chunks/{chunk-OFVAS4AR.js → chunk-ZGQIIGNQ.js} +2 -2
- package/chunks/{chunk-HNLMYDQE.js → chunk-ZHECLGA6.js} +2 -4
- package/chunks/{chunk-XBVNNDPK.js → chunk-ZHKTKHMO.js} +8 -1
- package/chunks/{chunk-OWCFKIFQ.js → chunk-ZKYR7QS4.js} +1 -1
- package/chunks/{chunk-YZTGGCEE.js → chunk-ZKZHSB5W.js} +1 -1
- package/chunks/{chunk-ERXNTINK.js → chunk-ZT6EPPBY.js} +1 -1
- package/chunks/{chunk-565U2ANU.js → chunk-ZTTC7T4X.js} +1 -1
- package/chunks/{chunk-MMMA36MN.js → chunk-ZUQVZTWG.js} +3 -3
- package/chunks/{chunk-7OCIQNKX.js → chunk-ZW2EUO2A.js} +1 -1
- package/chunks/{config-utils-37FHWPTP.js → config-utils-S5LFS4RN.js} +67 -59
- package/chunks/{contextCommand-R4JUBV5N.js → contextCommand-XXKZMMSQ.js} +64 -56
- package/chunks/{core-runtime-6U4OXU5C.js → core-runtime-YGUA42AZ.js} +68 -59
- package/chunks/{create-sub-session-LLUYAGZN.js → create-sub-session-SEK6KCYR.js} +64 -56
- package/chunks/{create-sub-session-TGIX63YU.js → create-sub-session-TIGCFGCS.js} +2 -2
- package/chunks/{cron-create-GTPVMJCF.js → cron-create-AKWX67FO.js} +1 -1
- package/chunks/{cron-delete-ZBK27Z4K.js → cron-delete-XPB6IYZJ.js} +1 -1
- package/chunks/{cron-list-KTFKFDKC.js → cron-list-XBKO4WU5.js} +1 -1
- package/chunks/{daemon-UI6SQSBV.js → daemon-G5TYKZD6.js} +2 -2
- package/chunks/{daemon-git-worktree-guard-O2UTNFJC.js → daemon-git-worktree-guard-3AWINPPX.js} +65 -57
- package/chunks/{daemon-status-provider-7GMAKSTX.js → daemon-status-provider-RTKHKUFJ.js} +73 -65
- package/chunks/{daemon-trust-policy-VNP76VMO.js → daemon-trust-policy-6YQOC7B6.js} +69 -61
- package/chunks/{daemon-trust-policy-monitor-TD5O3BZA.js → daemon-trust-policy-monitor-EN5L23GS.js} +69 -61
- package/chunks/{de-UU2YTO37.js → de-OOLZAU2U.js} +1 -1
- package/chunks/{deferred-core-runtime-NJM63YJS.js → deferred-core-runtime-JPLQRVZO.js} +62 -54
- package/chunks/{display-image-CTNHJRZC.js → display-image-NAH3AZ63.js} +3 -3
- package/chunks/{dist-STAGIFNB.js → dist-3BJVSJ7D.js} +389 -724
- package/chunks/{dist-OR2ZQTXZ.js → dist-65Q3TRLH.js} +16 -36
- package/chunks/{dist-24TCWK5H.js → dist-HX2LG76F.js} +233 -35
- package/chunks/{dist-XJ25G6OH.js → dist-J7PDFK53.js} +13 -38
- package/chunks/{dist-WZTUKIDR.js → dist-JCXKXRH6.js} +3 -6
- package/chunks/{dist-M4CBX53H.js → dist-LHGMHIDK.js} +2 -6
- package/chunks/{dist-5I4HLUTO.js → dist-QPTIRE3U.js} +4 -13
- package/chunks/{dist-FDISN4AK.js → dist-SBK33YLC.js} +5 -40
- package/chunks/{dist-NQ2636VT.js → dist-WMFHZG3R.js} +2 -5
- package/chunks/{edit-GL7OA6RV.js → edit-QXJZIWRQ.js} +50 -44
- package/chunks/{en-YJNRUQG4.js → en-7BZ2OZKH.js} +2 -1
- package/chunks/{enter-worktree-YFTKHXHZ.js → enter-worktree-54L5QJ3N.js} +4 -4
- package/chunks/{enterPlanMode-VC4BCSZE.js → enterPlanMode-2ITCVQ5N.js} +47 -41
- package/chunks/{environment-BI6IBAZJ.js → environment-URPO5ORZ.js} +65 -57
- package/chunks/{errors-D6G2ZM2R.js → errors-TDUYLEKI.js} +64 -56
- package/chunks/{exit-worktree-NF2XEMES.js → exit-worktree-EORJDKDS.js} +4 -4
- package/chunks/{exitPlanMode-DX446CA6.js → exitPlanMode-RA7KMUEW.js} +47 -41
- package/chunks/{fast-path-MAYDLJIP.js → fast-path-Q2JYP64P.js} +7 -7
- package/chunks/{fast-path-settings-SATXY3PD.js → fast-path-settings-GTHZLVSS.js} +2 -2
- package/chunks/{fr-HKNWVXRJ.js → fr-JJWM2HUS.js} +1 -1
- package/chunks/{glob-TVKRFY36.js → glob-VHSV4BKE.js} +50 -44
- package/chunks/{goal-tools-CA6YANRN.js → goal-tools-5FIE56CK.js} +53 -43
- package/chunks/{grep-BLHF2S5D.js → grep-3PKFKLCA.js} +2 -2
- package/chunks/{handleAutoUpdate-AW4ZAHON.js → handleAutoUpdate-7FZFLKNZ.js} +65 -57
- package/chunks/{i18n-IH5CRAY7.js → i18n-NTFQDWKR.js} +63 -55
- package/chunks/{image-gen-XP4NNIYG.js → image-gen-TF3IQWSH.js} +7 -6
- package/chunks/{initializer-UBR37ZNM.js → initializer-LB3T635H.js} +69 -61
- package/chunks/{installationInfo-Y52756EC.js → installationInfo-KRO433ZG.js} +62 -54
- package/chunks/{ja-GJS5RZGU.js → ja-L67TXFDJ.js} +1 -1
- package/chunks/{list-7V5JDZPO.js → list-NEP3WPZ7.js} +72 -64
- package/chunks/{list-agents-I5TRH3J7.js → list-agents-QLDXS5OD.js} +18 -8
- package/chunks/{llm-QDB6JVF5.js → llm-AZEJEIAD.js} +141 -128
- package/chunks/{llm-content-generator-EO6MZCEO.js → llm-content-generator-KWXFHBR3.js} +6 -5
- package/chunks/{loadedSettingsAdapter-I3YQKMC4.js → loadedSettingsAdapter-NZORJLSD.js} +69 -61
- package/chunks/{loggingContentGenerator-MNXYUGDG.js → loggingContentGenerator-NGHVU6AK.js} +69 -62
- package/chunks/{loop-wakeup-HL6XOWI4.js → loop-wakeup-HHMYIC7Z.js} +2 -2
- package/chunks/{ls-YV7RKLKY.js → ls-N7ABR6HI.js} +4 -4
- package/chunks/{lsp-NO3AMRZT.js → lsp-LTOFWG5P.js} +1 -1
- package/chunks/{managed-npm-update-EA3EXPTO.js → managed-npm-update-3LHNBEAG.js} +62 -54
- package/chunks/{mcp-QTAJ544Y.js → mcp-4SWJKDX7.js} +69 -61
- package/chunks/{monitor-6FQKQOTP.js → monitor-V5EFBZC7.js} +49 -43
- package/chunks/{nonInteractiveCli-MRCTZL5X.js → nonInteractiveCli-5UFUBUAT.js} +117 -109
- package/chunks/{notebook-edit-BQQCKI7K.js → notebook-edit-ATV46KWD.js} +48 -42
- package/chunks/{open-with-auth-D6JD6LDS.js → open-with-auth-6MVIHMXB.js} +1 -1
- package/chunks/openai-WX26N5OJ.js +47 -0
- package/chunks/{openaiContentGenerator-TTSKXNVH.js → openaiContentGenerator-BKTO5QJK.js} +31 -25
- package/chunks/openaiResponsesContentGenerator-RTCAJ5V5.js +1658 -0
- package/chunks/{pidfile-KPIS6RIT.js → pidfile-JAIOWPI3.js} +65 -55
- package/chunks/process-registry-X6ZCASEN.js +10 -0
- package/chunks/{processUtils-ZCASPKK4.js → processUtils-TCQH3LVD.js} +2 -2
- package/chunks/{prompt-terminal-ledger-D6HM6TV7.js → prompt-terminal-ledger-BYXHEUHX.js} +63 -55
- package/chunks/{pt-FXMYXEUV.js → pt-77SBDL4B.js} +1 -1
- package/chunks/{qwenContentGenerator-GGZEFLBD.js → qwenContentGenerator-K5TJK75P.js} +60 -52
- package/chunks/{qwenOAuth2-KX6LVYQ3.js → qwenOAuth2-NOXRK323.js} +6 -5
- package/chunks/{read-file-VE5GDFLP.js → read-file-DL7GNZD5.js} +11 -9
- package/chunks/{read-mcp-resource-D3N75DGF.js → read-mcp-resource-B37WANAQ.js} +1 -1
- package/chunks/{record-artifact-Q5CRGJTP.js → record-artifact-OAXWXZ5D.js} +2 -2
- package/chunks/record-source-D7R7X3GT.js +22 -0
- package/chunks/{report-findings-TJ34R7QK.js → report-findings-AR3VC6EQ.js} +3 -3
- package/chunks/{request-shutdown-LRKMTBAD.js → request-shutdown-IKNWTX5M.js} +5 -5
- package/chunks/{resumeHistoryUtils-HSSGMYDC.js → resumeHistoryUtils-OYKXZ4YO.js} +68 -60
- package/chunks/{ripGrep-SEJE7AA6.js → ripGrep-EOUMIU4K.js} +15 -13
- package/chunks/{ru-RMHURE5U.js → ru-UYWHKWF2.js} +1 -1
- package/chunks/{run-qwen-serve-OJYVH7N6.js → run-qwen-serve-PPTGWC5B.js} +471 -152
- package/chunks/{runtime-KGMQQFJD.js → runtime-5RO22P2N.js} +77 -67
- package/chunks/{scheduled-tasks-7H5HWHYD.js → scheduled-tasks-YGERFWLZ.js} +70 -62
- package/chunks/{scheduler-BE42AKDG.js → scheduler-S6WU6M3C.js} +64 -56
- package/chunks/{sdk-exporters-grpc-MXTVSE3C.js → sdk-exporters-grpc-Y2ZUQDUQ.js} +2 -2
- package/chunks/{sdk-exporters-http-7R2ARBPV.js → sdk-exporters-http-VWTF4W6K.js} +3 -3
- package/chunks/{sdk-impl-YOLO7LV4.js → sdk-impl-G6FVTBQZ.js} +9 -9
- package/chunks/{send-message-AWKUDJBH.js → send-message-TWOGWCBG.js} +13 -10
- package/chunks/{serve-KZVKYMSL.js → serve-HT4WOCWS.js} +70 -62
- package/chunks/{server-PJRALPJQ.js → server-SWXVPRCS.js} +2977 -617
- package/chunks/{session-IHITXU2S.js → session-6DSFUOMO.js} +154 -119
- package/chunks/{session-attachments-root-GQ2TUI3Y.js → session-attachments-root-SOZCTQWW.js} +62 -54
- package/chunks/{session-pr-refresh-H43LULTE.js → session-pr-refresh-F7XUBQBH.js} +70 -62
- package/chunks/{settings-RKEQQDFC.js → settings-SWQH36PO.js} +74 -66
- package/chunks/{shell-6PJ444U5.js → shell-XUQL6EYV.js} +47 -41
- package/chunks/{skill-Q3UP7B5V.js → skill-HNRDD54C.js} +33 -23
- package/chunks/{skill-settings-LZR5YRRW.js → skill-settings-JU72PCII.js} +68 -60
- package/chunks/{spawnChannel-WM3DT2BF.js → spawnChannel-7ZVM3GBU.js} +65 -57
- package/chunks/{standalone-update-E5474IBI.js → standalone-update-64JQY2LX.js} +64 -56
- package/chunks/{start-opentui-ui-WLWZNQ2I.js → start-opentui-ui-RSLBXESU.js} +554 -297
- package/chunks/{startInteractiveUI-FBQSGWGO.js → startInteractiveUI-ZDPHD7XE.js} +1282 -1915
- package/chunks/{syntheticOutput-D2P5V6RG.js → syntheticOutput-F6F27JMK.js} +2 -2
- package/chunks/{task-create-PMAFST2T.js → task-create-Y623TBHB.js} +10 -10
- package/chunks/{task-list-R2HSY2NC.js → task-list-FCPEEGWL.js} +3 -3
- package/chunks/{task-stop-BFSKRTGV.js → task-stop-QTKZXLPH.js} +1 -1
- package/chunks/{task-update-JYC57USF.js → task-update-YLSXF25N.js} +10 -10
- package/chunks/{team-create-VIGUFUT4.js → team-create-U52VYSNO.js} +49 -43
- package/chunks/{team-delete-CBHVBTPB.js → team-delete-S7TLHZCF.js} +3 -3
- package/chunks/{team-plan-approval-HQVZA3MD.js → team-plan-approval-IQ4ADQIK.js} +47 -41
- package/chunks/{terminal-image-renderer-LUKNCOVM.js → terminal-image-renderer-ZEMF7LB2.js} +64 -56
- package/chunks/{theme-manager-LOENKYLY.js → theme-manager-DK2S2SOX.js} +62 -54
- package/chunks/{todoWrite-5ERKFWAK.js → todoWrite-5QI2H2FW.js} +4 -4
- package/chunks/{tool-search-ZIFAQCE2.js → tool-search-6U4OQG7K.js} +21 -15
- package/chunks/{total-session-admission-FUUJH3QH.js → total-session-admission-BOARHBZU.js} +68 -60
- package/chunks/{trustedFolders-C76KYROP.js → trustedFolders-GKQZXZSV.js} +63 -55
- package/chunks/{update-relaunch-4G2SRXKX.js → update-relaunch-GLACF7PX.js} +5 -5
- package/chunks/{updateCheck-EIZIO7HI.js → updateCheck-NLBSZB4Q.js} +64 -56
- package/chunks/{useAutoAcceptIndicator-EAA6KSY4.js → useAutoAcceptIndicator-3X3BYU7H.js} +72 -64
- package/chunks/{validateNonInterActiveAuth-BRX22QCN.js → validateNonInterActiveAuth-NE3JLOIR.js} +114 -106
- package/chunks/{version-E56RU7PR.js → version-6H5YAT4N.js} +3 -1
- package/chunks/{web-fetch-AAUCD7RM.js → web-fetch-RWSO7TTN.js} +15 -13
- package/chunks/{web-search-HFUQF44Q.js → web-search-DADI3LV5.js} +560 -322
- package/chunks/{web-shell-static-POZHGGXE.js → web-shell-static-CCN4JZEE.js} +5 -4
- package/chunks/workflow-LPGCZCIT.js +1224 -0
- package/chunks/workspace-providers-status-QBRBEFTO.js +127 -0
- package/chunks/{workspace-registration-store-YL7HLYYI.js → workspace-registration-store-WUKTMJPW.js} +3 -2
- package/chunks/{workspace-registry-BNRP2ELW.js → workspace-registry-CJV7KVGF.js} +68 -60
- package/chunks/{workspace-runtime-coordinator-WKGF7VHS.js → workspace-runtime-coordinator-7LYMFMFF.js} +71 -61
- package/chunks/{workspace-service-4MYO72MM.js → workspace-service-HWXZSA4J.js} +75 -67
- package/chunks/{workspace-skills-status-SU66TJLZ.js → workspace-skills-status-D6QXUWCC.js} +70 -62
- package/chunks/{workspace-trust-reconciler-D5QT7WQB.js → workspace-trust-reconciler-VZX7G7CZ.js} +75 -67
- package/chunks/{write-file-NVPQE2AZ.js → write-file-KKHV26YV.js} +49 -43
- package/chunks/{zh-VBFCRQBL.js → zh-J2GLI64H.js} +2 -1
- package/chunks/{zh-TW-N2TBF2F2.js → zh-TW-TBAICUJQ.js} +2 -1
- package/chunks/{zoom-image-RJHC66WG.js → zoom-image-OG7X7KAA.js} +12 -10
- package/cli.js +14 -14
- package/export-transcript-document.css +1 -0
- package/export-transcript-document.js +164 -165
- package/locales/ca.js +2 -2
- package/locales/de.js +2 -2
- package/locales/en.js +3 -2
- package/locales/fr.js +2 -2
- package/locales/ja.js +2 -2
- package/locales/pt.js +2 -2
- package/locales/ru.js +2 -2
- package/locales/zh-TW.js +3 -2
- package/locales/zh.js +3 -2
- package/package.json +6 -5
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DHc6plZn.js → abnfDiagram-VCTEODGH-NT0lTLRG.js} +1 -1
- package/web-shell/assets/{arc-BQ9m8TDV.js → arc-DDqnIMMx.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-D5ap3oVB.js → architectureDiagram-5GKGNRK7-DfYghE3W.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-BIbnyNph.js → blockDiagram-NRAW4CY4-DlqJIx5c.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BRsdx_iG.js → c4Diagram-UCG6FXSJ-CinqLGU4.js} +1 -1
- package/web-shell/assets/channel-BHGoSkEv.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-3lf1fNlx.js → chunk-2Q5K7J3B-CsjJX5M7.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-DP8VNRc4.js → chunk-5VM5RSS4-CaVb2tdH.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-DrohDmZ6.js → chunk-F27PBJKO-CRyErlzW.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-UZ2QhSx6.js → chunk-G27WJ6UU-7I79DZCf.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-BIMHVcZK.js → chunk-JWPE2WC7-Dz4cac5F.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-izRxdSDd.js → chunk-LCL6LL3I-Ls24Derb.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-CXADD4PP.js → chunk-POPQ4Y6H-JzYe4qx7.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-B96d8Y_1.js → chunk-SVP7TREG-BxDwesA-.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-CF2sVQpv.js → chunk-XXDRQBXY-CW4hjgWc.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-E47Xnn15.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-E47Xnn15.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CT6tXVAS.js → cose-bilkent-JH36ORCC-DxikE9iF.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-X1NS4vtV.js → cynefin-OW5HDTMX-CvVsIkVN.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DNsKNOT4.js → cynefinDiagram-5FMLGOSQ-CDHkk3wq.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-9-AHKqsb.js → dagre-3AP2YEHR-BgLdkVLT.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-Bjgms7j6.js → diagram-S7CK7UJ4-DP43cGhe.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-h6bCprbE.js → diagram-UQ7AKVKN-BWrZYhoT.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-4SbQXVLt.js → diagram-VSXAHHWV-B80wjH_n.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-B5gPCzzB.js → diagram-VX7I27RA-DPpKmDsY.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-DFJXIA3A.js → diagram-Z3DM3KII-kaEBNbNU.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-FwyaU7VY.js → ebnfDiagram-PWID7BFC-1-qbEZvk.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-8vJQh2te.js → erDiagram-SSCWMZ5O-CrK2gMkV.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-BzA_1gMN.js → flowDiagram-A5DVABFB-Dic2xofW.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-Co-ABbVX.js → ganttDiagram-EL5Y4UJY-DJko8vT7.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DW_FcyrX.js → gitGraphDiagram-WWUBYQGX-DxsQ-bHT.js} +1 -1
- package/web-shell/assets/index-DY8CxdBr.js +2173 -0
- package/web-shell/assets/index-eBxK3rs2.css +36 -0
- package/web-shell/assets/{index-BbMXfhNG.js → index-t7VBrUeD.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-BEgfhUFN.js → infoDiagram-RXCK75RN-DcRUJbNi.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DCsMxQmc.js → ishikawaDiagram-5VMMS53U-CUPw-2_e.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-DyIEYoHz.js → journeyDiagram-EYS64GPL-yOHhZxkW.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-CkxjqCNr.js → kanban-definition-3QL26DDD-CFUGBbqz.js} +1 -1
- package/web-shell/assets/{layout-BEWc0Al9.js → layout-BoilNfBU.js} +1 -1
- package/web-shell/assets/{linear-CNuNxirL.js → linear-DOuHaPrl.js} +1 -1
- package/web-shell/assets/{mermaid.core-DZBre674.js → mermaid.core-1G1fXWda.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-CpafFz_F.js → mindmap-definition-FBJOCRG2-B8BhkrOX.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DfZqk_dq.js → pegDiagram-XKGWAZYB-CipC5K1D.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-S0UWXlgC.js → pieDiagram-E7YTZNPT-CHBDFDUJ.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-dd37_Ohj.js → quadrantDiagram-AXDQQJYC-_iiBkoZO.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH8NJZ7u.js → railroadDiagram-O6MQD6OU-Cx1peHDi.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CFdqWYih.js → requirementDiagram-EFPCY7ZU-CBRiPbdQ.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CsddcEGD.js → sankeyDiagram-P5KCCOFB-TT6GcHaZ.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BZ270mGw.js → sequenceDiagram-WJ2MYXX4-CWP42PNb.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CGaS4DBV.js → sizeCapture-X5ZJPWSS-Bp94roEG.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-COpIzMu6.js → stateDiagram-HBIQ2CUA-0ftrzTAy.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-PgAST0dK.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-CMF889m3.js → swimlanes-XN3QIQJK-D-FsenYJ.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-BcWcB5bj.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-BelnxYz5.js → timeline-definition-24CTP7MA-Ctvrj28y.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-CU-NRqIB.js → vennDiagram-4TSXK5OY-5DZncjOt.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CDNKqWh-.js → wardleyDiagram-VM6X3IG4-jZjYwPY7.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CLqguL5D.js → xychartDiagram-S5SC5T6Z-Ci6Q2C2_.js} +1 -1
- package/web-shell/index.html +29 -5
- package/chunks/chunk-V7RNNPGC.js +0 -44
- package/chunks/chunk-X35VIWWJ.js +0 -276
- package/chunks/workflow-3MABM53N.js +0 -2771
- package/chunks/workspace-providers-status-2FRLBZ5I.js +0 -119
- package/web-shell/assets/channel-uMMdTrYk.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DcY-26Ig.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DcY-26Ig.js +0 -1
- package/web-shell/assets/index-Bu-rZoJ-.js +0 -2150
- package/web-shell/assets/index-CsPwZ1ut.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-D6qEVAji.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-mem5Jj4m.js +0 -8
- /package/chunks/{chunk-JA5CBKRP.js → chunk-7NXSVSFB.js} +0 -0
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
recomputeMcpGating
|
|
5
|
+
} from "./chunk-WY4N6KS7.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
PeerMessaging,
|
|
8
|
+
classifyApiError
|
|
9
|
+
} from "./chunk-MXOALJIL.js";
|
|
9
10
|
import {
|
|
10
11
|
normalizePartList
|
|
11
12
|
} from "./chunk-5IENVM7Z.js";
|
|
13
|
+
import {
|
|
14
|
+
fireSessionDeleteHook
|
|
15
|
+
} from "./chunk-L34XSHIZ.js";
|
|
12
16
|
import {
|
|
13
17
|
EXTENSION_CONTEXT_BUDGET,
|
|
14
18
|
buildExtensionMentionContext,
|
|
@@ -18,7 +22,7 @@ import {
|
|
|
18
22
|
matchMcpServerByRef,
|
|
19
23
|
parseExtensionRef,
|
|
20
24
|
parseMcpServerRef
|
|
21
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-72BGC7RT.js";
|
|
22
26
|
import {
|
|
23
27
|
getAvailableCommands,
|
|
24
28
|
getSlashCommandFirstToken,
|
|
@@ -28,10 +32,7 @@ import {
|
|
|
28
32
|
pLimit,
|
|
29
33
|
recordDaemonSessionModel,
|
|
30
34
|
restoreSessionModelThenAuthenticate
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
recomputeMcpGating
|
|
34
|
-
} from "./chunk-XAXTQURR.js";
|
|
35
|
+
} from "./chunk-VID4BW52.js";
|
|
35
36
|
import {
|
|
36
37
|
SessionIdConflictError,
|
|
37
38
|
appEvents,
|
|
@@ -41,46 +42,46 @@ import {
|
|
|
41
42
|
loadCliConfig,
|
|
42
43
|
normalizeDisabledToolList,
|
|
43
44
|
parseApprovalModeValue
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import {
|
|
46
|
-
getCommandSubcommandNames
|
|
47
|
-
} from "./chunk-QJAFSFYA.js";
|
|
48
|
-
import {
|
|
49
|
-
getEffectiveSupportedModes
|
|
50
|
-
} from "./chunk-W3ONSAYO.js";
|
|
51
|
-
import "./chunk-3SH53ANB.js";
|
|
45
|
+
} from "./chunk-BHR6IN2X.js";
|
|
52
46
|
import "./chunk-NYX53SV4.js";
|
|
53
|
-
import "./chunk-UYDQYDW2.js";
|
|
54
47
|
import {
|
|
55
48
|
collectContextData,
|
|
56
49
|
formatContextUsageText
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-4WGODMVR.js";
|
|
50
|
+
} from "./chunk-VLZOU6UH.js";
|
|
59
51
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
52
|
+
getCommandSubcommandNames
|
|
53
|
+
} from "./chunk-KZ2CU2LH.js";
|
|
54
|
+
import {
|
|
55
|
+
getEffectiveSupportedModes
|
|
56
|
+
} from "./chunk-3VPFA6L2.js";
|
|
57
|
+
import "./chunk-CUK6F5UF.js";
|
|
58
|
+
import "./chunk-4WGODMVR.js";
|
|
59
|
+
import "./chunk-LAP7X6EC.js";
|
|
67
60
|
import {
|
|
68
61
|
isGoalStatusKind
|
|
69
62
|
} from "./chunk-EKTCKZV5.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-SAWPURIU.js";
|
|
64
|
+
import "./chunk-2XRE4KE4.js";
|
|
72
65
|
import {
|
|
73
|
-
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
66
|
+
startNonInteractiveOpenAILogHousekeeping
|
|
67
|
+
} from "./chunk-F45SKYIQ.js";
|
|
68
|
+
import "./chunk-KW7NOTN6.js";
|
|
69
|
+
import "./chunk-KFGPNCCY.js";
|
|
77
70
|
import "./chunk-6H67XLET.js";
|
|
78
71
|
import {
|
|
79
72
|
beginAcpBootstrapConfigProfiling,
|
|
80
73
|
buildAndFreezeAcpStartupProfile,
|
|
81
74
|
endAcpBootstrapConfigProfiling,
|
|
82
75
|
markAcpStartup
|
|
83
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-5FFAUU4T.js";
|
|
77
|
+
import "./chunk-LY2GK2PR.js";
|
|
78
|
+
import "./chunk-UGS62IR2.js";
|
|
79
|
+
import "./chunk-7XM6KEVW.js";
|
|
80
|
+
import "./chunk-YAF2MQZ6.js";
|
|
81
|
+
import {
|
|
82
|
+
computeCpuPercent
|
|
83
|
+
} from "./chunk-LBOVL47Y.js";
|
|
84
|
+
import "./chunk-24FVUD5P.js";
|
|
84
85
|
import {
|
|
85
86
|
GENERATION_MAX_PROMPT_BYTES,
|
|
86
87
|
GENERATION_TIMEOUT_MS,
|
|
@@ -101,7 +102,7 @@ import {
|
|
|
101
102
|
shouldSuppressRememberErrorDetails,
|
|
102
103
|
workspaceMemoryFailureCode,
|
|
103
104
|
workspaceMemoryFailureDiagnostics
|
|
104
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-ZUQVZTWG.js";
|
|
105
106
|
import {
|
|
106
107
|
BaseEmitter,
|
|
107
108
|
HistoryReplayer,
|
|
@@ -112,21 +113,14 @@ import {
|
|
|
112
113
|
hasFullSessionContext,
|
|
113
114
|
observeAcpToolResultProjection,
|
|
114
115
|
observeAcpToolResultWire
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-HL2DQG3Y.js";
|
|
116
117
|
import "./chunk-M3JGHRMQ.js";
|
|
117
118
|
import "./chunk-VFFQAOPR.js";
|
|
118
|
-
import "./chunk-ERXNTINK.js";
|
|
119
119
|
import "./chunk-47ECGEJC.js";
|
|
120
|
+
import "./chunk-ZT6EPPBY.js";
|
|
120
121
|
import "./chunk-2MIN6GRR.js";
|
|
121
122
|
import "./chunk-QHTIBUWB.js";
|
|
122
123
|
import "./chunk-TXASDT2M.js";
|
|
123
|
-
import {
|
|
124
|
-
getConversationDirectoryName,
|
|
125
|
-
hasVerifiableInode,
|
|
126
|
-
isSameConversationPath,
|
|
127
|
-
isSameDirectoryIdentity
|
|
128
|
-
} from "./chunk-PB7JBAHF.js";
|
|
129
|
-
import "./chunk-UXEO7E3V.js";
|
|
130
124
|
import {
|
|
131
125
|
isCompatibleLiveSessionSource
|
|
132
126
|
} from "./chunk-OHU2H5CS.js";
|
|
@@ -137,13 +131,19 @@ import {
|
|
|
137
131
|
isReservedStandaloneSessionSourceType,
|
|
138
132
|
parseSessionSource
|
|
139
133
|
} from "./chunk-N4QWUPDM.js";
|
|
140
|
-
import
|
|
134
|
+
import {
|
|
135
|
+
getConversationDirectoryName,
|
|
136
|
+
hasVerifiableInode,
|
|
137
|
+
isSameConversationPath,
|
|
138
|
+
isSameDirectoryIdentity
|
|
139
|
+
} from "./chunk-PB7JBAHF.js";
|
|
140
|
+
import "./chunk-UXEO7E3V.js";
|
|
141
141
|
import {
|
|
142
142
|
buildScheduledTaskRunPrompt,
|
|
143
143
|
normalizeChannelDeliveryText,
|
|
144
144
|
scheduledTaskRunSessionName,
|
|
145
145
|
scheduledTaskRunSourceId
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-7ZKDPTYO.js";
|
|
147
147
|
import {
|
|
148
148
|
normalizeSessionIdForLookup,
|
|
149
149
|
parseCallerSuppliedSessionId
|
|
@@ -154,28 +154,36 @@ import {
|
|
|
154
154
|
buildPermissionSettings,
|
|
155
155
|
normalizePermissionRules,
|
|
156
156
|
readPermissionRuleSet
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-7ZVIGDZF.js";
|
|
158
158
|
import {
|
|
159
159
|
MAX_AUDIO_BYTES,
|
|
160
160
|
sanitizeVoiceErrorMessage,
|
|
161
161
|
transcribeVoiceAudio
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-NVIBH7WS.js";
|
|
163
163
|
import {
|
|
164
164
|
readVoiceModel
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-Q2XLNLAV.js";
|
|
166
166
|
import "./chunk-Y53DG2HA.js";
|
|
167
|
-
import
|
|
168
|
-
|
|
167
|
+
import {
|
|
168
|
+
mapSkillConfigToStatus
|
|
169
|
+
} from "./chunk-BHTYRHJF.js";
|
|
170
|
+
import "./chunk-FCQJLMA2.js";
|
|
171
|
+
import "./chunk-DMEUXLSS.js";
|
|
172
|
+
import {
|
|
173
|
+
createLoadedSettingsAdapter
|
|
174
|
+
} from "./chunk-BQOP3K76.js";
|
|
175
|
+
import "./chunk-6EOMQPTS.js";
|
|
176
|
+
import "./chunk-BTWGOKHU.js";
|
|
169
177
|
import "./chunk-JS73NNWF.js";
|
|
170
178
|
import {
|
|
171
179
|
SCHEDULED_TASK_RUN_SOURCE_TYPE
|
|
172
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-PIGUW2U2.js";
|
|
173
181
|
import "./chunk-7U5G6JXI.js";
|
|
174
182
|
import "./chunk-WCCLLK7X.js";
|
|
175
183
|
import "./chunk-OCPBI7J5.js";
|
|
176
184
|
import {
|
|
177
185
|
ndJsonStream
|
|
178
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-IUVIBDKU.js";
|
|
179
187
|
import {
|
|
180
188
|
PERSIST_REASONING_SELECTION_META_KEY,
|
|
181
189
|
REASONING_EFFORT_DEFAULT,
|
|
@@ -187,10 +195,12 @@ import {
|
|
|
187
195
|
buildModelReasoningConfigPreview,
|
|
188
196
|
clearReasoningRequestOverrides,
|
|
189
197
|
getConfiguredModelReasoning,
|
|
198
|
+
getDefaultReasoningConfig,
|
|
199
|
+
getGptReasoningOverrideState,
|
|
190
200
|
isReasoningSelectionSupported,
|
|
191
201
|
parseReasoningSelection,
|
|
192
202
|
resolvePersistedReasoningConfigState
|
|
193
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-6EDWSKN4.js";
|
|
194
204
|
import {
|
|
195
205
|
ACP_ROUTE_ID_PREFIX,
|
|
196
206
|
buildAcpModelOptions,
|
|
@@ -199,10 +209,7 @@ import {
|
|
|
199
209
|
parseAcpModelOption,
|
|
200
210
|
resolveAcpModelOption,
|
|
201
211
|
sanitizeProviderBaseUrl
|
|
202
|
-
} from "./chunk-
|
|
203
|
-
import {
|
|
204
|
-
mapSkillConfigToStatus
|
|
205
|
-
} from "./chunk-BHTYRHJF.js";
|
|
212
|
+
} from "./chunk-VHKOULAI.js";
|
|
206
213
|
import {
|
|
207
214
|
ACP_PREFLIGHT_KINDS,
|
|
208
215
|
IDLE_HOOK_EVENTS,
|
|
@@ -210,23 +217,17 @@ import {
|
|
|
210
217
|
SERVE_STATUS_EXT_METHODS,
|
|
211
218
|
STATUS_SCHEMA_VERSION,
|
|
212
219
|
mapDomainErrorToErrorKind
|
|
213
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-HGEUHUEV.js";
|
|
214
221
|
import {
|
|
215
222
|
resolveSkillSettings
|
|
216
223
|
} from "./chunk-HWVUSYSN.js";
|
|
217
|
-
import "./chunk-
|
|
218
|
-
import "./chunk-
|
|
219
|
-
import "./chunk-ORREXWOM.js";
|
|
224
|
+
import "./chunk-FGRDUDCI.js";
|
|
225
|
+
import "./chunk-5ZJ3KK5J.js";
|
|
220
226
|
import "./chunk-57OAHC2Y.js";
|
|
221
|
-
import "./chunk-
|
|
222
|
-
import "./chunk-
|
|
223
|
-
import "./chunk-
|
|
227
|
+
import "./chunk-FYZ5NZ3V.js";
|
|
228
|
+
import "./chunk-JOMCZWX7.js";
|
|
229
|
+
import "./chunk-CSHX5ZC4.js";
|
|
224
230
|
import "./chunk-V6WHFGST.js";
|
|
225
|
-
import {
|
|
226
|
-
createLoadedSettingsAdapter
|
|
227
|
-
} from "./chunk-NVS4Z6GT.js";
|
|
228
|
-
import "./chunk-45ROPFQY.js";
|
|
229
|
-
import "./chunk-N6VQ37ZZ.js";
|
|
230
231
|
import {
|
|
231
232
|
ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
|
|
232
233
|
ACTIVE_WORK_HEARTBEAT_META_KEY,
|
|
@@ -245,6 +246,7 @@ import {
|
|
|
245
246
|
DAEMON_PERMISSION_CANCEL_REASON_META_KEY,
|
|
246
247
|
DAEMON_PROMPT_DISPLAY_TEXT_META_KEY,
|
|
247
248
|
DAEMON_RESTORE_ASK_USER_QUESTION_META_KEY,
|
|
249
|
+
DAEMON_SUBMITTED_PROMPT_META_KEY,
|
|
248
250
|
DAEMON_SUPPRESS_RESTORE_ASK_USER_QUESTION_META_KEY,
|
|
249
251
|
DAEMON_SUPPRESS_WORKTREE_CONTEXT_RESTORE_META_KEY,
|
|
250
252
|
LOAD_REPLAY_BULK_MODE,
|
|
@@ -260,23 +262,24 @@ import {
|
|
|
260
262
|
REQUESTED_SESSION_ID_META_KEY,
|
|
261
263
|
SESSION_INITIALIZATION_DEADLINE_META_KEY,
|
|
262
264
|
SESSION_INITIALIZATION_TIMEOUT_ERROR_KIND,
|
|
265
|
+
SUBMITTED_PROMPT_META_KEY,
|
|
263
266
|
TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD,
|
|
264
267
|
TODO_STOP_GUARD_QUEUE_RELEASE_METHOD,
|
|
265
268
|
WORKTREE_MCP_DEFER_META_KEY,
|
|
266
269
|
clampActiveWorkIntervalMs,
|
|
267
270
|
isValidTrustedModelPrompt
|
|
268
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-YKK2XXHF.js";
|
|
269
272
|
import {
|
|
270
273
|
NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
|
|
271
274
|
isNotCurrentlyGeneratingCancelError
|
|
272
275
|
} from "./chunk-FAWTMDX7.js";
|
|
273
|
-
import "./chunk-6PLDPT2C.js";
|
|
274
276
|
import "./chunk-FYJ7W2PI.js";
|
|
275
277
|
import "./chunk-STUJ7IMZ.js";
|
|
276
|
-
import "./chunk-
|
|
278
|
+
import "./chunk-LEGNDA46.js";
|
|
279
|
+
import "./chunk-GDWE23OR.js";
|
|
277
280
|
import "./chunk-GYTKQYDB.js";
|
|
278
|
-
import "./chunk-ALMR3E6Q.js";
|
|
279
281
|
import "./chunk-RKFGE7JH.js";
|
|
282
|
+
import "./chunk-CJ3DHN5I.js";
|
|
280
283
|
import "./chunk-UDG5EZJI.js";
|
|
281
284
|
import "./chunk-M5GB774H.js";
|
|
282
285
|
import {
|
|
@@ -288,21 +291,21 @@ import {
|
|
|
288
291
|
SHELL_EXECUTING_TOOL_NAMES,
|
|
289
292
|
isValidExternalToolGuardDenialReason
|
|
290
293
|
} from "./chunk-3VUENPWF.js";
|
|
294
|
+
import "./chunk-NFXXBWSE.js";
|
|
295
|
+
import "./chunk-6NONRGYX.js";
|
|
291
296
|
import {
|
|
292
297
|
ACP_EVENT_LOOP_STALL_RESTART_MS,
|
|
293
298
|
CHANNEL_PROMPT_META_KEY
|
|
294
|
-
} from "./chunk-
|
|
299
|
+
} from "./chunk-C4NLHK7X.js";
|
|
295
300
|
import {
|
|
296
301
|
AgentSideConnection,
|
|
297
302
|
PROTOCOL_VERSION,
|
|
298
303
|
RequestError
|
|
299
|
-
} from "./chunk-
|
|
300
|
-
import "./chunk-5HBA2Z7V.js";
|
|
301
|
-
import "./chunk-X35VIWWJ.js";
|
|
304
|
+
} from "./chunk-IJOS26LH.js";
|
|
302
305
|
import {
|
|
303
306
|
assembleMcpServers,
|
|
304
307
|
loadMcpApprovals
|
|
305
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-GP47UR3M.js";
|
|
306
309
|
import {
|
|
307
310
|
deleteNestedPropertySafe,
|
|
308
311
|
getOutputLanguageFilePath,
|
|
@@ -314,10 +317,21 @@ import {
|
|
|
314
317
|
settingExistsInScope,
|
|
315
318
|
updateOutputLanguageFile,
|
|
316
319
|
writeOutputLanguageAndRegisterPath
|
|
317
|
-
} from "./chunk-
|
|
318
|
-
import "./chunk-MWEF5MUK.js";
|
|
320
|
+
} from "./chunk-OOLSYRZ7.js";
|
|
319
321
|
import "./chunk-RKUWKYED.js";
|
|
322
|
+
import "./chunk-IOUBOANU.js";
|
|
323
|
+
import {
|
|
324
|
+
findEnvFiles,
|
|
325
|
+
preResolveHomeEnvOverrides,
|
|
326
|
+
reloadEnvironment
|
|
327
|
+
} from "./chunk-YIU5PEAT.js";
|
|
328
|
+
import "./chunk-N6VQ37ZZ.js";
|
|
320
329
|
import "./chunk-BW4333PP.js";
|
|
330
|
+
import {
|
|
331
|
+
ENV_ACP_REPEATED_TOOL_FAILURE_GUARD,
|
|
332
|
+
QWEN_CODE_SERVE_ENV
|
|
333
|
+
} from "./chunk-VX63RJXE.js";
|
|
334
|
+
import "./chunk-6PLDPT2C.js";
|
|
321
335
|
import {
|
|
322
336
|
getSystemDefaultsPath,
|
|
323
337
|
getSystemSettingsPath
|
|
@@ -325,94 +339,88 @@ import {
|
|
|
325
339
|
import {
|
|
326
340
|
getCurrentLanguage,
|
|
327
341
|
setLanguageAsync
|
|
328
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-74JEYK2C.js";
|
|
329
343
|
import {
|
|
330
344
|
SUPPORTED_LANGUAGES
|
|
331
345
|
} from "./chunk-5EJZE3FP.js";
|
|
332
|
-
import
|
|
333
|
-
findEnvFiles,
|
|
334
|
-
preResolveHomeEnvOverrides,
|
|
335
|
-
reloadEnvironment
|
|
336
|
-
} from "./chunk-Y6ZWXM44.js";
|
|
337
|
-
import {
|
|
338
|
-
ENV_ACP_REPEATED_TOOL_FAILURE_GUARD,
|
|
339
|
-
QWEN_CODE_SERVE_ENV
|
|
340
|
-
} from "./chunk-QTNCGZHQ.js";
|
|
346
|
+
import "./chunk-XFSFZCM5.js";
|
|
341
347
|
import "./chunk-2EAZ43JQ.js";
|
|
342
348
|
import "./chunk-NF5J2WFA.js";
|
|
343
|
-
import "./chunk-
|
|
349
|
+
import "./chunk-ONGZNOIP.js";
|
|
344
350
|
import "./chunk-W3N5XAZ6.js";
|
|
345
351
|
import {
|
|
346
352
|
isWorkspaceTrusted,
|
|
347
353
|
loadTrustedFolders
|
|
348
|
-
} from "./chunk-
|
|
354
|
+
} from "./chunk-KHIBLKNK.js";
|
|
349
355
|
import "./chunk-NPQ5ZKRP.js";
|
|
350
356
|
import "./chunk-MR3PXB6E.js";
|
|
351
357
|
import {
|
|
352
|
-
ALL_PROVIDERS,
|
|
353
358
|
BTW_MAX_INPUT_LENGTH,
|
|
359
|
+
DroppedNotificationTally,
|
|
354
360
|
IMAGE_CAPABILITY,
|
|
355
361
|
LoopTickResolver,
|
|
362
|
+
MAX_BACKGROUND_NOTIFICATION_QUEUE,
|
|
356
363
|
McpTransportPool,
|
|
357
364
|
TURN_INTERRUPTION_HISTORY_TAIL_COUNT,
|
|
358
365
|
WorkspaceMcpBudget,
|
|
366
|
+
abortGoalForStopHookCap,
|
|
359
367
|
applyProviderInstallPlan,
|
|
360
368
|
buildBtwCacheSafeParams,
|
|
361
369
|
buildBtwPrompt,
|
|
362
370
|
buildGoalContinuationParts,
|
|
363
|
-
buildInstallPlan,
|
|
364
371
|
buildSessionRecoveryPlanFromApiHistory,
|
|
365
372
|
countApiUserPrompts,
|
|
373
|
+
decideNotificationAdmission,
|
|
366
374
|
detectAutonomousSentinel,
|
|
367
375
|
detectLoopSentinel,
|
|
368
376
|
findApiRewindCutPoint,
|
|
369
|
-
findExistingProviderModels,
|
|
370
|
-
findProviderById,
|
|
371
377
|
generatePromptSuggestion,
|
|
372
378
|
generateSessionRecap,
|
|
373
|
-
|
|
374
|
-
getDefaultModelIds,
|
|
379
|
+
getStopHookContinuationReason,
|
|
375
380
|
projectGoalStateToLegacy,
|
|
376
381
|
readManyFiles,
|
|
377
|
-
resolveBaseUrl,
|
|
378
382
|
runManagedRememberByAgent,
|
|
379
383
|
subagentGenerator
|
|
380
|
-
} from "./chunk-
|
|
384
|
+
} from "./chunk-F2RKL5I2.js";
|
|
381
385
|
import {
|
|
382
386
|
buildToolWriteOriginMeta
|
|
383
387
|
} from "./chunk-GELRJXE2.js";
|
|
384
388
|
import "./chunk-32CM56LO.js";
|
|
385
389
|
import {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
} from "./chunk-
|
|
394
|
-
import "./chunk-XFSFZCM5.js";
|
|
390
|
+
ALL_PROVIDERS,
|
|
391
|
+
buildInstallPlan,
|
|
392
|
+
findExistingProviderModels,
|
|
393
|
+
findProviderById,
|
|
394
|
+
getDefaultBaseUrlForProtocol,
|
|
395
|
+
getDefaultModelIds,
|
|
396
|
+
resolveBaseUrl
|
|
397
|
+
} from "./chunk-AEY27Z35.js";
|
|
395
398
|
import {
|
|
396
399
|
CreateSubSessionTool
|
|
397
|
-
} from "./chunk-
|
|
400
|
+
} from "./chunk-Y2MYW47X.js";
|
|
398
401
|
import "./chunk-LJZSMWOH.js";
|
|
402
|
+
import "./chunk-TP2DUOB6.js";
|
|
403
|
+
import "./chunk-NUQVB25K.js";
|
|
399
404
|
import {
|
|
400
405
|
restoreWorktreeContext
|
|
401
|
-
} from "./chunk-
|
|
402
|
-
import "./chunk-
|
|
406
|
+
} from "./chunk-ZKZHSB5W.js";
|
|
407
|
+
import "./chunk-L2KF7HUE.js";
|
|
403
408
|
import "./chunk-DJXSOEFB.js";
|
|
404
|
-
import "./chunk-
|
|
405
|
-
import "./chunk-
|
|
406
|
-
import "./chunk-OWCFKIFQ.js";
|
|
407
|
-
import "./chunk-ZPJWUGCS.js";
|
|
408
|
-
import "./chunk-5Z4FCEPY.js";
|
|
409
|
+
import "./chunk-ZKYR7QS4.js";
|
|
410
|
+
import "./chunk-532WHF4F.js";
|
|
409
411
|
import "./chunk-BUQN5LTI.js";
|
|
412
|
+
import "./chunk-ZPJWUGCS.js";
|
|
413
|
+
import "./chunk-LK2WUCDQ.js";
|
|
410
414
|
import {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
415
|
+
MAX_RETAINED_SNAPSHOTS,
|
|
416
|
+
deleteWorkflowSnapshot,
|
|
417
|
+
extractAndStripMeta,
|
|
418
|
+
listSavedWorkflows,
|
|
419
|
+
listWorkflowSnapshots,
|
|
420
|
+
resolveSavedWorkflowScript,
|
|
421
|
+
toSnapshot
|
|
422
|
+
} from "./chunk-5FKZ7KFQ.js";
|
|
423
|
+
import "./chunk-FRVV5SSD.js";
|
|
416
424
|
import {
|
|
417
425
|
APPROVAL_MODE_INFO,
|
|
418
426
|
BranchPointInvalidError,
|
|
@@ -454,10 +462,10 @@ import {
|
|
|
454
462
|
SessionWriterUnavailableError,
|
|
455
463
|
TURN_RESULT_CODE_TEXT_TRUNCATED,
|
|
456
464
|
TURN_RESULT_TEXT_MAX_CHARS,
|
|
457
|
-
abortGoalForStopHookCap,
|
|
458
465
|
acquireSleepInhibitor,
|
|
459
466
|
ambientGoalToolResultProvenance,
|
|
460
467
|
applyAutoModeDecision,
|
|
468
|
+
applyPendingGoalProposal,
|
|
461
469
|
approxBase64Bytes,
|
|
462
470
|
bridgeToolResultImages,
|
|
463
471
|
buildBackgroundEntryLabel,
|
|
@@ -489,9 +497,10 @@ import {
|
|
|
489
497
|
firePostToolUseHook,
|
|
490
498
|
firePreToolUseHook,
|
|
491
499
|
formatDenialStateLog,
|
|
500
|
+
formatProposeGoalRecoveryFailed,
|
|
501
|
+
formatProposeGoalRecoveryNotStarted,
|
|
492
502
|
formatStopHookBlockingCapWarning,
|
|
493
503
|
generateToolUseId,
|
|
494
|
-
getActiveGoal,
|
|
495
504
|
getAutoModeActionFingerprint,
|
|
496
505
|
getAutoModePermissionDeniedReason,
|
|
497
506
|
getEffectivePermissionForConfirmation,
|
|
@@ -500,7 +509,6 @@ import {
|
|
|
500
509
|
getOptInToolNotFoundMessage,
|
|
501
510
|
getProviderToolCallId,
|
|
502
511
|
getScopedEnvContents,
|
|
503
|
-
getStopHookContinuationReason,
|
|
504
512
|
getSubagentSessionDir,
|
|
505
513
|
getToolCallRepeatKey,
|
|
506
514
|
getWorkflowTaskMutationKey,
|
|
@@ -551,49 +559,37 @@ import {
|
|
|
551
559
|
updateSetting,
|
|
552
560
|
validatePlanModeShellApproval,
|
|
553
561
|
validatePlanModeShellContext
|
|
554
|
-
} from "./chunk-
|
|
562
|
+
} from "./chunk-JV5YASQA.js";
|
|
555
563
|
import "./chunk-GOFAQQZA.js";
|
|
556
|
-
import "./chunk-65I7S4Z3.js";
|
|
557
|
-
import "./chunk-6HUXPLB5.js";
|
|
558
564
|
import "./chunk-TWPJO254.js";
|
|
559
565
|
import {
|
|
560
566
|
external_exports
|
|
561
567
|
} from "./chunk-CQ35AJ4Z.js";
|
|
562
|
-
import "./chunk-
|
|
563
|
-
import "./chunk-
|
|
564
|
-
import "./chunk-
|
|
565
|
-
import "./chunk-
|
|
566
|
-
import {
|
|
567
|
-
parsePositiveIntegerEnv
|
|
568
|
-
} from "./chunk-6PVPNMXU.js";
|
|
568
|
+
import "./chunk-65I7S4Z3.js";
|
|
569
|
+
import "./chunk-6HUXPLB5.js";
|
|
570
|
+
import "./chunk-7CLLH5TI.js";
|
|
571
|
+
import "./chunk-XKBFYTCD.js";
|
|
569
572
|
import {
|
|
570
573
|
RUNTIME_SNAPSHOT_PREFIX
|
|
571
|
-
} from "./chunk-
|
|
574
|
+
} from "./chunk-ZTTC7T4X.js";
|
|
572
575
|
import {
|
|
573
576
|
SESSION_ARTIFACT_PERSISTENCE_VERSION,
|
|
574
577
|
normalizeEventPayload,
|
|
575
578
|
normalizeSnapshotPayload,
|
|
576
579
|
wrapUserPromptSubmitContext
|
|
577
|
-
} from "./chunk-
|
|
580
|
+
} from "./chunk-E4UEO3XM.js";
|
|
581
|
+
import "./chunk-IAEXTMED.js";
|
|
578
582
|
import "./chunk-IRH27ZC2.js";
|
|
579
583
|
import "./chunk-QHWCP53L.js";
|
|
580
584
|
import "./chunk-F53KKZUD.js";
|
|
581
|
-
import "./chunk-TRWQQBVH.js";
|
|
582
|
-
import "./chunk-QJNDUTOL.js";
|
|
583
|
-
import "./chunk-N6S3NUYJ.js";
|
|
584
585
|
import {
|
|
585
586
|
promptIdContext,
|
|
586
587
|
todoWorkChainContext
|
|
587
588
|
} from "./chunk-O6GEWCJA.js";
|
|
589
|
+
import "./chunk-36HCNKDS.js";
|
|
588
590
|
import {
|
|
589
|
-
|
|
590
|
-
} from "./chunk-
|
|
591
|
-
import "./chunk-QAZ2MGYT.js";
|
|
592
|
-
import "./chunk-B44JBZBB.js";
|
|
593
|
-
import "./chunk-BF3RUIVP.js";
|
|
594
|
-
import {
|
|
595
|
-
APPROVAL_MODES
|
|
596
|
-
} from "./chunk-JX6XHPTX.js";
|
|
591
|
+
parsePositiveIntegerEnv
|
|
592
|
+
} from "./chunk-6PVPNMXU.js";
|
|
597
593
|
import {
|
|
598
594
|
AgentOutputMessageCapture,
|
|
599
595
|
addAgentInputMessageAttributes,
|
|
@@ -601,42 +597,76 @@ import {
|
|
|
601
597
|
addToolCallResultAttributes,
|
|
602
598
|
registerAcpEventLoopLagGauge,
|
|
603
599
|
startEventLoopLagMonitor
|
|
604
|
-
} from "./chunk-
|
|
600
|
+
} from "./chunk-2SZH22YO.js";
|
|
601
|
+
import "./chunk-DTNV6UZY.js";
|
|
602
|
+
import "./chunk-QJNDUTOL.js";
|
|
603
|
+
import "./chunk-JXNIF2O5.js";
|
|
604
|
+
import "./chunk-CGKEUUYG.js";
|
|
605
|
+
import {
|
|
606
|
+
SessionSourceError,
|
|
607
|
+
SessionSourceService
|
|
608
|
+
} from "./chunk-ELRMZTPF.js";
|
|
609
|
+
import {
|
|
610
|
+
escapeJsonTagCharacters
|
|
611
|
+
} from "./chunk-CHEIIBT3.js";
|
|
612
|
+
import "./chunk-PLLIWEM3.js";
|
|
613
|
+
import {
|
|
614
|
+
registerSession
|
|
615
|
+
} from "./chunk-5GLDOLNQ.js";
|
|
616
|
+
import "./chunk-CH2YDT6X.js";
|
|
617
|
+
import {
|
|
618
|
+
APPROVAL_MODES
|
|
619
|
+
} from "./chunk-JX6XHPTX.js";
|
|
605
620
|
import "./chunk-ZSTCM3MX.js";
|
|
606
|
-
import "./chunk-SOA4HKRJ.js";
|
|
607
621
|
import "./chunk-MLXTMF7H.js";
|
|
608
622
|
import {
|
|
609
623
|
getArenaSystemReminder,
|
|
610
624
|
getOutputStyleTurnReminder,
|
|
611
625
|
getPlanModeSystemReminder,
|
|
612
626
|
resolveMainSessionOutputStyle
|
|
613
|
-
} from "./chunk-
|
|
627
|
+
} from "./chunk-LILGKQ4B.js";
|
|
614
628
|
import "./chunk-3CZ2BQV6.js";
|
|
615
|
-
import "./chunk-
|
|
616
|
-
import "./chunk-
|
|
629
|
+
import "./chunk-SAH4BD2J.js";
|
|
630
|
+
import "./chunk-CAAMI77K.js";
|
|
617
631
|
import {
|
|
618
632
|
runWithRuntimeContentGenerator
|
|
619
|
-
} from "./chunk-
|
|
633
|
+
} from "./chunk-U7O65WKL.js";
|
|
620
634
|
import "./chunk-S6LOFUVP.js";
|
|
635
|
+
import {
|
|
636
|
+
FORK_SUBAGENT_TYPE,
|
|
637
|
+
isSystemReminderContent,
|
|
638
|
+
wrapSystemReminder
|
|
639
|
+
} from "./chunk-FN3JNDRU.js";
|
|
640
|
+
import "./chunk-EUURTIV6.js";
|
|
641
|
+
import {
|
|
642
|
+
HookEventName,
|
|
643
|
+
createHookOutput
|
|
644
|
+
} from "./chunk-G6UUOCUT.js";
|
|
645
|
+
import "./chunk-IZ2U57NY.js";
|
|
646
|
+
import "./chunk-NUQ4GK5I.js";
|
|
647
|
+
import "./chunk-K2OJUPOE.js";
|
|
648
|
+
import {
|
|
649
|
+
clearCachedCredentialFile,
|
|
650
|
+
qwenOAuth2Events
|
|
651
|
+
} from "./chunk-B6BDT4RX.js";
|
|
621
652
|
import "./chunk-NAVJD2PQ.js";
|
|
622
|
-
import "./chunk-
|
|
623
|
-
import "./chunk-
|
|
653
|
+
import "./chunk-ZGQIIGNQ.js";
|
|
654
|
+
import "./chunk-ZHECLGA6.js";
|
|
624
655
|
import "./chunk-QHMLYMMS.js";
|
|
656
|
+
import "./chunk-VNOVK4I7.js";
|
|
625
657
|
import {
|
|
626
658
|
getToolCallPreparations
|
|
627
659
|
} from "./chunk-CFKIH3D3.js";
|
|
628
|
-
import
|
|
629
|
-
REASONING_EFFORT_TIERS
|
|
630
|
-
} from "./chunk-6YEOCHSE.js";
|
|
660
|
+
import "./chunk-JL6APGBX.js";
|
|
631
661
|
import "./chunk-DJ2GSRLV.js";
|
|
632
|
-
import "./chunk-
|
|
633
|
-
import "./chunk-
|
|
662
|
+
import "./chunk-L3DTX6U4.js";
|
|
663
|
+
import "./chunk-C75BXMPM.js";
|
|
634
664
|
import "./chunk-KFFCDLKV.js";
|
|
635
665
|
import {
|
|
636
666
|
addDaemonRequestAttribute,
|
|
637
667
|
extractDaemonTraceContext,
|
|
638
668
|
withDaemonSpan
|
|
639
|
-
} from "./chunk-
|
|
669
|
+
} from "./chunk-ZW2EUO2A.js";
|
|
640
670
|
import {
|
|
641
671
|
ConversationFinishedEvent,
|
|
642
672
|
DiscoveredMCPTool,
|
|
@@ -662,7 +692,7 @@ import {
|
|
|
662
692
|
shouldRunVisionBridge,
|
|
663
693
|
splitImageParts,
|
|
664
694
|
uiTelemetryService
|
|
665
|
-
} from "./chunk-
|
|
695
|
+
} from "./chunk-34ZYDM3F.js";
|
|
666
696
|
import {
|
|
667
697
|
INVOCATION_CONTEXT_META_KEY,
|
|
668
698
|
PRIVATE_ACP_CAPABILITY_ENV,
|
|
@@ -671,18 +701,23 @@ import {
|
|
|
671
701
|
parseInvocationContext,
|
|
672
702
|
runWithInvocationContext
|
|
673
703
|
} from "./chunk-5ETULJLP.js";
|
|
674
|
-
import "./chunk-
|
|
704
|
+
import "./chunk-ZHKTKHMO.js";
|
|
675
705
|
import "./chunk-VGC4I5JJ.js";
|
|
676
|
-
import {
|
|
677
|
-
getAllMemoryFilenames,
|
|
678
|
-
getSpecificMimeType
|
|
679
|
-
} from "./chunk-J6MB5ZHZ.js";
|
|
680
706
|
import {
|
|
681
707
|
getAutoMemoryRoot,
|
|
682
708
|
getUserAutoMemoryRoot
|
|
683
709
|
} from "./chunk-EDIDYZBT.js";
|
|
684
710
|
import "./chunk-HD7O6WLV.js";
|
|
711
|
+
import {
|
|
712
|
+
getAllMemoryFilenames,
|
|
713
|
+
getSpecificMimeType
|
|
714
|
+
} from "./chunk-J6MB5ZHZ.js";
|
|
685
715
|
import "./chunk-WZAD4ZNJ.js";
|
|
716
|
+
import {
|
|
717
|
+
REASONING_EFFORT_TIERS,
|
|
718
|
+
getGptReasoningCapabilities,
|
|
719
|
+
parseModelReasoningCapabilities
|
|
720
|
+
} from "./chunk-3FPYT6QC.js";
|
|
686
721
|
import {
|
|
687
722
|
DEFAULT_TOKEN_LIMIT,
|
|
688
723
|
tokenLimit
|
|
@@ -691,11 +726,12 @@ import "./chunk-TIGXX4PA.js";
|
|
|
691
726
|
import {
|
|
692
727
|
hasVertexProjectConfigured,
|
|
693
728
|
preloadContentGenerator
|
|
694
|
-
} from "./chunk-
|
|
729
|
+
} from "./chunk-RJZTX2OF.js";
|
|
695
730
|
import "./chunk-XFFRI3WM.js";
|
|
696
731
|
import {
|
|
697
732
|
AuthType
|
|
698
|
-
} from "./chunk-
|
|
733
|
+
} from "./chunk-ERU3SDXT.js";
|
|
734
|
+
import "./chunk-EWJTAP3Y.js";
|
|
699
735
|
import "./chunk-HHJLM3WQ.js";
|
|
700
736
|
import {
|
|
701
737
|
endToolExecutionSpan,
|
|
@@ -707,20 +743,9 @@ import {
|
|
|
707
743
|
startToolExecutionSpan,
|
|
708
744
|
startToolSpan,
|
|
709
745
|
withInteractionSpan
|
|
710
|
-
} from "./chunk-
|
|
746
|
+
} from "./chunk-W5ZQMAEM.js";
|
|
711
747
|
import "./chunk-74TONY4F.js";
|
|
712
|
-
import "./chunk-
|
|
713
|
-
import {
|
|
714
|
-
FORK_SUBAGENT_TYPE,
|
|
715
|
-
isSystemReminderContent,
|
|
716
|
-
wrapSystemReminder
|
|
717
|
-
} from "./chunk-4VY3ITHR.js";
|
|
718
|
-
import "./chunk-O2FEO2CB.js";
|
|
719
|
-
import {
|
|
720
|
-
HookEventName,
|
|
721
|
-
createHookOutput
|
|
722
|
-
} from "./chunk-G6UUOCUT.js";
|
|
723
|
-
import "./chunk-IZ2U57NY.js";
|
|
748
|
+
import "./chunk-HUXPEUFL.js";
|
|
724
749
|
import {
|
|
725
750
|
BaseDeclarativeTool,
|
|
726
751
|
BaseToolInvocation,
|
|
@@ -728,7 +753,7 @@ import {
|
|
|
728
753
|
ToolNames,
|
|
729
754
|
canonicalToolName,
|
|
730
755
|
isShellProgressData
|
|
731
|
-
} from "./chunk-
|
|
756
|
+
} from "./chunk-TP6FYVQT.js";
|
|
732
757
|
import {
|
|
733
758
|
Storage,
|
|
734
759
|
createDebugLogger,
|
|
@@ -737,20 +762,23 @@ import {
|
|
|
737
762
|
isSubpath,
|
|
738
763
|
sessionIdContext
|
|
739
764
|
} from "./chunk-ZAFYHRVY.js";
|
|
740
|
-
import "./chunk-
|
|
741
|
-
import "./chunk-
|
|
765
|
+
import "./chunk-TBWQLLFO.js";
|
|
766
|
+
import "./chunk-V5U2NZNJ.js";
|
|
767
|
+
import "./chunk-DMX7RF6E.js";
|
|
768
|
+
import "./chunk-TPKQIA7G.js";
|
|
742
769
|
import {
|
|
770
|
+
registerCleanup,
|
|
743
771
|
runExitCleanup
|
|
744
|
-
} from "./chunk-
|
|
772
|
+
} from "./chunk-JDEW3V5B.js";
|
|
745
773
|
import {
|
|
746
774
|
writeStderrLine,
|
|
747
775
|
writeStderrLineSafe
|
|
748
776
|
} from "./chunk-7FA2II6K.js";
|
|
777
|
+
import "./chunk-UKMWZ5NS.js";
|
|
749
778
|
import "./chunk-75DOP5OR.js";
|
|
750
779
|
import "./chunk-DMTGGOSA.js";
|
|
751
780
|
import "./chunk-YQ3U5MUC.js";
|
|
752
781
|
import "./chunk-MATEIJZF.js";
|
|
753
|
-
import "./chunk-TBWQLLFO.js";
|
|
754
782
|
import {
|
|
755
783
|
init_esbuild_shims
|
|
756
784
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -776,6 +804,15 @@ function buildAuthMethods() {
|
|
|
776
804
|
type: "terminal",
|
|
777
805
|
args: ["--auth-type=openai"]
|
|
778
806
|
}
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
id: "openai-responses" /* USE_OPENAI_RESPONSES */,
|
|
810
|
+
name: "Use OpenAI Responses API key",
|
|
811
|
+
description: "Requires setting the `OPENAI_API_KEY` environment variable",
|
|
812
|
+
_meta: {
|
|
813
|
+
type: "terminal",
|
|
814
|
+
args: ["--auth-type=openai-responses"]
|
|
815
|
+
}
|
|
779
816
|
}
|
|
780
817
|
];
|
|
781
818
|
}
|
|
@@ -1784,7 +1821,6 @@ var MessageEmitter = class extends BaseEmitter {
|
|
|
1784
1821
|
* @param stopHookCount - Number of Stop hooks that were executed
|
|
1785
1822
|
*/
|
|
1786
1823
|
async emitStopHookLoop(iterationCount, reasons, stopHookCount) {
|
|
1787
|
-
const activeGoal = getActiveGoal(this.sessionId);
|
|
1788
1824
|
await this.sendUpdate({
|
|
1789
1825
|
sessionUpdate: "agent_message_chunk",
|
|
1790
1826
|
content: { type: "text", text: "" },
|
|
@@ -1792,15 +1828,7 @@ var MessageEmitter = class extends BaseEmitter {
|
|
|
1792
1828
|
stopHookLoop: {
|
|
1793
1829
|
iterationCount,
|
|
1794
1830
|
reasons,
|
|
1795
|
-
stopHookCount
|
|
1796
|
-
...activeGoal ? {
|
|
1797
|
-
goal: {
|
|
1798
|
-
condition: activeGoal.condition,
|
|
1799
|
-
iterations: activeGoal.iterations,
|
|
1800
|
-
setAt: activeGoal.setAt,
|
|
1801
|
-
lastReason: activeGoal.lastReason
|
|
1802
|
-
}
|
|
1803
|
-
} : {}
|
|
1831
|
+
stopHookCount
|
|
1804
1832
|
}
|
|
1805
1833
|
}
|
|
1806
1834
|
});
|
|
@@ -2131,6 +2159,12 @@ function buildPermissionRequestContent(confirmation) {
|
|
|
2131
2159
|
}
|
|
2132
2160
|
});
|
|
2133
2161
|
}
|
|
2162
|
+
if (confirmation.type === "info" && confirmation.renderPromptAsPlainText) {
|
|
2163
|
+
content.push({
|
|
2164
|
+
type: "content",
|
|
2165
|
+
content: { type: "text", text: confirmation.prompt }
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2134
2168
|
return content;
|
|
2135
2169
|
}
|
|
2136
2170
|
__name(buildPermissionRequestContent, "buildPermissionRequestContent");
|
|
@@ -3266,6 +3300,7 @@ var MAX_RETAINED_SESSION_ROUTE_COUNTS = 8;
|
|
|
3266
3300
|
var USER_CANCEL_ABORT_REASON = "qwen:user-cancel";
|
|
3267
3301
|
var NEW_PROMPT_ABORT_REASON = "qwen:new-prompt";
|
|
3268
3302
|
var SESSION_DISPOSE_ABORT_REASON = "qwen:session-dispose";
|
|
3303
|
+
var GOAL_HELD_RECOVERY_COMMANDS = "Run:\n/goal pause\nThen, when ready:\n/goal resume";
|
|
3269
3304
|
var DAEMON_RETRY_META_KEY = "qwen.daemon.retry";
|
|
3270
3305
|
var DAEMON_CONTINUE_META_KEY = "qwen.daemon.continueLastTurn";
|
|
3271
3306
|
var MAX_DAEMON_ATTACHMENT_REFERENCES = 256;
|
|
@@ -3834,6 +3869,15 @@ var TodoStopGuardClaimTimeoutError = class extends Error {
|
|
|
3834
3869
|
);
|
|
3835
3870
|
}
|
|
3836
3871
|
};
|
|
3872
|
+
function toAdmissibleNotification(item) {
|
|
3873
|
+
return {
|
|
3874
|
+
kind: item.kind,
|
|
3875
|
+
taskId: item.taskId,
|
|
3876
|
+
interim: item.kind === "monitor" && item.status === "running",
|
|
3877
|
+
persisted: item.persisted
|
|
3878
|
+
};
|
|
3879
|
+
}
|
|
3880
|
+
__name(toAdmissibleNotification, "toAdmissibleNotification");
|
|
3837
3881
|
function beginChannelDeliveryResponseBlock(capture) {
|
|
3838
3882
|
capture?.agentOutput.beginResponse();
|
|
3839
3883
|
if (capture?.channelDelivery) capture.channelDelivery.finalText = "";
|
|
@@ -3895,7 +3939,6 @@ function parsePromptChannelDelivery(params) {
|
|
|
3895
3939
|
};
|
|
3896
3940
|
}
|
|
3897
3941
|
__name(parsePromptChannelDelivery, "parsePromptChannelDelivery");
|
|
3898
|
-
var MAX_NOTIFICATION_QUEUE = 20;
|
|
3899
3942
|
var MAX_DEFERRED_UNRELATED_CRON_QUEUE = 20;
|
|
3900
3943
|
function resolveExistingFile(resolved, resolveRealPath2 = realpathSync2, statFile = statSync2) {
|
|
3901
3944
|
try {
|
|
@@ -4152,6 +4195,7 @@ var Session = class {
|
|
|
4152
4195
|
__name(this, "Session");
|
|
4153
4196
|
}
|
|
4154
4197
|
pendingPrompt = null;
|
|
4198
|
+
activeGoalProposalTurn;
|
|
4155
4199
|
/**
|
|
4156
4200
|
* Tracks the completion of the current prompt so that the next prompt
|
|
4157
4201
|
* can await it. This prevents a new prompt from reading chat history
|
|
@@ -4230,6 +4274,12 @@ var Session = class {
|
|
|
4230
4274
|
// Background notification drain state. ACP does not have the TUI's idle
|
|
4231
4275
|
// hook, so the session serializes registry callbacks through this queue.
|
|
4232
4276
|
notificationQueue = [];
|
|
4277
|
+
/**
|
|
4278
|
+
* Notifications lost to queue overflow since the last drain. Reported as one
|
|
4279
|
+
* summary on the next notification turn rather than per loss, so an overflow
|
|
4280
|
+
* burst cannot itself flood the session.
|
|
4281
|
+
*/
|
|
4282
|
+
droppedNotifications = new DroppedNotificationTally();
|
|
4233
4283
|
notificationProcessing = false;
|
|
4234
4284
|
notificationAbortController = null;
|
|
4235
4285
|
notificationCompletion = null;
|
|
@@ -4240,6 +4290,7 @@ var Session = class {
|
|
|
4240
4290
|
backgroundNotificationAcceptances = /* @__PURE__ */ new Map();
|
|
4241
4291
|
activeNotificationAcceptances = /* @__PURE__ */ new Set();
|
|
4242
4292
|
goalQueue = [];
|
|
4293
|
+
heldGoalProposal;
|
|
4243
4294
|
goalProcessing = false;
|
|
4244
4295
|
activeGoalTurn;
|
|
4245
4296
|
goalHostUnbind;
|
|
@@ -4349,6 +4400,9 @@ var Session = class {
|
|
|
4349
4400
|
this.goalRuntimeUnsubscribe = runtime.subscribe((snapshot, cause) => {
|
|
4350
4401
|
const previousGoal = this.lastGoalSnapshot?.goal ?? null;
|
|
4351
4402
|
this.lastGoalSnapshot = snapshot;
|
|
4403
|
+
if (this.heldGoalProposal && (snapshot.goal?.goalId !== this.heldGoalProposal.goalId || snapshot.goal.revision !== this.heldGoalProposal.revision || snapshot.goal.status !== "active" || cause === "resume")) {
|
|
4404
|
+
this.heldGoalProposal = void 0;
|
|
4405
|
+
}
|
|
4352
4406
|
void this.#queueGoalState(snapshot, cause, previousGoal).catch(
|
|
4353
4407
|
(error) => debugLogger6.warn(
|
|
4354
4408
|
`Failed to emit ACP Goal state: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -4358,19 +4412,17 @@ var Session = class {
|
|
|
4358
4412
|
const host = {
|
|
4359
4413
|
startGoalTurn: /* @__PURE__ */ __name(async (input) => {
|
|
4360
4414
|
if (this.goalQueue.some(
|
|
4361
|
-
({ permit }) =>
|
|
4415
|
+
({ permit: permit2 }) => permit2.turnId === input.permit.turnId
|
|
4362
4416
|
) || this.activeGoalTurn?.permit.turnId === input.permit.turnId) {
|
|
4363
4417
|
return;
|
|
4364
4418
|
}
|
|
4419
|
+
const { permit, ...continuation } = input;
|
|
4365
4420
|
this.goalQueue.push({
|
|
4366
|
-
permit: { ...
|
|
4367
|
-
turnKey: `goal-runtime:${
|
|
4421
|
+
permit: { ...permit },
|
|
4422
|
+
turnKey: `goal-runtime:${permit.turnId}`,
|
|
4368
4423
|
controller: new AbortController(),
|
|
4369
4424
|
origin: "runtime",
|
|
4370
|
-
|
|
4371
|
-
...input.objectiveUpdated ? { objectiveUpdated: input.objectiveUpdated } : {},
|
|
4372
|
-
...input.windDown ? { windDown: true } : {},
|
|
4373
|
-
...input.verifierFeedback ? { verifierFeedback: input.verifierFeedback } : {},
|
|
4425
|
+
...continuation,
|
|
4374
4426
|
modelStarted: false
|
|
4375
4427
|
});
|
|
4376
4428
|
void this.#drainGoalQueue();
|
|
@@ -4536,6 +4588,10 @@ var Session = class {
|
|
|
4536
4588
|
if (this.disposed || this.closing || this.goalProcessing || this.pendingPrompt || this.pendingPromptCompletion || this.cronProcessing || this.cronAbortController || this.notificationProcessing || this.notificationAbortController || this.#isAutomaticWorkHeld()) {
|
|
4537
4589
|
return;
|
|
4538
4590
|
}
|
|
4591
|
+
const next = this.goalQueue[0];
|
|
4592
|
+
if (this.heldGoalProposal && next?.permit.goalId === this.heldGoalProposal.goalId && next.permit.revision === this.heldGoalProposal.revision) {
|
|
4593
|
+
return;
|
|
4594
|
+
}
|
|
4539
4595
|
const turn = this.goalQueue.shift();
|
|
4540
4596
|
if (!turn) return;
|
|
4541
4597
|
this.goalProcessing = true;
|
|
@@ -5806,6 +5862,7 @@ var Session = class {
|
|
|
5806
5862
|
this.closeGateCompletion = null;
|
|
5807
5863
|
this.hardSuspendTodoStopGuard();
|
|
5808
5864
|
this.notificationQueue = [];
|
|
5865
|
+
this.droppedNotifications.clear();
|
|
5809
5866
|
this.cronQueue = [];
|
|
5810
5867
|
for (const turn of this.goalQueue.splice(0)) {
|
|
5811
5868
|
turn.controller.abort(SESSION_DISPOSE_ABORT_REASON);
|
|
@@ -6018,6 +6075,7 @@ var Session = class {
|
|
|
6018
6075
|
this.notificationAbortController = null;
|
|
6019
6076
|
}
|
|
6020
6077
|
this.notificationQueue = [];
|
|
6078
|
+
this.droppedNotifications.clear();
|
|
6021
6079
|
this.notificationProcessing = false;
|
|
6022
6080
|
const queuedGoalTurn = queuedGoalTurns[0];
|
|
6023
6081
|
if (queuedGoalTurn) {
|
|
@@ -6131,7 +6189,17 @@ var Session = class {
|
|
|
6131
6189
|
if (!goalTurn) {
|
|
6132
6190
|
try {
|
|
6133
6191
|
const runtime = this.config.getGoalRuntime();
|
|
6134
|
-
|
|
6192
|
+
const activeGoal = runtime.getSnapshot().goal;
|
|
6193
|
+
const heldGoalMatches = this.heldGoalProposal?.goalId === activeGoal?.goalId && this.heldGoalProposal?.revision === activeGoal?.revision;
|
|
6194
|
+
if (activeGoal?.status === "active" && heldGoalMatches) {
|
|
6195
|
+
for (const queued of this.goalQueue.splice(0)) {
|
|
6196
|
+
queued.controller.abort(NEW_PROMPT_ABORT_REASON);
|
|
6197
|
+
await runtime.releaseTurn(queued.turnKey, { requeue: false });
|
|
6198
|
+
}
|
|
6199
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6200
|
+
`Automatic Goal execution is still held. ${GOAL_HELD_RECOVERY_COMMANDS}`
|
|
6201
|
+
);
|
|
6202
|
+
} else if (activeGoal?.status === "active") {
|
|
6135
6203
|
reservedGoalRuntime = runtime;
|
|
6136
6204
|
reservedGoalTurnKey = `goal-user:${randomUUID()}`;
|
|
6137
6205
|
runtime.beginTurn(reservedGoalTurnKey);
|
|
@@ -6188,6 +6256,7 @@ var Session = class {
|
|
|
6188
6256
|
this.notificationAbortController.abort();
|
|
6189
6257
|
this.notificationAbortController = null;
|
|
6190
6258
|
this.notificationQueue = [];
|
|
6259
|
+
this.droppedNotifications.clear();
|
|
6191
6260
|
this.notificationProcessing = false;
|
|
6192
6261
|
}
|
|
6193
6262
|
if (this.notificationCompletion) {
|
|
@@ -6308,6 +6377,11 @@ var Session = class {
|
|
|
6308
6377
|
}
|
|
6309
6378
|
} : result;
|
|
6310
6379
|
promptResult = completedResult;
|
|
6380
|
+
const proposalTurn = responseCapture.goalProposalTurn;
|
|
6381
|
+
if (proposalTurn) {
|
|
6382
|
+
proposalTurn.completedNormally = completedResult.stopReason === "end_turn" && !pendingSend.signal.aborted && proposalTurn.settlementBlocked !== true;
|
|
6383
|
+
}
|
|
6384
|
+
await this.#settleGoalProposal(responseCapture);
|
|
6311
6385
|
releasePendingSend();
|
|
6312
6386
|
void this.#drainCronQueue();
|
|
6313
6387
|
void this.#drainNotificationQueue();
|
|
@@ -6335,6 +6409,23 @@ var Session = class {
|
|
|
6335
6409
|
rejectedByLoopProtection = isLoopDetectedTurnError(error);
|
|
6336
6410
|
throw error;
|
|
6337
6411
|
} finally {
|
|
6412
|
+
const proposalTurn = responseCapture.goalProposalTurn;
|
|
6413
|
+
if (proposalTurn) {
|
|
6414
|
+
this.config.takePendingGoalProposal(proposalTurn.turnKey);
|
|
6415
|
+
if (this.activeGoalProposalTurn === proposalTurn) {
|
|
6416
|
+
this.activeGoalProposalTurn = void 0;
|
|
6417
|
+
}
|
|
6418
|
+
}
|
|
6419
|
+
if (this.config.getGoalProposalHostSupported() && this.config.setGoalProposalTurnKey(void 0)) {
|
|
6420
|
+
try {
|
|
6421
|
+
await this.config.getLlmClient().setTools();
|
|
6422
|
+
} catch (error) {
|
|
6423
|
+
debugLogger6.warn(
|
|
6424
|
+
"Failed to refresh Goal proposal availability",
|
|
6425
|
+
error
|
|
6426
|
+
);
|
|
6427
|
+
}
|
|
6428
|
+
}
|
|
6338
6429
|
const stillOwnsPendingPrompt = this.pendingPrompt === pendingSend;
|
|
6339
6430
|
releasePendingSend();
|
|
6340
6431
|
const shouldDrainAutomaticQueues = (
|
|
@@ -6346,7 +6437,7 @@ var Session = class {
|
|
|
6346
6437
|
if (stillOwnsPendingPrompt) {
|
|
6347
6438
|
this.todoStopGuardDrainAutomaticQueuesWhenIdle = false;
|
|
6348
6439
|
}
|
|
6349
|
-
if (shouldDrainAutomaticQueues) {
|
|
6440
|
+
if (shouldDrainAutomaticQueues || stillOwnsPendingPrompt) {
|
|
6350
6441
|
void this.#drainCronQueue();
|
|
6351
6442
|
void this.#drainNotificationQueue();
|
|
6352
6443
|
}
|
|
@@ -6516,6 +6607,70 @@ var Session = class {
|
|
|
6516
6607
|
), "execute");
|
|
6517
6608
|
return goalTurn ? goalTurnContext.run(goalTurn.permit, execute) : goalTurnContext.exit(execute);
|
|
6518
6609
|
}
|
|
6610
|
+
async #settleGoalProposal(capture) {
|
|
6611
|
+
const turn = capture.goalProposalTurn;
|
|
6612
|
+
if (!turn) return;
|
|
6613
|
+
const proposal = this.config.takePendingGoalProposal(turn.turnKey);
|
|
6614
|
+
if (!proposal) return;
|
|
6615
|
+
const ownsTurn = /* @__PURE__ */ __name(() => turn.completedNormally && !turn.controller.signal.aborted && this.pendingPrompt === turn.controller && this.activeGoalProposalTurn === turn && !this.disposed && !this.closing, "ownsTurn");
|
|
6616
|
+
if (!ownsTurn()) {
|
|
6617
|
+
if (!this.disposed && !this.closing) {
|
|
6618
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6619
|
+
formatProposeGoalRecoveryNotStarted(proposal.objective)
|
|
6620
|
+
);
|
|
6621
|
+
}
|
|
6622
|
+
return;
|
|
6623
|
+
}
|
|
6624
|
+
try {
|
|
6625
|
+
const runtime = await this.config.getGoalRuntimeReady();
|
|
6626
|
+
if (!ownsTurn()) {
|
|
6627
|
+
if (!this.disposed && !this.closing) {
|
|
6628
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6629
|
+
formatProposeGoalRecoveryNotStarted(proposal.objective)
|
|
6630
|
+
);
|
|
6631
|
+
}
|
|
6632
|
+
return;
|
|
6633
|
+
}
|
|
6634
|
+
const result = await applyPendingGoalProposal(runtime, proposal);
|
|
6635
|
+
if (result.applied && (!ownsTurn() || proposal.approvalSignal?.aborted)) {
|
|
6636
|
+
try {
|
|
6637
|
+
await runtime.dispatch({
|
|
6638
|
+
action: "pause",
|
|
6639
|
+
expectedGoalId: result.goal.goalId,
|
|
6640
|
+
expectedRevision: result.goal.revision,
|
|
6641
|
+
reason: this.closing || this.disposed ? GOAL_PAUSE_REASON_SESSION_DISPOSED : GOAL_PAUSE_REASON_USER_INTERRUPT
|
|
6642
|
+
});
|
|
6643
|
+
} catch (error) {
|
|
6644
|
+
const current = runtime.getSnapshot().goal;
|
|
6645
|
+
if (current?.goalId === result.goal.goalId && current.revision === result.goal.revision && current.status === "active") {
|
|
6646
|
+
this.heldGoalProposal = {
|
|
6647
|
+
goalId: current.goalId,
|
|
6648
|
+
revision: current.revision
|
|
6649
|
+
};
|
|
6650
|
+
debugLogger6.warn(
|
|
6651
|
+
"Failed to pause the cancelled Goal proposal",
|
|
6652
|
+
error
|
|
6653
|
+
);
|
|
6654
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6655
|
+
`The Goal was created, but its cancellation could not be saved. Automatic execution is held in this session. ${GOAL_HELD_RECOVERY_COMMANDS}`
|
|
6656
|
+
);
|
|
6657
|
+
}
|
|
6658
|
+
}
|
|
6659
|
+
} else if (!result.applied) {
|
|
6660
|
+
debugLogger6.debug(
|
|
6661
|
+
`Dropping an approved Goal proposal: ${result.reason}`
|
|
6662
|
+
);
|
|
6663
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6664
|
+
result.kind === "changed" ? result.reason : formatProposeGoalRecoveryFailed(proposal.objective)
|
|
6665
|
+
);
|
|
6666
|
+
}
|
|
6667
|
+
} catch (error) {
|
|
6668
|
+
debugLogger6.warn("Failed to apply an approved Goal proposal", error);
|
|
6669
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6670
|
+
formatProposeGoalRecoveryFailed(proposal.objective)
|
|
6671
|
+
);
|
|
6672
|
+
}
|
|
6673
|
+
}
|
|
6519
6674
|
async #executePromptInner(params, pendingSend, responseCapture, modelPrompt, rejectOnLoopDetected = false, goalTurn, channelTurn = false) {
|
|
6520
6675
|
let managedMemoryRecallStarted = false;
|
|
6521
6676
|
return Storage.runWithRuntimeBaseDir(
|
|
@@ -6528,6 +6683,20 @@ var Session = class {
|
|
|
6528
6683
|
}
|
|
6529
6684
|
this.turn += 1;
|
|
6530
6685
|
const promptId = this.config.getSessionId() + "########" + this.turn;
|
|
6686
|
+
if (!goalTurn && !channelTurn && params._meta?.["qwen.goalProposalApproval"] === true) {
|
|
6687
|
+
responseCapture.goalProposalTurn = {
|
|
6688
|
+
turnKey: promptId,
|
|
6689
|
+
controller: pendingSend,
|
|
6690
|
+
completedNormally: false
|
|
6691
|
+
};
|
|
6692
|
+
this.activeGoalProposalTurn = responseCapture.goalProposalTurn;
|
|
6693
|
+
}
|
|
6694
|
+
if (this.config.getGoalProposalHostSupported() && this.config.setGoalProposalTurnKey(
|
|
6695
|
+
responseCapture.goalProposalTurn?.turnKey
|
|
6696
|
+
)) {
|
|
6697
|
+
await this.config.getLlmClient().setTools();
|
|
6698
|
+
}
|
|
6699
|
+
const daemonPromptId = getInvocationContext()?.promptId;
|
|
6531
6700
|
const promptMetadata = params._meta;
|
|
6532
6701
|
const continuesCurrentWorkChain = params.retry === true || promptMetadata?.[DAEMON_RETRY_META_KEY] === true || promptMetadata?.[DAEMON_CONTINUE_META_KEY] === true || promptMetadata?.[DAEMON_RESTORE_ASK_USER_QUESTION_META_KEY] === true;
|
|
6533
6702
|
promptIdContext.enterWith(promptId);
|
|
@@ -6544,6 +6713,8 @@ var Session = class {
|
|
|
6544
6713
|
const promptText = params.prompt.filter((block) => block.type === "text").map((block) => block.type === "text" ? block.text : "").join(" ");
|
|
6545
6714
|
const promptDisplayTextValue = promptMetadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
6546
6715
|
const promptDisplayText = typeof promptDisplayTextValue === "string" ? promptDisplayTextValue : void 0;
|
|
6716
|
+
const declaredSubmission = promptMetadata?.[DAEMON_SUBMITTED_PROMPT_META_KEY];
|
|
6717
|
+
const submittedPrompt = typeof declaredSubmission === "string" ? declaredSubmission : "";
|
|
6547
6718
|
const modelPromptBlocks = modelPrompt === void 0 ? params.prompt : [{ type: "text", text: modelPrompt }];
|
|
6548
6719
|
logUserPrompt(
|
|
6549
6720
|
this.config,
|
|
@@ -6621,17 +6792,16 @@ var Session = class {
|
|
|
6621
6792
|
promptMetadata?.[DAEMON_ATTACHMENT_REFERENCES_META_KEY]
|
|
6622
6793
|
);
|
|
6623
6794
|
const recorder = this.config.getChatRecordingService();
|
|
6624
|
-
|
|
6625
|
-
|
|
6795
|
+
recorder?.recordUserMessage(
|
|
6796
|
+
promptText,
|
|
6797
|
+
goalTurn?.permit,
|
|
6798
|
+
promptDisplayText !== void 0 || attachmentReferences ? {
|
|
6626
6799
|
displayText: promptDisplayText ?? promptText,
|
|
6627
6800
|
hookContext: "",
|
|
6628
6801
|
...attachmentReferences ? { attachmentReferences } : {}
|
|
6629
|
-
}
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
} else {
|
|
6633
|
-
recorder?.recordUserMessage(promptText);
|
|
6634
|
-
}
|
|
6802
|
+
} : void 0,
|
|
6803
|
+
daemonPromptId
|
|
6804
|
+
);
|
|
6635
6805
|
}
|
|
6636
6806
|
if (!isSlashInput && !isContinue && !isRestoreAskUserQuestion && !isRetry) {
|
|
6637
6807
|
this.refreshContextFilesOnWrite = false;
|
|
@@ -6681,16 +6851,12 @@ var Session = class {
|
|
|
6681
6851
|
const shouldRecordSlashCommand = !(resolvedCommandInfo?.kind === "built-in" /* BUILT_IN */ && resolvedCommandInfo.name === "advisor");
|
|
6682
6852
|
if (slashCommandName === "advisor" && shouldRecordSlashCommand && goalTurn?.origin !== "runtime" && !isRetry) {
|
|
6683
6853
|
const recorder = this.config.getChatRecordingService();
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
recorder?.recordUserMessage(promptText, goalTurn.permit);
|
|
6691
|
-
} else {
|
|
6692
|
-
recorder?.recordUserMessage(promptText);
|
|
6693
|
-
}
|
|
6854
|
+
recorder?.recordUserMessage(
|
|
6855
|
+
promptText,
|
|
6856
|
+
goalTurn?.permit,
|
|
6857
|
+
promptDisplayText !== void 0 ? { displayText: promptDisplayText, hookContext: "" } : void 0,
|
|
6858
|
+
daemonPromptId
|
|
6859
|
+
);
|
|
6694
6860
|
}
|
|
6695
6861
|
try {
|
|
6696
6862
|
parts = await this.#processSlashCommandResult(
|
|
@@ -6731,13 +6897,15 @@ var Session = class {
|
|
|
6731
6897
|
const messageBus = this.config.getMessageBus?.();
|
|
6732
6898
|
const isRuntimeContinuation = goalTurn?.origin === "runtime";
|
|
6733
6899
|
const isFreshUserTurn = !isRetry && !isContinue && !isRestoreAskUserQuestion && !isRuntimeContinuation;
|
|
6900
|
+
const isUserSubmissionTurn = isFreshUserTurn && !channelTurn;
|
|
6734
6901
|
if (!isContinue && !isRestoreAskUserQuestion && !isRuntimeContinuation && hooksEnabled && messageBus && this.config.hasHooksForEvent?.("UserPromptSubmit")) {
|
|
6735
6902
|
const response = await messageBus.request(
|
|
6736
6903
|
{
|
|
6737
6904
|
type: "hook-execution-request" /* HOOK_EXECUTION_REQUEST */,
|
|
6738
6905
|
eventName: "UserPromptSubmit",
|
|
6739
6906
|
input: {
|
|
6740
|
-
prompt: promptText
|
|
6907
|
+
prompt: promptText,
|
|
6908
|
+
...isUserSubmissionTurn && submittedPrompt.trim().length > 0 ? { submitted_prompt: submittedPrompt } : {}
|
|
6741
6909
|
},
|
|
6742
6910
|
signal: pendingSend.signal
|
|
6743
6911
|
},
|
|
@@ -7263,6 +7431,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7263
7431
|
modelOverride = model;
|
|
7264
7432
|
return true;
|
|
7265
7433
|
}, "onFullTurnModel");
|
|
7434
|
+
const blockGoalProposalSettlement = /* @__PURE__ */ __name(() => {
|
|
7435
|
+
if (responseCapture?.goalProposalTurn) {
|
|
7436
|
+
responseCapture.goalProposalTurn.settlementBlocked = true;
|
|
7437
|
+
}
|
|
7438
|
+
}, "blockGoalProposalSettlement");
|
|
7266
7439
|
let midTurnContinuationCount = 0;
|
|
7267
7440
|
while (true) {
|
|
7268
7441
|
if (this.pendingPrompt && this.pendingPrompt !== pendingSend) {
|
|
@@ -7276,6 +7449,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7276
7449
|
this.#clearTodoStopGuardTrustAndDrainAutomaticQueues();
|
|
7277
7450
|
}
|
|
7278
7451
|
if (this.todoStopGuardQueuedPromptPriority) {
|
|
7452
|
+
blockGoalProposalSettlement();
|
|
7279
7453
|
return { stopReason: "end_turn" };
|
|
7280
7454
|
}
|
|
7281
7455
|
if (this.todoStopGuard.needsStopInspection) {
|
|
@@ -7289,6 +7463,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7289
7463
|
pendingSend.signal
|
|
7290
7464
|
);
|
|
7291
7465
|
if (claim === "queued") {
|
|
7466
|
+
blockGoalProposalSettlement();
|
|
7292
7467
|
this.#preserveUnsentMessageHistory(
|
|
7293
7468
|
{ role: "user", parts: drained.parts },
|
|
7294
7469
|
true
|
|
@@ -7300,6 +7475,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7300
7475
|
}
|
|
7301
7476
|
}
|
|
7302
7477
|
this.todoStopGuard.acceptMidTurnUserInput();
|
|
7478
|
+
blockGoalProposalSettlement();
|
|
7303
7479
|
const continuation2 = await this.#runStopContinuation(
|
|
7304
7480
|
pendingSend,
|
|
7305
7481
|
promptId + "_mid_turn_" + ++midTurnContinuationCount,
|
|
@@ -7327,6 +7503,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7327
7503
|
pendingSend.signal
|
|
7328
7504
|
);
|
|
7329
7505
|
if (claim === "queued") {
|
|
7506
|
+
blockGoalProposalSettlement();
|
|
7330
7507
|
return { stopReason: "end_turn" };
|
|
7331
7508
|
}
|
|
7332
7509
|
if (claim === "unavailable") {
|
|
@@ -7376,6 +7553,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7376
7553
|
pendingSend.signal
|
|
7377
7554
|
);
|
|
7378
7555
|
if (claim === "queued") {
|
|
7556
|
+
blockGoalProposalSettlement();
|
|
7379
7557
|
this.#preserveUnsentMessageHistory(
|
|
7380
7558
|
{ role: "user", parts: drained.parts },
|
|
7381
7559
|
true
|
|
@@ -7387,6 +7565,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7387
7565
|
}
|
|
7388
7566
|
}
|
|
7389
7567
|
this.todoStopGuard.acceptMidTurnUserInput();
|
|
7568
|
+
blockGoalProposalSettlement();
|
|
7390
7569
|
const continuation2 = await this.#runStopContinuation(
|
|
7391
7570
|
pendingSend,
|
|
7392
7571
|
promptId + "_mid_turn_" + ++midTurnContinuationCount,
|
|
@@ -7414,6 +7593,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7414
7593
|
pendingSend.signal
|
|
7415
7594
|
);
|
|
7416
7595
|
if (claim === "queued") {
|
|
7596
|
+
blockGoalProposalSettlement();
|
|
7417
7597
|
return { stopReason: "end_turn" };
|
|
7418
7598
|
}
|
|
7419
7599
|
if (claim === "unavailable") {
|
|
@@ -7443,7 +7623,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7443
7623
|
const guardContinuation = guardDecision?.kind === "continue" ? guardDecision : null;
|
|
7444
7624
|
if (guardDecision?.kind === "exhausted") {
|
|
7445
7625
|
await this.#emitTodoStopGuardExhausted(guardDecision);
|
|
7446
|
-
if (!externalReason)
|
|
7626
|
+
if (!externalReason) {
|
|
7627
|
+
blockGoalProposalSettlement();
|
|
7628
|
+
return { stopReason: "end_turn" };
|
|
7629
|
+
}
|
|
7447
7630
|
}
|
|
7448
7631
|
if (externalReason && stopHookIterationCount >= stopHookBlockingCap) {
|
|
7449
7632
|
const warning = formatStopHookBlockingCapWarning(
|
|
@@ -7458,6 +7641,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7458
7641
|
await this.#pauseGoalForStopHookCap();
|
|
7459
7642
|
}
|
|
7460
7643
|
this.todoStopGuard.suspend();
|
|
7644
|
+
blockGoalProposalSettlement();
|
|
7461
7645
|
await this.messageEmitter.emitAgentMessage(warning);
|
|
7462
7646
|
debugLogger6.warn(warning);
|
|
7463
7647
|
return { stopReason: "end_turn" };
|
|
@@ -7530,6 +7714,12 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7530
7714
|
true
|
|
7531
7715
|
);
|
|
7532
7716
|
}, "preservePendingMessage");
|
|
7717
|
+
const blockGoalProposalSettlement = /* @__PURE__ */ __name(() => {
|
|
7718
|
+
const proposalTurn = options.responseCapture?.goalProposalTurn;
|
|
7719
|
+
if (proposalTurn) {
|
|
7720
|
+
proposalTurn.settlementBlocked = true;
|
|
7721
|
+
}
|
|
7722
|
+
}, "blockGoalProposalSettlement");
|
|
7533
7723
|
while (nextMessage !== null) {
|
|
7534
7724
|
if (this.pendingPrompt && this.pendingPrompt !== pendingSend) {
|
|
7535
7725
|
preservePendingMessage(nextMessage);
|
|
@@ -7636,6 +7826,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7636
7826
|
nextGuardContinuation = void 0;
|
|
7637
7827
|
if (!options.externalParts) {
|
|
7638
7828
|
preserveGuardOnSkippedSend = true;
|
|
7829
|
+
blockGoalProposalSettlement();
|
|
7639
7830
|
return { kind: "stop", stopReason: "end_turn" };
|
|
7640
7831
|
}
|
|
7641
7832
|
if (!initialSend && nextMessage) {
|
|
@@ -7654,6 +7845,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7654
7845
|
guardForThisSend = void 0;
|
|
7655
7846
|
nextGuardContinuation = void 0;
|
|
7656
7847
|
preserveGuardOnSkippedSend = true;
|
|
7848
|
+
blockGoalProposalSettlement();
|
|
7657
7849
|
if (initialSend) {
|
|
7658
7850
|
supersededAutomaticContinuation = true;
|
|
7659
7851
|
}
|
|
@@ -7711,6 +7903,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7711
7903
|
guardForThisSend = void 0;
|
|
7712
7904
|
nextGuardContinuation = void 0;
|
|
7713
7905
|
preserveGuardOnSkippedSend = true;
|
|
7906
|
+
blockGoalProposalSettlement();
|
|
7714
7907
|
if (initialSend) {
|
|
7715
7908
|
supersededAutomaticContinuation = true;
|
|
7716
7909
|
}
|
|
@@ -8888,6 +9081,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8888
9081
|
* timed-out drain is still recorded exactly once.
|
|
8889
9082
|
*/
|
|
8890
9083
|
async #buildMidTurnParts(messages, abortSignal, options = {}) {
|
|
9084
|
+
const proposalTurn = this.activeGoalProposalTurn;
|
|
9085
|
+
if (messages.length > 0 && proposalTurn?.controller.signal === abortSignal) {
|
|
9086
|
+
proposalTurn.settlementBlocked = true;
|
|
9087
|
+
}
|
|
8891
9088
|
const parts = [];
|
|
8892
9089
|
for (const message of messages) {
|
|
8893
9090
|
const displayText = message.kind === "text" ? message.message : message.displayText;
|
|
@@ -9689,30 +9886,34 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9689
9886
|
}
|
|
9690
9887
|
}
|
|
9691
9888
|
#enqueueBackgroundNotification(item) {
|
|
9692
|
-
while (this.notificationQueue.length >=
|
|
9693
|
-
|
|
9694
|
-
|
|
9889
|
+
while (this.notificationQueue.length >= MAX_BACKGROUND_NOTIFICATION_QUEUE) {
|
|
9890
|
+
const guardDefersUnrelatedWork = this.todoStopGuard.blocksUnrelatedAutomaticTurns || this.todoStopGuardQueuedPromptPriority;
|
|
9891
|
+
const admission = decideNotificationAdmission(
|
|
9892
|
+
this.notificationQueue.map(toAdmissibleNotification),
|
|
9893
|
+
toAdmissibleNotification(item),
|
|
9894
|
+
{
|
|
9895
|
+
max: MAX_BACKGROUND_NOTIFICATION_QUEUE,
|
|
9896
|
+
isProtected: /* @__PURE__ */ __name((_projected, index) => guardDefersUnrelatedWork && this.#notificationContinuesTodoStopGuardWorkChain(
|
|
9897
|
+
this.notificationQueue[index]
|
|
9898
|
+
), "isProtected")
|
|
9899
|
+
}
|
|
9900
|
+
);
|
|
9901
|
+
if (admission.action === "drop") {
|
|
9695
9902
|
const incomingIsRelated = this.#notificationContinuesTodoStopGuardWorkChain(item);
|
|
9696
|
-
|
|
9697
|
-
|
|
9903
|
+
debugLogger6.warn(
|
|
9904
|
+
incomingIsRelated ? `Notification queue overflow: dropping related task=${item.taskId} kind=${item.kind} because all queued items are related` : `Notification queue overflow: dropping unrelated task=${item.taskId} kind=${item.kind} while automatic work is deferred`
|
|
9698
9905
|
);
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
`Notification queue overflow: dropping unrelated task=${item.taskId} kind=${item.kind} while automatic work is deferred`
|
|
9702
|
-
);
|
|
9703
|
-
return;
|
|
9704
|
-
}
|
|
9705
|
-
if (evictedIndex < 0) {
|
|
9706
|
-
debugLogger6.warn(
|
|
9707
|
-
`Notification queue overflow: dropping related task=${item.taskId} kind=${item.kind} because all queued items are related`
|
|
9708
|
-
);
|
|
9709
|
-
return;
|
|
9710
|
-
}
|
|
9906
|
+
this.droppedNotifications.record(toAdmissibleNotification(item));
|
|
9907
|
+
return;
|
|
9711
9908
|
}
|
|
9712
|
-
|
|
9909
|
+
if (admission.action === "push") break;
|
|
9910
|
+
const [evicted] = this.notificationQueue.splice(admission.index, 1);
|
|
9713
9911
|
debugLogger6.warn(
|
|
9714
9912
|
`Notification queue overflow: evicting task=${evicted?.taskId ?? "unknown"} kind=${evicted?.kind ?? "unknown"}`
|
|
9715
9913
|
);
|
|
9914
|
+
if (evicted) {
|
|
9915
|
+
this.droppedNotifications.record(toAdmissibleNotification(evicted));
|
|
9916
|
+
}
|
|
9716
9917
|
}
|
|
9717
9918
|
this.notificationQueue.push(item);
|
|
9718
9919
|
this.#activeWorkChanged();
|
|
@@ -9905,16 +10106,39 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9905
10106
|
promptId,
|
|
9906
10107
|
item.todoWorkChainId
|
|
9907
10108
|
);
|
|
10109
|
+
const droppedSummary = this.droppedNotifications.take();
|
|
10110
|
+
if (droppedSummary) {
|
|
10111
|
+
await this.#emitDroppedNotificationSummary(droppedSummary);
|
|
10112
|
+
}
|
|
9908
10113
|
await this.#emitBackgroundNotificationDisplay(item);
|
|
9909
10114
|
const notificationParts = [{ text: item.modelText }];
|
|
10115
|
+
if (droppedSummary) {
|
|
10116
|
+
notificationParts.unshift({ text: droppedSummary.modelText });
|
|
10117
|
+
}
|
|
9910
10118
|
if (!item.persisted) {
|
|
9911
|
-
this.config.getChatRecordingService()
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
}
|
|
10119
|
+
const recording = this.config.getChatRecordingService();
|
|
10120
|
+
if (droppedSummary) {
|
|
10121
|
+
recording?.recordNotification(
|
|
10122
|
+
[{ text: droppedSummary.modelText }],
|
|
10123
|
+
droppedSummary.displayText
|
|
10124
|
+
);
|
|
10125
|
+
}
|
|
10126
|
+
recording?.recordNotification(
|
|
10127
|
+
[{ text: item.modelText }],
|
|
10128
|
+
item.displayText,
|
|
10129
|
+
{
|
|
10130
|
+
taskId: item.taskId,
|
|
10131
|
+
status: item.status,
|
|
10132
|
+
kind: item.kind,
|
|
10133
|
+
toolUseId: item.toolUseId,
|
|
10134
|
+
...item.structured
|
|
10135
|
+
}
|
|
10136
|
+
);
|
|
10137
|
+
} else if (droppedSummary) {
|
|
10138
|
+
this.config.getChatRecordingService()?.recordNotification(
|
|
10139
|
+
[{ text: droppedSummary.modelText }],
|
|
10140
|
+
droppedSummary.displayText
|
|
10141
|
+
);
|
|
9918
10142
|
}
|
|
9919
10143
|
const notificationReminders = await this.#buildInitialSystemReminders();
|
|
9920
10144
|
const activeTodoReminder = this.config.takeActiveTodoReminder(
|
|
@@ -10131,6 +10355,17 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10131
10355
|
}
|
|
10132
10356
|
);
|
|
10133
10357
|
}
|
|
10358
|
+
async #emitDroppedNotificationSummary(summary) {
|
|
10359
|
+
await this.sendUpdate({
|
|
10360
|
+
sessionUpdate: "agent_message_chunk",
|
|
10361
|
+
content: { type: "text", text: summary.displayText },
|
|
10362
|
+
_meta: {
|
|
10363
|
+
source: "background_notification",
|
|
10364
|
+
qwenDiscreteMessage: true,
|
|
10365
|
+
backgroundTask: { kind: "queue", status: summary.status }
|
|
10366
|
+
}
|
|
10367
|
+
});
|
|
10368
|
+
}
|
|
10134
10369
|
async #emitBackgroundNotificationDisplay(item) {
|
|
10135
10370
|
await this.sendUpdate({
|
|
10136
10371
|
sessionUpdate: "agent_message_chunk",
|
|
@@ -10343,7 +10578,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10343
10578
|
void this.client.extNotification("qwen/notify/session/mode-update", {
|
|
10344
10579
|
v: 1,
|
|
10345
10580
|
sessionId: this.sessionId,
|
|
10346
|
-
currentModeId: params.modeId
|
|
10581
|
+
currentModeId: params.modeId,
|
|
10582
|
+
...approvalMode === "plan" /* PLAN */ ? {
|
|
10583
|
+
planExecutionMode: this.config.getPlanExecutionMode?.() ?? this.config.getPrePlanMode?.()
|
|
10584
|
+
} : {}
|
|
10347
10585
|
}).catch((error) => {
|
|
10348
10586
|
debugLogger6.debug("mode-update extNotification failed", error);
|
|
10349
10587
|
});
|
|
@@ -10445,14 +10683,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10445
10683
|
};
|
|
10446
10684
|
}
|
|
10447
10685
|
getDefaultReasoningConfig() {
|
|
10448
|
-
|
|
10449
|
-
const model = authType && !this.config.getActiveRuntimeModelSnapshot?.() ? this.config.getResolvedModelConfig?.(
|
|
10450
|
-
authType,
|
|
10451
|
-
this.config.getModel(),
|
|
10452
|
-
this.config.getCurrentModelRegistryBaseUrl?.() ?? void 0
|
|
10453
|
-
) : void 0;
|
|
10454
|
-
if (model) return model.generationConfig.reasoning;
|
|
10455
|
-
return this.settings.merged.model?.generationConfig?.reasoning;
|
|
10686
|
+
return getDefaultReasoningConfig(this.config, this.settings);
|
|
10456
10687
|
}
|
|
10457
10688
|
reloadReasoningSelection() {
|
|
10458
10689
|
this.settings.reloadScopeFromDisk("User" /* User */);
|
|
@@ -10513,25 +10744,24 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10513
10744
|
const generation = this.config.getContentGeneratorConfig?.();
|
|
10514
10745
|
const thinkingMandatory = generation?.thinkingMandatory === true;
|
|
10515
10746
|
const modelReasoning = getConfiguredModelReasoning(this.config, modelId);
|
|
10516
|
-
|
|
10747
|
+
const gptCapabilities = getGptReasoningCapabilities(modelId);
|
|
10748
|
+
const configuredReasoning = parseModelReasoningCapabilities(modelReasoning);
|
|
10749
|
+
const gptModel = gptCapabilities !== void 0 && !configuredReasoning;
|
|
10750
|
+
const supportsPreference = /* @__PURE__ */ __name((value) => value !== void 0 && value !== REASONING_EFFORT_DEFAULT && (gptModel && value !== REASONING_EFFORT_NONE || isReasoningSelectionSupported(
|
|
10517
10751
|
modelId,
|
|
10518
|
-
|
|
10752
|
+
value,
|
|
10519
10753
|
thinkingMandatory,
|
|
10520
10754
|
modelReasoning
|
|
10521
|
-
);
|
|
10755
|
+
)), "supportsPreference");
|
|
10756
|
+
let supported = supportsPreference(selection);
|
|
10522
10757
|
const appliesSessionDefault = hasSessionSelection && selection === REASONING_EFFORT_DEFAULT;
|
|
10523
10758
|
if (hasSessionSelection && !supported && !appliesSessionDefault) {
|
|
10524
10759
|
this.sessionReasoningSelection = void 0;
|
|
10525
10760
|
hasSessionSelection = false;
|
|
10526
10761
|
selection = parseReasoningSelection(rawSelection);
|
|
10527
|
-
supported = selection
|
|
10528
|
-
modelId,
|
|
10529
|
-
selection,
|
|
10530
|
-
thinkingMandatory,
|
|
10531
|
-
modelReasoning
|
|
10532
|
-
);
|
|
10762
|
+
supported = supportsPreference(selection);
|
|
10533
10763
|
}
|
|
10534
|
-
if (!hasSessionSelection && rawSelection !== void 0 && !supported && options.persist) {
|
|
10764
|
+
if (!hasSessionSelection && rawSelection !== void 0 && !supported && !(selection === REASONING_EFFORT_NONE && gptCapabilities !== void 0 && configuredReasoning?.canDisable !== false) && options.persist) {
|
|
10535
10765
|
try {
|
|
10536
10766
|
this.persistReasoningSelection(REASONING_EFFORT_DEFAULT);
|
|
10537
10767
|
} catch (error) {
|
|
@@ -10585,6 +10815,9 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10585
10815
|
v: 1,
|
|
10586
10816
|
sessionId: this.sessionId,
|
|
10587
10817
|
currentModeId: newModeId,
|
|
10818
|
+
...newModeId === "plan" /* PLAN */ ? {
|
|
10819
|
+
planExecutionMode: this.config.getPlanExecutionMode?.() ?? this.config.getPrePlanMode?.()
|
|
10820
|
+
} : {},
|
|
10588
10821
|
legacyFrameSent
|
|
10589
10822
|
});
|
|
10590
10823
|
} catch (error) {
|
|
@@ -11437,6 +11670,19 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11437
11670
|
return await runInToolSpanContext(toolSpan, async () => {
|
|
11438
11671
|
const entryCancellation = cancelBeforeExecutionIfAborted(toolName);
|
|
11439
11672
|
if (entryCancellation) return entryCancellation;
|
|
11673
|
+
if (policyToolName === ToolNames.PROPOSE_GOAL && (this.activeGoalProposalTurn?.turnKey !== promptId || this.activeGoalProposalTurn.controller.signal.aborted)) {
|
|
11674
|
+
return earlyErrorResponse(
|
|
11675
|
+
new Error(
|
|
11676
|
+
"The Goal was not set: this turn cannot own a Goal approval. Hand the user a `/goal set <objective>` line instead."
|
|
11677
|
+
),
|
|
11678
|
+
toolName,
|
|
11679
|
+
{
|
|
11680
|
+
status: "error",
|
|
11681
|
+
errorType: "execution_denied" /* EXECUTION_DENIED */,
|
|
11682
|
+
executionStatus: "not_started"
|
|
11683
|
+
}
|
|
11684
|
+
);
|
|
11685
|
+
}
|
|
11440
11686
|
const isTrustedLiveScreenContextTool = tool === this.liveScreenContextTool;
|
|
11441
11687
|
const isTrustedLiveTaskTool = this.liveTaskTools.includes(
|
|
11442
11688
|
tool
|
|
@@ -12098,7 +12344,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12098
12344
|
);
|
|
12099
12345
|
}
|
|
12100
12346
|
let confirmationPayload = {
|
|
12101
|
-
answers: output.answers
|
|
12347
|
+
answers: output.answers,
|
|
12348
|
+
...output.expectedPlanExecutionMode !== void 0 ? {
|
|
12349
|
+
expectedPlanExecutionMode: output.expectedPlanExecutionMode
|
|
12350
|
+
} : {}
|
|
12102
12351
|
};
|
|
12103
12352
|
if (planShellDecision.classification !== "not-applicable") {
|
|
12104
12353
|
const approval = await validatePlanModeShellApproval({
|
|
@@ -12207,7 +12456,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12207
12456
|
}
|
|
12208
12457
|
}
|
|
12209
12458
|
}
|
|
12210
|
-
if (!didRequestPermission && !isTodoWriteTool) {
|
|
12459
|
+
if ((!didRequestPermission || isAgentTool) && !isTodoWriteTool) {
|
|
12211
12460
|
const startParams = {
|
|
12212
12461
|
callId,
|
|
12213
12462
|
toolName,
|
|
@@ -12349,10 +12598,22 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12349
12598
|
let toolSettled = false;
|
|
12350
12599
|
let heartbeatCount = 0;
|
|
12351
12600
|
let lastHeartbeat;
|
|
12601
|
+
let subagentSessionReadySent = false;
|
|
12352
12602
|
const onToolProgress = /* @__PURE__ */ __name((chunk) => {
|
|
12353
|
-
if (toolSettled
|
|
12354
|
-
|
|
12603
|
+
if (toolSettled) return;
|
|
12604
|
+
if (isAgentTool && !subagentSessionReadySent && typeof chunk === "object" && chunk !== null && "subagentSessionReady" in chunk && chunk.subagentSessionReady === true) {
|
|
12605
|
+
subagentSessionReadySent = true;
|
|
12606
|
+
void this.sendUpdate({
|
|
12607
|
+
sessionUpdate: "tool_call_update",
|
|
12608
|
+
toolCallId: callId,
|
|
12609
|
+
_meta: { toolName, subagentSessionReady: true }
|
|
12610
|
+
}).catch((err) => {
|
|
12611
|
+
debugLogger6.debug(
|
|
12612
|
+
`[Session.runTool] subagent readiness update failed for ${callId}: ${err}`
|
|
12613
|
+
);
|
|
12614
|
+
});
|
|
12355
12615
|
}
|
|
12616
|
+
if (!isShellProgressData(chunk)) return;
|
|
12356
12617
|
heartbeatCount++;
|
|
12357
12618
|
lastHeartbeat = chunk;
|
|
12358
12619
|
void this.sendUpdate({
|
|
@@ -12401,7 +12662,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12401
12662
|
try {
|
|
12402
12663
|
toolResult = await invocation.execute(
|
|
12403
12664
|
activeToolAbortSignal,
|
|
12404
|
-
onToolProgress
|
|
12665
|
+
onToolProgress,
|
|
12666
|
+
this.config.getShellExecutionConfig()
|
|
12405
12667
|
);
|
|
12406
12668
|
executeReturned = true;
|
|
12407
12669
|
try {
|
|
@@ -14565,6 +14827,7 @@ function serializeWorkflowTask(entry, now) {
|
|
|
14565
14827
|
})),
|
|
14566
14828
|
agentsDispatched: entry.agentsDispatched,
|
|
14567
14829
|
agentsCompleted: entry.agentsCompleted,
|
|
14830
|
+
agentsRespawned: entry.agentsRespawned ?? 0,
|
|
14568
14831
|
tokensSpent: entry.tokensSpent,
|
|
14569
14832
|
tokenBudgetTotal: entry.tokenBudgetTotal,
|
|
14570
14833
|
recentLogs: [...entry.recentLogs],
|
|
@@ -14605,6 +14868,7 @@ function serializeWorkflowSnapshot(snapshot) {
|
|
|
14605
14868
|
})),
|
|
14606
14869
|
agentsDispatched: snapshot.agentsDispatched,
|
|
14607
14870
|
agentsCompleted: snapshot.agentsCompleted,
|
|
14871
|
+
agentsRespawned: snapshot.agentsRespawned ?? 0,
|
|
14608
14872
|
tokensSpent: snapshot.tokensSpent,
|
|
14609
14873
|
tokenBudgetTotal: snapshot.tokenBudgetTotal,
|
|
14610
14874
|
recentLogs: [...snapshot.recentLogs],
|
|
@@ -15364,6 +15628,7 @@ function hasFailedDisplayStatus(display) {
|
|
|
15364
15628
|
__name(hasFailedDisplayStatus, "hasFailedDisplayStatus");
|
|
15365
15629
|
var AUTH_PREFLIGHT_ENV_KEYS = {
|
|
15366
15630
|
openai: ["OPENAI_API_KEY"],
|
|
15631
|
+
"openai-responses": ["OPENAI_API_KEY"],
|
|
15367
15632
|
anthropic: ["ANTHROPIC_API_KEY"],
|
|
15368
15633
|
gemini: ["GEMINI_API_KEY"],
|
|
15369
15634
|
"vertex-ai": ["GOOGLE_API_KEY"]
|
|
@@ -16465,6 +16730,7 @@ async function runAcpAgent(config, settings, argv, options) {
|
|
|
16465
16730
|
return agentInstance;
|
|
16466
16731
|
}, stream);
|
|
16467
16732
|
markAcpStartup("transportSetupEnd");
|
|
16733
|
+
registerCleanup(() => agentInstance?.closePeerMessaging());
|
|
16468
16734
|
} catch (err) {
|
|
16469
16735
|
eventLoopMonitor.dispose();
|
|
16470
16736
|
throw err;
|
|
@@ -16907,6 +17173,30 @@ var QwenAgent = class _QwenAgent {
|
|
|
16907
17173
|
__name(this, "QwenAgent");
|
|
16908
17174
|
}
|
|
16909
17175
|
sessions = /* @__PURE__ */ new Map();
|
|
17176
|
+
/**
|
|
17177
|
+
* Cross-session messaging for every session this process hosts.
|
|
17178
|
+
*
|
|
17179
|
+
* One inbox, not one per session: the address is a socket, the sessions
|
|
17180
|
+
* are told apart by the `toSessionId` every sender pins on its frame,
|
|
17181
|
+
* and binding a socket per session would multiply file descriptors by
|
|
17182
|
+
* the session count for no added reach.
|
|
17183
|
+
*
|
|
17184
|
+
* Outbound only for now. Inbound is refused rather than held, because a
|
|
17185
|
+
* hold is a question put to a person and nobody is watching a hold list
|
|
17186
|
+
* on a daemon-managed session's behalf; a sender is told so at once
|
|
17187
|
+
* instead of waiting out an expiry.
|
|
17188
|
+
*/
|
|
17189
|
+
peerMessagingStart = null;
|
|
17190
|
+
// Set by closePeerMessaging: a retry must not resurrect an inbox after
|
|
17191
|
+
// teardown ran.
|
|
17192
|
+
peerMessagingClosed = false;
|
|
17193
|
+
/**
|
|
17194
|
+
* Sessions already given a record. A session is published once, but a
|
|
17195
|
+
* reload can hand the same id back through the same path, and two
|
|
17196
|
+
* records for one session would be two names for it in every listing.
|
|
17197
|
+
*/
|
|
17198
|
+
registeredSessions = /* @__PURE__ */ new Set();
|
|
17199
|
+
inboxAddress = null;
|
|
16910
17200
|
modelProviderReloadRevision = 0;
|
|
16911
17201
|
historyMutationTails = /* @__PURE__ */ new Map();
|
|
16912
17202
|
startingSessionIds = /* @__PURE__ */ new Set();
|
|
@@ -17111,6 +17401,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
17111
17401
|
}
|
|
17112
17402
|
async finishManagedShutdown(configs) {
|
|
17113
17403
|
const failures = [];
|
|
17404
|
+
await this.closePeerMessaging();
|
|
17114
17405
|
for (const [sessionId, session] of [...this.sessions]) {
|
|
17115
17406
|
await this.removeStoredSessionEntry(sessionId, session, failures, {
|
|
17116
17407
|
shutdownConfig: false
|
|
@@ -17449,6 +17740,12 @@ var QwenAgent = class _QwenAgent {
|
|
|
17449
17740
|
} catch (error) {
|
|
17450
17741
|
cleanupErrors.push(error);
|
|
17451
17742
|
}
|
|
17743
|
+
this.registeredSessions.delete(sessionId);
|
|
17744
|
+
try {
|
|
17745
|
+
await session.getConfig().unregisterSessionRegistry();
|
|
17746
|
+
} catch (error) {
|
|
17747
|
+
cleanupErrors.push(error);
|
|
17748
|
+
}
|
|
17452
17749
|
if (options.shutdownConfig !== false) {
|
|
17453
17750
|
try {
|
|
17454
17751
|
await session.getConfig().shutdown({ shutdownTelemetry: false });
|
|
@@ -17702,6 +17999,113 @@ var QwenAgent = class _QwenAgent {
|
|
|
17702
17999
|
}
|
|
17703
18000
|
await this.closeStoredSession(sessionId, opts);
|
|
17704
18001
|
}
|
|
18002
|
+
/**
|
|
18003
|
+
* Bind the one inbox every session this process hosts shares.
|
|
18004
|
+
*
|
|
18005
|
+
* Not awaited: binding a socket must not delay the first prompt, and a
|
|
18006
|
+
* session published before it resolves still registers — the address
|
|
18007
|
+
* is patched into every record when it arrives (`publishInboxAddress`).
|
|
18008
|
+
*/
|
|
18009
|
+
startPeerMessaging() {
|
|
18010
|
+
if (this.peerMessagingStart) return;
|
|
18011
|
+
if (this.peerMessagingClosed) return;
|
|
18012
|
+
this.peerMessagingStart = (async () => {
|
|
18013
|
+
try {
|
|
18014
|
+
const messaging = await PeerMessaging.start({
|
|
18015
|
+
// Inbound is refused outright, so neither the approval mode nor
|
|
18016
|
+
// the parity rule it feeds is ever consulted. Stated rather than
|
|
18017
|
+
// left to a default: what a daemon-managed session may be told
|
|
18018
|
+
// is settled here and nowhere else.
|
|
18019
|
+
getApprovalMode: /* @__PURE__ */ __name(() => null, "getApprovalMode"),
|
|
18020
|
+
getPolicySetting: /* @__PURE__ */ __name(() => "refuse", "getPolicySetting"),
|
|
18021
|
+
updateSessionRegistryIpcPath: /* @__PURE__ */ __name((ipcPath, ipcToken) => this.publishInboxAddress(ipcPath, ipcToken), "updateSessionRegistryIpcPath"),
|
|
18022
|
+
ownsSessionId: /* @__PURE__ */ __name((id) => {
|
|
18023
|
+
const wanted = normalizeSessionIdForLookup(id);
|
|
18024
|
+
return this.sessions.has(wanted) || [...this.sessions.values()].some(
|
|
18025
|
+
(session) => normalizeSessionIdForLookup(
|
|
18026
|
+
session.getConfig().getSessionId()
|
|
18027
|
+
) === wanted
|
|
18028
|
+
);
|
|
18029
|
+
}, "ownsSessionId")
|
|
18030
|
+
});
|
|
18031
|
+
if (messaging === null) this.peerMessagingStart = null;
|
|
18032
|
+
return messaging;
|
|
18033
|
+
} catch (error) {
|
|
18034
|
+
debugLogger9.error(
|
|
18035
|
+
"[ACP] cross-session messaging failed to start:",
|
|
18036
|
+
error
|
|
18037
|
+
);
|
|
18038
|
+
this.peerMessagingStart = null;
|
|
18039
|
+
return null;
|
|
18040
|
+
}
|
|
18041
|
+
})();
|
|
18042
|
+
}
|
|
18043
|
+
/** Close the inbox and stop advertising it. Safe to call more than once. */
|
|
18044
|
+
async closePeerMessaging() {
|
|
18045
|
+
this.peerMessagingClosed = true;
|
|
18046
|
+
const pending = this.peerMessagingStart;
|
|
18047
|
+
if (!pending) return;
|
|
18048
|
+
this.peerMessagingStart = null;
|
|
18049
|
+
try {
|
|
18050
|
+
await (await pending)?.close();
|
|
18051
|
+
} catch (error) {
|
|
18052
|
+
debugLogger9.debug(
|
|
18053
|
+
`[ACP] closing cross-session messaging failed: ${error instanceof Error ? error.message : String(error)}`
|
|
18054
|
+
);
|
|
18055
|
+
}
|
|
18056
|
+
this.inboxAddress = null;
|
|
18057
|
+
}
|
|
18058
|
+
/**
|
|
18059
|
+
* Give a newly published session a registry record of its own.
|
|
18060
|
+
*
|
|
18061
|
+
* Only when that session's own settings turn messaging on. A record
|
|
18062
|
+
* with no inbox behind it would put a name in every peer's listing
|
|
18063
|
+
* that can be addressed and never answered, which is worse than not
|
|
18064
|
+
* appearing at all — the interactive UI registers unconditionally
|
|
18065
|
+
* because its record also answers "what is running right now", a
|
|
18066
|
+
* question nobody asks of a session a daemon is driving.
|
|
18067
|
+
*/
|
|
18068
|
+
registerHostedSession(sessionId, config, settings) {
|
|
18069
|
+
if (settings.merged.agents?.crossSessionMessaging !== true) return;
|
|
18070
|
+
this.startPeerMessaging();
|
|
18071
|
+
if (this.registeredSessions.has(sessionId)) return;
|
|
18072
|
+
this.registeredSessions.add(sessionId);
|
|
18073
|
+
config.trackSessionRegistration(
|
|
18074
|
+
registerSession({
|
|
18075
|
+
sessionId,
|
|
18076
|
+
cwd: config.getTargetDir(),
|
|
18077
|
+
qwenVersion: config.getCliVersion() ?? null,
|
|
18078
|
+
// What spawned this process, as far as it can tell: the daemon
|
|
18079
|
+
// marks the children it starts, and anything else running
|
|
18080
|
+
// `qwen --acp` is a client driving it directly.
|
|
18081
|
+
kind: process.env[QWEN_CODE_SERVE_ENV] === "1" ? "serve" : "headless",
|
|
18082
|
+
// One record per session rather than one per process: they have
|
|
18083
|
+
// separate ids, names and working directories.
|
|
18084
|
+
slot: "own"
|
|
18085
|
+
})
|
|
18086
|
+
);
|
|
18087
|
+
if (this.inboxAddress) {
|
|
18088
|
+
void config.updateSessionRegistryIpcPath(
|
|
18089
|
+
this.inboxAddress.ipcPath,
|
|
18090
|
+
this.inboxAddress.ipcToken
|
|
18091
|
+
);
|
|
18092
|
+
}
|
|
18093
|
+
}
|
|
18094
|
+
/**
|
|
18095
|
+
* Write the inbox address into every hosted session's record.
|
|
18096
|
+
*
|
|
18097
|
+
* They share one address, so this runs once per bind rather than once
|
|
18098
|
+
* per session, and again with `undefined` at close so no record
|
|
18099
|
+
* advertises a socket that is gone.
|
|
18100
|
+
*/
|
|
18101
|
+
async publishInboxAddress(ipcPath, ipcToken) {
|
|
18102
|
+
this.inboxAddress = ipcPath !== void 0 && ipcToken !== void 0 ? { ipcPath, ipcToken } : null;
|
|
18103
|
+
await Promise.allSettled(
|
|
18104
|
+
[...this.sessions.values()].map(
|
|
18105
|
+
(session) => session.getConfig().updateSessionRegistryIpcPath(ipcPath, ipcToken)
|
|
18106
|
+
)
|
|
18107
|
+
);
|
|
18108
|
+
}
|
|
17705
18109
|
async disposeSessions() {
|
|
17706
18110
|
this.activeWorkReporter?.dispose();
|
|
17707
18111
|
this.activeWorkReporter = void 0;
|
|
@@ -17713,6 +18117,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
17713
18117
|
controller.abort();
|
|
17714
18118
|
}
|
|
17715
18119
|
this.workspaceGenerationControllers.clear();
|
|
18120
|
+
await this.closePeerMessaging();
|
|
17716
18121
|
await Promise.allSettled(
|
|
17717
18122
|
[...this.sessions.entries()].map(
|
|
17718
18123
|
([sessionId, session]) => this.discardStoredSessionIfCurrent(sessionId, session, {
|
|
@@ -17853,7 +18258,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
17853
18258
|
}
|
|
17854
18259
|
this.clientCapabilities = args.clientCapabilities;
|
|
17855
18260
|
const authMethods = buildAuthMethods();
|
|
17856
|
-
const version = "0.23.
|
|
18261
|
+
const version = "0.23.3-nightly.20260910.c46cb85cf2";
|
|
17857
18262
|
const response = {
|
|
17858
18263
|
protocolVersion: PROTOCOL_VERSION,
|
|
17859
18264
|
agentInfo: {
|
|
@@ -18105,7 +18510,10 @@ var QwenAgent = class _QwenAgent {
|
|
|
18105
18510
|
sessionId: session.getId(),
|
|
18106
18511
|
models: this.buildAvailableModels(config),
|
|
18107
18512
|
modes: this.buildModesData(config),
|
|
18108
|
-
configOptions: this.buildConfigOptions(
|
|
18513
|
+
configOptions: this.buildConfigOptions(
|
|
18514
|
+
config,
|
|
18515
|
+
session.getDefaultReasoningConfig()
|
|
18516
|
+
)
|
|
18109
18517
|
}));
|
|
18110
18518
|
},
|
|
18111
18519
|
parentContext ? { parentContext } : {}
|
|
@@ -18168,7 +18576,10 @@ var QwenAgent = class _QwenAgent {
|
|
|
18168
18576
|
() => ({
|
|
18169
18577
|
modes: this.buildModesData(config),
|
|
18170
18578
|
models: this.buildAvailableModels(config),
|
|
18171
|
-
configOptions: this.buildConfigOptions(
|
|
18579
|
+
configOptions: this.buildConfigOptions(
|
|
18580
|
+
config,
|
|
18581
|
+
liveSession.getDefaultReasoningConfig()
|
|
18582
|
+
),
|
|
18172
18583
|
...projection?.artifactSnapshot ? { artifactSnapshot: projection.artifactSnapshot } : {}
|
|
18173
18584
|
})
|
|
18174
18585
|
);
|
|
@@ -18300,7 +18711,10 @@ var QwenAgent = class _QwenAgent {
|
|
|
18300
18711
|
const buildResponse = /* @__PURE__ */ __name(() => profiler.timeSync("response_build", () => ({
|
|
18301
18712
|
modes: this.buildModesData(config),
|
|
18302
18713
|
models: this.buildAvailableModels(config),
|
|
18303
|
-
configOptions: this.buildConfigOptions(
|
|
18714
|
+
configOptions: this.buildConfigOptions(
|
|
18715
|
+
config,
|
|
18716
|
+
getDefaultReasoningConfig(config, settings)
|
|
18717
|
+
),
|
|
18304
18718
|
...projection?.runtime.artifactSnapshot ? { artifactSnapshot: projection.runtime.artifactSnapshot } : {},
|
|
18305
18719
|
...replayEnvelope ? {
|
|
18306
18720
|
_meta: {
|
|
@@ -18572,7 +18986,10 @@ var QwenAgent = class _QwenAgent {
|
|
|
18572
18986
|
() => ({
|
|
18573
18987
|
modes: this.buildModesData(config),
|
|
18574
18988
|
models: this.buildAvailableModels(config),
|
|
18575
|
-
configOptions: this.buildConfigOptions(
|
|
18989
|
+
configOptions: this.buildConfigOptions(
|
|
18990
|
+
config,
|
|
18991
|
+
liveSession.getDefaultReasoningConfig()
|
|
18992
|
+
),
|
|
18576
18993
|
...projection?.artifactSnapshot ? { artifactSnapshot: projection.artifactSnapshot } : {}
|
|
18577
18994
|
})
|
|
18578
18995
|
)
|
|
@@ -18664,7 +19081,10 @@ var QwenAgent = class _QwenAgent {
|
|
|
18664
19081
|
response = profiler.timeSync("response_build", () => ({
|
|
18665
19082
|
modes: this.buildModesData(config),
|
|
18666
19083
|
models: this.buildAvailableModels(config),
|
|
18667
|
-
configOptions: this.buildConfigOptions(
|
|
19084
|
+
configOptions: this.buildConfigOptions(
|
|
19085
|
+
config,
|
|
19086
|
+
getDefaultReasoningConfig(config, settings)
|
|
19087
|
+
),
|
|
18668
19088
|
...projection?.runtime.artifactSnapshot ? { artifactSnapshot: projection.runtime.artifactSnapshot } : {}
|
|
18669
19089
|
}));
|
|
18670
19090
|
}, "beforeSessionPublish"),
|
|
@@ -18819,7 +19239,8 @@ var QwenAgent = class _QwenAgent {
|
|
|
18819
19239
|
case "reasoning_effort": {
|
|
18820
19240
|
const config = session.getConfig();
|
|
18821
19241
|
const generation = config.getContentGeneratorConfig();
|
|
18822
|
-
const
|
|
19242
|
+
const defaultReasoning = session.getDefaultReasoningConfig();
|
|
19243
|
+
const option = this.buildConfigOptions(config, defaultReasoning).find(
|
|
18823
19244
|
(candidate) => candidate.id === "reasoning_effort"
|
|
18824
19245
|
);
|
|
18825
19246
|
const modelReasoning = this.getModelReasoningConfiguration(config);
|
|
@@ -18847,7 +19268,6 @@ var QwenAgent = class _QwenAgent {
|
|
|
18847
19268
|
"Reasoning effort cannot be applied while thinking is disabled"
|
|
18848
19269
|
);
|
|
18849
19270
|
}
|
|
18850
|
-
const defaultReasoning = session.getDefaultReasoningConfig();
|
|
18851
19271
|
const previous = {
|
|
18852
19272
|
reasoning: generation.reasoning,
|
|
18853
19273
|
extra_body: generation.extra_body,
|
|
@@ -18865,12 +19285,15 @@ var QwenAgent = class _QwenAgent {
|
|
|
18865
19285
|
selected === REASONING_EFFORT_DEFAULT ? defaultReasoning ? defaultReasoning.effort : void 0 : selected
|
|
18866
19286
|
);
|
|
18867
19287
|
}
|
|
18868
|
-
const configOptions = this.buildConfigOptions(
|
|
19288
|
+
const configOptions = this.buildConfigOptions(
|
|
19289
|
+
config,
|
|
19290
|
+
defaultReasoning
|
|
19291
|
+
);
|
|
18869
19292
|
const confirmedValue = configOptions.find(
|
|
18870
19293
|
(candidate) => candidate.id === "reasoning_effort"
|
|
18871
19294
|
)?.currentValue;
|
|
18872
19295
|
const confirmed = selected === REASONING_EFFORT_DEFAULT ? confirmedValue !== void 0 : confirmedValue === selected;
|
|
18873
|
-
if (!confirmed) {
|
|
19296
|
+
if (!confirmed || tierSelected && getGptReasoningOverrideState(generation, modelReasoning)?.blocksTierChange) {
|
|
18874
19297
|
throw RequestError.invalidParams(
|
|
18875
19298
|
void 0,
|
|
18876
19299
|
modelReasoning ? `Reasoning selection was not applied: ${selected}` : "Reasoning effort cannot be applied while thinking is disabled"
|
|
@@ -18900,7 +19323,10 @@ var QwenAgent = class _QwenAgent {
|
|
|
18900
19323
|
);
|
|
18901
19324
|
}
|
|
18902
19325
|
return {
|
|
18903
|
-
configOptions: this.buildConfigOptions(
|
|
19326
|
+
configOptions: this.buildConfigOptions(
|
|
19327
|
+
session.getConfig(),
|
|
19328
|
+
session.getDefaultReasoningConfig()
|
|
19329
|
+
)
|
|
18904
19330
|
};
|
|
18905
19331
|
});
|
|
18906
19332
|
}
|
|
@@ -18915,13 +19341,24 @@ var QwenAgent = class _QwenAgent {
|
|
|
18915
19341
|
const suppliedContext = meta[INVOCATION_CONTEXT_META_KEY];
|
|
18916
19342
|
const suppliedModelPrompt = meta[DAEMON_MODEL_PROMPT_META_KEY];
|
|
18917
19343
|
const suppliedPromptDisplayText = meta[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
19344
|
+
const submittedPrompt = this.privateParentState === "trusted" ? meta[DAEMON_SUBMITTED_PROMPT_META_KEY] : meta[SUBMITTED_PROMPT_META_KEY];
|
|
18918
19345
|
const suppliedChannelPrompt = meta[CHANNEL_PROMPT_META_KEY];
|
|
19346
|
+
const suppliedGoalProposalApproval = meta["qwen.goalProposalApproval"];
|
|
18919
19347
|
const suppliedChannelDelivery = meta[DAEMON_CHANNEL_DELIVERY_META_KEY];
|
|
18920
19348
|
delete meta[INVOCATION_CONTEXT_META_KEY];
|
|
18921
19349
|
delete meta[DAEMON_MODEL_PROMPT_META_KEY];
|
|
18922
19350
|
delete meta[PRIVATE_PARENT_CAPABILITY_META_KEY];
|
|
18923
19351
|
delete meta[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
19352
|
+
delete meta[SUBMITTED_PROMPT_META_KEY];
|
|
19353
|
+
delete meta[DAEMON_SUBMITTED_PROMPT_META_KEY];
|
|
19354
|
+
if (typeof submittedPrompt === "string" && suppliedChannelPrompt !== true) {
|
|
19355
|
+
meta[DAEMON_SUBMITTED_PROMPT_META_KEY] = submittedPrompt;
|
|
19356
|
+
}
|
|
18924
19357
|
delete meta[CHANNEL_PROMPT_META_KEY];
|
|
19358
|
+
delete meta["qwen.goalProposalApproval"];
|
|
19359
|
+
if (this.privateParentState === "trusted" && suppliedGoalProposalApproval === true) {
|
|
19360
|
+
meta["qwen.goalProposalApproval"] = true;
|
|
19361
|
+
}
|
|
18925
19362
|
delete meta[DAEMON_CHANNEL_DELIVERY_META_KEY];
|
|
18926
19363
|
if (this.privateParentState === "trusted" && typeof suppliedPromptDisplayText === "string") {
|
|
18927
19364
|
meta[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY] = suppliedPromptDisplayText;
|
|
@@ -19824,6 +20261,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
19824
20261
|
buildWorkspaceProvidersStatus(config) {
|
|
19825
20262
|
try {
|
|
19826
20263
|
const workspaceCwd = this.workspaceCwd(config);
|
|
20264
|
+
const settings = loadSettingsCached(workspaceCwd);
|
|
19827
20265
|
const currentAuthType = config.getAuthType?.();
|
|
19828
20266
|
const activeRuntimeSnapshot = config.getActiveRuntimeModelSnapshot?.();
|
|
19829
20267
|
const currentModelId = activeRuntimeSnapshot ? activeRuntimeSnapshot.id : (config.getModel() || "").trim();
|
|
@@ -19854,19 +20292,25 @@ var QwenAgent = class _QwenAgent {
|
|
|
19854
20292
|
providers.set(authType, provider);
|
|
19855
20293
|
}
|
|
19856
20294
|
const isCurrent = currentAuth === model.authType && currentAcpModelId === modelId;
|
|
20295
|
+
const resolved = !model.isRuntimeModel && !modelId.startsWith(ACP_ROUTE_ID_PREFIX) ? config.getResolvedModelConfig?.(
|
|
20296
|
+
model.authType,
|
|
20297
|
+
model.id,
|
|
20298
|
+
model.registryBaseUrl ?? model.baseUrl
|
|
20299
|
+
) : void 0;
|
|
19857
20300
|
const configOptions = model.isRuntimeModel || modelId.startsWith(ACP_ROUTE_ID_PREFIX) ? void 0 : buildModelReasoningConfigPreview(
|
|
19858
20301
|
model.id,
|
|
19859
20302
|
resolvePersistedReasoningConfigState(
|
|
19860
20303
|
model.id,
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
model.authType,
|
|
19864
|
-
model.id,
|
|
19865
|
-
model.registryBaseUrl ?? model.baseUrl
|
|
19866
|
-
)?.generationConfig.thinkingMandatory === true,
|
|
20304
|
+
settings.merged.model?.reasoningEffort,
|
|
20305
|
+
resolved?.generationConfig.thinkingMandatory === true,
|
|
19867
20306
|
model.capabilities?.reasoning
|
|
19868
20307
|
),
|
|
19869
|
-
model.capabilities?.reasoning
|
|
20308
|
+
model.capabilities?.reasoning,
|
|
20309
|
+
resolved ? {
|
|
20310
|
+
...resolved.generationConfig,
|
|
20311
|
+
model: model.id,
|
|
20312
|
+
baseUrl: resolved.baseUrl
|
|
20313
|
+
} : void 0
|
|
19870
20314
|
);
|
|
19871
20315
|
const providerModel = {
|
|
19872
20316
|
modelId,
|
|
@@ -20266,7 +20710,10 @@ var QwenAgent = class _QwenAgent {
|
|
|
20266
20710
|
state: {
|
|
20267
20711
|
models: this.buildAvailableModels(config),
|
|
20268
20712
|
modes: this.buildModesData(config),
|
|
20269
|
-
configOptions: this.buildConfigOptions(
|
|
20713
|
+
configOptions: this.buildConfigOptions(
|
|
20714
|
+
config,
|
|
20715
|
+
session.getDefaultReasoningConfig()
|
|
20716
|
+
)
|
|
20270
20717
|
}
|
|
20271
20718
|
};
|
|
20272
20719
|
}
|
|
@@ -20775,6 +21222,22 @@ var QwenAgent = class _QwenAgent {
|
|
|
20775
21222
|
}
|
|
20776
21223
|
return await this.extMethodInternal(method, normalizedParams);
|
|
20777
21224
|
} catch (error) {
|
|
21225
|
+
if ([
|
|
21226
|
+
"qwen/session/sources/list",
|
|
21227
|
+
"qwen/session/sources/upsert",
|
|
21228
|
+
"qwen/session/sources/remove",
|
|
21229
|
+
"qwen/session/sources/copy"
|
|
21230
|
+
].includes(method)) {
|
|
21231
|
+
if (!(error instanceof SessionSourceError)) {
|
|
21232
|
+
debugLogger9.error("[ACP] Session source ext-method error:", error);
|
|
21233
|
+
}
|
|
21234
|
+
return {
|
|
21235
|
+
sourceError: error instanceof SessionSourceError ? { code: error.code, message: error.message } : {
|
|
21236
|
+
code: "source_persistence_unavailable",
|
|
21237
|
+
message: "Session source operation failed"
|
|
21238
|
+
}
|
|
21239
|
+
};
|
|
21240
|
+
}
|
|
20778
21241
|
const writerError = getSessionWriterError(error);
|
|
20779
21242
|
if (writerError) {
|
|
20780
21243
|
throw new RequestError(writerError.rpcCode, writerError.message, {
|
|
@@ -22235,6 +22698,101 @@ var QwenAgent = class _QwenAgent {
|
|
|
22235
22698
|
}
|
|
22236
22699
|
return { requestId, cancelled };
|
|
22237
22700
|
}
|
|
22701
|
+
case "qwen/session/sources/list":
|
|
22702
|
+
case "qwen/session/sources/upsert":
|
|
22703
|
+
case "qwen/session/sources/remove":
|
|
22704
|
+
case "qwen/session/sources/copy": {
|
|
22705
|
+
if (!this.isTrustedManagedParent()) {
|
|
22706
|
+
throw RequestError.invalidParams(
|
|
22707
|
+
void 0,
|
|
22708
|
+
"Sources require a trusted private ACP parent"
|
|
22709
|
+
);
|
|
22710
|
+
}
|
|
22711
|
+
const sessionId = params["sessionId"];
|
|
22712
|
+
if (typeof sessionId !== "string" || !sessionId) {
|
|
22713
|
+
throw RequestError.invalidParams(
|
|
22714
|
+
void 0,
|
|
22715
|
+
"Invalid source sessionId"
|
|
22716
|
+
);
|
|
22717
|
+
}
|
|
22718
|
+
const session = this.sessionOrThrow(sessionId);
|
|
22719
|
+
const sourceConfig = session.getConfig();
|
|
22720
|
+
const service = sourceConfig.getSessionSourceService();
|
|
22721
|
+
if (method === "qwen/session/sources/copy" && !service && !sourceConfig.getChatRecordingService()) {
|
|
22722
|
+
return { warnings: [] };
|
|
22723
|
+
}
|
|
22724
|
+
if (!service)
|
|
22725
|
+
throw new SessionSourceError(
|
|
22726
|
+
"source_persistence_unavailable",
|
|
22727
|
+
"Session sources unavailable"
|
|
22728
|
+
);
|
|
22729
|
+
if (method === "qwen/session/sources/list")
|
|
22730
|
+
return { ...await service.list() };
|
|
22731
|
+
if (method === "qwen/session/sources/upsert")
|
|
22732
|
+
return { ...await service.upsert(params["input"]) };
|
|
22733
|
+
if (method === "qwen/session/sources/remove") {
|
|
22734
|
+
const sourceId = params["sourceId"];
|
|
22735
|
+
if (typeof sourceId !== "string" || !sourceId || sourceId.length > 200)
|
|
22736
|
+
throw new SessionSourceError("invalid_source", "Invalid source ID");
|
|
22737
|
+
return { ...await service.remove(sourceId) };
|
|
22738
|
+
}
|
|
22739
|
+
const targetSessionId = params["targetSessionId"];
|
|
22740
|
+
const targetCwd = params["targetCwd"];
|
|
22741
|
+
const attachmentIds = params["attachmentIds"];
|
|
22742
|
+
if (typeof targetSessionId !== "string" || !SESSION_ID_RE.test(targetSessionId) || targetSessionId === sessionId || typeof targetCwd !== "string" || path7.resolve(targetCwd) !== path7.resolve(sourceConfig.storage.getProjectRoot()) || !Array.isArray(attachmentIds) || attachmentIds.some((id) => typeof id !== "string")) {
|
|
22743
|
+
throw RequestError.invalidParams(
|
|
22744
|
+
void 0,
|
|
22745
|
+
"Invalid source copy target"
|
|
22746
|
+
);
|
|
22747
|
+
}
|
|
22748
|
+
const sources = (await service.list()).sources;
|
|
22749
|
+
if (!sources.length) return { warnings: [] };
|
|
22750
|
+
const targetData = await sourceConfig.getSessionService().loadSession(targetSessionId);
|
|
22751
|
+
if (!targetData?.conversation.messages.some(
|
|
22752
|
+
(record) => record.forkedFrom?.sessionId === sessionId
|
|
22753
|
+
)) {
|
|
22754
|
+
throw RequestError.invalidParams(
|
|
22755
|
+
void 0,
|
|
22756
|
+
"Source copy target is not a fork of this session"
|
|
22757
|
+
);
|
|
22758
|
+
}
|
|
22759
|
+
let temporaryConfig;
|
|
22760
|
+
try {
|
|
22761
|
+
const targetConfig = this.sessions.get(targetSessionId)?.getConfig() ?? (temporaryConfig = await this.newSessionConfig(
|
|
22762
|
+
targetCwd,
|
|
22763
|
+
[],
|
|
22764
|
+
loadSettings(targetCwd),
|
|
22765
|
+
void 0,
|
|
22766
|
+
targetSessionId,
|
|
22767
|
+
true,
|
|
22768
|
+
{
|
|
22769
|
+
skipMcpDiscovery: true,
|
|
22770
|
+
skipHooks: true,
|
|
22771
|
+
skipSkillManager: true,
|
|
22772
|
+
skipFileCheckpointing: true,
|
|
22773
|
+
lenientToolWarmup: true
|
|
22774
|
+
}
|
|
22775
|
+
));
|
|
22776
|
+
const targetService = targetConfig.getSessionSourceService();
|
|
22777
|
+
if (!targetService)
|
|
22778
|
+
throw new SessionSourceError(
|
|
22779
|
+
"source_persistence_unavailable",
|
|
22780
|
+
"Target sources unavailable"
|
|
22781
|
+
);
|
|
22782
|
+
return await targetService.copyFrom(
|
|
22783
|
+
sources,
|
|
22784
|
+
attachmentIds
|
|
22785
|
+
);
|
|
22786
|
+
} finally {
|
|
22787
|
+
if (temporaryConfig) {
|
|
22788
|
+
try {
|
|
22789
|
+
await this.cleanupUnstoredConfig(temporaryConfig);
|
|
22790
|
+
} catch (error) {
|
|
22791
|
+
debugLogger9.warn("Failed to clean up source copy config:", error);
|
|
22792
|
+
}
|
|
22793
|
+
}
|
|
22794
|
+
}
|
|
22795
|
+
}
|
|
22238
22796
|
case SERVE_CONTROL_EXT_METHODS.sessionArtifactsPersist: {
|
|
22239
22797
|
const sessionId = params["sessionId"];
|
|
22240
22798
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
@@ -22936,6 +23494,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
22936
23494
|
case SERVE_CONTROL_EXT_METHODS.sessionApprovalMode: {
|
|
22937
23495
|
const sessionId = params["sessionId"];
|
|
22938
23496
|
const mode = params["mode"];
|
|
23497
|
+
const planMode = params["planMode"];
|
|
22939
23498
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
22940
23499
|
throw RequestError.invalidParams(
|
|
22941
23500
|
void 0,
|
|
@@ -22948,11 +23507,21 @@ var QwenAgent = class _QwenAgent {
|
|
|
22948
23507
|
`Invalid approval mode; allowed: ${APPROVAL_MODES.join(", ")}`
|
|
22949
23508
|
);
|
|
22950
23509
|
}
|
|
23510
|
+
if (planMode !== void 0 && (typeof planMode !== "boolean" || mode === "plan" /* PLAN */)) {
|
|
23511
|
+
throw RequestError.invalidParams(
|
|
23512
|
+
void 0,
|
|
23513
|
+
"planMode must be a boolean with a non-plan execution mode"
|
|
23514
|
+
);
|
|
23515
|
+
}
|
|
22951
23516
|
const session = this.sessionOrThrow(sessionId);
|
|
22952
23517
|
const config = session.getConfig();
|
|
22953
23518
|
const previous = config.getApprovalMode();
|
|
22954
23519
|
try {
|
|
22955
|
-
|
|
23520
|
+
if (typeof planMode === "boolean") {
|
|
23521
|
+
config.setPlanMode(planMode, mode);
|
|
23522
|
+
} else {
|
|
23523
|
+
config.setApprovalMode(mode);
|
|
23524
|
+
}
|
|
22956
23525
|
} catch (err) {
|
|
22957
23526
|
if (err instanceof Error && err.name === "TrustGateError") {
|
|
22958
23527
|
throw new RequestError(-32003, err.message, {
|
|
@@ -22970,7 +23539,13 @@ var QwenAgent = class _QwenAgent {
|
|
|
22970
23539
|
} else if (previous === "plan") {
|
|
22971
23540
|
session.clearActiveTodoPlanRevision();
|
|
22972
23541
|
}
|
|
22973
|
-
return {
|
|
23542
|
+
return {
|
|
23543
|
+
previous,
|
|
23544
|
+
current,
|
|
23545
|
+
...current === "plan" /* PLAN */ ? {
|
|
23546
|
+
planExecutionMode: config.getPlanExecutionMode?.() ?? config.getPrePlanMode?.()
|
|
23547
|
+
} : {}
|
|
23548
|
+
};
|
|
22974
23549
|
}
|
|
22975
23550
|
case SERVE_CONTROL_EXT_METHODS.workspaceSessionWorkflow: {
|
|
22976
23551
|
const enabled = params["enabled"];
|
|
@@ -24730,9 +25305,7 @@ ${outputText}
|
|
|
24730
25305
|
config.setDisabledTools(new Set(disabled));
|
|
24731
25306
|
}
|
|
24732
25307
|
const workflowsWereEnabled = config.isWorkflowsEnabled();
|
|
24733
|
-
config.setWorkflowsEnabled(
|
|
24734
|
-
newMerged.tools?.workflowsEnabled === true
|
|
24735
|
-
);
|
|
25308
|
+
config.setWorkflowsEnabled(newMerged.tools?.workflowsEnabled);
|
|
24736
25309
|
if (config.isWorkflowsEnabled() !== workflowsWereEnabled) {
|
|
24737
25310
|
try {
|
|
24738
25311
|
await session.sendAvailableCommandsUpdate();
|
|
@@ -25145,6 +25718,9 @@ ${outputText}
|
|
|
25145
25718
|
if (sessionSource) {
|
|
25146
25719
|
config.setSessionSource(sessionSource.sourceType, sessionSource.sourceId);
|
|
25147
25720
|
}
|
|
25721
|
+
if (this.clientCapabilities?._meta?.["qwen.goalProposals"] === true) {
|
|
25722
|
+
config.setGoalProposalHostSupported(true);
|
|
25723
|
+
}
|
|
25148
25724
|
if (chatRecording !== false) {
|
|
25149
25725
|
this.initializingConfigs.add(config);
|
|
25150
25726
|
}
|
|
@@ -25194,6 +25770,9 @@ ${outputText}
|
|
|
25194
25770
|
});
|
|
25195
25771
|
});
|
|
25196
25772
|
}
|
|
25773
|
+
if (!provisionalWorkspace && chatRecording !== false) {
|
|
25774
|
+
this.bindSessionSourceService(config);
|
|
25775
|
+
}
|
|
25197
25776
|
try {
|
|
25198
25777
|
await config.initialize({
|
|
25199
25778
|
...initializeOptions,
|
|
@@ -25219,6 +25798,41 @@ ${outputText}
|
|
|
25219
25798
|
}
|
|
25220
25799
|
return config;
|
|
25221
25800
|
}
|
|
25801
|
+
bindSessionSourceService(config) {
|
|
25802
|
+
if (this.isTrustedManagedParent() && config.getChatRecordingService()) {
|
|
25803
|
+
config.setSessionSourceServiceFactory(() => {
|
|
25804
|
+
const sourceSessionId = config.getSessionId();
|
|
25805
|
+
const recording = config.getChatRecordingService();
|
|
25806
|
+
const sourceSessions = config.getSessionService();
|
|
25807
|
+
const workspaceCwd = config.storage.getProjectRoot();
|
|
25808
|
+
return new SessionSourceService({
|
|
25809
|
+
sessionId: sourceSessionId,
|
|
25810
|
+
workspaceCwd: /* @__PURE__ */ __name(() => workspaceCwd, "workspaceCwd"),
|
|
25811
|
+
load: /* @__PURE__ */ __name(async () => {
|
|
25812
|
+
if (!recording)
|
|
25813
|
+
throw new SessionSourceError(
|
|
25814
|
+
"source_persistence_unavailable",
|
|
25815
|
+
"Chat recording service unavailable"
|
|
25816
|
+
);
|
|
25817
|
+
await recording.flush();
|
|
25818
|
+
return sourceSessions.readSessionSources(sourceSessionId);
|
|
25819
|
+
}, "load"),
|
|
25820
|
+
persist: /* @__PURE__ */ __name(async (snapshot) => {
|
|
25821
|
+
if (!recording)
|
|
25822
|
+
throw new SessionSourceError(
|
|
25823
|
+
"source_persistence_unavailable",
|
|
25824
|
+
"Chat recording service unavailable"
|
|
25825
|
+
);
|
|
25826
|
+
await recording.recordSessionSourcesSnapshot(snapshot);
|
|
25827
|
+
}, "persist"),
|
|
25828
|
+
notify: /* @__PURE__ */ __name((revision) => this.connection.extNotification(
|
|
25829
|
+
"qwen/notify/session/sources-changed",
|
|
25830
|
+
{ sessionId: sourceSessionId, revision }
|
|
25831
|
+
), "notify")
|
|
25832
|
+
});
|
|
25833
|
+
});
|
|
25834
|
+
}
|
|
25835
|
+
}
|
|
25222
25836
|
async surfaceMcpFailuresWhenReady(config) {
|
|
25223
25837
|
try {
|
|
25224
25838
|
await config.waitForMcpReady();
|
|
@@ -25475,6 +26089,9 @@ ${outputText}
|
|
|
25475
26089
|
this.assertManagedSessionAdmission();
|
|
25476
26090
|
await config.activateProvisionalWorkspace();
|
|
25477
26091
|
this.assertManagedSessionAdmission();
|
|
26092
|
+
this.bindSessionSourceService(config);
|
|
26093
|
+
await config.registerSessionSourceTool();
|
|
26094
|
+
await config.getLlmClient().setTools();
|
|
25478
26095
|
this.setupFileSystem(config);
|
|
25479
26096
|
config.hydrateSessionRestoreFileHistory?.();
|
|
25480
26097
|
if (sessionData?.fileHistorySnapshots?.length) {
|
|
@@ -25482,6 +26099,7 @@ ${outputText}
|
|
|
25482
26099
|
}
|
|
25483
26100
|
await replaySessionHistory();
|
|
25484
26101
|
await options.beforeStartPostReplayServices?.(session);
|
|
26102
|
+
await config.getLlmClient().refreshStartupContextReminder();
|
|
25485
26103
|
session.installRewriter();
|
|
25486
26104
|
config.finalizeSessionRestore?.();
|
|
25487
26105
|
startNonInteractiveOpenAILogHousekeeping(config, settings);
|
|
@@ -25548,6 +26166,7 @@ ${outputText}
|
|
|
25548
26166
|
);
|
|
25549
26167
|
}
|
|
25550
26168
|
this.sessions.set(sessionId, session);
|
|
26169
|
+
this.registerHostedSession(sessionId, config, settings);
|
|
25551
26170
|
this.sessionApprovalModeConverged.set(
|
|
25552
26171
|
sessionId,
|
|
25553
26172
|
config.getApprovalMode()
|
|
@@ -25643,10 +26262,15 @@ ${outputText}
|
|
|
25643
26262
|
}));
|
|
25644
26263
|
return {
|
|
25645
26264
|
currentModeId: currentApprovalMode,
|
|
26265
|
+
...currentApprovalMode === "plan" /* PLAN */ ? {
|
|
26266
|
+
_meta: {
|
|
26267
|
+
planExecutionMode: config.getPlanExecutionMode?.() ?? config.getPrePlanMode?.()
|
|
26268
|
+
}
|
|
26269
|
+
} : {},
|
|
25646
26270
|
availableModes
|
|
25647
26271
|
};
|
|
25648
26272
|
}
|
|
25649
|
-
buildConfigOptions(config) {
|
|
26273
|
+
buildConfigOptions(config, defaultReasoning) {
|
|
25650
26274
|
const currentApprovalMode = config.getApprovalMode();
|
|
25651
26275
|
const modelOptions = this.buildSelectableModelOptions(config);
|
|
25652
26276
|
const rawCurrentModelId = (config.getModel() || "").trim();
|
|
@@ -25711,17 +26335,26 @@ ${outputText}
|
|
|
25711
26335
|
const normalizedBudgetOverride = reasoningOverride?.field === "thinking_budget" && typeof reasoningOverrideValue === "number" && Number.isFinite(reasoningOverrideValue) && reasoningOverrideValue >= 0 && reasoningOverrideValue <= 262144 ? reasoningOverrideValue <= 4096 ? "low" : reasoningOverrideValue <= 16384 ? "medium" : "xhigh" : void 0;
|
|
25712
26336
|
const normalizedOverrideEffort = normalizedEffortOverride ?? normalizedBudgetOverride;
|
|
25713
26337
|
const overrideDisablesReasoning = reasoningOverride?.field === "enable_thinking" && reasoningOverrideValue === false || reasoningOverride?.field === "reasoning_effort" && reasoningOverrideValue === REASONING_EFFORT_NONE;
|
|
26338
|
+
const gptOverride = getGptReasoningOverrideState(
|
|
26339
|
+
generation,
|
|
26340
|
+
modelReasoning
|
|
26341
|
+
);
|
|
26342
|
+
const gptEnableOverride = generation.reasoning === false ? getGptReasoningOverrideState(
|
|
26343
|
+
{ ...generation, reasoning: void 0 },
|
|
26344
|
+
modelReasoning
|
|
26345
|
+
) : gptOverride;
|
|
25714
26346
|
const mandatoryUsesDefaultEffort = generation.thinkingMandatory === true && (overrideDisablesReasoning || generation.reasoning === false && reasoningOverride?.field === "reasoning_effort");
|
|
25715
|
-
const effectiveModelEffort = modelReasoning && !modelReasoning.toggleOnly ? mandatoryUsesDefaultEffort ? modelReasoning.defaultEffort : normalizedOverrideEffort ? modelReasoning.efforts?.find(
|
|
26347
|
+
const effectiveModelEffort = modelReasoning && !modelReasoning.toggleOnly ? mandatoryUsesDefaultEffort || gptOverride?.useDefaultEffort ? modelReasoning.defaultEffort : normalizedOverrideEffort ? modelReasoning.efforts?.find(
|
|
25716
26348
|
(effort) => effort === normalizedOverrideEffort
|
|
25717
|
-
) ?? modelReasoning.defaultEffort : currentModelEffort : currentModelEffort;
|
|
25718
|
-
const reasoningEnabled = generation.reasoning !== false && (!reasoningOverride || !overrideDisablesReasoning);
|
|
26349
|
+
) ?? modelReasoning.defaultEffort : gptOverride?.effort ?? currentModelEffort : currentModelEffort;
|
|
26350
|
+
const reasoningEnabled = generation.reasoning === void 0 && !reasoningOverride && gptOverride?.enabled === void 0 ? void 0 : generation.reasoning !== false && (!reasoningOverride || !overrideDisablesReasoning) && gptOverride?.enabled !== false;
|
|
25719
26351
|
const canDisableReasoning = generation.thinkingMandatory !== true;
|
|
25720
26352
|
const reasoningEffortConfigOption = (modelReasoning ? buildModelReasoningConfigOption(
|
|
25721
26353
|
rawCurrentModelId,
|
|
25722
26354
|
{
|
|
25723
26355
|
enabled: reasoningEnabled,
|
|
25724
26356
|
effort: effectiveModelEffort,
|
|
26357
|
+
...gptEnableOverride?.blocksTierChange ? gptEnableOverride.enabled && defaultReasoning !== false ? { enableValue: REASONING_EFFORT_DEFAULT } : { canEnable: false } : {},
|
|
25725
26358
|
thinkingMandatory: generation.thinkingMandatory === true
|
|
25726
26359
|
},
|
|
25727
26360
|
modelReasoning
|