@qwen-code/qwen-code 0.21.1-simplify-system-prompt.0 → 0.21.2-nightly.20260801.bc382c3ff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/model-providers.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +42 -30
- package/bundled/qc-helper/docs/features/channels/_meta.ts +2 -0
- package/bundled/qc-helper/docs/features/channels/github.md +146 -0
- package/bundled/qc-helper/docs/features/channels/gitlab.md +177 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
- package/bundled/qc-helper/docs/features/code-review.md +21 -1
- package/bundled/qc-helper/docs/features/commands.md +1 -0
- package/bundled/qc-helper/docs/features/hooks.md +186 -32
- package/bundled/qc-helper/docs/features/mcp.md +9 -1
- package/bundled/qc-helper/docs/features/memory.md +27 -0
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
- package/bundled/qc-helper/docs/features/skills.md +14 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +75 -8
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +7 -7
- package/bundled/qc-helper/docs/qwen-serve.md +32 -8
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +4 -4
- package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
- package/bundled/review/DESIGN.md +19 -0
- package/bundled/review/SKILL.md +120 -61
- package/chunks/MaxSizedBox-CDHTDITS.js +89 -0
- package/chunks/{StandaloneSessionPicker-O6RKBPU4.js → StandaloneSessionPicker-L63HUAHP.js} +76 -73
- package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-3RICG2YW.js} +2 -2
- package/chunks/{acpAgent-HYFVXVDR.js → acpAgent-6WVVT2P3.js} +2147 -1009
- package/chunks/agent-KDM4CBOU.js +85 -0
- package/chunks/agent-headless-AS7K2K57.js +79 -0
- package/chunks/{anthropicContentGenerator-LXUXMOE7.js → anthropicContentGenerator-WCBYB6JG.js} +388 -37
- package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-ANV4CFCR.js} +4 -4
- package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-MALEB47H.js} +4 -4
- package/chunks/bridge-JNEW6FES.js +95 -0
- package/chunks/{build-RV63TIRH.js → build-GDBLPA24.js} +1 -1
- package/chunks/{ca-25EDXPFZ.js → ca-4OJN75WT.js} +52 -6
- package/chunks/{channel-management-service-G74LFADV.js → channel-management-service-QOO7TD3T.js} +21 -6
- package/chunks/channel-settings-store-4CSMTR4L.js +92 -0
- package/chunks/{channel-worker-group-PTJIJSKC.js → channel-worker-group-ERSUOPIR.js} +10 -6
- package/chunks/{channel-worker-manager-WIMGM2FD.js → channel-worker-manager-X247YDQ7.js} +10 -6
- package/chunks/{channel-worker-supervisor-KUFTR6P5.js → channel-worker-supervisor-ORJIEEPP.js} +6 -5
- package/chunks/{chunk-LNARWLZQ.js → chunk-25QQVOCG.js} +5 -5
- package/chunks/{chunk-2OM7GEXO.js → chunk-2A6MHYIA.js} +3 -3
- package/chunks/{chunk-ER5LWJR6.js → chunk-2CTKGIFR.js} +3 -3
- package/chunks/{chunk-SQBYH7PX.js → chunk-2DNKEBXY.js} +1 -1
- package/chunks/{chunk-6GMVPFB2.js → chunk-2IIJTXYF.js} +45 -16
- package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
- package/chunks/chunk-2M5N3DHY.js +378 -0
- package/chunks/{chunk-CC4N4M36.js → chunk-2PNQQ4UR.js} +2 -2
- package/chunks/{chunk-E5TUC6CA.js → chunk-2UISUFHQ.js} +3 -3
- package/chunks/{chunk-PWTZEM3C.js → chunk-33FNCQSY.js} +3 -37
- package/chunks/{chunk-J56UI34H.js → chunk-3LGZEYOF.js} +4 -2
- package/chunks/{chunk-66RMLJHC.js → chunk-3MHPWQ2M.js} +590 -212
- package/chunks/{chunk-NL7LTRLR.js → chunk-3RXUYQJI.js} +54 -74
- package/chunks/{chunk-E5Z2AVNV.js → chunk-3SH53ANB.js} +0 -11
- package/chunks/{chunk-XHRTVPG2.js → chunk-3WXMXT7C.js} +22 -11
- package/chunks/{chunk-C3NS4F2Q.js → chunk-42IKVPST.js} +1 -1
- package/chunks/{chunk-M5JM7OSF.js → chunk-432XCUHF.js} +2 -3
- package/chunks/{chunk-5U4IPFBR.js → chunk-433VD3HX.js} +4 -4
- package/chunks/chunk-434YCHSV.js +2196 -0
- package/chunks/{chunk-DHHOYAPR.js → chunk-4LKVQFHM.js} +7 -7
- package/chunks/{chunk-IPUUTYMV.js → chunk-4NFY2S7N.js} +0 -33
- package/chunks/{chunk-J6D3VXCC.js → chunk-5UJ6A3CH.js} +158 -12
- package/chunks/{chunk-N3FAY5CM.js → chunk-5UZITEHA.js} +158 -5
- package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
- package/chunks/chunk-6FMJLI5M.js +1591 -0
- package/chunks/{chunk-6FGBXPWM.js → chunk-6O5DVH27.js} +38 -44
- package/chunks/{chunk-2RFKHEXL.js → chunk-6PLDPT2C.js} +1 -1
- package/chunks/{chunk-52O2CIUL.js → chunk-7IYLHTTM.js} +130 -5
- package/chunks/{chunk-5THCYPLO.js → chunk-7K2WTPQO.js} +15 -8
- package/chunks/{chunk-2Q3OT4OV.js → chunk-7MY2AR5A.js} +204 -81
- package/chunks/{chunk-YH6G52F2.js → chunk-A2A34TSB.js} +4 -4
- package/chunks/{chunk-3QMGYBFN.js → chunk-A5YZ3FA2.js} +2 -80
- package/chunks/{chunk-K4XWPEWB.js → chunk-A6SX5TAH.js} +4 -33
- package/chunks/{chunk-VYPFXUCB.js → chunk-AKA24BGO.js} +1 -1
- package/chunks/chunk-AQ37AY7B.js +93 -0
- package/chunks/{chunk-PANH4R3B.js → chunk-AQEWCKX4.js} +18 -12
- package/chunks/{chunk-LG4GZIVV.js → chunk-AYB4HSBI.js} +4 -4
- package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
- package/chunks/{chunk-2JZBVYTU.js → chunk-BFHXDAR7.js} +1 -8
- package/chunks/{chunk-2W3OOD4W.js → chunk-BGXZBI5B.js} +7 -4
- package/chunks/{chunk-2YZJCM5T.js → chunk-BKUN5QHP.js} +7 -7
- package/chunks/{chunk-UUUTRMI2.js → chunk-BV4QX43X.js} +1 -1
- package/chunks/{chunk-4M377AZG.js → chunk-C4L2MEIT.js} +6 -6
- package/chunks/{chunk-VV6XU5L7.js → chunk-CHCLO3M7.js} +19 -14
- package/chunks/{chunk-TOFQCPDC.js → chunk-CWEIMFFW.js} +14 -8
- package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
- package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
- package/chunks/{chunk-WDSWXQU3.js → chunk-DUIJ2IXG.js} +5 -13
- package/chunks/{chunk-3MSHSCSN.js → chunk-DVGTU5TC.js} +94 -4
- package/chunks/{chunk-RHLZR4E5.js → chunk-DYA25Y7U.js} +1 -1
- package/chunks/{chunk-MUP3T3AD.js → chunk-E4WHKETF.js} +32 -38
- package/chunks/{chunk-WBL3FJEU.js → chunk-FC4KQFCS.js} +1 -1
- package/chunks/{chunk-V6VRAM7B.js → chunk-FJHA23GM.js} +12 -12
- package/chunks/chunk-FYJ7W2PI.js +194 -0
- package/chunks/{chunk-INADJJGW.js → chunk-G7XXKQYS.js} +2 -2
- package/chunks/{chunk-LZEMEFKY.js → chunk-GALUTA2C.js} +1 -1
- package/chunks/{chunk-ML52PL6O.js → chunk-GB3AB7TR.js} +4374 -3779
- package/chunks/{chunk-SASBXAQL.js → chunk-GHJM2C2T.js} +6 -8
- package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
- package/chunks/chunk-GOFAQQZA.js +132 -0
- package/chunks/{chunk-BJX6ZSUK.js → chunk-GTM6IHBB.js} +2 -2
- package/chunks/{chunk-TF2X2WCT.js → chunk-GVISB2OH.js} +2 -2
- package/chunks/{chunk-OKY7HXPG.js → chunk-H36SETQS.js} +2 -2
- package/chunks/{chunk-7FZEBPKS.js → chunk-H4346YW5.js} +39 -22
- package/chunks/{chunk-LNURQEMZ.js → chunk-H4DSRWAS.js} +24 -13
- package/chunks/{chunk-3JAQDSXN.js → chunk-H6MC6VQX.js} +290 -179
- package/chunks/{chunk-GZXCZHCT.js → chunk-I3G5JWBV.js} +1 -1
- package/chunks/{chunk-PR75REBZ.js → chunk-I5GNT6ZS.js} +18 -82
- package/chunks/{chunk-MVS3NS2N.js → chunk-I6FAHB4N.js} +28 -5
- package/chunks/{chunk-ZOIFNCKL.js → chunk-I7JDGNG6.js} +3 -23
- package/chunks/{chunk-OJGCZBB7.js → chunk-II6WPWHY.js} +41 -36
- package/chunks/{chunk-UH3WSE5L.js → chunk-J26HHFI5.js} +2 -7
- package/chunks/{chunk-S3TWXGKA.js → chunk-JE7KQ2UP.js} +4 -2
- package/chunks/{chunk-ZD6UTE4A.js → chunk-JELIWHXD.js} +1 -1
- package/chunks/{chunk-6PSLCFQ2.js → chunk-JRIDA5HF.js} +18 -9
- package/chunks/{chunk-W4CQXHT6.js → chunk-K4CGQN4Q.js} +1 -1
- package/chunks/{chunk-G4WFQUYQ.js → chunk-K5Q62CGR.js} +1 -1
- package/chunks/{chunk-JCW2R7WC.js → chunk-K623ENWT.js} +3 -79
- package/chunks/{chunk-T2NCM2ET.js → chunk-K6KS3LTN.js} +2 -749
- package/chunks/{chunk-DN6ZX5AY.js → chunk-KG22G46Y.js} +62 -15
- package/chunks/{chunk-L5UHQJTJ.js → chunk-KKN2IE7Q.js} +1 -1
- package/chunks/{chunk-63P4EL5V.js → chunk-KVUBYJDM.js} +2 -2
- package/chunks/{chunk-E5WH5O3C.js → chunk-KXSYDCP2.js} +4 -4
- package/chunks/{chunk-JALU3ZDU.js → chunk-LAPK3GLC.js} +212 -16
- package/chunks/chunk-LBOVL47Y.js +29 -0
- package/chunks/{chunk-FQK6JAFG.js → chunk-LBWNSLJK.js} +4 -4
- package/chunks/{chunk-3IXOIAKE.js → chunk-LL4U3BSH.js} +30 -10
- package/chunks/{chunk-B7QDM6Z7.js → chunk-LRJWFR6L.js} +4 -4
- package/chunks/{chunk-RWS5VYWC.js → chunk-M2F5PLOW.js} +1018 -484
- package/chunks/{chunk-HIJQF5B5.js → chunk-M744OFVE.js} +1 -1
- package/chunks/{chunk-I7XZ3RY5.js → chunk-MBKPUM5Y.js} +1 -1
- package/chunks/chunk-MISUEWB4.js +8749 -0
- package/chunks/{chunk-FNQ6T3CV.js → chunk-MOHAWIAW.js} +10 -7
- package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
- package/chunks/{chunk-QY5MMZ6O.js → chunk-MSIVKDRC.js} +4 -4
- package/chunks/{record-artifact-RQKFYO5B.js → chunk-MYT7N6QH.js} +22 -7
- package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
- package/chunks/{chunk-DM4Q4JJH.js → chunk-NGWYUZZO.js} +68794 -83526
- package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
- package/chunks/{chunk-PQNHRFJC.js → chunk-NYX53SV4.js} +0 -2
- package/chunks/{chunk-Z5BLYMZM.js → chunk-NZB4NDJL.js} +10 -10
- package/chunks/{chunk-SRZ6DXVG.js → chunk-O2ZYHG33.js} +47 -138
- package/chunks/chunk-O6GEWCJA.js +21 -0
- package/chunks/{chunk-PHVR5UUY.js → chunk-OBAIHYFT.js} +1 -1
- package/chunks/chunk-OCPBI7J5.js +18 -0
- package/chunks/{chunk-P5V4T7NK.js → chunk-OCRM53TT.js} +11 -3
- package/chunks/{chunk-V7RNNPGC.js → chunk-P5Y23G2L.js} +18 -1
- package/chunks/{chunk-KU5XMLDK.js → chunk-PDDYAXL2.js} +7 -1
- package/chunks/{chunk-L26JL52R.js → chunk-PGEGUNH5.js} +108 -68
- package/chunks/{chunk-2JM6GZ5D.js → chunk-PGP7Y3RQ.js} +8 -13
- package/chunks/{chunk-VFSJ5VRH.js → chunk-PHODQP2V.js} +6 -6
- package/chunks/{chunk-PSWQZHEA.js → chunk-PXA5AWHY.js} +1 -1
- package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
- package/chunks/chunk-QL4TN4HS.js +59 -0
- package/chunks/{chunk-USTWD7QV.js → chunk-QMBEW7EW.js} +26 -16
- package/chunks/{chunk-U4VTUMMK.js → chunk-QONSRAEV.js} +1 -1
- package/chunks/{chunk-NH6KE4JX.js → chunk-QYPT3QUD.js} +3 -3
- package/chunks/{chunk-GDIPH4JY.js → chunk-RGJ4JWSU.js} +133 -50
- package/chunks/{chunk-BO4XCS7P.js → chunk-RPYYTL7E.js} +77 -94
- package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
- package/chunks/{chunk-B4UMZKMU.js → chunk-SK2UKB45.js} +1 -1
- package/chunks/{chunk-QPDRAXDJ.js → chunk-SWEBEXPI.js} +1 -1
- package/chunks/chunk-T26EAKDL.js +13 -0
- package/chunks/chunk-T3CHYWJZ.js +758 -0
- package/chunks/{chunk-U7TXFVUN.js → chunk-TFFMATHX.js} +120 -95
- package/chunks/{chunk-M4UKFCZ2.js → chunk-TNVKFQXQ.js} +616 -217
- package/chunks/{chunk-5I2IWRSH.js → chunk-TYERNYH4.js} +2 -2
- package/chunks/{chunk-VAK25FTU.js → chunk-U25CMJYY.js} +1 -1
- package/chunks/{chunk-A5L3JMUA.js → chunk-UH7Z7Y45.js} +18 -4
- package/chunks/{chunk-BRRAJXPA.js → chunk-UHQ3L6GC.js} +1 -1
- package/chunks/{chunk-HV3G62R6.js → chunk-UHTJC7O3.js} +1 -1
- package/chunks/{chunk-3SJ43L4W.js → chunk-UKZEXS6K.js} +8 -0
- package/chunks/{chunk-DM22XS4K.js → chunk-UOFFZNXV.js} +361 -17
- package/chunks/{chunk-FY3M44RD.js → chunk-URN76TKR.js} +3 -3
- package/chunks/{chunk-MSLKI6C2.js → chunk-UWLG4UCE.js} +139 -31
- package/chunks/{chunk-A6UO2C7C.js → chunk-UWSXFI6E.js} +167 -81
- package/chunks/{chunk-BYFNTGKI.js → chunk-VS3GXRNZ.js} +3703 -1399
- package/chunks/{chunk-TQCBGUHN.js → chunk-VWF42XC6.js} +5 -5
- package/chunks/{chunk-32MVHM4T.js → chunk-W7XZ3KP5.js} +1 -1
- package/chunks/{chunk-B6ZJ7SI6.js → chunk-WISQLM4Q.js} +1526 -1420
- package/chunks/{chunk-H5FFA6TH.js → chunk-WK4TJUEA.js} +16 -3
- package/chunks/{chunk-3HBZKBMQ.js → chunk-WP4HGHFG.js} +5 -5
- package/chunks/{chunk-BIQWWWJN.js → chunk-XC2VAFVZ.js} +1 -1
- package/chunks/{chunk-EPDRMGT4.js → chunk-XC656O42.js} +4 -28
- package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
- package/chunks/{chunk-YAF5VNU7.js → chunk-XCLLRKY5.js} +4 -5
- package/chunks/chunk-XFDPIC4P.js +319 -0
- package/chunks/{chunk-KIUFNBHR.js → chunk-XSA5EKTJ.js} +1 -1
- package/chunks/{chunk-OHNBB4XR.js → chunk-YAVY33G4.js} +1 -1
- package/chunks/{chunk-DLWL3Z7A.js → chunk-YXEVDA66.js} +3 -3
- package/chunks/chunk-Z4X5MTRT.js +133 -0
- package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
- package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
- package/chunks/{chunk-ZE5WPL4I.js → chunk-ZRFJ75D7.js} +3 -3
- package/chunks/{chunk-MK7VQDN3.js → chunk-ZTN6OA5J.js} +8 -6
- package/chunks/{computer-use-DOFAHZAB.js → computer-use-Z4NCIIJN.js} +54 -51
- package/chunks/{config-utils-VFQXVGNR.js → config-utils-64LM6OEQ.js} +4 -4
- package/chunks/contextCommand-HVM7XFCB.js +84 -0
- package/chunks/core-runtime-NL3ZBHBU.js +138 -0
- package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-AM32K2HD.js} +3 -3
- package/chunks/{create-sub-session-7543K2QA.js → create-sub-session-XHSCDYFU.js} +54 -51
- package/chunks/{cron-create-YIID5XAW.js → cron-create-HPXYE6C5.js} +6 -6
- package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-FPVNTKPK.js} +5 -5
- package/chunks/{cron-list-XEGS463Q.js → cron-list-ZEI6PAAV.js} +6 -6
- package/chunks/{daemon-VOMQW7KZ.js → daemon-PCNCI5YU.js} +239 -18
- package/chunks/daemon-status-provider-XD23SNAM.js +94 -0
- package/chunks/daemon-trust-policy-NOHK7IW5.js +89 -0
- package/chunks/daemon-trust-policy-monitor-ZBTSR333.js +176 -0
- package/chunks/{de-HGRCYDEJ.js → de-A6TI4LBB.js} +52 -6
- package/chunks/deferred-core-runtime-JJBHKM2C.js +93 -0
- package/chunks/{dist-RTJFMNEZ.js → dist-4LAMY2SK.js} +1449 -14
- package/chunks/{dist-NNVBBOGU.js → dist-4T4NCJFL.js} +2 -2
- package/chunks/dist-7KOL6OMD.js +13467 -0
- package/chunks/{dist-BRB6EXK4.js → dist-BH76AT7N.js} +3 -3
- package/chunks/dist-BXA3JXVQ.js +4749 -0
- package/chunks/{dist-KTYYJ2C5.js → dist-OEEFI6UU.js} +12 -9
- package/chunks/{dist-K6Y4E7FX.js → dist-SMLVOWKV.js} +5 -4
- package/chunks/{dist-ANLAT3GS.js → dist-V2RK6S6Q.js} +2 -1
- package/chunks/earlyInputCapture-KLAZDAIP.js +86 -0
- package/chunks/{edit-RIEOJWKB.js → edit-YQZWCISX.js} +53 -50
- package/chunks/{en-MTWBNGDO.js → en-RESOFG55.js} +55 -6
- package/chunks/{enter-worktree-OGK5FQ3R.js → enter-worktree-WLVWI3FP.js} +53 -50
- package/chunks/{enterPlanMode-IWZYALIB.js → enterPlanMode-6RYXFQUD.js} +53 -50
- package/chunks/environment-DXJTXSVT.js +106 -0
- package/chunks/errors-XGAGG2S2.js +92 -0
- package/chunks/esm-K5FARBNI.js +5548 -0
- package/chunks/{exit-worktree-4TEYVIVP.js → exit-worktree-C4276VPP.js} +53 -50
- package/chunks/exitPlanMode-MM5HIRUF.js +77 -0
- package/chunks/{fast-path-HYE7IFEV.js → fast-path-PIXYOHCH.js} +17 -3
- package/chunks/{fr-45RLL55O.js → fr-QF7RI5ZE.js} +52 -6
- package/chunks/{gemini-NGRQX3YJ.js → gemini-43RLVUNP.js} +171 -109
- package/chunks/{geminiContentGenerator-FQHPFZSR.js → geminiContentGenerator-PNQ4TSID.js} +7 -7
- package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
- package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
- package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
- package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
- package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
- package/chunks/{glob-FRTM3X2E.js → glob-ZMBQKAU5.js} +53 -50
- package/chunks/goal-tools-Y767F7LZ.js +335 -0
- package/chunks/{grep-RKWVROCW.js → grep-HSV37W2Q.js} +55 -51
- package/chunks/handleAutoUpdate-QDHZPBAY.js +85 -0
- package/chunks/i18n-ME22A6RN.js +101 -0
- package/chunks/{image-gen-WIEM7KZA.js → image-gen-IFC7ZWSB.js} +12 -12
- package/chunks/initializer-J7H2CHVB.js +90 -0
- package/chunks/installationInfo-R7FXPQN5.js +84 -0
- package/chunks/{ja-B7DF7DFG.js → ja-URQESVGW.js} +52 -6
- package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-7BT4TQ2A.js} +3 -3
- package/chunks/{kittyProtocolDetector-MBRTDRBK.js → kittyProtocolDetector-BFLAKYXH.js} +1 -1
- package/chunks/lib-RUF3WZA6.js +9 -0
- package/chunks/list-OYDIBA4N.js +93 -0
- package/chunks/{list-agents-5KJJHR6I.js → list-agents-GATIBBQQ.js} +3 -3
- package/chunks/loadedSettingsAdapter-OK6GK2GE.js +87 -0
- package/chunks/{loggingContentGenerator-WGM27QAW.js → loggingContentGenerator-U4ZEG4GL.js} +66 -50
- package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-3DZMQQQQ.js} +15 -8
- package/chunks/{ls-NTK6VOQJ.js → ls-7F4GHXIH.js} +5 -5
- package/chunks/{lsp-2JI24STP.js → lsp-6FEHVBWI.js} +3 -3
- package/chunks/{managed-npm-update-JQ2CG3RH.js → managed-npm-update-PGKAJLLO.js} +52 -49
- package/chunks/mcp-S4DXJD2G.js +87 -0
- package/chunks/{monitor-7FEWXX5F.js → monitor-E5ZFMT74.js} +53 -50
- package/chunks/nonInteractiveCli-HNOHKEPE.js +149 -0
- package/chunks/{notebook-edit-JGJV2K6J.js → notebook-edit-6QDN6VZJ.js} +53 -50
- package/chunks/{openaiContentGenerator-JPVXDTAO.js → openaiContentGenerator-3NLB2C5O.js} +25 -27
- package/chunks/pidfile-ZMOIUGG6.js +90 -0
- package/chunks/process-registry-2CHQBXH5.js +157 -0
- package/chunks/{processUtils-V2LCK6T6.js → processUtils-E4QGQVWW.js} +2 -2
- package/chunks/{pt-22Q3FP73.js → pt-EEEQXRUI.js} +52 -6
- package/chunks/{qwenContentGenerator-TICV2W2Z.js → qwenContentGenerator-2LFRWJTM.js} +57 -54
- package/chunks/{qwenOAuth2-XGFI5XJG.js → qwenOAuth2-N32BUQDC.js} +10 -10
- package/chunks/read-file-GLDCWZBG.js +29 -0
- package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-AFS3UKZO.js} +4 -4
- package/chunks/record-artifact-ECZSCEG5.js +21 -0
- package/chunks/resumeHistoryUtils-F5BE5QDW.js +95 -0
- package/chunks/ripGrep-T23Y4AGY.js +77 -0
- package/chunks/{ru-FZCNZHDC.js → ru-WGZDYQAB.js} +52 -6
- package/chunks/{run-qwen-serve-3VCV4I7E.js → run-qwen-serve-TI2HGLLU.js} +1155 -272
- package/chunks/runtime-WCWM3DO7.js +125 -0
- package/chunks/{scheduler-RS2I6RU5.js → scheduler-2QZO5AV5.js} +51 -48
- package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
- package/chunks/{sdk-exporters-http-FS6ZV7MF.js → sdk-exporters-http-IKNWQJNV.js} +7 -7
- package/chunks/{sdk-impl-7FZSCSXB.js → sdk-impl-7CUUMQDB.js} +10 -10
- package/chunks/{send-message-Q6OOR6BR.js → send-message-X7G2JSII.js} +8 -13
- package/chunks/serve-DZOMYUFU.js +93 -0
- package/chunks/{server-HRZ23U7M.js → server-N4AJRKIQ.js} +5299 -1584
- package/chunks/{session-7XHZKTVV.js → session-GS6AKMN7.js} +167 -102
- package/chunks/{settings-7ZGZDXAS.js → settings-CUN3SELH.js} +56 -53
- package/chunks/shell-NGBFVXC5.js +87 -0
- package/chunks/{skill-LIWXNLDW.js → skill-SC2BSO75.js} +35 -23
- package/chunks/skill-settings-XVPCPW5K.js +95 -0
- package/chunks/spawnChannel-RILO4YY3.js +86 -0
- package/chunks/standalone-update-TMLT6LVJ.js +96 -0
- package/chunks/{startInteractiveUI-IW3CSKHA.js → startInteractiveUI-J45WOEOU.js} +1343 -1230
- package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-FHRY3BPQ.js} +4 -4
- package/chunks/task-create-LAQXBIHC.js +26 -0
- package/chunks/{task-list-FOPULZEP.js → task-list-V6K5DRDH.js} +8 -8
- package/chunks/{task-stop-H6RHXFVQ.js → task-stop-LQXE52L6.js} +3 -3
- package/chunks/{task-update-M57TFZJT.js → task-update-NXRCXSPB.js} +13 -12
- package/chunks/{team-create-O2FROQ4R.js → team-create-W3EVWCTA.js} +55 -52
- package/chunks/{team-delete-QE2UXJL7.js → team-delete-Z4KGO7RC.js} +8 -8
- package/chunks/{team-plan-approval-Q6WDBXTQ.js → team-plan-approval-URYVKJF4.js} +53 -50
- package/chunks/theme-manager-CUAMS2NI.js +81 -0
- package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-OFIZDI7P.js} +34 -6
- package/chunks/{tool-search-APECNQ3Z.js → tool-search-DCICFL32.js} +21 -22
- package/chunks/total-session-admission-3ZTAXVUK.js +89 -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-EVCN36O5.js +99 -0
- package/chunks/{update-relaunch-ON5MDJQG.js → update-relaunch-XLW46RHQ.js} +5 -5
- package/chunks/updateCheck-ZHVXDAIH.js +96 -0
- package/chunks/useAutoAcceptIndicator-ZGD6BJSP.js +97 -0
- package/chunks/{validateNonInterActiveAuth-JBLKBKRD.js → validateNonInterActiveAuth-R3BAQFDY.js} +102 -97
- package/chunks/{version-LTNUBQJY.js → version-PMWREGCG.js} +1 -1
- package/chunks/{web-fetch-L5UTI53V.js → web-fetch-PGN27SGF.js} +19 -21
- package/chunks/{web-search-KM33JOS3.js → web-search-KW4UNMRE.js} +13 -13
- package/chunks/{workflow-K7FAWV77.js → workflow-SN3TJBTJ.js} +374 -323
- package/chunks/workspace-providers-status-O3HUZGGR.js +90 -0
- package/chunks/{workspace-registration-store-6TGVDJV5.js → workspace-registration-store-M3FJ74RS.js} +2 -2
- package/chunks/workspace-registry-U7ISW23N.js +97 -0
- package/chunks/workspace-service-VH6IWADT.js +104 -0
- package/chunks/workspace-skills-status-XANARSZS.js +90 -0
- package/chunks/workspace-trust-reconciler-35EFR4GC.js +350 -0
- package/chunks/write-file-NCRSGUDT.js +79 -0
- package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
- package/chunks/{zh-LUIGBD55.js → zh-OHX23Q44.js} +52 -6
- package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-4G7YKDAQ.js} +52 -6
- package/chunks/zoom-image-X7CIADYC.js +224 -0
- package/cli.js +55 -48
- package/locales/ca.js +67 -6
- package/locales/de.js +69 -6
- package/locales/en.js +69 -6
- package/locales/fr.js +71 -6
- package/locales/ja.js +68 -6
- package/locales/pt.js +67 -6
- package/locales/ru.js +70 -6
- package/locales/zh-TW.js +62 -6
- package/locales/zh.js +62 -6
- package/package.json +5 -4
- package/web-shell/assets/{arc-BbHijhiN.js → arc-CaMTqKio.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-Cb4B_JD0.js → architectureDiagram-3BPJPVTR-Bjxztij2.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-Dsjlh3H-.js → blockDiagram-GPEHLZMM-BYJzeHi9.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Cp5AeR4U.js → c4Diagram-AAUBKEIU-fYAa-Eil.js} +1 -1
- package/web-shell/assets/channel-LEZei0-5.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CLcY7W2e.js → chunk-2J33WTMH-B1OTlTml.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BUhvY2LR.js → chunk-4BX2VUAB-DNj4uy6k.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-kDIFC_71.js → chunk-55IACEB6-DAqNmg3c.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CIBO15f2.js → chunk-727SXJPM-BwB4ddxE.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BJ_T_slV.js → chunk-AQP2D5EJ-DmHR_UZs.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BEkW35J8.js → chunk-FMBD7UC4-BlfOXumo.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-GGPxofay.js → chunk-ND2GUHAM-BKogiSy7.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-Bifllrb6.js → chunk-QZHKN3VN-DEclVrOF.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BiaRhfvf.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BiaRhfvf.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-C-Add_Dp.js → cose-bilkent-S5V4N54A-CwtS21WT.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-B7MfwNq2.js → dagre-BM42HDAG-BAAIlB4p.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CY_0zuDz.js → diagram-2AECGRRQ-ChljtF_V.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-VyYSbCgA.js → diagram-5GNKFQAL-BIXVd31-.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CBiIZ2PL.js → diagram-KO2AKTUF-BEiBaS15.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BL3CrVOx.js → diagram-LMA3HP47-C-g4tWKM.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CZUPx96P.js → diagram-OG6HWLK6-CNCCbNQG.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-B81xHr1-.js → erDiagram-TEJ5UH35-v8ysnsdI.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-EZWhir-J.js → flowDiagram-I6XJVG4X-LKVlLjwA.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CVFSuIAg.js → ganttDiagram-6RSMTGT7-DA5MrKYG.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-C1H2uQDv.js → gitGraphDiagram-PVQCEYII-Cyg5fe6d.js} +1 -1
- package/web-shell/assets/index-BgOcEaVt.js +1756 -0
- package/web-shell/assets/index-C2GE3DAF.js +74 -0
- package/web-shell/assets/{index-BYo99NBH.js → index-CKdUkVVS.js} +1 -1
- package/web-shell/assets/index-DA5Lvscv.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-BwyFMlF8.js → infoDiagram-5YYISTIA-SLsfu3Qd.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CQ7Yhn2Y.js → ishikawaDiagram-YF4QCWOH-CmHOmTNx.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CJn2sf0l.js → journeyDiagram-JHISSGLW-C3gM_HFQ.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DaNRqwVN.js → kanban-definition-UN3LZRKU-BbHD7duM.js} +1 -1
- package/web-shell/assets/{linear-DCKODZe2.js → linear-CSBvm435.js} +1 -1
- package/web-shell/assets/{mermaid.core-CTGJOk27.js → mermaid.core-CPMw15lU.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BKU3_3rg.js → mindmap-definition-RKZ34NQL-C_tNqXQW.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-COcwBJ82.js → pieDiagram-4H26LBE5-DH_N-8yY.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CQnQ443x.js → quadrantDiagram-W4KKPZXB-CRbS8UkN.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ2oj5cD.js → requirementDiagram-4Y6WPE33-DJgdZPZn.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BxAv5mNu.js → sankeyDiagram-5OEKKPKP-vhL1y5zx.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CztaySPs.js → sequenceDiagram-3UESZ5HK-UQthhFwd.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CTQT1oGD.js → stateDiagram-AJRCARHV-CAywEm20.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-lfJQHw-7.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-K9Mkex5A.js → timeline-definition-PNZ67QCA-CLO8b3FD.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-B2rVIw76.js → vennDiagram-CIIHVFJN-BNAAh0Mu.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-Z1w2JR4M.js → wardley-L42UT6IY-CUY7bLpN.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CIX9aKXf.js → wardleyDiagram-YWT4CUSO-CSg_ORdW.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-CI9DLIKB.js → xychartDiagram-2RQKCTM6-BjffV208.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-INHRH72H.js +0 -86
- package/chunks/agent-VXDAN5JK.js +0 -82
- package/chunks/agent-headless-K4ZMMNBD.js +0 -76
- package/chunks/bridge-LGPZCFHO.js +0 -91
- package/chunks/channel-settings-store-CHCDRTPY.js +0 -89
- package/chunks/chunk-HGT6JR3U.js +0 -177
- package/chunks/chunk-JZA3JUDJ.js +0 -82
- package/chunks/chunk-SZRN75WQ.js +0 -29
- package/chunks/chunk-UGYMA4EI.js +0 -219
- package/chunks/chunk-VCBZUOSI.js +0 -8575
- package/chunks/contextCommand-QIZYHDR5.js +0 -81
- package/chunks/daemon-status-provider-OS5UWBHV.js +0 -90
- package/chunks/earlyInputCapture-WQT24RWD.js +0 -83
- package/chunks/environment-VZ7BRI4Q.js +0 -103
- package/chunks/errors-PCX25DVP.js +0 -89
- package/chunks/exitPlanMode-GHPUHBZJ.js +0 -423
- package/chunks/handleAutoUpdate-2CZQRJ66.js +0 -82
- package/chunks/i18n-XEQVMRKN.js +0 -98
- package/chunks/initializer-OVGZ4FLY.js +0 -87
- package/chunks/installationInfo-5UUQJI6Y.js +0 -81
- package/chunks/list-HODU6RXD.js +0 -90
- package/chunks/loadedSettingsAdapter-TYNLBALY.js +0 -84
- package/chunks/mcp-J3DFWX4A.js +0 -84
- package/chunks/nonInteractiveCli-F4GYSMHT.js +0 -144
- package/chunks/pidfile-4VNAR3EP.js +0 -87
- package/chunks/read-file-LZXUR4TO.js +0 -31
- package/chunks/resumeHistoryUtils-65OX3SGJ.js +0 -92
- package/chunks/ripGrep-2U2FRGMV.js +0 -74
- package/chunks/runtime-AXJWIEDU.js +0 -120
- package/chunks/serve-W2GC47CM.js +0 -90
- package/chunks/shell-45IPBDP5.js +0 -84
- package/chunks/spawnChannel-PVXQ5AGV.js +0 -83
- package/chunks/src-AY65BYR7.js +0 -3166
- package/chunks/standalone-update-ZMFNKAEY.js +0 -93
- package/chunks/task-create-N7WQSGYA.js +0 -25
- package/chunks/theme-manager-YYPZFBAH.js +0 -78
- package/chunks/total-session-admission-JXES723M.js +0 -85
- package/chunks/trustedFolders-HVI7IXUH.js +0 -94
- package/chunks/updateCheck-WUJGHWZZ.js +0 -93
- package/chunks/useAutoAcceptIndicator-CHSTZLZD.js +0 -94
- package/chunks/workspace-providers-status-GAKSF4LL.js +0 -87
- package/chunks/workspace-registry-A7NQUONG.js +0 -89
- package/chunks/workspace-service-STGVSO4N.js +0 -99
- package/chunks/workspace-skills-status-66AK3DUA.js +0 -86
- package/chunks/write-file-HUUCEG4P.js +0 -74
- package/web-shell/assets/channel-Bzdx6E8P.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Cd6wbiuK.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cd6wbiuK.js +0 -1
- package/web-shell/assets/index-B2bXx96W.js +0 -1249
- package/web-shell/assets/index-_8mKjx8q.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BjMdT6E_.js +0 -1
- package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
- package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
- /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
|
@@ -11,92 +11,95 @@ import {
|
|
|
11
11
|
toModelVisibleSubagentResult,
|
|
12
12
|
writeWorkflowSnapshot,
|
|
13
13
|
writeWorktreeSessionMarker
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NGWYUZZO.js";
|
|
15
|
+
import "./chunk-GOFAQQZA.js";
|
|
15
16
|
import "./chunk-5M6IDOMF.js";
|
|
16
17
|
import "./chunk-TWPJO254.js";
|
|
17
18
|
import "./chunk-H6XPXXMH.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-FNQ6T3CV.js";
|
|
23
|
-
import "./chunk-ZOIFNCKL.js";
|
|
24
|
-
import "./chunk-PWTZEM3C.js";
|
|
25
|
-
import "./chunk-KRXPRVGL.js";
|
|
19
|
+
import "./chunk-CWEIMFFW.js";
|
|
20
|
+
import "./chunk-I7JDGNG6.js";
|
|
21
|
+
import "./chunk-A6SX5TAH.js";
|
|
22
|
+
import "./chunk-33FNCQSY.js";
|
|
26
23
|
import {
|
|
27
24
|
parsePositiveIntegerEnv
|
|
28
25
|
} from "./chunk-6PVPNMXU.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-PXA5AWHY.js";
|
|
27
|
+
import "./chunk-IRH27ZC2.js";
|
|
28
|
+
import "./chunk-QHWCP53L.js";
|
|
29
|
+
import "./chunk-MOHAWIAW.js";
|
|
30
|
+
import "./chunk-MYT7N6QH.js";
|
|
31
|
+
import "./chunk-O6GEWCJA.js";
|
|
32
|
+
import "./chunk-T26EAKDL.js";
|
|
32
33
|
import "./chunk-CPBF7KYF.js";
|
|
34
|
+
import "./chunk-MISUEWB4.js";
|
|
35
|
+
import "./chunk-KRXPRVGL.js";
|
|
36
|
+
import "./chunk-A5YZ3FA2.js";
|
|
37
|
+
import "./chunk-YAVY33G4.js";
|
|
38
|
+
import "./chunk-2UISUFHQ.js";
|
|
39
|
+
import "./chunk-6FMJLI5M.js";
|
|
33
40
|
import {
|
|
34
41
|
SUBAGENT_PLAN_LIFECYCLE_TOOLS,
|
|
35
42
|
runWithAgentContext
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-JCW2R7WC.js";
|
|
43
|
+
} from "./chunk-PGEGUNH5.js";
|
|
44
|
+
import "./chunk-S6LOFUVP.js";
|
|
45
|
+
import "./chunk-K623ENWT.js";
|
|
46
|
+
import "./chunk-AQ37AY7B.js";
|
|
41
47
|
import {
|
|
42
48
|
WorkspaceContext
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-FODK6UMO.js";
|
|
49
|
+
} from "./chunk-432XCUHF.js";
|
|
50
|
+
import "./chunk-ZPJWUGCS.js";
|
|
51
|
+
import "./chunk-XC656O42.js";
|
|
52
|
+
import "./chunk-NAVJD2PQ.js";
|
|
53
|
+
import "./chunk-QYPT3QUD.js";
|
|
54
|
+
import "./chunk-QMBEW7EW.js";
|
|
55
|
+
import "./chunk-DGEIYUC3.js";
|
|
56
|
+
import "./chunk-MPHPFVKK.js";
|
|
52
57
|
import "./chunk-GLNBDYUX.js";
|
|
53
58
|
import {
|
|
54
59
|
createChildAbortController
|
|
55
60
|
} from "./chunk-DJ2GSRLV.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-XCLLRKY5.js";
|
|
62
|
+
import "./chunk-RPYYTL7E.js";
|
|
63
|
+
import "./chunk-2J3OJGTL.js";
|
|
59
64
|
import "./chunk-P3QQPMQA.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-6O5DVH27.js";
|
|
66
|
+
import "./chunk-GLCZKT5V.js";
|
|
67
|
+
import "./chunk-2DNKEBXY.js";
|
|
63
68
|
import {
|
|
64
69
|
WorkflowRunEvent,
|
|
65
70
|
logWorkflowRun,
|
|
66
71
|
read,
|
|
67
72
|
writeLine
|
|
68
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-M2F5PLOW.js";
|
|
69
74
|
import "./chunk-VGC4I5JJ.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-U7TXFVUN.js";
|
|
72
|
-
import "./chunk-46UV252V.js";
|
|
73
|
-
import "./chunk-A4UCTEB5.js";
|
|
74
|
-
import "./chunk-XWRJCPHC.js";
|
|
75
|
-
import "./chunk-UW5EOVUN.js";
|
|
76
|
-
import "./chunk-2JZBVYTU.js";
|
|
77
|
-
import "./chunk-5I2IWRSH.js";
|
|
78
|
-
import "./chunk-A5L3JMUA.js";
|
|
79
|
-
import "./chunk-SRZ6DXVG.js";
|
|
80
|
-
import "./chunk-W4RQUHY3.js";
|
|
81
|
-
import "./chunk-INADJJGW.js";
|
|
82
|
-
import "./chunk-U7ZFW55U.js";
|
|
75
|
+
import "./chunk-E4WHKETF.js";
|
|
83
76
|
import {
|
|
84
77
|
SyntheticOutputTool
|
|
85
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-BV4QX43X.js";
|
|
86
79
|
import {
|
|
87
80
|
BaseDeclarativeTool,
|
|
88
81
|
BaseToolInvocation,
|
|
89
82
|
ToolDisplayNames,
|
|
90
83
|
ToolNames
|
|
91
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-I5GNT6ZS.js";
|
|
85
|
+
import "./chunk-TFFMATHX.js";
|
|
86
|
+
import "./chunk-46UV252V.js";
|
|
87
|
+
import "./chunk-ZBVS26BY.js";
|
|
88
|
+
import "./chunk-BFHXDAR7.js";
|
|
89
|
+
import "./chunk-TYERNYH4.js";
|
|
90
|
+
import "./chunk-UH7Z7Y45.js";
|
|
91
|
+
import "./chunk-O2ZYHG33.js";
|
|
92
|
+
import "./chunk-W4RQUHY3.js";
|
|
93
|
+
import "./chunk-G7XXKQYS.js";
|
|
92
94
|
import {
|
|
93
95
|
createDebugLogger
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-3RXUYQJI.js";
|
|
97
|
+
import "./chunk-VOQXFAY5.js";
|
|
95
98
|
import "./chunk-75DOP5OR.js";
|
|
96
99
|
import "./chunk-DMTGGOSA.js";
|
|
97
100
|
import "./chunk-YQ3U5MUC.js";
|
|
98
101
|
import "./chunk-AMDSOFFV.js";
|
|
99
|
-
import "./chunk-
|
|
102
|
+
import "./chunk-QUGAUQGJ.js";
|
|
100
103
|
import {
|
|
101
104
|
init_esbuild_shims
|
|
102
105
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -107,6 +110,95 @@ import {
|
|
|
107
110
|
// packages/core/src/tools/workflow/workflow.ts
|
|
108
111
|
init_esbuild_shims();
|
|
109
112
|
|
|
113
|
+
// packages/core/src/agents/runtime/workflow-budget.ts
|
|
114
|
+
init_esbuild_shims();
|
|
115
|
+
var debugLogger = createDebugLogger("WORKFLOW_BUDGET");
|
|
116
|
+
var MAX_TOKENS_PER_WORKFLOW_ENV = "QWEN_CODE_MAX_TOKENS_PER_WORKFLOW";
|
|
117
|
+
var HARD_MAX_TOKENS_CEILING = 1e8;
|
|
118
|
+
function resolveMaxTokensPerWorkflow(env = process.env) {
|
|
119
|
+
const raw = env[MAX_TOKENS_PER_WORKFLOW_ENV];
|
|
120
|
+
if (raw === void 0 || raw.trim() === "") {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
const parsed = parsePositiveIntegerEnv(raw, 0);
|
|
124
|
+
if (parsed < 1) {
|
|
125
|
+
debugLogger.warn(
|
|
126
|
+
`Invalid ${MAX_TOKENS_PER_WORKFLOW_ENV}=${JSON.stringify(raw)}, treating as unset (no cap)`
|
|
127
|
+
);
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
if (parsed > HARD_MAX_TOKENS_CEILING) {
|
|
131
|
+
debugLogger.warn(
|
|
132
|
+
`${MAX_TOKENS_PER_WORKFLOW_ENV}=${parsed} exceeds hard ceiling (${HARD_MAX_TOKENS_CEILING}); clamping.`
|
|
133
|
+
);
|
|
134
|
+
return HARD_MAX_TOKENS_CEILING;
|
|
135
|
+
}
|
|
136
|
+
return parsed;
|
|
137
|
+
}
|
|
138
|
+
__name(resolveMaxTokensPerWorkflow, "resolveMaxTokensPerWorkflow");
|
|
139
|
+
var WorkflowBudgetImpl = class _WorkflowBudgetImpl {
|
|
140
|
+
static {
|
|
141
|
+
__name(this, "WorkflowBudgetImpl");
|
|
142
|
+
}
|
|
143
|
+
total;
|
|
144
|
+
_spent;
|
|
145
|
+
constructor(total) {
|
|
146
|
+
this.total = total;
|
|
147
|
+
this._spent = 0;
|
|
148
|
+
}
|
|
149
|
+
spent() {
|
|
150
|
+
return this._spent;
|
|
151
|
+
}
|
|
152
|
+
remaining() {
|
|
153
|
+
if (this.total === null) return Infinity;
|
|
154
|
+
return Math.max(0, this.total - this._spent);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Host-side increment. NOT exposed to the script — the
|
|
158
|
+
* `WorkflowBudget` interface deliberately omits any setter so a
|
|
159
|
+
* malicious workflow cannot inflate / deflate the budget. Only the
|
|
160
|
+
* orchestrator (in `countedDispatch`) calls this after a dispatch
|
|
161
|
+
* resolves with the agent's output token count.
|
|
162
|
+
*
|
|
163
|
+
* Non-positive deltas are silently dropped (some dispatches return
|
|
164
|
+
* `output_tokens: 0` on early failures); negative deltas would be a
|
|
165
|
+
* caller bug and are also dropped rather than silently rewinding
|
|
166
|
+
* the counter.
|
|
167
|
+
*/
|
|
168
|
+
recordSpent(deltaTokens) {
|
|
169
|
+
if (!Number.isFinite(deltaTokens) || deltaTokens <= 0) return;
|
|
170
|
+
this._spent += deltaTokens;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Factory: build a budget from the current environment. Convenience
|
|
174
|
+
* over `new WorkflowBudgetImpl(resolveMaxTokensPerWorkflow(env))`.
|
|
175
|
+
*/
|
|
176
|
+
static fromEnv(env = process.env) {
|
|
177
|
+
return new _WorkflowBudgetImpl(resolveMaxTokensPerWorkflow(env));
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
var WorkflowBudgetExceededError = class extends Error {
|
|
181
|
+
static {
|
|
182
|
+
__name(this, "WorkflowBudgetExceededError");
|
|
183
|
+
}
|
|
184
|
+
name = "WorkflowBudgetExceededError";
|
|
185
|
+
runId;
|
|
186
|
+
budgetTotal;
|
|
187
|
+
spent;
|
|
188
|
+
constructor(runId, budgetTotal, spent) {
|
|
189
|
+
super(
|
|
190
|
+
`Workflow ${runId} exceeded the token budget (${spent} / ${budgetTotal} output tokens spent).`
|
|
191
|
+
);
|
|
192
|
+
this.runId = runId;
|
|
193
|
+
this.budgetTotal = budgetTotal;
|
|
194
|
+
this.spent = spent;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// packages/core/src/agents/runtime/workflow-runner.ts
|
|
199
|
+
init_esbuild_shims();
|
|
200
|
+
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
201
|
+
|
|
110
202
|
// packages/core/src/agents/runtime/workflow-orchestrator.ts
|
|
111
203
|
init_esbuild_shims();
|
|
112
204
|
import { randomBytes } from "node:crypto";
|
|
@@ -292,7 +384,7 @@ function isRegexContext(source, i) {
|
|
|
292
384
|
return /[{[(,;:=!&|?+\-*/%^~<>]/.test(prev);
|
|
293
385
|
}
|
|
294
386
|
__name(isRegexContext, "isRegexContext");
|
|
295
|
-
var
|
|
387
|
+
var debugLogger2 = createDebugLogger("WORKFLOW");
|
|
296
388
|
var MAX_LOG_LINES = 1e4;
|
|
297
389
|
var MAX_PHASE_ENTRIES = 1e4;
|
|
298
390
|
var ARGS_MAX_DEPTH = 64;
|
|
@@ -351,7 +443,7 @@ function createWorkflowSandbox(opts) {
|
|
|
351
443
|
try {
|
|
352
444
|
opts.emitter?.logAppended?.(line);
|
|
353
445
|
} catch (e) {
|
|
354
|
-
|
|
446
|
+
debugLogger2.warn("emitter.logAppended threw:", e);
|
|
355
447
|
}
|
|
356
448
|
} else if (logs.length === MAX_LOG_LINES) {
|
|
357
449
|
logs.push(`[workflow log truncated at ${MAX_LOG_LINES} lines]`);
|
|
@@ -365,7 +457,7 @@ function createWorkflowSandbox(opts) {
|
|
|
365
457
|
try {
|
|
366
458
|
opts.emitter?.phaseStarted?.(t);
|
|
367
459
|
} catch (e) {
|
|
368
|
-
|
|
460
|
+
debugLogger2.warn("emitter.phaseStarted threw:", e);
|
|
369
461
|
}
|
|
370
462
|
} else if (phases.length === MAX_PHASE_ENTRIES) {
|
|
371
463
|
phases.push(
|
|
@@ -388,7 +480,7 @@ function createWorkflowSandbox(opts) {
|
|
|
388
480
|
// value" (this warn). Receives only primitive strings/numbers — the bridge
|
|
389
481
|
// contract forbids host objects crossing back to the script.
|
|
390
482
|
logRevivalFailure: /* @__PURE__ */ __name((idx, reason) => {
|
|
391
|
-
|
|
483
|
+
debugLogger2.warn(
|
|
392
484
|
`Workflow result revival failed at index ${idx}: ${reason}; slot set to null (non-JSON-serializable thunk return).`
|
|
393
485
|
);
|
|
394
486
|
}, "logRevivalFailure"),
|
|
@@ -817,91 +909,6 @@ ${stripped}
|
|
|
817
909
|
}
|
|
818
910
|
__name(createWorkflowSandbox, "createWorkflowSandbox");
|
|
819
911
|
|
|
820
|
-
// packages/core/src/agents/runtime/workflow-budget.ts
|
|
821
|
-
init_esbuild_shims();
|
|
822
|
-
var debugLogger2 = createDebugLogger("WORKFLOW_BUDGET");
|
|
823
|
-
var MAX_TOKENS_PER_WORKFLOW_ENV = "QWEN_CODE_MAX_TOKENS_PER_WORKFLOW";
|
|
824
|
-
var HARD_MAX_TOKENS_CEILING = 1e8;
|
|
825
|
-
function resolveMaxTokensPerWorkflow(env = process.env) {
|
|
826
|
-
const raw = env[MAX_TOKENS_PER_WORKFLOW_ENV];
|
|
827
|
-
if (raw === void 0 || raw.trim() === "") {
|
|
828
|
-
return null;
|
|
829
|
-
}
|
|
830
|
-
const parsed = parsePositiveIntegerEnv(raw, 0);
|
|
831
|
-
if (parsed < 1) {
|
|
832
|
-
debugLogger2.warn(
|
|
833
|
-
`Invalid ${MAX_TOKENS_PER_WORKFLOW_ENV}=${JSON.stringify(raw)}, treating as unset (no cap)`
|
|
834
|
-
);
|
|
835
|
-
return null;
|
|
836
|
-
}
|
|
837
|
-
if (parsed > HARD_MAX_TOKENS_CEILING) {
|
|
838
|
-
debugLogger2.warn(
|
|
839
|
-
`${MAX_TOKENS_PER_WORKFLOW_ENV}=${parsed} exceeds hard ceiling (${HARD_MAX_TOKENS_CEILING}); clamping.`
|
|
840
|
-
);
|
|
841
|
-
return HARD_MAX_TOKENS_CEILING;
|
|
842
|
-
}
|
|
843
|
-
return parsed;
|
|
844
|
-
}
|
|
845
|
-
__name(resolveMaxTokensPerWorkflow, "resolveMaxTokensPerWorkflow");
|
|
846
|
-
var WorkflowBudgetImpl = class _WorkflowBudgetImpl {
|
|
847
|
-
static {
|
|
848
|
-
__name(this, "WorkflowBudgetImpl");
|
|
849
|
-
}
|
|
850
|
-
total;
|
|
851
|
-
_spent;
|
|
852
|
-
constructor(total) {
|
|
853
|
-
this.total = total;
|
|
854
|
-
this._spent = 0;
|
|
855
|
-
}
|
|
856
|
-
spent() {
|
|
857
|
-
return this._spent;
|
|
858
|
-
}
|
|
859
|
-
remaining() {
|
|
860
|
-
if (this.total === null) return Infinity;
|
|
861
|
-
return Math.max(0, this.total - this._spent);
|
|
862
|
-
}
|
|
863
|
-
/**
|
|
864
|
-
* Host-side increment. NOT exposed to the script — the
|
|
865
|
-
* `WorkflowBudget` interface deliberately omits any setter so a
|
|
866
|
-
* malicious workflow cannot inflate / deflate the budget. Only the
|
|
867
|
-
* orchestrator (in `countedDispatch`) calls this after a dispatch
|
|
868
|
-
* resolves with the agent's output token count.
|
|
869
|
-
*
|
|
870
|
-
* Non-positive deltas are silently dropped (some dispatches return
|
|
871
|
-
* `output_tokens: 0` on early failures); negative deltas would be a
|
|
872
|
-
* caller bug and are also dropped rather than silently rewinding
|
|
873
|
-
* the counter.
|
|
874
|
-
*/
|
|
875
|
-
recordSpent(deltaTokens) {
|
|
876
|
-
if (!Number.isFinite(deltaTokens) || deltaTokens <= 0) return;
|
|
877
|
-
this._spent += deltaTokens;
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* Factory: build a budget from the current environment. Convenience
|
|
881
|
-
* over `new WorkflowBudgetImpl(resolveMaxTokensPerWorkflow(env))`.
|
|
882
|
-
*/
|
|
883
|
-
static fromEnv(env = process.env) {
|
|
884
|
-
return new _WorkflowBudgetImpl(resolveMaxTokensPerWorkflow(env));
|
|
885
|
-
}
|
|
886
|
-
};
|
|
887
|
-
var WorkflowBudgetExceededError = class extends Error {
|
|
888
|
-
static {
|
|
889
|
-
__name(this, "WorkflowBudgetExceededError");
|
|
890
|
-
}
|
|
891
|
-
name = "WorkflowBudgetExceededError";
|
|
892
|
-
runId;
|
|
893
|
-
budgetTotal;
|
|
894
|
-
spent;
|
|
895
|
-
constructor(runId, budgetTotal, spent) {
|
|
896
|
-
super(
|
|
897
|
-
`Workflow ${runId} exceeded the token budget (${spent} / ${budgetTotal} output tokens spent).`
|
|
898
|
-
);
|
|
899
|
-
this.runId = runId;
|
|
900
|
-
this.budgetTotal = budgetTotal;
|
|
901
|
-
this.spent = spent;
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
|
|
905
912
|
// packages/core/src/agents/runtime/workflow-stall.ts
|
|
906
913
|
init_esbuild_shims();
|
|
907
914
|
var DEFAULT_STALL_MS = 6e4;
|
|
@@ -1197,13 +1204,13 @@ function resolveMaxAgentsPerRun(env = process.env) {
|
|
|
1197
1204
|
}
|
|
1198
1205
|
const parsed = parsePositiveIntegerEnv(raw, 0);
|
|
1199
1206
|
if (parsed < 1) {
|
|
1200
|
-
|
|
1207
|
+
debugLogger2.warn(
|
|
1201
1208
|
`Invalid ${MAX_WORKFLOW_AGENTS_ENV}=${JSON.stringify(raw)}, using default (${DEFAULT_MAX_AGENTS_PER_RUN})`
|
|
1202
1209
|
);
|
|
1203
1210
|
return DEFAULT_MAX_AGENTS_PER_RUN;
|
|
1204
1211
|
}
|
|
1205
1212
|
if (parsed > HARD_MAX_AGENTS_PER_RUN_CEILING) {
|
|
1206
|
-
|
|
1213
|
+
debugLogger2.warn(
|
|
1207
1214
|
`${MAX_WORKFLOW_AGENTS_ENV}=${parsed} exceeds hard ceiling (${HARD_MAX_AGENTS_PER_RUN_CEILING}); clamping.`
|
|
1208
1215
|
);
|
|
1209
1216
|
return HARD_MAX_AGENTS_PER_RUN_CEILING;
|
|
@@ -1219,14 +1226,14 @@ function resolveConcurrencyLimit(env = process.env) {
|
|
|
1219
1226
|
const parsed = parsePositiveIntegerEnv(raw, 0);
|
|
1220
1227
|
if (parsed >= 1) {
|
|
1221
1228
|
if (parsed > HARD_MAX_CONCURRENCY_CEILING) {
|
|
1222
|
-
|
|
1229
|
+
debugLogger2.warn(
|
|
1223
1230
|
`${MAX_WORKFLOW_CONCURRENCY_ENV}=${parsed} exceeds hard ceiling (${HARD_MAX_CONCURRENCY_CEILING}); clamping.`
|
|
1224
1231
|
);
|
|
1225
1232
|
return HARD_MAX_CONCURRENCY_CEILING;
|
|
1226
1233
|
}
|
|
1227
1234
|
return parsed;
|
|
1228
1235
|
}
|
|
1229
|
-
|
|
1236
|
+
debugLogger2.warn(
|
|
1230
1237
|
`Invalid ${MAX_WORKFLOW_CONCURRENCY_ENV}=${JSON.stringify(raw)}, using cpu-derived default`
|
|
1231
1238
|
);
|
|
1232
1239
|
}
|
|
@@ -1236,6 +1243,7 @@ __name(resolveConcurrencyLimit, "resolveConcurrencyLimit");
|
|
|
1236
1243
|
var WORKFLOW_SUBAGENT_MAX_TURNS = 50;
|
|
1237
1244
|
var WORKFLOW_SUBAGENT_MAX_TIME_MINUTES = 10;
|
|
1238
1245
|
var WORKFLOW_SUBAGENT_DISALLOWED_TOOLS = [
|
|
1246
|
+
ToolNames.ASK_USER_QUESTION,
|
|
1239
1247
|
ToolNames.SEND_MESSAGE,
|
|
1240
1248
|
ToolNames.MONITOR,
|
|
1241
1249
|
...SUBAGENT_PLAN_LIFECYCLE_TOOLS,
|
|
@@ -1267,20 +1275,27 @@ function sanitizeForErrorMessage(value) {
|
|
|
1267
1275
|
return stripAnsiAndControl(value);
|
|
1268
1276
|
}
|
|
1269
1277
|
__name(sanitizeForErrorMessage, "sanitizeForErrorMessage");
|
|
1270
|
-
function createProductionDispatch(config, signal, onTokens) {
|
|
1278
|
+
function createProductionDispatch(config, signal, onTokens, bridgeApprovalEvents) {
|
|
1271
1279
|
return async (prompt, opts) => {
|
|
1272
1280
|
const stallMs = resolveStallMs(
|
|
1273
1281
|
typeof opts.stallMs === "number" ? opts.stallMs : void 0
|
|
1274
1282
|
);
|
|
1275
1283
|
return runStallResilient(
|
|
1276
|
-
(attemptSignal, emitter) =>
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
+
async (attemptSignal, emitter) => {
|
|
1285
|
+
const cleanupApprovalBridge = bridgeApprovalEvents?.(emitter);
|
|
1286
|
+
try {
|
|
1287
|
+
return await runSingleDispatch(
|
|
1288
|
+
config,
|
|
1289
|
+
prompt,
|
|
1290
|
+
opts,
|
|
1291
|
+
attemptSignal,
|
|
1292
|
+
emitter,
|
|
1293
|
+
onTokens
|
|
1294
|
+
);
|
|
1295
|
+
} finally {
|
|
1296
|
+
cleanupApprovalBridge?.();
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1284
1299
|
{
|
|
1285
1300
|
stallMs,
|
|
1286
1301
|
signal,
|
|
@@ -1291,11 +1306,11 @@ function createProductionDispatch(config, signal, onTokens) {
|
|
|
1291
1306
|
}
|
|
1292
1307
|
__name(createProductionDispatch, "createProductionDispatch");
|
|
1293
1308
|
async function runSingleDispatch(config, prompt, opts, attemptSignal, emitter, onTokens) {
|
|
1294
|
-
const { AgentHeadless, ContextState } = await import("./agent-headless-
|
|
1309
|
+
const { AgentHeadless, ContextState } = await import("./agent-headless-AS7K2K57.js");
|
|
1295
1310
|
const ctx = new ContextState();
|
|
1296
1311
|
ctx.set("task_prompt", prompt);
|
|
1297
1312
|
const workflowAgentId = `workflow-agent-${randomBytes(8).toString("hex")}`;
|
|
1298
|
-
|
|
1313
|
+
debugLogger2.debug(`[workflow] Dispatch ${workflowAgentId}`);
|
|
1299
1314
|
if (opts.agentType === void 0 && opts.model === void 0 && opts.isolation === void 0 && opts.schema === void 0) {
|
|
1300
1315
|
const subagent = await AgentHeadless.create(
|
|
1301
1316
|
opts.label ?? "workflow-agent",
|
|
@@ -1353,7 +1368,7 @@ function reportTokens(subagent, opts, onTokens) {
|
|
|
1353
1368
|
const summary = subagent.getExecutionSummary();
|
|
1354
1369
|
onTokens(summary.outputTokens, opts);
|
|
1355
1370
|
} catch (e) {
|
|
1356
|
-
|
|
1371
|
+
debugLogger2.warn("onTokens callback threw:", e);
|
|
1357
1372
|
}
|
|
1358
1373
|
}
|
|
1359
1374
|
__name(reportTokens, "reportTokens");
|
|
@@ -1472,7 +1487,7 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
|
|
|
1472
1487
|
worktreeIsolation = null;
|
|
1473
1488
|
const preserved = await cleanupWorkflowWorktree(isolation);
|
|
1474
1489
|
if (preserved) {
|
|
1475
|
-
|
|
1490
|
+
debugLogger2.info(
|
|
1476
1491
|
`[Workflow] Schema-mode subagent preserved worktree at ${preserved.path ?? "(directory removed)"} on branch ${preserved.branch}. The structured payload is returned verbatim; recover the work from the preserved path / branch.`
|
|
1477
1492
|
);
|
|
1478
1493
|
}
|
|
@@ -1527,7 +1542,7 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
|
|
|
1527
1542
|
try {
|
|
1528
1543
|
await cleanupWorkflowWorktree(worktreeIsolation);
|
|
1529
1544
|
} catch (error) {
|
|
1530
|
-
|
|
1545
|
+
debugLogger2.warn(
|
|
1531
1546
|
`Workflow worktree cleanup in fallback finally failed for ${worktreeIsolation.path}: ${error instanceof Error ? error.message : String(error)}`
|
|
1532
1547
|
);
|
|
1533
1548
|
}
|
|
@@ -1560,7 +1575,7 @@ async function provisionWorkflowWorktree(config) {
|
|
|
1560
1575
|
try {
|
|
1561
1576
|
parentDirty = await wtService.hasWorktreeChanges(projectRoot);
|
|
1562
1577
|
} catch (error) {
|
|
1563
|
-
|
|
1578
|
+
debugLogger2.warn(
|
|
1564
1579
|
`[Workflow] hasWorktreeChanges failed at ${projectRoot}: ${error}`
|
|
1565
1580
|
);
|
|
1566
1581
|
parentDirty = true;
|
|
@@ -1575,7 +1590,7 @@ async function provisionWorkflowWorktree(config) {
|
|
|
1575
1590
|
try {
|
|
1576
1591
|
parentBranch = await wtService.getCurrentBranch();
|
|
1577
1592
|
} catch (error) {
|
|
1578
|
-
|
|
1593
|
+
debugLogger2.warn(
|
|
1579
1594
|
`[Workflow] getCurrentBranch failed at ${projectRoot}: ${error}`
|
|
1580
1595
|
);
|
|
1581
1596
|
}
|
|
@@ -1593,7 +1608,7 @@ async function provisionWorkflowWorktree(config) {
|
|
|
1593
1608
|
config.getSessionId()
|
|
1594
1609
|
);
|
|
1595
1610
|
} catch (error) {
|
|
1596
|
-
|
|
1611
|
+
debugLogger2.warn(
|
|
1597
1612
|
`[Workflow] failed to write session marker at ${created.worktree.path}: ${error}`
|
|
1598
1613
|
);
|
|
1599
1614
|
}
|
|
@@ -1626,20 +1641,20 @@ async function cleanupWorkflowWorktree(isolation) {
|
|
|
1626
1641
|
const wtService = new GitWorktreeService(isolation.repoRoot);
|
|
1627
1642
|
const [hasChanges, hasUnmerged] = await Promise.all([
|
|
1628
1643
|
wtService.hasWorktreeChanges(isolation.path).catch((error) => {
|
|
1629
|
-
|
|
1644
|
+
debugLogger2.warn(
|
|
1630
1645
|
`[Workflow] hasWorktreeChanges failed for ${isolation.path}: ${error}`
|
|
1631
1646
|
);
|
|
1632
1647
|
return true;
|
|
1633
1648
|
}),
|
|
1634
1649
|
wtService.hasUnmergedWorktreeCommits(isolation.slug).catch((error) => {
|
|
1635
|
-
|
|
1650
|
+
debugLogger2.warn(
|
|
1636
1651
|
`[Workflow] hasUnmergedWorktreeCommits failed for ${isolation.slug}: ${error}`
|
|
1637
1652
|
);
|
|
1638
1653
|
return true;
|
|
1639
1654
|
})
|
|
1640
1655
|
]);
|
|
1641
1656
|
if (hasChanges || hasUnmerged) {
|
|
1642
|
-
|
|
1657
|
+
debugLogger2.info(
|
|
1643
1658
|
`[Workflow] Preserving isolation worktree ${isolation.path} (branch ${isolation.branch}, hasChanges=${hasChanges}, hasUnmerged=${hasUnmerged})`
|
|
1644
1659
|
);
|
|
1645
1660
|
return { path: isolation.path, branch: isolation.branch };
|
|
@@ -1649,19 +1664,19 @@ async function cleanupWorkflowWorktree(isolation) {
|
|
|
1649
1664
|
deleteBranch: true
|
|
1650
1665
|
});
|
|
1651
1666
|
if (!result.success) {
|
|
1652
|
-
|
|
1667
|
+
debugLogger2.warn(
|
|
1653
1668
|
`[Workflow] Failed to remove ephemeral worktree ${isolation.path}: ${result.error}`
|
|
1654
1669
|
);
|
|
1655
1670
|
return { path: isolation.path, branch: isolation.branch };
|
|
1656
1671
|
}
|
|
1657
1672
|
if (result.branchPreserved) {
|
|
1658
|
-
|
|
1673
|
+
debugLogger2.warn(
|
|
1659
1674
|
`[Workflow] Removed worktree directory ${isolation.path} but kept branch ${isolation.branch} (unmerged commits at delete time)`
|
|
1660
1675
|
);
|
|
1661
1676
|
return { branch: isolation.branch };
|
|
1662
1677
|
}
|
|
1663
1678
|
} catch (error) {
|
|
1664
|
-
|
|
1679
|
+
debugLogger2.warn(
|
|
1665
1680
|
`[Workflow] Failed to remove ephemeral worktree ${isolation.path}: ${error}`
|
|
1666
1681
|
);
|
|
1667
1682
|
return { path: isolation.path, branch: isolation.branch };
|
|
@@ -1749,7 +1764,7 @@ var WorkflowOrchestrator = class {
|
|
|
1749
1764
|
if (cached !== void 0) {
|
|
1750
1765
|
const respawns = replay.started.get(journalKey);
|
|
1751
1766
|
if (respawns && respawns.length > 0) {
|
|
1752
|
-
|
|
1767
|
+
debugLogger2.info(
|
|
1753
1768
|
`[Workflow] resume cache hit after ${respawns.length} prior respawn(s) for runId=${runId}.`
|
|
1754
1769
|
);
|
|
1755
1770
|
}
|
|
@@ -1757,12 +1772,12 @@ var WorkflowOrchestrator = class {
|
|
|
1757
1772
|
try {
|
|
1758
1773
|
emitter?.agentDispatched?.(label2);
|
|
1759
1774
|
} catch (e) {
|
|
1760
|
-
|
|
1775
|
+
debugLogger2.warn("emitter.agentDispatched threw:", e);
|
|
1761
1776
|
}
|
|
1762
1777
|
try {
|
|
1763
1778
|
emitter?.agentCompleted?.(label2);
|
|
1764
1779
|
} catch (e) {
|
|
1765
|
-
|
|
1780
|
+
debugLogger2.warn("emitter.agentCompleted threw:", e);
|
|
1766
1781
|
}
|
|
1767
1782
|
return Promise.resolve(cached.result);
|
|
1768
1783
|
}
|
|
@@ -1770,11 +1785,11 @@ var WorkflowOrchestrator = class {
|
|
|
1770
1785
|
hadMiss = true;
|
|
1771
1786
|
journalEntryId = String(journalAgentId += 1);
|
|
1772
1787
|
journal.append({ type: "started", key: journalKey, agentId: journalEntryId }).catch(
|
|
1773
|
-
(e) =>
|
|
1788
|
+
(e) => debugLogger2.warn(`journal started-append failed: ${e}`)
|
|
1774
1789
|
);
|
|
1775
1790
|
}
|
|
1776
1791
|
if (budget && budget.total !== null && budget.remaining() <= 0) {
|
|
1777
|
-
|
|
1792
|
+
debugLogger2.warn(
|
|
1778
1793
|
`[Workflow] budget gate refused dispatch at entry: runId=${runId} spent=${budget.spent()} total=${budget.total}`
|
|
1779
1794
|
);
|
|
1780
1795
|
return Promise.reject(
|
|
@@ -1793,11 +1808,11 @@ var WorkflowOrchestrator = class {
|
|
|
1793
1808
|
try {
|
|
1794
1809
|
emitter?.agentDispatched?.(label);
|
|
1795
1810
|
} catch (e) {
|
|
1796
|
-
|
|
1811
|
+
debugLogger2.warn("emitter.agentDispatched threw:", e);
|
|
1797
1812
|
}
|
|
1798
1813
|
return limiter.run(() => {
|
|
1799
1814
|
if (budget && budget.total !== null && budget.remaining() <= 0) {
|
|
1800
|
-
|
|
1815
|
+
debugLogger2.warn(
|
|
1801
1816
|
`[Workflow] budget gate refused dispatch at slot-acquire: runId=${runId} spent=${budget.spent()} total=${budget.total}`
|
|
1802
1817
|
);
|
|
1803
1818
|
throw new WorkflowBudgetExceededError(
|
|
@@ -1812,7 +1827,7 @@ var WorkflowOrchestrator = class {
|
|
|
1812
1827
|
try {
|
|
1813
1828
|
emitter?.agentCompleted?.(label);
|
|
1814
1829
|
} catch (e) {
|
|
1815
|
-
|
|
1830
|
+
debugLogger2.warn("emitter.agentCompleted threw:", e);
|
|
1816
1831
|
}
|
|
1817
1832
|
if (journal && journalKey !== void 0) {
|
|
1818
1833
|
journal.append({
|
|
@@ -1821,14 +1836,14 @@ var WorkflowOrchestrator = class {
|
|
|
1821
1836
|
agentId: journalEntryId ?? "",
|
|
1822
1837
|
result
|
|
1823
1838
|
}).catch(
|
|
1824
|
-
(e) =>
|
|
1839
|
+
(e) => debugLogger2.warn(`journal result-append failed: ${e}`)
|
|
1825
1840
|
);
|
|
1826
1841
|
}
|
|
1827
1842
|
if (budget) {
|
|
1828
1843
|
try {
|
|
1829
1844
|
emitter?.budgetUpdated?.(budget.spent(), budget.total);
|
|
1830
1845
|
} catch (e) {
|
|
1831
|
-
|
|
1846
|
+
debugLogger2.warn("emitter.budgetUpdated threw:", e);
|
|
1832
1847
|
}
|
|
1833
1848
|
}
|
|
1834
1849
|
return result;
|
|
@@ -1838,13 +1853,13 @@ var WorkflowOrchestrator = class {
|
|
|
1838
1853
|
try {
|
|
1839
1854
|
emitter?.agentCompleted?.(label, msg);
|
|
1840
1855
|
} catch (e) {
|
|
1841
|
-
|
|
1856
|
+
debugLogger2.warn("emitter.agentCompleted threw:", e);
|
|
1842
1857
|
}
|
|
1843
1858
|
if (budget) {
|
|
1844
1859
|
try {
|
|
1845
1860
|
emitter?.budgetUpdated?.(budget.spent(), budget.total);
|
|
1846
1861
|
} catch (e) {
|
|
1847
|
-
|
|
1862
|
+
debugLogger2.warn("emitter.budgetUpdated threw:", e);
|
|
1848
1863
|
}
|
|
1849
1864
|
}
|
|
1850
1865
|
throw err;
|
|
@@ -1910,14 +1925,14 @@ async function settleToNullArray(thunks, signal, kind = "parallel") {
|
|
|
1910
1925
|
if (reason?.name === "WorkflowBudgetExceededError") {
|
|
1911
1926
|
budgetDropped += 1;
|
|
1912
1927
|
} else {
|
|
1913
|
-
|
|
1928
|
+
debugLogger2.warn(
|
|
1914
1929
|
`Workflow thunk at index ${i} rejected: ${String(reason?.message ?? r.reason)}`
|
|
1915
1930
|
);
|
|
1916
1931
|
}
|
|
1917
1932
|
return null;
|
|
1918
1933
|
});
|
|
1919
1934
|
if (budgetDropped > 0) {
|
|
1920
|
-
|
|
1935
|
+
debugLogger2.warn(
|
|
1921
1936
|
`${kind}: ${budgetDropped} slot${budgetDropped === 1 ? "" : "s"} dropped \u2014 token budget exceeded.`
|
|
1922
1937
|
);
|
|
1923
1938
|
}
|
|
@@ -1990,8 +2005,164 @@ function extractErrorMessage(err) {
|
|
|
1990
2005
|
}
|
|
1991
2006
|
__name(extractErrorMessage, "extractErrorMessage");
|
|
1992
2007
|
|
|
2008
|
+
// packages/core/src/agents/runtime/workflow-runner.ts
|
|
2009
|
+
var WorkflowRunHandle = class {
|
|
2010
|
+
constructor(runId, budget, registry, controller, start) {
|
|
2011
|
+
this.runId = runId;
|
|
2012
|
+
this.budget = budget;
|
|
2013
|
+
this.registry = registry;
|
|
2014
|
+
this.controller = controller;
|
|
2015
|
+
this.completion = Promise.resolve().then(start);
|
|
2016
|
+
}
|
|
2017
|
+
static {
|
|
2018
|
+
__name(this, "WorkflowRunHandle");
|
|
2019
|
+
}
|
|
2020
|
+
completion;
|
|
2021
|
+
abort() {
|
|
2022
|
+
this.controller.abort();
|
|
2023
|
+
}
|
|
2024
|
+
};
|
|
2025
|
+
var WorkflowRunner = class {
|
|
2026
|
+
static {
|
|
2027
|
+
__name(this, "WorkflowRunner");
|
|
2028
|
+
}
|
|
2029
|
+
static async start(options) {
|
|
2030
|
+
const config = options.config;
|
|
2031
|
+
const budget = WorkflowBudgetImpl.fromEnv();
|
|
2032
|
+
const loaded = options.scriptPath && options.script === void 0 ? await resolveSavedWorkflowScript(
|
|
2033
|
+
{ scriptPath: options.scriptPath },
|
|
2034
|
+
config
|
|
2035
|
+
) : void 0;
|
|
2036
|
+
const script = loaded?.script ?? options.script ?? "";
|
|
2037
|
+
const scriptPath = loaded?.scriptPath ?? options.scriptPath;
|
|
2038
|
+
const runId = options.resumeFromRunId ?? `wf_${randomBytes2(8).toString("hex")}`;
|
|
2039
|
+
const storage = config.storage;
|
|
2040
|
+
const journal = storage ? new WorkflowJournal(storage.getWorkflowRunJournalPath(runId)) : void 0;
|
|
2041
|
+
const resumeReplay = options.resumeFromRunId ? await journal?.load() : void 0;
|
|
2042
|
+
const controller = createChildAbortController(options.signal);
|
|
2043
|
+
const registry = config.getWorkflowRunRegistry?.();
|
|
2044
|
+
const dispatch = options.dispatch ?? createProductionDispatch(
|
|
2045
|
+
config,
|
|
2046
|
+
controller.signal,
|
|
2047
|
+
(outputTokens) => budget.recordSpent(outputTokens),
|
|
2048
|
+
registry ? (emitter2) => registry.bridgeApprovalEvents(runId, emitter2) : void 0
|
|
2049
|
+
);
|
|
2050
|
+
const orchestrator = new WorkflowOrchestrator(dispatch);
|
|
2051
|
+
const entry = registry?.register({
|
|
2052
|
+
runId,
|
|
2053
|
+
meta: null,
|
|
2054
|
+
status: "running",
|
|
2055
|
+
startTime: Date.now(),
|
|
2056
|
+
outputFile: "",
|
|
2057
|
+
abortController: controller,
|
|
2058
|
+
tokenBudgetTotal: budget.total,
|
|
2059
|
+
script,
|
|
2060
|
+
scriptPath
|
|
2061
|
+
});
|
|
2062
|
+
const emitUpdate = /* @__PURE__ */ __name(() => {
|
|
2063
|
+
if (!entry || !options.onUpdate) return;
|
|
2064
|
+
try {
|
|
2065
|
+
options.onUpdate(entry);
|
|
2066
|
+
} catch {
|
|
2067
|
+
}
|
|
2068
|
+
}, "emitUpdate");
|
|
2069
|
+
const emitter = {
|
|
2070
|
+
phaseStarted: /* @__PURE__ */ __name((title) => {
|
|
2071
|
+
registry?.onPhaseStarted(runId, title);
|
|
2072
|
+
emitUpdate();
|
|
2073
|
+
}, "phaseStarted"),
|
|
2074
|
+
agentDispatched: /* @__PURE__ */ __name(() => {
|
|
2075
|
+
registry?.onAgentDispatched(runId);
|
|
2076
|
+
emitUpdate();
|
|
2077
|
+
}, "agentDispatched"),
|
|
2078
|
+
agentCompleted: /* @__PURE__ */ __name(() => {
|
|
2079
|
+
registry?.onAgentCompleted(runId);
|
|
2080
|
+
}, "agentCompleted"),
|
|
2081
|
+
// Deliberate no-op: logs are snapshotted at terminal via
|
|
2082
|
+
// setRecentLogs; per-line emit would cause up to 10k TUI redraws.
|
|
2083
|
+
logAppended: /* @__PURE__ */ __name(() => {
|
|
2084
|
+
}, "logAppended"),
|
|
2085
|
+
budgetUpdated: /* @__PURE__ */ __name((spent, total) => {
|
|
2086
|
+
registry?.onBudgetUpdated(runId, spent, total);
|
|
2087
|
+
emitUpdate();
|
|
2088
|
+
}, "budgetUpdated")
|
|
2089
|
+
};
|
|
2090
|
+
const handle = new WorkflowRunHandle(
|
|
2091
|
+
runId,
|
|
2092
|
+
budget,
|
|
2093
|
+
registry,
|
|
2094
|
+
controller,
|
|
2095
|
+
async () => {
|
|
2096
|
+
try {
|
|
2097
|
+
const outcome = await orchestrator.run({
|
|
2098
|
+
script,
|
|
2099
|
+
args: options.args,
|
|
2100
|
+
abortOnTimeout: controller,
|
|
2101
|
+
runId,
|
|
2102
|
+
emitter,
|
|
2103
|
+
budget,
|
|
2104
|
+
resolveSavedWorkflow: /* @__PURE__ */ __name((ref) => resolveSavedWorkflowScript(ref, config), "resolveSavedWorkflow"),
|
|
2105
|
+
journal,
|
|
2106
|
+
resumeReplay
|
|
2107
|
+
});
|
|
2108
|
+
if (entry) {
|
|
2109
|
+
entry.meta = outcome.meta;
|
|
2110
|
+
if (outcome.meta?.name && entry.description === runId) {
|
|
2111
|
+
entry.description = outcome.meta.name;
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
registry?.setRecentLogs(runId, outcome.logs);
|
|
2115
|
+
registry?.complete(runId, outcome.result, Date.now());
|
|
2116
|
+
return { ok: true, outcome };
|
|
2117
|
+
} catch (error) {
|
|
2118
|
+
const details = error instanceof WorkflowExecutionError ? error : void 0;
|
|
2119
|
+
const message = extractErrorMessage2(error);
|
|
2120
|
+
if (entry && details?.meta && !entry.meta) entry.meta = details.meta;
|
|
2121
|
+
if (details?.logs) registry?.setRecentLogs(runId, details.logs);
|
|
2122
|
+
if (options.signal.aborted) {
|
|
2123
|
+
registry?.cancel(runId, Date.now());
|
|
2124
|
+
} else {
|
|
2125
|
+
registry?.fail(runId, message, Date.now());
|
|
2126
|
+
}
|
|
2127
|
+
return { ok: false, message, details };
|
|
2128
|
+
} finally {
|
|
2129
|
+
controller.abort();
|
|
2130
|
+
if (entry && entry.status !== "running") {
|
|
2131
|
+
await writeWorkflowSnapshot(config, entry);
|
|
2132
|
+
try {
|
|
2133
|
+
logWorkflowRun(
|
|
2134
|
+
config,
|
|
2135
|
+
new WorkflowRunEvent({
|
|
2136
|
+
status: entry.status,
|
|
2137
|
+
agents_dispatched: entry.agentsDispatched,
|
|
2138
|
+
agents_completed: entry.agentsCompleted,
|
|
2139
|
+
phase_count: entry.phases.length,
|
|
2140
|
+
tokens_spent: entry.tokensSpent,
|
|
2141
|
+
duration_ms: (entry.endTime ?? entry.startTime) - entry.startTime
|
|
2142
|
+
})
|
|
2143
|
+
);
|
|
2144
|
+
} catch {
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
registry?.releaseHandle(runId, handle);
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
);
|
|
2151
|
+
registry?.attachHandle(handle);
|
|
2152
|
+
return handle;
|
|
2153
|
+
}
|
|
2154
|
+
};
|
|
2155
|
+
function extractErrorMessage2(error) {
|
|
2156
|
+
if (error && typeof error === "object" && "message" in error) {
|
|
2157
|
+
const message = error.message;
|
|
2158
|
+
if (typeof message === "string") return message;
|
|
2159
|
+
return String(message);
|
|
2160
|
+
}
|
|
2161
|
+
return String(error);
|
|
2162
|
+
}
|
|
2163
|
+
__name(extractErrorMessage2, "extractErrorMessage");
|
|
2164
|
+
|
|
1993
2165
|
// packages/core/src/tools/workflow/workflow.ts
|
|
1994
|
-
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
1995
2166
|
import * as path from "node:path";
|
|
1996
2167
|
var WORKFLOW_PARAM_SCHEMA = {
|
|
1997
2168
|
type: "object",
|
|
@@ -2039,104 +2210,23 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
|
|
|
2039
2210
|
return Promise.resolve("ask");
|
|
2040
2211
|
}
|
|
2041
2212
|
async execute(signal, updateOutput, _shellExecutionConfig) {
|
|
2042
|
-
const
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
this.
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
(
|
|
2051
|
-
);
|
|
2052
|
-
const orchestrator = new WorkflowOrchestrator(dispatch);
|
|
2053
|
-
let resolvedScript = this.params.script ?? "";
|
|
2054
|
-
let resolvedScriptPath = this.params.scriptPath;
|
|
2055
|
-
if (this.params.scriptPath && this.params.script === void 0) {
|
|
2056
|
-
const loaded = await resolveSavedWorkflowScript(
|
|
2057
|
-
{ scriptPath: this.params.scriptPath },
|
|
2058
|
-
this.config
|
|
2059
|
-
);
|
|
2060
|
-
resolvedScript = loaded.script;
|
|
2061
|
-
resolvedScriptPath = loaded.scriptPath;
|
|
2062
|
-
}
|
|
2063
|
-
const runId = this.params.resumeFromRunId ?? `wf_${randomBytes2(8).toString("hex")}`;
|
|
2064
|
-
let journal;
|
|
2065
|
-
let resumeReplay;
|
|
2066
|
-
const storage = this.config.storage;
|
|
2067
|
-
if (storage) {
|
|
2068
|
-
journal = new WorkflowJournal(storage.getWorkflowRunJournalPath(runId));
|
|
2069
|
-
if (this.params.resumeFromRunId) {
|
|
2070
|
-
resumeReplay = await journal.load();
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
const registry = this.config.getWorkflowRunRegistry?.();
|
|
2074
|
-
const registryEntry = registry?.register({
|
|
2075
|
-
runId,
|
|
2076
|
-
meta: null,
|
|
2077
|
-
// populated after meta parses; safe default until then
|
|
2078
|
-
status: "running",
|
|
2079
|
-
startTime: Date.now(),
|
|
2080
|
-
outputFile: "",
|
|
2081
|
-
// P4b reserves the field but doesn't materialize
|
|
2082
|
-
abortController: dispatchController,
|
|
2083
|
-
// P5: seed the cap so the dialog can render the `M / N` form
|
|
2084
|
-
// immediately, before the first `budgetUpdated` fires. Stays
|
|
2085
|
-
// `null` when no env override.
|
|
2086
|
-
tokenBudgetTotal: budget.total,
|
|
2087
|
-
// P7b: carry the script source so a completed run can be snapshotted
|
|
2088
|
-
// to disk and saved to `.qwen/workflows/<name>.js` from the dialog.
|
|
2089
|
-
// `scriptPath` is set when the run was launched from a saved file (run
|
|
2090
|
-
// provenance for the snapshot).
|
|
2091
|
-
script: resolvedScript,
|
|
2092
|
-
scriptPath: resolvedScriptPath
|
|
2213
|
+
const handle = await WorkflowRunner.start({
|
|
2214
|
+
config: this.config,
|
|
2215
|
+
signal,
|
|
2216
|
+
script: this.params.script,
|
|
2217
|
+
scriptPath: this.params.scriptPath,
|
|
2218
|
+
args: this.params.args,
|
|
2219
|
+
resumeFromRunId: this.params.resumeFromRunId,
|
|
2220
|
+
dispatch: this.toolOptions.dispatch,
|
|
2221
|
+
onUpdate: updateOutput ? (entry) => safeEmitUpdate(updateOutput, entry) : void 0
|
|
2093
2222
|
});
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
safeEmitUpdate(updateOutput, registryEntry);
|
|
2098
|
-
}, "phaseStarted"),
|
|
2099
|
-
agentDispatched: /* @__PURE__ */ __name(() => {
|
|
2100
|
-
registry?.onAgentDispatched(runId);
|
|
2101
|
-
safeEmitUpdate(updateOutput, registryEntry);
|
|
2102
|
-
}, "agentDispatched"),
|
|
2103
|
-
agentCompleted: /* @__PURE__ */ __name(() => {
|
|
2104
|
-
registry?.onAgentCompleted(runId);
|
|
2105
|
-
}, "agentCompleted"),
|
|
2106
|
-
logAppended: /* @__PURE__ */ __name(() => {
|
|
2107
|
-
}, "logAppended"),
|
|
2108
|
-
budgetUpdated: /* @__PURE__ */ __name((spent, total) => {
|
|
2109
|
-
registry?.onBudgetUpdated(runId, spent, total);
|
|
2110
|
-
safeEmitUpdate(updateOutput, registryEntry);
|
|
2111
|
-
}, "budgetUpdated")
|
|
2112
|
-
};
|
|
2113
|
-
try {
|
|
2114
|
-
const outcome = await orchestrator.run({
|
|
2115
|
-
script: resolvedScript,
|
|
2116
|
-
args: this.params.args,
|
|
2117
|
-
abortOnTimeout: dispatchController,
|
|
2118
|
-
runId,
|
|
2119
|
-
emitter,
|
|
2120
|
-
budget,
|
|
2121
|
-
// P-nested: resolve `workflow('<name>')` / `workflow({scriptPath})`
|
|
2122
|
-
// against the saved-workflow scripts in `.qwen/workflows/`.
|
|
2123
|
-
resolveSavedWorkflow: /* @__PURE__ */ __name((ref) => resolveSavedWorkflowScript(ref, this.config), "resolveSavedWorkflow"),
|
|
2124
|
-
// P6: resume journal (always wired) + replay maps (resume only).
|
|
2125
|
-
journal,
|
|
2126
|
-
resumeReplay
|
|
2127
|
-
});
|
|
2128
|
-
if (registryEntry) {
|
|
2129
|
-
registryEntry.meta = outcome.meta;
|
|
2130
|
-
if (outcome.meta?.name && registryEntry.description === runId) {
|
|
2131
|
-
registryEntry.description = outcome.meta.name;
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
registry?.setRecentLogs(runId, outcome.logs);
|
|
2135
|
-
registry?.complete(runId, outcome.result, Date.now());
|
|
2223
|
+
const settlement = await handle.completion;
|
|
2224
|
+
if (settlement.ok) {
|
|
2225
|
+
const { outcome } = settlement;
|
|
2136
2226
|
const usageBanner = resolveUsageBanner(
|
|
2137
2227
|
this.config,
|
|
2138
|
-
registry,
|
|
2139
|
-
budget.total
|
|
2228
|
+
handle.registry,
|
|
2229
|
+
handle.budget.total
|
|
2140
2230
|
);
|
|
2141
2231
|
const llmText = safeStringifyResult(outcome.result);
|
|
2142
2232
|
const displayJson = safeStringifyDisplayPayload({
|
|
@@ -2151,10 +2241,10 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
|
|
|
2151
2241
|
// tokens whenever ANY usage is reported OR a cap is set, not
|
|
2152
2242
|
// only when spend > 0. A capped-but-zero-spend run still wants
|
|
2153
2243
|
// the cap visible so the user sees the gate engaged.
|
|
2154
|
-
...budget.spent() > 0 || budget.total !== null ? {
|
|
2244
|
+
...handle.budget.spent() > 0 || handle.budget.total !== null ? {
|
|
2155
2245
|
tokens: {
|
|
2156
|
-
spent: budget.spent(),
|
|
2157
|
-
total: budget.total
|
|
2246
|
+
spent: handle.budget.spent(),
|
|
2247
|
+
total: handle.budget.total
|
|
2158
2248
|
}
|
|
2159
2249
|
} : {}
|
|
2160
2250
|
});
|
|
@@ -2162,20 +2252,9 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
|
|
|
2162
2252
|
llmContent: [{ text: llmText }],
|
|
2163
2253
|
returnDisplay: usageBanner + "```json\n" + displayJson + "\n```"
|
|
2164
2254
|
};
|
|
2165
|
-
}
|
|
2166
|
-
const message =
|
|
2167
|
-
const phases
|
|
2168
|
-
const logs = err instanceof WorkflowExecutionError ? err.logs : void 0;
|
|
2169
|
-
const meta = err instanceof WorkflowExecutionError ? err.meta : void 0;
|
|
2170
|
-
if (registryEntry) {
|
|
2171
|
-
if (meta && !registryEntry.meta) registryEntry.meta = meta;
|
|
2172
|
-
}
|
|
2173
|
-
if (logs) registry?.setRecentLogs(runId, logs);
|
|
2174
|
-
if (signal.aborted) {
|
|
2175
|
-
registry?.cancel(runId, Date.now());
|
|
2176
|
-
} else {
|
|
2177
|
-
registry?.fail(runId, message, Date.now());
|
|
2178
|
-
}
|
|
2255
|
+
} else {
|
|
2256
|
+
const { message, details } = settlement;
|
|
2257
|
+
const { phases, logs, meta } = details ?? {};
|
|
2179
2258
|
const display = phases || logs || meta ? `Workflow failed: ${message}
|
|
2180
2259
|
|
|
2181
2260
|
${safeStringifyDisplayPayload({
|
|
@@ -2191,25 +2270,6 @@ ${safeStringifyDisplayPayload({
|
|
|
2191
2270
|
// the same way as other execution-time tool errors.
|
|
2192
2271
|
error: { message, type: "execution_failed" /* EXECUTION_FAILED */ }
|
|
2193
2272
|
};
|
|
2194
|
-
} finally {
|
|
2195
|
-
dispatchController.abort();
|
|
2196
|
-
if (registryEntry && registryEntry.status !== "running") {
|
|
2197
|
-
await writeWorkflowSnapshot(this.config, registryEntry);
|
|
2198
|
-
try {
|
|
2199
|
-
logWorkflowRun(
|
|
2200
|
-
this.config,
|
|
2201
|
-
new WorkflowRunEvent({
|
|
2202
|
-
status: registryEntry.status,
|
|
2203
|
-
agents_dispatched: registryEntry.agentsDispatched,
|
|
2204
|
-
agents_completed: registryEntry.agentsCompleted,
|
|
2205
|
-
phase_count: registryEntry.phases.length,
|
|
2206
|
-
tokens_spent: registryEntry.tokensSpent,
|
|
2207
|
-
duration_ms: (registryEntry.endTime ?? registryEntry.startTime) - registryEntry.startTime
|
|
2208
|
-
})
|
|
2209
|
-
);
|
|
2210
|
-
} catch {
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2213
2273
|
}
|
|
2214
2274
|
}
|
|
2215
2275
|
};
|
|
@@ -2295,15 +2355,6 @@ function safeStringifyDisplayPayload(payload) {
|
|
|
2295
2355
|
}
|
|
2296
2356
|
}
|
|
2297
2357
|
__name(safeStringifyDisplayPayload, "safeStringifyDisplayPayload");
|
|
2298
|
-
function extractErrorMessage2(err) {
|
|
2299
|
-
if (err && typeof err === "object" && "message" in err) {
|
|
2300
|
-
const m = err.message;
|
|
2301
|
-
if (typeof m === "string") return m;
|
|
2302
|
-
return String(m);
|
|
2303
|
-
}
|
|
2304
|
-
return String(err);
|
|
2305
|
-
}
|
|
2306
|
-
__name(extractErrorMessage2, "extractErrorMessage");
|
|
2307
2358
|
var WorkflowTool = class extends BaseDeclarativeTool {
|
|
2308
2359
|
constructor(config, toolOptions = {}) {
|
|
2309
2360
|
super(
|
|
@@ -2346,11 +2397,11 @@ export {
|
|
|
2346
2397
|
};
|
|
2347
2398
|
/**
|
|
2348
2399
|
* @license
|
|
2349
|
-
* Copyright
|
|
2400
|
+
* Copyright 2026 Qwen Team
|
|
2350
2401
|
* SPDX-License-Identifier: Apache-2.0
|
|
2351
2402
|
*/
|
|
2352
2403
|
/**
|
|
2353
2404
|
* @license
|
|
2354
|
-
* Copyright
|
|
2405
|
+
* Copyright 2025 Qwen
|
|
2355
2406
|
* SPDX-License-Identifier: Apache-2.0
|
|
2356
2407
|
*/
|