@qwen-code/qwen-code 0.23.2 → 0.23.3-nightly.20260911.aaa6a32aae
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 +10 -10
- package/bundled/qc-helper/docs/configuration/model-providers.md +66 -28
- package/bundled/qc-helper/docs/configuration/settings.md +8 -3
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +0 -20
- package/bundled/qc-helper/docs/features/channels/dws.md +7 -1
- package/bundled/qc-helper/docs/features/channels/overview.md +5 -6
- package/bundled/qc-helper/docs/features/commands.md +62 -9
- package/bundled/qc-helper/docs/features/computer-use.md +1 -1
- package/bundled/qc-helper/docs/features/cross-session-protocol.md +338 -0
- package/bundled/qc-helper/docs/features/goals.md +22 -18
- package/bundled/qc-helper/docs/features/hooks.md +28 -22
- package/bundled/qc-helper/docs/features/sub-agents.md +27 -0
- package/bundled/qc-helper/docs/qwen-serve.md +23 -6
- package/bundled/review/SKILL.md +93 -80
- package/bundled/review/references/persistence.md +2 -0
- package/bundled/review/references/posting.md +31 -14
- package/bundled/workflow-authoring/SKILL.md +410 -0
- package/bundled/workflow-creator/SKILL.md +1 -1
- package/chunks/{MaxSizedBox-4C3BKKKY.js → MaxSizedBox-7C5XTBZI.js} +64 -53
- package/chunks/{StandaloneSessionPicker-TXVF65YW.js → StandaloneSessionPicker-IGTT3ZRX.js} +88 -76
- package/chunks/{acp-startup-profiler-KEU6VAYR.js → acp-startup-profiler-RUQNTNU5.js} +2 -2
- package/chunks/acp-subagent-executor-IUHVNVVO.js +140 -0
- package/chunks/{acpAgent-H5XBKGB4.js → acpAgent-W43WM2K4.js} +957 -243
- package/chunks/{agent-T5LEFJIU.js → agent-2XMXC5JW.js} +48 -38
- package/chunks/{agent-headless-VZKSRH36.js → agent-headless-2HHBVCP6.js} +48 -38
- package/chunks/{anthropicContentGenerator-PRJWWVYJ.js → anthropicContentGenerator-7RI3MPIW.js} +69 -36
- package/chunks/{artifact-tool-G5LHNECG.js → artifact-tool-HHVHCPNG.js} +59 -109
- package/chunks/{askUserQuestion-I5W5S3D6.js → askUserQuestion-RFMXTD3B.js} +2 -2
- package/chunks/{bridge-AOX5IY44.js → bridge-ID6N4IH5.js} +69 -58
- package/chunks/{ca-KC2AISNS.js → ca-MX3WCEEG.js} +1 -1
- package/chunks/{channel-management-service-MWQGHPAS.js → channel-management-service-ASCXI7FR.js} +6 -6
- package/chunks/{channel-settings-store-XZCGDGHW.js → channel-settings-store-TPJFQAZY.js} +76 -65
- package/chunks/{channel-worker-group-SQ5FRWOH.js → channel-worker-group-JR6JOELM.js} +9 -9
- package/chunks/{channel-worker-manager-TU4ZNWOE.js → channel-worker-manager-AVKJEZFL.js} +19 -10
- package/chunks/{channel-worker-supervisor-EMITFMCP.js → channel-worker-supervisor-OOYY7BAQ.js} +7 -7
- package/chunks/{chunk-4WMGYG3F.js → chunk-22FWWGSM.js} +2 -2
- package/chunks/{chunk-LWX4WDFF.js → chunk-2S5RIGZJ.js} +43 -15
- package/chunks/{chunk-CLKE4IY3.js → chunk-2SZH22YO.js} +1 -1
- package/chunks/{chunk-HJ5UJQQL.js → chunk-2UKKQGRA.js} +3639 -1804
- package/chunks/{chunk-MWIO7MF6.js → chunk-2WSLXP3W.js} +4 -0
- package/chunks/{chunk-HNLMYDQE.js → chunk-33LYAC4R.js} +10 -6
- package/chunks/{chunk-VBLAI2HA.js → chunk-3FPYT6QC.js} +0 -31
- package/chunks/{chunk-F53KKZUD.js → chunk-3LMDSCLU.js} +158 -10
- package/chunks/{chunk-WXFCI3O5.js → chunk-3MAUPOZ4.js} +2 -2
- package/chunks/{chunk-CRZBDVP2.js → chunk-432JQKIO.js} +10 -10
- package/chunks/{chunk-IRGDIDGJ.js → chunk-43RQ552L.js} +364 -84
- package/chunks/{chunk-PFKGV6PO.js → chunk-465USTVK.js} +9 -15
- package/chunks/{chunk-WG7BL3FY.js → chunk-473RJLIH.js} +1 -1
- package/chunks/{chunk-J3VZF2AL.js → chunk-4O2AXZXU.js} +2 -2
- package/chunks/{chunk-N6S3NUYJ.js → chunk-55VOWZ4C.js} +1 -1
- package/chunks/{chunk-OWCFKIFQ.js → chunk-5CZMWDJI.js} +2 -2
- package/chunks/{chunk-7NDZKE2M.js → chunk-5MUIHID6.js} +5 -5
- package/chunks/{chunk-RM244SCQ.js → chunk-5Z74GE4N.js} +1 -1
- package/chunks/{chunk-G5VOXCRX.js → chunk-6375QMAO.js} +2 -2
- package/chunks/{chunk-3LPJ776W.js → chunk-63GQZKXL.js} +164 -31
- package/chunks/{chunk-O2FEO2CB.js → chunk-6GDELAVL.js} +18 -2
- package/chunks/{chunk-7PD7ZMX5.js → chunk-6HI2I3OM.js} +168 -6
- package/chunks/{chunk-CALNF3Z3.js → chunk-7C57HCOR.js} +1 -1
- package/chunks/{chunk-UYDQYDW2.js → chunk-7IBS746B.js} +1 -1
- package/chunks/{chunk-AUTUFD5X.js → chunk-ABNX6E6K.js} +1 -1
- package/chunks/chunk-ACHCT36C.js +28 -0
- package/chunks/{chunk-2WC3Y7YY.js → chunk-AEY27Z35.js} +401 -23
- package/chunks/{chunk-AO2VMS72.js → chunk-AQFRRH73.js} +3 -3
- package/chunks/{chunk-PDN7FJZV.js → chunk-ASWEMQIZ.js} +4 -4
- package/chunks/chunk-AYEJOTIU.js +43 -0
- package/chunks/{chunk-QFJZAY7W.js → chunk-BKFRA4F5.js} +5 -5
- package/chunks/{chunk-KCF2436G.js → chunk-BNLW5N6U.js} +4 -4
- package/chunks/{chunk-GOKAOSCN.js → chunk-BRFOZEPA.js} +2 -2
- package/chunks/{process-registry-OAEG6WGC.js → chunk-BYUAT5OC.js} +1 -0
- package/chunks/chunk-C5CECJ46.js +340 -0
- package/chunks/{chunk-NOO4QFXM.js → chunk-C75BXMPM.js} +1 -3
- package/chunks/chunk-CAAMI77K.js +937 -0
- package/chunks/{chunk-QTB4VP4K.js → chunk-CBGHRAWM.js} +304 -23
- package/chunks/chunk-CF5KXZZX.js +150 -0
- package/chunks/chunk-CFMZLE3L.js +75 -0
- package/chunks/{chunk-TGNNLRC3.js → chunk-CJ3DHN5I.js} +1 -0
- package/chunks/{chunk-ERXNTINK.js → chunk-CQZJYGRX.js} +1 -1
- package/chunks/{chunk-WBU2PIZ5.js → chunk-CSDKDHWV.js} +23 -16
- package/chunks/{chunk-2EKVPSIJ.js → chunk-D754KKNZ.js} +9 -2
- package/chunks/{chunk-E6TI726I.js → chunk-DGC7BKEZ.js} +1 -1
- package/chunks/{chunk-7SVM3RP2.js → chunk-DMMOQWRF.js} +4 -6
- package/chunks/{chunk-J3TJH52D.js → chunk-DOTF2PF2.js} +1 -1
- package/chunks/{chunk-2BMXHB6N.js → chunk-DWBNQR53.js} +7 -7
- package/chunks/{chunk-ZN5TKAVR.js → chunk-E5LTUWKZ.js} +3 -3
- package/chunks/chunk-EGW3ZP6Y.js +32 -0
- package/chunks/chunk-ELRMZTPF.js +374 -0
- package/chunks/{chunk-RNAJVXUG.js → chunk-ENAUXRPG.js} +6 -6
- package/chunks/{chunk-WXD7INFV.js → chunk-EO4U2X47.js} +10 -8
- package/chunks/{chunk-WDVV3LRM.js → chunk-EPVEPTI3.js} +45 -152
- package/chunks/chunk-ERU3SDXT.js +27 -0
- package/chunks/{chunk-4HOEU2OR.js → chunk-EWJTAP3Y.js} +1 -19
- package/chunks/{chunk-GSFV5RQW.js → chunk-EYN3G5XD.js} +328 -4
- package/chunks/{chunk-QB3KS3N3.js → chunk-FGROOEKM.js} +5 -40
- package/chunks/{chunk-TOOOLHVS.js → chunk-FH5AVEWJ.js} +3 -3
- package/chunks/{chunk-DAI65CMX.js → chunk-FJZWRNEW.js} +1 -1
- package/chunks/{chunk-GNY7B3CA.js → chunk-FUQK5ZNL.js} +1 -1
- package/chunks/{chunk-GOEVQADN.js → chunk-GDIPPCW6.js} +330 -175
- package/chunks/{chunk-ALMR3E6Q.js → chunk-GDWE23OR.js} +3 -3
- package/chunks/{chunk-LNYV4GXX.js → chunk-GSKX53AN.js} +0 -139
- package/chunks/{chunk-ELD3OBPU.js → chunk-GWOVD63C.js} +3 -3
- package/chunks/{chunk-IWABUX6T.js → chunk-GX5FF2IE.js} +6 -6
- package/chunks/{chunk-22GORRNY.js → chunk-GZMNHAYC.js} +1 -1
- package/chunks/{chunk-YZTGGCEE.js → chunk-H3TFIFX3.js} +1 -1
- package/chunks/{chunk-6G4V7SE4.js → chunk-HG46TTAG.js} +1 -1
- package/chunks/{chunk-FETY36NQ.js → chunk-HGEUHUEV.js} +1 -1
- package/chunks/{chunk-KEPC5BOL.js → chunk-IBRQG2MP.js} +12 -15
- package/chunks/{chunk-OXR34GCD.js → chunk-IILWL3KY.js} +2054 -146
- package/chunks/{chunk-IW6RQPQB.js → chunk-IJOS26LH.js} +1 -3
- package/chunks/{chunk-ORFIYTI2.js → chunk-IK2MWJP5.js} +1 -1
- package/chunks/{chunk-CMWU6P4D.js → chunk-IRJRB3OD.js} +1 -1
- package/chunks/{chunk-QHLHE2OT.js → chunk-IUN5ZMFY.js} +1 -1
- package/chunks/{chunk-LYT2OU7D.js → chunk-IXXV6BVB.js} +172 -6
- package/chunks/{chunk-R3JIDRUL.js → chunk-J6H4JP25.js} +4 -4
- package/chunks/{chunk-NB3NDQQK.js → chunk-J6SBP5G2.js} +1 -1
- package/chunks/{chunk-TRQNRP2H.js → chunk-J7LBAKDH.js} +46 -3
- package/chunks/{chunk-67XTVRVB.js → chunk-JJFHISXU.js} +30 -25
- package/chunks/chunk-JL6APGBX.js +43 -0
- package/chunks/{chunk-NX7ZTXFF.js → chunk-JSKEW4E7.js} +2 -1
- package/chunks/{chunk-BK7D2JR6.js → chunk-JVTXAA35.js} +3 -3
- package/chunks/chunk-K2OJUPOE.js +78 -0
- package/chunks/{chunk-G3ZUMSFS.js → chunk-K3U6VB3O.js} +6 -6
- package/chunks/{chunk-4I3WFI3U.js → chunk-K4KWLF7Q.js} +12 -12
- package/chunks/{chunk-WXPPUPHM.js → chunk-KWFFJ6AK.js} +1 -1
- package/chunks/{chunk-46MMBZHI.js → chunk-KZYOFJ6V.js} +4 -4
- package/chunks/{chunk-ULZECEIP.js → chunk-LDQHA6L4.js} +2 -20
- package/chunks/{chunk-7LTCFO6T.js → chunk-LQBAFO5D.js} +6 -5
- package/chunks/{chunk-SOA4HKRJ.js → chunk-LT2XFADM.js} +2 -2
- package/chunks/{chunk-JYGIJA4W.js → chunk-LWWRJRCD.js} +1 -1
- package/chunks/{chunk-YQGW3M6Z.js → chunk-MFQWRBFB.js} +5 -5
- package/chunks/{chunk-TODNHE76.js → chunk-MUFGTWQH.js} +5 -5
- package/chunks/{chunk-5DQ4YTIZ.js → chunk-MV5XRRML.js} +3 -3
- package/chunks/{chunk-IR6JKBAP.js → chunk-NOUK63IR.js} +2 -2
- package/chunks/{chunk-XQ4RDO5B.js → chunk-NV77SEX3.js} +1 -1
- package/chunks/{chunk-OFVAS4AR.js → chunk-NWDPOFJI.js} +2 -2
- package/chunks/chunk-NY6OPAPS.js +820 -0
- package/chunks/{chunk-WDN64MVT.js → chunk-O5VX66FB.js} +127 -18
- package/chunks/{chunk-MV5DTLJV.js → chunk-OHCR4O3U.js} +1 -1
- package/chunks/{chunk-LEAOJ43M.js → chunk-OKOPKQ2X.js} +1310 -2107
- package/chunks/{chunk-B25JYXZE.js → chunk-ONLJBOI2.js} +971 -17
- package/chunks/{chunk-QQK4L3UU.js → chunk-OWUAZXXN.js} +132 -26
- package/chunks/{chunk-R457KFV7.js → chunk-P42IUOAO.js} +3 -3
- package/chunks/{chunk-LUNC5KCL.js → chunk-PRELUGCQ.js} +214 -39
- package/chunks/{chunk-5OZUKLL7.js → chunk-QSMQKTXV.js} +4 -4
- package/chunks/{chunk-FAJPLSYF.js → chunk-QTQYLQ5A.js} +85 -81
- package/chunks/{chunk-CALTQWTZ.js → chunk-QVZDV4ZS.js} +2 -2
- package/chunks/{chunk-J6MB5ZHZ.js → chunk-QZW6WRB7.js} +2 -1
- package/chunks/{chunk-KFECPHLV.js → chunk-RBWAGV73.js} +3 -3
- package/chunks/{chunk-4VY3ITHR.js → chunk-RF5RQRTD.js} +3 -3
- package/chunks/{chunk-HIXUUCGY.js → chunk-RPMXMR6U.js} +2 -2
- package/chunks/{chunk-3OAXF3UK.js → chunk-RRQEZBL2.js} +3756 -1343
- package/chunks/{chunk-4ALNJDHL.js → chunk-RSGEAWFJ.js} +19 -1
- package/chunks/{chunk-5BH2AIEY.js → chunk-RUE62UH6.js} +2 -2
- package/chunks/{chunk-PQEISIKS.js → chunk-SAH4BD2J.js} +0 -67
- package/chunks/{chunk-A7EFXK7P.js → chunk-SAOJHRWY.js} +2 -2
- package/chunks/{chunk-JO77FGNZ.js → chunk-SDUIETBG.js} +19 -7
- package/chunks/{chunk-6RZX2HIH.js → chunk-TBEXLLAO.js} +2 -2
- package/chunks/{chunk-PSPAM24S.js → chunk-TBSCTWKF.js} +6 -0
- package/chunks/{chunk-HRPFBHW7.js → chunk-TPKQIA7G.js} +1 -0
- package/chunks/{chunk-XDNFODER.js → chunk-TUIW5LLK.js} +1 -1
- package/chunks/{chunk-APXIW2TF.js → chunk-TVV5FA3G.js} +4 -4
- package/chunks/chunk-U6H3XTFA.js +95 -0
- package/chunks/{chunk-S5QR6CB5.js → chunk-UKMWZ5NS.js} +108 -887
- package/chunks/{chunk-U6REWGVR.js → chunk-VG2BRSEK.js} +2 -2
- package/chunks/chunk-VGBOJH2D.js +127 -0
- package/chunks/chunk-VGY2RGXL.js +100 -0
- package/chunks/{chunk-ZP5XDLSA.js → chunk-VLWG3EHY.js} +12 -12
- package/chunks/{chunk-4JNHNVAZ.js → chunk-W547PYQ7.js} +9 -4
- package/chunks/{chunk-7VEYUF3N.js → chunk-W5ZQMAEM.js} +1 -1
- package/chunks/{chunk-QAZ2MGYT.js → chunk-W7JJLUSB.js} +2 -2
- package/chunks/{chunk-CCBTNJB4.js → chunk-W7Q7XDQI.js} +39 -27
- package/chunks/{chunk-DARWOZY6.js → chunk-WD6YQI5M.js} +1 -1
- package/chunks/{chunk-F2NYVASI.js → chunk-WXAWG3JS.js} +30 -13
- package/chunks/{chunk-NPKCVSXX.js → chunk-XB5JRCAM.js} +11 -9
- package/chunks/{chunk-XSOXPG2L.js → chunk-XE46RQFI.js} +136 -8
- package/chunks/{chunk-QTNCGZHQ.js → chunk-XX5HQLCZ.js} +16 -0
- package/chunks/{chunk-2Z3T52OC.js → chunk-Y5TM7SBV.js} +7 -2
- package/chunks/chunk-YC6XOB5N.js +691 -0
- package/chunks/{chunk-CWVZBIZJ.js → chunk-YDW4ERSS.js} +1 -1
- package/chunks/{chunk-TRWQQBVH.js → chunk-YGCTOXUT.js} +10 -24
- package/chunks/{chunk-WK7P62DV.js → chunk-YKC67ZEF.js} +6 -6
- package/chunks/{chunk-KA5HR3G2.js → chunk-YKM6MITI.js} +5 -5
- package/chunks/{chunk-X7LFJF5D.js → chunk-YM6KUQ2S.js} +36 -84
- package/chunks/{chunk-HZ2HUXX7.js → chunk-YS2ZJSOA.js} +29 -12
- package/chunks/{chunk-G37O7YO6.js → chunk-ZAWM6KRF.js} +3 -3
- package/chunks/{chunk-H3Q3RSKZ.js → chunk-ZFIWHBJ3.js} +1 -1
- package/chunks/{chunk-XBVNNDPK.js → chunk-ZHKTKHMO.js} +8 -1
- package/chunks/{chunk-YLOHCA6I.js → chunk-ZKWO4CF4.js} +2 -2
- package/chunks/{chunk-VJJXG73H.js → chunk-ZMQL5BL5.js} +21 -6
- package/chunks/{chunk-FGHPZGOP.js → chunk-ZMUYBOYB.js} +39 -55
- package/chunks/{chunk-FV4DM2M4.js → chunk-ZNI3YJHS.js} +26 -6
- package/chunks/{chunk-565U2ANU.js → chunk-ZTTC7T4X.js} +1 -1
- package/chunks/{chunk-7OCIQNKX.js → chunk-ZW2EUO2A.js} +1 -1
- package/chunks/codex-subagent-executor-26XOHVKH.js +585 -0
- package/chunks/{config-utils-GPLIABL2.js → config-utils-JUG3MOYN.js} +68 -57
- package/chunks/{contextCommand-NCUQUDBY.js → contextCommand-6K3POZFA.js} +65 -54
- package/chunks/{core-runtime-WKYKWVYU.js → core-runtime-XQFZLA2V.js} +66 -55
- package/chunks/{create-sub-session-TGIX63YU.js → create-sub-session-4UJ6RM6W.js} +5 -2
- package/chunks/{create-sub-session-PPLXB3JJ.js → create-sub-session-T4IYIOC7.js} +178 -91
- package/chunks/{cron-create-GTPVMJCF.js → cron-create-6466RWSO.js} +2 -2
- package/chunks/{cron-delete-ZBK27Z4K.js → cron-delete-W4QUWHOA.js} +2 -2
- package/chunks/{cron-list-KTFKFDKC.js → cron-list-Q5LJ5PZE.js} +2 -2
- package/chunks/{daemon-2CKIAO3I.js → daemon-PHPJUXDZ.js} +4 -2
- package/chunks/{daemon-git-worktree-guard-73ZWOLKL.js → daemon-git-worktree-guard-5WEMZ64U.js} +65 -54
- package/chunks/{daemon-status-provider-OK7VONJG.js → daemon-status-provider-GMD7QD4T.js} +74 -63
- package/chunks/{daemon-trust-policy-CAUCREG2.js → daemon-trust-policy-IPBZES2Z.js} +71 -60
- package/chunks/{daemon-trust-policy-monitor-3Y36OOEQ.js → daemon-trust-policy-monitor-MHYEN7X7.js} +71 -60
- package/chunks/{de-UU2YTO37.js → de-OOLZAU2U.js} +1 -1
- package/chunks/{deferred-core-runtime-Q7WFWYD3.js → deferred-core-runtime-CY43FZNZ.js} +63 -52
- package/chunks/{discovery-XP4RMDUM.js → discovery-5KUEPR65.js} +2 -2
- package/chunks/{display-image-CTNHJRZC.js → display-image-6AZIHP3J.js} +3 -3
- package/chunks/{dist-F34J4FZX.js → dist-2QYIVNS6.js} +2 -5
- package/chunks/{dist-6YDUH3BB.js → dist-GIMQXYLI.js} +10 -631
- package/chunks/{dist-NP7QKLVG.js → dist-GUB7QRYA.js} +3 -6
- package/chunks/{dist-Y5KC3IHW.js → dist-L45UB6DG.js} +233 -35
- package/chunks/{dist-XLV33CLY.js → dist-MPUZZOG5.js} +5 -18
- package/chunks/{dist-ZDNJK74R.js → dist-PA7WPFVE.js} +6 -37
- package/chunks/{dist-F6JLAJLE.js → dist-T6DDPDLQ.js} +16 -36
- package/chunks/{dist-BNQVF565.js → dist-TFGETXFN.js} +14 -37
- package/chunks/{dist-UFTFGI6I.js → dist-VDLSBCLM.js} +2 -6
- package/chunks/{edit-YJD6IETK.js → edit-6NUP5IPX.js} +48 -38
- package/chunks/{en-YJNRUQG4.js → en-ZSZW3PZX.js} +4 -1
- package/chunks/{enter-worktree-YFTKHXHZ.js → enter-worktree-EETDMJRF.js} +5 -5
- package/chunks/{enterPlanMode-EFPVTWIH.js → enterPlanMode-AZHYHEII.js} +48 -38
- package/chunks/{environment-HP3AXFTB.js → environment-ON6GIQ4F.js} +66 -55
- package/chunks/{errors-22ON46G7.js → errors-DQE63SCC.js} +65 -54
- package/chunks/exec-66WQIVYU.js +505 -0
- package/chunks/{exit-worktree-NF2XEMES.js → exit-worktree-DIPJ6S55.js} +5 -5
- package/chunks/{exitPlanMode-MOQUNCBH.js → exitPlanMode-NHBV6LAI.js} +48 -38
- package/chunks/{fast-path-2X7BPMXX.js → fast-path-EPJSUZZC.js} +7 -7
- package/chunks/{fast-path-settings-SATXY3PD.js → fast-path-settings-XDYX7X5Z.js} +2 -2
- package/chunks/{fr-HKNWVXRJ.js → fr-JJWM2HUS.js} +1 -1
- package/chunks/{glob-Y7ACIB3P.js → glob-MNEXQ2NV.js} +51 -41
- package/chunks/{goal-tools-DABMICUC.js → goal-tools-D2A4QBCJ.js} +54 -40
- package/chunks/{grep-BLHF2S5D.js → grep-EFWPV3MM.js} +2 -2
- package/chunks/{handleAutoUpdate-MCAMHYDI.js → handleAutoUpdate-2RY3OQA6.js} +67 -56
- package/chunks/{i18n-C3GDCALP.js → i18n-HTHDB3I7.js} +64 -53
- package/chunks/{image-gen-XP4NNIYG.js → image-gen-2PHED3P4.js} +8 -6
- package/chunks/{initializer-4URDQL2G.js → initializer-JEVLJCQA.js} +71 -60
- package/chunks/{installationInfo-LBOL6SBV.js → installationInfo-ITRB6J4L.js} +63 -52
- package/chunks/{ja-GJS5RZGU.js → ja-L67TXFDJ.js} +1 -1
- package/chunks/list-KOUIMHT5.js +133 -0
- package/chunks/{list-agents-2CXPGJUE.js → list-agents-IY4NEWLP.js} +17 -7
- package/chunks/{llm-2KPNSAVY.js → llm-F7WHGESY.js} +132 -120
- package/chunks/{llm-content-generator-GR3FOHLB.js → llm-content-generator-NYQ2NAVA.js} +6 -5
- package/chunks/{loadedSettingsAdapter-DVKROEJD.js → loadedSettingsAdapter-HZUAX5CX.js} +71 -60
- package/chunks/{loggingContentGenerator-P4K6K5W4.js → loggingContentGenerator-WMNU7C5J.js} +70 -59
- package/chunks/{loop-wakeup-HL6XOWI4.js → loop-wakeup-ANX25YW2.js} +3 -3
- package/chunks/{ls-YV7RKLKY.js → ls-4XCMJNZF.js} +4 -4
- package/chunks/{lsp-NO3AMRZT.js → lsp-K5E2Y64R.js} +1 -1
- package/chunks/{managed-npm-update-VWBKHNIN.js → managed-npm-update-EJJB65QI.js} +63 -52
- package/chunks/mcp-I73R6HS3.js +127 -0
- package/chunks/{monitor-A255TNZR.js → monitor-T56GJNA4.js} +50 -40
- package/chunks/{nonInteractiveCli-LXGIKQAT.js → nonInteractiveCli-CKHHJ423.js} +120 -109
- package/chunks/{notebook-edit-5UYHS2DM.js → notebook-edit-W5TU3EZ3.js} +48 -38
- package/chunks/openai-WX26N5OJ.js +47 -0
- package/chunks/{openaiContentGenerator-A6MAMEO5.js → openaiContentGenerator-TH6YAWAH.js} +33 -25
- package/chunks/openaiResponsesContentGenerator-EWLWQPKS.js +1738 -0
- package/chunks/{pidfile-B7DZC4TP.js → pidfile-RCC6TCEM.js} +63 -52
- package/chunks/process-registry-X6ZCASEN.js +10 -0
- package/chunks/{processUtils-BPZ2MCZS.js → processUtils-DQDQBRMC.js} +2 -2
- package/chunks/{prompt-terminal-ledger-FYYTAOXS.js → prompt-terminal-ledger-2LXWAGWU.js} +64 -53
- package/chunks/{pt-FXMYXEUV.js → pt-77SBDL4B.js} +1 -1
- package/chunks/{qwenContentGenerator-4IOJFD4S.js → qwenContentGenerator-LG65Z2YV.js} +61 -49
- package/chunks/{qwenOAuth2-KX6LVYQ3.js → qwenOAuth2-PJ63CCFD.js} +7 -5
- package/chunks/{read-file-A4H4O3VQ.js → read-file-72HMRUT4.js} +12 -9
- package/chunks/{read-mcp-resource-D3N75DGF.js → read-mcp-resource-NPF44YSC.js} +1 -1
- package/chunks/{record-artifact-Q5CRGJTP.js → record-artifact-MDXCCW2J.js} +3 -3
- package/chunks/record-source-VJLKDGGR.js +22 -0
- package/chunks/{report-findings-TJ34R7QK.js → report-findings-CZTYMZTC.js} +4 -4
- package/chunks/{request-shutdown-LRKMTBAD.js → request-shutdown-KOZHPVZU.js} +5 -5
- package/chunks/{resumeHistoryUtils-YQQ43E4N.js → resumeHistoryUtils-S2Q3M3EH.js} +69 -58
- package/chunks/{ripGrep-W32NWFTA.js → ripGrep-B2I3L5CO.js} +17 -13
- package/chunks/{ru-RMHURE5U.js → ru-UYWHKWF2.js} +1 -1
- package/chunks/{run-qwen-serve-WBSWWIRV.js → run-qwen-serve-AOPYFCVP.js} +305 -132
- package/chunks/{runtime-VRVBX2E5.js → runtime-TZMHKZAP.js} +77 -66
- package/chunks/{scheduled-tasks-D65KJDA3.js → scheduled-tasks-7RL6ZOYT.js} +72 -60
- package/chunks/{scheduler-M2YPN7Z7.js → scheduler-D6RLOFNU.js} +65 -54
- 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-76BKWKFZ.js → send-message-MMZVSS7P.js} +12 -9
- package/chunks/{serve-BE3H2P6P.js → serve-HWWDYI37.js} +72 -61
- package/chunks/{server-FLY5JERG.js → server-MD2X5U5L.js} +3156 -564
- package/chunks/{session-JVN62R5K.js → session-AFUMFNN7.js} +124 -113
- package/chunks/{session-attachments-root-7ACGLHXA.js → session-attachments-root-QPN3YWTY.js} +63 -52
- package/chunks/{session-pr-refresh-TQS57SDK.js → session-pr-refresh-4Y2ANMJX.js} +72 -60
- package/chunks/{settings-D44YMZFT.js → settings-QQRQ2LR7.js} +74 -63
- package/chunks/{shell-3VE6I4V5.js → shell-NUYUYMVI.js} +48 -38
- package/chunks/{skill-FHEGRRZU.js → skill-KHLDVOXW.js} +68 -30
- package/chunks/{skill-settings-VHEJMBFL.js → skill-settings-INLEGDEZ.js} +70 -59
- package/chunks/{spawnChannel-T6MX2ZDN.js → spawnChannel-KBGZHW2G.js} +67 -56
- package/chunks/{standalone-update-QUGHFMCS.js → standalone-update-3QP5NDVJ.js} +65 -54
- package/chunks/{start-opentui-ui-IHIIZ2LE.js → start-opentui-ui-VBT3XDWN.js} +2682 -2153
- package/chunks/{startInteractiveUI-LR7K2ARZ.js → startInteractiveUI-AZHKCHMR.js} +1562 -2317
- package/chunks/{syntheticOutput-D2P5V6RG.js → syntheticOutput-KRASPDE3.js} +2 -2
- package/chunks/{task-create-MWXJFRRM.js → task-create-TNXNT7ZD.js} +8 -8
- package/chunks/{task-list-EYO3FE57.js → task-list-FHNIJDKT.js} +1 -1
- package/chunks/{task-stop-BFSKRTGV.js → task-stop-MG4ZMTEI.js} +1 -1
- package/chunks/{task-update-2JJJRHMT.js → task-update-4HU62CJT.js} +8 -8
- package/chunks/{team-create-GY3VFY47.js → team-create-K5DNSJXR.js} +50 -40
- package/chunks/{team-delete-IQZ6XGFI.js → team-delete-2T44GUNN.js} +1 -1
- package/chunks/{team-plan-approval-BQPGZOT5.js → team-plan-approval-2ZNAQT2A.js} +48 -38
- package/chunks/{terminal-image-renderer-YNYW5CQG.js → terminal-image-renderer-23CW4A6Q.js} +65 -54
- package/chunks/{theme-manager-U6CIK3GM.js → theme-manager-G2333AMH.js} +63 -52
- package/chunks/{todoWrite-5ERKFWAK.js → todoWrite-BO2GR5MN.js} +4 -4
- package/chunks/{tool-search-XI3QWD5I.js → tool-search-MKQCKXN5.js} +22 -15
- package/chunks/{total-session-admission-3SNSJJ32.js → total-session-admission-ENKTM2KX.js} +69 -58
- package/chunks/{trustedFolders-OVAQKNV5.js → trustedFolders-2ETDL7OD.js} +64 -53
- package/chunks/{update-relaunch-XV5O74E3.js → update-relaunch-FMVNN5KA.js} +5 -5
- package/chunks/{updateCheck-CHUYWD6L.js → updateCheck-KWRV5KLJ.js} +66 -55
- package/chunks/{useAutoAcceptIndicator-VKSVIXZC.js → useAutoAcceptIndicator-7AUXAIQF.js} +73 -62
- package/chunks/{validateNonInterActiveAuth-ZNUTD3E5.js → validateNonInterActiveAuth-NETKLLDV.js} +117 -106
- package/chunks/{version-EK7VAGSI.js → version-DACNN2ZM.js} +1 -1
- package/chunks/{web-fetch-24KZO763.js → web-fetch-CIVCRET4.js} +16 -12
- package/chunks/{web-search-CRNXKZ2X.js → web-search-GOHZRGMM.js} +389 -327
- package/chunks/{web-shell-static-BFDESDD4.js → web-shell-static-T7UGLVE4.js} +2 -7
- package/chunks/workflow-IL2FOALZ.js +1324 -0
- package/chunks/workspace-providers-status-YGXL6N5U.js +131 -0
- package/chunks/{workspace-registration-store-HKLJEDQX.js → workspace-registration-store-E4IAOFFZ.js} +3 -1
- package/chunks/{workspace-registry-7RDDOBLN.js → workspace-registry-KX6BIBYK.js} +69 -58
- package/chunks/{workspace-runtime-coordinator-LEPDPXJO.js → workspace-runtime-coordinator-2KYYGDDR.js} +72 -59
- package/chunks/{workspace-service-5IFDCNN3.js → workspace-service-5Q6LWBYR.js} +76 -65
- package/chunks/{workspace-skills-status-FJ3HNH4H.js → workspace-skills-status-PJZTFPVV.js} +72 -61
- package/chunks/{workspace-trust-reconciler-PQFHIWLR.js → workspace-trust-reconciler-HS6PWNEA.js} +77 -66
- package/chunks/{write-file-ERG67ZFX.js → write-file-JB3DRM7O.js} +50 -40
- package/chunks/{zh-VBFCRQBL.js → zh-7UJA4ICT.js} +4 -1
- package/chunks/{zh-TW-N2TBF2F2.js → zh-TW-RV24PWUI.js} +4 -1
- package/chunks/{zoom-image-WQYEC3SR.js → zoom-image-AVHQFOOQ.js} +12 -9
- package/cli.js +16 -16
- package/codeModeHost.js +4425 -0
- 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 +5 -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 +5 -2
- package/locales/zh.js +5 -2
- package/package.json +6 -4
- package/web-shell/assets/{abnfDiagram-VCTEODGH-BRLgQbnT.js → abnfDiagram-VCTEODGH-BH2nK5Z_.js} +1 -1
- package/web-shell/assets/{arc-qAF9_XsR.js → arc-CUUQ6krv.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-BorUttEz.js → architectureDiagram-5GKGNRK7-CJjiRuGx.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-Bj0qZVxu.js → blockDiagram-NRAW4CY4-GCDyU9ZX.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BTqJis32.js → c4Diagram-UCG6FXSJ-C68MiN6h.js} +1 -1
- package/web-shell/assets/channel-DauVlmdF.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-RrQ5X8m-.js → chunk-2Q5K7J3B-_8B6frXZ.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-uUjDl8wO.js → chunk-5VM5RSS4-CroSinX7.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-C3JhpyzI.js → chunk-F27PBJKO-CGn4Z0Fx.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-C8ZNFs7F.js → chunk-G27WJ6UU-BI5nLQcf.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-DNpXtEOs.js → chunk-JWPE2WC7-CYJH0FuH.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-DagA2ZLw.js → chunk-LCL6LL3I-DjWZUqA1.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-R23uH7Xm.js → chunk-POPQ4Y6H-DcTkIHm8.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-Qz9RN_BR.js → chunk-SVP7TREG-E8sZT5uK.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-jYb1_hni.js → chunk-XXDRQBXY-CurjPKw_.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-BuIh7bj1.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-BuIh7bj1.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-Cv2OunpE.js → cose-bilkent-JH36ORCC-CJEnNhth.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-LH42KFJx.js → cynefin-OW5HDTMX-jwEkm0yw.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Dha4_OoR.js → cynefinDiagram-5FMLGOSQ-B-OVQ6AO.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-Br5lnUKD.js → dagre-3AP2YEHR-CKKK9WNR.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-dpKq2bBX.js → diagram-S7CK7UJ4-D486veFQ.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-BAgHWpXr.js → diagram-UQ7AKVKN-C3GujqHv.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-GRRzpyE2.js → diagram-VSXAHHWV-BrOTDwuU.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-BNFiaYpG.js → diagram-VX7I27RA-C4D9kWE3.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-BisZzB_h.js → diagram-Z3DM3KII-7rAManT0.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-B1xbwycf.js → ebnfDiagram-PWID7BFC-CqVzKOdr.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-CQMzbGE5.js → erDiagram-SSCWMZ5O-D2s08fc_.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-CZ_Zondl.js → flowDiagram-A5DVABFB-CrKtBxB2.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BTh2ShxS.js → ganttDiagram-EL5Y4UJY-CD1CKdlt.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-oHOB-Uxt.js → gitGraphDiagram-WWUBYQGX-CHDXdVNn.js} +1 -1
- package/web-shell/assets/index-D8tzgUOC.css +36 -0
- package/web-shell/assets/{index-DWoFMu5x.js → index-DWz95m74.js} +1 -1
- package/web-shell/assets/index-cDFf68Wd.js +2204 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-C0QpudbG.js → infoDiagram-RXCK75RN-Cr1oLCwe.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-a6B741uT.js → ishikawaDiagram-5VMMS53U--RghV1mm.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-Dbht9ICp.js → journeyDiagram-EYS64GPL-MN1ZkGW8.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-D4OFR8-h.js → kanban-definition-3QL26DDD-DL05VTn0.js} +1 -1
- package/web-shell/assets/{layout-Dvdh5jRH.js → layout-D_TvQzvn.js} +1 -1
- package/web-shell/assets/{linear-Dvc6KIW2.js → linear-B_0OH6XF.js} +1 -1
- package/web-shell/assets/{mermaid.core-CB36RfIb.js → mermaid.core-B9Nklh9I.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-Fmqo1CjP.js → mindmap-definition-FBJOCRG2-CevIQ0LR.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-CCxYBoA4.js → pegDiagram-XKGWAZYB-DQ8PIv0d.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BVHKQFzt.js → pieDiagram-E7YTZNPT-BVTV1pPe.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-l95IznwR.js → quadrantDiagram-AXDQQJYC-DHN6nhpe.js} +1 -1
- package/web-shell/assets/qwen-code-notification-BRVagufF.png +0 -0
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-BlLdRdXp.js → railroadDiagram-O6MQD6OU-8HOyX0u-.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BkDLBR5w.js → requirementDiagram-EFPCY7ZU-9W4_14i8.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-jAIqRp65.js → sankeyDiagram-P5KCCOFB-DSUBB2XP.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-f-soZYPr.js → sequenceDiagram-WJ2MYXX4-DD3jH6Jn.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-BzOuAfB2.js → sizeCapture-X5ZJPWSS-RAFTU3Cz.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BPLSs12r.js → stateDiagram-HBIQ2CUA-Drk-oZ2x.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-QzYteVIm.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-D-9E_RIR.js → swimlanes-XN3QIQJK-Cy2nlOGx.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-xTr-HG26.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-CT56K-gV.js → timeline-definition-24CTP7MA-B7outYof.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-B-vi4IyO.js → vennDiagram-4TSXK5OY-Di_u1Ic6.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C9O7Ju98.js → wardleyDiagram-VM6X3IG4-DYocuCAM.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-6d8w3jg2.js → xychartDiagram-S5SC5T6Z-AADDse54.js} +1 -1
- package/web-shell/index.html +29 -5
- package/chunks/chunk-V7RNNPGC.js +0 -44
- package/chunks/list-JOGBAC2R.js +0 -122
- package/chunks/mcp-6YYNSYLK.js +0 -116
- package/chunks/workflow-HD5NYMW5.js +0 -2907
- package/chunks/workspace-providers-status-MAM42IZS.js +0 -120
- package/web-shell/assets/channel-COIuCrVH.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DoX6OYqu.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DoX6OYqu.js +0 -1
- package/web-shell/assets/index-CI1ysIEv.js +0 -2154
- package/web-shell/assets/index-CpxXGH-8.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-IRul-LaT.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-D6lgKepA.js +0 -8
- package/chunks/{chunk-JA5CBKRP.js → chunk-7NXSVSFB.js} +0 -0
- package/chunks/{open-with-auth-6MVIHMXB.js → open-with-auth-XFCCJOO6.js} +3 -3
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
|
+
PeerMessaging,
|
|
4
5
|
classifyApiError
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YC6XOB5N.js";
|
|
6
7
|
import {
|
|
7
8
|
fireSessionDeleteHook
|
|
8
9
|
} from "./chunk-L34XSHIZ.js";
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
matchMcpServerByRef,
|
|
19
20
|
parseExtensionRef,
|
|
20
21
|
parseMcpServerRef
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-W547PYQ7.js";
|
|
22
23
|
import {
|
|
23
24
|
getAvailableCommands,
|
|
24
25
|
getSlashCommandFirstToken,
|
|
@@ -28,10 +29,10 @@ import {
|
|
|
28
29
|
pLimit,
|
|
29
30
|
recordDaemonSessionModel,
|
|
30
31
|
restoreSessionModelThenAuthenticate
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-QTQYLQ5A.js";
|
|
32
33
|
import {
|
|
33
34
|
recomputeMcpGating
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TVV5FA3G.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
|
+
} from "./chunk-RRQEZBL2.js";
|
|
45
46
|
import {
|
|
46
47
|
getCommandSubcommandNames
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-YDW4ERSS.js";
|
|
48
49
|
import {
|
|
49
50
|
getEffectiveSupportedModes
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-22GORRNY.js";
|
|
51
|
+
} from "./chunk-FH5AVEWJ.js";
|
|
52
52
|
import "./chunk-NYX53SV4.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-7IBS746B.js";
|
|
54
54
|
import {
|
|
55
55
|
collectContextData,
|
|
56
56
|
formatContextUsageText
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-DWBNQR53.js";
|
|
58
58
|
import "./chunk-4WGODMVR.js";
|
|
59
59
|
import {
|
|
60
60
|
startNonInteractiveOpenAILogHousekeeping
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-GWOVD63C.js";
|
|
62
62
|
import "./chunk-KW7NOTN6.js";
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-46MMBZHI.js";
|
|
65
|
-
import "./chunk-R457KFV7.js";
|
|
66
|
-
import "./chunk-RM244SCQ.js";
|
|
63
|
+
import "./chunk-GZMNHAYC.js";
|
|
67
64
|
import {
|
|
68
65
|
isGoalStatusKind
|
|
69
66
|
} from "./chunk-EKTCKZV5.js";
|
|
70
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-NOUK63IR.js";
|
|
71
68
|
import "./chunk-YAF2MQZ6.js";
|
|
72
|
-
import
|
|
73
|
-
|
|
74
|
-
} from "./chunk-LBOVL47Y.js";
|
|
75
|
-
import "./chunk-24FVUD5P.js";
|
|
76
|
-
import "./chunk-QFJZAY7W.js";
|
|
69
|
+
import "./chunk-2XRE4KE4.js";
|
|
70
|
+
import "./chunk-BKFRA4F5.js";
|
|
77
71
|
import "./chunk-6H67XLET.js";
|
|
78
72
|
import {
|
|
79
73
|
beginAcpBootstrapConfigProfiling,
|
|
80
74
|
buildAndFreezeAcpStartupProfile,
|
|
81
75
|
endAcpBootstrapConfigProfiling,
|
|
82
76
|
markAcpStartup
|
|
83
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-DOTF2PF2.js";
|
|
78
|
+
import "./chunk-KZYOFJ6V.js";
|
|
79
|
+
import "./chunk-P42IUOAO.js";
|
|
80
|
+
import "./chunk-5Z74GE4N.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-JVTXAA35.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-O5VX66FB.js";
|
|
116
117
|
import "./chunk-M3JGHRMQ.js";
|
|
117
|
-
import "./chunk-VFFQAOPR.js";
|
|
118
|
-
import "./chunk-ERXNTINK.js";
|
|
119
118
|
import "./chunk-47ECGEJC.js";
|
|
119
|
+
import "./chunk-VFFQAOPR.js";
|
|
120
|
+
import "./chunk-CQZJYGRX.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,20 @@ import {
|
|
|
137
131
|
isReservedStandaloneSessionSourceType,
|
|
138
132
|
parseSessionSource
|
|
139
133
|
} from "./chunk-N4QWUPDM.js";
|
|
134
|
+
import {
|
|
135
|
+
getConversationDirectoryName,
|
|
136
|
+
hasVerifiableInode,
|
|
137
|
+
isSameConversationPath,
|
|
138
|
+
isSameDirectoryIdentity
|
|
139
|
+
} from "./chunk-PB7JBAHF.js";
|
|
140
140
|
import "./chunk-DMEUXLSS.js";
|
|
141
|
+
import "./chunk-UXEO7E3V.js";
|
|
141
142
|
import {
|
|
142
143
|
buildScheduledTaskRunPrompt,
|
|
143
144
|
normalizeChannelDeliveryText,
|
|
144
145
|
scheduledTaskRunSessionName,
|
|
145
146
|
scheduledTaskRunSourceId
|
|
146
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-ZAWM6KRF.js";
|
|
147
148
|
import {
|
|
148
149
|
normalizeSessionIdForLookup,
|
|
149
150
|
parseCallerSuppliedSessionId
|
|
@@ -154,28 +155,38 @@ import {
|
|
|
154
155
|
buildPermissionSettings,
|
|
155
156
|
normalizePermissionRules,
|
|
156
157
|
readPermissionRuleSet
|
|
157
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-KWFFJ6AK.js";
|
|
158
159
|
import {
|
|
159
160
|
MAX_AUDIO_BYTES,
|
|
160
161
|
sanitizeVoiceErrorMessage,
|
|
161
162
|
transcribeVoiceAudio
|
|
162
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-FUQK5ZNL.js";
|
|
163
164
|
import {
|
|
164
165
|
readVoiceModel
|
|
165
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-J6SBP5G2.js";
|
|
166
167
|
import "./chunk-Y53DG2HA.js";
|
|
167
|
-
import
|
|
168
|
-
|
|
168
|
+
import {
|
|
169
|
+
mapSkillConfigToStatus
|
|
170
|
+
} from "./chunk-BHTYRHJF.js";
|
|
171
|
+
import {
|
|
172
|
+
resolveSkillSettings
|
|
173
|
+
} from "./chunk-HWVUSYSN.js";
|
|
174
|
+
import "./chunk-6HI2I3OM.js";
|
|
175
|
+
import {
|
|
176
|
+
createLoadedSettingsAdapter
|
|
177
|
+
} from "./chunk-IUN5ZMFY.js";
|
|
178
|
+
import "./chunk-QSMQKTXV.js";
|
|
179
|
+
import "./chunk-22FWWGSM.js";
|
|
169
180
|
import "./chunk-JS73NNWF.js";
|
|
170
181
|
import {
|
|
171
182
|
SCHEDULED_TASK_RUN_SOURCE_TYPE
|
|
172
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-CBGHRAWM.js";
|
|
173
184
|
import "./chunk-7U5G6JXI.js";
|
|
174
185
|
import "./chunk-WCCLLK7X.js";
|
|
175
186
|
import "./chunk-OCPBI7J5.js";
|
|
176
187
|
import {
|
|
177
188
|
ndJsonStream
|
|
178
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-YKM6MITI.js";
|
|
179
190
|
import {
|
|
180
191
|
PERSIST_REASONING_SELECTION_META_KEY,
|
|
181
192
|
REASONING_EFFORT_DEFAULT,
|
|
@@ -192,7 +203,7 @@ import {
|
|
|
192
203
|
isReasoningSelectionSupported,
|
|
193
204
|
parseReasoningSelection,
|
|
194
205
|
resolvePersistedReasoningConfigState
|
|
195
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-E5LTUWKZ.js";
|
|
196
207
|
import {
|
|
197
208
|
ACP_ROUTE_ID_PREFIX,
|
|
198
209
|
buildAcpModelOptions,
|
|
@@ -201,10 +212,7 @@ import {
|
|
|
201
212
|
parseAcpModelOption,
|
|
202
213
|
resolveAcpModelOption,
|
|
203
214
|
sanitizeProviderBaseUrl
|
|
204
|
-
} from "./chunk-
|
|
205
|
-
import {
|
|
206
|
-
mapSkillConfigToStatus
|
|
207
|
-
} from "./chunk-BHTYRHJF.js";
|
|
215
|
+
} from "./chunk-LQBAFO5D.js";
|
|
208
216
|
import {
|
|
209
217
|
ACP_PREFLIGHT_KINDS,
|
|
210
218
|
IDLE_HOOK_EVENTS,
|
|
@@ -212,23 +220,14 @@ import {
|
|
|
212
220
|
SERVE_STATUS_EXT_METHODS,
|
|
213
221
|
STATUS_SCHEMA_VERSION,
|
|
214
222
|
mapDomainErrorToErrorKind
|
|
215
|
-
} from "./chunk-
|
|
216
|
-
import
|
|
217
|
-
|
|
218
|
-
} from "./chunk-HWVUSYSN.js";
|
|
219
|
-
import "./chunk-7PD7ZMX5.js";
|
|
220
|
-
import "./chunk-G3ZUMSFS.js";
|
|
221
|
-
import "./chunk-TODNHE76.js";
|
|
223
|
+
} from "./chunk-HGEUHUEV.js";
|
|
224
|
+
import "./chunk-K3U6VB3O.js";
|
|
225
|
+
import "./chunk-MUFGTWQH.js";
|
|
222
226
|
import "./chunk-57OAHC2Y.js";
|
|
223
|
-
import "./chunk-
|
|
224
|
-
import "./chunk-
|
|
225
|
-
import "./chunk-
|
|
227
|
+
import "./chunk-LDQHA6L4.js";
|
|
228
|
+
import "./chunk-465USTVK.js";
|
|
229
|
+
import "./chunk-ABNX6E6K.js";
|
|
226
230
|
import "./chunk-V6WHFGST.js";
|
|
227
|
-
import {
|
|
228
|
-
createLoadedSettingsAdapter
|
|
229
|
-
} from "./chunk-QHLHE2OT.js";
|
|
230
|
-
import "./chunk-JYGIJA4W.js";
|
|
231
|
-
import "./chunk-N6VQ37ZZ.js";
|
|
232
231
|
import {
|
|
233
232
|
ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
|
|
234
233
|
ACTIVE_WORK_HEARTBEAT_META_KEY,
|
|
@@ -247,6 +246,7 @@ import {
|
|
|
247
246
|
DAEMON_PERMISSION_CANCEL_REASON_META_KEY,
|
|
248
247
|
DAEMON_PROMPT_DISPLAY_TEXT_META_KEY,
|
|
249
248
|
DAEMON_RESTORE_ASK_USER_QUESTION_META_KEY,
|
|
249
|
+
DAEMON_SUBMITTED_PROMPT_META_KEY,
|
|
250
250
|
DAEMON_SUPPRESS_RESTORE_ASK_USER_QUESTION_META_KEY,
|
|
251
251
|
DAEMON_SUPPRESS_WORKTREE_CONTEXT_RESTORE_META_KEY,
|
|
252
252
|
LOAD_REPLAY_BULK_MODE,
|
|
@@ -262,12 +262,14 @@ import {
|
|
|
262
262
|
REQUESTED_SESSION_ID_META_KEY,
|
|
263
263
|
SESSION_INITIALIZATION_DEADLINE_META_KEY,
|
|
264
264
|
SESSION_INITIALIZATION_TIMEOUT_ERROR_KIND,
|
|
265
|
+
SESSION_MODEL_PERSIST_DEFAULT_META_KEY,
|
|
266
|
+
SUBMITTED_PROMPT_META_KEY,
|
|
265
267
|
TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD,
|
|
266
268
|
TODO_STOP_GUARD_QUEUE_RELEASE_METHOD,
|
|
267
269
|
WORKTREE_MCP_DEFER_META_KEY,
|
|
268
270
|
clampActiveWorkIntervalMs,
|
|
269
271
|
isValidTrustedModelPrompt
|
|
270
|
-
} from "./chunk-
|
|
272
|
+
} from "./chunk-TBSCTWKF.js";
|
|
271
273
|
import {
|
|
272
274
|
NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
|
|
273
275
|
isNotCurrentlyGeneratingCancelError
|
|
@@ -275,12 +277,12 @@ import {
|
|
|
275
277
|
import "./chunk-6PLDPT2C.js";
|
|
276
278
|
import "./chunk-FYJ7W2PI.js";
|
|
277
279
|
import "./chunk-STUJ7IMZ.js";
|
|
278
|
-
import "./chunk-DARWOZY6.js";
|
|
279
280
|
import "./chunk-GYTKQYDB.js";
|
|
280
|
-
import "./chunk-
|
|
281
|
+
import "./chunk-WD6YQI5M.js";
|
|
282
|
+
import "./chunk-GDWE23OR.js";
|
|
281
283
|
import "./chunk-RKFGE7JH.js";
|
|
284
|
+
import "./chunk-CJ3DHN5I.js";
|
|
282
285
|
import "./chunk-UDG5EZJI.js";
|
|
283
|
-
import "./chunk-M5GB774H.js";
|
|
284
286
|
import {
|
|
285
287
|
EXTERNAL_TOOL_GUARD_READY_META_KEY,
|
|
286
288
|
EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
|
|
@@ -290,21 +292,22 @@ import {
|
|
|
290
292
|
SHELL_EXECUTING_TOOL_NAMES,
|
|
291
293
|
isValidExternalToolGuardDenialReason
|
|
292
294
|
} from "./chunk-3VUENPWF.js";
|
|
293
|
-
import "./chunk-
|
|
295
|
+
import "./chunk-M5GB774H.js";
|
|
296
|
+
import "./chunk-NFXXBWSE.js";
|
|
297
|
+
import "./chunk-LWWRJRCD.js";
|
|
294
298
|
import {
|
|
295
299
|
ACP_EVENT_LOOP_STALL_RESTART_MS,
|
|
296
300
|
CHANNEL_PROMPT_META_KEY
|
|
297
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-EPVEPTI3.js";
|
|
298
302
|
import {
|
|
299
303
|
AgentSideConnection,
|
|
300
304
|
PROTOCOL_VERSION,
|
|
301
305
|
RequestError
|
|
302
|
-
} from "./chunk-
|
|
303
|
-
import "./chunk-NFXXBWSE.js";
|
|
306
|
+
} from "./chunk-IJOS26LH.js";
|
|
304
307
|
import {
|
|
305
308
|
assembleMcpServers,
|
|
306
309
|
loadMcpApprovals
|
|
307
|
-
} from "./chunk-
|
|
310
|
+
} from "./chunk-ENAUXRPG.js";
|
|
308
311
|
import {
|
|
309
312
|
deleteNestedPropertySafe,
|
|
310
313
|
getOutputLanguageFilePath,
|
|
@@ -316,18 +319,13 @@ import {
|
|
|
316
319
|
settingExistsInScope,
|
|
317
320
|
updateOutputLanguageFile,
|
|
318
321
|
writeOutputLanguageAndRegisterPath
|
|
319
|
-
} from "./chunk-
|
|
320
|
-
import "./chunk-
|
|
322
|
+
} from "./chunk-CSDKDHWV.js";
|
|
323
|
+
import "./chunk-XE46RQFI.js";
|
|
321
324
|
import "./chunk-RKUWKYED.js";
|
|
322
|
-
import "./chunk-BW4333PP.js";
|
|
323
|
-
import {
|
|
324
|
-
getSystemDefaultsPath,
|
|
325
|
-
getSystemSettingsPath
|
|
326
|
-
} from "./chunk-IDS7MSUP.js";
|
|
327
325
|
import {
|
|
328
326
|
getCurrentLanguage,
|
|
329
327
|
setLanguageAsync
|
|
330
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-432JQKIO.js";
|
|
331
329
|
import {
|
|
332
330
|
SUPPORTED_LANGUAGES
|
|
333
331
|
} from "./chunk-5EJZE3FP.js";
|
|
@@ -335,19 +333,26 @@ import {
|
|
|
335
333
|
findEnvFiles,
|
|
336
334
|
preResolveHomeEnvOverrides,
|
|
337
335
|
reloadEnvironment
|
|
338
|
-
} from "./chunk-
|
|
336
|
+
} from "./chunk-RUE62UH6.js";
|
|
337
|
+
import "./chunk-N6VQ37ZZ.js";
|
|
338
|
+
import "./chunk-BW4333PP.js";
|
|
339
|
+
import {
|
|
340
|
+
getSystemDefaultsPath,
|
|
341
|
+
getSystemSettingsPath
|
|
342
|
+
} from "./chunk-IDS7MSUP.js";
|
|
339
343
|
import {
|
|
340
344
|
ENV_ACP_REPEATED_TOOL_FAILURE_GUARD,
|
|
341
345
|
QWEN_CODE_SERVE_ENV
|
|
342
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-XX5HQLCZ.js";
|
|
347
|
+
import "./chunk-XFSFZCM5.js";
|
|
343
348
|
import "./chunk-2EAZ43JQ.js";
|
|
344
349
|
import "./chunk-NF5J2WFA.js";
|
|
345
|
-
import "./chunk-
|
|
350
|
+
import "./chunk-OHCR4O3U.js";
|
|
346
351
|
import "./chunk-W3N5XAZ6.js";
|
|
347
352
|
import {
|
|
348
353
|
isWorkspaceTrusted,
|
|
349
354
|
loadTrustedFolders
|
|
350
|
-
} from "./chunk-
|
|
355
|
+
} from "./chunk-JSKEW4E7.js";
|
|
351
356
|
import "./chunk-NPQ5ZKRP.js";
|
|
352
357
|
import "./chunk-MR3PXB6E.js";
|
|
353
358
|
import {
|
|
@@ -359,6 +364,7 @@ import {
|
|
|
359
364
|
McpTransportPool,
|
|
360
365
|
TURN_INTERRUPTION_HISTORY_TAIL_COUNT,
|
|
361
366
|
WorkspaceMcpBudget,
|
|
367
|
+
abortGoalForStopHookCap,
|
|
362
368
|
applyProviderInstallPlan,
|
|
363
369
|
buildBtwCacheSafeParams,
|
|
364
370
|
buildBtwPrompt,
|
|
@@ -371,32 +377,20 @@ import {
|
|
|
371
377
|
findApiRewindCutPoint,
|
|
372
378
|
generatePromptSuggestion,
|
|
373
379
|
generateSessionRecap,
|
|
380
|
+
getStopHookContinuationReason,
|
|
374
381
|
projectGoalStateToLegacy,
|
|
375
382
|
readManyFiles,
|
|
376
383
|
runManagedRememberByAgent,
|
|
377
384
|
subagentGenerator
|
|
378
|
-
} from "./chunk-
|
|
385
|
+
} from "./chunk-GDIPPCW6.js";
|
|
379
386
|
import {
|
|
380
387
|
buildToolWriteOriginMeta
|
|
381
388
|
} from "./chunk-GELRJXE2.js";
|
|
382
389
|
import "./chunk-32CM56LO.js";
|
|
383
|
-
import {
|
|
384
|
-
MAX_RETAINED_SNAPSHOTS,
|
|
385
|
-
deleteWorkflowSnapshot,
|
|
386
|
-
extractAndStripMeta,
|
|
387
|
-
listSavedWorkflows,
|
|
388
|
-
listWorkflowSnapshots,
|
|
389
|
-
resolveSavedWorkflowScript,
|
|
390
|
-
toSnapshot
|
|
391
|
-
} from "./chunk-OXR34GCD.js";
|
|
392
|
-
import "./chunk-XFSFZCM5.js";
|
|
393
390
|
import {
|
|
394
391
|
CreateSubSessionTool
|
|
395
|
-
} from "./chunk-
|
|
392
|
+
} from "./chunk-D754KKNZ.js";
|
|
396
393
|
import "./chunk-LJZSMWOH.js";
|
|
397
|
-
import {
|
|
398
|
-
restoreWorktreeContext
|
|
399
|
-
} from "./chunk-YZTGGCEE.js";
|
|
400
394
|
import {
|
|
401
395
|
ALL_PROVIDERS,
|
|
402
396
|
buildInstallPlan,
|
|
@@ -405,21 +399,29 @@ import {
|
|
|
405
399
|
getDefaultBaseUrlForProtocol,
|
|
406
400
|
getDefaultModelIds,
|
|
407
401
|
resolveBaseUrl
|
|
408
|
-
} from "./chunk-
|
|
409
|
-
import "./chunk-
|
|
402
|
+
} from "./chunk-AEY27Z35.js";
|
|
403
|
+
import "./chunk-MFQWRBFB.js";
|
|
404
|
+
import "./chunk-4O2AXZXU.js";
|
|
405
|
+
import "./chunk-5CZMWDJI.js";
|
|
406
|
+
import {
|
|
407
|
+
restoreWorktreeContext
|
|
408
|
+
} from "./chunk-H3TFIFX3.js";
|
|
409
|
+
import "./chunk-GX5FF2IE.js";
|
|
410
410
|
import "./chunk-DJXSOEFB.js";
|
|
411
|
-
import "./chunk-
|
|
412
|
-
import "./chunk-J3VZF2AL.js";
|
|
413
|
-
import "./chunk-OWCFKIFQ.js";
|
|
414
|
-
import "./chunk-ZPJWUGCS.js";
|
|
415
|
-
import "./chunk-X7LFJF5D.js";
|
|
411
|
+
import "./chunk-VGBOJH2D.js";
|
|
416
412
|
import "./chunk-BUQN5LTI.js";
|
|
413
|
+
import "./chunk-ZPJWUGCS.js";
|
|
414
|
+
import "./chunk-YM6KUQ2S.js";
|
|
417
415
|
import {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
416
|
+
MAX_RETAINED_SNAPSHOTS,
|
|
417
|
+
deleteWorkflowSnapshot,
|
|
418
|
+
extractAndStripMeta,
|
|
419
|
+
listSavedWorkflows,
|
|
420
|
+
listWorkflowSnapshots,
|
|
421
|
+
resolveSavedWorkflowScript,
|
|
422
|
+
toSnapshot
|
|
423
|
+
} from "./chunk-IILWL3KY.js";
|
|
424
|
+
import "./chunk-BRFOZEPA.js";
|
|
423
425
|
import {
|
|
424
426
|
APPROVAL_MODE_INFO,
|
|
425
427
|
BranchPointInvalidError,
|
|
@@ -461,10 +463,11 @@ import {
|
|
|
461
463
|
SessionWriterUnavailableError,
|
|
462
464
|
TURN_RESULT_CODE_TEXT_TRUNCATED,
|
|
463
465
|
TURN_RESULT_TEXT_MAX_CHARS,
|
|
464
|
-
|
|
466
|
+
ToolMode,
|
|
465
467
|
acquireSleepInhibitor,
|
|
466
468
|
ambientGoalToolResultProvenance,
|
|
467
469
|
applyAutoModeDecision,
|
|
470
|
+
applyPendingGoalProposal,
|
|
468
471
|
approxBase64Bytes,
|
|
469
472
|
bridgeToolResultImages,
|
|
470
473
|
buildBackgroundEntryLabel,
|
|
@@ -496,9 +499,10 @@ import {
|
|
|
496
499
|
firePostToolUseHook,
|
|
497
500
|
firePreToolUseHook,
|
|
498
501
|
formatDenialStateLog,
|
|
502
|
+
formatProposeGoalRecoveryFailed,
|
|
503
|
+
formatProposeGoalRecoveryNotStarted,
|
|
499
504
|
formatStopHookBlockingCapWarning,
|
|
500
505
|
generateToolUseId,
|
|
501
|
-
getActiveGoal,
|
|
502
506
|
getAutoModeActionFingerprint,
|
|
503
507
|
getAutoModePermissionDeniedReason,
|
|
504
508
|
getEffectivePermissionForConfirmation,
|
|
@@ -507,7 +511,6 @@ import {
|
|
|
507
511
|
getOptInToolNotFoundMessage,
|
|
508
512
|
getProviderToolCallId,
|
|
509
513
|
getScopedEnvContents,
|
|
510
|
-
getStopHookContinuationReason,
|
|
511
514
|
getSubagentSessionDir,
|
|
512
515
|
getToolCallRepeatKey,
|
|
513
516
|
getWorkflowTaskMutationKey,
|
|
@@ -516,6 +519,7 @@ import {
|
|
|
516
519
|
ideContextStore,
|
|
517
520
|
injectPermissionRulesIfMissing,
|
|
518
521
|
isApproveOutcome,
|
|
522
|
+
isCodeModeToolCallAllowed,
|
|
519
523
|
isCompressionFailureStatus,
|
|
520
524
|
isDenialFallbackReason,
|
|
521
525
|
isGatedMcpScope,
|
|
@@ -558,49 +562,39 @@ import {
|
|
|
558
562
|
updateSetting,
|
|
559
563
|
validatePlanModeShellApproval,
|
|
560
564
|
validatePlanModeShellContext
|
|
561
|
-
} from "./chunk-
|
|
565
|
+
} from "./chunk-2UKKQGRA.js";
|
|
562
566
|
import "./chunk-GOFAQQZA.js";
|
|
563
|
-
import "./chunk-65I7S4Z3.js";
|
|
564
567
|
import "./chunk-6HUXPLB5.js";
|
|
565
568
|
import "./chunk-TWPJO254.js";
|
|
566
569
|
import {
|
|
567
570
|
external_exports
|
|
568
571
|
} from "./chunk-CQ35AJ4Z.js";
|
|
569
|
-
import "./chunk-
|
|
570
|
-
import "./chunk-LYT2OU7D.js";
|
|
572
|
+
import "./chunk-65I7S4Z3.js";
|
|
571
573
|
import "./chunk-7CLLH5TI.js";
|
|
572
|
-
import "./chunk-
|
|
574
|
+
import "./chunk-XKBFYTCD.js";
|
|
573
575
|
import {
|
|
574
576
|
parsePositiveIntegerEnv
|
|
575
577
|
} from "./chunk-6PVPNMXU.js";
|
|
576
578
|
import {
|
|
577
579
|
RUNTIME_SNAPSHOT_PREFIX
|
|
578
|
-
} from "./chunk-
|
|
580
|
+
} from "./chunk-ZTTC7T4X.js";
|
|
579
581
|
import {
|
|
580
582
|
SESSION_ARTIFACT_PERSISTENCE_VERSION,
|
|
581
583
|
normalizeEventPayload,
|
|
582
584
|
normalizeSnapshotPayload,
|
|
583
585
|
wrapUserPromptSubmitContext
|
|
584
|
-
} from "./chunk-
|
|
586
|
+
} from "./chunk-EYN3G5XD.js";
|
|
587
|
+
import "./chunk-IXXV6BVB.js";
|
|
585
588
|
import "./chunk-IRH27ZC2.js";
|
|
586
589
|
import "./chunk-QHWCP53L.js";
|
|
587
|
-
import
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
import "./chunk-N6S3NUYJ.js";
|
|
590
|
+
import {
|
|
591
|
+
isValidCronTaskRoutingId
|
|
592
|
+
} from "./chunk-3LMDSCLU.js";
|
|
591
593
|
import {
|
|
592
594
|
promptIdContext,
|
|
593
595
|
todoWorkChainContext
|
|
594
596
|
} from "./chunk-O6GEWCJA.js";
|
|
595
|
-
import
|
|
596
|
-
escapeJsonTagCharacters
|
|
597
|
-
} from "./chunk-CHEIIBT3.js";
|
|
598
|
-
import "./chunk-QAZ2MGYT.js";
|
|
599
|
-
import "./chunk-QQK4L3UU.js";
|
|
600
|
-
import "./chunk-CH2YDT6X.js";
|
|
601
|
-
import {
|
|
602
|
-
APPROVAL_MODES
|
|
603
|
-
} from "./chunk-JX6XHPTX.js";
|
|
597
|
+
import "./chunk-RPMXMR6U.js";
|
|
604
598
|
import {
|
|
605
599
|
AgentOutputMessageCapture,
|
|
606
600
|
addAgentInputMessageAttributes,
|
|
@@ -608,44 +602,79 @@ import {
|
|
|
608
602
|
addToolCallResultAttributes,
|
|
609
603
|
registerAcpEventLoopLagGauge,
|
|
610
604
|
startEventLoopLagMonitor
|
|
611
|
-
} from "./chunk-
|
|
605
|
+
} from "./chunk-2SZH22YO.js";
|
|
606
|
+
import "./chunk-YGCTOXUT.js";
|
|
607
|
+
import "./chunk-QJNDUTOL.js";
|
|
608
|
+
import "./chunk-55VOWZ4C.js";
|
|
609
|
+
import "./chunk-LT2XFADM.js";
|
|
610
|
+
import {
|
|
611
|
+
SessionSourceError,
|
|
612
|
+
SessionSourceService
|
|
613
|
+
} from "./chunk-ELRMZTPF.js";
|
|
614
|
+
import "./chunk-U6H3XTFA.js";
|
|
615
|
+
import "./chunk-ACHCT36C.js";
|
|
616
|
+
import {
|
|
617
|
+
escapeJsonTagCharacters
|
|
618
|
+
} from "./chunk-CHEIIBT3.js";
|
|
619
|
+
import "./chunk-W7JJLUSB.js";
|
|
620
|
+
import {
|
|
621
|
+
registerSession
|
|
622
|
+
} from "./chunk-OWUAZXXN.js";
|
|
623
|
+
import "./chunk-CH2YDT6X.js";
|
|
624
|
+
import {
|
|
625
|
+
APPROVAL_MODES
|
|
626
|
+
} from "./chunk-JX6XHPTX.js";
|
|
612
627
|
import "./chunk-ZSTCM3MX.js";
|
|
613
|
-
import "./chunk-SOA4HKRJ.js";
|
|
614
628
|
import "./chunk-MLXTMF7H.js";
|
|
615
629
|
import {
|
|
616
630
|
getArenaSystemReminder,
|
|
617
631
|
getOutputStyleTurnReminder,
|
|
618
632
|
getPlanModeSystemReminder,
|
|
619
633
|
resolveMainSessionOutputStyle
|
|
620
|
-
} from "./chunk-
|
|
634
|
+
} from "./chunk-63GQZKXL.js";
|
|
621
635
|
import "./chunk-3CZ2BQV6.js";
|
|
622
|
-
import "./chunk-
|
|
623
|
-
import "./chunk-
|
|
636
|
+
import "./chunk-SAH4BD2J.js";
|
|
637
|
+
import "./chunk-CAAMI77K.js";
|
|
624
638
|
import {
|
|
625
639
|
runWithRuntimeContentGenerator
|
|
626
|
-
} from "./chunk-
|
|
640
|
+
} from "./chunk-ZFIWHBJ3.js";
|
|
627
641
|
import "./chunk-S6LOFUVP.js";
|
|
642
|
+
import {
|
|
643
|
+
FORK_SUBAGENT_TYPE,
|
|
644
|
+
isSystemReminderContent,
|
|
645
|
+
wrapSystemReminder
|
|
646
|
+
} from "./chunk-RF5RQRTD.js";
|
|
647
|
+
import "./chunk-6GDELAVL.js";
|
|
648
|
+
import {
|
|
649
|
+
HookEventName,
|
|
650
|
+
createHookOutput
|
|
651
|
+
} from "./chunk-G6UUOCUT.js";
|
|
652
|
+
import "./chunk-IZ2U57NY.js";
|
|
653
|
+
import "./chunk-C5CECJ46.js";
|
|
654
|
+
import "./chunk-K2OJUPOE.js";
|
|
655
|
+
import {
|
|
656
|
+
clearCachedCredentialFile,
|
|
657
|
+
qwenOAuth2Events
|
|
658
|
+
} from "./chunk-TUIW5LLK.js";
|
|
628
659
|
import "./chunk-NAVJD2PQ.js";
|
|
629
|
-
import "./chunk-
|
|
630
|
-
import "./chunk-
|
|
660
|
+
import "./chunk-NWDPOFJI.js";
|
|
661
|
+
import "./chunk-33LYAC4R.js";
|
|
631
662
|
import "./chunk-QHMLYMMS.js";
|
|
663
|
+
import "./chunk-VNOVK4I7.js";
|
|
632
664
|
import {
|
|
633
665
|
getToolCallPreparations
|
|
634
666
|
} from "./chunk-CFKIH3D3.js";
|
|
635
|
-
import
|
|
636
|
-
REASONING_EFFORT_TIERS,
|
|
637
|
-
getGptReasoningCapabilities,
|
|
638
|
-
parseModelReasoningCapabilities
|
|
639
|
-
} from "./chunk-VBLAI2HA.js";
|
|
667
|
+
import "./chunk-JL6APGBX.js";
|
|
640
668
|
import "./chunk-DJ2GSRLV.js";
|
|
641
|
-
import "./chunk-
|
|
642
|
-
import "./chunk-
|
|
669
|
+
import "./chunk-RSGEAWFJ.js";
|
|
670
|
+
import "./chunk-VGY2RGXL.js";
|
|
671
|
+
import "./chunk-C75BXMPM.js";
|
|
643
672
|
import "./chunk-KFFCDLKV.js";
|
|
644
673
|
import {
|
|
645
674
|
addDaemonRequestAttribute,
|
|
646
675
|
extractDaemonTraceContext,
|
|
647
676
|
withDaemonSpan
|
|
648
|
-
} from "./chunk-
|
|
677
|
+
} from "./chunk-ZW2EUO2A.js";
|
|
649
678
|
import {
|
|
650
679
|
ConversationFinishedEvent,
|
|
651
680
|
DiscoveredMCPTool,
|
|
@@ -671,7 +700,7 @@ import {
|
|
|
671
700
|
shouldRunVisionBridge,
|
|
672
701
|
splitImageParts,
|
|
673
702
|
uiTelemetryService
|
|
674
|
-
} from "./chunk-
|
|
703
|
+
} from "./chunk-WXAWG3JS.js";
|
|
675
704
|
import {
|
|
676
705
|
INVOCATION_CONTEXT_META_KEY,
|
|
677
706
|
PRIVATE_ACP_CAPABILITY_ENV,
|
|
@@ -680,18 +709,28 @@ import {
|
|
|
680
709
|
parseInvocationContext,
|
|
681
710
|
runWithInvocationContext
|
|
682
711
|
} from "./chunk-5ETULJLP.js";
|
|
683
|
-
import "./chunk-
|
|
712
|
+
import "./chunk-ZHKTKHMO.js";
|
|
684
713
|
import "./chunk-VGC4I5JJ.js";
|
|
685
714
|
import {
|
|
686
715
|
getAllMemoryFilenames,
|
|
687
716
|
getSpecificMimeType
|
|
688
|
-
} from "./chunk-
|
|
717
|
+
} from "./chunk-QZW6WRB7.js";
|
|
689
718
|
import {
|
|
690
719
|
getAutoMemoryRoot,
|
|
691
720
|
getUserAutoMemoryRoot
|
|
692
721
|
} from "./chunk-EDIDYZBT.js";
|
|
693
722
|
import "./chunk-HD7O6WLV.js";
|
|
723
|
+
import {
|
|
724
|
+
extractCodeModeImageContent,
|
|
725
|
+
runWithToolCallRuntime,
|
|
726
|
+
runWithoutToolCallRuntime
|
|
727
|
+
} from "./chunk-CFMZLE3L.js";
|
|
694
728
|
import "./chunk-WZAD4ZNJ.js";
|
|
729
|
+
import {
|
|
730
|
+
REASONING_EFFORT_TIERS,
|
|
731
|
+
getGptReasoningCapabilities,
|
|
732
|
+
parseModelReasoningCapabilities
|
|
733
|
+
} from "./chunk-3FPYT6QC.js";
|
|
695
734
|
import {
|
|
696
735
|
DEFAULT_TOKEN_LIMIT,
|
|
697
736
|
tokenLimit
|
|
@@ -700,11 +739,12 @@ import "./chunk-TIGXX4PA.js";
|
|
|
700
739
|
import {
|
|
701
740
|
hasVertexProjectConfigured,
|
|
702
741
|
preloadContentGenerator
|
|
703
|
-
} from "./chunk-
|
|
742
|
+
} from "./chunk-SDUIETBG.js";
|
|
704
743
|
import "./chunk-XFFRI3WM.js";
|
|
705
744
|
import {
|
|
706
745
|
AuthType
|
|
707
|
-
} from "./chunk-
|
|
746
|
+
} from "./chunk-ERU3SDXT.js";
|
|
747
|
+
import "./chunk-EWJTAP3Y.js";
|
|
708
748
|
import "./chunk-HHJLM3WQ.js";
|
|
709
749
|
import {
|
|
710
750
|
endToolExecutionSpan,
|
|
@@ -716,20 +756,9 @@ import {
|
|
|
716
756
|
startToolExecutionSpan,
|
|
717
757
|
startToolSpan,
|
|
718
758
|
withInteractionSpan
|
|
719
|
-
} from "./chunk-
|
|
759
|
+
} from "./chunk-W5ZQMAEM.js";
|
|
720
760
|
import "./chunk-74TONY4F.js";
|
|
721
|
-
import "./chunk-
|
|
722
|
-
import {
|
|
723
|
-
FORK_SUBAGENT_TYPE,
|
|
724
|
-
isSystemReminderContent,
|
|
725
|
-
wrapSystemReminder
|
|
726
|
-
} from "./chunk-4VY3ITHR.js";
|
|
727
|
-
import "./chunk-O2FEO2CB.js";
|
|
728
|
-
import {
|
|
729
|
-
HookEventName,
|
|
730
|
-
createHookOutput
|
|
731
|
-
} from "./chunk-G6UUOCUT.js";
|
|
732
|
-
import "./chunk-IZ2U57NY.js";
|
|
761
|
+
import "./chunk-DGC7BKEZ.js";
|
|
733
762
|
import {
|
|
734
763
|
BaseDeclarativeTool,
|
|
735
764
|
BaseToolInvocation,
|
|
@@ -737,7 +766,7 @@ import {
|
|
|
737
766
|
ToolNames,
|
|
738
767
|
canonicalToolName,
|
|
739
768
|
isShellProgressData
|
|
740
|
-
} from "./chunk-
|
|
769
|
+
} from "./chunk-2WSLXP3W.js";
|
|
741
770
|
import {
|
|
742
771
|
Storage,
|
|
743
772
|
createDebugLogger,
|
|
@@ -746,20 +775,23 @@ import {
|
|
|
746
775
|
isSubpath,
|
|
747
776
|
sessionIdContext
|
|
748
777
|
} from "./chunk-ZAFYHRVY.js";
|
|
749
|
-
import "./chunk-
|
|
750
|
-
import "./chunk-
|
|
778
|
+
import "./chunk-TBWQLLFO.js";
|
|
779
|
+
import "./chunk-IRJRB3OD.js";
|
|
780
|
+
import "./chunk-V5U2NZNJ.js";
|
|
781
|
+
import "./chunk-TPKQIA7G.js";
|
|
751
782
|
import {
|
|
783
|
+
registerCleanup,
|
|
752
784
|
runExitCleanup
|
|
753
|
-
} from "./chunk-
|
|
785
|
+
} from "./chunk-FJZWRNEW.js";
|
|
754
786
|
import {
|
|
755
787
|
writeStderrLine,
|
|
756
788
|
writeStderrLineSafe
|
|
757
789
|
} from "./chunk-7FA2II6K.js";
|
|
790
|
+
import "./chunk-UKMWZ5NS.js";
|
|
758
791
|
import "./chunk-75DOP5OR.js";
|
|
759
792
|
import "./chunk-DMTGGOSA.js";
|
|
760
793
|
import "./chunk-YQ3U5MUC.js";
|
|
761
794
|
import "./chunk-MATEIJZF.js";
|
|
762
|
-
import "./chunk-TBWQLLFO.js";
|
|
763
795
|
import {
|
|
764
796
|
init_esbuild_shims
|
|
765
797
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -770,7 +802,7 @@ import {
|
|
|
770
802
|
// packages/cli/src/acp-integration/acpAgent.ts
|
|
771
803
|
init_esbuild_shims();
|
|
772
804
|
import { randomUUID as randomUUID2, timingSafeEqual } from "node:crypto";
|
|
773
|
-
import { performance } from "node:perf_hooks";
|
|
805
|
+
import { performance as performance2 } from "node:perf_hooks";
|
|
774
806
|
import { isDeepStrictEqual } from "node:util";
|
|
775
807
|
|
|
776
808
|
// packages/cli/src/acp-integration/authMethods.ts
|
|
@@ -785,6 +817,15 @@ function buildAuthMethods() {
|
|
|
785
817
|
type: "terminal",
|
|
786
818
|
args: ["--auth-type=openai"]
|
|
787
819
|
}
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
id: "openai-responses" /* USE_OPENAI_RESPONSES */,
|
|
823
|
+
name: "Use OpenAI Responses API key",
|
|
824
|
+
description: "Requires setting the `OPENAI_API_KEY` environment variable",
|
|
825
|
+
_meta: {
|
|
826
|
+
type: "terminal",
|
|
827
|
+
args: ["--auth-type=openai-responses"]
|
|
828
|
+
}
|
|
788
829
|
}
|
|
789
830
|
];
|
|
790
831
|
}
|
|
@@ -1793,7 +1834,6 @@ var MessageEmitter = class extends BaseEmitter {
|
|
|
1793
1834
|
* @param stopHookCount - Number of Stop hooks that were executed
|
|
1794
1835
|
*/
|
|
1795
1836
|
async emitStopHookLoop(iterationCount, reasons, stopHookCount) {
|
|
1796
|
-
const activeGoal = getActiveGoal(this.sessionId);
|
|
1797
1837
|
await this.sendUpdate({
|
|
1798
1838
|
sessionUpdate: "agent_message_chunk",
|
|
1799
1839
|
content: { type: "text", text: "" },
|
|
@@ -1801,15 +1841,7 @@ var MessageEmitter = class extends BaseEmitter {
|
|
|
1801
1841
|
stopHookLoop: {
|
|
1802
1842
|
iterationCount,
|
|
1803
1843
|
reasons,
|
|
1804
|
-
stopHookCount
|
|
1805
|
-
...activeGoal ? {
|
|
1806
|
-
goal: {
|
|
1807
|
-
condition: activeGoal.condition,
|
|
1808
|
-
iterations: activeGoal.iterations,
|
|
1809
|
-
setAt: activeGoal.setAt,
|
|
1810
|
-
lastReason: activeGoal.lastReason
|
|
1811
|
-
}
|
|
1812
|
-
} : {}
|
|
1844
|
+
stopHookCount
|
|
1813
1845
|
}
|
|
1814
1846
|
}
|
|
1815
1847
|
});
|
|
@@ -2140,6 +2172,12 @@ function buildPermissionRequestContent(confirmation) {
|
|
|
2140
2172
|
}
|
|
2141
2173
|
});
|
|
2142
2174
|
}
|
|
2175
|
+
if (confirmation.type === "info" && confirmation.renderPromptAsPlainText) {
|
|
2176
|
+
content.push({
|
|
2177
|
+
type: "content",
|
|
2178
|
+
content: { type: "text", text: confirmation.prompt }
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2143
2181
|
return content;
|
|
2144
2182
|
}
|
|
2145
2183
|
__name(buildPermissionRequestContent, "buildPermissionRequestContent");
|
|
@@ -3275,6 +3313,7 @@ var MAX_RETAINED_SESSION_ROUTE_COUNTS = 8;
|
|
|
3275
3313
|
var USER_CANCEL_ABORT_REASON = "qwen:user-cancel";
|
|
3276
3314
|
var NEW_PROMPT_ABORT_REASON = "qwen:new-prompt";
|
|
3277
3315
|
var SESSION_DISPOSE_ABORT_REASON = "qwen:session-dispose";
|
|
3316
|
+
var GOAL_HELD_RECOVERY_COMMANDS = "Run:\n/goal pause\nThen, when ready:\n/goal resume";
|
|
3278
3317
|
var DAEMON_RETRY_META_KEY = "qwen.daemon.retry";
|
|
3279
3318
|
var DAEMON_CONTINUE_META_KEY = "qwen.daemon.continueLastTurn";
|
|
3280
3319
|
var MAX_DAEMON_ATTACHMENT_REFERENCES = 256;
|
|
@@ -4169,6 +4208,7 @@ var Session = class {
|
|
|
4169
4208
|
__name(this, "Session");
|
|
4170
4209
|
}
|
|
4171
4210
|
pendingPrompt = null;
|
|
4211
|
+
activeGoalProposalTurn;
|
|
4172
4212
|
/**
|
|
4173
4213
|
* Tracks the completion of the current prompt so that the next prompt
|
|
4174
4214
|
* can await it. This prevents a new prompt from reading chat history
|
|
@@ -4186,6 +4226,7 @@ var Session = class {
|
|
|
4186
4226
|
*/
|
|
4187
4227
|
followupAbort = null;
|
|
4188
4228
|
turn = 0;
|
|
4229
|
+
codeModeNestedSequence = 0;
|
|
4189
4230
|
refreshContextFilesOnWrite = false;
|
|
4190
4231
|
activeTodoWorkChainPromptId;
|
|
4191
4232
|
createdAt = Date.now();
|
|
@@ -4263,6 +4304,7 @@ var Session = class {
|
|
|
4263
4304
|
backgroundNotificationAcceptances = /* @__PURE__ */ new Map();
|
|
4264
4305
|
activeNotificationAcceptances = /* @__PURE__ */ new Set();
|
|
4265
4306
|
goalQueue = [];
|
|
4307
|
+
heldGoalProposal;
|
|
4266
4308
|
goalProcessing = false;
|
|
4267
4309
|
activeGoalTurn;
|
|
4268
4310
|
goalHostUnbind;
|
|
@@ -4372,6 +4414,9 @@ var Session = class {
|
|
|
4372
4414
|
this.goalRuntimeUnsubscribe = runtime.subscribe((snapshot, cause) => {
|
|
4373
4415
|
const previousGoal = this.lastGoalSnapshot?.goal ?? null;
|
|
4374
4416
|
this.lastGoalSnapshot = snapshot;
|
|
4417
|
+
if (this.heldGoalProposal && (snapshot.goal?.goalId !== this.heldGoalProposal.goalId || snapshot.goal.revision !== this.heldGoalProposal.revision || snapshot.goal.status !== "active" || cause === "resume")) {
|
|
4418
|
+
this.heldGoalProposal = void 0;
|
|
4419
|
+
}
|
|
4375
4420
|
void this.#queueGoalState(snapshot, cause, previousGoal).catch(
|
|
4376
4421
|
(error) => debugLogger6.warn(
|
|
4377
4422
|
`Failed to emit ACP Goal state: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -4557,6 +4602,10 @@ var Session = class {
|
|
|
4557
4602
|
if (this.disposed || this.closing || this.goalProcessing || this.pendingPrompt || this.pendingPromptCompletion || this.cronProcessing || this.cronAbortController || this.notificationProcessing || this.notificationAbortController || this.#isAutomaticWorkHeld()) {
|
|
4558
4603
|
return;
|
|
4559
4604
|
}
|
|
4605
|
+
const next = this.goalQueue[0];
|
|
4606
|
+
if (this.heldGoalProposal && next?.permit.goalId === this.heldGoalProposal.goalId && next.permit.revision === this.heldGoalProposal.revision) {
|
|
4607
|
+
return;
|
|
4608
|
+
}
|
|
4560
4609
|
const turn = this.goalQueue.shift();
|
|
4561
4610
|
if (!turn) return;
|
|
4562
4611
|
this.goalProcessing = true;
|
|
@@ -5965,10 +6014,9 @@ var Session = class {
|
|
|
5965
6014
|
this.todoStopGuard.blockUntilOrdinaryPromptStarts();
|
|
5966
6015
|
const rewindFiles = opts?.rewindFiles !== false;
|
|
5967
6016
|
const fileHistoryService = this.config.getFileHistoryService();
|
|
5968
|
-
const
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
}
|
|
6017
|
+
const snapshotsBeforeRewind = fileHistoryService.getSnapshots();
|
|
6018
|
+
const survivingSnapshots = rewindFiles ? snapshotsBeforeRewind.slice(0, targetTurnIndex + 1) : snapshotsBeforeRewind.slice(0, targetTurnIndex);
|
|
6019
|
+
fileHistoryService.restoreFromSnapshots(survivingSnapshots);
|
|
5972
6020
|
this.config.getChatRecordingService()?.rewindRecording(
|
|
5973
6021
|
targetTurnIndex,
|
|
5974
6022
|
{ truncatedCount: Math.max(0, apiHistory.length - apiTruncateIndex) },
|
|
@@ -6081,6 +6129,17 @@ var Session = class {
|
|
|
6081
6129
|
);
|
|
6082
6130
|
}
|
|
6083
6131
|
const turnRecording = this.#beginTurnRecording(params, invocationContext);
|
|
6132
|
+
const recordAdmissionCancellation = /* @__PURE__ */ __name(() => {
|
|
6133
|
+
if (turnRecording) turnRecording.cancelledAt ??= Date.now();
|
|
6134
|
+
}, "recordAdmissionCancellation");
|
|
6135
|
+
admissionCancellation?.addEventListener(
|
|
6136
|
+
"abort",
|
|
6137
|
+
recordAdmissionCancellation,
|
|
6138
|
+
{
|
|
6139
|
+
once: true
|
|
6140
|
+
}
|
|
6141
|
+
);
|
|
6142
|
+
if (admissionCancellation?.aborted) recordAdmissionCancellation();
|
|
6084
6143
|
try {
|
|
6085
6144
|
const result = await this.#promptWithTurnRecording(
|
|
6086
6145
|
params,
|
|
@@ -6090,7 +6149,7 @@ var Session = class {
|
|
|
6090
6149
|
scheduledGoalTurn,
|
|
6091
6150
|
turnRecording
|
|
6092
6151
|
);
|
|
6093
|
-
this.#settleTurnRecording(
|
|
6152
|
+
await this.#settleTurnRecording(
|
|
6094
6153
|
result.stopReason === "cancelled" ? "cancelled" : "completed",
|
|
6095
6154
|
turnRecording,
|
|
6096
6155
|
result
|
|
@@ -6102,11 +6161,16 @@ var Session = class {
|
|
|
6102
6161
|
const controlledAbort = abortReason === USER_CANCEL_ABORT_REASON || abortReason === SESSION_DISPOSE_ABORT_REASON || abortReason === NEW_PROMPT_ABORT_REASON && this.#isAbortError(error);
|
|
6103
6162
|
if (controlledAbort) {
|
|
6104
6163
|
const result = { stopReason: "cancelled" };
|
|
6105
|
-
this.#settleTurnRecording("cancelled", turnRecording, result);
|
|
6164
|
+
await this.#settleTurnRecording("cancelled", turnRecording, result);
|
|
6106
6165
|
return result;
|
|
6107
6166
|
}
|
|
6108
|
-
this.#settleTurnRecording("error", turnRecording, void 0, error);
|
|
6167
|
+
await this.#settleTurnRecording("error", turnRecording, void 0, error);
|
|
6109
6168
|
throw error;
|
|
6169
|
+
} finally {
|
|
6170
|
+
admissionCancellation?.removeEventListener(
|
|
6171
|
+
"abort",
|
|
6172
|
+
recordAdmissionCancellation
|
|
6173
|
+
);
|
|
6110
6174
|
}
|
|
6111
6175
|
}
|
|
6112
6176
|
async #promptWithTurnRecording(params, invocationContext, admissionCancellation, modelPrompt, scheduledGoalTurn, turnRecording) {
|
|
@@ -6154,7 +6218,17 @@ var Session = class {
|
|
|
6154
6218
|
if (!goalTurn) {
|
|
6155
6219
|
try {
|
|
6156
6220
|
const runtime = this.config.getGoalRuntime();
|
|
6157
|
-
|
|
6221
|
+
const activeGoal = runtime.getSnapshot().goal;
|
|
6222
|
+
const heldGoalMatches = this.heldGoalProposal?.goalId === activeGoal?.goalId && this.heldGoalProposal?.revision === activeGoal?.revision;
|
|
6223
|
+
if (activeGoal?.status === "active" && heldGoalMatches) {
|
|
6224
|
+
for (const queued of this.goalQueue.splice(0)) {
|
|
6225
|
+
queued.controller.abort(NEW_PROMPT_ABORT_REASON);
|
|
6226
|
+
await runtime.releaseTurn(queued.turnKey, { requeue: false });
|
|
6227
|
+
}
|
|
6228
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6229
|
+
`Automatic Goal execution is still held. ${GOAL_HELD_RECOVERY_COMMANDS}`
|
|
6230
|
+
);
|
|
6231
|
+
} else if (activeGoal?.status === "active") {
|
|
6158
6232
|
reservedGoalRuntime = runtime;
|
|
6159
6233
|
reservedGoalTurnKey = `goal-user:${randomUUID()}`;
|
|
6160
6234
|
runtime.beginTurn(reservedGoalTurnKey);
|
|
@@ -6170,6 +6244,14 @@ var Session = class {
|
|
|
6170
6244
|
this.pendingPrompt?.abort(NEW_PROMPT_ABORT_REASON);
|
|
6171
6245
|
const pendingSend = goalTurn?.controller ?? new AbortController();
|
|
6172
6246
|
if (turnRecording) turnRecording.abortController = pendingSend;
|
|
6247
|
+
const recordCancellation = /* @__PURE__ */ __name(() => {
|
|
6248
|
+
if (turnRecording && pendingSend.signal.reason === USER_CANCEL_ABORT_REASON) {
|
|
6249
|
+
turnRecording.cancelledAt ??= Date.now();
|
|
6250
|
+
}
|
|
6251
|
+
}, "recordCancellation");
|
|
6252
|
+
pendingSend.signal.addEventListener("abort", recordCancellation, {
|
|
6253
|
+
once: true
|
|
6254
|
+
});
|
|
6173
6255
|
const cancelPendingSend = /* @__PURE__ */ __name(() => pendingSend.abort(USER_CANCEL_ABORT_REASON), "cancelPendingSend");
|
|
6174
6256
|
if (admissionCancellation) {
|
|
6175
6257
|
admissionCancellation.addEventListener("abort", cancelPendingSend, {
|
|
@@ -6180,6 +6262,7 @@ var Session = class {
|
|
|
6180
6262
|
this.pendingPrompt = pendingSend;
|
|
6181
6263
|
const releasePendingSend = /* @__PURE__ */ __name(() => {
|
|
6182
6264
|
admissionCancellation?.removeEventListener("abort", cancelPendingSend);
|
|
6265
|
+
pendingSend.signal.removeEventListener("abort", recordCancellation);
|
|
6183
6266
|
if (this.pendingPrompt === pendingSend) {
|
|
6184
6267
|
this.pendingPrompt = null;
|
|
6185
6268
|
}
|
|
@@ -6332,6 +6415,11 @@ var Session = class {
|
|
|
6332
6415
|
}
|
|
6333
6416
|
} : result;
|
|
6334
6417
|
promptResult = completedResult;
|
|
6418
|
+
const proposalTurn = responseCapture.goalProposalTurn;
|
|
6419
|
+
if (proposalTurn) {
|
|
6420
|
+
proposalTurn.completedNormally = completedResult.stopReason === "end_turn" && !pendingSend.signal.aborted && proposalTurn.settlementBlocked !== true;
|
|
6421
|
+
}
|
|
6422
|
+
await this.#settleGoalProposal(responseCapture);
|
|
6335
6423
|
releasePendingSend();
|
|
6336
6424
|
void this.#drainCronQueue();
|
|
6337
6425
|
void this.#drainNotificationQueue();
|
|
@@ -6359,6 +6447,23 @@ var Session = class {
|
|
|
6359
6447
|
rejectedByLoopProtection = isLoopDetectedTurnError(error);
|
|
6360
6448
|
throw error;
|
|
6361
6449
|
} finally {
|
|
6450
|
+
const proposalTurn = responseCapture.goalProposalTurn;
|
|
6451
|
+
if (proposalTurn) {
|
|
6452
|
+
this.config.takePendingGoalProposal(proposalTurn.turnKey);
|
|
6453
|
+
if (this.activeGoalProposalTurn === proposalTurn) {
|
|
6454
|
+
this.activeGoalProposalTurn = void 0;
|
|
6455
|
+
}
|
|
6456
|
+
}
|
|
6457
|
+
if (this.config.getGoalProposalHostSupported() && this.config.setGoalProposalTurnKey(void 0)) {
|
|
6458
|
+
try {
|
|
6459
|
+
await this.config.getLlmClient().setTools();
|
|
6460
|
+
} catch (error) {
|
|
6461
|
+
debugLogger6.warn(
|
|
6462
|
+
"Failed to refresh Goal proposal availability",
|
|
6463
|
+
error
|
|
6464
|
+
);
|
|
6465
|
+
}
|
|
6466
|
+
}
|
|
6362
6467
|
const stillOwnsPendingPrompt = this.pendingPrompt === pendingSend;
|
|
6363
6468
|
releasePendingSend();
|
|
6364
6469
|
const shouldDrainAutomaticQueues = (
|
|
@@ -6370,7 +6475,7 @@ var Session = class {
|
|
|
6370
6475
|
if (stillOwnsPendingPrompt) {
|
|
6371
6476
|
this.todoStopGuardDrainAutomaticQueuesWhenIdle = false;
|
|
6372
6477
|
}
|
|
6373
|
-
if (shouldDrainAutomaticQueues) {
|
|
6478
|
+
if (shouldDrainAutomaticQueues || stillOwnsPendingPrompt) {
|
|
6374
6479
|
void this.#drainCronQueue();
|
|
6375
6480
|
void this.#drainNotificationQueue();
|
|
6376
6481
|
}
|
|
@@ -6540,6 +6645,70 @@ var Session = class {
|
|
|
6540
6645
|
), "execute");
|
|
6541
6646
|
return goalTurn ? goalTurnContext.run(goalTurn.permit, execute) : goalTurnContext.exit(execute);
|
|
6542
6647
|
}
|
|
6648
|
+
async #settleGoalProposal(capture) {
|
|
6649
|
+
const turn = capture.goalProposalTurn;
|
|
6650
|
+
if (!turn) return;
|
|
6651
|
+
const proposal = this.config.takePendingGoalProposal(turn.turnKey);
|
|
6652
|
+
if (!proposal) return;
|
|
6653
|
+
const ownsTurn = /* @__PURE__ */ __name(() => turn.completedNormally && !turn.controller.signal.aborted && this.pendingPrompt === turn.controller && this.activeGoalProposalTurn === turn && !this.disposed && !this.closing, "ownsTurn");
|
|
6654
|
+
if (!ownsTurn()) {
|
|
6655
|
+
if (!this.disposed && !this.closing) {
|
|
6656
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6657
|
+
formatProposeGoalRecoveryNotStarted(proposal.objective)
|
|
6658
|
+
);
|
|
6659
|
+
}
|
|
6660
|
+
return;
|
|
6661
|
+
}
|
|
6662
|
+
try {
|
|
6663
|
+
const runtime = await this.config.getGoalRuntimeReady();
|
|
6664
|
+
if (!ownsTurn()) {
|
|
6665
|
+
if (!this.disposed && !this.closing) {
|
|
6666
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6667
|
+
formatProposeGoalRecoveryNotStarted(proposal.objective)
|
|
6668
|
+
);
|
|
6669
|
+
}
|
|
6670
|
+
return;
|
|
6671
|
+
}
|
|
6672
|
+
const result = await applyPendingGoalProposal(runtime, proposal);
|
|
6673
|
+
if (result.applied && (!ownsTurn() || proposal.approvalSignal?.aborted)) {
|
|
6674
|
+
try {
|
|
6675
|
+
await runtime.dispatch({
|
|
6676
|
+
action: "pause",
|
|
6677
|
+
expectedGoalId: result.goal.goalId,
|
|
6678
|
+
expectedRevision: result.goal.revision,
|
|
6679
|
+
reason: this.closing || this.disposed ? GOAL_PAUSE_REASON_SESSION_DISPOSED : GOAL_PAUSE_REASON_USER_INTERRUPT
|
|
6680
|
+
});
|
|
6681
|
+
} catch (error) {
|
|
6682
|
+
const current = runtime.getSnapshot().goal;
|
|
6683
|
+
if (current?.goalId === result.goal.goalId && current.revision === result.goal.revision && current.status === "active") {
|
|
6684
|
+
this.heldGoalProposal = {
|
|
6685
|
+
goalId: current.goalId,
|
|
6686
|
+
revision: current.revision
|
|
6687
|
+
};
|
|
6688
|
+
debugLogger6.warn(
|
|
6689
|
+
"Failed to pause the cancelled Goal proposal",
|
|
6690
|
+
error
|
|
6691
|
+
);
|
|
6692
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6693
|
+
`The Goal was created, but its cancellation could not be saved. Automatic execution is held in this session. ${GOAL_HELD_RECOVERY_COMMANDS}`
|
|
6694
|
+
);
|
|
6695
|
+
}
|
|
6696
|
+
}
|
|
6697
|
+
} else if (!result.applied) {
|
|
6698
|
+
debugLogger6.debug(
|
|
6699
|
+
`Dropping an approved Goal proposal: ${result.reason}`
|
|
6700
|
+
);
|
|
6701
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6702
|
+
result.kind === "changed" ? result.reason : formatProposeGoalRecoveryFailed(proposal.objective)
|
|
6703
|
+
);
|
|
6704
|
+
}
|
|
6705
|
+
} catch (error) {
|
|
6706
|
+
debugLogger6.warn("Failed to apply an approved Goal proposal", error);
|
|
6707
|
+
await this.messageEmitter.emitAgentMessage(
|
|
6708
|
+
formatProposeGoalRecoveryFailed(proposal.objective)
|
|
6709
|
+
);
|
|
6710
|
+
}
|
|
6711
|
+
}
|
|
6543
6712
|
async #executePromptInner(params, pendingSend, responseCapture, modelPrompt, rejectOnLoopDetected = false, goalTurn, channelTurn = false) {
|
|
6544
6713
|
let managedMemoryRecallStarted = false;
|
|
6545
6714
|
return Storage.runWithRuntimeBaseDir(
|
|
@@ -6552,6 +6721,19 @@ var Session = class {
|
|
|
6552
6721
|
}
|
|
6553
6722
|
this.turn += 1;
|
|
6554
6723
|
const promptId = this.config.getSessionId() + "########" + this.turn;
|
|
6724
|
+
if (!goalTurn && !channelTurn && params._meta?.["qwen.goalProposalApproval"] === true) {
|
|
6725
|
+
responseCapture.goalProposalTurn = {
|
|
6726
|
+
turnKey: promptId,
|
|
6727
|
+
controller: pendingSend,
|
|
6728
|
+
completedNormally: false
|
|
6729
|
+
};
|
|
6730
|
+
this.activeGoalProposalTurn = responseCapture.goalProposalTurn;
|
|
6731
|
+
}
|
|
6732
|
+
if (this.config.getGoalProposalHostSupported() && this.config.setGoalProposalTurnKey(
|
|
6733
|
+
responseCapture.goalProposalTurn?.turnKey
|
|
6734
|
+
)) {
|
|
6735
|
+
await this.config.getLlmClient().setTools();
|
|
6736
|
+
}
|
|
6555
6737
|
const daemonPromptId = getInvocationContext()?.promptId;
|
|
6556
6738
|
const promptMetadata = params._meta;
|
|
6557
6739
|
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;
|
|
@@ -6569,6 +6751,8 @@ var Session = class {
|
|
|
6569
6751
|
const promptText = params.prompt.filter((block) => block.type === "text").map((block) => block.type === "text" ? block.text : "").join(" ");
|
|
6570
6752
|
const promptDisplayTextValue = promptMetadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
6571
6753
|
const promptDisplayText = typeof promptDisplayTextValue === "string" ? promptDisplayTextValue : void 0;
|
|
6754
|
+
const declaredSubmission = promptMetadata?.[DAEMON_SUBMITTED_PROMPT_META_KEY];
|
|
6755
|
+
const submittedPrompt = typeof declaredSubmission === "string" ? declaredSubmission : "";
|
|
6572
6756
|
const modelPromptBlocks = modelPrompt === void 0 ? params.prompt : [{ type: "text", text: modelPrompt }];
|
|
6573
6757
|
logUserPrompt(
|
|
6574
6758
|
this.config,
|
|
@@ -6751,13 +6935,15 @@ var Session = class {
|
|
|
6751
6935
|
const messageBus = this.config.getMessageBus?.();
|
|
6752
6936
|
const isRuntimeContinuation = goalTurn?.origin === "runtime";
|
|
6753
6937
|
const isFreshUserTurn = !isRetry && !isContinue && !isRestoreAskUserQuestion && !isRuntimeContinuation;
|
|
6938
|
+
const isUserSubmissionTurn = isFreshUserTurn && !channelTurn;
|
|
6754
6939
|
if (!isContinue && !isRestoreAskUserQuestion && !isRuntimeContinuation && hooksEnabled && messageBus && this.config.hasHooksForEvent?.("UserPromptSubmit")) {
|
|
6755
6940
|
const response = await messageBus.request(
|
|
6756
6941
|
{
|
|
6757
6942
|
type: "hook-execution-request" /* HOOK_EXECUTION_REQUEST */,
|
|
6758
6943
|
eventName: "UserPromptSubmit",
|
|
6759
6944
|
input: {
|
|
6760
|
-
prompt: promptText
|
|
6945
|
+
prompt: promptText,
|
|
6946
|
+
...isUserSubmissionTurn && submittedPrompt.trim().length > 0 ? { submitted_prompt: submittedPrompt } : {}
|
|
6761
6947
|
},
|
|
6762
6948
|
signal: pendingSend.signal
|
|
6763
6949
|
},
|
|
@@ -7283,6 +7469,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7283
7469
|
modelOverride = model;
|
|
7284
7470
|
return true;
|
|
7285
7471
|
}, "onFullTurnModel");
|
|
7472
|
+
const blockGoalProposalSettlement = /* @__PURE__ */ __name(() => {
|
|
7473
|
+
if (responseCapture?.goalProposalTurn) {
|
|
7474
|
+
responseCapture.goalProposalTurn.settlementBlocked = true;
|
|
7475
|
+
}
|
|
7476
|
+
}, "blockGoalProposalSettlement");
|
|
7286
7477
|
let midTurnContinuationCount = 0;
|
|
7287
7478
|
while (true) {
|
|
7288
7479
|
if (this.pendingPrompt && this.pendingPrompt !== pendingSend) {
|
|
@@ -7296,6 +7487,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7296
7487
|
this.#clearTodoStopGuardTrustAndDrainAutomaticQueues();
|
|
7297
7488
|
}
|
|
7298
7489
|
if (this.todoStopGuardQueuedPromptPriority) {
|
|
7490
|
+
blockGoalProposalSettlement();
|
|
7299
7491
|
return { stopReason: "end_turn" };
|
|
7300
7492
|
}
|
|
7301
7493
|
if (this.todoStopGuard.needsStopInspection) {
|
|
@@ -7309,6 +7501,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7309
7501
|
pendingSend.signal
|
|
7310
7502
|
);
|
|
7311
7503
|
if (claim === "queued") {
|
|
7504
|
+
blockGoalProposalSettlement();
|
|
7312
7505
|
this.#preserveUnsentMessageHistory(
|
|
7313
7506
|
{ role: "user", parts: drained.parts },
|
|
7314
7507
|
true
|
|
@@ -7320,6 +7513,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7320
7513
|
}
|
|
7321
7514
|
}
|
|
7322
7515
|
this.todoStopGuard.acceptMidTurnUserInput();
|
|
7516
|
+
blockGoalProposalSettlement();
|
|
7323
7517
|
const continuation2 = await this.#runStopContinuation(
|
|
7324
7518
|
pendingSend,
|
|
7325
7519
|
promptId + "_mid_turn_" + ++midTurnContinuationCount,
|
|
@@ -7347,6 +7541,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7347
7541
|
pendingSend.signal
|
|
7348
7542
|
);
|
|
7349
7543
|
if (claim === "queued") {
|
|
7544
|
+
blockGoalProposalSettlement();
|
|
7350
7545
|
return { stopReason: "end_turn" };
|
|
7351
7546
|
}
|
|
7352
7547
|
if (claim === "unavailable") {
|
|
@@ -7396,6 +7591,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7396
7591
|
pendingSend.signal
|
|
7397
7592
|
);
|
|
7398
7593
|
if (claim === "queued") {
|
|
7594
|
+
blockGoalProposalSettlement();
|
|
7399
7595
|
this.#preserveUnsentMessageHistory(
|
|
7400
7596
|
{ role: "user", parts: drained.parts },
|
|
7401
7597
|
true
|
|
@@ -7407,6 +7603,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7407
7603
|
}
|
|
7408
7604
|
}
|
|
7409
7605
|
this.todoStopGuard.acceptMidTurnUserInput();
|
|
7606
|
+
blockGoalProposalSettlement();
|
|
7410
7607
|
const continuation2 = await this.#runStopContinuation(
|
|
7411
7608
|
pendingSend,
|
|
7412
7609
|
promptId + "_mid_turn_" + ++midTurnContinuationCount,
|
|
@@ -7434,6 +7631,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7434
7631
|
pendingSend.signal
|
|
7435
7632
|
);
|
|
7436
7633
|
if (claim === "queued") {
|
|
7634
|
+
blockGoalProposalSettlement();
|
|
7437
7635
|
return { stopReason: "end_turn" };
|
|
7438
7636
|
}
|
|
7439
7637
|
if (claim === "unavailable") {
|
|
@@ -7463,7 +7661,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7463
7661
|
const guardContinuation = guardDecision?.kind === "continue" ? guardDecision : null;
|
|
7464
7662
|
if (guardDecision?.kind === "exhausted") {
|
|
7465
7663
|
await this.#emitTodoStopGuardExhausted(guardDecision);
|
|
7466
|
-
if (!externalReason)
|
|
7664
|
+
if (!externalReason) {
|
|
7665
|
+
blockGoalProposalSettlement();
|
|
7666
|
+
return { stopReason: "end_turn" };
|
|
7667
|
+
}
|
|
7467
7668
|
}
|
|
7468
7669
|
if (externalReason && stopHookIterationCount >= stopHookBlockingCap) {
|
|
7469
7670
|
const warning = formatStopHookBlockingCapWarning(
|
|
@@ -7478,6 +7679,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7478
7679
|
await this.#pauseGoalForStopHookCap();
|
|
7479
7680
|
}
|
|
7480
7681
|
this.todoStopGuard.suspend();
|
|
7682
|
+
blockGoalProposalSettlement();
|
|
7481
7683
|
await this.messageEmitter.emitAgentMessage(warning);
|
|
7482
7684
|
debugLogger6.warn(warning);
|
|
7483
7685
|
return { stopReason: "end_turn" };
|
|
@@ -7550,6 +7752,12 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7550
7752
|
true
|
|
7551
7753
|
);
|
|
7552
7754
|
}, "preservePendingMessage");
|
|
7755
|
+
const blockGoalProposalSettlement = /* @__PURE__ */ __name(() => {
|
|
7756
|
+
const proposalTurn = options.responseCapture?.goalProposalTurn;
|
|
7757
|
+
if (proposalTurn) {
|
|
7758
|
+
proposalTurn.settlementBlocked = true;
|
|
7759
|
+
}
|
|
7760
|
+
}, "blockGoalProposalSettlement");
|
|
7553
7761
|
while (nextMessage !== null) {
|
|
7554
7762
|
if (this.pendingPrompt && this.pendingPrompt !== pendingSend) {
|
|
7555
7763
|
preservePendingMessage(nextMessage);
|
|
@@ -7656,6 +7864,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7656
7864
|
nextGuardContinuation = void 0;
|
|
7657
7865
|
if (!options.externalParts) {
|
|
7658
7866
|
preserveGuardOnSkippedSend = true;
|
|
7867
|
+
blockGoalProposalSettlement();
|
|
7659
7868
|
return { kind: "stop", stopReason: "end_turn" };
|
|
7660
7869
|
}
|
|
7661
7870
|
if (!initialSend && nextMessage) {
|
|
@@ -7674,6 +7883,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7674
7883
|
guardForThisSend = void 0;
|
|
7675
7884
|
nextGuardContinuation = void 0;
|
|
7676
7885
|
preserveGuardOnSkippedSend = true;
|
|
7886
|
+
blockGoalProposalSettlement();
|
|
7677
7887
|
if (initialSend) {
|
|
7678
7888
|
supersededAutomaticContinuation = true;
|
|
7679
7889
|
}
|
|
@@ -7731,6 +7941,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7731
7941
|
guardForThisSend = void 0;
|
|
7732
7942
|
nextGuardContinuation = void 0;
|
|
7733
7943
|
preserveGuardOnSkippedSend = true;
|
|
7944
|
+
blockGoalProposalSettlement();
|
|
7734
7945
|
if (initialSend) {
|
|
7735
7946
|
supersededAutomaticContinuation = true;
|
|
7736
7947
|
}
|
|
@@ -8213,8 +8424,21 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8213
8424
|
...recordingService !== void 0 ? { recordingService } : {}
|
|
8214
8425
|
};
|
|
8215
8426
|
}
|
|
8216
|
-
#settleTurnRecording(state, recording, response, error) {
|
|
8427
|
+
async #settleTurnRecording(state, recording, response, error) {
|
|
8217
8428
|
if (recording === null) return;
|
|
8429
|
+
const cancelledAt = state === "cancelled" ? recording.cancelledAt : void 0;
|
|
8430
|
+
if (cancelledAt !== void 0 && response) {
|
|
8431
|
+
response._meta = {
|
|
8432
|
+
...response._meta,
|
|
8433
|
+
"qwen.promptCancelled": {
|
|
8434
|
+
cancelledAt,
|
|
8435
|
+
elapsedMs: Math.max(
|
|
8436
|
+
0,
|
|
8437
|
+
cancelledAt - (recording.startedAt ?? cancelledAt)
|
|
8438
|
+
)
|
|
8439
|
+
}
|
|
8440
|
+
};
|
|
8441
|
+
}
|
|
8218
8442
|
const finalAnswer = truncateTurnText(recording.finalAnswer.finalText);
|
|
8219
8443
|
const stopReason = response?.stopReason ?? (state === "cancelled" ? "cancelled" : void 0);
|
|
8220
8444
|
const payload = {
|
|
@@ -8223,6 +8447,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8223
8447
|
...stopReason !== void 0 ? { stopReason } : {},
|
|
8224
8448
|
...state === "error" ? { error: normalizeTurnResultError(error) } : {},
|
|
8225
8449
|
...recording.startedAt !== void 0 ? { startedAt: recording.startedAt } : {},
|
|
8450
|
+
...cancelledAt !== void 0 ? { cancelledAt } : {},
|
|
8226
8451
|
endedAt: Date.now(),
|
|
8227
8452
|
promptText: recording.promptText,
|
|
8228
8453
|
...recording.promptTextTruncated ? { promptTextTruncated: true } : {},
|
|
@@ -8235,6 +8460,9 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8235
8460
|
};
|
|
8236
8461
|
try {
|
|
8237
8462
|
recording.recordingService?.recordTurnResult(payload);
|
|
8463
|
+
if (cancelledAt !== void 0) {
|
|
8464
|
+
await recording.recordingService?.flush();
|
|
8465
|
+
}
|
|
8238
8466
|
} catch (recordError) {
|
|
8239
8467
|
debugLogger6.warn(
|
|
8240
8468
|
`Failed to record turn result: ${this.#formatError(recordError)}`
|
|
@@ -8908,6 +9136,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8908
9136
|
* timed-out drain is still recorded exactly once.
|
|
8909
9137
|
*/
|
|
8910
9138
|
async #buildMidTurnParts(messages, abortSignal, options = {}) {
|
|
9139
|
+
const proposalTurn = this.activeGoalProposalTurn;
|
|
9140
|
+
if (messages.length > 0 && proposalTurn?.controller.signal === abortSignal) {
|
|
9141
|
+
proposalTurn.settlementBlocked = true;
|
|
9142
|
+
}
|
|
8911
9143
|
const parts = [];
|
|
8912
9144
|
for (const message of messages) {
|
|
8913
9145
|
const displayText = message.kind === "text" ? message.message : message.displayText;
|
|
@@ -9029,6 +9261,29 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9029
9261
|
);
|
|
9030
9262
|
});
|
|
9031
9263
|
}, "record");
|
|
9264
|
+
const restoreOneShot = /* @__PURE__ */ __name(async () => {
|
|
9265
|
+
if (job.recurring !== false || !job.id) return;
|
|
9266
|
+
try {
|
|
9267
|
+
const restored = await scheduler.restoreConsumedOneShot(job.id);
|
|
9268
|
+
if (!restored) {
|
|
9269
|
+
debugLogger6.warn(
|
|
9270
|
+
`Scheduled task ${taskId} could not find its consumed one-shot to restore`
|
|
9271
|
+
);
|
|
9272
|
+
}
|
|
9273
|
+
} catch (error) {
|
|
9274
|
+
debugLogger6.warn(
|
|
9275
|
+
`Scheduled task ${taskId} could not restore its unexecuted one-shot: ${error instanceof Error ? error.message : String(error)}`
|
|
9276
|
+
);
|
|
9277
|
+
}
|
|
9278
|
+
}, "restoreOneShot");
|
|
9279
|
+
if (job.modelServiceId !== void 0 && !isValidCronTaskRoutingId(job.modelServiceId) || job.groupId !== void 0 && !isValidCronTaskRoutingId(job.groupId)) {
|
|
9280
|
+
debugLogger6.warn(
|
|
9281
|
+
`Scheduled task ${taskId} has invalid model or group routing; it was not dispatched`
|
|
9282
|
+
);
|
|
9283
|
+
await record({ dispatchFailed: true });
|
|
9284
|
+
await restoreOneShot();
|
|
9285
|
+
return;
|
|
9286
|
+
}
|
|
9032
9287
|
let sessionId;
|
|
9033
9288
|
try {
|
|
9034
9289
|
const response = await this.client.extMethod(
|
|
@@ -9054,6 +9309,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9054
9309
|
sourceType: SCHEDULED_TASK_RUN_SOURCE_TYPE,
|
|
9055
9310
|
sourceId: scheduledTaskRunSourceId(job.id)
|
|
9056
9311
|
} : {},
|
|
9312
|
+
...job.modelServiceId ? { model: job.modelServiceId } : {},
|
|
9313
|
+
...job.groupId ? { groupId: job.groupId } : {},
|
|
9057
9314
|
callerSessionId: this.sessionId
|
|
9058
9315
|
}
|
|
9059
9316
|
);
|
|
@@ -9063,10 +9320,18 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9063
9320
|
}
|
|
9064
9321
|
sessionId = responseSessionId;
|
|
9065
9322
|
} catch (error) {
|
|
9323
|
+
const requiresFreshSessionRouting = job.modelServiceId !== void 0 || job.groupId !== void 0;
|
|
9324
|
+
const errorMessage = error instanceof Error ? error.message : typeof error === "object" && error !== null && typeof error["message"] === "string" ? error["message"] : String(error);
|
|
9066
9325
|
debugLogger6.warn(
|
|
9067
|
-
`Scheduled task ${taskId} could not create a fresh session, running it in the task session instead: ${
|
|
9326
|
+
requiresFreshSessionRouting ? `Scheduled task ${taskId} could not create a fresh session with its requested routing: ${errorMessage}` : `Scheduled task ${taskId} could not create a fresh session, running it in the task session instead: ${errorMessage}`
|
|
9068
9327
|
);
|
|
9069
|
-
await record(
|
|
9328
|
+
await record(
|
|
9329
|
+
requiresFreshSessionRouting ? { dispatchFailed: true } : { sessionId: this.sessionId, dispatchFailed: true }
|
|
9330
|
+
);
|
|
9331
|
+
if (requiresFreshSessionRouting) {
|
|
9332
|
+
await restoreOneShot();
|
|
9333
|
+
return;
|
|
9334
|
+
}
|
|
9070
9335
|
this.#enqueueCronPrompt({
|
|
9071
9336
|
prompt: job.prompt,
|
|
9072
9337
|
source: "cron",
|
|
@@ -10671,50 +10936,32 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10671
10936
|
])
|
|
10672
10937
|
);
|
|
10673
10938
|
const pendingToolResultRecords = [];
|
|
10939
|
+
const pendingNestedToolResultRecords = [];
|
|
10674
10940
|
let toolResultRecordSequence = 0;
|
|
10675
10941
|
const queueToolResultRecord = /* @__PURE__ */ __name((fc, record) => {
|
|
10676
|
-
|
|
10942
|
+
const ordinal = dedupedFunctionCalls.indexOf(fc);
|
|
10943
|
+
const target = ordinal === -1 ? pendingNestedToolResultRecords : pendingToolResultRecords;
|
|
10944
|
+
target.push({
|
|
10677
10945
|
...record,
|
|
10678
|
-
ordinal:
|
|
10946
|
+
ordinal: Math.max(0, ordinal),
|
|
10679
10947
|
sequence: toolResultRecordSequence++
|
|
10680
10948
|
});
|
|
10681
10949
|
}, "queueToolResultRecord");
|
|
10682
10950
|
let batchTerminatesTurn = false;
|
|
10683
|
-
const
|
|
10684
|
-
|
|
10685
|
-
(left, right) => left.ordinal - right.ordinal || left.sequence - right.sequence
|
|
10686
|
-
);
|
|
10687
|
-
const repeatedToolFailureBatch = {
|
|
10688
|
-
complete: orderedRecords.length === dedupedFunctionCalls.length && new Set(orderedRecords.map((record) => record.ordinal)).size === dedupedFunctionCalls.length,
|
|
10689
|
-
observations: orderedRecords.map((record) => ({
|
|
10690
|
-
callId: record.callId,
|
|
10691
|
-
policyToolName: record.policyToolName,
|
|
10692
|
-
toolType: record.toolType,
|
|
10693
|
-
terminalStatus: record.metadata.status,
|
|
10694
|
-
executionStatus: record.metadata.executionStatus,
|
|
10695
|
-
executionErrorType: record.executionErrorType,
|
|
10696
|
-
providerDuplicate: record.providerDuplicate
|
|
10697
|
-
}))
|
|
10698
|
-
};
|
|
10699
|
-
if (orderedRecords.length === 0) {
|
|
10700
|
-
return {
|
|
10701
|
-
...result,
|
|
10702
|
-
repeatedToolFailureBatch,
|
|
10703
|
-
...batchTerminatesTurn ? { terminateTurn: true } : {}
|
|
10704
|
-
};
|
|
10705
|
-
}
|
|
10951
|
+
const finalizeAndRecord = /* @__PURE__ */ __name(async (records) => {
|
|
10952
|
+
if (records.length === 0) return [];
|
|
10706
10953
|
const finalized = await finalizeToolResponses(
|
|
10707
10954
|
this.config,
|
|
10708
|
-
|
|
10955
|
+
records.map((record) => ({
|
|
10709
10956
|
callId: record.callId,
|
|
10710
10957
|
toolName: record.toolName,
|
|
10711
10958
|
responseParts: record.responseParts,
|
|
10712
10959
|
persistedOutputFiles: record.persistedOutputFiles,
|
|
10713
10960
|
artifacts: record.metadata.artifacts
|
|
10714
10961
|
})),
|
|
10715
|
-
new Map(
|
|
10962
|
+
new Map(records.map((record) => [record.callId, promptId]))
|
|
10716
10963
|
);
|
|
10717
|
-
|
|
10964
|
+
records.forEach((record, index) => {
|
|
10718
10965
|
if (record.skipPersistence === true || this.#shouldSkipRestoredAskUserQuestionPersistence(record.callId)) {
|
|
10719
10966
|
return;
|
|
10720
10967
|
}
|
|
@@ -10729,6 +10976,43 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10729
10976
|
...goalProvenance ? [goalProvenance] : []
|
|
10730
10977
|
);
|
|
10731
10978
|
});
|
|
10979
|
+
return finalized;
|
|
10980
|
+
}, "finalizeAndRecord");
|
|
10981
|
+
const finalizeNestedToolResult = /* @__PURE__ */ __name(async (result) => {
|
|
10982
|
+
const records = pendingNestedToolResultRecords.splice(0);
|
|
10983
|
+
if (records.length === 0) return result.parts;
|
|
10984
|
+
const finalized = await finalizeAndRecord(records);
|
|
10985
|
+
return finalized.flatMap((entry) => entry.responseParts);
|
|
10986
|
+
}, "finalizeNestedToolResult");
|
|
10987
|
+
const finalizeRunToolResult = /* @__PURE__ */ __name(async (result) => {
|
|
10988
|
+
await finalizeAndRecord(
|
|
10989
|
+
[...pendingNestedToolResultRecords].sort(
|
|
10990
|
+
(left, right) => left.sequence - right.sequence
|
|
10991
|
+
)
|
|
10992
|
+
);
|
|
10993
|
+
const orderedRecords = [...pendingToolResultRecords].sort(
|
|
10994
|
+
(left, right) => left.ordinal - right.ordinal || left.sequence - right.sequence
|
|
10995
|
+
);
|
|
10996
|
+
const repeatedToolFailureBatch = {
|
|
10997
|
+
complete: orderedRecords.length === dedupedFunctionCalls.length && new Set(orderedRecords.map((record) => record.ordinal)).size === dedupedFunctionCalls.length,
|
|
10998
|
+
observations: orderedRecords.map((record) => ({
|
|
10999
|
+
callId: record.callId,
|
|
11000
|
+
policyToolName: record.policyToolName,
|
|
11001
|
+
toolType: record.toolType,
|
|
11002
|
+
terminalStatus: record.metadata.status,
|
|
11003
|
+
executionStatus: record.metadata.executionStatus,
|
|
11004
|
+
executionErrorType: record.executionErrorType,
|
|
11005
|
+
providerDuplicate: record.providerDuplicate
|
|
11006
|
+
}))
|
|
11007
|
+
};
|
|
11008
|
+
if (orderedRecords.length === 0) {
|
|
11009
|
+
return {
|
|
11010
|
+
...result,
|
|
11011
|
+
repeatedToolFailureBatch,
|
|
11012
|
+
...batchTerminatesTurn ? { terminateTurn: true } : {}
|
|
11013
|
+
};
|
|
11014
|
+
}
|
|
11015
|
+
const finalized = await finalizeAndRecord(orderedRecords);
|
|
10732
11016
|
return {
|
|
10733
11017
|
...result,
|
|
10734
11018
|
parts: finalized.flatMap((entry) => entry.responseParts),
|
|
@@ -11043,7 +11327,9 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11043
11327
|
recordSkippedToolCall,
|
|
11044
11328
|
queueToolResultRecord,
|
|
11045
11329
|
executionCallIds.get(calls[idx]),
|
|
11046
|
-
onFullTurnModel
|
|
11330
|
+
onFullTurnModel,
|
|
11331
|
+
void 0,
|
|
11332
|
+
finalizeNestedToolResult
|
|
11047
11333
|
).then((r) => {
|
|
11048
11334
|
results[idx] = r;
|
|
11049
11335
|
if (r.loopDetected && executing.size > 1 && !warnedWaitingForInFlight) {
|
|
@@ -11172,7 +11458,9 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11172
11458
|
recordSkippedToolCall,
|
|
11173
11459
|
queueToolResultRecord,
|
|
11174
11460
|
executionCallIds.get(fc),
|
|
11175
|
-
onFullTurnModel
|
|
11461
|
+
onFullTurnModel,
|
|
11462
|
+
void 0,
|
|
11463
|
+
finalizeNestedToolResult
|
|
11176
11464
|
);
|
|
11177
11465
|
parts.push(...r.parts);
|
|
11178
11466
|
collectMemoryWriteCandidates(r);
|
|
@@ -11249,13 +11537,15 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11249
11537
|
}
|
|
11250
11538
|
return reminders;
|
|
11251
11539
|
}
|
|
11252
|
-
async runTool(abortSignal, promptId, fc, onStopAfterPermissionCancel, toolLoopState, recordSkippedToolCall, queueToolResultRecord, generatedCallId, onFullTurnModel) {
|
|
11540
|
+
async runTool(abortSignal, promptId, fc, onStopAfterPermissionCancel, toolLoopState, recordSkippedToolCall, queueToolResultRecord, generatedCallId, onFullTurnModel, codeModeContext, finalizeCodeModeToolResult) {
|
|
11253
11541
|
const callId = fc.id ?? generatedCallId ?? `${fc.name}-${Date.now()}`;
|
|
11254
11542
|
let args = fc.args ?? {};
|
|
11255
11543
|
let executionStatus = "not_started";
|
|
11256
11544
|
let executionErrorType;
|
|
11257
11545
|
let executeReturned = false;
|
|
11258
11546
|
let executeAttempted = false;
|
|
11547
|
+
let executionStartedAt;
|
|
11548
|
+
const elapsedExecutionMs = /* @__PURE__ */ __name(() => executionStartedAt === void 0 ? void 0 : Math.round(performance.now() - executionStartedAt), "elapsedExecutionMs");
|
|
11259
11549
|
let producerObserved = false;
|
|
11260
11550
|
let terminalStatus;
|
|
11261
11551
|
let toolType = "native";
|
|
@@ -11303,6 +11593,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11303
11593
|
"event.name": "tool_call",
|
|
11304
11594
|
"event.timestamp": (/* @__PURE__ */ new Date()).toISOString(),
|
|
11305
11595
|
call_id: callId,
|
|
11596
|
+
...codeModeContext ? {
|
|
11597
|
+
parent_call_id: codeModeContext.parentCallId,
|
|
11598
|
+
source: codeModeContext.source
|
|
11599
|
+
} : {},
|
|
11306
11600
|
prompt_id: promptId,
|
|
11307
11601
|
function_name: toolName2,
|
|
11308
11602
|
function_args: args,
|
|
@@ -11449,6 +11743,19 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11449
11743
|
);
|
|
11450
11744
|
}
|
|
11451
11745
|
const toolName = fc.name;
|
|
11746
|
+
if (this.config.getToolMode?.() === ToolMode.CodeModeOnly && !isCodeModeToolCallAllowed(toolName, codeModeContext?.source ?? "model")) {
|
|
11747
|
+
return earlyErrorResponse(
|
|
11748
|
+
new Error(
|
|
11749
|
+
`Tool "${toolName}" is unavailable on this CodeModeOnly call surface.`
|
|
11750
|
+
),
|
|
11751
|
+
toolName,
|
|
11752
|
+
{
|
|
11753
|
+
status: "error",
|
|
11754
|
+
errorType: "execution_denied" /* EXECUTION_DENIED */,
|
|
11755
|
+
executionStatus: "not_started"
|
|
11756
|
+
}
|
|
11757
|
+
);
|
|
11758
|
+
}
|
|
11452
11759
|
const toolRegistry = this.config.getToolRegistry();
|
|
11453
11760
|
const tool = toolRegistry.getTool(toolName);
|
|
11454
11761
|
if (!tool) {
|
|
@@ -11484,7 +11791,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11484
11791
|
// (coreToolScheduler.ts) so pre-Phase-2 dashboards keyed off call_id keep
|
|
11485
11792
|
// matching daemon/ACP tool spans during the migration window.
|
|
11486
11793
|
call_id: callId,
|
|
11487
|
-
tool_name: policyToolName
|
|
11794
|
+
tool_name: policyToolName,
|
|
11795
|
+
...codeModeContext ? {
|
|
11796
|
+
"tool.parent_call_id": codeModeContext.parentCallId,
|
|
11797
|
+
"tool.source": codeModeContext.source
|
|
11798
|
+
} : {}
|
|
11488
11799
|
},
|
|
11489
11800
|
tool.description,
|
|
11490
11801
|
promptId
|
|
@@ -11493,6 +11804,19 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11493
11804
|
return await runInToolSpanContext(toolSpan, async () => {
|
|
11494
11805
|
const entryCancellation = cancelBeforeExecutionIfAborted(toolName);
|
|
11495
11806
|
if (entryCancellation) return entryCancellation;
|
|
11807
|
+
if (policyToolName === ToolNames.PROPOSE_GOAL && (this.activeGoalProposalTurn?.turnKey !== promptId || this.activeGoalProposalTurn.controller.signal.aborted)) {
|
|
11808
|
+
return earlyErrorResponse(
|
|
11809
|
+
new Error(
|
|
11810
|
+
"The Goal was not set: this turn cannot own a Goal approval. Hand the user a `/goal set <objective>` line instead."
|
|
11811
|
+
),
|
|
11812
|
+
toolName,
|
|
11813
|
+
{
|
|
11814
|
+
status: "error",
|
|
11815
|
+
errorType: "execution_denied" /* EXECUTION_DENIED */,
|
|
11816
|
+
executionStatus: "not_started"
|
|
11817
|
+
}
|
|
11818
|
+
);
|
|
11819
|
+
}
|
|
11496
11820
|
const isTrustedLiveScreenContextTool = tool === this.liveScreenContextTool;
|
|
11497
11821
|
const isTrustedLiveTaskTool = this.liveTaskTools.includes(
|
|
11498
11822
|
tool
|
|
@@ -12469,11 +12793,85 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12469
12793
|
});
|
|
12470
12794
|
executionStatus = "error";
|
|
12471
12795
|
executeAttempted = true;
|
|
12796
|
+
executionStartedAt = performance.now();
|
|
12472
12797
|
try {
|
|
12473
|
-
|
|
12798
|
+
const execute = /* @__PURE__ */ __name(() => invocation.execute(
|
|
12474
12799
|
activeToolAbortSignal,
|
|
12475
|
-
onToolProgress
|
|
12476
|
-
|
|
12800
|
+
onToolProgress,
|
|
12801
|
+
this.config.getShellExecutionConfig()
|
|
12802
|
+
), "execute");
|
|
12803
|
+
if (toolName !== ToolNames.EXEC) {
|
|
12804
|
+
toolResult = await execute();
|
|
12805
|
+
} else {
|
|
12806
|
+
let dispatchTail = Promise.resolve();
|
|
12807
|
+
const dispatch = /* @__PURE__ */ __name((nestedName, nestedArgs, nestedSignal, onResult) => {
|
|
12808
|
+
const next = dispatchTail.then(async () => {
|
|
12809
|
+
if (!isCodeModeToolCallAllowed(nestedName, "code_mode")) {
|
|
12810
|
+
throw new Error(
|
|
12811
|
+
`Tool "${nestedName}" is not callable from exec.`
|
|
12812
|
+
);
|
|
12813
|
+
}
|
|
12814
|
+
const nestedCallId = `${callId}:code:${++this.codeModeNestedSequence}`;
|
|
12815
|
+
const nested = await runWithoutToolCallRuntime(
|
|
12816
|
+
() => this.runTool(
|
|
12817
|
+
nestedSignal,
|
|
12818
|
+
promptId,
|
|
12819
|
+
{
|
|
12820
|
+
id: nestedCallId,
|
|
12821
|
+
name: nestedName,
|
|
12822
|
+
args: nestedArgs
|
|
12823
|
+
},
|
|
12824
|
+
onStopAfterPermissionCancel,
|
|
12825
|
+
toolLoopState,
|
|
12826
|
+
recordSkippedToolCall,
|
|
12827
|
+
queueToolResultRecord,
|
|
12828
|
+
nestedCallId,
|
|
12829
|
+
onFullTurnModel,
|
|
12830
|
+
{ parentCallId: callId, source: "code_mode" }
|
|
12831
|
+
)
|
|
12832
|
+
);
|
|
12833
|
+
const nestedParts = finalizeCodeModeToolResult ? await finalizeCodeModeToolResult(nested) : nested.parts;
|
|
12834
|
+
const functionResponse = nestedParts.map((part) => part.functionResponse).find((part) => part?.id === nestedCallId);
|
|
12835
|
+
const response = functionResponse?.response;
|
|
12836
|
+
const nestedError = response?.["error"];
|
|
12837
|
+
onResult?.({
|
|
12838
|
+
callId: nestedCallId,
|
|
12839
|
+
responseParts: nestedParts,
|
|
12840
|
+
resultDisplay: void 0,
|
|
12841
|
+
error: nestedError === void 0 ? void 0 : new Error(String(nestedError)),
|
|
12842
|
+
errorType: void 0,
|
|
12843
|
+
..."modelOverride" in nested ? { modelOverride: nested.modelOverride } : {},
|
|
12844
|
+
...nested.terminateTurn ? { terminateTurn: true } : {}
|
|
12845
|
+
});
|
|
12846
|
+
if (nestedError !== void 0) {
|
|
12847
|
+
throw new Error(
|
|
12848
|
+
typeof nestedError === "string" ? nestedError : JSON.stringify(nestedError)
|
|
12849
|
+
);
|
|
12850
|
+
}
|
|
12851
|
+
const nestedOutput = response?.["output"] ?? response?.["content"] ?? "";
|
|
12852
|
+
const content = extractCodeModeImageContent(nestedParts);
|
|
12853
|
+
return {
|
|
12854
|
+
callId: nestedCallId,
|
|
12855
|
+
name: nestedName,
|
|
12856
|
+
status: "success",
|
|
12857
|
+
output: typeof nestedOutput === "string" ? nestedOutput : JSON.stringify(nestedOutput),
|
|
12858
|
+
...content ? { content } : {}
|
|
12859
|
+
};
|
|
12860
|
+
});
|
|
12861
|
+
dispatchTail = next.then(
|
|
12862
|
+
() => void 0,
|
|
12863
|
+
() => void 0
|
|
12864
|
+
);
|
|
12865
|
+
return next;
|
|
12866
|
+
}, "dispatch");
|
|
12867
|
+
toolResult = await runWithToolCallRuntime(
|
|
12868
|
+
{
|
|
12869
|
+
parentCallId: callId,
|
|
12870
|
+
dispatch
|
|
12871
|
+
},
|
|
12872
|
+
execute
|
|
12873
|
+
);
|
|
12874
|
+
}
|
|
12477
12875
|
executeReturned = true;
|
|
12478
12876
|
try {
|
|
12479
12877
|
settledArtifacts = toolResult.artifacts;
|
|
@@ -12587,7 +12985,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12587
12985
|
toolUseId,
|
|
12588
12986
|
permissionMode,
|
|
12589
12987
|
activeToolAbortSignal,
|
|
12590
|
-
callId
|
|
12988
|
+
callId,
|
|
12989
|
+
elapsedExecutionMs()
|
|
12591
12990
|
);
|
|
12592
12991
|
if (activeToolAbortSignal.aborted) {
|
|
12593
12992
|
return earlyErrorResponse(
|
|
@@ -12642,7 +13041,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12642
13041
|
isInterrupt,
|
|
12643
13042
|
permissionMode,
|
|
12644
13043
|
activeToolAbortSignal,
|
|
12645
|
-
callId
|
|
13044
|
+
callId,
|
|
13045
|
+
elapsedExecutionMs()
|
|
12646
13046
|
);
|
|
12647
13047
|
if (failureHookResult.additionalContext) {
|
|
12648
13048
|
debugLogger6.debug(
|
|
@@ -12737,6 +13137,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12737
13137
|
"event.name": "tool_call",
|
|
12738
13138
|
"event.timestamp": (/* @__PURE__ */ new Date()).toISOString(),
|
|
12739
13139
|
call_id: callId,
|
|
13140
|
+
...codeModeContext ? {
|
|
13141
|
+
parent_call_id: codeModeContext.parentCallId,
|
|
13142
|
+
source: codeModeContext.source
|
|
13143
|
+
} : {},
|
|
12740
13144
|
function_name: toolName,
|
|
12741
13145
|
function_args: args,
|
|
12742
13146
|
duration_ms: durationMs,
|
|
@@ -12795,8 +13199,9 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12795
13199
|
}
|
|
12796
13200
|
return {
|
|
12797
13201
|
parts: responseParts,
|
|
13202
|
+
..."modelOverride" in toolResult && succeeded ? { modelOverride: toolResult.modelOverride } : {},
|
|
12798
13203
|
stopAfterPermissionCancel: nestedPermissionCancelled,
|
|
12799
|
-
...toolResult.terminateTurn ? { terminateTurn: true } : {},
|
|
13204
|
+
...toolResult.terminateTurn && succeeded ? { terminateTurn: true } : {},
|
|
12800
13205
|
memoryWriteCandidates: status === "success" ? [
|
|
12801
13206
|
{
|
|
12802
13207
|
toolName,
|
|
@@ -12823,7 +13228,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
12823
13228
|
isInterrupt,
|
|
12824
13229
|
String(approvalMode),
|
|
12825
13230
|
activeToolAbortSignal,
|
|
12826
|
-
callId
|
|
13231
|
+
callId,
|
|
13232
|
+
elapsedExecutionMs()
|
|
12827
13233
|
);
|
|
12828
13234
|
if (failureHookResult.additionalContext) {
|
|
12829
13235
|
debugLogger6.debug(
|
|
@@ -14961,7 +15367,7 @@ function createAcpSessionProfiler(span, attributePrefix) {
|
|
|
14961
15367
|
}
|
|
14962
15368
|
}, "setAttribute");
|
|
14963
15369
|
const recordStage = /* @__PURE__ */ __name((stage, start) => {
|
|
14964
|
-
const durationMs = Math.round((
|
|
15370
|
+
const durationMs = Math.round((performance2.now() - start) * 100) / 100;
|
|
14965
15371
|
if (Number.isFinite(durationMs) && durationMs >= 0) {
|
|
14966
15372
|
setAttribute(
|
|
14967
15373
|
`qwen-code.daemon.${attributePrefix}.${stage}_ms`,
|
|
@@ -14980,7 +15386,7 @@ function createAcpSessionProfiler(span, attributePrefix) {
|
|
|
14980
15386
|
},
|
|
14981
15387
|
async time(stage, fn) {
|
|
14982
15388
|
if (!span) return await fn();
|
|
14983
|
-
const start =
|
|
15389
|
+
const start = performance2.now();
|
|
14984
15390
|
try {
|
|
14985
15391
|
return await fn();
|
|
14986
15392
|
} catch (error) {
|
|
@@ -14992,7 +15398,7 @@ function createAcpSessionProfiler(span, attributePrefix) {
|
|
|
14992
15398
|
},
|
|
14993
15399
|
timeSync(stage, fn) {
|
|
14994
15400
|
if (!span) return fn();
|
|
14995
|
-
const start =
|
|
15401
|
+
const start = performance2.now();
|
|
14996
15402
|
try {
|
|
14997
15403
|
return fn();
|
|
14998
15404
|
} catch (error) {
|
|
@@ -15437,6 +15843,7 @@ function hasFailedDisplayStatus(display) {
|
|
|
15437
15843
|
__name(hasFailedDisplayStatus, "hasFailedDisplayStatus");
|
|
15438
15844
|
var AUTH_PREFLIGHT_ENV_KEYS = {
|
|
15439
15845
|
openai: ["OPENAI_API_KEY"],
|
|
15846
|
+
"openai-responses": ["OPENAI_API_KEY"],
|
|
15440
15847
|
anthropic: ["ANTHROPIC_API_KEY"],
|
|
15441
15848
|
gemini: ["GEMINI_API_KEY"],
|
|
15442
15849
|
"vertex-ai": ["GOOGLE_API_KEY"]
|
|
@@ -16538,6 +16945,7 @@ async function runAcpAgent(config, settings, argv, options) {
|
|
|
16538
16945
|
return agentInstance;
|
|
16539
16946
|
}, stream);
|
|
16540
16947
|
markAcpStartup("transportSetupEnd");
|
|
16948
|
+
registerCleanup(() => agentInstance?.closePeerMessaging());
|
|
16541
16949
|
} catch (err) {
|
|
16542
16950
|
eventLoopMonitor.dispose();
|
|
16543
16951
|
throw err;
|
|
@@ -16980,6 +17388,30 @@ var QwenAgent = class _QwenAgent {
|
|
|
16980
17388
|
__name(this, "QwenAgent");
|
|
16981
17389
|
}
|
|
16982
17390
|
sessions = /* @__PURE__ */ new Map();
|
|
17391
|
+
/**
|
|
17392
|
+
* Cross-session messaging for every session this process hosts.
|
|
17393
|
+
*
|
|
17394
|
+
* One inbox, not one per session: the address is a socket, the sessions
|
|
17395
|
+
* are told apart by the `toSessionId` every sender pins on its frame,
|
|
17396
|
+
* and binding a socket per session would multiply file descriptors by
|
|
17397
|
+
* the session count for no added reach.
|
|
17398
|
+
*
|
|
17399
|
+
* Outbound only for now. Inbound is refused rather than held, because a
|
|
17400
|
+
* hold is a question put to a person and nobody is watching a hold list
|
|
17401
|
+
* on a daemon-managed session's behalf; a sender is told so at once
|
|
17402
|
+
* instead of waiting out an expiry.
|
|
17403
|
+
*/
|
|
17404
|
+
peerMessagingStart = null;
|
|
17405
|
+
// Set by closePeerMessaging: a retry must not resurrect an inbox after
|
|
17406
|
+
// teardown ran.
|
|
17407
|
+
peerMessagingClosed = false;
|
|
17408
|
+
/**
|
|
17409
|
+
* Sessions already given a record. A session is published once, but a
|
|
17410
|
+
* reload can hand the same id back through the same path, and two
|
|
17411
|
+
* records for one session would be two names for it in every listing.
|
|
17412
|
+
*/
|
|
17413
|
+
registeredSessions = /* @__PURE__ */ new Set();
|
|
17414
|
+
inboxAddress = null;
|
|
16983
17415
|
modelProviderReloadRevision = 0;
|
|
16984
17416
|
historyMutationTails = /* @__PURE__ */ new Map();
|
|
16985
17417
|
startingSessionIds = /* @__PURE__ */ new Set();
|
|
@@ -17184,6 +17616,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
17184
17616
|
}
|
|
17185
17617
|
async finishManagedShutdown(configs) {
|
|
17186
17618
|
const failures = [];
|
|
17619
|
+
await this.closePeerMessaging();
|
|
17187
17620
|
for (const [sessionId, session] of [...this.sessions]) {
|
|
17188
17621
|
await this.removeStoredSessionEntry(sessionId, session, failures, {
|
|
17189
17622
|
shutdownConfig: false
|
|
@@ -17522,6 +17955,12 @@ var QwenAgent = class _QwenAgent {
|
|
|
17522
17955
|
} catch (error) {
|
|
17523
17956
|
cleanupErrors.push(error);
|
|
17524
17957
|
}
|
|
17958
|
+
this.registeredSessions.delete(sessionId);
|
|
17959
|
+
try {
|
|
17960
|
+
await session.getConfig().unregisterSessionRegistry();
|
|
17961
|
+
} catch (error) {
|
|
17962
|
+
cleanupErrors.push(error);
|
|
17963
|
+
}
|
|
17525
17964
|
if (options.shutdownConfig !== false) {
|
|
17526
17965
|
try {
|
|
17527
17966
|
await session.getConfig().shutdown({ shutdownTelemetry: false });
|
|
@@ -17775,6 +18214,113 @@ var QwenAgent = class _QwenAgent {
|
|
|
17775
18214
|
}
|
|
17776
18215
|
await this.closeStoredSession(sessionId, opts);
|
|
17777
18216
|
}
|
|
18217
|
+
/**
|
|
18218
|
+
* Bind the one inbox every session this process hosts shares.
|
|
18219
|
+
*
|
|
18220
|
+
* Not awaited: binding a socket must not delay the first prompt, and a
|
|
18221
|
+
* session published before it resolves still registers — the address
|
|
18222
|
+
* is patched into every record when it arrives (`publishInboxAddress`).
|
|
18223
|
+
*/
|
|
18224
|
+
startPeerMessaging() {
|
|
18225
|
+
if (this.peerMessagingStart) return;
|
|
18226
|
+
if (this.peerMessagingClosed) return;
|
|
18227
|
+
this.peerMessagingStart = (async () => {
|
|
18228
|
+
try {
|
|
18229
|
+
const messaging = await PeerMessaging.start({
|
|
18230
|
+
// Inbound is refused outright, so neither the approval mode nor
|
|
18231
|
+
// the parity rule it feeds is ever consulted. Stated rather than
|
|
18232
|
+
// left to a default: what a daemon-managed session may be told
|
|
18233
|
+
// is settled here and nowhere else.
|
|
18234
|
+
getApprovalMode: /* @__PURE__ */ __name(() => null, "getApprovalMode"),
|
|
18235
|
+
getPolicySetting: /* @__PURE__ */ __name(() => "refuse", "getPolicySetting"),
|
|
18236
|
+
updateSessionRegistryIpcPath: /* @__PURE__ */ __name((ipcPath, ipcToken) => this.publishInboxAddress(ipcPath, ipcToken), "updateSessionRegistryIpcPath"),
|
|
18237
|
+
ownsSessionId: /* @__PURE__ */ __name((id) => {
|
|
18238
|
+
const wanted = normalizeSessionIdForLookup(id);
|
|
18239
|
+
return this.sessions.has(wanted) || [...this.sessions.values()].some(
|
|
18240
|
+
(session) => normalizeSessionIdForLookup(
|
|
18241
|
+
session.getConfig().getSessionId()
|
|
18242
|
+
) === wanted
|
|
18243
|
+
);
|
|
18244
|
+
}, "ownsSessionId")
|
|
18245
|
+
});
|
|
18246
|
+
if (messaging === null) this.peerMessagingStart = null;
|
|
18247
|
+
return messaging;
|
|
18248
|
+
} catch (error) {
|
|
18249
|
+
debugLogger9.error(
|
|
18250
|
+
"[ACP] cross-session messaging failed to start:",
|
|
18251
|
+
error
|
|
18252
|
+
);
|
|
18253
|
+
this.peerMessagingStart = null;
|
|
18254
|
+
return null;
|
|
18255
|
+
}
|
|
18256
|
+
})();
|
|
18257
|
+
}
|
|
18258
|
+
/** Close the inbox and stop advertising it. Safe to call more than once. */
|
|
18259
|
+
async closePeerMessaging() {
|
|
18260
|
+
this.peerMessagingClosed = true;
|
|
18261
|
+
const pending = this.peerMessagingStart;
|
|
18262
|
+
if (!pending) return;
|
|
18263
|
+
this.peerMessagingStart = null;
|
|
18264
|
+
try {
|
|
18265
|
+
await (await pending)?.close();
|
|
18266
|
+
} catch (error) {
|
|
18267
|
+
debugLogger9.debug(
|
|
18268
|
+
`[ACP] closing cross-session messaging failed: ${error instanceof Error ? error.message : String(error)}`
|
|
18269
|
+
);
|
|
18270
|
+
}
|
|
18271
|
+
this.inboxAddress = null;
|
|
18272
|
+
}
|
|
18273
|
+
/**
|
|
18274
|
+
* Give a newly published session a registry record of its own.
|
|
18275
|
+
*
|
|
18276
|
+
* Only when that session's own settings turn messaging on. A record
|
|
18277
|
+
* with no inbox behind it would put a name in every peer's listing
|
|
18278
|
+
* that can be addressed and never answered, which is worse than not
|
|
18279
|
+
* appearing at all — the interactive UI registers unconditionally
|
|
18280
|
+
* because its record also answers "what is running right now", a
|
|
18281
|
+
* question nobody asks of a session a daemon is driving.
|
|
18282
|
+
*/
|
|
18283
|
+
registerHostedSession(sessionId, config, settings) {
|
|
18284
|
+
if (settings.merged.agents?.crossSessionMessaging !== true) return;
|
|
18285
|
+
this.startPeerMessaging();
|
|
18286
|
+
if (this.registeredSessions.has(sessionId)) return;
|
|
18287
|
+
this.registeredSessions.add(sessionId);
|
|
18288
|
+
config.trackSessionRegistration(
|
|
18289
|
+
registerSession({
|
|
18290
|
+
sessionId,
|
|
18291
|
+
cwd: config.getTargetDir(),
|
|
18292
|
+
qwenVersion: config.getCliVersion() ?? null,
|
|
18293
|
+
// What spawned this process, as far as it can tell: the daemon
|
|
18294
|
+
// marks the children it starts, and anything else running
|
|
18295
|
+
// `qwen --acp` is a client driving it directly.
|
|
18296
|
+
kind: process.env[QWEN_CODE_SERVE_ENV] === "1" ? "serve" : "headless",
|
|
18297
|
+
// One record per session rather than one per process: they have
|
|
18298
|
+
// separate ids, names and working directories.
|
|
18299
|
+
slot: "own"
|
|
18300
|
+
})
|
|
18301
|
+
);
|
|
18302
|
+
if (this.inboxAddress) {
|
|
18303
|
+
void config.updateSessionRegistryIpcPath(
|
|
18304
|
+
this.inboxAddress.ipcPath,
|
|
18305
|
+
this.inboxAddress.ipcToken
|
|
18306
|
+
);
|
|
18307
|
+
}
|
|
18308
|
+
}
|
|
18309
|
+
/**
|
|
18310
|
+
* Write the inbox address into every hosted session's record.
|
|
18311
|
+
*
|
|
18312
|
+
* They share one address, so this runs once per bind rather than once
|
|
18313
|
+
* per session, and again with `undefined` at close so no record
|
|
18314
|
+
* advertises a socket that is gone.
|
|
18315
|
+
*/
|
|
18316
|
+
async publishInboxAddress(ipcPath, ipcToken) {
|
|
18317
|
+
this.inboxAddress = ipcPath !== void 0 && ipcToken !== void 0 ? { ipcPath, ipcToken } : null;
|
|
18318
|
+
await Promise.allSettled(
|
|
18319
|
+
[...this.sessions.values()].map(
|
|
18320
|
+
(session) => session.getConfig().updateSessionRegistryIpcPath(ipcPath, ipcToken)
|
|
18321
|
+
)
|
|
18322
|
+
);
|
|
18323
|
+
}
|
|
17778
18324
|
async disposeSessions() {
|
|
17779
18325
|
this.activeWorkReporter?.dispose();
|
|
17780
18326
|
this.activeWorkReporter = void 0;
|
|
@@ -17786,6 +18332,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
17786
18332
|
controller.abort();
|
|
17787
18333
|
}
|
|
17788
18334
|
this.workspaceGenerationControllers.clear();
|
|
18335
|
+
await this.closePeerMessaging();
|
|
17789
18336
|
await Promise.allSettled(
|
|
17790
18337
|
[...this.sessions.entries()].map(
|
|
17791
18338
|
([sessionId, session]) => this.discardStoredSessionIfCurrent(sessionId, session, {
|
|
@@ -17926,7 +18473,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
17926
18473
|
}
|
|
17927
18474
|
this.clientCapabilities = args.clientCapabilities;
|
|
17928
18475
|
const authMethods = buildAuthMethods();
|
|
17929
|
-
const version = "0.23.
|
|
18476
|
+
const version = "0.23.3-nightly.20260911.aaa6a32aae";
|
|
17930
18477
|
const response = {
|
|
17931
18478
|
protocolVersion: PROTOCOL_VERSION,
|
|
17932
18479
|
agentInfo: {
|
|
@@ -18872,7 +19419,7 @@ var QwenAgent = class _QwenAgent {
|
|
|
18872
19419
|
}
|
|
18873
19420
|
return await this.runInSessionContext(
|
|
18874
19421
|
session,
|
|
18875
|
-
() => session.setModel({ ...params, sessionId })
|
|
19422
|
+
() => params._meta?.[SESSION_MODEL_PERSIST_DEFAULT_META_KEY] === false ? session.setModel({ ...params, sessionId }, { persistDefault: false }) : session.setModel({ ...params, sessionId })
|
|
18876
19423
|
);
|
|
18877
19424
|
}
|
|
18878
19425
|
async setSessionConfigOption(params) {
|
|
@@ -19009,13 +19556,24 @@ var QwenAgent = class _QwenAgent {
|
|
|
19009
19556
|
const suppliedContext = meta[INVOCATION_CONTEXT_META_KEY];
|
|
19010
19557
|
const suppliedModelPrompt = meta[DAEMON_MODEL_PROMPT_META_KEY];
|
|
19011
19558
|
const suppliedPromptDisplayText = meta[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
19559
|
+
const submittedPrompt = this.privateParentState === "trusted" ? meta[DAEMON_SUBMITTED_PROMPT_META_KEY] : meta[SUBMITTED_PROMPT_META_KEY];
|
|
19012
19560
|
const suppliedChannelPrompt = meta[CHANNEL_PROMPT_META_KEY];
|
|
19561
|
+
const suppliedGoalProposalApproval = meta["qwen.goalProposalApproval"];
|
|
19013
19562
|
const suppliedChannelDelivery = meta[DAEMON_CHANNEL_DELIVERY_META_KEY];
|
|
19014
19563
|
delete meta[INVOCATION_CONTEXT_META_KEY];
|
|
19015
19564
|
delete meta[DAEMON_MODEL_PROMPT_META_KEY];
|
|
19016
19565
|
delete meta[PRIVATE_PARENT_CAPABILITY_META_KEY];
|
|
19017
19566
|
delete meta[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
|
|
19567
|
+
delete meta[SUBMITTED_PROMPT_META_KEY];
|
|
19568
|
+
delete meta[DAEMON_SUBMITTED_PROMPT_META_KEY];
|
|
19569
|
+
if (typeof submittedPrompt === "string" && suppliedChannelPrompt !== true) {
|
|
19570
|
+
meta[DAEMON_SUBMITTED_PROMPT_META_KEY] = submittedPrompt;
|
|
19571
|
+
}
|
|
19018
19572
|
delete meta[CHANNEL_PROMPT_META_KEY];
|
|
19573
|
+
delete meta["qwen.goalProposalApproval"];
|
|
19574
|
+
if (this.privateParentState === "trusted" && suppliedGoalProposalApproval === true) {
|
|
19575
|
+
meta["qwen.goalProposalApproval"] = true;
|
|
19576
|
+
}
|
|
19019
19577
|
delete meta[DAEMON_CHANNEL_DELIVERY_META_KEY];
|
|
19020
19578
|
if (this.privateParentState === "trusted" && typeof suppliedPromptDisplayText === "string") {
|
|
19021
19579
|
meta[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY] = suppliedPromptDisplayText;
|
|
@@ -20879,6 +21437,22 @@ var QwenAgent = class _QwenAgent {
|
|
|
20879
21437
|
}
|
|
20880
21438
|
return await this.extMethodInternal(method, normalizedParams);
|
|
20881
21439
|
} catch (error) {
|
|
21440
|
+
if ([
|
|
21441
|
+
"qwen/session/sources/list",
|
|
21442
|
+
"qwen/session/sources/upsert",
|
|
21443
|
+
"qwen/session/sources/remove",
|
|
21444
|
+
"qwen/session/sources/copy"
|
|
21445
|
+
].includes(method)) {
|
|
21446
|
+
if (!(error instanceof SessionSourceError)) {
|
|
21447
|
+
debugLogger9.error("[ACP] Session source ext-method error:", error);
|
|
21448
|
+
}
|
|
21449
|
+
return {
|
|
21450
|
+
sourceError: error instanceof SessionSourceError ? { code: error.code, message: error.message } : {
|
|
21451
|
+
code: "source_persistence_unavailable",
|
|
21452
|
+
message: "Session source operation failed"
|
|
21453
|
+
}
|
|
21454
|
+
};
|
|
21455
|
+
}
|
|
20882
21456
|
const writerError = getSessionWriterError(error);
|
|
20883
21457
|
if (writerError) {
|
|
20884
21458
|
throw new RequestError(writerError.rpcCode, writerError.message, {
|
|
@@ -22339,6 +22913,101 @@ var QwenAgent = class _QwenAgent {
|
|
|
22339
22913
|
}
|
|
22340
22914
|
return { requestId, cancelled };
|
|
22341
22915
|
}
|
|
22916
|
+
case "qwen/session/sources/list":
|
|
22917
|
+
case "qwen/session/sources/upsert":
|
|
22918
|
+
case "qwen/session/sources/remove":
|
|
22919
|
+
case "qwen/session/sources/copy": {
|
|
22920
|
+
if (!this.isTrustedManagedParent()) {
|
|
22921
|
+
throw RequestError.invalidParams(
|
|
22922
|
+
void 0,
|
|
22923
|
+
"Sources require a trusted private ACP parent"
|
|
22924
|
+
);
|
|
22925
|
+
}
|
|
22926
|
+
const sessionId = params["sessionId"];
|
|
22927
|
+
if (typeof sessionId !== "string" || !sessionId) {
|
|
22928
|
+
throw RequestError.invalidParams(
|
|
22929
|
+
void 0,
|
|
22930
|
+
"Invalid source sessionId"
|
|
22931
|
+
);
|
|
22932
|
+
}
|
|
22933
|
+
const session = this.sessionOrThrow(sessionId);
|
|
22934
|
+
const sourceConfig = session.getConfig();
|
|
22935
|
+
const service = sourceConfig.getSessionSourceService();
|
|
22936
|
+
if (method === "qwen/session/sources/copy" && !service && !sourceConfig.getChatRecordingService()) {
|
|
22937
|
+
return { warnings: [] };
|
|
22938
|
+
}
|
|
22939
|
+
if (!service)
|
|
22940
|
+
throw new SessionSourceError(
|
|
22941
|
+
"source_persistence_unavailable",
|
|
22942
|
+
"Session sources unavailable"
|
|
22943
|
+
);
|
|
22944
|
+
if (method === "qwen/session/sources/list")
|
|
22945
|
+
return { ...await service.list() };
|
|
22946
|
+
if (method === "qwen/session/sources/upsert")
|
|
22947
|
+
return { ...await service.upsert(params["input"]) };
|
|
22948
|
+
if (method === "qwen/session/sources/remove") {
|
|
22949
|
+
const sourceId = params["sourceId"];
|
|
22950
|
+
if (typeof sourceId !== "string" || !sourceId || sourceId.length > 200)
|
|
22951
|
+
throw new SessionSourceError("invalid_source", "Invalid source ID");
|
|
22952
|
+
return { ...await service.remove(sourceId) };
|
|
22953
|
+
}
|
|
22954
|
+
const targetSessionId = params["targetSessionId"];
|
|
22955
|
+
const targetCwd = params["targetCwd"];
|
|
22956
|
+
const attachmentIds = params["attachmentIds"];
|
|
22957
|
+
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")) {
|
|
22958
|
+
throw RequestError.invalidParams(
|
|
22959
|
+
void 0,
|
|
22960
|
+
"Invalid source copy target"
|
|
22961
|
+
);
|
|
22962
|
+
}
|
|
22963
|
+
const sources = (await service.list()).sources;
|
|
22964
|
+
if (!sources.length) return { warnings: [] };
|
|
22965
|
+
const targetData = await sourceConfig.getSessionService().loadSession(targetSessionId);
|
|
22966
|
+
if (!targetData?.conversation.messages.some(
|
|
22967
|
+
(record) => record.forkedFrom?.sessionId === sessionId
|
|
22968
|
+
)) {
|
|
22969
|
+
throw RequestError.invalidParams(
|
|
22970
|
+
void 0,
|
|
22971
|
+
"Source copy target is not a fork of this session"
|
|
22972
|
+
);
|
|
22973
|
+
}
|
|
22974
|
+
let temporaryConfig;
|
|
22975
|
+
try {
|
|
22976
|
+
const targetConfig = this.sessions.get(targetSessionId)?.getConfig() ?? (temporaryConfig = await this.newSessionConfig(
|
|
22977
|
+
targetCwd,
|
|
22978
|
+
[],
|
|
22979
|
+
loadSettings(targetCwd),
|
|
22980
|
+
void 0,
|
|
22981
|
+
targetSessionId,
|
|
22982
|
+
true,
|
|
22983
|
+
{
|
|
22984
|
+
skipMcpDiscovery: true,
|
|
22985
|
+
skipHooks: true,
|
|
22986
|
+
skipSkillManager: true,
|
|
22987
|
+
skipFileCheckpointing: true,
|
|
22988
|
+
lenientToolWarmup: true
|
|
22989
|
+
}
|
|
22990
|
+
));
|
|
22991
|
+
const targetService = targetConfig.getSessionSourceService();
|
|
22992
|
+
if (!targetService)
|
|
22993
|
+
throw new SessionSourceError(
|
|
22994
|
+
"source_persistence_unavailable",
|
|
22995
|
+
"Target sources unavailable"
|
|
22996
|
+
);
|
|
22997
|
+
return await targetService.copyFrom(
|
|
22998
|
+
sources,
|
|
22999
|
+
attachmentIds
|
|
23000
|
+
);
|
|
23001
|
+
} finally {
|
|
23002
|
+
if (temporaryConfig) {
|
|
23003
|
+
try {
|
|
23004
|
+
await this.cleanupUnstoredConfig(temporaryConfig);
|
|
23005
|
+
} catch (error) {
|
|
23006
|
+
debugLogger9.warn("Failed to clean up source copy config:", error);
|
|
23007
|
+
}
|
|
23008
|
+
}
|
|
23009
|
+
}
|
|
23010
|
+
}
|
|
22342
23011
|
case SERVE_CONTROL_EXT_METHODS.sessionArtifactsPersist: {
|
|
22343
23012
|
const sessionId = params["sessionId"];
|
|
22344
23013
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
@@ -24851,9 +25520,7 @@ ${outputText}
|
|
|
24851
25520
|
config.setDisabledTools(new Set(disabled));
|
|
24852
25521
|
}
|
|
24853
25522
|
const workflowsWereEnabled = config.isWorkflowsEnabled();
|
|
24854
|
-
config.setWorkflowsEnabled(
|
|
24855
|
-
newMerged.tools?.workflowsEnabled === true
|
|
24856
|
-
);
|
|
25523
|
+
config.setWorkflowsEnabled(newMerged.tools?.workflowsEnabled);
|
|
24857
25524
|
if (config.isWorkflowsEnabled() !== workflowsWereEnabled) {
|
|
24858
25525
|
try {
|
|
24859
25526
|
await session.sendAvailableCommandsUpdate();
|
|
@@ -25266,6 +25933,10 @@ ${outputText}
|
|
|
25266
25933
|
if (sessionSource) {
|
|
25267
25934
|
config.setSessionSource(sessionSource.sourceType, sessionSource.sourceId);
|
|
25268
25935
|
}
|
|
25936
|
+
config.setArtifactSnapshotsEnabled(this.isTrustedManagedParent());
|
|
25937
|
+
if (this.clientCapabilities?._meta?.["qwen.goalProposals"] === true) {
|
|
25938
|
+
config.setGoalProposalHostSupported(true);
|
|
25939
|
+
}
|
|
25269
25940
|
if (chatRecording !== false) {
|
|
25270
25941
|
this.initializingConfigs.add(config);
|
|
25271
25942
|
}
|
|
@@ -25315,6 +25986,9 @@ ${outputText}
|
|
|
25315
25986
|
});
|
|
25316
25987
|
});
|
|
25317
25988
|
}
|
|
25989
|
+
if (!provisionalWorkspace && chatRecording !== false) {
|
|
25990
|
+
this.bindSessionSourceService(config);
|
|
25991
|
+
}
|
|
25318
25992
|
try {
|
|
25319
25993
|
await config.initialize({
|
|
25320
25994
|
...initializeOptions,
|
|
@@ -25340,6 +26014,41 @@ ${outputText}
|
|
|
25340
26014
|
}
|
|
25341
26015
|
return config;
|
|
25342
26016
|
}
|
|
26017
|
+
bindSessionSourceService(config) {
|
|
26018
|
+
if (this.isTrustedManagedParent() && config.getChatRecordingService()) {
|
|
26019
|
+
config.setSessionSourceServiceFactory(() => {
|
|
26020
|
+
const sourceSessionId = config.getSessionId();
|
|
26021
|
+
const recording = config.getChatRecordingService();
|
|
26022
|
+
const sourceSessions = config.getSessionService();
|
|
26023
|
+
const workspaceCwd = config.storage.getProjectRoot();
|
|
26024
|
+
return new SessionSourceService({
|
|
26025
|
+
sessionId: sourceSessionId,
|
|
26026
|
+
workspaceCwd: /* @__PURE__ */ __name(() => workspaceCwd, "workspaceCwd"),
|
|
26027
|
+
load: /* @__PURE__ */ __name(async () => {
|
|
26028
|
+
if (!recording)
|
|
26029
|
+
throw new SessionSourceError(
|
|
26030
|
+
"source_persistence_unavailable",
|
|
26031
|
+
"Chat recording service unavailable"
|
|
26032
|
+
);
|
|
26033
|
+
await recording.flush();
|
|
26034
|
+
return sourceSessions.readSessionSources(sourceSessionId);
|
|
26035
|
+
}, "load"),
|
|
26036
|
+
persist: /* @__PURE__ */ __name(async (snapshot) => {
|
|
26037
|
+
if (!recording)
|
|
26038
|
+
throw new SessionSourceError(
|
|
26039
|
+
"source_persistence_unavailable",
|
|
26040
|
+
"Chat recording service unavailable"
|
|
26041
|
+
);
|
|
26042
|
+
await recording.recordSessionSourcesSnapshot(snapshot);
|
|
26043
|
+
}, "persist"),
|
|
26044
|
+
notify: /* @__PURE__ */ __name((revision) => this.connection.extNotification(
|
|
26045
|
+
"qwen/notify/session/sources-changed",
|
|
26046
|
+
{ sessionId: sourceSessionId, revision }
|
|
26047
|
+
), "notify")
|
|
26048
|
+
});
|
|
26049
|
+
});
|
|
26050
|
+
}
|
|
26051
|
+
}
|
|
25343
26052
|
async surfaceMcpFailuresWhenReady(config) {
|
|
25344
26053
|
try {
|
|
25345
26054
|
await config.waitForMcpReady();
|
|
@@ -25596,6 +26305,9 @@ ${outputText}
|
|
|
25596
26305
|
this.assertManagedSessionAdmission();
|
|
25597
26306
|
await config.activateProvisionalWorkspace();
|
|
25598
26307
|
this.assertManagedSessionAdmission();
|
|
26308
|
+
this.bindSessionSourceService(config);
|
|
26309
|
+
await config.registerSessionSourceTool();
|
|
26310
|
+
await config.getLlmClient().setTools();
|
|
25599
26311
|
this.setupFileSystem(config);
|
|
25600
26312
|
config.hydrateSessionRestoreFileHistory?.();
|
|
25601
26313
|
if (sessionData?.fileHistorySnapshots?.length) {
|
|
@@ -25603,6 +26315,7 @@ ${outputText}
|
|
|
25603
26315
|
}
|
|
25604
26316
|
await replaySessionHistory();
|
|
25605
26317
|
await options.beforeStartPostReplayServices?.(session);
|
|
26318
|
+
await config.getLlmClient().refreshStartupContextReminder();
|
|
25606
26319
|
session.installRewriter();
|
|
25607
26320
|
config.finalizeSessionRestore?.();
|
|
25608
26321
|
startNonInteractiveOpenAILogHousekeeping(config, settings);
|
|
@@ -25669,6 +26382,7 @@ ${outputText}
|
|
|
25669
26382
|
);
|
|
25670
26383
|
}
|
|
25671
26384
|
this.sessions.set(sessionId, session);
|
|
26385
|
+
this.registerHostedSession(sessionId, config, settings);
|
|
25672
26386
|
this.sessionApprovalModeConverged.set(
|
|
25673
26387
|
sessionId,
|
|
25674
26388
|
config.getApprovalMode()
|