@qwen-code/qwen-code 0.22.0 → 0.22.2-preview.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/computer-use/SKILL.md +229 -0
- package/bundled/computer-use/agents/openai.yaml +4 -0
- package/bundled/coordinate/SKILL.md +5 -5
- package/bundled/qc-helper/docs/configuration/auth.md +7 -7
- package/bundled/qc-helper/docs/configuration/model-providers.md +70 -9
- package/bundled/qc-helper/docs/configuration/settings.md +40 -40
- package/bundled/qc-helper/docs/extension/introduction.md +3 -1
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -0
- package/bundled/qc-helper/docs/features/channels/dws.md +120 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +3 -3
- package/bundled/qc-helper/docs/features/code-review.md +25 -21
- package/bundled/qc-helper/docs/features/commands.md +2 -2
- package/bundled/qc-helper/docs/features/computer-use.md +57 -51
- package/bundled/qc-helper/docs/features/mcp.md +35 -12
- package/bundled/qc-helper/docs/features/sub-agents.md +1 -1
- package/bundled/qc-helper/docs/features/worktree.md +1 -1
- package/bundled/qc-helper/docs/overview.md +1 -1
- package/bundled/qc-helper/docs/quickstart.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +29 -6
- package/bundled/review/SKILL.md +119 -417
- package/bundled/review/references/aone.md +18 -0
- package/bundled/review/references/persistence.md +105 -0
- package/bundled/review/references/posting.md +270 -0
- package/chunks/MaxSizedBox-XYQOMOBE.js +112 -0
- package/chunks/{StandaloneSessionPicker-KTHPCSR6.js → StandaloneSessionPicker-KFMJILVY.js} +87 -86
- package/chunks/{acp-startup-profiler-T4GEAPLX.js → acp-startup-profiler-GNYAL6LI.js} +2 -2
- package/chunks/{acpAgent-CRY3JZ5O.js → acpAgent-KNFTTDWL.js} +2216 -1931
- package/chunks/agent-6V6MZOA7.js +97 -0
- package/chunks/agent-headless-3ZC4LX3E.js +87 -0
- package/chunks/{anthropicContentGenerator-Y2OX6LS4.js → anthropicContentGenerator-U76GTVB6.js} +128 -58
- package/chunks/{artifact-tool-SBXMTVCB.js → artifact-tool-XDJCZZCF.js} +2 -2
- package/chunks/{askUserQuestion-KEQJRFD6.js → askUserQuestion-ZXXERLEV.js} +2 -2
- package/chunks/bridge-LFFLHLU5.js +119 -0
- package/chunks/{ca-D3F4S6NG.js → ca-7HPYOYSZ.js} +3 -0
- package/chunks/{channel-management-service-IRTT7RNE.js → channel-management-service-HXXS3HOZ.js} +4 -4
- package/chunks/channel-settings-store-CAL2HWAH.js +117 -0
- package/chunks/{channel-worker-group-BJNMR2MP.js → channel-worker-group-EVDC2P4K.js} +8 -7
- package/chunks/{channel-worker-manager-EMA7CQDJ.js → channel-worker-manager-IJJZHGEI.js} +8 -7
- package/chunks/{channel-worker-supervisor-F6I6WSWW.js → channel-worker-supervisor-YSKB5GVB.js} +12 -7
- package/chunks/{chunk-2TRNCJK4.js → chunk-27ONXAFY.js} +1 -1
- package/chunks/{read-package-up-UXSW3YPB.js → chunk-2EAZ43JQ.js} +1 -0
- package/chunks/{chunk-DB2OKNTU.js → chunk-2FN2HNTI.js} +2 -2
- package/chunks/{chunk-KM73TBQ4.js → chunk-2LD5U7Q3.js} +31 -0
- package/chunks/{chunk-QJHPWLZC.js → chunk-2MHGD7EE.js} +1 -1
- package/chunks/{chunk-A5F2YNO6.js → chunk-2NNTE2ED.js} +245 -10
- package/chunks/{chunk-Z3JMO2CH.js → chunk-2SERYG4T.js} +1 -1
- package/chunks/{chunk-4J7OPYNS.js → chunk-2YDYDDE2.js} +6 -6
- package/chunks/{chunk-SE55HQGF.js → chunk-3B5DCAQU.js} +74 -52
- package/chunks/{chunk-UIRLQ3N7.js → chunk-3BV7TZNQ.js} +3 -3
- package/chunks/{chunk-2Z6LSQMF.js → chunk-3FSBMAYD.js} +1 -1
- package/chunks/{chunk-S4C4JJKE.js → chunk-3UXJFOB3.js} +5 -5
- package/chunks/{chunk-DJEHYM4H.js → chunk-3UZCLCXR.js} +3 -3
- package/chunks/{chunk-BUGYW6FB.js → chunk-4IDJQOCO.js} +1 -1
- package/chunks/chunk-4K7NQDCG.js +104 -0
- package/chunks/{chunk-WS7PAXXR.js → chunk-4N6UAPD3.js} +18 -13
- package/chunks/{chunk-VYC7XFYV.js → chunk-4PLAO7FS.js} +5 -5
- package/chunks/{chunk-UZPYR3EV.js → chunk-4TPAG3O7.js} +1 -1
- package/chunks/{chunk-2E3V7G6Y.js → chunk-4X5GYZFO.js} +55 -50
- package/chunks/{chunk-XYQHT3AW.js → chunk-4Z3PSHN4.js} +2 -2
- package/chunks/{chunk-PDL6LKB5.js → chunk-5AFPOEY3.js} +1 -1
- package/chunks/{chunk-BB5IMQCV.js → chunk-5CW26JIE.js} +2 -2
- package/chunks/{chunk-7KOFLDEP.js → chunk-5JTIYALA.js} +1 -1
- package/chunks/{chunk-U2UYQMM6.js → chunk-5NV2AN56.js} +3 -3
- package/chunks/{chunk-CXJHQVEK.js → chunk-5PA6UEYA.js} +4 -0
- package/chunks/{chunk-IBJ5S45N.js → chunk-5T4LWWNX.js} +2 -2
- package/chunks/{chunk-VUMLT7E5.js → chunk-5Y2JCJAH.js} +2 -2
- package/chunks/{chunk-BEGIBJAZ.js → chunk-6HOU52QX.js} +4 -4
- package/chunks/{chunk-GAHYKJPV.js → chunk-6US7BF3G.js} +7 -59
- package/chunks/{chunk-3CLIDIVQ.js → chunk-73WFGVIZ.js} +3 -3
- package/chunks/{chunk-ZZUVC6RI.js → chunk-76WGY6LW.js} +3 -3
- package/chunks/{chunk-XLDFW44M.js → chunk-77TOMRBG.js} +3 -3
- package/chunks/{chunk-ND7NOI4P.js → chunk-7CWEZQ6T.js} +0 -15
- package/chunks/{chunk-DWCKACFL.js → chunk-7DPKPBOQ.js} +2 -2
- package/chunks/{chunk-X7V3N6YH.js → chunk-7JJUFI36.js} +218 -37
- package/chunks/{chunk-45NQKMYB.js → chunk-7JPW6IYH.js} +1 -1
- package/chunks/{chunk-HDKCKCYO.js → chunk-7QGEJI7M.js} +1 -1
- package/chunks/{chunk-PHJJ3RVO.js → chunk-7XKW4CVK.js} +7 -15
- package/chunks/{chunk-O5Z7EB6Y.js → chunk-AYHQZBJ4.js} +170 -207
- package/chunks/{chunk-7DYNJFES.js → chunk-AYVIGUUK.js} +6 -1
- package/chunks/{chunk-43T5WDQ7.js → chunk-BFSFJR3D.js} +1 -1
- package/chunks/{chunk-OARZJFZX.js → chunk-BGWT7VBV.js} +4 -4
- package/chunks/{chunk-AP3B7LKD.js → chunk-BKDAF7ES.js} +2 -2
- package/chunks/{chunk-B6UBOIFE.js → chunk-BQBUZDDH.js} +14 -11
- package/chunks/{chunk-6PCOVQO2.js → chunk-BU7OUDQB.js} +8 -8
- package/chunks/{chunk-VLRBJ24J.js → chunk-BVE5EMIG.js} +2 -2
- package/chunks/{chunk-6UQSU7CQ.js → chunk-C2BAEV64.js} +58 -107
- package/chunks/{chunk-QKBYFU2Q.js → chunk-CFKIH3D3.js} +21 -1
- package/chunks/{chunk-URN2JIAQ.js → chunk-CITGRGCM.js} +2 -1
- package/chunks/{chunk-WU5E4HMO.js → chunk-CPPYZHBN.js} +1 -1
- package/chunks/{chunk-T6XLJRQY.js → chunk-D6XO27Z5.js} +36509 -5182
- package/chunks/{chunk-Q54XG7IX.js → chunk-DEYPMJPD.js} +1 -1
- package/chunks/{chunk-KSPRQSB4.js → chunk-DIMEPKCW.js} +52 -12
- package/chunks/{chunk-I432KXWD.js → chunk-DP7LABIB.js} +1 -1
- package/chunks/{chunk-P47E4SJC.js → chunk-DWRFOH3G.js} +3 -3
- package/chunks/{chunk-J5ZDDUKM.js → chunk-DX5FZGHZ.js} +4 -4
- package/chunks/{chunk-36OF5PRW.js → chunk-E4I5MVBR.js} +7 -3
- package/chunks/{chunk-AW27A43Y.js → chunk-E55H6BZ7.js} +93 -1
- package/chunks/{chunk-K623ENWT.js → chunk-E6FGMDFQ.js} +4 -0
- package/chunks/{chunk-YZBDKFRQ.js → chunk-EADEZDPO.js} +993 -895
- package/chunks/{chunk-5XUTPXQU.js → chunk-EAV3TENS.js} +6 -9
- package/chunks/{chunk-LI4YHTQK.js → chunk-EB4VDXNI.js} +1 -1
- package/chunks/{chunk-JOLJTKIG.js → chunk-EC5BONC3.js} +1 -1
- package/chunks/{chunk-W4CRPSC5.js → chunk-ELY4QVIB.js} +1 -1
- package/chunks/{chunk-AVCCKIZ6.js → chunk-EWBY3PFB.js} +1 -1
- package/chunks/chunk-FBX2SDQ4.js +48 -0
- package/chunks/{chunk-C72BXMJ5.js → chunk-FJWICLG7.js} +1 -1
- package/chunks/{chunk-LDGWX737.js → chunk-FN5C6C7G.js} +160 -59
- package/chunks/{chunk-3ZFJUBTP.js → chunk-FPH6TXD3.js} +1 -1
- package/chunks/{chunk-WRT324N6.js → chunk-FVDQ5E67.js} +3 -3
- package/chunks/{chunk-2A4C2MEG.js → chunk-FY62MBPS.js} +35 -12
- package/chunks/{chunk-VFACN2CE.js → chunk-GNMJNDZE.js} +1 -1
- package/chunks/{chunk-6QSA4JHL.js → chunk-GQAIZL3H.js} +2772 -814
- package/chunks/{chunk-PZRUV52H.js → chunk-GTUKW3I6.js} +20 -2
- package/chunks/{chunk-7DMTAQJ6.js → chunk-GXWY24QS.js} +132 -49
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-VMJL7RH6.js → chunk-GZJUCMH4.js} +4 -4
- package/chunks/{chunk-2GXYDNXP.js → chunk-H2MDBYLL.js} +8 -8
- package/chunks/{chunk-RDG44S5I.js → chunk-H4JK2A2V.js} +2 -2
- package/chunks/{chunk-FVBVJEBG.js → chunk-HOANA6GC.js} +10 -8
- package/chunks/{chunk-AO4M6NMD.js → chunk-I6HWGOWD.js} +60 -20
- package/chunks/{chunk-7IV52LTO.js → chunk-I6VVOZDK.js} +2 -2
- package/chunks/{chunk-SQS55KR4.js → chunk-IJVDHPKD.js} +2 -2
- package/chunks/{chunk-QS4ENGVF.js → chunk-IKN3IUJP.js} +9 -8
- package/chunks/{chunk-2UZJWSVD.js → chunk-ILPXSKGQ.js} +2 -2
- package/chunks/{chunk-OVH5Y7KS.js → chunk-IN66KO3N.js} +19 -3
- package/chunks/{chunk-ZRYQMWEP.js → chunk-IPQA4SR5.js} +2 -2
- package/chunks/{chunk-AZF6SME3.js → chunk-JECO75XD.js} +3 -3
- package/chunks/{chunk-MQP3MHWN.js → chunk-JJJD6QCC.js} +21 -15
- package/chunks/chunk-JLGFGPZJ.js +346 -0
- package/chunks/{chunk-WZDM44SB.js → chunk-JUIJ3FXC.js} +7 -7
- package/chunks/{chunk-A6NRNRKE.js → chunk-JVPFTDBK.js} +1 -1
- package/chunks/{chunk-2J3OJGTL.js → chunk-K2OJUPOE.js} +1 -21
- package/chunks/{chunk-GHY5OIYP.js → chunk-K5PNJ6VL.js} +13 -13
- package/chunks/{chunk-NW35NVFN.js → chunk-K6FURWIX.js} +4 -4
- package/chunks/{chunk-6NFAEG54.js → chunk-KOJ6MHD5.js} +24 -13
- package/chunks/{chunk-A5F63FEW.js → chunk-L436XFLJ.js} +1 -1
- package/chunks/{chunk-GIWB5QLV.js → chunk-LJP2BBMK.js} +4 -4
- package/chunks/{chunk-FYZMB6DB.js → chunk-LKOSBI2M.js} +11 -11
- package/chunks/{create-sub-session-XBCVGNFU.js → chunk-LRKMQPMD.js} +4 -6
- package/chunks/{chunk-5HJUPACR.js → chunk-LRLMDV5X.js} +2 -2
- package/chunks/{chunk-MHG6NDS6.js → chunk-MB4OCRQ2.js} +2 -2
- package/chunks/{chunk-IIWGSX4L.js → chunk-MI7CMXPU.js} +1 -1
- package/chunks/{chunk-ZLCT4C5A.js → chunk-MZS7GEC7.js} +1 -1
- package/chunks/{chunk-WWUSHZ7M.js → chunk-N4B7VPXK.js} +5 -5
- package/chunks/{chunk-BMCSKS37.js → chunk-NUHCXGAD.js} +6 -6
- package/chunks/{chunk-XZJKSETB.js → chunk-O3BUXIPM.js} +3 -3
- package/chunks/{chunk-4XPSVIED.js → chunk-O5YGAEQS.js} +6 -6
- package/chunks/{chunk-ZRFUT5VV.js → chunk-OAAPGZVH.js} +7 -7
- package/chunks/{chunk-UU4WC7DK.js → chunk-OGZAQWJP.js} +82 -12
- package/chunks/{chunk-5XHAOUWD.js → chunk-OI2DR6QB.js} +3 -3
- package/chunks/{chunk-EFB657PR.js → chunk-OX44MOAN.js} +3 -3
- package/chunks/{chunk-LURJYO2T.js → chunk-OZ6KS6KW.js} +4 -0
- package/chunks/{chunk-4F5WV4RF.js → chunk-PAJGKZAA.js} +281 -10
- package/chunks/{chunk-HIK2OF33.js → chunk-PVBT5QPD.js} +1 -1
- package/chunks/{chunk-MPHLIJYL.js → chunk-QB5DD75E.js} +14 -8
- package/chunks/chunk-QHMLYMMS.js +32 -0
- package/chunks/{chunk-4CWDWDL6.js → chunk-RCDXSEJ5.js} +1 -1
- package/chunks/{chunk-L4HVF7LM.js → chunk-RQ5ASDFQ.js} +3 -3
- package/chunks/{chunk-PXOJLJ5W.js → chunk-RQAMNZ4Y.js} +333 -184
- package/chunks/{chunk-K52PZNU4.js → chunk-RRKNX553.js} +2 -2
- package/chunks/{chunk-RPJQ3O4M.js → chunk-RUJTCU46.js} +31 -41
- package/chunks/{chunk-62JOGZL5.js → chunk-RUQBJS34.js} +199 -87
- package/chunks/chunk-RXFQM6FQ.js +42 -0
- package/chunks/{chunk-SJ4HB27T.js → chunk-SDVF6A42.js} +3 -3
- package/chunks/{chunk-TBVSALA3.js → chunk-SKNVVYIJ.js} +3 -3
- package/chunks/{chunk-JGUBDRBC.js → chunk-SLEWBQWM.js} +3 -3
- package/chunks/{chunk-UUQFJILB.js → chunk-SQPOJ4ZI.js} +15 -3
- package/chunks/{chunk-ISJMN3ML.js → chunk-T2CRBIDJ.js} +1 -1
- package/chunks/{chunk-MZKWFWVG.js → chunk-T2HMXHYA.js} +6 -6
- package/chunks/{chunk-FEMQ6Y7W.js → chunk-T6OODF2U.js} +47 -126
- package/chunks/{chunk-KVGR4MCF.js → chunk-TOF4UZHH.js} +3 -3
- package/chunks/{chunk-7HFULI45.js → chunk-TQYZG5DU.js} +3 -3
- package/chunks/{chunk-LD5VIJ7S.js → chunk-TWSKM647.js} +1 -1
- package/chunks/{chunk-25NESM4G.js → chunk-TWUA5EIL.js} +29 -5
- package/chunks/{chunk-6FRJEE2S.js → chunk-U66FXEH2.js} +5 -5
- package/chunks/{chunk-7NBVNAJJ.js → chunk-UCSV2IZW.js} +3 -3
- package/chunks/chunk-UVDOONRU.js +20 -0
- package/chunks/{chunk-FDD2IUEL.js → chunk-UX3IFLJM.js} +229 -21
- package/chunks/{chunk-YDJRMQU4.js → chunk-V3GINY6K.js} +3 -3
- package/chunks/{chunk-XL5K4SVK.js → chunk-VL4YX3FH.js} +1 -1
- package/chunks/{chunk-ZS5BHEPD.js → chunk-VLY6XOBY.js} +1 -1
- package/chunks/{chunk-KIVGVFMM.js → chunk-VUZY6MEQ.js} +16 -4
- package/chunks/{chunk-OE52YHCZ.js → chunk-W2WRNJKX.js} +11 -11
- package/chunks/{chunk-YLFLHKDL.js → chunk-W3N5XAZ6.js} +1 -1
- package/chunks/{chunk-IWOWEENB.js → chunk-WBT3STGU.js} +385 -25
- package/chunks/{chunk-S3G6YFQC.js → chunk-WEGXPP5E.js} +1 -1
- package/chunks/{chunk-RDQ7QB4Y.js → chunk-XJS54K4A.js} +2 -2
- package/chunks/{chunk-7JBHIQS2.js → chunk-XO4NGYRP.js} +7 -13
- package/chunks/{chunk-F6WFNA7U.js → chunk-XZA32HII.js} +3 -6
- package/chunks/{chunk-VEND4KA4.js → chunk-YT5XN3HV.js} +1 -1
- package/chunks/{chunk-NUGZAFR2.js → chunk-ZEADBZLO.js} +147 -6
- package/chunks/chunk-ZELCTN6Y.js +29 -0
- package/chunks/{chunk-TQOF5KBL.js → chunk-ZEZKIS2K.js} +0 -31
- package/chunks/{chunk-IOSEW6KP.js → chunk-ZJG323IA.js} +5 -4
- package/chunks/{chunk-VSNPOSDN.js → chunk-ZKAZP2ZG.js} +107 -12
- package/chunks/{chunk-YMVFIYHV.js → chunk-ZLTEQYNC.js} +2 -2
- package/chunks/{chunk-O5BDEWBC.js → chunk-ZWKGZB2K.js} +3 -3
- package/chunks/chunk-ZYNTSXWK.js +32 -0
- package/chunks/config-utils-YMJNA25D.js +113 -0
- package/chunks/contextCommand-WMPSNKPG.js +108 -0
- package/chunks/{core-runtime-CES6JSVV.js → core-runtime-6TBMEULI.js} +63 -58
- package/chunks/create-sub-session-RVHSWVAP.js +17 -0
- package/chunks/{create-sub-session-UJTPMVOG.js → create-sub-session-SAOMTP62.js} +60 -58
- package/chunks/{cron-create-IKA56DAF.js → cron-create-IJGVR5R2.js} +4 -4
- package/chunks/{cron-delete-K5Q62EGH.js → cron-delete-4N5BI6GL.js} +4 -4
- package/chunks/{cron-list-QBFGAMP7.js → cron-list-2CATIPUX.js} +4 -4
- package/chunks/{daemon-RZZUPGOJ.js → daemon-NAYK4XXU.js} +51 -24
- package/chunks/{daemon-git-worktree-guard-3QY2BQYB.js → daemon-git-worktree-guard-TYLESM6G.js} +338 -92
- package/chunks/daemon-status-provider-YBQAZD3G.js +118 -0
- package/chunks/daemon-trust-policy-O75ZSIJN.js +114 -0
- package/chunks/{daemon-trust-policy-monitor-TK4K7M63.js → daemon-trust-policy-monitor-WWX7I7P6.js} +68 -66
- package/chunks/{de-RYUHH2C6.js → de-X6HLSIFE.js} +1 -0
- package/chunks/deferred-core-runtime-MGCCR6LA.js +116 -0
- package/chunks/{display-image-OEJMJV3S.js → display-image-DR55LL6M.js} +5 -5
- package/chunks/dist-4Q7NTUNB.js +2512 -0
- package/chunks/{dist-ESS34DHC.js → dist-6H6RZ5H6.js} +2 -2
- package/chunks/{dist-LZO24N3E.js → dist-7CKN54NL.js} +1 -1
- package/chunks/{dist-5EV2G6MC.js → dist-DJBNNPLN.js} +1 -1
- package/chunks/{dist-J6P3C52Z.js → dist-FVJZSIO4.js} +28 -7
- package/chunks/{dist-K7IQB53U.js → dist-SATKXKUR.js} +1 -1
- package/chunks/{dist-ES6HNUW2.js → dist-TJUDJTCB.js} +246 -17
- package/chunks/{dist-VVQBOKDH.js → dist-UQUFZDIY.js} +1 -1
- package/chunks/{dist-2OG3PGKO.js → dist-ZBVOXSKF.js} +3 -3
- package/chunks/earlyInputCapture-2EJKJET3.js +109 -0
- package/chunks/{edit-A2633SLR.js → edit-GBDKI5DZ.js} +48 -48
- package/chunks/{en-3RHLPITS.js → en-6MDBWMTG.js} +3 -0
- package/chunks/{enter-worktree-OIAHE2TB.js → enter-worktree-UOZ6ZTP7.js} +7 -8
- package/chunks/{enterPlanMode-SUGIKLR7.js → enterPlanMode-2KTIPPM3.js} +47 -47
- package/chunks/environment-XJ75LJ6N.js +131 -0
- package/chunks/errors-XEI3SJRV.js +115 -0
- package/chunks/{exit-worktree-3UT3SSWT.js → exit-worktree-G2QATUCV.js} +7 -8
- package/chunks/exitPlanMode-AUMYTFIQ.js +85 -0
- package/chunks/{fast-path-3AVP3G35.js → fast-path-TU7U2ETU.js} +28 -7
- package/chunks/{fast-path-settings-WHX3J3ZI.js → fast-path-settings-XMFBYFUH.js} +2 -2
- package/chunks/{fr-4PL5GHG4.js → fr-FTZWF462.js} +1 -0
- package/chunks/{gemini-7PVQWHTH.js → gemini-FKMYDP64.js} +129 -123
- package/chunks/{geminiContentGenerator-B2FOJJDJ.js → geminiContentGenerator-WSHP7CSR.js} +16 -13
- package/chunks/{glob-7YGXE6OV.js → glob-EOM6XK7H.js} +47 -47
- package/chunks/{goal-tools-TLJCE7YZ.js → goal-tools-CNVXMSZD.js} +72 -28
- package/chunks/{grep-6DV6LTON.js → grep-3NLSS32D.js} +6 -6
- package/chunks/handleAutoUpdate-S4CLP36D.js +111 -0
- package/chunks/i18n-XX7U2Q3X.js +126 -0
- package/chunks/{image-gen-7CSCJ73T.js → image-gen-63NN2H5N.js} +9 -11
- package/chunks/initializer-D3CA3272.js +115 -0
- package/chunks/installationInfo-HVDQOSIE.js +109 -0
- package/chunks/{ja-HZ7X7PQO.js → ja-2GL5FKYJ.js} +1 -0
- package/chunks/{keychain-token-storage-MTFTAESK.js → keychain-token-storage-3MGFRYGM.js} +2 -2
- package/chunks/list-XUDSTGT3.js +118 -0
- package/chunks/{list-agents-43XUEXJV.js → list-agents-EXRSHIDJ.js} +2 -2
- package/chunks/loadedSettingsAdapter-ZOJ4QEID.js +112 -0
- package/chunks/{loggingContentGenerator-RNE66CKK.js → loggingContentGenerator-TUDGCVUG.js} +27 -30
- package/chunks/{loop-wakeup-E54KDUXC.js → loop-wakeup-XBPB2BRO.js} +5 -5
- package/chunks/{ls-CGL2UC3H.js → ls-WFONAND2.js} +4 -4
- package/chunks/{lsp-5IKUO5DX.js → lsp-DUKPDUXN.js} +2 -2
- package/chunks/{managed-npm-update-Y3SC3GLJ.js → managed-npm-update-5K4FWFX2.js} +61 -59
- package/chunks/mcp-QJ6AUYE5.js +112 -0
- package/chunks/{monitor-PXYSGSUN.js → monitor-UUHIAGT7.js} +47 -47
- package/chunks/nonInteractiveCli-PAWO75YO.js +185 -0
- package/chunks/{notebook-edit-ISIBJVBR.js → notebook-edit-GZPB3Q57.js} +48 -48
- package/chunks/open-with-auth-4UI3KHUR.js +55 -0
- package/chunks/{openaiContentGenerator-6TBOPEGT.js → openaiContentGenerator-RPP6YBS3.js} +29 -30
- package/chunks/pidfile-RF3WUFKR.js +113 -0
- package/chunks/{processUtils-YK2TDTTU.js → processUtils-ENAY2GSA.js} +2 -2
- package/chunks/prompt-terminal-ledger-4CCXZ2LF.js +107 -0
- package/chunks/{pt-QT5N2Q6Q.js → pt-XN2YWJVM.js} +1 -0
- package/chunks/{qwenContentGenerator-CLDMA2Y4.js → qwenContentGenerator-GLUZVJAU.js} +53 -59
- package/chunks/{qwenOAuth2-DLDR6UC5.js → qwenOAuth2-JIYAWXTW.js} +8 -10
- package/chunks/{read-file-2HOD2ATO.js → read-file-75R5LUWQ.js} +13 -14
- package/chunks/{read-mcp-resource-XYES2B42.js → read-mcp-resource-7A7NFSFL.js} +2 -2
- package/chunks/read-package-up-6T6ICKR7.js +13 -0
- package/chunks/{record-artifact-W3IBTGL7.js → record-artifact-CPJ4IJSD.js} +4 -5
- package/chunks/report-findings-VFM5DENC.js +33 -0
- package/chunks/request-shutdown-AXVOFN5C.js +133 -0
- package/chunks/resumeHistoryUtils-GFPJD2XB.js +120 -0
- package/chunks/ripGrep-FNLXQYBS.js +39 -0
- package/chunks/{ru-STMG5BPD.js → ru-OLTMFJEW.js} +1 -0
- package/chunks/{run-qwen-serve-XJHOW2NY.js → run-qwen-serve-FJD4VMI2.js} +622 -79
- package/chunks/{runtime-J4SPTJRQ.js → runtime-INDSJB4K.js} +73 -71
- package/chunks/{scheduler-VRAEZZ4E.js → scheduler-Z52TCSUG.js} +62 -60
- package/chunks/{sdk-exporters-http-RSIOP3G2.js → sdk-exporters-http-XXSKBD2C.js} +5 -5
- package/chunks/{sdk-impl-CB3KARSK.js → sdk-impl-VPNBLV7I.js} +7 -7
- package/chunks/{send-message-J4VT46OI.js → send-message-A2GXDX3B.js} +10 -31
- package/chunks/serve-GVD2WXVL.js +120 -0
- package/chunks/{server-74ONDK62.js → server-PSN5OOSX.js} +965 -405
- package/chunks/{session-BO6VBWJP.js → session-JPE34X6Q.js} +151 -140
- package/chunks/{settings-35QZNFDG.js → settings-IVGC4UYK.js} +71 -69
- package/chunks/shell-A5PZGPBR.js +95 -0
- package/chunks/{skill-DKEMQSNJ.js → skill-UUXQPDEH.js} +108 -25
- package/chunks/skill-settings-WVRXLTK4.js +120 -0
- package/chunks/spawnChannel-KTURLD4B.js +113 -0
- package/chunks/standalone-update-IRFRNGAA.js +120 -0
- package/chunks/{startInteractiveUI-J2QSGWPU.js → startInteractiveUI-MC4GLL6G.js} +381 -293
- package/chunks/{syntheticOutput-JAXMIMZP.js → syntheticOutput-5AJ444QT.js} +3 -3
- package/chunks/{task-create-I2H322E4.js → task-create-CDJSOEQD.js} +11 -11
- package/chunks/{task-list-3OLIWFTQ.js → task-list-BELMPA75.js} +5 -5
- package/chunks/{task-stop-JAUY6MSY.js → task-stop-U3S3KZG2.js} +2 -2
- package/chunks/{task-update-B3XO4CPI.js → task-update-77VCFDDZ.js} +11 -11
- package/chunks/{team-create-W534PMGX.js → team-create-WO5ZBCFW.js} +48 -48
- package/chunks/{team-delete-Q7GE7RRI.js → team-delete-YWFXX77L.js} +5 -5
- package/chunks/{team-plan-approval-WNV6P6NG.js → team-plan-approval-KAVKRN7U.js} +47 -47
- package/chunks/terminal-image-renderer-SMRRNI6Z.js +116 -0
- package/chunks/theme-manager-A7CPN7F4.js +104 -0
- package/chunks/{todoWrite-FJJTY2TI.js → todoWrite-435EO2CS.js} +4 -4
- package/chunks/{tool-search-Y4KL3LRE.js → tool-search-FBN6OC6U.js} +18 -19
- package/chunks/total-session-admission-B7U6UWKQ.js +114 -0
- package/chunks/trustedFolders-B4LPJBFK.js +124 -0
- package/chunks/{update-relaunch-OHVFN6KF.js → update-relaunch-X5TJVKVG.js} +6 -6
- package/chunks/updateCheck-JCLP5JFT.js +120 -0
- package/chunks/useAutoAcceptIndicator-VBT3NKDM.js +122 -0
- package/chunks/{validateNonInterActiveAuth-WJXH426F.js → validateNonInterActiveAuth-W7HYH5ZN.js} +113 -106
- package/chunks/{version-QMDRADXM.js → version-JG4J76GL.js} +2 -2
- package/chunks/{web-fetch-ROS6P4LP.js → web-fetch-SPLMEDWF.js} +25 -242
- package/chunks/{web-search-JS3E76O6.js → web-search-PNW6OEH6.js} +11 -11
- package/chunks/{web-shell-static-3NUTRHAH.js → web-shell-static-A6QMUNNV.js} +11 -4
- package/chunks/webapi-Z5OM224P.js +4118 -0
- package/chunks/{workflow-2FCMBTBZ.js → workflow-QHOIIXJO.js} +635 -94
- package/chunks/workspace-providers-status-653DTR35.js +116 -0
- package/chunks/{workspace-registration-store-SU4EJKSD.js → workspace-registration-store-H375IYR2.js} +1 -1
- package/chunks/workspace-registry-XTLCD7Z2.js +123 -0
- package/chunks/workspace-service-KVJWACCS.js +131 -0
- package/chunks/workspace-skills-status-TRJ2VWGU.js +115 -0
- package/chunks/{workspace-trust-reconciler-4Y4F7XIX.js → workspace-trust-reconciler-6SC6RKQE.js} +74 -73
- package/chunks/write-file-EAZSJZKR.js +90 -0
- package/chunks/{zh-TW-NX43Z2S2.js → zh-TW-MV4FWFB6.js} +3 -0
- package/chunks/{zh-3JQ75KFU.js → zh-X3WGU6SI.js} +3 -0
- package/chunks/{zoom-image-DNBKCGGF.js → zoom-image-WGNPZ572.js} +13 -14
- package/cli.js +15 -15
- package/locales/ca.js +3 -0
- package/locales/de.js +1 -0
- package/locales/en.js +3 -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 +3 -0
- package/locales/zh.js +3 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DWHXEVlf.js → abnfDiagram-VCTEODGH-yq7z7Anb.js} +1 -1
- package/web-shell/assets/{arc-CXKjm86V.js → arc-CbJO0xnT.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-B_ynI0cX.js → architectureDiagram-5GKGNRK7-CRh89421.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-DMebd9X0.js → blockDiagram-NRAW4CY4-C75KAhKv.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BZ5BlxS-.js → c4Diagram-UCG6FXSJ-BzlMveFB.js} +1 -1
- package/web-shell/assets/channel-B3sGR79J.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-CluJKopE.js → chunk-2Q5K7J3B-DA8QDX3a.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-hzDAPFOo.js → chunk-5VM5RSS4-Bgu7gQ7Y.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-6vHioKJe.js → chunk-F27PBJKO-BOew7pIK.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-B_5hKTGo.js → chunk-G27WJ6UU-DHx1I-hO.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-CO9VoFCH.js → chunk-JWPE2WC7-SarFW0WU.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-7L5JpxYu.js → chunk-LCL6LL3I-BLzP083Z.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-DHLJMAqj.js → chunk-POPQ4Y6H-Bmkv_iKm.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-Dt-4Cqdl.js → chunk-SVP7TREG-MPx9r1N2.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-QlSQ3ssG.js → chunk-XXDRQBXY-Ck-09rKG.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-sTGo0K3v.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-sTGo0K3v.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DMw3EOxl.js → cose-bilkent-JH36ORCC-DWm6lfOG.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-s6vEA7RQ.js → cynefin-OW5HDTMX-DcBUyr5R.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-AOKsvYLt.js → cynefinDiagram-5FMLGOSQ-Df8qmd_p.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-9QAZn3m7.js → dagre-3AP2YEHR-DDmGspD7.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-CWpnu4FN.js → diagram-S7CK7UJ4-BK_qFvbi.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-9l0jXD8q.js → diagram-UQ7AKVKN-Uw3AP_bi.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BMUHroj4.js → diagram-VSXAHHWV-CJOQKxY7.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-Co9x27vm.js → diagram-VX7I27RA-DhdvZna5.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-BKnTeOER.js → diagram-Z3DM3KII-edQU0nlP.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-QBZD9CKG.js → ebnfDiagram-PWID7BFC-4kugBEsO.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-dKWAEGun.js → erDiagram-SSCWMZ5O-BMkFivWO.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-CR_UgVqj.js → flowDiagram-A5DVABFB-BM1ea8g-.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DQUnjWO6.js → ganttDiagram-EL5Y4UJY-CXj_cKRf.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C4j59wPL.js → gitGraphDiagram-WWUBYQGX-D0nEqwqu.js} +1 -1
- package/web-shell/assets/{index-tYXRIPz4.js → index-B6JN54Pd.js} +1 -1
- package/web-shell/assets/{index-BN_m_uHJ.css → index-C-XlQn24.css} +1 -1
- package/web-shell/assets/index-DLjXM0dn.js +1860 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-mzqbt50w.js → infoDiagram-RXCK75RN-DF7aGGbQ.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-ChLOqhGl.js → ishikawaDiagram-5VMMS53U-CZYNX1lL.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-SifZE-R8.js → journeyDiagram-EYS64GPL-CvrqMUz1.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-Sft2qlbc.js → kanban-definition-3QL26DDD-BZNJQZBj.js} +1 -1
- package/web-shell/assets/{layout-O2uHVkPd.js → layout-Bf83x7D6.js} +1 -1
- package/web-shell/assets/{linear-BVqYgjSc.js → linear-Bkc3ES2f.js} +1 -1
- package/web-shell/assets/{mermaid.core-CZ9MQaJ6.js → mermaid.core-C6xuovwz.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-BNQYjBqM.js → mindmap-definition-FBJOCRG2-DzH6gVRg.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-rh1J8uv6.js → pegDiagram-XKGWAZYB-DCvLh2fa.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BQHR5mn9.js → pieDiagram-E7YTZNPT-BtjVlx_6.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CLCbP7mK.js → quadrantDiagram-AXDQQJYC-IbroqxFe.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CDQhrkbm.js → railroadDiagram-O6MQD6OU-BvMykiWW.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BdP9uswg.js → requirementDiagram-EFPCY7ZU-D-HHMyrh.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CFZDFBXF.js → sankeyDiagram-P5KCCOFB-C0XXhB6d.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BW9WOJXI.js → sequenceDiagram-WJ2MYXX4-DseAXj5d.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CPMia32z.js → sizeCapture-X5ZJPWSS-Cek2EweK.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BANp9p7F.js → stateDiagram-HBIQ2CUA-yLv8wafW.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DeThXnol.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-JroXksK-.js → swimlanes-XN3QIQJK-Cwz-opvE.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-GW0R1ZSv.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-DfuVIfYY.js → timeline-definition-24CTP7MA-BJuFD7OG.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-BZXoSjRB.js → vennDiagram-4TSXK5OY-CNAavdoV.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BdiY8avC.js → wardleyDiagram-VM6X3IG4-DaIjAidq.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DcXh_U4H.js → xychartDiagram-S5SC5T6Z-DkcQXjTy.js} +1 -1
- package/web-shell/index.html +19 -4
- package/chunks/MaxSizedBox-3OZJCC3J.js +0 -110
- package/chunks/agent-BFE3DQM3.js +0 -93
- package/chunks/agent-headless-LLVKZZ4P.js +0 -87
- package/chunks/bridge-EBYO4SYM.js +0 -118
- package/chunks/channel-settings-store-5VP2Y2YM.js +0 -115
- package/chunks/chunk-AXMWHKXA.js +0 -42
- package/chunks/chunk-IO257NUD.js +0 -623
- package/chunks/chunk-YHC2EYYG.js +0 -125
- package/chunks/computer-use-EGPWFEX6.js +0 -2142
- package/chunks/config-utils-WZ43VOBS.js +0 -25
- package/chunks/contextCommand-5DSEQI6S.js +0 -106
- package/chunks/daemon-status-provider-EYMLPYJU.js +0 -116
- package/chunks/daemon-trust-policy-CQYKZ7VO.js +0 -112
- package/chunks/deferred-core-runtime-WFEPUXZR.js +0 -114
- package/chunks/earlyInputCapture-PN4PP7V5.js +0 -107
- package/chunks/environment-WUPHLPKZ.js +0 -127
- package/chunks/errors-WPMPVIAT.js +0 -113
- package/chunks/exitPlanMode-MLFHYZNB.js +0 -85
- package/chunks/handleAutoUpdate-F5OTWUT5.js +0 -109
- package/chunks/i18n-C562S6KN.js +0 -124
- package/chunks/initializer-7YPGOFP4.js +0 -113
- package/chunks/installationInfo-ARU5Q2H7.js +0 -107
- package/chunks/list-KTSK275C.js +0 -116
- package/chunks/loadedSettingsAdapter-F3T2EQ5J.js +0 -110
- package/chunks/mcp-6ONTVPAY.js +0 -110
- package/chunks/nonInteractiveCli-KZDWFAN6.js +0 -178
- package/chunks/pidfile-IO7ALSZF.js +0 -111
- package/chunks/prompt-terminal-ledger-TCE7PMCE.js +0 -105
- package/chunks/resumeHistoryUtils-DDSBAQJS.js +0 -118
- package/chunks/ripGrep-E7P6K4QR.js +0 -40
- package/chunks/serve-KEAWV4TI.js +0 -118
- package/chunks/shell-H6K63WG3.js +0 -95
- package/chunks/skill-settings-TCKLXIXM.js +0 -118
- package/chunks/spawnChannel-2K6NKWM5.js +0 -111
- package/chunks/standalone-update-LSCGOEFP.js +0 -118
- package/chunks/terminal-image-renderer-UHX3UD66.js +0 -114
- package/chunks/theme-manager-6B47ZPIF.js +0 -102
- package/chunks/total-session-admission-NSCFWGJH.js +0 -113
- package/chunks/trustedFolders-7XMJWGQ3.js +0 -122
- package/chunks/updateCheck-EOVLHD4T.js +0 -118
- package/chunks/useAutoAcceptIndicator-ZNMIGBTN.js +0 -120
- package/chunks/workspace-providers-status-GPGU5YMT.js +0 -113
- package/chunks/workspace-registry-BQISXT6Y.js +0 -122
- package/chunks/workspace-service-LLY6HCUC.js +0 -129
- package/chunks/workspace-skills-status-L5N2Y3ZP.js +0 -113
- package/chunks/write-file-EJHU2Z3E.js +0 -90
- package/web-shell/assets/channel-Zg3WHgq_.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-C16l9jQz.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-C16l9jQz.js +0 -1
- package/web-shell/assets/index-DrlJu79f.js +0 -1792
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-NZYAoQLU.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3YdVX3vj.js +0 -8
|
@@ -3,116 +3,118 @@
|
|
|
3
3
|
import {
|
|
4
4
|
resolveSavedWorkflowScript,
|
|
5
5
|
writeWorkflowSnapshot
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LRLMDV5X.js";
|
|
7
7
|
import {
|
|
8
8
|
AgentEventEmitter,
|
|
9
9
|
FileDiscoveryService,
|
|
10
10
|
attachJsonlTranscriptWriter,
|
|
11
11
|
buildAgentTranscriptAttach,
|
|
12
|
+
getRuleDisplayName,
|
|
12
13
|
isTerminalWorkflowStatus,
|
|
13
14
|
rebuildToolRegistryOnOverride,
|
|
14
15
|
resolveExternalWorktreeDir,
|
|
16
|
+
resolveToolName,
|
|
15
17
|
toModelVisibleSubagentResult
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-D6XO27Z5.js";
|
|
17
19
|
import "./chunk-GOFAQQZA.js";
|
|
20
|
+
import "./chunk-5M6IDOMF.js";
|
|
18
21
|
import "./chunk-TWPJO254.js";
|
|
19
22
|
import "./chunk-CQ35AJ4Z.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-3UZCLCXR.js";
|
|
24
|
+
import "./chunk-TOF4UZHH.js";
|
|
25
|
+
import "./chunk-O3BUXIPM.js";
|
|
26
|
+
import "./chunk-ZLTEQYNC.js";
|
|
24
27
|
import {
|
|
25
28
|
parsePositiveIntegerEnv
|
|
26
29
|
} from "./chunk-6PVPNMXU.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-DJEHYM4H.js";
|
|
30
|
+
import "./chunk-AYVIGUUK.js";
|
|
29
31
|
import "./chunk-IRH27ZC2.js";
|
|
30
32
|
import "./chunk-QHWCP53L.js";
|
|
31
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-JECO75XD.js";
|
|
32
34
|
import "./chunk-O6GEWCJA.js";
|
|
33
35
|
import "./chunk-T26EAKDL.js";
|
|
34
36
|
import {
|
|
35
37
|
GitWorktreeService,
|
|
36
38
|
generateAgentWorktreeSlug,
|
|
37
39
|
writeWorktreeSessionMarker
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LJP2BBMK.js";
|
|
39
41
|
import "./chunk-CPBF7KYF.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-5Y2JCJAH.js";
|
|
43
|
+
import "./chunk-T2CRBIDJ.js";
|
|
44
|
+
import "./chunk-77TOMRBG.js";
|
|
45
|
+
import "./chunk-DEYPMJPD.js";
|
|
46
|
+
import "./chunk-T6OODF2U.js";
|
|
47
|
+
import "./chunk-27ONXAFY.js";
|
|
48
|
+
import "./chunk-ZEADBZLO.js";
|
|
49
|
+
import "./chunk-FN5C6C7G.js";
|
|
48
50
|
import {
|
|
49
51
|
SUBAGENT_PLAN_LIFECYCLE_TOOLS
|
|
50
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-BVE5EMIG.js";
|
|
51
53
|
import "./chunk-MLXTMF7H.js";
|
|
52
54
|
import "./chunk-NAVJD2PQ.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-FVDQ5E67.js";
|
|
56
|
+
import "./chunk-V3GINY6K.js";
|
|
57
|
+
import "./chunk-QHMLYMMS.js";
|
|
58
|
+
import "./chunk-SDVF6A42.js";
|
|
56
59
|
import "./chunk-P3QQPMQA.js";
|
|
57
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-ILPXSKGQ.js";
|
|
58
61
|
import "./chunk-SAH4BD2J.js";
|
|
59
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-ZKAZP2ZG.js";
|
|
60
63
|
import {
|
|
61
64
|
runWithAgentContext
|
|
62
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-DP7LABIB.js";
|
|
63
66
|
import "./chunk-S6LOFUVP.js";
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-AXMWHKXA.js";
|
|
67
|
+
import "./chunk-2LD5U7Q3.js";
|
|
66
68
|
import {
|
|
67
69
|
createAbortController,
|
|
68
70
|
createChildAbortController
|
|
69
71
|
} from "./chunk-DJ2GSRLV.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
72
|
-
import "./chunk-
|
|
73
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-I6VVOZDK.js";
|
|
73
|
+
import "./chunk-K2OJUPOE.js";
|
|
74
|
+
import "./chunk-CFKIH3D3.js";
|
|
75
|
+
import "./chunk-EB4VDXNI.js";
|
|
76
|
+
import "./chunk-FJWICLG7.js";
|
|
74
77
|
import {
|
|
75
78
|
WorkflowRunEvent,
|
|
76
79
|
logWorkflowRun,
|
|
77
80
|
read,
|
|
78
81
|
writeLine
|
|
79
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-UX3IFLJM.js";
|
|
80
83
|
import "./chunk-YRLW2MSX.js";
|
|
81
84
|
import "./chunk-VGC4I5JJ.js";
|
|
82
|
-
import "./chunk-
|
|
83
|
-
import "./chunk-
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-2E3V7G6Y.js";
|
|
86
|
-
import "./chunk-F6WFNA7U.js";
|
|
85
|
+
import "./chunk-WBT3STGU.js";
|
|
86
|
+
import "./chunk-PVBT5QPD.js";
|
|
87
|
+
import "./chunk-IPQA4SR5.js";
|
|
87
88
|
import "./chunk-WZAD4ZNJ.js";
|
|
88
89
|
import "./chunk-FPGTNKCP.js";
|
|
89
|
-
import "./chunk-
|
|
90
|
-
import "./chunk-
|
|
91
|
-
import "./chunk-
|
|
92
|
-
import "./chunk-
|
|
90
|
+
import "./chunk-SLEWBQWM.js";
|
|
91
|
+
import "./chunk-4X5GYZFO.js";
|
|
92
|
+
import "./chunk-XZA32HII.js";
|
|
93
|
+
import "./chunk-7QGEJI7M.js";
|
|
94
|
+
import "./chunk-GTUKW3I6.js";
|
|
93
95
|
import "./chunk-HHJLM3WQ.js";
|
|
94
96
|
import {
|
|
95
97
|
stripAnsiAndControl
|
|
96
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-6US7BF3G.js";
|
|
97
99
|
import "./chunk-74TONY4F.js";
|
|
98
100
|
import {
|
|
99
101
|
SyntheticOutputTool
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import "./chunk-
|
|
102
|
-
import "./chunk-
|
|
102
|
+
} from "./chunk-VL4YX3FH.js";
|
|
103
|
+
import "./chunk-JUIJ3FXC.js";
|
|
104
|
+
import "./chunk-E6FGMDFQ.js";
|
|
103
105
|
import "./chunk-AQ37AY7B.js";
|
|
104
106
|
import {
|
|
105
107
|
WorkspaceContext
|
|
106
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-RRKNX553.js";
|
|
107
109
|
import {
|
|
108
110
|
BaseDeclarativeTool,
|
|
109
111
|
BaseToolInvocation,
|
|
110
112
|
ToolDisplayNames,
|
|
111
113
|
ToolNames
|
|
112
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-KOJ6MHD5.js";
|
|
113
115
|
import {
|
|
114
116
|
createDebugLogger
|
|
115
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-2NNTE2ED.js";
|
|
116
118
|
import "./chunk-75DOP5OR.js";
|
|
117
119
|
import "./chunk-DMTGGOSA.js";
|
|
118
120
|
import "./chunk-YQ3U5MUC.js";
|
|
@@ -128,15 +130,320 @@ import {
|
|
|
128
130
|
// packages/core/src/tools/workflow/workflow.ts
|
|
129
131
|
init_esbuild_shims();
|
|
130
132
|
|
|
131
|
-
// packages/core/src/agents/runtime/workflow-orchestrator.ts
|
|
132
|
-
init_esbuild_shims();
|
|
133
|
-
import { randomBytes } from "node:crypto";
|
|
134
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
135
|
-
import * as os from "node:os";
|
|
136
|
-
|
|
137
133
|
// packages/core/src/agents/runtime/workflow-sandbox.ts
|
|
138
134
|
init_esbuild_shims();
|
|
139
135
|
import * as vm from "node:vm";
|
|
136
|
+
|
|
137
|
+
// packages/core/src/agents/runtime/workflow-meta-literal.ts
|
|
138
|
+
init_esbuild_shims();
|
|
139
|
+
var WorkflowMetaSyntaxError = class extends Error {
|
|
140
|
+
static {
|
|
141
|
+
__name(this, "WorkflowMetaSyntaxError");
|
|
142
|
+
}
|
|
143
|
+
index;
|
|
144
|
+
constructor(message, index) {
|
|
145
|
+
super(message);
|
|
146
|
+
this.name = "WorkflowMetaSyntaxError";
|
|
147
|
+
this.index = index;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
function parseWorkflowMetaLiteral(source) {
|
|
151
|
+
const parser = new MetaLiteralParser(source);
|
|
152
|
+
parser.skipTrivia();
|
|
153
|
+
const value = parser.parseValue(0);
|
|
154
|
+
parser.skipTrivia();
|
|
155
|
+
if (parser.index < source.length) {
|
|
156
|
+
throw parser.fail("unexpected trailing content");
|
|
157
|
+
}
|
|
158
|
+
return value;
|
|
159
|
+
}
|
|
160
|
+
__name(parseWorkflowMetaLiteral, "parseWorkflowMetaLiteral");
|
|
161
|
+
var MAX_DEPTH = 32;
|
|
162
|
+
var WHITESPACE = /* @__PURE__ */ new Set([" ", " ", "\n", "\r", "\f", "\v", "\xA0", "\uFEFF"]);
|
|
163
|
+
var ID_START = /[A-Za-z_$]/;
|
|
164
|
+
var ID_PART = /[A-Za-z0-9_$]/;
|
|
165
|
+
var MetaLiteralParser = class {
|
|
166
|
+
constructor(src) {
|
|
167
|
+
this.src = src;
|
|
168
|
+
}
|
|
169
|
+
static {
|
|
170
|
+
__name(this, "MetaLiteralParser");
|
|
171
|
+
}
|
|
172
|
+
index = 0;
|
|
173
|
+
fail(message) {
|
|
174
|
+
const from = Math.max(0, this.index - 24);
|
|
175
|
+
const snippet = this.src.slice(from, this.index + 24).replace(/\s+/g, " ").trim();
|
|
176
|
+
return new WorkflowMetaSyntaxError(
|
|
177
|
+
`${message} at position ${this.index} (near "${snippet}"). meta must be a plain object literal \u2014 strings, numbers, booleans, null, arrays and objects only, with no variables, function calls, spreads, accessors or template substitutions.`,
|
|
178
|
+
this.index
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
skipTrivia() {
|
|
182
|
+
for (; ; ) {
|
|
183
|
+
while (this.index < this.src.length && WHITESPACE.has(this.src[this.index])) {
|
|
184
|
+
this.index++;
|
|
185
|
+
}
|
|
186
|
+
if (this.src.startsWith("//", this.index)) {
|
|
187
|
+
let end = this.index + 2;
|
|
188
|
+
while (end < this.src.length && !"\n\r\u2028\u2029".includes(this.src[end])) {
|
|
189
|
+
end++;
|
|
190
|
+
}
|
|
191
|
+
if (this.src[end] === "\r" && this.src[end + 1] === "\n") end++;
|
|
192
|
+
this.index = end < this.src.length ? end + 1 : this.src.length;
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
if (this.src.startsWith("/*", this.index)) {
|
|
196
|
+
const end = this.src.indexOf("*/", this.index + 2);
|
|
197
|
+
if (end === -1) throw this.fail("unterminated comment");
|
|
198
|
+
this.index = end + 2;
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
parseValue(depth) {
|
|
205
|
+
if (depth > MAX_DEPTH) throw this.fail("meta literal is nested too deeply");
|
|
206
|
+
this.skipTrivia();
|
|
207
|
+
const c = this.src[this.index];
|
|
208
|
+
if (c === void 0) throw this.fail("unexpected end of meta literal");
|
|
209
|
+
if (c === "{") return this.parseObject(depth);
|
|
210
|
+
if (c === "[") return this.parseArray(depth);
|
|
211
|
+
if (c === '"' || c === "'" || c === "`") return this.parseString();
|
|
212
|
+
if (c === "-" || c >= "0" && c <= "9") return this.parseNumber();
|
|
213
|
+
if (this.src.startsWith("true", this.index)) return this.word("true", true);
|
|
214
|
+
if (this.src.startsWith("false", this.index)) {
|
|
215
|
+
return this.word("false", false);
|
|
216
|
+
}
|
|
217
|
+
if (this.src.startsWith("null", this.index)) return this.word("null", null);
|
|
218
|
+
if (c === "/")
|
|
219
|
+
throw this.fail("regular expressions are not allowed in meta");
|
|
220
|
+
throw this.fail("unsupported value");
|
|
221
|
+
}
|
|
222
|
+
word(literal, value) {
|
|
223
|
+
const after = this.src[this.index + literal.length];
|
|
224
|
+
if (after !== void 0 && ID_PART.test(after)) {
|
|
225
|
+
throw this.fail("unsupported value");
|
|
226
|
+
}
|
|
227
|
+
this.index += literal.length;
|
|
228
|
+
return value;
|
|
229
|
+
}
|
|
230
|
+
parseObject(depth) {
|
|
231
|
+
this.index++;
|
|
232
|
+
const out = /* @__PURE__ */ Object.create(null);
|
|
233
|
+
for (; ; ) {
|
|
234
|
+
this.skipTrivia();
|
|
235
|
+
const c = this.src[this.index];
|
|
236
|
+
if (c === "}") {
|
|
237
|
+
this.index++;
|
|
238
|
+
return out;
|
|
239
|
+
}
|
|
240
|
+
if (c === void 0) throw this.fail("unterminated object");
|
|
241
|
+
if (this.src.startsWith("...", this.index)) {
|
|
242
|
+
throw this.fail("spread is not allowed in meta");
|
|
243
|
+
}
|
|
244
|
+
if (c === "[") throw this.fail("computed keys are not allowed in meta");
|
|
245
|
+
const key = this.parseKey();
|
|
246
|
+
this.skipTrivia();
|
|
247
|
+
if (this.src[this.index] === "(") {
|
|
248
|
+
throw this.fail("methods are not allowed in meta");
|
|
249
|
+
}
|
|
250
|
+
if (this.src[this.index] !== ":")
|
|
251
|
+
throw this.fail('expected ":" after key');
|
|
252
|
+
this.index++;
|
|
253
|
+
out[key] = this.parseValue(depth + 1);
|
|
254
|
+
this.skipTrivia();
|
|
255
|
+
if (this.src[this.index] === ",") {
|
|
256
|
+
this.index++;
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
if (this.src[this.index] === "}") {
|
|
260
|
+
this.index++;
|
|
261
|
+
return out;
|
|
262
|
+
}
|
|
263
|
+
throw this.fail('expected "," or "}"');
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
parseKey() {
|
|
267
|
+
const c = this.src[this.index];
|
|
268
|
+
if (c === '"' || c === "'" || c === "`") return this.parseString();
|
|
269
|
+
if (c !== void 0 && ID_START.test(c)) {
|
|
270
|
+
const start = this.index;
|
|
271
|
+
while (this.index < this.src.length && ID_PART.test(this.src[this.index])) {
|
|
272
|
+
this.index++;
|
|
273
|
+
}
|
|
274
|
+
const word = this.src.slice(start, this.index);
|
|
275
|
+
if (word === "get" || word === "set" || word === "async") {
|
|
276
|
+
const save = this.index;
|
|
277
|
+
this.skipTrivia();
|
|
278
|
+
const next = this.src[this.index];
|
|
279
|
+
const startsPropertyName = next !== void 0 && (ID_START.test(next) || next === '"' || next === "'" || next === "[");
|
|
280
|
+
this.index = save;
|
|
281
|
+
if (startsPropertyName) {
|
|
282
|
+
throw this.fail(
|
|
283
|
+
word === "async" ? "async members are not allowed in meta" : `${word}ters are not allowed in meta`
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return word;
|
|
288
|
+
}
|
|
289
|
+
throw this.fail("expected a property name");
|
|
290
|
+
}
|
|
291
|
+
parseArray(depth) {
|
|
292
|
+
this.index++;
|
|
293
|
+
const out = [];
|
|
294
|
+
for (; ; ) {
|
|
295
|
+
this.skipTrivia();
|
|
296
|
+
const c = this.src[this.index];
|
|
297
|
+
if (c === "]") {
|
|
298
|
+
this.index++;
|
|
299
|
+
return out;
|
|
300
|
+
}
|
|
301
|
+
if (c === void 0) throw this.fail("unterminated array");
|
|
302
|
+
if (this.src.startsWith("...", this.index)) {
|
|
303
|
+
throw this.fail("spread is not allowed in meta");
|
|
304
|
+
}
|
|
305
|
+
if (c === ",") throw this.fail("missing array element");
|
|
306
|
+
out.push(this.parseValue(depth + 1));
|
|
307
|
+
this.skipTrivia();
|
|
308
|
+
if (this.src[this.index] === ",") {
|
|
309
|
+
this.index++;
|
|
310
|
+
continue;
|
|
311
|
+
}
|
|
312
|
+
if (this.src[this.index] === "]") {
|
|
313
|
+
this.index++;
|
|
314
|
+
return out;
|
|
315
|
+
}
|
|
316
|
+
throw this.fail('expected "," or "]"');
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
parseString() {
|
|
320
|
+
const quote = this.src[this.index++];
|
|
321
|
+
let out = "";
|
|
322
|
+
for (; ; ) {
|
|
323
|
+
const c = this.src[this.index];
|
|
324
|
+
if (c === void 0) throw this.fail("unterminated string");
|
|
325
|
+
if (c === quote) {
|
|
326
|
+
this.index++;
|
|
327
|
+
return out;
|
|
328
|
+
}
|
|
329
|
+
if (c === "\n" || c === "\r") {
|
|
330
|
+
if (quote !== "`") throw this.fail("unterminated string");
|
|
331
|
+
if (c === "\r") {
|
|
332
|
+
this.index++;
|
|
333
|
+
if (this.src[this.index] === "\n") this.index++;
|
|
334
|
+
out += "\n";
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
if (quote === "`" && c === "$" && this.src[this.index + 1] === "{") {
|
|
339
|
+
throw this.fail("template substitutions are not allowed in meta");
|
|
340
|
+
}
|
|
341
|
+
if (c === "\\") {
|
|
342
|
+
out += this.parseEscape();
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
out += c;
|
|
346
|
+
this.index++;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
parseEscape() {
|
|
350
|
+
this.index++;
|
|
351
|
+
const c = this.src[this.index++];
|
|
352
|
+
switch (c) {
|
|
353
|
+
case "n":
|
|
354
|
+
return "\n";
|
|
355
|
+
case "t":
|
|
356
|
+
return " ";
|
|
357
|
+
case "r":
|
|
358
|
+
return "\r";
|
|
359
|
+
case "b":
|
|
360
|
+
return "\b";
|
|
361
|
+
case "f":
|
|
362
|
+
return "\f";
|
|
363
|
+
case "v":
|
|
364
|
+
return "\v";
|
|
365
|
+
case "0":
|
|
366
|
+
if (/[0-9]/.test(this.src[this.index] ?? "")) {
|
|
367
|
+
throw this.fail("octal escapes are not allowed in meta");
|
|
368
|
+
}
|
|
369
|
+
return "\0";
|
|
370
|
+
case "x": {
|
|
371
|
+
const hex = this.src.slice(this.index, this.index + 2);
|
|
372
|
+
if (!/^[0-9a-fA-F]{2}$/.test(hex)) {
|
|
373
|
+
throw this.fail("invalid \\x escape");
|
|
374
|
+
}
|
|
375
|
+
this.index += 2;
|
|
376
|
+
return String.fromCharCode(parseInt(hex, 16));
|
|
377
|
+
}
|
|
378
|
+
case "u": {
|
|
379
|
+
if (this.src[this.index] === "{") {
|
|
380
|
+
const end = this.src.indexOf("}", this.index);
|
|
381
|
+
const hex2 = end === -1 ? "" : this.src.slice(this.index + 1, end);
|
|
382
|
+
if (!/^[0-9a-fA-F]{1,6}$/.test(hex2)) {
|
|
383
|
+
throw this.fail("invalid \\u{...} escape");
|
|
384
|
+
}
|
|
385
|
+
const code = parseInt(hex2, 16);
|
|
386
|
+
if (code > 1114111) throw this.fail("invalid \\u{...} escape");
|
|
387
|
+
this.index = end + 1;
|
|
388
|
+
return String.fromCodePoint(code);
|
|
389
|
+
}
|
|
390
|
+
const hex = this.src.slice(this.index, this.index + 4);
|
|
391
|
+
if (!/^[0-9a-fA-F]{4}$/.test(hex)) {
|
|
392
|
+
throw this.fail("invalid \\u escape");
|
|
393
|
+
}
|
|
394
|
+
this.index += 4;
|
|
395
|
+
return String.fromCharCode(parseInt(hex, 16));
|
|
396
|
+
}
|
|
397
|
+
case "\n":
|
|
398
|
+
return "";
|
|
399
|
+
// line continuation
|
|
400
|
+
case "\r":
|
|
401
|
+
if (this.src[this.index] === "\n") this.index++;
|
|
402
|
+
return "";
|
|
403
|
+
case "\u2028":
|
|
404
|
+
case "\u2029":
|
|
405
|
+
return "";
|
|
406
|
+
case void 0:
|
|
407
|
+
throw this.fail("unterminated escape sequence");
|
|
408
|
+
default:
|
|
409
|
+
return c;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
parseNumber() {
|
|
413
|
+
const start = this.index;
|
|
414
|
+
if (this.src[this.index] === "-") this.index++;
|
|
415
|
+
while (this.index < this.src.length && /[0-9]/.test(this.src[this.index])) {
|
|
416
|
+
this.index++;
|
|
417
|
+
}
|
|
418
|
+
if (this.src[this.index] === ".") {
|
|
419
|
+
this.index++;
|
|
420
|
+
while (this.index < this.src.length && /[0-9]/.test(this.src[this.index])) {
|
|
421
|
+
this.index++;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (this.src[this.index] === "e" || this.src[this.index] === "E") {
|
|
425
|
+
this.index++;
|
|
426
|
+
if (this.src[this.index] === "+" || this.src[this.index] === "-") {
|
|
427
|
+
this.index++;
|
|
428
|
+
}
|
|
429
|
+
while (this.index < this.src.length && /[0-9]/.test(this.src[this.index])) {
|
|
430
|
+
this.index++;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const after = this.src[this.index];
|
|
434
|
+
if (after !== void 0 && ID_PART.test(after)) {
|
|
435
|
+
throw this.fail("unsupported numeric literal");
|
|
436
|
+
}
|
|
437
|
+
const text = this.src.slice(start, this.index);
|
|
438
|
+
const value = Number(text);
|
|
439
|
+
if (text.length === 0 || !Number.isFinite(value)) {
|
|
440
|
+
throw this.fail("unsupported numeric literal");
|
|
441
|
+
}
|
|
442
|
+
return value;
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
// packages/core/src/agents/runtime/workflow-sandbox.ts
|
|
140
447
|
function findMetaBlockBounds(source) {
|
|
141
448
|
const re = /^\s*export\s+const\s+meta\s*=\s*\{/;
|
|
142
449
|
const match = re.exec(source);
|
|
@@ -195,7 +502,7 @@ function findMetaBlockBounds(source) {
|
|
|
195
502
|
}
|
|
196
503
|
if (depth !== 0) {
|
|
197
504
|
throw new Error(
|
|
198
|
-
"
|
|
505
|
+
"unbalanced braces in export const meta declaration \u2014 the workflow script cannot be safely stripped. Check the meta block syntax."
|
|
199
506
|
);
|
|
200
507
|
}
|
|
201
508
|
const endBraceIncl = i - 1;
|
|
@@ -208,45 +515,86 @@ function extractAndStripMeta(source) {
|
|
|
208
515
|
if (!bounds) return { stripped: source, meta: null };
|
|
209
516
|
const metaSource = source.slice(bounds.startBrace, bounds.endBraceIncl + 1);
|
|
210
517
|
const stripped = source.slice(0, bounds.exportIdx) + source.slice(bounds.afterMeta);
|
|
211
|
-
const metaContext = vm.createContext(/* @__PURE__ */ Object.create(null));
|
|
212
518
|
let raw;
|
|
213
519
|
try {
|
|
214
|
-
raw =
|
|
520
|
+
raw = parseWorkflowMetaLiteral(metaSource);
|
|
215
521
|
} catch (e) {
|
|
216
522
|
const msg = e instanceof Error ? e.message : String(e);
|
|
217
|
-
throw new Error(
|
|
218
|
-
`extractAndStripMeta: failed to evaluate meta object literal: ${msg}`
|
|
219
|
-
);
|
|
523
|
+
throw new Error(`invalid meta object literal: ${msg}`);
|
|
220
524
|
}
|
|
221
|
-
rejectThenablesInMeta(raw);
|
|
222
525
|
const meta = validateMeta(raw);
|
|
223
526
|
return { stripped, meta };
|
|
224
527
|
}
|
|
225
528
|
__name(extractAndStripMeta, "extractAndStripMeta");
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
if (Array.isArray(value)) {
|
|
242
|
-
for (const v of value) rejectThenablesInMeta(v, seen);
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
for (const v of Object.values(value)) {
|
|
246
|
-
rejectThenablesInMeta(v, seen);
|
|
247
|
-
}
|
|
529
|
+
var WORKFLOW_SCRIPT_FILENAME = "workflow.js";
|
|
530
|
+
function wrapWorkflowBody(strippedSource) {
|
|
531
|
+
return `(async () => {'use strict';
|
|
532
|
+
${strippedSource}
|
|
533
|
+
})()`;
|
|
534
|
+
}
|
|
535
|
+
__name(wrapWorkflowBody, "wrapWorkflowBody");
|
|
536
|
+
function compileWorkflowScript(scriptSource) {
|
|
537
|
+
const { stripped, meta } = extractAndStripMeta(scriptSource);
|
|
538
|
+
const bounds = findMetaBlockBounds(scriptSource);
|
|
539
|
+
const compilable = bounds ? scriptSource.slice(0, bounds.exportIdx) + scriptSource.slice(bounds.exportIdx, bounds.afterMeta).replace(/[^\r\n\u2028\u2029]/g, " ") + scriptSource.slice(bounds.afterMeta) : stripped;
|
|
540
|
+
const script = new vm.Script(wrapWorkflowBody(compilable), {
|
|
541
|
+
filename: WORKFLOW_SCRIPT_FILENAME
|
|
542
|
+
});
|
|
543
|
+
return { script, meta };
|
|
248
544
|
}
|
|
249
|
-
__name(
|
|
545
|
+
__name(compileWorkflowScript, "compileWorkflowScript");
|
|
546
|
+
var COMPILE_ERROR_LINE_WIDTH = 80;
|
|
547
|
+
function describeWorkflowCompileError(error, authorLineCount) {
|
|
548
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
549
|
+
const stack = typeof err.stack === "string" ? err.stack : "";
|
|
550
|
+
const frame = [];
|
|
551
|
+
for (const line of stack.split("\n")) {
|
|
552
|
+
if (frame.length >= 3 && /^\s+at\s/.test(line)) break;
|
|
553
|
+
frame.push(line);
|
|
554
|
+
}
|
|
555
|
+
const header = frame[0] ?? "";
|
|
556
|
+
const match = /^.*?:(\d+)$/.exec(header);
|
|
557
|
+
if (frame.length < 3 || !match) {
|
|
558
|
+
return err.message;
|
|
559
|
+
}
|
|
560
|
+
const bodyLine = Number(match[1]) - 1;
|
|
561
|
+
if (bodyLine < 1) return err.message;
|
|
562
|
+
if (bodyLine > authorLineCount) {
|
|
563
|
+
return "The script ends with unmatched or incomplete syntax. Check parentheses, brackets, braces, quotes, and template literals near the end.";
|
|
564
|
+
}
|
|
565
|
+
const rendered = clampSourceFrame(frame[1] ?? "", frame[2] ?? "");
|
|
566
|
+
const tail = frame.slice(3).filter((l) => l.trim().length > 0).join("\n");
|
|
567
|
+
return [`line ${bodyLine}`, rendered, tail].filter(Boolean).join("\n");
|
|
568
|
+
}
|
|
569
|
+
__name(describeWorkflowCompileError, "describeWorkflowCompileError");
|
|
570
|
+
function clampSourceFrame(sourceLine, caretLine) {
|
|
571
|
+
if (sourceLine.length <= COMPILE_ERROR_LINE_WIDTH) {
|
|
572
|
+
return `${sourceLine}
|
|
573
|
+
${caretLine}`;
|
|
574
|
+
}
|
|
575
|
+
const caret = /\^+/.exec(caretLine);
|
|
576
|
+
if (!caret) return "";
|
|
577
|
+
const caretCol = caret.index;
|
|
578
|
+
const start = Math.max(
|
|
579
|
+
0,
|
|
580
|
+
Math.min(
|
|
581
|
+
caretCol - Math.floor(COMPILE_ERROR_LINE_WIDTH / 2),
|
|
582
|
+
sourceLine.length - COMPILE_ERROR_LINE_WIDTH
|
|
583
|
+
)
|
|
584
|
+
);
|
|
585
|
+
const prefix = start > 0 ? "\u2026" : "";
|
|
586
|
+
const window = sourceLine.slice(start, start + COMPILE_ERROR_LINE_WIDTH);
|
|
587
|
+
const suffix = start + COMPILE_ERROR_LINE_WIDTH < sourceLine.length ? "\u2026" : "";
|
|
588
|
+
const visibleCaretStart = Math.max(caretCol, start);
|
|
589
|
+
const visibleCaretEnd = Math.min(
|
|
590
|
+
caretCol + caret[0].length,
|
|
591
|
+
start + COMPILE_ERROR_LINE_WIDTH
|
|
592
|
+
);
|
|
593
|
+
const shiftedCaret = " ".repeat(prefix.length + visibleCaretStart - start) + "^".repeat(visibleCaretEnd - visibleCaretStart);
|
|
594
|
+
return `${prefix}${window}${suffix}
|
|
595
|
+
${shiftedCaret}`;
|
|
596
|
+
}
|
|
597
|
+
__name(clampSourceFrame, "clampSourceFrame");
|
|
250
598
|
function validateMeta(value) {
|
|
251
599
|
if (value === null || typeof value !== "object") {
|
|
252
600
|
throw new Error("meta must be an object");
|
|
@@ -1283,14 +1631,8 @@ function createWorkflowSandbox(opts) {
|
|
|
1283
1631
|
let rearmWatchdogOnAbort;
|
|
1284
1632
|
process.on("unhandledRejection", adoptionEscapeHook);
|
|
1285
1633
|
try {
|
|
1286
|
-
const {
|
|
1634
|
+
const { script, meta } = compileWorkflowScript(scriptSource);
|
|
1287
1635
|
extractedMeta = meta;
|
|
1288
|
-
const wrapped = `(async () => {
|
|
1289
|
-
${stripped}
|
|
1290
|
-
})()`;
|
|
1291
|
-
const script = new vm.Script(wrapped, {
|
|
1292
|
-
filename: "workflow.js"
|
|
1293
|
-
});
|
|
1294
1636
|
const runOpts = {
|
|
1295
1637
|
timeout: 3e4
|
|
1296
1638
|
};
|
|
@@ -1341,6 +1683,12 @@ ${stripped}
|
|
|
1341
1683
|
}
|
|
1342
1684
|
__name(createWorkflowSandbox, "createWorkflowSandbox");
|
|
1343
1685
|
|
|
1686
|
+
// packages/core/src/agents/runtime/workflow-orchestrator.ts
|
|
1687
|
+
init_esbuild_shims();
|
|
1688
|
+
import { randomBytes } from "node:crypto";
|
|
1689
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
1690
|
+
import * as os from "node:os";
|
|
1691
|
+
|
|
1344
1692
|
// packages/core/src/agents/runtime/workflow-budget.ts
|
|
1345
1693
|
init_esbuild_shims();
|
|
1346
1694
|
var debugLogger2 = createDebugLogger("WORKFLOW_BUDGET");
|
|
@@ -1428,7 +1776,7 @@ var WorkflowBudgetExceededError = class extends Error {
|
|
|
1428
1776
|
|
|
1429
1777
|
// packages/core/src/agents/runtime/workflow-stall.ts
|
|
1430
1778
|
init_esbuild_shims();
|
|
1431
|
-
var DEFAULT_STALL_MS =
|
|
1779
|
+
var DEFAULT_STALL_MS = 18e4;
|
|
1432
1780
|
var MAX_STALL_ATTEMPTS = 3;
|
|
1433
1781
|
var MAX_WORKFLOW_STALL_MS_ENV = "QWEN_CODE_WORKFLOW_STALL_SECONDS";
|
|
1434
1782
|
function resolveStallMs(perCall, env = process.env) {
|
|
@@ -2002,7 +2350,7 @@ function attachDispatchTranscript(config, agentId, prompt, agentName, emitter, a
|
|
|
2002
2350
|
}
|
|
2003
2351
|
__name(attachDispatchTranscript, "attachDispatchTranscript");
|
|
2004
2352
|
async function runSingleDispatch(config, prompt, opts, attemptSignal, emitter, workflowAgentId, agentIdentity, onTokens) {
|
|
2005
|
-
const { AgentHeadless, ContextState } = await import("./agent-headless-
|
|
2353
|
+
const { AgentHeadless, ContextState } = await import("./agent-headless-3ZC4LX3E.js");
|
|
2006
2354
|
const ctx = new ContextState();
|
|
2007
2355
|
ctx.set("task_prompt", prompt);
|
|
2008
2356
|
debugLogger.debug(`[workflow] Dispatch ${workflowAgentId}`);
|
|
@@ -2897,6 +3245,21 @@ var WorkflowRunHandle = class {
|
|
|
2897
3245
|
return this.scheduler.resume();
|
|
2898
3246
|
}
|
|
2899
3247
|
};
|
|
3248
|
+
var WorkflowScriptNotLaunchedError = class extends Error {
|
|
3249
|
+
constructor(detail) {
|
|
3250
|
+
super(
|
|
3251
|
+
`Workflow script is invalid and was not launched:
|
|
3252
|
+
${detail}
|
|
3253
|
+
|
|
3254
|
+
Workflow scripts must be plain JavaScript \u2014 the usual causes are TypeScript syntax (type annotations, interfaces, generics) and broken string quoting or escaping. Metadata must use literal values.`
|
|
3255
|
+
);
|
|
3256
|
+
this.detail = detail;
|
|
3257
|
+
this.name = "WorkflowScriptNotLaunchedError";
|
|
3258
|
+
}
|
|
3259
|
+
static {
|
|
3260
|
+
__name(this, "WorkflowScriptNotLaunchedError");
|
|
3261
|
+
}
|
|
3262
|
+
};
|
|
2900
3263
|
var WorkflowRunner = class {
|
|
2901
3264
|
static {
|
|
2902
3265
|
__name(this, "WorkflowRunner");
|
|
@@ -2911,6 +3274,16 @@ var WorkflowRunner = class {
|
|
|
2911
3274
|
) : void 0;
|
|
2912
3275
|
const script = loaded?.script ?? options.script ?? "";
|
|
2913
3276
|
const scriptPath = loaded?.scriptPath ?? options.scriptPath;
|
|
3277
|
+
try {
|
|
3278
|
+
compileWorkflowScript(script);
|
|
3279
|
+
} catch (error) {
|
|
3280
|
+
throw new WorkflowScriptNotLaunchedError(
|
|
3281
|
+
describeWorkflowCompileError(
|
|
3282
|
+
error,
|
|
3283
|
+
script.split(/\r\n|[\n\r\u2028\u2029]/).length
|
|
3284
|
+
)
|
|
3285
|
+
);
|
|
3286
|
+
}
|
|
2914
3287
|
const runId = options.resumeFromRunId ?? `wf_${randomBytes2(8).toString("hex")}`;
|
|
2915
3288
|
const storage = config.storage;
|
|
2916
3289
|
const journal = storage ? new WorkflowJournal(storage.getWorkflowRunJournalPath(runId)) : void 0;
|
|
@@ -3110,7 +3483,7 @@ var WORKFLOW_PARAM_SCHEMA = {
|
|
|
3110
3483
|
properties: {
|
|
3111
3484
|
script: {
|
|
3112
3485
|
type: "string",
|
|
3113
|
-
description: `JavaScript source of the workflow. Wrapped as an async IIFE. May call the injected globals \`phase(title)\`, \`log(msg)\`, \`agent(prompt, opts?)\`, and read \`args\`. agent() opts: \`{ label?, phase?, schema?, model?, agentType?, isolation?, workingDir?, stallMs? }\`. \`schema\` (JSON Schema object): the subagent must deliver its result by calling \`structured_output\` with arguments matching the schema; agent() resolves to the validated object. Two failed attempts produce a terminal error "subagent completed without calling StructuredOutput (after 2 in-conversation nudges)". \`agentType\` (string): resolves against the declarative-agents registry (\`.qwen/agents/<name>.md\`, project then user then built-in). Unresolved names throw "agent({agentType}): agent type 'X' not found". \`model\` (string): per-call model override; routes provider correctly via the subagent runtime view. \`isolation\`: \`'worktree'\` provisions a fresh git worktree under \`<projectRoot>/.qwen/worktrees/agent-<7hex>\`; the worktree is auto-removed if no changes, otherwise the path and branch are returned alongside the result. \`'remote'\` throws "agent({isolation:'remote'}) is not available in this build" (parity with upstream). isolation=worktree refuses to run when the parent working tree has uncommitted changes (the subagent would see a stale HEAD). \`workingDir\` (string): pin the subagent to an EXISTING git worktree of this repository that the caller owns \u2014 nothing is created and nothing is removed. Use it when the directory the agent must work in already exists and its uncommitted state is the point (a review worktree, a checkout a previous step provisioned) \u2014 exactly the case isolation cannot serve. Mutually exclusive with \`isolation\`. The path must be a linked worktree of this repository registered via \`git worktree add\` (it may live anywhere on disk) \u2014 the main checkout is not eligible. \`stallMs\` (number, ms): a no-progress watchdog, not a wall-clock cap. The dispatch is aborted and retried (up to ${MAX_STALL_ATTEMPTS} attempts total) after this many milliseconds with no observable subagent progress
|
|
3486
|
+
description: `JavaScript source of the workflow. Wrapped as an async IIFE. May call the injected globals \`phase(title)\`, \`log(msg)\`, \`agent(prompt, opts?)\`, and read \`args\`. agent() opts: \`{ label?, phase?, schema?, model?, agentType?, isolation?, workingDir?, stallMs? }\`. \`schema\` (JSON Schema object): the subagent must deliver its result by calling \`structured_output\` with arguments matching the schema; agent() resolves to the validated object. Two failed attempts produce a terminal error "subagent completed without calling StructuredOutput (after 2 in-conversation nudges)". \`agentType\` (string): resolves against the declarative-agents registry (\`.qwen/agents/<name>.md\`, project then user then built-in). Unresolved names throw "agent({agentType}): agent type 'X' not found". \`model\` (string): per-call model override; routes provider correctly via the subagent runtime view. \`isolation\`: \`'worktree'\` provisions a fresh git worktree under \`<projectRoot>/.qwen/worktrees/agent-<7hex>\`; the worktree is auto-removed if no changes, otherwise the path and branch are returned alongside the result. \`'remote'\` throws "agent({isolation:'remote'}) is not available in this build" (parity with upstream). isolation=worktree refuses to run when the parent working tree has uncommitted changes (the subagent would see a stale HEAD). \`workingDir\` (string): pin the subagent to an EXISTING git worktree of this repository that the caller owns \u2014 nothing is created and nothing is removed. Use it when the directory the agent must work in already exists and its uncommitted state is the point (a review worktree, a checkout a previous step provisioned) \u2014 exactly the case isolation cannot serve. Mutually exclusive with \`isolation\`. The path must be a linked worktree of this repository registered via \`git worktree add\` (it may live anywhere on disk) \u2014 the main checkout is not eligible. \`stallMs\` (number, ms): a no-progress watchdog, not a wall-clock cap. The dispatch is aborted and retried (up to ${MAX_STALL_ATTEMPTS} attempts total) after this many milliseconds with no observable subagent progress \u2014 including before the first response arrives; the timer is suspended while a tool is in flight, so a legitimately slow tool is not a stall. Default ${DEFAULT_STALL_MS} (override via \`${MAX_WORKFLOW_STALL_MS_ENV}\`, whole seconds); \`0\` disables the watchdog. Wall time per attempt is bounded separately. Workflow subagents always have SendMessage / Monitor / EnterPlanMode / ExitPlanMode in their disallowed-tool floor regardless of agentType. Concurrency: \`parallel([() => agent(...), ...])\` runs thunks through a shared per-run window (default \`max(1, min(16, cpus-2))\` agents in flight; override via \`${MAX_WORKFLOW_CONCURRENCY_ENV}\`) and resolves to a position-aligned array \u2014 a thunk that throws, or resolves to a non-JSON-serializable value, becomes \`null\` at its index (errors-as-data); parallel() itself rejects only on invalid arguments or abort. \`pipeline(items, ...stages)\` runs each item through the stages (staggered, no inter-stage barrier); a stage that throws, returns \`null\`, or returns a non-JSON-serializable value drops that item to \`null\`. Pass THUNKS to parallel, not eager calls: \`parallel([() => agent(...)])\`, not \`parallel([agent(...)])\`. At most ${DEFAULT_MAX_AGENTS_PER_RUN} agent() calls per run (override via \`${MAX_WORKFLOW_AGENTS_ENV}\`). \`Date.now()\` and \`Math.random()\` both throw \u2014 workflow scripts must be deterministic for resume. \`export const meta = {...}\` declarations are stripped before execution.`
|
|
3114
3487
|
},
|
|
3115
3488
|
scriptPath: {
|
|
3116
3489
|
type: "string",
|
|
@@ -3147,7 +3520,23 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
|
|
|
3147
3520
|
setCallId(callId) {
|
|
3148
3521
|
this.callId = callId;
|
|
3149
3522
|
}
|
|
3523
|
+
/**
|
|
3524
|
+
* Cache so the transcript header and the approval dialog cannot disagree,
|
|
3525
|
+
* and so an oversized script is scanned once per invocation rather than
|
|
3526
|
+
* once per surface that asks.
|
|
3527
|
+
*/
|
|
3528
|
+
metaCache;
|
|
3529
|
+
resolveMeta() {
|
|
3530
|
+
if (this.metaCache === void 0) {
|
|
3531
|
+
this.metaCache = this.params.script ? readMetaForConfirmation(this.params.script) : null;
|
|
3532
|
+
}
|
|
3533
|
+
return this.metaCache;
|
|
3534
|
+
}
|
|
3150
3535
|
getDescription() {
|
|
3536
|
+
const meta = this.resolveMeta();
|
|
3537
|
+
if (meta) {
|
|
3538
|
+
return `Run workflow: ${sanitizeLine(meta.name)}`;
|
|
3539
|
+
}
|
|
3151
3540
|
if (this.params.scriptPath && this.params.script === void 0) {
|
|
3152
3541
|
return `Run saved workflow (${path.basename(this.params.scriptPath)})`;
|
|
3153
3542
|
}
|
|
@@ -3159,6 +3548,54 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
|
|
|
3159
3548
|
getDefaultPermission() {
|
|
3160
3549
|
return Promise.resolve("ask");
|
|
3161
3550
|
}
|
|
3551
|
+
/**
|
|
3552
|
+
* Show what is about to run, and scope the grant that approves it.
|
|
3553
|
+
*
|
|
3554
|
+
* Without this override the base class renders `Confirm WorkflowTool` over
|
|
3555
|
+
* `Run a workflow script (4127 chars)` — a character count standing in for
|
|
3556
|
+
* arbitrary model-authored JavaScript that may fan out to
|
|
3557
|
+
* `DEFAULT_MAX_AGENTS_PER_RUN` subagents, provision git worktrees and spend
|
|
3558
|
+
* an uncapped token budget. The asymmetry is visible within one run: the
|
|
3559
|
+
* subagent approvals this workflow bubbles up each get a full dialog.
|
|
3560
|
+
*
|
|
3561
|
+
* Two properties of the grant matter as much as the disclosure:
|
|
3562
|
+
*
|
|
3563
|
+
* - An inline `script` can never be pre-approved. It is fresh
|
|
3564
|
+
* model-authored source every time, so a blanket "always allow" would
|
|
3565
|
+
* transfer consent from the script the user read to every script the
|
|
3566
|
+
* model writes afterwards. `hideAlwaysAllow` removes the option and the
|
|
3567
|
+
* empty `permissionRules` stops `injectPermissionRulesIfMissing` from
|
|
3568
|
+
* supplying the bare-tool-name rule, which `buildPermissionRules`
|
|
3569
|
+
* documents as matching *all* invocations.
|
|
3570
|
+
* - A `scriptPath` names a file on disk that the user chose, so it can be
|
|
3571
|
+
* pre-approved — but scoped to that path. The rule is built with the
|
|
3572
|
+
* same helpers the matcher uses so a tool rename moves both sides.
|
|
3573
|
+
*/
|
|
3574
|
+
getConfirmationDetails(_abortSignal) {
|
|
3575
|
+
const meta = this.resolveMeta();
|
|
3576
|
+
const body = buildConfirmationPrompt(this.params, meta);
|
|
3577
|
+
const banner = resolveUsageBanner(
|
|
3578
|
+
this.config,
|
|
3579
|
+
this.config.getWorkflowRunRegistry?.(),
|
|
3580
|
+
resolveMaxTokensPerWorkflow()
|
|
3581
|
+
);
|
|
3582
|
+
const isInlineScript = this.params.script !== void 0;
|
|
3583
|
+
const details = {
|
|
3584
|
+
type: "info",
|
|
3585
|
+
title: "Run a dynamic workflow?",
|
|
3586
|
+
prompt: banner ? `${banner}${body}` : body,
|
|
3587
|
+
// The body is a script excerpt and a phase list: rendering it as
|
|
3588
|
+
// Markdown would swallow the very characters the reader needs to see.
|
|
3589
|
+
renderPromptAsPlainText: true,
|
|
3590
|
+
hideAlwaysAllow: isInlineScript,
|
|
3591
|
+
permissionRules: isInlineScript ? [] : [
|
|
3592
|
+
`${getRuleDisplayName(resolveToolName(ToolNames.WORKFLOW))}(scriptPath:${this.params.scriptPath})`
|
|
3593
|
+
],
|
|
3594
|
+
onConfirm: /* @__PURE__ */ __name(async (_outcome, _payload) => {
|
|
3595
|
+
}, "onConfirm")
|
|
3596
|
+
};
|
|
3597
|
+
return Promise.resolve(details);
|
|
3598
|
+
}
|
|
3162
3599
|
async execute(signal, updateOutput, _shellExecutionConfig) {
|
|
3163
3600
|
const runInBackground = this.params.run_in_background === true;
|
|
3164
3601
|
if (runInBackground && signal.aborted) {
|
|
@@ -3182,6 +3619,16 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
|
|
|
3182
3619
|
if (runInBackground && signal.aborted) {
|
|
3183
3620
|
return backgroundStartCancelledResult();
|
|
3184
3621
|
}
|
|
3622
|
+
if (error instanceof WorkflowScriptNotLaunchedError) {
|
|
3623
|
+
return {
|
|
3624
|
+
llmContent: [{ text: error.message }],
|
|
3625
|
+
returnDisplay: error.message,
|
|
3626
|
+
error: {
|
|
3627
|
+
message: error.message,
|
|
3628
|
+
type: "invalid_tool_params" /* INVALID_TOOL_PARAMS */
|
|
3629
|
+
}
|
|
3630
|
+
};
|
|
3631
|
+
}
|
|
3185
3632
|
throw error;
|
|
3186
3633
|
}
|
|
3187
3634
|
if (runInBackground) {
|
|
@@ -3293,6 +3740,83 @@ function resolveUsageBanner(config, registry, budgetTotal) {
|
|
|
3293
3740
|
return buildUsageBanner(budgetTotal);
|
|
3294
3741
|
}
|
|
3295
3742
|
__name(resolveUsageBanner, "resolveUsageBanner");
|
|
3743
|
+
var CONFIRM_SCRIPT_EXCERPT_CHARS = 1200;
|
|
3744
|
+
var CONFIRM_ARGS_CHARS = 300;
|
|
3745
|
+
var CONFIRM_MAX_PHASES = 12;
|
|
3746
|
+
function sanitizeLine(text) {
|
|
3747
|
+
return stripAnsiAndControl(text);
|
|
3748
|
+
}
|
|
3749
|
+
__name(sanitizeLine, "sanitizeLine");
|
|
3750
|
+
function sanitizeBlock(text) {
|
|
3751
|
+
return text.replace(/\t/g, " ").split("\n").map((line) => stripAnsiAndControl(line)).join("\n");
|
|
3752
|
+
}
|
|
3753
|
+
__name(sanitizeBlock, "sanitizeBlock");
|
|
3754
|
+
function clampForDisplay(text, max) {
|
|
3755
|
+
if (text.length <= max) return text;
|
|
3756
|
+
return `${text.slice(0, max)}
|
|
3757
|
+
\u2026 (${text.length - max} more characters)`;
|
|
3758
|
+
}
|
|
3759
|
+
__name(clampForDisplay, "clampForDisplay");
|
|
3760
|
+
function readMetaForConfirmation(script) {
|
|
3761
|
+
try {
|
|
3762
|
+
return extractAndStripMeta(script).meta;
|
|
3763
|
+
} catch {
|
|
3764
|
+
return null;
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
__name(readMetaForConfirmation, "readMetaForConfirmation");
|
|
3768
|
+
function buildConfirmationPrompt(params, meta) {
|
|
3769
|
+
const lines = [];
|
|
3770
|
+
if (meta) {
|
|
3771
|
+
lines.push(`Workflow: ${sanitizeLine(meta.name)}`);
|
|
3772
|
+
lines.push(sanitizeLine(meta.description));
|
|
3773
|
+
} else if (params.scriptPath) {
|
|
3774
|
+
lines.push(`Saved workflow: ${sanitizeLine(params.scriptPath)}`);
|
|
3775
|
+
} else {
|
|
3776
|
+
lines.push("Workflow: (the script declares no meta block)");
|
|
3777
|
+
}
|
|
3778
|
+
if (meta?.phases?.length) {
|
|
3779
|
+
const shown = meta.phases.slice(0, CONFIRM_MAX_PHASES);
|
|
3780
|
+
lines.push("", `Phases (${meta.phases.length}):`);
|
|
3781
|
+
shown.forEach((phase, i) => {
|
|
3782
|
+
const detail = phase.detail ? ` \u2014 ${sanitizeLine(phase.detail)}` : "";
|
|
3783
|
+
lines.push(` ${i + 1}. ${sanitizeLine(phase.title)}${detail}`);
|
|
3784
|
+
});
|
|
3785
|
+
if (meta.phases.length > shown.length) {
|
|
3786
|
+
lines.push(` \u2026 and ${meta.phases.length - shown.length} more`);
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
if (params.scriptPath && meta) {
|
|
3790
|
+
lines.push("", `Loaded from: ${sanitizeLine(params.scriptPath)}`);
|
|
3791
|
+
}
|
|
3792
|
+
if (params.resumeFromRunId) {
|
|
3793
|
+
lines.push("", `Resuming run: ${sanitizeLine(params.resumeFromRunId)}`);
|
|
3794
|
+
}
|
|
3795
|
+
if (params.args !== void 0) {
|
|
3796
|
+
let rendered;
|
|
3797
|
+
try {
|
|
3798
|
+
rendered = JSON.stringify(params.args) ?? String(params.args);
|
|
3799
|
+
} catch {
|
|
3800
|
+
rendered = "(args are not JSON-serializable)";
|
|
3801
|
+
}
|
|
3802
|
+
lines.push(
|
|
3803
|
+
"",
|
|
3804
|
+
`Args: ${clampForDisplay(sanitizeLine(rendered), CONFIRM_ARGS_CHARS)}`
|
|
3805
|
+
);
|
|
3806
|
+
}
|
|
3807
|
+
if (params.script) {
|
|
3808
|
+
lines.push(
|
|
3809
|
+
"",
|
|
3810
|
+
"Script:",
|
|
3811
|
+
clampForDisplay(
|
|
3812
|
+
sanitizeBlock(params.script),
|
|
3813
|
+
CONFIRM_SCRIPT_EXCERPT_CHARS
|
|
3814
|
+
)
|
|
3815
|
+
);
|
|
3816
|
+
}
|
|
3817
|
+
return lines.join("\n");
|
|
3818
|
+
}
|
|
3819
|
+
__name(buildConfirmationPrompt, "buildConfirmationPrompt");
|
|
3296
3820
|
function buildUsageBanner(total) {
|
|
3297
3821
|
if (total === null) {
|
|
3298
3822
|
return `> Workflows have no per-run token cap. Set \`${MAX_TOKENS_PER_WORKFLOW_ENV}=<n>\` (env) for a soft cap. Suppress this notice with \`skipWorkflowUsageWarning: true\` in settings.
|
|
@@ -3347,6 +3871,18 @@ function safeStringifyDisplayPayload(payload) {
|
|
|
3347
3871
|
__name(safeStringifyDisplayPayload, "safeStringifyDisplayPayload");
|
|
3348
3872
|
var WORKFLOW_TOOL_DESCRIPTION = `Execute a workflow script that orchestrates subagents deterministically.
|
|
3349
3873
|
|
|
3874
|
+
**Only on an explicit request**
|
|
3875
|
+
|
|
3876
|
+
Do not call this tool unless the user has asked for multi-agent orchestration. A run can dispatch up to ${DEFAULT_MAX_AGENTS_PER_RUN} subagents and spend tokens accordingly, so that scale has to be requested rather than inferred. It counts as requested when any of these holds:
|
|
3877
|
+
|
|
3878
|
+
- The user's message contains the word \`workflow\`; a system reminder confirms it when it does.
|
|
3879
|
+
- The user asked for orchestration in their own words \u2014 run a workflow, fan out agents, orchestrate this with subagents.
|
|
3880
|
+
- A skill or slash command the user invoked instructs you to use this tool.
|
|
3881
|
+
- The user named a saved workflow to run, reached through \`workflow('<name>')\` or \`scriptPath\`.
|
|
3882
|
+
- The user asked to resume or continue an earlier run, which is \`resumeFromRunId\`.
|
|
3883
|
+
|
|
3884
|
+
Otherwise do not call it, however well the task would parallelize. Do the work in the main loop, or spawn a single subagent for one self-contained piece. When a workflow would genuinely be the better tool, say in one sentence what it would fan out over and roughly how many agents that is, then let the user decide \u2014 and mention that including the word \`workflow\` next time skips the ask.
|
|
3885
|
+
|
|
3350
3886
|
**What a workflow is for**
|
|
3351
3887
|
|
|
3352
3888
|
Reach for one to be comprehensive (decompose the work and cover every part in parallel), to be confident (independent perspectives and adversarial checks before an answer is committed to), or to take on scale a single context cannot hold \u2014 migrations, audits, broad sweeps. The script is where that structure is encoded: what fans out, what verifies, what synthesizes. Parallelism on its own is not a reason; work that is already one short sequence of edits belongs in the main loop.
|
|
@@ -3428,6 +3964,11 @@ var WorkflowTool = class extends BaseDeclarativeTool {
|
|
|
3428
3964
|
export {
|
|
3429
3965
|
WorkflowTool
|
|
3430
3966
|
};
|
|
3967
|
+
/**
|
|
3968
|
+
* @license
|
|
3969
|
+
* Copyright 2025 Google LLC
|
|
3970
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
3971
|
+
*/
|
|
3431
3972
|
/**
|
|
3432
3973
|
* @license
|
|
3433
3974
|
* Copyright 2025 Qwen
|