@qwen-code/qwen-code 0.20.2-jobbench-no-todo-write.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +5 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +23 -5
- package/bundled/qc-helper/docs/integration-github-action.md +9 -9
- package/bundled/review/SKILL.md +7 -3
- package/chunks/MaxSizedBox-5DPPWPGT.js +85 -0
- package/chunks/{StandaloneSessionPicker-WBRBHD2M.js → StandaloneSessionPicker-BIRMPLRD.js} +66 -58
- package/chunks/{acp-startup-profiler-N3RHHXJ3.js → acp-startup-profiler-RV3IV562.js} +2 -2
- package/chunks/{acpAgent-BBQZ33CA.js → acpAgent-6J2U72PQ.js} +706 -182
- package/chunks/agent-6ODUANDO.js +81 -0
- package/chunks/agent-headless-7BYQTMHW.js +75 -0
- package/chunks/{anthropicContentGenerator-HGWAHO24.js → anthropicContentGenerator-75BKLTSP.js} +117 -43
- package/chunks/{artifact-tool-56T5IMBP.js → artifact-tool-Y5T7GG7F.js} +3 -3
- package/chunks/{askUserQuestion-E25OBIC2.js → askUserQuestion-2H6747FR.js} +3 -3
- package/chunks/bridge-ZUB64FAE.js +90 -0
- package/chunks/{build-SSCNEHZZ.js → build-RV63TIRH.js} +2 -3
- package/chunks/{ca-N6VVUFVB.js → ca-25EDXPFZ.js} +2 -0
- package/chunks/{channel-worker-group-LFBT7K64.js → channel-worker-group-2ZD7TVAT.js} +7 -6
- package/chunks/{channel-worker-manager-3RUPERG2.js → channel-worker-manager-4OA4BCGB.js} +189 -29
- package/chunks/{channel-worker-supervisor-A3KVATD3.js → channel-worker-supervisor-V7KCFJTS.js} +6 -5
- package/chunks/{chunk-TYQMGACW.js → chunk-22C7BQ6D.js} +508 -10967
- package/chunks/chunk-2JZBVYTU.js +452 -0
- package/chunks/{chunk-H2XVO6NE.js → chunk-2MIN6GRR.js} +1 -1
- package/chunks/{chunk-B2HSPMD4.js → chunk-2NH6DYI4.js} +12 -12
- package/chunks/chunk-2SCDWPXI.js +246 -0
- package/chunks/{chunk-JK26TQON.js → chunk-2X55UKQE.js} +3 -3
- package/chunks/{chunk-7VUQQBR7.js → chunk-3QMGYBFN.js} +2 -65
- package/chunks/{chunk-UMCULC5M.js → chunk-3RN6GBKS.js} +1 -1
- package/chunks/{chunk-QR6U5QPP.js → chunk-3SJ43L4W.js} +4 -0
- package/chunks/chunk-46UV252V.js +128 -0
- package/chunks/{chunk-GPMVHZP4.js → chunk-4WIZGAH3.js} +7 -7
- package/chunks/{chunk-CI3GWKGJ.js → chunk-55DJUCI2.js} +87 -29
- package/chunks/{chunk-QNLNLENL.js → chunk-5I2IWRSH.js} +2 -2
- package/chunks/{chunk-D7WXIW7H.js → chunk-5NBDS5S6.js} +145 -5
- package/chunks/{chunk-E4IMU4Y5.js → chunk-63P4EL5V.js} +1 -1
- package/chunks/chunk-6FGBXPWM.js +293 -0
- package/chunks/{chunk-NEEB7UEN.js → chunk-6GMVPFB2.js} +153 -72
- package/chunks/{chunk-KWK7UE6L.js → chunk-6OUGMXDC.js} +6 -6
- package/chunks/{chunk-QRUIS3DN.js → chunk-6PEXNQTX.js} +22 -1
- package/chunks/{chunk-77OZOGPT.js → chunk-7JURR4JT.js} +1 -1
- package/chunks/{chunk-4MWNZNJ4.js → chunk-7MVVZO4N.js} +4 -4
- package/chunks/{chunk-6ZBPS62S.js → chunk-7ZCNENPP.js} +1 -1
- package/chunks/{chunk-6X4GWOPW.js → chunk-A5L3JMUA.js} +1 -1
- package/chunks/{chunk-B3I77W5J.js → chunk-ACY3A37B.js} +3 -3
- package/chunks/chunk-AMDSOFFV.js +10860 -0
- package/chunks/{chunk-RV4C2ZFG.js → chunk-BIQWWWJN.js} +1 -1
- package/chunks/{chunk-ZHERRXZJ.js → chunk-BJX6ZSUK.js} +4 -4
- package/chunks/chunk-BK2UNYWD.js +29 -0
- package/chunks/{chunk-7TLUW4ZE.js → chunk-BKHWX6I2.js} +3 -3
- package/chunks/chunk-BPJSQIJX.js +100 -0
- package/chunks/{chunk-M7WBGLYP.js → chunk-BULDBTYC.js} +2 -0
- package/chunks/{chunk-H4A4A2SY.js → chunk-CIKQ7KKO.js} +4625 -8645
- package/chunks/{chunk-QZJY47IE.js → chunk-D3UEZIQH.js} +7 -5
- package/chunks/chunk-DHHOYAPR.js +1462 -0
- package/chunks/{chunk-LESHKUWF.js → chunk-DLWL3Z7A.js} +5 -3
- package/chunks/{chunk-XHATNRQA.js → chunk-DP3IHZGG.js} +0 -2
- package/chunks/chunk-E5TUC6CA.js +479 -0
- package/chunks/{chunk-6NRFYMKG.js → chunk-EBJQ6AXW.js} +11 -10
- package/chunks/{chunk-HABKX6LY.js → chunk-EPDRMGT4.js} +164 -17
- package/chunks/{chunk-P2BQZ7H7.js → chunk-ETSW4KLJ.js} +2 -2
- package/chunks/{chunk-KHOVYUHX.js → chunk-FNQ6T3CV.js} +20 -3
- package/chunks/{chunk-64EG42HV.js → chunk-FQK6JAFG.js} +72 -23
- package/chunks/{chunk-L6U47G5P.js → chunk-FSITMZJH.js} +8 -8
- package/chunks/{chunk-6RLROE6G.js → chunk-GLWP3FDB.js} +80 -15
- package/chunks/{chunk-CXIOPXRR.js → chunk-GSN55ZRI.js} +5 -5
- package/chunks/{chunk-LVA5OHQO.js → chunk-H4SBPHSA.js} +3 -3
- package/chunks/chunk-H5FFA6TH.js +902 -0
- package/chunks/{chunk-TDKQP3M6.js → chunk-HIJQF5B5.js} +1 -1
- package/chunks/{chunk-NXE6SQIV.js → chunk-IJTOWOD7.js} +14 -3
- package/chunks/chunk-IKCX4CCL.js +469 -0
- package/chunks/{chunk-7SSWNGEJ.js → chunk-IKYJHJNF.js} +3 -3
- package/chunks/{chunk-64XKYOXK.js → chunk-IO3IX5Q4.js} +1 -1
- package/chunks/{chunk-RS7MT2QG.js → chunk-IPUUTYMV.js} +2 -4
- package/chunks/{chunk-XU457J4V.js → chunk-IRH27ZC2.js} +2 -2
- package/chunks/{chunk-SVIMKSEI.js → chunk-J24WCGIN.js} +4 -4
- package/chunks/{chunk-4LVZNIDO.js → chunk-J56UI34H.js} +4 -13
- package/chunks/{chunk-TJTKSVIV.js → chunk-JLU636DO.js} +5 -1
- package/chunks/{chunk-7PIL2BYF.js → chunk-JVPM2ULZ.js} +6 -6
- package/chunks/{chunk-KBB5O3JO.js → chunk-JXJFVC6E.js} +37 -18
- package/chunks/chunk-JZA3JUDJ.js +82 -0
- package/chunks/{chunk-45PO6ZIS.js → chunk-K36B6G2O.js} +5 -5
- package/chunks/{chunk-GPSKDNEE.js → chunk-K4XWPEWB.js} +4 -4
- package/chunks/{chunk-K7EUPLIP.js → chunk-KIM5GUMA.js} +654 -117
- package/chunks/{chunk-42W5BDEY.js → chunk-KMQ33DO4.js} +7 -5
- package/chunks/{chunk-E2UVIFI2.js → chunk-KRXPRVGL.js} +0 -1
- package/chunks/{chunk-WHGVTP7Q.js → chunk-L26JL52R.js} +3 -3
- package/chunks/{chunk-7Z6JQEL6.js → chunk-L5UHQJTJ.js} +1 -1
- package/chunks/{chunk-26CBI4DC.js → chunk-LB6DUZ26.js} +259 -67
- package/chunks/chunk-LEH5C7FV.js +232 -0
- package/chunks/{chunk-UTGFTJ2H.js → chunk-LH2BYDQ5.js} +6 -4
- package/chunks/{chunk-QKTHJXCS.js → chunk-LK7CHLVP.js} +79 -2
- package/chunks/{chunk-V7WNRZL7.js → chunk-LKEJ26GS.js} +11 -11
- package/chunks/{chunk-6VPLV3L3.js → chunk-LQIW3YFY.js} +227 -41
- package/chunks/chunk-LS77BEZP.js +405 -0
- package/chunks/{chunk-5WDRI7US.js → chunk-M4FMGVY4.js} +3 -3
- package/chunks/{chunk-57FIIFJN.js → chunk-M5JM7OSF.js} +1 -1
- package/chunks/{chunk-7362QS5B.js → chunk-MB4MZHMJ.js} +80 -37
- package/chunks/{chunk-4K56OJFJ.js → chunk-MUP3T3AD.js} +1 -1
- package/chunks/{chunk-CJQ3FZ2G.js → chunk-MVSUYZDT.js} +4 -4
- package/chunks/{chunk-6FZYKBKV.js → chunk-MZAXJAUM.js} +1 -1
- package/chunks/{chunk-32L4D2O2.js → chunk-NH6KE4JX.js} +3 -3
- package/chunks/chunk-NIBLUX3Y.js +934 -0
- package/chunks/{chunk-OQB4EXO4.js → chunk-NL7LTRLR.js} +1 -1
- package/chunks/{chunk-6S5HSCOI.js → chunk-OFDOK3VM.js} +5 -5
- package/chunks/{chunk-LIZRAKPB.js → chunk-OHNBB4XR.js} +1 -1
- package/chunks/{chunk-MDZTPSXO.js → chunk-OKY7HXPG.js} +2 -2
- package/chunks/{chunk-NHDKSOEY.js → chunk-P3QQPMQA.js} +5 -5
- package/chunks/{chunk-4SCOLXTD.js → chunk-PC6JANNU.js} +5 -5
- package/chunks/{chunk-IWALV67J.js → chunk-PHOF65IG.js} +4300 -1284
- package/chunks/{chunk-OQ5SYCPE.js → chunk-PJIZUQVC.js} +2 -2
- package/chunks/{chunk-5DTTYNB7.js → chunk-PQNHRFJC.js} +16 -3
- package/chunks/{chunk-YM3SZTH4.js → chunk-PR75REBZ.js} +18 -1
- package/chunks/{chunk-5XORMWA2.js → chunk-PSOO6YXD.js} +18 -15
- package/chunks/{chunk-X6N25LXS.js → chunk-PWTZEM3C.js} +2 -2
- package/chunks/{chunk-GSX6P2JW.js → chunk-PWVFN2LF.js} +1 -1
- package/chunks/{chunk-AHX6AKPD.js → chunk-Q4M4MDQ4.js} +2 -2
- package/chunks/{chunk-3EHJ44GG.js → chunk-QAF7NMK7.js} +1 -1
- package/chunks/{chunk-WSYKDFYR.js → chunk-R5AFZNQW.js} +5 -5
- package/chunks/{chunk-63DJBU32.js → chunk-RF3EXIHJ.js} +39 -18
- package/chunks/{chunk-4K7VDKAD.js → chunk-RHLZR4E5.js} +1 -1
- package/chunks/{chunk-SXPSOMQ4.js → chunk-RIBKPMRP.js} +220 -141
- package/chunks/{chunk-RVLZCXEE.js → chunk-RWTEFFPU.js} +82 -3
- package/chunks/{chunk-ZUTM4LHM.js → chunk-RZIX2G32.js} +1 -1
- package/chunks/{chunk-ZKBNRL6O.js → chunk-SQCQ4KO2.js} +336 -404
- package/chunks/{chunk-THJNPLI4.js → chunk-TARRHLLG.js} +1 -0
- package/chunks/{chunk-RHYFF54J.js → chunk-TEHGS6UP.js} +50 -21
- package/chunks/{chunk-ACQJPDDS.js → chunk-TGILQ3YH.js} +8 -8
- package/chunks/{chunk-Q2YKNMLS.js → chunk-TOFQCPDC.js} +43 -10
- package/chunks/{chunk-ACZIBDYD.js → chunk-TPRQ7RZH.js} +587 -176
- package/chunks/{chunk-T4TZQJ7W.js → chunk-TWPJO254.js} +5 -16
- package/chunks/{chunk-7MWABCXU.js → chunk-U7M2DMGW.js} +3 -3
- package/chunks/{chunk-KQQ757OQ.js → chunk-UDX5OBWR.js} +41 -9
- package/chunks/{chunk-SRPZG4ER.js → chunk-USTWD7QV.js} +6 -4
- package/chunks/{chunk-NPQDJGKU.js → chunk-UUUTRMI2.js} +1 -1
- package/chunks/chunk-UW5EOVUN.js +249 -0
- package/chunks/{chunk-6IL7KRLE.js → chunk-VAK25FTU.js} +1 -1
- package/chunks/{chunk-TDDFEPBX.js → chunk-VIA5XA4U.js} +5 -2
- package/chunks/{chunk-3BJDQVE6.js → chunk-VRYUBFMC.js} +1 -1
- package/chunks/{chunk-PLQODS7F.js → chunk-VULLI6WQ.js} +172 -6
- package/chunks/{chunk-GN45XAAU.js → chunk-WCXCRJYB.js} +1 -1
- package/chunks/{chunk-2LI23QA6.js → chunk-X5XDDSSH.js} +1 -1
- package/chunks/{chunk-O32RMIMO.js → chunk-Y34KJKDC.js} +1 -1
- package/chunks/{chunk-7ZD5EKXE.js → chunk-YBL3QUDD.js} +2 -2
- package/chunks/{chunk-H4AR2JQF.js → chunk-YH6G52F2.js} +3 -3
- package/chunks/{chunk-3G3UUMRS.js → chunk-YPE6A4GC.js} +2 -2
- package/chunks/{chunk-3F2JUWCH.js → chunk-YX324OPW.js} +1 -1
- package/chunks/{chunk-CGIDQG6J.js → chunk-Z2BC6UJ5.js} +3 -3
- package/chunks/{chunk-QLJUC7TG.js → chunk-ZD6UTE4A.js} +1 -1
- package/chunks/{chunk-ZPWJZHJ2.js → chunk-ZFDTEDCF.js} +6 -6
- package/chunks/chunk-ZJHVAS7M.js +289 -0
- package/chunks/{chunk-XAGLQITN.js → chunk-ZNAUOR2I.js} +15 -12
- package/chunks/{chunk-T2L47JJK.js → chunk-ZOIFNCKL.js} +4 -4
- package/chunks/{computer-use-RZ3UUWYW.js → computer-use-SOQ4E3VX.js} +43 -34
- package/chunks/{config-utils-SQUBZEQM.js → config-utils-7V7GGIW6.js} +3 -3
- package/chunks/contextCommand-JLHYA34Z.js +80 -0
- package/chunks/{create-sub-session-AZ77LBL3.js → create-sub-session-IWW2IZ2T.js} +3 -3
- package/chunks/{create-sub-session-EQG73FT6.js → create-sub-session-QRJLW5BV.js} +43 -34
- package/chunks/{cron-create-KTWJM7QT.js → cron-create-YIID5XAW.js} +6 -6
- package/chunks/{cron-delete-2P3I5ULL.js → cron-delete-ZVHYCEP2.js} +5 -5
- package/chunks/{cron-list-PXDPGEDQ.js → cron-list-XEGS463Q.js} +5 -5
- package/chunks/{daemon-RAPSDJH7.js → daemon-YO6433NF.js} +350 -53
- package/chunks/daemon-status-provider-2233Q37D.js +89 -0
- package/chunks/{de-4IBXM7CN.js → de-HGRCYDEJ.js} +1 -0
- package/chunks/{dist-UIFWIFRO.js → dist-46NQKLTW.js} +2 -2
- package/chunks/{dist-XRYV6TJP.js → dist-AIKFMUKK.js} +50 -4
- package/chunks/{dist-XBJVSWS2.js → dist-BBLXMS3N.js} +14 -2
- package/chunks/{dist-OMW6WDEO.js → dist-F6IBUDR4.js} +40 -9
- package/chunks/{dist-PJLG2XYX.js → dist-WEAHOXDM.js} +1 -1
- package/chunks/{dist-OAV7LJGJ.js → dist-YFNEUWSE.js} +26 -2
- package/chunks/earlyInputCapture-A7NDU3PF.js +82 -0
- package/chunks/{edit-XRSKQPHQ.js → edit-OBDSQURM.js} +43 -34
- package/chunks/{en-USMCCJAJ.js → en-MTWBNGDO.js} +15 -0
- package/chunks/{enter-worktree-WAHCWE6I.js → enter-worktree-U6MRPQ2P.js} +43 -34
- package/chunks/{enterPlanMode-QIOYLDCF.js → enterPlanMode-BC5QUZZ2.js} +43 -34
- package/chunks/{environment-T3FXCDJI.js → environment-W5UFC2CH.js} +46 -37
- package/chunks/errors-M7CLORXH.js +88 -0
- package/chunks/{exit-worktree-RHVTLX6T.js → exit-worktree-DGNYMECB.js} +43 -34
- package/chunks/{exitPlanMode-UATOE2GQ.js → exitPlanMode-GXTBWQAR.js} +43 -34
- package/chunks/{fast-path-J3RHOYSZ.js → fast-path-JJZFJANL.js} +6 -6
- package/chunks/{fast-path-settings-XB3CPUJT.js → fast-path-settings-WQJU2LAT.js} +2 -2
- package/chunks/{fr-WVHEBDDB.js → fr-45RLL55O.js} +1 -0
- package/chunks/{gemini-P72OGOH6.js → gemini-QS36EBZV.js} +133 -102
- package/chunks/{geminiContentGenerator-F6EG5FXF.js → geminiContentGenerator-AG4KB6CV.js} +14 -8
- package/chunks/{getMachineId-bsd-QFVLPUPT.js → getMachineId-bsd-V7W3GODC.js} +1 -1
- package/chunks/{getMachineId-darwin-DGMQQE2E.js → getMachineId-darwin-TDO75DQP.js} +1 -1
- package/chunks/{getMachineId-linux-R4Z6CSWC.js → getMachineId-linux-TF43WQT2.js} +1 -1
- package/chunks/{getMachineId-unsupported-Z3SBVBUV.js → getMachineId-unsupported-ZGUO3TXT.js} +1 -1
- package/chunks/{getMachineId-win-SCK5UFDT.js → getMachineId-win-ECFYZZFQ.js} +1 -1
- package/chunks/{glob-WHASQZRX.js → glob-V7R3PSK3.js} +43 -34
- package/chunks/{grep-LS7AADJ3.js → grep-QYPSK7OP.js} +43 -34
- package/chunks/handleAutoUpdate-6DBEZYPV.js +81 -0
- package/chunks/{i18n-IMVASWIF.js → i18n-VUJJZIMU.js} +44 -35
- package/chunks/image-gen-Z3VPGKRC.js +240 -0
- package/chunks/initializer-UWAK5U5O.js +86 -0
- package/chunks/installationInfo-6O2YAA52.js +80 -0
- package/chunks/{ja-KY4ROZTE.js → ja-B7DF7DFG.js} +1 -0
- package/chunks/{keychain-token-storage-6ACJDYIB.js → keychain-token-storage-MDTG3WRM.js} +3 -3
- package/chunks/{kittyProtocolDetector-HCNNKJTI.js → kittyProtocolDetector-MBRTDRBK.js} +5 -3
- package/chunks/list-GB4ESM3T.js +89 -0
- package/chunks/list-agents-5KJJHR6I.js +80 -0
- package/chunks/loadedSettingsAdapter-OT6JVQ7U.js +83 -0
- package/chunks/loggingContentGenerator-HS3S5H3Q.js +1077 -0
- package/chunks/{loop-wakeup-RNMRVA66.js → loop-wakeup-FXKNNYSY.js} +7 -7
- package/chunks/{ls-J2ZI5XYK.js → ls-NTK6VOQJ.js} +5 -5
- package/chunks/{lsp-UMS3NUB5.js → lsp-2JI24STP.js} +3 -3
- package/chunks/{managed-npm-update-L6UY7OM7.js → managed-npm-update-JYEMMXA3.js} +94 -37
- package/chunks/mcp-6DBDJPFU.js +83 -0
- package/chunks/{monitor-DXYFB5QD.js → monitor-R3ODH5U6.js} +45 -35
- package/chunks/node-UUDY34IG.js +305 -0
- package/chunks/nonInteractiveCli-MOYCYBBU.js +141 -0
- package/chunks/{notebook-edit-KGD7YJEA.js → notebook-edit-BNOK452R.js} +43 -34
- package/chunks/{openaiContentGenerator-C74A2XAU.js → openaiContentGenerator-WMCU3O2H.js} +27 -17
- package/chunks/pidfile-TFRZZZIO.js +86 -0
- package/chunks/{processUtils-GUT5B4R6.js → processUtils-RT7UNCC2.js} +2 -2
- package/chunks/{pt-OK455PLH.js → pt-22Q3FP73.js} +1 -0
- package/chunks/{qwenContentGenerator-PT46FQPA.js → qwenContentGenerator-HHCRK4SX.js} +56 -41
- package/chunks/{qwenOAuth2-S7DZHUUU.js → qwenOAuth2-OWLB5AKH.js} +14 -27
- package/chunks/read-file-APMO3PSX.js +31 -0
- package/chunks/{read-mcp-resource-F6HYMDUY.js → read-mcp-resource-4DKQWGHD.js} +3 -3
- package/chunks/{record-artifact-7GCFLDD7.js → record-artifact-RQKFYO5B.js} +3 -3
- package/chunks/resumeHistoryUtils-6KRYEAWZ.js +91 -0
- package/chunks/ripGrep-BEJDEDXW.js +73 -0
- package/chunks/{ru-7SPDGMGD.js → ru-FZCNZHDC.js} +1 -0
- package/chunks/{run-qwen-serve-QO4PT5NV.js → run-qwen-serve-FU6HEM4J.js} +276 -62
- package/chunks/{runtime-EOTXBUM6.js → runtime-XXRRTNP6.js} +55 -44
- package/chunks/{scheduler-MAIQ2PHR.js → scheduler-G2ZS2Z7E.js} +43 -34
- package/chunks/{sdk-exporters-grpc-ETLH47EP.js → sdk-exporters-grpc-AK3LGHNO.js} +3 -3
- package/chunks/{sdk-exporters-http-T3POX73F.js → sdk-exporters-http-FYBSUCPD.js} +6 -6
- package/chunks/{sdk-impl-NSLPDH6I.js → sdk-impl-GMVPB7NB.js} +6 -6
- package/chunks/{send-message-PYIJ2PZL.js → send-message-Q6OOR6BR.js} +46 -9
- package/chunks/serve-7BSTXJ4T.js +89 -0
- package/chunks/{server-CBCC3XQC.js → server-4UMH7OIZ.js} +2348 -396
- package/chunks/{session-RQUEFQDL.js → session-K3O3Q2SV.js} +107 -88
- package/chunks/{settings-QHXCJDSR.js → settings-CR2EWTBA.js} +53 -44
- package/chunks/shell-HH3PF3A2.js +83 -0
- package/chunks/{skill-WHSGTGKP.js → skill-I3SDA4MB.js} +17 -15
- package/chunks/spawnChannel-RWNDBXGA.js +82 -0
- package/chunks/{src-F3HKX47D.js → src-GE4TTTML.js} +290 -171
- package/chunks/{standalone-update-BKLONSVI.js → standalone-update-Q6WFRZZQ.js} +45 -36
- package/chunks/{startInteractiveUI-TNJ37X5W.js → startInteractiveUI-SLZGHRPH.js} +736 -298
- package/chunks/{syntheticOutput-H7RTI5KL.js → syntheticOutput-I3757IWH.js} +4 -4
- package/chunks/{task-create-7474AJJD.js → task-create-N7WQSGYA.js} +10 -10
- package/chunks/{task-list-633HGOIB.js → task-list-FOPULZEP.js} +7 -7
- package/chunks/{task-stop-MNUGHPIA.js → task-stop-H6RHXFVQ.js} +4 -4
- package/chunks/{task-update-66GQB5LI.js → task-update-M57TFZJT.js} +10 -10
- package/chunks/{team-create-LUHJ7ZCC.js → team-create-YJALH5D2.js} +44 -35
- package/chunks/{team-delete-BB3CG3QF.js → team-delete-QE2UXJL7.js} +7 -7
- package/chunks/{team-plan-approval-X3DYRL6L.js → team-plan-approval-34QFYKGN.js} +43 -34
- package/chunks/theme-manager-SWRILQHI.js +77 -0
- package/chunks/todoWrite-VQ7FKOHL.js +358 -0
- package/chunks/{tool-search-BAWOETUY.js → tool-search-NF7GB6LE.js} +16 -16
- package/chunks/total-session-admission-DLHHHLD3.js +84 -0
- package/chunks/{tree-sitter-FS4VPMZA.js → tree-sitter-4D7QS7F6.js} +1 -1
- package/chunks/{tree-sitter-bash-6B46JJCV.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
- package/chunks/{trustedFolders-4UEOIKOF.js → trustedFolders-KHXHY6PY.js} +44 -35
- package/chunks/{update-relaunch-WDWABT5P.js → update-relaunch-WBUZJC5O.js} +5 -5
- package/chunks/updateCheck-RKL6M5XN.js +92 -0
- package/chunks/useAutoAcceptIndicator-CFQ5BUJL.js +93 -0
- package/chunks/{validateNonInterActiveAuth-OKUE3JLF.js → validateNonInterActiveAuth-3R223G3R.js} +91 -81
- package/chunks/{version-GMUULLWB.js → version-HS7YSFHV.js} +1 -1
- package/chunks/{web-fetch-JBWTMPFN.js → web-fetch-NKCSG7ZE.js} +18 -16
- package/chunks/{web-search-27COJHJT.js → web-search-S62WAP4S.js} +13 -27
- package/chunks/{workflow-5L37J7YF.js → workflow-QAGU5RU4.js} +44 -35
- package/chunks/workspace-providers-status-QSVZUETE.js +86 -0
- package/chunks/{workspace-registration-store-TYPYXIP6.js → workspace-registration-store-24JMHDGF.js} +2 -2
- package/chunks/workspace-registry-UT4RBNBM.js +88 -0
- package/chunks/workspace-service-JFWRUS4V.js +98 -0
- package/chunks/workspace-skills-status-ZBBKJOI2.js +85 -0
- package/chunks/write-file-VHIXW5M7.js +73 -0
- package/chunks/{zh-WY5DWYZD.js → zh-LUIGBD55.js} +15 -0
- package/chunks/{zh-TW-BM47YBFH.js → zh-TW-F5KG2IYD.js} +15 -0
- package/cli-entry.js +10 -1
- package/cli.js +13 -13
- package/locales/ca.js +2 -0
- package/locales/de.js +1 -0
- package/locales/en.js +25 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +23 -0
- package/locales/zh.js +23 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-BWFm0SI0.js → arc-DcbWnB9T.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CZ_yL-DQ.js → architectureDiagram-3BPJPVTR-kMMF5sud.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-B9F9mJvG.js → blockDiagram-GPEHLZMM-Htl9vTJS.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BUdwJW5f.js → c4Diagram-AAUBKEIU-BnZnm0mQ.js} +1 -1
- package/web-shell/assets/channel-Cq7YKtfC.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-w4cF-qlF.js → chunk-2J33WTMH-DziB7kDG.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BXwURxHJ.js → chunk-4BX2VUAB-CmkD8daw.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-Gem3LalC.js → chunk-55IACEB6-CHAd9A_U.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-A3ddVojI.js → chunk-727SXJPM-Dqaam3fE.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CjHZ5L_R.js → chunk-AQP2D5EJ-D_-saBYM.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CKgdgcpv.js → chunk-FMBD7UC4-B9r_veWD.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-Cn2Dykjb.js → chunk-ND2GUHAM-B3EaCSpL.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN--0SyraC5.js → chunk-QZHKN3VN-CYq8x9mn.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-CphhAity.js → cose-bilkent-S5V4N54A-D0ng4uiB.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DU--jiKp.js → dagre-BM42HDAG-DCZollQv.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BzvuZw1Y.js → diagram-2AECGRRQ-Dfk2pWS0.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-D84-49Y0.js → diagram-5GNKFQAL-kX38ltWR.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-DQTq-3_3.js → diagram-KO2AKTUF-CJz2vsXh.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-8FTrshzN.js → diagram-LMA3HP47-BvMLZm_7.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BCjpDBCm.js → diagram-OG6HWLK6-l7kfStkO.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-BtRObkmg.js → erDiagram-TEJ5UH35-BSVa8GGT.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-DTrW6oxy.js → flowDiagram-I6XJVG4X-CoawKIXH.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgPNSW6j.js → ganttDiagram-6RSMTGT7-DFUDH0zF.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BTclNgGV.js → gitGraphDiagram-PVQCEYII-Y2pvpT4e.js} +1 -1
- package/web-shell/assets/{index-CxA7AqY6.js → index-D0GX0zZf.js} +1 -1
- package/web-shell/assets/index-D9haPt0X.css +5 -0
- package/web-shell/assets/index-ckX9Pq5k.js +1230 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DCE4AJt2.js → infoDiagram-5YYISTIA-CU8_zLiX.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-C8iE6q4Y.js → ishikawaDiagram-YF4QCWOH-AVQiV0DU.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-C_dxdyEc.js → journeyDiagram-JHISSGLW-DQ0VSKa3.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dw3n1u3w.js → kanban-definition-UN3LZRKU-BqnWqsE_.js} +1 -1
- package/web-shell/assets/{linear-C2BF2zJ9.js → linear-BkoihsaA.js} +1 -1
- package/web-shell/assets/{mermaid.core-CGTQU3MA.js → mermaid.core-5RJs-31j.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BVFZm9ZC.js → mindmap-definition-RKZ34NQL-D33Bxnpd.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-Cc-TNN3n.js → pieDiagram-4H26LBE5-BuEAw3BH.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CgW3Rzsi.js → quadrantDiagram-W4KKPZXB-Kox_usEq.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BAaj0Y3B.js → requirementDiagram-4Y6WPE33-CNjeUif0.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-XJWmekxS.js → sankeyDiagram-5OEKKPKP-BCd2OL_U.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CtRc_0wf.js → sequenceDiagram-3UESZ5HK-CF2ZTsz0.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-WCnvMGy5.js → stateDiagram-AJRCARHV-qenSzHtm.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-C9cRx49L.js → timeline-definition-PNZ67QCA-B5DyWdgs.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BvXOCEt-.js → vennDiagram-CIIHVFJN-DqP4I_o_.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-ByafGtzu.js → wardley-L42UT6IY-CJe2e4mg.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CozAnw8x.js → wardleyDiagram-YWT4CUSO-BMDSw-Rr.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-Camu9Qvq.js → xychartDiagram-2RQKCTM6-BTVZYkxD.js} +1 -1
- package/web-shell/index.html +17 -13
- package/chunks/MaxSizedBox-HNWBEL5H.js +0 -77
- package/chunks/agent-KTMY6SF3.js +0 -72
- package/chunks/agent-headless-HJ56ZZOW.js +0 -66
- package/chunks/bridge-AMC5AD7W.js +0 -80
- package/chunks/chunk-CBOQ3HY7.js +0 -2019
- package/chunks/chunk-UHGNAWHK.js +0 -6928
- package/chunks/contextCommand-PW4GINQU.js +0 -71
- package/chunks/daemon-status-provider-3IWTBWQ3.js +0 -79
- package/chunks/earlyInputCapture-TYNI3B6E.js +0 -73
- package/chunks/errors-QAWTJTAW.js +0 -79
- package/chunks/handleAutoUpdate-V5A3JHOG.js +0 -72
- package/chunks/initializer-JJLF5JCJ.js +0 -77
- package/chunks/installationInfo-LAWMHQAG.js +0 -71
- package/chunks/list-L2ECB6UM.js +0 -80
- package/chunks/loadedSettingsAdapter-RLMZ4Z3E.js +0 -74
- package/chunks/mcp-E4O7Z6FO.js +0 -74
- package/chunks/nonInteractiveCli-GU2UKULE.js +0 -131
- package/chunks/pidfile-IWQWZNZV.js +0 -77
- package/chunks/read-file-ZOCXW4AD.js +0 -31
- package/chunks/resumeHistoryUtils-TJWRDE2L.js +0 -83
- package/chunks/ripGrep-OFKAW2VE.js +0 -64
- package/chunks/serve-UB4CF67Q.js +0 -80
- package/chunks/shell-RPK7EAOC.js +0 -74
- package/chunks/spawnChannel-IUP3ZNMT.js +0 -73
- package/chunks/theme-manager-ALL7F4CJ.js +0 -68
- package/chunks/total-session-admission-PLONPNXI.js +0 -74
- package/chunks/updateCheck-PVROE4GR.js +0 -87
- package/chunks/useAutoAcceptIndicator-6BNLNN5S.js +0 -85
- package/chunks/workspace-providers-status-2U3IF4TX.js +0 -77
- package/chunks/workspace-registry-DLQDDDIF.js +0 -78
- package/chunks/workspace-service-7K3LF4QX.js +0 -89
- package/chunks/workspace-skills-status-4DOZ3DBS.js +0 -76
- package/chunks/write-file-PTPXDKZ3.js +0 -64
- package/web-shell/assets/channel-DiLlxxIf.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CkylTdM4.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CkylTdM4.js +0 -1
- package/web-shell/assets/index-CGtQqOIa.css +0 -5
- package/web-shell/assets/index-TtM0hVjU.js +0 -1207
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-D1gzH2Ue.js +0 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
recomputeMcpGating
|
|
5
|
-
} from "./chunk-6S5HSCOI.js";
|
|
6
3
|
import {
|
|
7
4
|
classifyApiError
|
|
8
5
|
} from "./chunk-V7RNNPGC.js";
|
|
@@ -15,36 +12,49 @@ import {
|
|
|
15
12
|
matchMcpServerByRef,
|
|
16
13
|
parseExtensionRef,
|
|
17
14
|
parseMcpServerRef
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
getCommandSubcommandNames
|
|
21
|
-
} from "./chunk-ZUTM4LHM.js";
|
|
15
|
+
} from "./chunk-VULLI6WQ.js";
|
|
22
16
|
import {
|
|
23
17
|
getAvailableCommands,
|
|
24
18
|
handleSlashCommand,
|
|
25
19
|
insertAfterFunctionResponses,
|
|
26
20
|
isSlashCommand,
|
|
27
21
|
normalizePartList
|
|
28
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LB6DUZ26.js";
|
|
23
|
+
import {
|
|
24
|
+
collectContextData,
|
|
25
|
+
formatContextUsageText
|
|
26
|
+
} from "./chunk-R5AFZNQW.js";
|
|
27
|
+
import {
|
|
28
|
+
recomputeMcpGating
|
|
29
|
+
} from "./chunk-OFDOK3VM.js";
|
|
29
30
|
import {
|
|
30
31
|
appEvents,
|
|
31
32
|
buildDisabledSkillNamesProvider,
|
|
32
33
|
loadCliConfig,
|
|
33
34
|
normalizeDisabledToolList
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TPRQ7RZH.js";
|
|
35
36
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-5DTTYNB7.js";
|
|
39
|
-
import "./chunk-4LVZNIDO.js";
|
|
37
|
+
getCommandSubcommandNames
|
|
38
|
+
} from "./chunk-RZIX2G32.js";
|
|
40
39
|
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
getEffectiveSupportedModes
|
|
41
|
+
} from "./chunk-U7M2DMGW.js";
|
|
42
|
+
import "./chunk-J56UI34H.js";
|
|
44
43
|
import "./chunk-4WGODMVR.js";
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-PQNHRFJC.js";
|
|
45
|
+
import "./chunk-M4FMGVY4.js";
|
|
46
|
+
import "./chunk-L5UHQJTJ.js";
|
|
47
|
+
import "./chunk-GSN55ZRI.js";
|
|
48
|
+
import "./chunk-6H67XLET.js";
|
|
49
|
+
import {
|
|
50
|
+
beginAcpBootstrapConfigProfiling,
|
|
51
|
+
buildAndFreezeAcpStartupProfile,
|
|
52
|
+
endAcpBootstrapConfigProfiling,
|
|
53
|
+
markAcpStartup
|
|
54
|
+
} from "./chunk-HIJQF5B5.js";
|
|
55
|
+
import "./chunk-7MVVZO4N.js";
|
|
56
|
+
import "./chunk-IKYJHJNF.js";
|
|
46
57
|
import "./chunk-YAF2MQZ6.js";
|
|
47
|
-
import "./chunk-7Z6JQEL6.js";
|
|
48
58
|
import {
|
|
49
59
|
GENERATION_MAX_PROMPT_BYTES,
|
|
50
60
|
GENERATION_TIMEOUT_MS,
|
|
@@ -57,13 +67,14 @@ import {
|
|
|
57
67
|
executeGeneration,
|
|
58
68
|
formatWorkspaceMemoryForgetSummary,
|
|
59
69
|
isValidServerName,
|
|
70
|
+
normalizeChannelDeliveryText,
|
|
60
71
|
redactMcpServerSecrets,
|
|
61
72
|
replayTranscriptRecordPage,
|
|
62
73
|
restoreRedactedMcpSecrets,
|
|
63
74
|
shouldSuppressRememberErrorDetails,
|
|
64
75
|
workspaceMemoryFailureCode,
|
|
65
76
|
workspaceMemoryFailureDiagnostics
|
|
66
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-RIBKPMRP.js";
|
|
67
78
|
import {
|
|
68
79
|
HistoryReplayer,
|
|
69
80
|
MessageEmitter,
|
|
@@ -73,93 +84,83 @@ import {
|
|
|
73
84
|
goalTerminalEventToHistoryItem,
|
|
74
85
|
recordGoalStatusItem,
|
|
75
86
|
restoreGoalFromHistory
|
|
76
|
-
} from "./chunk-
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-
|
|
87
|
+
} from "./chunk-EBJQ6AXW.js";
|
|
88
|
+
import "./chunk-RHLZR4E5.js";
|
|
89
|
+
import "./chunk-IPUUTYMV.js";
|
|
90
|
+
import "./chunk-WCXCRJYB.js";
|
|
91
|
+
import "./chunk-2MIN6GRR.js";
|
|
81
92
|
import "./chunk-QHTIBUWB.js";
|
|
82
93
|
import {
|
|
83
94
|
isTerminalGoalStatusKind
|
|
84
95
|
} from "./chunk-QTERJVPZ.js";
|
|
85
96
|
import "./chunk-3Z43GZUQ.js";
|
|
86
|
-
import {
|
|
87
|
-
computeCpuPercent
|
|
88
|
-
} from "./chunk-HGT6JR3U.js";
|
|
89
|
-
import "./chunk-RXFQM6FQ.js";
|
|
90
|
-
import "./chunk-CXIOPXRR.js";
|
|
91
|
-
import "./chunk-6H67XLET.js";
|
|
92
|
-
import {
|
|
93
|
-
beginAcpBootstrapConfigProfiling,
|
|
94
|
-
buildAndFreezeAcpStartupProfile,
|
|
95
|
-
endAcpBootstrapConfigProfiling,
|
|
96
|
-
markAcpStartup
|
|
97
|
-
} from "./chunk-TDKQP3M6.js";
|
|
98
|
-
import "./chunk-4MWNZNJ4.js";
|
|
99
|
-
import "./chunk-7SSWNGEJ.js";
|
|
100
|
-
import "./chunk-LXXMOYPL.js";
|
|
101
|
-
import "./chunk-CJQ3FZ2G.js";
|
|
102
|
-
import "./chunk-E5Z2AVNV.js";
|
|
103
|
-
import {
|
|
104
|
-
ACP_ROUTE_ID_PREFIX,
|
|
105
|
-
buildAcpModelOptions,
|
|
106
|
-
getCurrentAcpModelId,
|
|
107
|
-
parseAcpBaseModelId,
|
|
108
|
-
parseAcpModelOption,
|
|
109
|
-
resolveAcpModelOption,
|
|
110
|
-
sanitizeProviderBaseUrl
|
|
111
|
-
} from "./chunk-42W5BDEY.js";
|
|
112
|
-
import {
|
|
113
|
-
mapSkillConfigToStatus
|
|
114
|
-
} from "./chunk-2W3OOD4W.js";
|
|
115
97
|
import {
|
|
116
98
|
PERMISSION_RULE_TYPES,
|
|
117
99
|
PermissionRulesValidationError,
|
|
118
100
|
buildPermissionSettings,
|
|
119
101
|
normalizePermissionRules,
|
|
120
102
|
readPermissionRuleSet
|
|
121
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-VRYUBFMC.js";
|
|
122
104
|
import {
|
|
123
105
|
MAX_AUDIO_BYTES,
|
|
124
106
|
sanitizeVoiceErrorMessage,
|
|
125
107
|
transcribeVoiceAudio
|
|
126
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-H4SBPHSA.js";
|
|
127
109
|
import {
|
|
128
110
|
readVoiceModel
|
|
129
|
-
} from "./chunk-
|
|
130
|
-
import "./chunk-
|
|
131
|
-
import
|
|
132
|
-
|
|
111
|
+
} from "./chunk-YBL3QUDD.js";
|
|
112
|
+
import "./chunk-ZD6UTE4A.js";
|
|
113
|
+
import {
|
|
114
|
+
computeCpuPercent
|
|
115
|
+
} from "./chunk-HGT6JR3U.js";
|
|
116
|
+
import "./chunk-RXFQM6FQ.js";
|
|
117
|
+
import "./chunk-PSOO6YXD.js";
|
|
118
|
+
import "./chunk-PC6JANNU.js";
|
|
133
119
|
import "./chunk-57OAHC2Y.js";
|
|
134
|
-
import "./chunk-GPMVHZP4.js";
|
|
135
|
-
import "./chunk-6ZBPS62S.js";
|
|
136
|
-
import "./chunk-V6WHFGST.js";
|
|
137
120
|
import {
|
|
138
121
|
createLoadedSettingsAdapter
|
|
139
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-IO3IX5Q4.js";
|
|
123
|
+
import "./chunk-LXXMOYPL.js";
|
|
124
|
+
import "./chunk-MVSUYZDT.js";
|
|
125
|
+
import "./chunk-E5Z2AVNV.js";
|
|
140
126
|
import {
|
|
141
127
|
parseSessionSource
|
|
142
|
-
} from "./chunk-
|
|
143
|
-
import "./chunk-
|
|
128
|
+
} from "./chunk-KIM5GUMA.js";
|
|
129
|
+
import "./chunk-GLWP3FDB.js";
|
|
130
|
+
import {
|
|
131
|
+
NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
|
|
132
|
+
isNotCurrentlyGeneratingCancelError
|
|
133
|
+
} from "./chunk-UH3WSE5L.js";
|
|
144
134
|
import "./chunk-COH43MRJ.js";
|
|
145
135
|
import {
|
|
146
136
|
CHANNEL_STARTUP_PROFILE_META_KEY,
|
|
147
137
|
CHANNEL_STARTUP_PROFILE_VERSION,
|
|
148
138
|
CLIENT_MCP_OVER_WS_CONFIG_FLAG,
|
|
139
|
+
DAEMON_CHANNEL_DELIVERY_META_KEY,
|
|
149
140
|
LOAD_REPLAY_BULK_MODE,
|
|
150
141
|
LOAD_REPLAY_META_KEY,
|
|
151
142
|
LOAD_REPLAY_MODE_META_KEY,
|
|
152
143
|
LOAD_REPLAY_PAGE_SIZE_META_KEY,
|
|
153
144
|
LOAD_REPLAY_VERSION,
|
|
154
145
|
MID_TURN_QUEUE_DRAIN_METHOD,
|
|
146
|
+
PROMPT_CANCEL_METHOD,
|
|
155
147
|
TODO_STOP_GUARD_QUEUE_RELEASE_METHOD
|
|
156
|
-
} from "./chunk-
|
|
157
|
-
import {
|
|
158
|
-
NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE
|
|
159
|
-
} from "./chunk-UH3WSE5L.js";
|
|
148
|
+
} from "./chunk-3SJ43L4W.js";
|
|
160
149
|
import {
|
|
161
150
|
ndJsonStream
|
|
162
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-7JURR4JT.js";
|
|
152
|
+
import {
|
|
153
|
+
ACP_ROUTE_ID_PREFIX,
|
|
154
|
+
buildAcpModelOptions,
|
|
155
|
+
getCurrentAcpModelId,
|
|
156
|
+
parseAcpBaseModelId,
|
|
157
|
+
parseAcpModelOption,
|
|
158
|
+
resolveAcpModelOption,
|
|
159
|
+
sanitizeProviderBaseUrl
|
|
160
|
+
} from "./chunk-KMQ33DO4.js";
|
|
161
|
+
import {
|
|
162
|
+
mapSkillConfigToStatus
|
|
163
|
+
} from "./chunk-2W3OOD4W.js";
|
|
163
164
|
import {
|
|
164
165
|
ACP_PREFLIGHT_KINDS,
|
|
165
166
|
IDLE_HOOK_EVENTS,
|
|
@@ -167,22 +168,28 @@ import {
|
|
|
167
168
|
SERVE_STATUS_EXT_METHODS,
|
|
168
169
|
STATUS_SCHEMA_VERSION,
|
|
169
170
|
mapDomainErrorToErrorKind
|
|
170
|
-
} from "./chunk-
|
|
171
|
-
import "./chunk-
|
|
172
|
-
import "./chunk-
|
|
171
|
+
} from "./chunk-VIA5XA4U.js";
|
|
172
|
+
import "./chunk-X5XDDSSH.js";
|
|
173
|
+
import "./chunk-4WIZGAH3.js";
|
|
174
|
+
import "./chunk-7ZCNENPP.js";
|
|
175
|
+
import "./chunk-V6WHFGST.js";
|
|
176
|
+
import {
|
|
177
|
+
assembleMcpServers,
|
|
178
|
+
loadMcpApprovals
|
|
179
|
+
} from "./chunk-JVPM2ULZ.js";
|
|
180
|
+
import "./chunk-ZNAUOR2I.js";
|
|
181
|
+
import "./chunk-2RFKHEXL.js";
|
|
182
|
+
import "./chunk-LK7CHLVP.js";
|
|
183
|
+
import "./chunk-JLU636DO.js";
|
|
184
|
+
import "./chunk-BK2UNYWD.js";
|
|
173
185
|
import "./chunk-M5GB774H.js";
|
|
174
|
-
import "./chunk-
|
|
175
|
-
import "./chunk-2LI23QA6.js";
|
|
176
|
-
import "./chunk-RVLZCXEE.js";
|
|
186
|
+
import "./chunk-RWTEFFPU.js";
|
|
177
187
|
import {
|
|
178
188
|
AgentSideConnection,
|
|
179
189
|
PROTOCOL_VERSION,
|
|
180
190
|
RequestError
|
|
181
191
|
} from "./chunk-UDXSXLER.js";
|
|
182
|
-
import
|
|
183
|
-
assembleMcpServers,
|
|
184
|
-
loadMcpApprovals
|
|
185
|
-
} from "./chunk-7PIL2BYF.js";
|
|
192
|
+
import "./chunk-BIQWWWJN.js";
|
|
186
193
|
import {
|
|
187
194
|
getOutputLanguageFilePath,
|
|
188
195
|
getPersistScopeForModelSelection,
|
|
@@ -191,40 +198,38 @@ import {
|
|
|
191
198
|
resolveOutputLanguageOrPreserveAuto,
|
|
192
199
|
updateOutputLanguageFile,
|
|
193
200
|
writeOutputLanguageAndRegisterPath
|
|
194
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-TEHGS6UP.js";
|
|
195
202
|
import "./chunk-RKUWKYED.js";
|
|
203
|
+
import "./chunk-GOXKNSDZ.js";
|
|
204
|
+
import {
|
|
205
|
+
getSystemDefaultsPath,
|
|
206
|
+
getSystemSettingsPath
|
|
207
|
+
} from "./chunk-IDS7MSUP.js";
|
|
196
208
|
import {
|
|
197
209
|
SUPPORTED_LANGUAGES,
|
|
198
210
|
getCurrentLanguage,
|
|
199
211
|
setLanguageAsync
|
|
200
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-LKEJ26GS.js";
|
|
201
213
|
import {
|
|
202
214
|
findEnvFiles,
|
|
203
215
|
preResolveHomeEnvOverrides,
|
|
204
216
|
reloadEnvironment
|
|
205
|
-
} from "./chunk-
|
|
206
|
-
import "./chunk-
|
|
207
|
-
import "./chunk-
|
|
208
|
-
import "./chunk-QRUIS3DN.js";
|
|
209
|
-
import "./chunk-2RFKHEXL.js";
|
|
210
|
-
import {
|
|
211
|
-
getSystemDefaultsPath,
|
|
212
|
-
getSystemSettingsPath
|
|
213
|
-
} from "./chunk-IDS7MSUP.js";
|
|
214
|
-
import "./chunk-XFSFZCM5.js";
|
|
215
|
-
import "./chunk-3F2JUWCH.js";
|
|
217
|
+
} from "./chunk-LH2BYDQ5.js";
|
|
218
|
+
import "./chunk-6PEXNQTX.js";
|
|
219
|
+
import "./chunk-YX324OPW.js";
|
|
216
220
|
import "./chunk-VJNBRRZG.js";
|
|
217
221
|
import {
|
|
218
222
|
isFolderTrustEnabled,
|
|
219
223
|
isWorkspaceTrusted,
|
|
220
224
|
loadTrustedFolders
|
|
221
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-Z2BC6UJ5.js";
|
|
222
226
|
import "./chunk-ALGGS7UH.js";
|
|
223
227
|
import "./chunk-MR3PXB6E.js";
|
|
224
228
|
import {
|
|
225
229
|
writeStderrLine,
|
|
226
230
|
writeStderrLineSafe
|
|
227
231
|
} from "./chunk-OWAK7LMW.js";
|
|
232
|
+
import "./chunk-XFSFZCM5.js";
|
|
228
233
|
import {
|
|
229
234
|
ALL_PROVIDERS,
|
|
230
235
|
APPROVAL_MODE_INFO,
|
|
@@ -347,61 +352,77 @@ import {
|
|
|
347
352
|
updateSetting,
|
|
348
353
|
validatePlanModeShellApproval,
|
|
349
354
|
validatePlanModeShellContext
|
|
350
|
-
} from "./chunk-
|
|
351
|
-
import "./chunk-
|
|
355
|
+
} from "./chunk-PHOF65IG.js";
|
|
356
|
+
import "./chunk-5M6IDOMF.js";
|
|
357
|
+
import "./chunk-TWPJO254.js";
|
|
352
358
|
import {
|
|
353
359
|
external_exports
|
|
354
360
|
} from "./chunk-H6XPXXMH.js";
|
|
355
|
-
import "./chunk-
|
|
356
|
-
import "./chunk-
|
|
357
|
-
import "./chunk-
|
|
358
|
-
import "./chunk-X6N25LXS.js";
|
|
359
|
-
import "./chunk-E2UVIFI2.js";
|
|
360
|
-
import "./chunk-Q2YKNMLS.js";
|
|
361
|
-
import "./chunk-XU457J4V.js";
|
|
361
|
+
import "./chunk-K4XWPEWB.js";
|
|
362
|
+
import "./chunk-TOFQCPDC.js";
|
|
363
|
+
import "./chunk-IRH27ZC2.js";
|
|
362
364
|
import "./chunk-VDDGDZMA.js";
|
|
363
|
-
import "./chunk-
|
|
364
|
-
import "./chunk-
|
|
365
|
+
import "./chunk-FNQ6T3CV.js";
|
|
366
|
+
import "./chunk-ZOIFNCKL.js";
|
|
367
|
+
import "./chunk-PWTZEM3C.js";
|
|
368
|
+
import "./chunk-KRXPRVGL.js";
|
|
365
369
|
import {
|
|
366
370
|
parsePositiveIntegerEnv
|
|
367
371
|
} from "./chunk-6PVPNMXU.js";
|
|
368
|
-
import "./chunk-
|
|
372
|
+
import "./chunk-MZAXJAUM.js";
|
|
373
|
+
import "./chunk-SZRN75WQ.js";
|
|
374
|
+
import "./chunk-HTO4JFDZ.js";
|
|
369
375
|
import "./chunk-CPBF7KYF.js";
|
|
370
|
-
import {
|
|
371
|
-
HookEventName,
|
|
372
|
-
createHookOutput
|
|
373
|
-
} from "./chunk-7VUQQBR7.js";
|
|
374
|
-
import "./chunk-LIZRAKPB.js";
|
|
375
376
|
import {
|
|
376
377
|
APPROVAL_MODES,
|
|
377
378
|
FORK_SUBAGENT_TYPE,
|
|
378
379
|
getStartupContextLength,
|
|
379
380
|
isSystemReminderContent,
|
|
380
381
|
runWithRuntimeContentGenerator
|
|
381
|
-
} from "./chunk-
|
|
382
|
+
} from "./chunk-L26JL52R.js";
|
|
382
383
|
import "./chunk-6AM5D4ME.js";
|
|
384
|
+
import "./chunk-JZA3JUDJ.js";
|
|
385
|
+
import {
|
|
386
|
+
HookEventName,
|
|
387
|
+
createHookOutput
|
|
388
|
+
} from "./chunk-3QMGYBFN.js";
|
|
383
389
|
import "./chunk-JCW2R7WC.js";
|
|
384
|
-
import "./chunk-
|
|
385
|
-
import "./chunk-
|
|
390
|
+
import "./chunk-M5JM7OSF.js";
|
|
391
|
+
import "./chunk-OHNBB4XR.js";
|
|
392
|
+
import "./chunk-E5TUC6CA.js";
|
|
386
393
|
import {
|
|
387
394
|
clearCachedCredentialFile,
|
|
388
395
|
qwenOAuth2Events
|
|
389
|
-
} from "./chunk-
|
|
396
|
+
} from "./chunk-EPDRMGT4.js";
|
|
390
397
|
import "./chunk-JESCGQM3.js";
|
|
391
|
-
import "./chunk-
|
|
392
|
-
import "./chunk-
|
|
398
|
+
import "./chunk-NH6KE4JX.js";
|
|
399
|
+
import "./chunk-USTWD7QV.js";
|
|
393
400
|
import "./chunk-XVNQMZ2I.js";
|
|
394
401
|
import "./chunk-FODK6UMO.js";
|
|
395
402
|
import "./chunk-GLNBDYUX.js";
|
|
396
403
|
import "./chunk-DJ2GSRLV.js";
|
|
404
|
+
import "./chunk-ZJHVAS7M.js";
|
|
405
|
+
import {
|
|
406
|
+
extractDaemonTraceContext,
|
|
407
|
+
registerAcpEventLoopLagGauge,
|
|
408
|
+
startEventLoopLagMonitor,
|
|
409
|
+
withDaemonSpan
|
|
410
|
+
} from "./chunk-NIBLUX3Y.js";
|
|
411
|
+
import "./chunk-BPJSQIJX.js";
|
|
412
|
+
import "./chunk-P3QQPMQA.js";
|
|
413
|
+
import "./chunk-6FGBXPWM.js";
|
|
414
|
+
import {
|
|
415
|
+
getToolCallPreparations
|
|
416
|
+
} from "./chunk-LS77BEZP.js";
|
|
397
417
|
import {
|
|
398
|
-
AuthType,
|
|
399
418
|
ConversationFinishedEvent,
|
|
400
419
|
DiscoveredMCPTool,
|
|
420
|
+
INVOCATION_CONTEXT_META_KEY,
|
|
401
421
|
LoopDetectedEvent,
|
|
422
|
+
PRIVATE_ACP_CAPABILITY_ENV,
|
|
423
|
+
PRIVATE_PARENT_CAPABILITY_META_KEY,
|
|
402
424
|
PromptSuggestionEvent,
|
|
403
425
|
UserPromptEvent,
|
|
404
|
-
extractDaemonTraceContext,
|
|
405
426
|
formatFullTurnVisionNotice,
|
|
406
427
|
formatVisionBridgeNotice,
|
|
407
428
|
getAllGeminiMdFilenames,
|
|
@@ -415,64 +436,66 @@ import {
|
|
|
415
436
|
logToolCall,
|
|
416
437
|
logUserPrompt,
|
|
417
438
|
normalizeParts,
|
|
418
|
-
|
|
439
|
+
parseInvocationContext,
|
|
419
440
|
runSideQuery,
|
|
420
441
|
runVisionBridge,
|
|
442
|
+
runWithInvocationContext,
|
|
421
443
|
shouldRunVisionBridge,
|
|
422
444
|
splitImageParts,
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
withDaemonSpan
|
|
426
|
-
} from "./chunk-H4A4A2SY.js";
|
|
445
|
+
uiTelemetryService
|
|
446
|
+
} from "./chunk-CIKQ7KKO.js";
|
|
427
447
|
import "./chunk-VGC4I5JJ.js";
|
|
428
448
|
import {
|
|
429
449
|
getAutoMemoryRoot,
|
|
430
450
|
getUserAutoMemoryRoot
|
|
431
|
-
} from "./chunk-
|
|
451
|
+
} from "./chunk-MUP3T3AD.js";
|
|
432
452
|
import {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
} from "./chunk-CBOQ3HY7.js";
|
|
453
|
+
AuthType
|
|
454
|
+
} from "./chunk-IKCX4CCL.js";
|
|
455
|
+
import "./chunk-46UV252V.js";
|
|
437
456
|
import "./chunk-A4UCTEB5.js";
|
|
438
457
|
import "./chunk-XWRJCPHC.js";
|
|
439
|
-
import
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
import "./chunk-
|
|
458
|
+
import {
|
|
459
|
+
DEFAULT_TOKEN_LIMIT,
|
|
460
|
+
tokenLimit
|
|
461
|
+
} from "./chunk-UW5EOVUN.js";
|
|
462
|
+
import "./chunk-2JZBVYTU.js";
|
|
463
|
+
import "./chunk-5I2IWRSH.js";
|
|
464
|
+
import "./chunk-A5L3JMUA.js";
|
|
444
465
|
import {
|
|
445
466
|
endToolExecutionSpan,
|
|
446
467
|
endToolSpan,
|
|
468
|
+
initializeTelemetry,
|
|
447
469
|
runInToolSpanContext,
|
|
448
470
|
startToolExecutionSpan,
|
|
449
471
|
startToolSpan,
|
|
450
472
|
withInteractionSpan
|
|
451
|
-
} from "./chunk-
|
|
473
|
+
} from "./chunk-MB4MZHMJ.js";
|
|
452
474
|
import "./chunk-HTR4WV6U.js";
|
|
453
|
-
import "./chunk-
|
|
475
|
+
import "./chunk-BULDBTYC.js";
|
|
454
476
|
import "./chunk-U7ZFW55U.js";
|
|
455
|
-
import "./chunk-
|
|
477
|
+
import "./chunk-UUUTRMI2.js";
|
|
456
478
|
import {
|
|
457
479
|
ToolConfirmationOutcome,
|
|
458
480
|
ToolNames,
|
|
459
481
|
isShellProgressData
|
|
460
|
-
} from "./chunk-
|
|
482
|
+
} from "./chunk-PR75REBZ.js";
|
|
461
483
|
import {
|
|
462
484
|
Storage,
|
|
463
485
|
createDebugLogger,
|
|
464
486
|
getErrorMessage,
|
|
465
487
|
getErrorStatus,
|
|
466
488
|
isSubpath
|
|
467
|
-
} from "./chunk-
|
|
468
|
-
import "./chunk-
|
|
489
|
+
} from "./chunk-NL7LTRLR.js";
|
|
490
|
+
import "./chunk-QAF7NMK7.js";
|
|
469
491
|
import {
|
|
470
492
|
runExitCleanup
|
|
471
|
-
} from "./chunk-
|
|
493
|
+
} from "./chunk-PWVFN2LF.js";
|
|
472
494
|
import "./chunk-75DOP5OR.js";
|
|
473
495
|
import "./chunk-DMTGGOSA.js";
|
|
474
496
|
import "./chunk-YQ3U5MUC.js";
|
|
475
|
-
import "./chunk-
|
|
497
|
+
import "./chunk-AMDSOFFV.js";
|
|
498
|
+
import "./chunk-TARRHLLG.js";
|
|
476
499
|
import {
|
|
477
500
|
init_esbuild_shims
|
|
478
501
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -482,7 +505,7 @@ import {
|
|
|
482
505
|
|
|
483
506
|
// packages/cli/src/acp-integration/acpAgent.ts
|
|
484
507
|
init_esbuild_shims();
|
|
485
|
-
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
508
|
+
import { randomUUID as randomUUID2, timingSafeEqual } from "node:crypto";
|
|
486
509
|
import { performance } from "node:perf_hooks";
|
|
487
510
|
|
|
488
511
|
// packages/cli/src/acp-integration/authMethods.ts
|
|
@@ -2207,6 +2230,43 @@ var MidTurnDrainTimeoutError = class extends Error {
|
|
|
2207
2230
|
);
|
|
2208
2231
|
}
|
|
2209
2232
|
};
|
|
2233
|
+
function beginChannelDeliveryResponseBlock(capture) {
|
|
2234
|
+
if (!capture) return void 0;
|
|
2235
|
+
capture.finalText = "";
|
|
2236
|
+
return [];
|
|
2237
|
+
}
|
|
2238
|
+
__name(beginChannelDeliveryResponseBlock, "beginChannelDeliveryResponseBlock");
|
|
2239
|
+
function commitChannelDeliveryResponseBlock(capture, responseBlock, hasFunctionCalls) {
|
|
2240
|
+
if (capture && responseBlock && !hasFunctionCalls) {
|
|
2241
|
+
capture.finalText = responseBlock.join("");
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
__name(commitChannelDeliveryResponseBlock, "commitChannelDeliveryResponseBlock");
|
|
2245
|
+
function parsePromptChannelDelivery(params) {
|
|
2246
|
+
const meta = params._meta;
|
|
2247
|
+
const value = meta?.[DAEMON_CHANNEL_DELIVERY_META_KEY];
|
|
2248
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
2249
|
+
return void 0;
|
|
2250
|
+
}
|
|
2251
|
+
const delivery = value;
|
|
2252
|
+
const target = delivery["target"];
|
|
2253
|
+
if (typeof delivery["deliveryId"] !== "string" || delivery["deliveryId"].length === 0 || typeof target !== "object" || target === null || Array.isArray(target)) {
|
|
2254
|
+
return void 0;
|
|
2255
|
+
}
|
|
2256
|
+
const targetRecord = target;
|
|
2257
|
+
if (typeof targetRecord["channelName"] !== "string" || targetRecord["channelName"].length === 0 || targetRecord["type"] !== "user" && targetRecord["type"] !== "chat" || typeof targetRecord["id"] !== "string" || targetRecord["id"].length === 0) {
|
|
2258
|
+
return void 0;
|
|
2259
|
+
}
|
|
2260
|
+
return {
|
|
2261
|
+
deliveryId: delivery["deliveryId"],
|
|
2262
|
+
target: {
|
|
2263
|
+
channelName: targetRecord["channelName"],
|
|
2264
|
+
type: targetRecord["type"],
|
|
2265
|
+
id: targetRecord["id"]
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
}
|
|
2269
|
+
__name(parsePromptChannelDelivery, "parsePromptChannelDelivery");
|
|
2210
2270
|
var MAX_NOTIFICATION_QUEUE = 20;
|
|
2211
2271
|
var MAX_DEFERRED_UNRELATED_CRON_QUEUE = 20;
|
|
2212
2272
|
function isExistingFile(resolved, fileExists = existsSync2, statFile = statSync2) {
|
|
@@ -2542,6 +2602,8 @@ var Session = class {
|
|
|
2542
2602
|
* that produces this string.
|
|
2543
2603
|
*/
|
|
2544
2604
|
pendingWorktreeNotice = null;
|
|
2605
|
+
/** One-shot model notice for background agents restored with the session. */
|
|
2606
|
+
pendingRecoveredAgentsNotice = null;
|
|
2545
2607
|
// Implement SessionContext interface
|
|
2546
2608
|
sessionId;
|
|
2547
2609
|
#prepareTodoStopGuardForPrompt(params) {
|
|
@@ -2883,6 +2945,7 @@ var Session = class {
|
|
|
2883
2945
|
if (this.config.isCronEnabled()) {
|
|
2884
2946
|
this.#stopCronSchedulerInRuntime();
|
|
2885
2947
|
}
|
|
2948
|
+
this.config.getBackgroundTaskRegistry().abortAll({ notify: false });
|
|
2886
2949
|
this.config.getBackgroundTaskRegistry().setNotificationCallback(void 0);
|
|
2887
2950
|
this.config.getMonitorRegistry().setNotificationCallback(void 0);
|
|
2888
2951
|
this.config.getBackgroundShellRegistry().setNotificationCallback(void 0);
|
|
@@ -3102,15 +3165,31 @@ var Session = class {
|
|
|
3102
3165
|
}
|
|
3103
3166
|
}
|
|
3104
3167
|
}
|
|
3105
|
-
async prompt(params) {
|
|
3168
|
+
async prompt(params, invocationContext, admissionCancellation) {
|
|
3106
3169
|
if (this.closing) {
|
|
3107
3170
|
throw RequestError.invalidParams(void 0, "Session is closing");
|
|
3108
3171
|
}
|
|
3109
3172
|
await this.assertCanStartTurn();
|
|
3173
|
+
if (admissionCancellation?.aborted) {
|
|
3174
|
+
return { stopReason: "cancelled" };
|
|
3175
|
+
}
|
|
3110
3176
|
const todoStopGuardPreparation = this.#prepareTodoStopGuardForPrompt(params);
|
|
3111
3177
|
this.pendingPrompt?.abort();
|
|
3112
3178
|
const pendingSend = new AbortController();
|
|
3179
|
+
const cancelPendingSend = /* @__PURE__ */ __name(() => pendingSend.abort(USER_CANCEL_ABORT_REASON), "cancelPendingSend");
|
|
3180
|
+
if (admissionCancellation) {
|
|
3181
|
+
admissionCancellation.addEventListener("abort", cancelPendingSend, {
|
|
3182
|
+
once: true
|
|
3183
|
+
});
|
|
3184
|
+
if (admissionCancellation.aborted) cancelPendingSend();
|
|
3185
|
+
}
|
|
3113
3186
|
this.pendingPrompt = pendingSend;
|
|
3187
|
+
const releasePendingSend = /* @__PURE__ */ __name(() => {
|
|
3188
|
+
admissionCancellation?.removeEventListener("abort", cancelPendingSend);
|
|
3189
|
+
if (this.pendingPrompt === pendingSend) {
|
|
3190
|
+
this.pendingPrompt = null;
|
|
3191
|
+
}
|
|
3192
|
+
}, "releasePendingSend");
|
|
3114
3193
|
if (this.followupAbort) {
|
|
3115
3194
|
this.followupAbort.abort();
|
|
3116
3195
|
this.followupAbort = null;
|
|
@@ -3147,6 +3226,8 @@ var Session = class {
|
|
|
3147
3226
|
}
|
|
3148
3227
|
}
|
|
3149
3228
|
if (pendingSend.signal.aborted) {
|
|
3229
|
+
releasePendingSend();
|
|
3230
|
+
this.todoStopGuard.suspend();
|
|
3150
3231
|
return { stopReason: "cancelled" };
|
|
3151
3232
|
}
|
|
3152
3233
|
if (todoStopGuardPreparation.startsWorkChain) {
|
|
@@ -3155,16 +3236,35 @@ var Session = class {
|
|
|
3155
3236
|
this.todoStopGuardBackgroundBaseline = this.#captureTodoStopGuardBackgroundBaseline();
|
|
3156
3237
|
}
|
|
3157
3238
|
this.duplicateProviderToolCallResponseIds.clear();
|
|
3239
|
+
const channelDelivery = parsePromptChannelDelivery(params);
|
|
3240
|
+
const channelDeliveryCapture = channelDelivery ? { finalText: "" } : void 0;
|
|
3158
3241
|
let resolveCompletion;
|
|
3159
3242
|
this.pendingPromptCompletion = new Promise((resolve5) => {
|
|
3160
3243
|
resolveCompletion = resolve5;
|
|
3161
3244
|
});
|
|
3162
3245
|
try {
|
|
3163
|
-
const result = await this.#executePrompt(
|
|
3164
|
-
|
|
3246
|
+
const result = await this.#executePrompt(
|
|
3247
|
+
params,
|
|
3248
|
+
pendingSend,
|
|
3249
|
+
channelDeliveryCapture,
|
|
3250
|
+
invocationContext
|
|
3251
|
+
);
|
|
3252
|
+
releasePendingSend();
|
|
3165
3253
|
void this.#drainCronQueue();
|
|
3166
3254
|
void this.#drainNotificationQueue();
|
|
3167
3255
|
this.#maybeEmitFollowupSuggestion(result);
|
|
3256
|
+
if (channelDelivery && result.stopReason === "end_turn") {
|
|
3257
|
+
this.#scheduleChannelDelivery({
|
|
3258
|
+
sessionId: this.sessionId,
|
|
3259
|
+
deliveryId: channelDelivery.deliveryId,
|
|
3260
|
+
source: "prompt",
|
|
3261
|
+
target: channelDelivery.target,
|
|
3262
|
+
text: normalizeChannelDeliveryText(
|
|
3263
|
+
channelDeliveryCapture?.finalText ?? ""
|
|
3264
|
+
),
|
|
3265
|
+
promptId: channelDelivery.deliveryId
|
|
3266
|
+
});
|
|
3267
|
+
}
|
|
3168
3268
|
return result;
|
|
3169
3269
|
} catch (error) {
|
|
3170
3270
|
if (error instanceof SessionWriterError) {
|
|
@@ -3174,7 +3274,7 @@ var Session = class {
|
|
|
3174
3274
|
}
|
|
3175
3275
|
throw error;
|
|
3176
3276
|
} finally {
|
|
3177
|
-
|
|
3277
|
+
releasePendingSend();
|
|
3178
3278
|
const shouldDrainAutomaticQueues = todoStopGuardPreparation.drainSupersededAutomaticQueues || this.todoStopGuardDrainAutomaticQueuesWhenIdle || this.todoStopGuard.blocksUnrelatedAutomaticTurns || this.todoStopGuard.hasCommittedContinuation || this.todoStopGuardQueuedPromptPriority;
|
|
3179
3279
|
this.todoStopGuardDrainAutomaticQueuesWhenIdle = false;
|
|
3180
3280
|
if (shouldDrainAutomaticQueues) {
|
|
@@ -3304,13 +3404,23 @@ var Session = class {
|
|
|
3304
3404
|
}
|
|
3305
3405
|
})();
|
|
3306
3406
|
}
|
|
3307
|
-
async #executePrompt(params, pendingSend) {
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3407
|
+
async #executePrompt(params, pendingSend, channelDeliveryCapture, invocationContext) {
|
|
3408
|
+
const sessionId = this.config.getSessionId();
|
|
3409
|
+
if (invocationContext !== void 0 && invocationContext.sessionId !== sessionId) {
|
|
3410
|
+
throw RequestError.invalidParams(
|
|
3411
|
+
void 0,
|
|
3412
|
+
"Invocation context session does not match the active session"
|
|
3413
|
+
);
|
|
3414
|
+
}
|
|
3415
|
+
return runWithInvocationContext(
|
|
3416
|
+
invocationContext,
|
|
3417
|
+
() => sessionIdContext.run(
|
|
3418
|
+
sessionId,
|
|
3419
|
+
() => this.#executePromptInner(params, pendingSend, channelDeliveryCapture)
|
|
3420
|
+
)
|
|
3311
3421
|
);
|
|
3312
3422
|
}
|
|
3313
|
-
async #executePromptInner(params, pendingSend) {
|
|
3423
|
+
async #executePromptInner(params, pendingSend, channelDeliveryCapture) {
|
|
3314
3424
|
return Storage.runWithRuntimeBaseDir(
|
|
3315
3425
|
this.runtimeBaseDir,
|
|
3316
3426
|
this.config.getWorkingDir(),
|
|
@@ -3382,6 +3492,7 @@ var Session = class {
|
|
|
3382
3492
|
(block) => block.type === "text"
|
|
3383
3493
|
);
|
|
3384
3494
|
const inputText = firstTextBlock?.text || "";
|
|
3495
|
+
const isSlashInput = !isContinue && isSlashCommand(inputText);
|
|
3385
3496
|
let parts;
|
|
3386
3497
|
let fullTurnModelOverride;
|
|
3387
3498
|
const onFullTurnModel = /* @__PURE__ */ __name((model) => {
|
|
@@ -3393,7 +3504,7 @@ var Session = class {
|
|
|
3393
3504
|
}, "onFullTurnModel");
|
|
3394
3505
|
if (isContinue) {
|
|
3395
3506
|
parts = continuationParts;
|
|
3396
|
-
} else if (
|
|
3507
|
+
} else if (isSlashInput) {
|
|
3397
3508
|
const slashCommandResult = await handleSlashCommand(
|
|
3398
3509
|
inputText,
|
|
3399
3510
|
pendingSend,
|
|
@@ -3477,6 +3588,17 @@ ${this.pendingWorktreeNotice}
|
|
|
3477
3588
|
parts = insertAfterFunctionResponses(parts, [noticePart]);
|
|
3478
3589
|
this.pendingWorktreeNotice = null;
|
|
3479
3590
|
}
|
|
3591
|
+
if (this.pendingRecoveredAgentsNotice && !isContinue && !isSlashInput) {
|
|
3592
|
+
const noticePart = {
|
|
3593
|
+
text: `<system-reminder>
|
|
3594
|
+
${this.pendingRecoveredAgentsNotice}
|
|
3595
|
+
</system-reminder>
|
|
3596
|
+
|
|
3597
|
+
`
|
|
3598
|
+
};
|
|
3599
|
+
parts = insertAfterFunctionResponses(parts, [noticePart]);
|
|
3600
|
+
this.pendingRecoveredAgentsNotice = null;
|
|
3601
|
+
}
|
|
3480
3602
|
let nextMessage = { role: "user", parts };
|
|
3481
3603
|
let turnCount = 0;
|
|
3482
3604
|
const toolLoopState = createDaemonToolLoopState();
|
|
@@ -3497,6 +3619,7 @@ ${this.pendingWorktreeNotice}
|
|
|
3497
3619
|
const messageDisplay = this.#createMessageDisplayDispatcher(
|
|
3498
3620
|
pendingSend.signal
|
|
3499
3621
|
);
|
|
3622
|
+
let channelDeliveryResponseBlock;
|
|
3500
3623
|
try {
|
|
3501
3624
|
const sendResult = await this.#sendMessageStreamWithAutoCompression(
|
|
3502
3625
|
promptId,
|
|
@@ -3514,6 +3637,8 @@ ${this.pendingWorktreeNotice}
|
|
|
3514
3637
|
}
|
|
3515
3638
|
const responseStream = sendResult.responseStream;
|
|
3516
3639
|
nextMessage = null;
|
|
3640
|
+
channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(channelDeliveryCapture);
|
|
3641
|
+
const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
|
|
3517
3642
|
let streamFailed = false;
|
|
3518
3643
|
try {
|
|
3519
3644
|
for await (const resp of responseStream) {
|
|
@@ -3533,6 +3658,7 @@ ${this.pendingWorktreeNotice}
|
|
|
3533
3658
|
part.thought
|
|
3534
3659
|
);
|
|
3535
3660
|
if (!part.thought) {
|
|
3661
|
+
channelDeliveryResponseBlock?.push(part.text);
|
|
3536
3662
|
messageDisplay?.addChunk(part.text);
|
|
3537
3663
|
}
|
|
3538
3664
|
}
|
|
@@ -3548,6 +3674,11 @@ ${this.pendingWorktreeNotice}
|
|
|
3548
3674
|
}
|
|
3549
3675
|
}
|
|
3550
3676
|
if (resp.type === "retry" /* RETRY */ || resp.type === "model_fallback" /* MODEL_FALLBACK */) {
|
|
3677
|
+
if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
|
|
3678
|
+
if (channelDeliveryResponseBlock) {
|
|
3679
|
+
channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
|
|
3680
|
+
}
|
|
3681
|
+
}
|
|
3551
3682
|
await finalizeToolCallPreparations(
|
|
3552
3683
|
preparationTracker,
|
|
3553
3684
|
true,
|
|
@@ -3601,6 +3732,11 @@ ${this.pendingWorktreeNotice}
|
|
|
3601
3732
|
} finally {
|
|
3602
3733
|
await messageDisplay?.finish();
|
|
3603
3734
|
}
|
|
3735
|
+
commitChannelDeliveryResponseBlock(
|
|
3736
|
+
channelDeliveryCapture,
|
|
3737
|
+
channelDeliveryResponseBlock,
|
|
3738
|
+
functionCalls.length > 0
|
|
3739
|
+
);
|
|
3604
3740
|
if (usageMetadata) {
|
|
3605
3741
|
this.#recordPromptTokenCount(usageMetadata);
|
|
3606
3742
|
if (this.messageRewriter) {
|
|
@@ -3664,7 +3800,8 @@ ${this.pendingWorktreeNotice}
|
|
|
3664
3800
|
hooksEnabled,
|
|
3665
3801
|
messageBus,
|
|
3666
3802
|
true,
|
|
3667
|
-
fullTurnModelOverride
|
|
3803
|
+
fullTurnModelOverride,
|
|
3804
|
+
channelDeliveryCapture
|
|
3668
3805
|
);
|
|
3669
3806
|
} finally {
|
|
3670
3807
|
logConversationFinishedEvent(
|
|
@@ -3681,7 +3818,7 @@ ${this.pendingWorktreeNotice}
|
|
|
3681
3818
|
}
|
|
3682
3819
|
);
|
|
3683
3820
|
}
|
|
3684
|
-
async #handleStopHookLoop(pendingSend, promptId, hooksEnabled, messageBus, allowExternalHooks = true, modelOverride) {
|
|
3821
|
+
async #handleStopHookLoop(pendingSend, promptId, hooksEnabled, messageBus, allowExternalHooks = true, modelOverride, channelDeliveryCapture) {
|
|
3685
3822
|
const stopHookBlockingCap = this.config.getStopHookBlockingCap();
|
|
3686
3823
|
let stopHookIterationCount = 0;
|
|
3687
3824
|
let stopHookReasons = [];
|
|
@@ -3723,7 +3860,8 @@ ${this.pendingWorktreeNotice}
|
|
|
3723
3860
|
false,
|
|
3724
3861
|
{
|
|
3725
3862
|
onFullTurnModel,
|
|
3726
|
-
getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride")
|
|
3863
|
+
getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride"),
|
|
3864
|
+
channelDeliveryCapture
|
|
3727
3865
|
}
|
|
3728
3866
|
);
|
|
3729
3867
|
if (continuation2.kind === "terminal") {
|
|
@@ -3785,7 +3923,8 @@ ${this.pendingWorktreeNotice}
|
|
|
3785
3923
|
false,
|
|
3786
3924
|
{
|
|
3787
3925
|
onFullTurnModel,
|
|
3788
|
-
getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride")
|
|
3926
|
+
getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride"),
|
|
3927
|
+
channelDeliveryCapture
|
|
3789
3928
|
}
|
|
3790
3929
|
);
|
|
3791
3930
|
if (continuation2.kind === "terminal") {
|
|
@@ -3866,7 +4005,8 @@ ${this.pendingWorktreeNotice}
|
|
|
3866
4005
|
), "onAutomaticContinuationValidated")
|
|
3867
4006
|
} : {},
|
|
3868
4007
|
onFullTurnModel,
|
|
3869
|
-
getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride")
|
|
4008
|
+
getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride"),
|
|
4009
|
+
channelDeliveryCapture
|
|
3870
4010
|
}
|
|
3871
4011
|
);
|
|
3872
4012
|
if (continuation.supersededAutomaticContinuation && externalReason) {
|
|
@@ -3909,6 +4049,7 @@ ${this.pendingWorktreeNotice}
|
|
|
3909
4049
|
const messageDisplay = this.#createMessageDisplayDispatcher(
|
|
3910
4050
|
pendingSend.signal
|
|
3911
4051
|
);
|
|
4052
|
+
let channelDeliveryResponseBlock;
|
|
3912
4053
|
try {
|
|
3913
4054
|
const sendResult = await this.#sendMessageStreamWithAutoCompression(
|
|
3914
4055
|
promptIdForSend,
|
|
@@ -4040,6 +4181,10 @@ ${this.pendingWorktreeNotice}
|
|
|
4040
4181
|
}
|
|
4041
4182
|
const responseStream = sendResult.responseStream;
|
|
4042
4183
|
nextMessage = null;
|
|
4184
|
+
channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(
|
|
4185
|
+
options.channelDeliveryCapture
|
|
4186
|
+
);
|
|
4187
|
+
const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
|
|
4043
4188
|
initialSend = false;
|
|
4044
4189
|
if (guardForThisSend) {
|
|
4045
4190
|
const guardCommitted = this.todoStopGuard.commitContinuation(
|
|
@@ -4070,7 +4215,10 @@ ${this.pendingWorktreeNotice}
|
|
|
4070
4215
|
"assistant",
|
|
4071
4216
|
part.thought
|
|
4072
4217
|
);
|
|
4073
|
-
if (!part.thought)
|
|
4218
|
+
if (!part.thought) {
|
|
4219
|
+
channelDeliveryResponseBlock?.push(part.text);
|
|
4220
|
+
messageDisplay?.addChunk(part.text);
|
|
4221
|
+
}
|
|
4074
4222
|
}
|
|
4075
4223
|
}
|
|
4076
4224
|
if (response.type === "chunk" /* CHUNK */ && response.value.usageMetadata) {
|
|
@@ -4084,6 +4232,11 @@ ${this.pendingWorktreeNotice}
|
|
|
4084
4232
|
}
|
|
4085
4233
|
}
|
|
4086
4234
|
if (response.type === "retry" /* RETRY */ || response.type === "model_fallback" /* MODEL_FALLBACK */) {
|
|
4235
|
+
if (response.type === "model_fallback" /* MODEL_FALLBACK */ || !response.isContinuation) {
|
|
4236
|
+
if (channelDeliveryResponseBlock) {
|
|
4237
|
+
channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
|
|
4238
|
+
}
|
|
4239
|
+
}
|
|
4087
4240
|
await finalizeToolCallPreparations(
|
|
4088
4241
|
preparationTracker,
|
|
4089
4242
|
true,
|
|
@@ -4122,6 +4275,11 @@ ${this.pendingWorktreeNotice}
|
|
|
4122
4275
|
await messageDisplay?.finish();
|
|
4123
4276
|
}
|
|
4124
4277
|
}
|
|
4278
|
+
commitChannelDeliveryResponseBlock(
|
|
4279
|
+
options.channelDeliveryCapture,
|
|
4280
|
+
channelDeliveryResponseBlock,
|
|
4281
|
+
functionCalls.length > 0
|
|
4282
|
+
);
|
|
4125
4283
|
if (usageMetadata) {
|
|
4126
4284
|
this.#recordPromptTokenCount(usageMetadata);
|
|
4127
4285
|
const durationMs = Date.now() - streamStartTime;
|
|
@@ -4241,6 +4399,19 @@ ${this.pendingWorktreeNotice}
|
|
|
4241
4399
|
};
|
|
4242
4400
|
await this.client.sessionUpdate(params);
|
|
4243
4401
|
}
|
|
4402
|
+
#scheduleChannelDelivery(params) {
|
|
4403
|
+
const timer = setTimeout(() => {
|
|
4404
|
+
void this.client.extMethod(SERVE_CONTROL_EXT_METHODS.channelDelivery, params).catch((error) => {
|
|
4405
|
+
try {
|
|
4406
|
+
debugLogger6.warn(
|
|
4407
|
+
`Channel delivery submission failed: ${error instanceof Error ? error.message : String(error)}`
|
|
4408
|
+
);
|
|
4409
|
+
} catch {
|
|
4410
|
+
}
|
|
4411
|
+
});
|
|
4412
|
+
}, 0);
|
|
4413
|
+
timer.unref();
|
|
4414
|
+
}
|
|
4244
4415
|
#getCurrentChat() {
|
|
4245
4416
|
return this.config.getGeminiClient().getChat();
|
|
4246
4417
|
}
|
|
@@ -4688,7 +4859,9 @@ ${this.pendingWorktreeNotice}
|
|
|
4688
4859
|
this.#enqueueCronPrompt({
|
|
4689
4860
|
prompt: job.prompt,
|
|
4690
4861
|
source: job.cronExpr === "@wakeup" ? "loop" : "cron",
|
|
4691
|
-
...job.id ? { taskId: job.id } : {}
|
|
4862
|
+
...job.id ? { taskId: job.id } : {},
|
|
4863
|
+
...job.lastFiredAt !== void 0 ? { firedAt: job.lastFiredAt } : {},
|
|
4864
|
+
...job.delivery ? { delivery: job.delivery } : {}
|
|
4692
4865
|
});
|
|
4693
4866
|
void this.#drainCronQueue();
|
|
4694
4867
|
});
|
|
@@ -4815,9 +4988,12 @@ ${this.pendingWorktreeNotice}
|
|
|
4815
4988
|
* `_meta.source='cron'`, streams the model response, and handles tool calls.
|
|
4816
4989
|
*/
|
|
4817
4990
|
async #executeCronPrompt(item) {
|
|
4818
|
-
return
|
|
4819
|
-
|
|
4820
|
-
() =>
|
|
4991
|
+
return runWithInvocationContext(
|
|
4992
|
+
void 0,
|
|
4993
|
+
() => sessionIdContext.run(
|
|
4994
|
+
this.config.getSessionId(),
|
|
4995
|
+
() => this.#executeCronPromptInner(item)
|
|
4996
|
+
)
|
|
4821
4997
|
);
|
|
4822
4998
|
}
|
|
4823
4999
|
async #executeCronPromptInner(item) {
|
|
@@ -4833,6 +5009,8 @@ ${this.pendingWorktreeNotice}
|
|
|
4833
5009
|
);
|
|
4834
5010
|
const promptId = this.config.getSessionId() + "########cron" + Date.now();
|
|
4835
5011
|
let cronHadError = false;
|
|
5012
|
+
let cronCompleted = false;
|
|
5013
|
+
const channelDeliveryCapture = item.delivery ? { finalText: "" } : void 0;
|
|
4836
5014
|
await withInteractionSpan(
|
|
4837
5015
|
this.config,
|
|
4838
5016
|
{
|
|
@@ -4933,6 +5111,8 @@ ${this.pendingWorktreeNotice}
|
|
|
4933
5111
|
return;
|
|
4934
5112
|
}
|
|
4935
5113
|
const responseStream = sendResult.responseStream;
|
|
5114
|
+
const channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(channelDeliveryCapture);
|
|
5115
|
+
const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
|
|
4936
5116
|
if (loopTick && turnCount === 1) {
|
|
4937
5117
|
this.loopTickResolver?.markDelivered();
|
|
4938
5118
|
}
|
|
@@ -4957,6 +5137,7 @@ ${this.pendingWorktreeNotice}
|
|
|
4957
5137
|
part.thought
|
|
4958
5138
|
);
|
|
4959
5139
|
if (!part.thought) {
|
|
5140
|
+
channelDeliveryResponseBlock?.push(part.text);
|
|
4960
5141
|
messageDisplay?.addChunk(part.text);
|
|
4961
5142
|
}
|
|
4962
5143
|
}
|
|
@@ -4972,6 +5153,11 @@ ${this.pendingWorktreeNotice}
|
|
|
4972
5153
|
}
|
|
4973
5154
|
}
|
|
4974
5155
|
if (resp.type === "retry" /* RETRY */ || resp.type === "model_fallback" /* MODEL_FALLBACK */) {
|
|
5156
|
+
if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
|
|
5157
|
+
if (channelDeliveryResponseBlock) {
|
|
5158
|
+
channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
|
|
5159
|
+
}
|
|
5160
|
+
}
|
|
4975
5161
|
await finalizeToolCallPreparations(
|
|
4976
5162
|
preparationTracker,
|
|
4977
5163
|
true,
|
|
@@ -4994,6 +5180,11 @@ ${this.pendingWorktreeNotice}
|
|
|
4994
5180
|
await messageDisplay?.finish();
|
|
4995
5181
|
}
|
|
4996
5182
|
}
|
|
5183
|
+
commitChannelDeliveryResponseBlock(
|
|
5184
|
+
channelDeliveryCapture,
|
|
5185
|
+
channelDeliveryResponseBlock,
|
|
5186
|
+
functionCalls.length > 0
|
|
5187
|
+
);
|
|
4997
5188
|
if (usageMetadata) {
|
|
4998
5189
|
this.#recordPromptTokenCount(usageMetadata);
|
|
4999
5190
|
if (this.messageRewriter) {
|
|
@@ -5030,18 +5221,23 @@ ${this.pendingWorktreeNotice}
|
|
|
5030
5221
|
}
|
|
5031
5222
|
}
|
|
5032
5223
|
}
|
|
5224
|
+
let stopReason = "end_turn";
|
|
5033
5225
|
if (this.todoStopGuard.needsStopInspection) {
|
|
5034
5226
|
const guardStop = await this.#handleStopHookLoop(
|
|
5035
5227
|
ac,
|
|
5036
5228
|
promptId,
|
|
5037
5229
|
false,
|
|
5038
5230
|
void 0,
|
|
5039
|
-
false
|
|
5231
|
+
false,
|
|
5232
|
+
void 0,
|
|
5233
|
+
channelDeliveryCapture
|
|
5040
5234
|
);
|
|
5235
|
+
stopReason = guardStop.stopReason;
|
|
5041
5236
|
if (guardStop.stopReason === "max_tokens") {
|
|
5042
5237
|
this.#stopCronAfterTokenLimit();
|
|
5043
5238
|
}
|
|
5044
5239
|
}
|
|
5240
|
+
cronCompleted = stopReason === "end_turn" && !ac.signal.aborted;
|
|
5045
5241
|
} catch (error) {
|
|
5046
5242
|
if (ac.signal.aborted) {
|
|
5047
5243
|
this.todoStopGuard.suspend();
|
|
@@ -5069,6 +5265,19 @@ ${this.pendingWorktreeNotice}
|
|
|
5069
5265
|
},
|
|
5070
5266
|
() => ac.signal.aborted ? "cancelled" : cronHadError ? "error" : "ok"
|
|
5071
5267
|
);
|
|
5268
|
+
if (cronCompleted && item.delivery && item.taskId && item.firedAt !== void 0) {
|
|
5269
|
+
this.#scheduleChannelDelivery({
|
|
5270
|
+
sessionId: this.sessionId,
|
|
5271
|
+
deliveryId: `${item.taskId}:${item.firedAt}`,
|
|
5272
|
+
source: "scheduled",
|
|
5273
|
+
target: item.delivery.target,
|
|
5274
|
+
text: normalizeChannelDeliveryText(
|
|
5275
|
+
channelDeliveryCapture?.finalText ?? ""
|
|
5276
|
+
),
|
|
5277
|
+
taskId: item.taskId,
|
|
5278
|
+
firedAt: item.firedAt
|
|
5279
|
+
});
|
|
5280
|
+
}
|
|
5072
5281
|
}
|
|
5073
5282
|
);
|
|
5074
5283
|
}
|
|
@@ -5208,9 +5417,12 @@ ${this.pendingWorktreeNotice}
|
|
|
5208
5417
|
if (nextIndex < 0) break;
|
|
5209
5418
|
const [item] = this.notificationQueue.splice(nextIndex, 1);
|
|
5210
5419
|
if (!item) break;
|
|
5211
|
-
await
|
|
5212
|
-
|
|
5213
|
-
() =>
|
|
5420
|
+
await runWithInvocationContext(
|
|
5421
|
+
void 0,
|
|
5422
|
+
() => sessionIdContext.run(
|
|
5423
|
+
this.config.getSessionId(),
|
|
5424
|
+
() => this.#executeBackgroundNotificationPromptInner(item)
|
|
5425
|
+
)
|
|
5214
5426
|
);
|
|
5215
5427
|
}
|
|
5216
5428
|
} finally {
|
|
@@ -6307,6 +6519,7 @@ ${this.pendingWorktreeNotice}
|
|
|
6307
6519
|
const originalPolicyRequestArgs = policyToolName === ToolNames.SHELL || policyToolName === ToolNames.MONITOR ? structuredClone(args) : args;
|
|
6308
6520
|
const toolSpan = startToolSpan(policyToolName, {
|
|
6309
6521
|
"tool.call_id": callId,
|
|
6522
|
+
"gen_ai.tool.call.id": getProviderToolCallId(fc) ?? callId,
|
|
6310
6523
|
// Dual-emit the legacy call_id/tool_name aliases like CoreToolScheduler
|
|
6311
6524
|
// (coreToolScheduler.ts) so pre-Phase-2 dashboards keyed off call_id keep
|
|
6312
6525
|
// matching daemon/ACP tool spans during the migration window.
|
|
@@ -7689,7 +7902,8 @@ function serializeAgentTask(entry, now) {
|
|
|
7689
7902
|
at: a.at
|
|
7690
7903
|
}))
|
|
7691
7904
|
} : {},
|
|
7692
|
-
...optionalField("prompt", entry.prompt)
|
|
7905
|
+
...optionalField("prompt", entry.prompt),
|
|
7906
|
+
...optionalField("toolUseId", entry.toolUseId)
|
|
7693
7907
|
};
|
|
7694
7908
|
}
|
|
7695
7909
|
__name(serializeAgentTask, "serializeAgentTask");
|
|
@@ -9397,7 +9611,9 @@ async function deliverClientMcpMessage(connection, serverName, message, sessionI
|
|
|
9397
9611
|
return payload;
|
|
9398
9612
|
}
|
|
9399
9613
|
__name(deliverClientMcpMessage, "deliverClientMcpMessage");
|
|
9400
|
-
async function runAcpAgent(config, settings, argv) {
|
|
9614
|
+
async function runAcpAgent(config, settings, argv, options) {
|
|
9615
|
+
const privateParentCapability = options === void 0 ? process.env[PRIVATE_ACP_CAPABILITY_ENV] : options.privateParentCapability;
|
|
9616
|
+
delete process.env[PRIVATE_ACP_CAPABILITY_ENV];
|
|
9401
9617
|
let acpConnection;
|
|
9402
9618
|
const bootstrapClientMcpSender = /* @__PURE__ */ __name((serverName, message) => deliverClientMcpMessage(acpConnection, serverName, message), "bootstrapClientMcpSender");
|
|
9403
9619
|
beginAcpBootstrapConfigProfiling();
|
|
@@ -9434,10 +9650,33 @@ async function runAcpAgent(config, settings, argv) {
|
|
|
9434
9650
|
console.log = console.error;
|
|
9435
9651
|
console.info = console.error;
|
|
9436
9652
|
console.debug = console.error;
|
|
9437
|
-
|
|
9653
|
+
let initializeRequestId;
|
|
9654
|
+
const stream = ndJsonStream(stdout, stdin, {
|
|
9655
|
+
onMessageObserved: /* @__PURE__ */ __name(({ direction, message }) => {
|
|
9656
|
+
if (direction === "received" && "id" in message && "method" in message && message.method === "initialize") {
|
|
9657
|
+
initializeRequestId = message.id;
|
|
9658
|
+
return;
|
|
9659
|
+
}
|
|
9660
|
+
if (direction !== "sent" || initializeRequestId === void 0 || !("id" in message) || "method" in message || message.id !== initializeRequestId) {
|
|
9661
|
+
return;
|
|
9662
|
+
}
|
|
9663
|
+
initializeRequestId = void 0;
|
|
9664
|
+
if ("result" in message) {
|
|
9665
|
+
void initializeTelemetry(config).then(() => {
|
|
9666
|
+
registerAcpEventLoopLagGauge(() => eventLoopMonitor.snapshot());
|
|
9667
|
+
});
|
|
9668
|
+
}
|
|
9669
|
+
}, "onMessageObserved")
|
|
9670
|
+
});
|
|
9438
9671
|
connection = new AgentSideConnection((conn) => {
|
|
9439
9672
|
acpConnection = conn;
|
|
9440
|
-
agentInstance = new QwenAgent(
|
|
9673
|
+
agentInstance = new QwenAgent(
|
|
9674
|
+
config,
|
|
9675
|
+
settings,
|
|
9676
|
+
argv,
|
|
9677
|
+
conn,
|
|
9678
|
+
privateParentCapability
|
|
9679
|
+
);
|
|
9441
9680
|
return agentInstance;
|
|
9442
9681
|
}, stream);
|
|
9443
9682
|
markAcpStartup("transportSetupEnd");
|
|
@@ -9445,7 +9684,6 @@ async function runAcpAgent(config, settings, argv) {
|
|
|
9445
9684
|
eventLoopMonitor.dispose();
|
|
9446
9685
|
throw err;
|
|
9447
9686
|
}
|
|
9448
|
-
registerAcpEventLoopLagGauge(() => eventLoopMonitor.snapshot());
|
|
9449
9687
|
const drainPoolBeforeExit = /* @__PURE__ */ __name(async (label) => {
|
|
9450
9688
|
if (!agentInstance) return;
|
|
9451
9689
|
try {
|
|
@@ -9634,11 +9872,12 @@ function parseAcpSessionListCursor(value) {
|
|
|
9634
9872
|
}
|
|
9635
9873
|
__name(parseAcpSessionListCursor, "parseAcpSessionListCursor");
|
|
9636
9874
|
var QwenAgent = class {
|
|
9637
|
-
constructor(config, settings, argv, connection) {
|
|
9875
|
+
constructor(config, settings, argv, connection, expectedPrivateParentCapability) {
|
|
9638
9876
|
this.config = config;
|
|
9639
9877
|
this.settings = settings;
|
|
9640
9878
|
this.argv = argv;
|
|
9641
9879
|
this.connection = connection;
|
|
9880
|
+
this.expectedPrivateParentCapability = expectedPrivateParentCapability;
|
|
9642
9881
|
if (process.env["QWEN_SERVE_NO_MCP_POOL"] === "1") {
|
|
9643
9882
|
this.mcpPool = void 0;
|
|
9644
9883
|
this.workspaceMcpBudget = void 0;
|
|
@@ -9669,15 +9908,18 @@ var QwenAgent = class {
|
|
|
9669
9908
|
__name(this, "QwenAgent");
|
|
9670
9909
|
}
|
|
9671
9910
|
sessions = /* @__PURE__ */ new Map();
|
|
9911
|
+
activePromptCalls = /* @__PURE__ */ new Map();
|
|
9672
9912
|
workspaceMcpDiscoveryConfig;
|
|
9673
9913
|
workspaceMcpDiscoveryPromise;
|
|
9674
9914
|
workspaceMcpDiscoveryError;
|
|
9675
9915
|
pendingMcpAuthentications = /* @__PURE__ */ new Map();
|
|
9676
9916
|
mcpAuthenticationResults = /* @__PURE__ */ new Map();
|
|
9677
9917
|
generationControllers = /* @__PURE__ */ new Map();
|
|
9918
|
+
workspaceGenerationControllers = /* @__PURE__ */ new Map();
|
|
9678
9919
|
transcriptReplayConfigCache = /* @__PURE__ */ new Map();
|
|
9679
9920
|
pendingConfigCleanup = /* @__PURE__ */ new Map();
|
|
9680
9921
|
clientCapabilities;
|
|
9922
|
+
privateParentState = "uninitialized";
|
|
9681
9923
|
// CPU-usage delta baseline for the daemon's `workspaceResource` extMethod
|
|
9682
9924
|
// (Daemon Status child-resource chart). The daemon polls this at a fixed
|
|
9683
9925
|
// cadence, so successive calls form a clean delta window independent of tool
|
|
@@ -9838,7 +10080,7 @@ var QwenAgent = class {
|
|
|
9838
10080
|
await this.createWorkspaceMcpDiscoveryConfig(settings);
|
|
9839
10081
|
});
|
|
9840
10082
|
}
|
|
9841
|
-
reloadWorkspaceMcpDiscovery() {
|
|
10083
|
+
reloadWorkspaceMcpDiscovery(options = {}) {
|
|
9842
10084
|
return this.enqueueWorkspaceMcpDiscovery("reload", async () => {
|
|
9843
10085
|
const settings = loadSettings(this.config.getTargetDir());
|
|
9844
10086
|
const discoveryConfig = this.workspaceMcpDiscoveryConfig;
|
|
@@ -9884,8 +10126,62 @@ var QwenAgent = class {
|
|
|
9884
10126
|
"Failed to synchronize MCP settings with live sessions"
|
|
9885
10127
|
);
|
|
9886
10128
|
}
|
|
10129
|
+
if (options.forceReconnectAll === true || options.forceReconnectWhich !== void 0) {
|
|
10130
|
+
await this.forceReconnectWorkspaceMcp(options.forceReconnectWhich);
|
|
10131
|
+
}
|
|
9887
10132
|
});
|
|
9888
10133
|
}
|
|
10134
|
+
async forceReconnectWorkspaceMcp(requestedServerNames) {
|
|
10135
|
+
const serverNames = /* @__PURE__ */ new Set();
|
|
10136
|
+
for (const config of [
|
|
10137
|
+
this.workspaceMcpDiscoveryConfig,
|
|
10138
|
+
this.config,
|
|
10139
|
+
...this.getActiveSessions().map((session) => session.getConfig())
|
|
10140
|
+
]) {
|
|
10141
|
+
for (const name of Object.keys(config?.getMcpServers() ?? {})) {
|
|
10142
|
+
serverNames.add(name);
|
|
10143
|
+
}
|
|
10144
|
+
}
|
|
10145
|
+
const selectedServerNames = requestedServerNames ? [...new Set(requestedServerNames)].filter(
|
|
10146
|
+
(name) => serverNames.has(name)
|
|
10147
|
+
) : [...serverNames];
|
|
10148
|
+
const errors = [];
|
|
10149
|
+
for (const serverName of selectedServerNames) {
|
|
10150
|
+
try {
|
|
10151
|
+
const poolHasEntries = (this.mcpPool?.getSnapshot().byName[serverName]?.entryCount ?? 0) > 0;
|
|
10152
|
+
if (this.mcpPool && poolHasEntries) {
|
|
10153
|
+
const results = await this.mcpPool.restartByName(serverName);
|
|
10154
|
+
const failed = results.find((result) => !result.restarted);
|
|
10155
|
+
if (failed) {
|
|
10156
|
+
throw new Error(
|
|
10157
|
+
`MCP server ${JSON.stringify(serverName)} failed to reconnect: ${failed.reason ?? "unknown error"}`
|
|
10158
|
+
);
|
|
10159
|
+
}
|
|
10160
|
+
await Promise.all(
|
|
10161
|
+
this.getLiveMcpConfigs(serverName).map(async (config) => {
|
|
10162
|
+
const geminiClient = config.getGeminiClient?.();
|
|
10163
|
+
if (geminiClient?.isInitialized?.()) {
|
|
10164
|
+
await geminiClient.setTools?.();
|
|
10165
|
+
}
|
|
10166
|
+
})
|
|
10167
|
+
);
|
|
10168
|
+
} else {
|
|
10169
|
+
await this.reconcileMcpServerAcrossLiveConfigs(
|
|
10170
|
+
serverName,
|
|
10171
|
+
"discover"
|
|
10172
|
+
);
|
|
10173
|
+
}
|
|
10174
|
+
} catch (error) {
|
|
10175
|
+
errors.push(error);
|
|
10176
|
+
}
|
|
10177
|
+
}
|
|
10178
|
+
if (errors.length > 0) {
|
|
10179
|
+
throw new AggregateError(
|
|
10180
|
+
errors,
|
|
10181
|
+
"Failed to force reconnect one or more MCP servers"
|
|
10182
|
+
);
|
|
10183
|
+
}
|
|
10184
|
+
}
|
|
9889
10185
|
/**
|
|
9890
10186
|
* Drain the workspace MCP transport pool. Called on shutdown so all
|
|
9891
10187
|
* pool entries get a coordinated SIGTERM before process.exit. No-op
|
|
@@ -10094,6 +10390,10 @@ var QwenAgent = class {
|
|
|
10094
10390
|
generation.controller.abort();
|
|
10095
10391
|
}
|
|
10096
10392
|
this.generationControllers.clear();
|
|
10393
|
+
for (const controller of this.workspaceGenerationControllers.values()) {
|
|
10394
|
+
controller.abort();
|
|
10395
|
+
}
|
|
10396
|
+
this.workspaceGenerationControllers.clear();
|
|
10097
10397
|
await Promise.allSettled(
|
|
10098
10398
|
[...this.sessions.entries()].map(
|
|
10099
10399
|
([sessionId, session]) => this.discardStoredSessionIfCurrent(sessionId, session, {
|
|
@@ -10152,9 +10452,34 @@ var QwenAgent = class {
|
|
|
10152
10452
|
}
|
|
10153
10453
|
async initialize(args) {
|
|
10154
10454
|
markAcpStartup("initializeHandlerStart");
|
|
10455
|
+
if (this.privateParentState === "rejected") {
|
|
10456
|
+
throw RequestError.invalidParams(
|
|
10457
|
+
void 0,
|
|
10458
|
+
"Invalid private ACP parent capability"
|
|
10459
|
+
);
|
|
10460
|
+
}
|
|
10461
|
+
if (this.privateParentState === "uninitialized") {
|
|
10462
|
+
const expectedCapability = this.expectedPrivateParentCapability;
|
|
10463
|
+
if (expectedCapability === void 0) {
|
|
10464
|
+
this.privateParentState = "untrusted";
|
|
10465
|
+
} else {
|
|
10466
|
+
const suppliedCapability = args._meta?.[PRIVATE_PARENT_CAPABILITY_META_KEY];
|
|
10467
|
+
const suppliedBuffer = typeof suppliedCapability === "string" ? Buffer.from(suppliedCapability) : void 0;
|
|
10468
|
+
const expectedBuffer = Buffer.from(expectedCapability);
|
|
10469
|
+
if (suppliedBuffer !== void 0 && suppliedBuffer.length === expectedBuffer.length && timingSafeEqual(suppliedBuffer, expectedBuffer)) {
|
|
10470
|
+
this.privateParentState = "trusted";
|
|
10471
|
+
} else {
|
|
10472
|
+
this.privateParentState = "rejected";
|
|
10473
|
+
throw RequestError.invalidParams(
|
|
10474
|
+
void 0,
|
|
10475
|
+
"Invalid private ACP parent capability"
|
|
10476
|
+
);
|
|
10477
|
+
}
|
|
10478
|
+
}
|
|
10479
|
+
}
|
|
10155
10480
|
this.clientCapabilities = args.clientCapabilities;
|
|
10156
10481
|
const authMethods = buildAuthMethods();
|
|
10157
|
-
const version = "0.
|
|
10482
|
+
const version = "0.21.0";
|
|
10158
10483
|
const response = {
|
|
10159
10484
|
protocolVersion: PROTOCOL_VERSION,
|
|
10160
10485
|
agentInfo: {
|
|
@@ -10430,6 +10755,7 @@ var QwenAgent = class {
|
|
|
10430
10755
|
}
|
|
10431
10756
|
}
|
|
10432
10757
|
await this.#restoreWorktreeOnResume(config, session);
|
|
10758
|
+
await this.#restoreBackgroundAgentsOnResume(config, session);
|
|
10433
10759
|
this.#restoreGoalOnResume(config, session);
|
|
10434
10760
|
const modesData = this.buildModesData(config);
|
|
10435
10761
|
const availableModels = this.buildAvailableModels(config);
|
|
@@ -10504,6 +10830,7 @@ var QwenAgent = class {
|
|
|
10504
10830
|
});
|
|
10505
10831
|
}
|
|
10506
10832
|
await this.#restoreWorktreeOnResume(config, session);
|
|
10833
|
+
await this.#restoreBackgroundAgentsOnResume(config, session);
|
|
10507
10834
|
this.#restoreGoalOnResume(config, session);
|
|
10508
10835
|
const modesData = this.buildModesData(config);
|
|
10509
10836
|
const availableModels = this.buildAvailableModels(config);
|
|
@@ -10533,6 +10860,10 @@ var QwenAgent = class {
|
|
|
10533
10860
|
debugLogger7.warn(`ACP worktree restore failed: ${error}`);
|
|
10534
10861
|
}
|
|
10535
10862
|
}
|
|
10863
|
+
async #restoreBackgroundAgentsOnResume(config, session) {
|
|
10864
|
+
await config.loadPausedBackgroundAgents(config.getSessionId());
|
|
10865
|
+
session.pendingRecoveredAgentsNotice = config.consumePendingRecoveredAgentsNotice();
|
|
10866
|
+
}
|
|
10536
10867
|
/**
|
|
10537
10868
|
* Re-registers the `/goal` Stop hook when a resumed transcript ends on an
|
|
10538
10869
|
* unsatisfied goal — the daemon counterpart of the TUI's resume restore.
|
|
@@ -10666,14 +10997,63 @@ var QwenAgent = class {
|
|
|
10666
10997
|
if (!session) {
|
|
10667
10998
|
throw new Error(`Session not found: ${params.sessionId}`);
|
|
10668
10999
|
}
|
|
10669
|
-
|
|
11000
|
+
const sanitizedParams = { ...params };
|
|
11001
|
+
const meta = params._meta && typeof params._meta === "object" ? { ...params._meta } : {};
|
|
11002
|
+
const suppliedContext = meta[INVOCATION_CONTEXT_META_KEY];
|
|
11003
|
+
delete meta[INVOCATION_CONTEXT_META_KEY];
|
|
11004
|
+
delete meta[PRIVATE_PARENT_CAPABILITY_META_KEY];
|
|
11005
|
+
if (Object.keys(meta).length > 0) {
|
|
11006
|
+
sanitizedParams._meta = meta;
|
|
11007
|
+
} else {
|
|
11008
|
+
delete sanitizedParams._meta;
|
|
11009
|
+
}
|
|
11010
|
+
const invocationContext = this.privateParentState === "trusted" && suppliedContext !== void 0 ? parseInvocationContext(suppliedContext) : void 0;
|
|
11011
|
+
if (this.privateParentState === "trusted" && suppliedContext !== void 0 && invocationContext === void 0) {
|
|
11012
|
+
throw RequestError.invalidParams(
|
|
11013
|
+
void 0,
|
|
11014
|
+
"Invalid trusted ACP invocation context"
|
|
11015
|
+
);
|
|
11016
|
+
}
|
|
11017
|
+
let settleCall = /* @__PURE__ */ __name(() => {
|
|
11018
|
+
}, "settleCall");
|
|
11019
|
+
const call = {
|
|
11020
|
+
controller: new AbortController(),
|
|
11021
|
+
settled: new Promise((resolve5) => {
|
|
11022
|
+
settleCall = resolve5;
|
|
11023
|
+
})
|
|
11024
|
+
};
|
|
11025
|
+
let calls = this.activePromptCalls.get(params.sessionId);
|
|
11026
|
+
if (!calls) {
|
|
11027
|
+
calls = /* @__PURE__ */ new Set();
|
|
11028
|
+
this.activePromptCalls.set(params.sessionId, calls);
|
|
11029
|
+
}
|
|
11030
|
+
calls.add(call);
|
|
11031
|
+
try {
|
|
11032
|
+
return await session.prompt(
|
|
11033
|
+
sanitizedParams,
|
|
11034
|
+
invocationContext,
|
|
11035
|
+
call.controller.signal
|
|
11036
|
+
);
|
|
11037
|
+
} finally {
|
|
11038
|
+
calls.delete(call);
|
|
11039
|
+
if (calls.size === 0) {
|
|
11040
|
+
this.activePromptCalls.delete(params.sessionId);
|
|
11041
|
+
}
|
|
11042
|
+
settleCall();
|
|
11043
|
+
}
|
|
10670
11044
|
}
|
|
10671
11045
|
async cancel(params) {
|
|
10672
11046
|
const session = this.sessions.get(params.sessionId);
|
|
10673
11047
|
if (!session) {
|
|
10674
11048
|
throw new Error(`Session not found: ${params.sessionId}`);
|
|
10675
11049
|
}
|
|
10676
|
-
|
|
11050
|
+
try {
|
|
11051
|
+
await session.cancelPendingPrompt();
|
|
11052
|
+
} catch (error) {
|
|
11053
|
+
if (!isNotCurrentlyGeneratingCancelError(error)) {
|
|
11054
|
+
throw error;
|
|
11055
|
+
}
|
|
11056
|
+
}
|
|
10677
11057
|
}
|
|
10678
11058
|
loadPermissionSettings(cwd) {
|
|
10679
11059
|
this.settings = loadSettings(cwd);
|
|
@@ -11695,7 +12075,7 @@ var QwenAgent = class {
|
|
|
11695
12075
|
}
|
|
11696
12076
|
buildProvidersPreflightCell(config) {
|
|
11697
12077
|
try {
|
|
11698
|
-
const models = config.getAllConfiguredModels();
|
|
12078
|
+
const models = config.getAllConfiguredModels().filter((model) => !model.imageOnly);
|
|
11699
12079
|
const authType = config.getAuthType?.();
|
|
11700
12080
|
if (models.length === 0) {
|
|
11701
12081
|
return this.acpCell("providers", {
|
|
@@ -12433,6 +12813,31 @@ var QwenAgent = class {
|
|
|
12433
12813
|
const cwd = requestedCwd || process.cwd();
|
|
12434
12814
|
const SESSION_ID_RE = /^[0-9a-fA-F-]{32,36}$/;
|
|
12435
12815
|
switch (method) {
|
|
12816
|
+
case PROMPT_CANCEL_METHOD: {
|
|
12817
|
+
const sessionId = params["sessionId"];
|
|
12818
|
+
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
12819
|
+
throw RequestError.invalidParams(
|
|
12820
|
+
void 0,
|
|
12821
|
+
"Invalid or missing sessionId"
|
|
12822
|
+
);
|
|
12823
|
+
}
|
|
12824
|
+
const session = this.sessions.get(sessionId);
|
|
12825
|
+
if (!session) {
|
|
12826
|
+
throw RequestError.invalidParams(
|
|
12827
|
+
void 0,
|
|
12828
|
+
`Session not found for id: ${sessionId}`
|
|
12829
|
+
);
|
|
12830
|
+
}
|
|
12831
|
+
const targetedCalls = new Set(
|
|
12832
|
+
this.activePromptCalls.get(sessionId) ?? []
|
|
12833
|
+
);
|
|
12834
|
+
if (targetedCalls.size === 0) {
|
|
12835
|
+
return { cancelled: false };
|
|
12836
|
+
}
|
|
12837
|
+
targetedCalls.forEach((call) => call.controller.abort());
|
|
12838
|
+
await Promise.all(Array.from(targetedCalls, (call) => call.settled));
|
|
12839
|
+
return { cancelled: true };
|
|
12840
|
+
}
|
|
12436
12841
|
case TODO_STOP_GUARD_QUEUE_RELEASE_METHOD: {
|
|
12437
12842
|
const sessionId = params["sessionId"];
|
|
12438
12843
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
@@ -12702,6 +13107,25 @@ var QwenAgent = class {
|
|
|
12702
13107
|
"Transcript cursor and record boundary are mutually exclusive"
|
|
12703
13108
|
);
|
|
12704
13109
|
}
|
|
13110
|
+
const rawDirection = params["direction"];
|
|
13111
|
+
if (rawDirection !== void 0 && rawDirection !== "backward") {
|
|
13112
|
+
throw RequestError.invalidParams(
|
|
13113
|
+
void 0,
|
|
13114
|
+
"Invalid transcript direction"
|
|
13115
|
+
);
|
|
13116
|
+
}
|
|
13117
|
+
if (rawCursor !== void 0 && rawDirection !== void 0) {
|
|
13118
|
+
throw RequestError.invalidParams(
|
|
13119
|
+
void 0,
|
|
13120
|
+
"Transcript cursor and direction are mutually exclusive"
|
|
13121
|
+
);
|
|
13122
|
+
}
|
|
13123
|
+
if (rawBeforeRecordId !== void 0 && rawDirection !== void 0) {
|
|
13124
|
+
throw RequestError.invalidParams(
|
|
13125
|
+
void 0,
|
|
13126
|
+
"Transcript record boundary and direction are mutually exclusive"
|
|
13127
|
+
);
|
|
13128
|
+
}
|
|
12705
13129
|
const rawLimit = params["limit"];
|
|
12706
13130
|
if (rawLimit !== void 0 && (!Number.isSafeInteger(rawLimit) || rawLimit < 1 || rawLimit > SESSION_TRANSCRIPT_MAX_LIMIT)) {
|
|
12707
13131
|
throw RequestError.invalidParams(
|
|
@@ -12712,10 +13136,14 @@ var QwenAgent = class {
|
|
|
12712
13136
|
try {
|
|
12713
13137
|
const settings = loadSettingsCached(cwd);
|
|
12714
13138
|
return await runWithAcpRuntimeOutputDir(settings, cwd, async () => {
|
|
13139
|
+
if (rawDirection === "backward") {
|
|
13140
|
+
await this.sessions.get(sessionId)?.getConfig().getChatRecordingService()?.flush();
|
|
13141
|
+
}
|
|
12715
13142
|
const reader = new SessionTranscriptReader(cwd);
|
|
12716
13143
|
const page = await reader.readPage(sessionId, {
|
|
12717
13144
|
...typeof rawCursor === "string" ? { cursor: rawCursor } : {},
|
|
12718
13145
|
...typeof rawBeforeRecordId === "string" ? { beforeRecordId: rawBeforeRecordId } : {},
|
|
13146
|
+
...rawDirection === "backward" ? { direction: rawDirection } : {},
|
|
12719
13147
|
...typeof rawLimit === "number" ? { limit: rawLimit } : {},
|
|
12720
13148
|
maxBytes: SESSION_TRANSCRIPT_MAX_PAGE_BYTES
|
|
12721
13149
|
});
|
|
@@ -13261,8 +13689,34 @@ var QwenAgent = class {
|
|
|
13261
13689
|
}
|
|
13262
13690
|
case SERVE_CONTROL_EXT_METHODS.workspaceMcpInitialize:
|
|
13263
13691
|
return this.initializeWorkspaceMcpDiscovery();
|
|
13264
|
-
case SERVE_CONTROL_EXT_METHODS.workspaceMcpReload:
|
|
13265
|
-
|
|
13692
|
+
case SERVE_CONTROL_EXT_METHODS.workspaceMcpReload: {
|
|
13693
|
+
const forceReconnectAll = params["forceReconnectAll"];
|
|
13694
|
+
const forceReconnectWhich = params["forceReconnectWhich"];
|
|
13695
|
+
if (forceReconnectAll !== void 0 && typeof forceReconnectAll !== "boolean") {
|
|
13696
|
+
throw RequestError.invalidParams(
|
|
13697
|
+
void 0,
|
|
13698
|
+
"forceReconnectAll must be a boolean"
|
|
13699
|
+
);
|
|
13700
|
+
}
|
|
13701
|
+
if (forceReconnectWhich !== void 0 && (!Array.isArray(forceReconnectWhich) || forceReconnectWhich.some(
|
|
13702
|
+
(serverName) => typeof serverName !== "string" || serverName.length === 0
|
|
13703
|
+
))) {
|
|
13704
|
+
throw RequestError.invalidParams(
|
|
13705
|
+
void 0,
|
|
13706
|
+
"forceReconnectWhich must be an array of server names"
|
|
13707
|
+
);
|
|
13708
|
+
}
|
|
13709
|
+
if (forceReconnectAll === true && forceReconnectWhich !== void 0) {
|
|
13710
|
+
throw RequestError.invalidParams(
|
|
13711
|
+
void 0,
|
|
13712
|
+
"forceReconnectAll and forceReconnectWhich cannot be used together"
|
|
13713
|
+
);
|
|
13714
|
+
}
|
|
13715
|
+
return this.reloadWorkspaceMcpDiscovery({
|
|
13716
|
+
forceReconnectAll: forceReconnectAll === true,
|
|
13717
|
+
forceReconnectWhich
|
|
13718
|
+
});
|
|
13719
|
+
}
|
|
13266
13720
|
case SERVE_CONTROL_EXT_METHODS.workspaceMcpManage: {
|
|
13267
13721
|
const serverName = params["serverName"];
|
|
13268
13722
|
const action = params["action"];
|
|
@@ -13514,6 +13968,52 @@ var QwenAgent = class {
|
|
|
13514
13968
|
authUrl
|
|
13515
13969
|
};
|
|
13516
13970
|
}
|
|
13971
|
+
case SERVE_CONTROL_EXT_METHODS.workspaceGenerationStart: {
|
|
13972
|
+
const requestId = params["requestId"];
|
|
13973
|
+
const prompt = params["prompt"];
|
|
13974
|
+
if (typeof requestId !== "string" || requestId.length === 0) {
|
|
13975
|
+
throw RequestError.invalidParams(
|
|
13976
|
+
void 0,
|
|
13977
|
+
"Invalid or missing requestId"
|
|
13978
|
+
);
|
|
13979
|
+
}
|
|
13980
|
+
if (typeof prompt !== "string" || !prompt.trim() || Buffer.byteLength(prompt, "utf8") > GENERATION_MAX_PROMPT_BYTES || params["purpose"] !== "text") {
|
|
13981
|
+
throw RequestError.invalidParams(
|
|
13982
|
+
void 0,
|
|
13983
|
+
"Invalid workspace generation request"
|
|
13984
|
+
);
|
|
13985
|
+
}
|
|
13986
|
+
if (this.workspaceGenerationControllers.has(requestId)) {
|
|
13987
|
+
throw RequestError.invalidParams(
|
|
13988
|
+
void 0,
|
|
13989
|
+
"Duplicate workspace generation requestId"
|
|
13990
|
+
);
|
|
13991
|
+
}
|
|
13992
|
+
const controller = new AbortController();
|
|
13993
|
+
this.workspaceGenerationControllers.set(requestId, controller);
|
|
13994
|
+
const signal = AbortSignal.any([
|
|
13995
|
+
controller.signal,
|
|
13996
|
+
AbortSignal.timeout(GENERATION_TIMEOUT_MS)
|
|
13997
|
+
]);
|
|
13998
|
+
try {
|
|
13999
|
+
const emit = /* @__PURE__ */ __name(async (event) => {
|
|
14000
|
+
await this.connection.extNotification(
|
|
14001
|
+
"qwen/notify/workspace/generation/event",
|
|
14002
|
+
{ v: 1, requestId, event }
|
|
14003
|
+
);
|
|
14004
|
+
}, "emit");
|
|
14005
|
+
const result = await executeGeneration(
|
|
14006
|
+
this.config,
|
|
14007
|
+
requestId,
|
|
14008
|
+
prompt.trim(),
|
|
14009
|
+
signal,
|
|
14010
|
+
emit
|
|
14011
|
+
);
|
|
14012
|
+
return { requestId, ...result };
|
|
14013
|
+
} finally {
|
|
14014
|
+
this.workspaceGenerationControllers.delete(requestId);
|
|
14015
|
+
}
|
|
14016
|
+
}
|
|
13517
14017
|
case SERVE_CONTROL_EXT_METHODS.workspaceAgentGenerate: {
|
|
13518
14018
|
const description = params["description"];
|
|
13519
14019
|
if (typeof description !== "string" || !description.trim() || description.length > 4096) {
|
|
@@ -13528,6 +14028,22 @@ var QwenAgent = class {
|
|
|
13528
14028
|
AbortSignal.timeout(5 * 6e4)
|
|
13529
14029
|
);
|
|
13530
14030
|
}
|
|
14031
|
+
case SERVE_CONTROL_EXT_METHODS.workspaceGenerationCancel: {
|
|
14032
|
+
const requestId = params["requestId"];
|
|
14033
|
+
if (typeof requestId !== "string" || requestId.length === 0) {
|
|
14034
|
+
throw RequestError.invalidParams(
|
|
14035
|
+
void 0,
|
|
14036
|
+
"Invalid or missing requestId"
|
|
14037
|
+
);
|
|
14038
|
+
}
|
|
14039
|
+
const controller = this.workspaceGenerationControllers.get(requestId);
|
|
14040
|
+
const cancelled = controller !== void 0;
|
|
14041
|
+
if (cancelled) {
|
|
14042
|
+
controller.abort();
|
|
14043
|
+
this.workspaceGenerationControllers.delete(requestId);
|
|
14044
|
+
}
|
|
14045
|
+
return { requestId, cancelled };
|
|
14046
|
+
}
|
|
13531
14047
|
case SERVE_CONTROL_EXT_METHODS.sessionArtifactsPersist: {
|
|
13532
14048
|
const sessionId = params["sessionId"];
|
|
13533
14049
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
@@ -15526,7 +16042,7 @@ ${outputText}
|
|
|
15526
16042
|
buildAvailableModels(config) {
|
|
15527
16043
|
const rawCurrentModelId = (config.getModel() || this.config.getModel() || "").trim();
|
|
15528
16044
|
const currentAuthType = config.getAuthType();
|
|
15529
|
-
const modelOptions =
|
|
16045
|
+
const modelOptions = this.buildSelectableModelOptions(config);
|
|
15530
16046
|
const activeRuntimeSnapshot = config.getActiveRuntimeModelSnapshot?.();
|
|
15531
16047
|
const currentModelId = getCurrentAcpModelId(
|
|
15532
16048
|
modelOptions,
|
|
@@ -15561,7 +16077,7 @@ ${outputText}
|
|
|
15561
16077
|
}
|
|
15562
16078
|
buildConfigOptions(config) {
|
|
15563
16079
|
const currentApprovalMode = config.getApprovalMode();
|
|
15564
|
-
const modelOptions =
|
|
16080
|
+
const modelOptions = this.buildSelectableModelOptions(config);
|
|
15565
16081
|
const rawCurrentModelId = (config.getModel() || "").trim();
|
|
15566
16082
|
const currentAuthType = config.getAuthType?.();
|
|
15567
16083
|
const activeRuntimeSnapshot = config.getActiveRuntimeModelSnapshot?.();
|
|
@@ -15601,6 +16117,14 @@ ${outputText}
|
|
|
15601
16117
|
};
|
|
15602
16118
|
return [modeConfigOption, modelConfigOption];
|
|
15603
16119
|
}
|
|
16120
|
+
buildSelectableModelOptions(config) {
|
|
16121
|
+
const currentAuthType = config.getAuthType();
|
|
16122
|
+
return buildAcpModelOptions(
|
|
16123
|
+
config.getAllConfiguredModels().filter(
|
|
16124
|
+
(model) => model.authType !== "qwen-oauth" /* QWEN_OAUTH */ || currentAuthType === "qwen-oauth" /* QWEN_OAUTH */
|
|
16125
|
+
)
|
|
16126
|
+
);
|
|
16127
|
+
}
|
|
15604
16128
|
};
|
|
15605
16129
|
function diffSettingsKeys(oldMerged, newMerged) {
|
|
15606
16130
|
const changed = /* @__PURE__ */ new Set();
|