autohand-cli 0.8.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +191 -74
- package/dist/{AgentRegistry-ODDXPAFR.js → AgentRegistry-GOV7FN2O.js} +2 -2
- package/dist/AgentRegistry-J2C6JBZ3.cjs +10 -0
- package/dist/{AutomodeManager-EOVHGRPP.js → AutomodeManager-APLLPEYJ.js} +31 -17
- package/dist/{AutomodeManager-6ATBE7Q5.cjs → AutomodeManager-MPSXT2RH.cjs} +38 -24
- package/dist/CommunitySkillsCache-22BB3J6H.cjs +8 -0
- package/dist/{CommunitySkillsCache-QLE57BN5.js → CommunitySkillsCache-ZACDPD4J.js} +2 -2
- package/dist/GitHubRegistryFetcher-CYJLF2XL.cjs +7 -0
- package/dist/{GitHubRegistryFetcher-NT5GFZXS.js → GitHubRegistryFetcher-J2BWPXJF.js} +1 -1
- package/dist/{HookManager-B2F35M27.js → HookManager-2S6AHOC3.js} +1 -1
- package/dist/{HookManager-PFAFE3FK.cjs → HookManager-TVEQI5ZU.cjs} +2 -2
- package/dist/{ImportWizard-OHRKBANZ.js → ImportWizard-AEBMAKXE.js} +33 -9
- package/dist/{ImportWizard-CJRZPPHL.cjs → ImportWizard-AF2XL6DS.cjs} +37 -13
- package/dist/LearnAdvisor-KKEQ5QCV.js +9 -0
- package/dist/LearnAdvisor-Q7RAYLPF.cjs +9 -0
- package/dist/{McpClientManager-NQ3EW2IF.cjs → McpClientManager-BNSKLHIN.cjs} +2 -2
- package/dist/{McpClientManager-VBIMGKXU.js → McpClientManager-SL35BR24.js} +1 -1
- package/dist/MemoryManager-PMNAEZMB.cjs +8 -0
- package/dist/{MemoryManager-2LAT7IHS.js → MemoryManager-QZRLTUB5.js} +2 -2
- package/dist/NVIDIAProvider-C3FWQOBZ.cjs +14 -0
- package/dist/NVIDIAProvider-SJPY3ONR.js +14 -0
- package/dist/{PermissionManager-7NQHRCHY.js → PermissionManager-MT7KBNNR.js} +3 -3
- package/dist/PermissionManager-URCNP5EC.cjs +11 -0
- package/dist/{ProjectProfiler-UG42W6WD.cjs → ProjectProfiler-CDAE7ECW.cjs} +1 -0
- package/dist/{ProjectProfiler-P4QJQWWA.js → ProjectProfiler-NZTJDRHD.js} +1 -0
- package/dist/ProviderFactory-56N3ECE4.cjs +12 -0
- package/dist/{ProviderFactory-2IYJ5OPW.js → ProviderFactory-RB4RVAF6.js} +4 -1
- package/dist/SessionManager-2IZGWASQ.cjs +10 -0
- package/dist/{SessionManager-4U4JFQ3C.js → SessionManager-554PHVPC.js} +2 -2
- package/dist/SkillsRegistry-GMRVONOQ.cjs +9 -0
- package/dist/{SkillsRegistry-RFEINXRT.js → SkillsRegistry-NHHMIUYJ.js} +2 -2
- package/dist/SubAgent-4GOR2FIJ.js +13 -0
- package/dist/SubAgent-ZJMDH4FI.cjs +13 -0
- package/dist/{SyncApiClient-B5RT2ECG.js → SyncApiClient-G3FM65IV.js} +1 -1
- package/dist/SyncApiClient-ODBDECOG.cjs +11 -0
- package/dist/about-3USFSGOH.js +15 -0
- package/dist/about-QR52U5DD.cjs +15 -0
- package/dist/acp-5Y2W6OZP.js +1556 -0
- package/dist/acp-GSYE75OB.cjs +1556 -0
- package/dist/actionExecutor-KHUU3Z3Q.cjs +28 -0
- package/dist/actionExecutor-PLQJZLZV.js +28 -0
- package/dist/add-dir-BTAD5OZS.cjs +11 -0
- package/dist/{add-dir-TUJM3PG5.js → add-dir-HCERJDBR.js} +3 -2
- package/dist/agent-B3EVT7NN.cjs +126 -0
- package/dist/agent-SATQ3WZ3.js +126 -0
- package/dist/agents/builtin/code-cleaner.md +1 -1
- package/dist/agents/builtin/docs-writer.md +1 -1
- package/dist/agents/builtin/researcher.md +2 -2
- package/dist/agents/builtin/reviewer.md +1 -1
- package/dist/agents/builtin/tester.md +1 -1
- package/dist/agents/builtin/todo-resolver.md +1 -1
- package/dist/agents-44CRJGM7.cjs +18 -0
- package/dist/agents-NN4ZAJ7R.js +18 -0
- package/dist/agents-new-6D6G4QS6.cjs +17 -0
- package/dist/agents-new-7GAQ25EK.js +17 -0
- package/dist/{autoSkill-LQEVQFIH.js → autoSkill-66PKCYTW.js} +2 -2
- package/dist/autoSkill-VQLGBELN.cjs +20 -0
- package/dist/automode-45DWV4TN.cjs +10 -0
- package/dist/{automode-R6P3VHLS.js → automode-BUF3VGXU.js} +2 -2
- package/dist/browserToolBridge-BXRQB4B4.cjs +58 -0
- package/dist/browserToolBridge-F5N66PE7.js +58 -0
- package/dist/chrome-Q2U73HZB.cjs +50 -0
- package/dist/chrome-Q54OALOK.cjs +21 -0
- package/dist/chrome-Y3T7EIHG.js +50 -0
- package/dist/chrome-ZNJ46OYW.js +21 -0
- package/dist/chromeSkill-53TH55PM.js +105 -0
- package/dist/chromeSkill-THW7N4IY.cjs +105 -0
- package/dist/{chunk-HXGBSJL5.cjs → chunk-22SCR3EV.cjs} +2 -2
- package/dist/chunk-26G7YGOW.js +367 -0
- package/dist/{chunk-3L53OA4E.cjs → chunk-2ESQR35E.cjs} +10 -10
- package/dist/chunk-2H5O745H.js +63 -0
- package/dist/{chunk-ULDM2SNB.js → chunk-2IW5YFJ4.js} +48 -47
- package/dist/{chunk-U55TWFJI.cjs → chunk-2VHB43IX.cjs} +24 -6
- package/dist/chunk-3EDDDZS2.cjs +5 -0
- package/dist/{chunk-X5VSP65C.cjs → chunk-3ICORF7M.cjs} +4 -4
- package/dist/chunk-3OF56EMA.cjs +197 -0
- package/dist/chunk-3UC6DMFI.cjs +93 -0
- package/dist/{chunk-64H4FRM3.cjs → chunk-3UHRCHKB.cjs} +32 -34
- package/dist/{chunk-JCLYQ2JC.js → chunk-3ZOOH44N.js} +12 -6
- package/dist/{chunk-TUD3Z3BD.js → chunk-44ZWOBTI.js} +136 -55
- package/dist/chunk-4567QNRB.js +444 -0
- package/dist/chunk-45CHNQM6.cjs +517 -0
- package/dist/chunk-46MTALKD.js +44 -0
- package/dist/{chunk-WHE2SWHU.js → chunk-4E7SHPNQ.js} +2 -2
- package/dist/chunk-4LMUDS2K.js +124 -0
- package/dist/{chunk-W7RYQJLO.cjs → chunk-4XFHP2SN.cjs} +46 -15
- package/dist/chunk-4XVLNOFA.js +360 -0
- package/dist/{chunk-GBHDROGL.js → chunk-575PXZX7.js} +16 -4
- package/dist/chunk-5A7ZL64N.js +139 -0
- package/dist/chunk-5GCQ5UMV.cjs +85 -0
- package/dist/chunk-5JTTM5SC.js +59 -0
- package/dist/{chunk-IETRBBMP.cjs → chunk-5K3CDSWZ.cjs} +108 -31
- package/dist/{chunk-KLWJIPU2.cjs → chunk-5SFV2NCY.cjs} +20 -16
- package/dist/chunk-5ZNYX4VH.cjs +71 -0
- package/dist/{chunk-A4IJHHV7.cjs → chunk-63ANVAOJ.cjs} +52 -11
- package/dist/{chunk-MYISNQH4.js → chunk-65LRPW5W.js} +1 -1
- package/dist/chunk-6AYJCDTA.js +360 -0
- package/dist/{chunk-X2MSVKDV.js → chunk-6HF6XSCC.js} +2 -2
- package/dist/{chunk-AEJH23FO.cjs → chunk-6JWCGQJU.cjs} +6 -6
- package/dist/chunk-6OECOAK5.cjs +360 -0
- package/dist/chunk-6R25D2H5.js +121 -0
- package/dist/chunk-7DJJGKM6.js +77 -0
- package/dist/{chunk-VG34MG2U.js → chunk-7IRQ7JEH.js} +9 -6
- package/dist/chunk-7MY4JHER.js +27 -0
- package/dist/chunk-7PJKTSRN.js +152 -0
- package/dist/{chunk-SKYG33B2.cjs → chunk-7PT646AL.cjs} +3 -3
- package/dist/chunk-7WAUCLLQ.js +229 -0
- package/dist/{chunk-U46VYPLR.cjs → chunk-7XTUL7ZD.cjs} +9 -9
- package/dist/chunk-AE2ILW25.cjs +152 -0
- package/dist/{chunk-T2M64VHA.cjs → chunk-AOKXYGBQ.cjs} +61 -41
- package/dist/chunk-AQ5PVHOC.cjs +113 -0
- package/dist/{chunk-N2BLVUPM.cjs → chunk-AZ47LKD5.cjs} +3 -3
- package/dist/chunk-B4HSNOIH.cjs +354 -0
- package/dist/chunk-B76FJKEJ.cjs +184 -0
- package/dist/chunk-BP37FVBM.js +85 -0
- package/dist/chunk-BQU3HAE7.js +21 -0
- package/dist/chunk-BYE7RQFZ.cjs +121 -0
- package/dist/chunk-C46B72VK.js +1034 -0
- package/dist/{chunk-HIVRCQS2.js → chunk-C5QIQQ37.js} +56 -25
- package/dist/chunk-CCIDL4SA.js +19931 -0
- package/dist/{chunk-XVUHNWMX.js → chunk-CECH6QQP.js} +17 -19
- package/dist/chunk-CFAWTLSC.js +13 -0
- package/dist/{chunk-ZYQMLKOK.cjs → chunk-CK4HAHVY.cjs} +212 -70
- package/dist/chunk-CO2AADYU.cjs +360 -0
- package/dist/chunk-CRTCZ4WL.cjs +19931 -0
- package/dist/chunk-CSTUTDTH.js +75 -0
- package/dist/{chunk-K2C56QGS.cjs → chunk-D546G7DA.cjs} +1650 -479
- package/dist/{chunk-CNBKZEX5.cjs → chunk-DA7NBAJK.cjs} +49 -17
- package/dist/{chunk-G4CAKI3V.js → chunk-DGBPWODD.js} +7 -2
- package/dist/chunk-DHUQZ53B.cjs +29 -0
- package/dist/{chunk-RGR6ME5J.cjs → chunk-DI57A4BX.cjs} +25 -28
- package/dist/{chunk-5K6NGAVM.js → chunk-DNSD7DVJ.js} +67 -52
- package/dist/{chunk-RDF37HKB.cjs → chunk-DSSCERHI.cjs} +3 -2
- package/dist/{chunk-NAJ4IZKD.cjs → chunk-EA2MS25U.cjs} +8 -6
- package/dist/{chunk-SJAVBCOA.js → chunk-EEHWALXA.js} +94 -3
- package/dist/chunk-ES2HJQ4N.js +37 -0
- package/dist/{chunk-G27PQQFD.js → chunk-EYHKL4QC.js} +1 -1
- package/dist/{chunk-SV2WA57F.js → chunk-FBQJZKFX.js} +38 -15
- package/dist/chunk-FFBDRUO5.cjs +59 -0
- package/dist/{chunk-N7LI55V4.js → chunk-FFHSCM5M.js} +15 -8
- package/dist/{chunk-SAHBLB3E.js → chunk-FP46B4X3.js} +208 -3
- package/dist/chunk-FQVG6ZHF.js +197 -0
- package/dist/{chunk-J2GSFVUV.cjs → chunk-GAOPJ5S3.cjs} +74 -59
- package/dist/{chunk-S52YW5ZQ.js → chunk-GNBBIAMD.js} +16 -19
- package/dist/chunk-GSDV75A5.js +715 -0
- package/dist/chunk-GWY26SUD.cjs +63 -0
- package/dist/{chunk-TUAITHWL.js → chunk-H426KOGY.js} +2 -1
- package/dist/{chunk-EZMINVLU.js → chunk-H4D2Q2AL.js} +5 -2
- package/dist/chunk-HC2Q6A3E.cjs +4967 -0
- package/dist/{chunk-3WVJEL7K.cjs → chunk-HDK2EHVH.cjs} +3 -1
- package/dist/{chunk-5IXII4HX.cjs → chunk-HG3ZASBH.cjs} +23 -16
- package/dist/chunk-HK5A54AV.cjs +280 -0
- package/dist/{chunk-LQGVEP3E.js → chunk-HQUSEWT4.js} +45 -13
- package/dist/chunk-HSWWM6AM.js +2340 -0
- package/dist/chunk-HTU4W3GB.js +183 -0
- package/dist/{chunk-HLHTG5ZU.cjs → chunk-HVCIB4SW.cjs} +14 -12
- package/dist/chunk-HXHE2KAO.js +385 -0
- package/dist/{chunk-LJFUXC56.cjs → chunk-HXQREVTA.cjs} +9 -6
- package/dist/{chunk-SLQAYV3W.js → chunk-HZWU6IO3.js} +11 -2
- package/dist/chunk-I2ZK3AOD.js +866 -0
- package/dist/chunk-IEPLQ47J.js +719 -0
- package/dist/chunk-J5HE6CUM.cjs +124 -0
- package/dist/{chunk-LIEXWM2M.js → chunk-JAQO6XDB.js} +19 -1
- package/dist/chunk-JB3JCYBJ.js +113 -0
- package/dist/chunk-JCUHCH37.cjs +247 -0
- package/dist/{chunk-FPHU2ES6.cjs → chunk-JM3ZTQUK.cjs} +19 -9
- package/dist/{chunk-NDMIPTV4.js → chunk-JMJRFSNJ.js} +8 -3
- package/dist/{chunk-ZLSGXMGQ.js → chunk-JMN3GZU6.js} +2 -0
- package/dist/chunk-JPFRI4L4.js +4967 -0
- package/dist/{chunk-BVKXEQVG.cjs → chunk-JV5HVCHU.cjs} +22 -10
- package/dist/chunk-KA2U6MY2.js +388 -0
- package/dist/{chunk-SEKD5FH3.cjs → chunk-KASXKDF2.cjs} +8 -3
- package/dist/chunk-KJ26T7GM.cjs +367 -0
- package/dist/chunk-KM7R5YPS.cjs +385 -0
- package/dist/{chunk-MBBY4ZIK.js → chunk-KMP6Y3LJ.js} +4 -1
- package/dist/chunk-KWXGDSYT.js +184 -0
- package/dist/{chunk-C5IJIM2V.cjs → chunk-L46OUKW5.cjs} +68 -37
- package/dist/{chunk-6UJMCWRY.js → chunk-L6OH44HL.js} +19 -9
- package/dist/chunk-LANGD5CO.js +280 -0
- package/dist/{chunk-APIXPPMT.js → chunk-LEZEWKPA.js} +1004 -39
- package/dist/{chunk-ULQ6MDSJ.cjs → chunk-LFDPTJYF.cjs} +43 -35
- package/dist/chunk-LJD7KR3L.cjs +44 -0
- package/dist/{chunk-NCC6ETZS.js → chunk-LUMV3DB2.js} +41 -33
- package/dist/{chunk-QXH5RCFI.js → chunk-M5DK524Z.js} +2 -2
- package/dist/chunk-M7B7RRBK.cjs +1034 -0
- package/dist/chunk-MANJ67D3.js +3897 -0
- package/dist/{chunk-HPHJ73GU.cjs → chunk-MGNXABSU.cjs} +9 -9
- package/dist/{chunk-6ZCULLCA.js → chunk-MMKZSJUN.js} +1 -1
- package/dist/{chunk-DVUHHH3B.cjs → chunk-MQQH4XQH.cjs} +4 -4
- package/dist/chunk-MUNUUFU7.cjs +21 -0
- package/dist/{chunk-DVZOENQ7.cjs → chunk-MZN6JBRZ.cjs} +9 -4
- package/dist/{chunk-OOKY3HPZ.js → chunk-NB6M6ESM.js} +50 -9
- package/dist/{chunk-BYONM7UM.js → chunk-NBGOIFKP.js} +265 -18
- package/dist/chunk-NHWHEW7M.cjs +75 -0
- package/dist/chunk-NQZH5CR2.cjs +468 -0
- package/dist/{chunk-EGPXJERY.cjs → chunk-NV6LCD2I.cjs} +119 -28
- package/dist/chunk-NVATU4V6.cjs +44 -0
- package/dist/{chunk-YZXUDM5X.js → chunk-NZ3ZWLUW.js} +204 -62
- package/dist/chunk-NZ7GCK7Y.cjs +92 -0
- package/dist/{chunk-VEKDGU2Q.cjs → chunk-NZQFKXM3.cjs} +49 -25
- package/dist/chunk-O5GI6SR3.js +59 -0
- package/dist/{chunk-56SWIDEL.cjs → chunk-OCATAKXV.cjs} +57 -56
- package/dist/{chunk-SKV2F3NM.js → chunk-OIGYWOL6.js} +1 -1
- package/dist/{chunk-IFFXSTOM.cjs → chunk-ONVYXTUT.cjs} +3 -3
- package/dist/chunk-OR67YXQK.cjs +13 -0
- package/dist/chunk-OV3T5MUH.cjs +715 -0
- package/dist/{chunk-OHUZKDGX.js → chunk-P4FUTSVK.js} +3 -3
- package/dist/chunk-P6SLT2F4.cjs +139 -0
- package/dist/{chunk-TNZRZQ7Q.js → chunk-PB7W7R72.js} +3 -78
- package/dist/chunk-PCM3N3CL.cjs +37 -0
- package/dist/{chunk-2AA5MFES.js → chunk-PGFLPURU.js} +8 -5
- package/dist/{chunk-DJDE4DTT.cjs → chunk-PIXQ2AVM.cjs} +25 -19
- package/dist/chunk-PNIAIOMZ.cjs +229 -0
- package/dist/{chunk-HTLINWX6.cjs → chunk-PQBYFEBL.cjs} +16 -13
- package/dist/{chunk-22D2CNTP.cjs → chunk-PSAH4ZQB.cjs} +5 -2
- package/dist/{chunk-3VTAFAL2.js → chunk-PTTZI4QZ.js} +16 -12
- package/dist/{chunk-WPVWQSL7.cjs → chunk-PY73W5MQ.cjs} +16 -13
- package/dist/{chunk-EGMZDTSL.js → chunk-PZZMIYII.js} +10 -2
- package/dist/{chunk-HBZU3RBZ.js → chunk-Q3BS6FPM.js} +34 -10
- package/dist/chunk-QBYGMMDD.js +517 -0
- package/dist/chunk-QLZOMZO5.cjs +388 -0
- package/dist/{chunk-ADUFCS4Q.cjs → chunk-QQ64HEHP.cjs} +160 -79
- package/dist/{chunk-L3TWPROA.js → chunk-QRQF3556.js} +44 -24
- package/dist/{chunk-YHD6TUIR.cjs → chunk-QW2RW2GY.cjs} +2 -0
- package/dist/chunk-RAKO7UN7.js +114 -0
- package/dist/{chunk-7TQH3CL4.cjs → chunk-RBXBH6EB.cjs} +78 -35
- package/dist/chunk-RFUKZIJF.cjs +78 -0
- package/dist/chunk-RS2E32YB.js +71 -0
- package/dist/{chunk-OLSBBZW6.cjs → chunk-S5JNQIGL.cjs} +5 -5
- package/dist/{chunk-FTYY5JJD.js → chunk-S5QKRA2V.js} +2 -2
- package/dist/chunk-SD3NTC7D.cjs +77 -0
- package/dist/{chunk-KPELYZ6L.js → chunk-SDLY4X3G.js} +2 -2
- package/dist/{chunk-IDFF5J2E.js → chunk-SFFEKZGC.js} +38 -7
- package/dist/{chunk-EGFT4PGW.js → chunk-SHRLFX6F.js} +8 -3
- package/dist/{chunk-3WICOC33.js → chunk-SNDDZG5H.js} +124 -84
- package/dist/{chunk-CZXGCVTR.cjs → chunk-SOVR7S3T.cjs} +2 -2
- package/dist/chunk-SPQ7QIQ6.js +78 -0
- package/dist/{chunk-XRZEUWKF.js → chunk-SRMGWMQO.js} +1 -1
- package/dist/{chunk-R33VKSH5.cjs → chunk-SVVP4UUZ.cjs} +11 -11
- package/dist/{chunk-7BTSG4ME.cjs → chunk-SY2P3Z5W.cjs} +1004 -39
- package/dist/chunk-SZD45IDG.js +468 -0
- package/dist/{chunk-3O3MOK5C.cjs → chunk-TE4SYTWR.cjs} +1114 -142
- package/dist/chunk-TH26BQJG.js +101 -0
- package/dist/{chunk-QNGEW5TC.js → chunk-TR6NECEZ.js} +1 -1
- package/dist/{chunk-YGN4CQIP.js → chunk-TYBPTKFT.js} +1 -1
- package/dist/{chunk-GJH7XMSK.js → chunk-U2QUMKCB.js} +8 -6
- package/dist/{chunk-47CKWKEX.cjs → chunk-U6PLSPMD.cjs} +9 -4
- package/dist/chunk-UOQECODR.js +34 -0
- package/dist/chunk-UR27UDTB.js +354 -0
- package/dist/chunk-UWZ4G3SQ.js +93 -0
- package/dist/{chunk-Y72HH2TF.cjs → chunk-V3SZLWEQ.cjs} +33 -24
- package/dist/chunk-V4HGZSKQ.cjs +183 -0
- package/dist/{chunk-3PDTTAKJ.js → chunk-V5ELP2XE.js} +19 -12
- package/dist/{chunk-3K2ESU53.cjs → chunk-VKOXFT4L.cjs} +2 -2
- package/dist/{chunk-XTB6VJVQ.cjs → chunk-VLGGMQUN.cjs} +6 -6
- package/dist/chunk-VQHSYAPZ.cjs +3897 -0
- package/dist/chunk-VUGOOGHB.js +400 -0
- package/dist/chunk-W5QLA6WP.cjs +866 -0
- package/dist/chunk-WBU4Q4GS.cjs +400 -0
- package/dist/{chunk-KWXVKLQ5.cjs → chunk-WGNMOVMT.cjs} +7 -82
- package/dist/chunk-WJYFLQ7G.cjs +27 -0
- package/dist/{chunk-RKJTGGMU.cjs → chunk-WKRDBCP2.cjs} +221 -16
- package/dist/{chunk-ZSPXQYG2.js → chunk-WNJXIACY.js} +7 -5
- package/dist/{chunk-AYS2ASM7.js → chunk-WPE2XHVX.js} +1 -1
- package/dist/chunk-WTB7AFL6.cjs +101 -0
- package/dist/{chunk-JYTDYJVW.js → chunk-X3TI5TJJ.js} +1 -1
- package/dist/chunk-X5P6QQOB.cjs +719 -0
- package/dist/{chunk-245KJE5Y.cjs → chunk-X7XMITIL.cjs} +14 -6
- package/dist/chunk-XF2WIKHR.cjs +34 -0
- package/dist/{chunk-DV2ZHK7B.cjs → chunk-XNIMSVS6.cjs} +49 -26
- package/dist/chunk-XW3XCK4E.cjs +59 -0
- package/dist/{chunk-N23UAW4I.js → chunk-XZVDYC5U.js} +7 -2
- package/dist/chunk-Y5BDE24P.cjs +444 -0
- package/dist/{chunk-NAGQ2PDC.js → chunk-YC5OBZQU.js} +1604 -433
- package/dist/chunk-YISPVAXO.cjs +2340 -0
- package/dist/{chunk-KQGPTCQJ.js → chunk-YQDI753V.js} +68 -25
- package/dist/{chunk-UJ2JSM6H.js → chunk-YVQI26H4.js} +2 -0
- package/dist/{chunk-NNPAM4HC.cjs → chunk-YWH55BWK.cjs} +15 -6
- package/dist/{chunk-X2YOZQIP.cjs → chunk-YWTIXHU6.cjs} +266 -19
- package/dist/{chunk-XX2ZO7DS.js → chunk-YXM6SA7P.js} +25 -16
- package/dist/chunk-YZWE7XSM.js +5 -0
- package/dist/chunk-ZASDSY7P.cjs +114 -0
- package/dist/{chunk-2UC22DJU.js → chunk-ZNGRLCFQ.js} +30 -4
- package/dist/{chunk-KANW6OYC.cjs → chunk-ZNYZB7XY.cjs} +34 -8
- package/dist/{chunk-NA6WQDYW.js → chunk-ZPLCAXJW.js} +1088 -116
- package/dist/{chunk-7UOUW76C.js → chunk-ZQAT5VT5.js} +101 -24
- package/dist/chunk-ZUYYHKQA.js +44 -0
- package/dist/clear-QJXU25IF.cjs +12 -0
- package/dist/{clear-A3N4GK2S.js → clear-Y5TO3RZA.js} +3 -3
- package/dist/communityInstaller-LXMVKVAV.cjs +22 -0
- package/dist/{communityInstaller-LOP2EDH5.js → communityInstaller-RVL4STPS.js} +8 -5
- package/dist/completion-JX4T2ONW.cjs +17 -0
- package/dist/completion-SE3XYG74.js +17 -0
- package/dist/config-3224PRW4.cjs +21 -0
- package/dist/{config-HPJPKTO6.js → config-7KPHKFTP.js} +7 -4
- package/dist/{constants-LISJW3DD.js → constants-EJFAWJQI.js} +1 -1
- package/dist/constants-MCCGUU5F.cjs +21 -0
- package/dist/{defaultHooks-IHSJR2AX.cjs → defaultHooks-2V2CQL63.cjs} +25 -10
- package/dist/{defaultHooks-KUKHK3AG.js → defaultHooks-TMHDU3FS.js} +25 -10
- package/dist/export-BJVIDZC4.js +15 -0
- package/dist/export-KU4557HK.cjs +15 -0
- package/dist/feature-K3LG5IJP.cjs +14 -0
- package/dist/feature-V4JF5TNJ.js +14 -0
- package/dist/features-5OJTLKS7.js +23 -0
- package/dist/features-VCBJQXCX.cjs +23 -0
- package/dist/feedback-D4437VE4.js +18 -0
- package/dist/feedback-VZPEHGFY.cjs +18 -0
- package/dist/fffSearchProvider-2YCNKOYD.js +412 -0
- package/dist/fffSearchProvider-W6627E2V.cjs +412 -0
- package/dist/{filesystem-Z7BWAWMZ.js → filesystem-L6DQKGWK.js} +3 -2
- package/dist/filesystem-PGUPCMVK.cjs +11 -0
- package/dist/go-X4E6BCD6.js +12 -0
- package/dist/go-XREVFS5I.cjs +12 -0
- package/dist/goal-4M3J6JS2.cjs +16 -0
- package/dist/goal-EI66BV7W.js +16 -0
- package/dist/help-GGFS7WHY.cjs +12 -0
- package/dist/{help-GFQXNZOK.js → help-MLIROWKM.js} +2 -2
- package/dist/{history-E3N6BJP7.js → history-GQJ6RZD6.js} +2 -2
- package/dist/history-J4LUIOSI.cjs +14 -0
- package/dist/hooks-FSRIUS6A.cjs +18 -0
- package/dist/hooks-PPFHCF7T.js +18 -0
- package/dist/i18n-CI6VFXL5.cjs +33 -0
- package/dist/{i18n-SY7QRM22.js → i18n-Q7UZJRPL.js} +1 -1
- package/dist/ide-BUSVE54P.js +15 -0
- package/dist/ide-YR27BPGM.cjs +15 -0
- package/dist/immediateCommandRouter-MTEHZXQX.js +15 -0
- package/dist/immediateCommandRouter-ROXU3MWT.cjs +15 -0
- package/dist/{import-W7SVLSTC.js → import-3VBKI6BN.js} +3 -3
- package/dist/{import-ADI37ZUR.cjs → import-C7S6UJMW.cjs} +3 -3
- package/dist/import-DBK4OCDF.cjs +10 -0
- package/dist/{import-KGKKZ3B7.js → import-U47DXCA7.js} +2 -2
- package/dist/index.cjs +837 -23011
- package/dist/index.d.cts +95 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.js +864 -23038
- package/dist/init-OXTYS72D.cjs +10 -0
- package/dist/{init-7MFK626E.js → init-Q2O4R42R.js} +2 -2
- package/dist/inkMode-VUE6ZDLD.cjs +7 -0
- package/dist/inkMode-WBNFOSAT.js +7 -0
- package/dist/inputPrompt-3CFZDUBH.js +90 -0
- package/dist/inputPrompt-JMACL4EB.cjs +90 -0
- package/dist/language-EK3M6UBV.cjs +22 -0
- package/dist/language-Q3RUGGOW.js +22 -0
- package/dist/learn-3DSX7DYG.cjs +23 -0
- package/dist/learn-OPOH5L43.js +23 -0
- package/dist/login-GST7MWXJ.cjs +27 -0
- package/dist/login-Q7DZKAX4.js +27 -0
- package/dist/logout-2G7OUK7I.cjs +24 -0
- package/dist/logout-FNBBL2UI.js +24 -0
- package/dist/mcp-AH3MMUBU.js +21 -0
- package/dist/mcp-DW7R63IB.cjs +21 -0
- package/dist/{mcp-install-2FEROZTL.js → mcp-install-222PCKSW.js} +18 -10
- package/dist/{mcp-install-WM6BQRI5.cjs → mcp-install-IA4ZS2SV.cjs} +22 -14
- package/dist/memory-6NX3DAIY.cjs +10 -0
- package/dist/{memory-J73WZH2I.js → memory-VB46T5H3.js} +2 -2
- package/dist/model-64NAELFS.cjs +10 -0
- package/dist/{model-AES267IN.js → model-SJJG64AM.js} +2 -2
- package/dist/new-DU5SOOOY.cjs +12 -0
- package/dist/{new-5CLF3MKH.js → new-ERZ5C6CN.js} +3 -3
- package/dist/onboarding-2U2BV2KE.cjs +36 -0
- package/dist/onboarding-ZQXMPSMJ.js +36 -0
- package/dist/permissions-7ACNFK7A.js +10 -0
- package/dist/permissions-GSNNV7RJ.cjs +10 -0
- package/dist/plan-XEJMOT55.cjs +13 -0
- package/dist/{plan-65HMS5HQ.js → plan-YYUAXPTL.js} +3 -1
- package/dist/pr-review-CW6J7P62.cjs +9 -0
- package/dist/pr-review-YZSBQVT2.js +9 -0
- package/dist/{quit-XDZYRSPU.js → quit-WY6T267G.js} +2 -2
- package/dist/quit-XIRE2KRE.cjs +10 -0
- package/dist/rawMode-6W5AXAKI.cjs +7 -0
- package/dist/rawMode-GFNLXQPU.js +7 -0
- package/dist/{registry-PTHWERKC.js → registry-4DXUDKJN.js} +29 -44
- package/dist/{registry-IVT4G2RT.cjs → registry-UEO3ETZ7.cjs} +65 -80
- package/dist/repeat-P4FAPE3Y.cjs +17 -0
- package/dist/{repeat-EVCWUL6Z.js → repeat-RALE6AUO.js} +7 -3
- package/dist/resume-RQZ3WXBP.cjs +17 -0
- package/dist/resume-XSXZMDMD.js +17 -0
- package/dist/review-QHP2KP4Q.js +9 -0
- package/dist/review-UWHWQHCB.cjs +9 -0
- package/dist/ripgrep-67SCU2BA.cjs +9 -0
- package/dist/ripgrep-VHJQQ55W.js +9 -0
- package/dist/rpc-XH7QLN4H.js +3874 -0
- package/dist/rpc-YF54T7JU.cjs +3874 -0
- package/dist/search-VXXFGZWU.cjs +21 -0
- package/dist/search-YAWGX7P7.js +21 -0
- package/dist/{sessions-6GWEBMKS.js → sessions-NJYHJOEL.js} +2 -2
- package/dist/sessions-OSG3UJEZ.cjs +10 -0
- package/dist/settings-SO2UIGWV.cjs +42 -0
- package/dist/settings-ZXUQH3DO.js +42 -0
- package/dist/setup-KG7EGKF5.js +30 -0
- package/dist/setup-RSOPCQ57.cjs +30 -0
- package/dist/share-WFAGZ5PY.js +17 -0
- package/dist/share-ZU3SGACF.cjs +17 -0
- package/dist/skills-KBVAQAD2.cjs +29 -0
- package/dist/skills-NBTNDVAY.js +29 -0
- package/dist/{skills-ZZCIAS7C.js → skills-OB6RDW7D.js} +10 -7
- package/dist/{skills-PG542VEB.cjs → skills-ZROBG3RZ.cjs} +13 -10
- package/dist/{skills-install-SRC3Z2MS.js → skills-install-BHTIEMKH.js} +21 -70
- package/dist/{skills-install-67DOBPJC.cjs → skills-install-ILX6QVEF.cjs} +34 -83
- package/dist/skills-new-B45VQ2PP.cjs +18 -0
- package/dist/skills-new-YMRP2HNO.js +18 -0
- package/dist/slashCommands-53VYIBJU.js +105 -0
- package/dist/slashCommands-BG2RGGZ6.cjs +105 -0
- package/dist/status-CQ2IUOVK.cjs +24 -0
- package/dist/status-E7IGNVPC.js +24 -0
- package/dist/summarizer-DGPHE5IQ.js +17 -0
- package/dist/summarizer-JNXLUAQG.cjs +17 -0
- package/dist/sync-7C25MOT2.js +22 -0
- package/dist/{sync-VU2NSJ4O.js → sync-OCJN4ZSO.js} +3 -3
- package/dist/sync-XRP46IVG.cjs +40 -0
- package/dist/sync-ZMFVE7T4.cjs +22 -0
- package/dist/{teammate-SXRVXNQV.cjs → teammate-D77B6QRT.cjs} +31 -9
- package/dist/{teammate-SD26GR37.js → teammate-EZCMHOIL.js} +30 -8
- package/dist/templates-ARG2VRWW.cjs +11 -0
- package/dist/templates-UGVZV3KJ.js +11 -0
- package/dist/theme-KKRDE6P7.cjs +22 -0
- package/dist/theme-XF7XIWBQ.js +22 -0
- package/dist/tools-3PPTTKFV.js +9 -0
- package/dist/tools-THIQA7WC.cjs +9 -0
- package/dist/ui/questionModal.cjs +8 -5
- package/dist/ui/questionModal.js +7 -4
- package/dist/{undo-OL2EDBRY.js → undo-GNUTFXCW.js} +2 -2
- package/dist/undo-U4KN7QQM.cjs +10 -0
- package/dist/usage-QSTNSDAO.js +24 -0
- package/dist/usage-YDEMQBNQ.cjs +24 -0
- package/dist/web-3BA2WV37.cjs +37 -0
- package/dist/web-6FYGBX5K.js +37 -0
- package/dist/workspaceSafety-MDJGHK6D.cjs +9 -0
- package/dist/workspaceSafety-XOUMUBVB.js +9 -0
- package/dist/yolo-GF2YD7ZI.js +9 -0
- package/dist/yolo-OGDA7HNC.cjs +9 -0
- package/dist/yoloMode-3DJDA75U.cjs +17 -0
- package/dist/yoloMode-4JOOSU26.js +17 -0
- package/package.json +51 -49
- package/dist/AgentRegistry-HRPN6ZOF.cjs +0 -10
- package/dist/CommunitySkillsCache-KE435RAR.cjs +0 -8
- package/dist/GitHubRegistryFetcher-I45SESIL.cjs +0 -7
- package/dist/LearnAdvisor-FLBA6FDD.js +0 -9
- package/dist/LearnAdvisor-GG3CXQF3.cjs +0 -9
- package/dist/MemoryManager-2LQPIYVE.cjs +0 -8
- package/dist/PermissionManager-X57BXHJ6.cjs +0 -11
- package/dist/ProviderFactory-KPJOGQWF.cjs +0 -9
- package/dist/SessionManager-YBJAZXNO.cjs +0 -10
- package/dist/SkillsRegistry-7O72A6TZ.cjs +0 -9
- package/dist/SubAgent-JT4HZHN7.js +0 -11
- package/dist/SubAgent-VPNYDWAU.cjs +0 -11
- package/dist/SyncApiClient-HQXJL5BT.cjs +0 -11
- package/dist/about-4DB5KTHW.js +0 -12
- package/dist/about-LXAOXZFT.cjs +0 -12
- package/dist/actionExecutor-23JB2WUC.js +0 -19
- package/dist/actionExecutor-X5UEZSKH.cjs +0 -19
- package/dist/add-dir-YC37DMSF.cjs +0 -10
- package/dist/agents-YF3BSUU5.js +0 -12
- package/dist/agents-ZOUHPMYR.cjs +0 -12
- package/dist/agents-new-HSH4GQPG.js +0 -14
- package/dist/agents-new-VYUDOCE7.cjs +0 -14
- package/dist/autoSkill-X5W52WOE.cjs +0 -20
- package/dist/automode-SJGM7VEI.cjs +0 -10
- package/dist/chunk-ALYU6VTM.js +0 -105
- package/dist/chunk-B53A2NM2.js +0 -2030
- package/dist/chunk-BJXSNT46.js +0 -100
- package/dist/chunk-CB4E2T5N.cjs +0 -312
- package/dist/chunk-DNUOXBHL.js +0 -539
- package/dist/chunk-EFX2QSZX.cjs +0 -33
- package/dist/chunk-GCXYXLRA.cjs +0 -111
- package/dist/chunk-H2ZRHQQV.js +0 -33
- package/dist/chunk-HNRPK5MY.cjs +0 -85
- package/dist/chunk-HVKOZ2VP.cjs +0 -115
- package/dist/chunk-JJLYWH5Y.cjs +0 -100
- package/dist/chunk-LWUJFGOZ.js +0 -115
- package/dist/chunk-MERYP6AM.cjs +0 -539
- package/dist/chunk-MZAPWNAC.cjs +0 -207
- package/dist/chunk-NTSDP2WB.js +0 -226
- package/dist/chunk-OUZQXMHL.cjs +0 -226
- package/dist/chunk-PGESAU2W.cjs +0 -2030
- package/dist/chunk-SYVYLZZF.cjs +0 -24
- package/dist/chunk-SZOLA6FR.js +0 -111
- package/dist/chunk-VWDHR4HV.js +0 -168
- package/dist/chunk-Y45G6ZO5.cjs +0 -168
- package/dist/chunk-YRLYSQEQ.cjs +0 -105
- package/dist/chunk-ZYVS43MU.js +0 -312
- package/dist/clear-GK4IEUUS.cjs +0 -12
- package/dist/communityInstaller-XXC7RLE4.cjs +0 -19
- package/dist/completion-HWABSAEL.js +0 -14
- package/dist/completion-IUUVQG4D.cjs +0 -14
- package/dist/config-HF7WOLZF.cjs +0 -18
- package/dist/constants-PEO3P2SJ.cjs +0 -21
- package/dist/export-QJAV2FCZ.js +0 -12
- package/dist/export-XSRFXGWU.cjs +0 -12
- package/dist/feedback-4TCIL3ML.cjs +0 -15
- package/dist/feedback-SJ6VVEY3.js +0 -15
- package/dist/filesystem-W56QZUJF.cjs +0 -10
- package/dist/help-ISBVQL3S.cjs +0 -12
- package/dist/history-XQ4GTSFU.cjs +0 -14
- package/dist/hooks-CJNKJ5PF.js +0 -13
- package/dist/hooks-UTMBTAXT.cjs +0 -13
- package/dist/i18n-N7QQ7A5M.cjs +0 -33
- package/dist/ide-RTA4UJV4.js +0 -12
- package/dist/ide-VWVOLIFF.cjs +0 -12
- package/dist/immediateCommandRouter-BW34JNXL.js +0 -9
- package/dist/immediateCommandRouter-SHOVNB5X.cjs +0 -9
- package/dist/import-ZLJVONXH.cjs +0 -10
- package/dist/init-TBKAB4LZ.cjs +0 -10
- package/dist/language-MDSHEXHB.cjs +0 -18
- package/dist/language-PXTQSHIG.js +0 -18
- package/dist/learn-623TW5EK.cjs +0 -20
- package/dist/learn-BCPV7GM2.js +0 -20
- package/dist/localProjectPermissions-BHQXEWZJ.cjs +0 -18
- package/dist/localProjectPermissions-GMOUYQM6.js +0 -18
- package/dist/login-QMVEETWJ.js +0 -20
- package/dist/login-QYMXAL3K.cjs +0 -20
- package/dist/logout-2CMTDAOJ.js +0 -18
- package/dist/logout-ZOHVZAUK.cjs +0 -18
- package/dist/mcp-IUVKK65S.js +0 -18
- package/dist/mcp-TXC7PYG3.cjs +0 -18
- package/dist/memory-WRIHDEPK.cjs +0 -10
- package/dist/model-RLP75SF5.cjs +0 -10
- package/dist/new-HLSFL6A4.cjs +0 -12
- package/dist/permissions-GP6FTGZ2.js +0 -13
- package/dist/permissions-O6EKKPOG.cjs +0 -13
- package/dist/plan-MCAXDIM2.cjs +0 -11
- package/dist/quit-TQX6GXA5.cjs +0 -10
- package/dist/repeat-BSPS5TWD.cjs +0 -13
- package/dist/resume-2GOPDLL4.cjs +0 -13
- package/dist/resume-37IUVDA6.js +0 -13
- package/dist/search-7KUSHIBL.cjs +0 -17
- package/dist/search-OJGDRIMA.js +0 -17
- package/dist/sessions-CYYCHSQG.cjs +0 -10
- package/dist/settings-2D7CAO66.cjs +0 -30
- package/dist/settings-BXR6SBJP.js +0 -30
- package/dist/share-BXQY5IQU.js +0 -14
- package/dist/share-OSFXZBGS.cjs +0 -14
- package/dist/skills-FL6O6AOM.cjs +0 -26
- package/dist/skills-PNKQZRNK.js +0 -26
- package/dist/skills-new-XFMEHHIF.cjs +0 -15
- package/dist/skills-new-ZNZPHUKS.js +0 -15
- package/dist/slashCommands-LLCNPK3X.js +0 -76
- package/dist/slashCommands-RXZZS6RE.cjs +0 -76
- package/dist/status-BCECUJXT.cjs +0 -11
- package/dist/status-EFO7MQU3.js +0 -11
- package/dist/sync-IJYJ6KKM.js +0 -18
- package/dist/sync-LFT6SBPF.cjs +0 -18
- package/dist/sync-U7SDPBNZ.cjs +0 -40
- package/dist/theme-AWBHSG7J.cjs +0 -18
- package/dist/theme-TQLBPJ2E.js +0 -18
- package/dist/undo-IBBGP7A2.cjs +0 -10
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AgentRegistry
|
|
3
|
-
} from "./chunk-GBHDROGL.js";
|
|
4
1
|
import {
|
|
5
2
|
ConversationManager
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HQUSEWT4.js";
|
|
7
4
|
import {
|
|
8
5
|
getPlanModeManager
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LUMV3DB2.js";
|
|
7
|
+
import {
|
|
8
|
+
AgentRegistry
|
|
9
|
+
} from "./chunk-575PXZX7.js";
|
|
10
|
+
import {
|
|
11
|
+
isGoalFeatureEnabled
|
|
12
|
+
} from "./chunk-7MY4JHER.js";
|
|
10
13
|
|
|
11
14
|
// src/core/agents/SubAgent.ts
|
|
12
15
|
import chalk2 from "chalk";
|
|
13
16
|
|
|
17
|
+
// src/permissions/types.ts
|
|
18
|
+
function normalizePermissionPromptResponse(response) {
|
|
19
|
+
if (typeof response === "boolean") {
|
|
20
|
+
return { decision: response ? "allow_once" : "deny_once" };
|
|
21
|
+
}
|
|
22
|
+
if (!response) {
|
|
23
|
+
return { decision: "deny_once" };
|
|
24
|
+
}
|
|
25
|
+
return response;
|
|
26
|
+
}
|
|
27
|
+
function isAllowedPermissionPrompt(result) {
|
|
28
|
+
return result.decision === "allow_once" || result.decision === "allow_session" || result.decision === "allow_always_project" || result.decision === "allow_always_user" || result.decision === "alternative";
|
|
29
|
+
}
|
|
30
|
+
|
|
14
31
|
// src/core/toolFilter.ts
|
|
15
32
|
var TOOL_CATEGORIES = {
|
|
16
33
|
// Meta tools
|
|
17
34
|
tools_registry: "meta",
|
|
35
|
+
tool_search: "meta",
|
|
18
36
|
plan: "meta",
|
|
19
37
|
todo_write: "meta",
|
|
20
38
|
smart_context_cropper: "meta",
|
|
@@ -26,13 +44,32 @@ var TOOL_CATEGORIES = {
|
|
|
26
44
|
create_team: "meta",
|
|
27
45
|
add_teammate: "meta",
|
|
28
46
|
create_task: "meta",
|
|
47
|
+
task_get: "meta",
|
|
48
|
+
task_list: "meta",
|
|
49
|
+
task_update: "meta",
|
|
50
|
+
task_stop: "meta",
|
|
51
|
+
task_output: "meta",
|
|
52
|
+
skill: "meta",
|
|
53
|
+
install_agent_skill: "create",
|
|
54
|
+
sleep: "meta",
|
|
55
|
+
enter_worktree: "meta",
|
|
56
|
+
exit_worktree: "meta",
|
|
29
57
|
team_status: "meta",
|
|
30
58
|
send_team_message: "meta",
|
|
31
59
|
ask_followup_question: "meta",
|
|
60
|
+
find_agent_skills: "meta",
|
|
61
|
+
request_directory_access: "meta",
|
|
62
|
+
exit_plan_mode: "meta",
|
|
63
|
+
cron_create: "meta",
|
|
64
|
+
cron_delete: "meta",
|
|
32
65
|
list_schedules: "meta",
|
|
33
66
|
cancel_schedule: "meta",
|
|
34
67
|
// Read operations
|
|
35
68
|
read_file: "read",
|
|
69
|
+
fff_find: "read",
|
|
70
|
+
fff_grep: "read",
|
|
71
|
+
find: "read",
|
|
72
|
+
glob: "read",
|
|
36
73
|
search: "read",
|
|
37
74
|
search_with_context: "read",
|
|
38
75
|
semantic_search: "read",
|
|
@@ -43,6 +80,7 @@ var TOOL_CATEGORIES = {
|
|
|
43
80
|
write_file: "write",
|
|
44
81
|
append_file: "write",
|
|
45
82
|
apply_patch: "write",
|
|
83
|
+
notebook_edit: "write",
|
|
46
84
|
search_replace: "write",
|
|
47
85
|
format_file: "write",
|
|
48
86
|
multi_file_edit: "write",
|
|
@@ -54,6 +92,11 @@ var TOOL_CATEGORIES = {
|
|
|
54
92
|
// Delete operations
|
|
55
93
|
delete_path: "delete",
|
|
56
94
|
remove_dependency: "delete",
|
|
95
|
+
package_info: "read",
|
|
96
|
+
// Web read operations
|
|
97
|
+
web_search: "read",
|
|
98
|
+
fetch_url: "read",
|
|
99
|
+
web_repo: "read",
|
|
57
100
|
// Git read operations
|
|
58
101
|
git_diff: "git_read",
|
|
59
102
|
git_status: "git_read",
|
|
@@ -97,7 +140,24 @@ var TOOL_CATEGORIES = {
|
|
|
97
140
|
git_push: "git_write",
|
|
98
141
|
// Shell operations
|
|
99
142
|
run_command: "shell",
|
|
100
|
-
|
|
143
|
+
shell: "shell",
|
|
144
|
+
custom_command: "shell",
|
|
145
|
+
// Browser operations (Chrome extension bridge only)
|
|
146
|
+
browser_screenshot: "browser",
|
|
147
|
+
browser_click: "browser",
|
|
148
|
+
browser_type: "browser",
|
|
149
|
+
browser_navigate: "browser",
|
|
150
|
+
browser_scroll: "browser",
|
|
151
|
+
browser_find_element: "browser",
|
|
152
|
+
browser_press_key: "browser",
|
|
153
|
+
browser_get_page_context: "browser",
|
|
154
|
+
browser_get_element: "browser",
|
|
155
|
+
browser_wait_for_element: "browser",
|
|
156
|
+
browser_read_console: "browser",
|
|
157
|
+
browser_read_network: "browser",
|
|
158
|
+
browser_get_tabs: "browser",
|
|
159
|
+
browser_get_tab_groups: "browser",
|
|
160
|
+
browser_execute_js: "browser"
|
|
101
161
|
};
|
|
102
162
|
var CONTEXT_POLICIES = {
|
|
103
163
|
// CLI: Full access to everything
|
|
@@ -111,6 +171,8 @@ var CONTEXT_POLICIES = {
|
|
|
111
171
|
blockedTools: [
|
|
112
172
|
"list_tree",
|
|
113
173
|
// Don't expose directory structure
|
|
174
|
+
"find",
|
|
175
|
+
// Don't allow broad searches
|
|
114
176
|
"search",
|
|
115
177
|
// Don't allow broad searches
|
|
116
178
|
"search_with_context",
|
|
@@ -155,14 +217,70 @@ var CONTEXT_POLICIES = {
|
|
|
155
217
|
"git_rebase"
|
|
156
218
|
]
|
|
157
219
|
},
|
|
220
|
+
// Chrome: Browser-first, limited file access
|
|
221
|
+
// Only browser_* tools + basic read/write for Downloads
|
|
222
|
+
chrome: {
|
|
223
|
+
allowedCategories: ["read", "write", "browser", "meta"],
|
|
224
|
+
allowedTools: [
|
|
225
|
+
// Browser tools — ALWAYS available, highest priority
|
|
226
|
+
"browser_screenshot",
|
|
227
|
+
"browser_click",
|
|
228
|
+
"browser_type",
|
|
229
|
+
"browser_navigate",
|
|
230
|
+
"browser_scroll",
|
|
231
|
+
"browser_find_element",
|
|
232
|
+
"browser_press_key",
|
|
233
|
+
"browser_get_page_context",
|
|
234
|
+
"browser_get_element",
|
|
235
|
+
"browser_wait_for_element",
|
|
236
|
+
"browser_read_console",
|
|
237
|
+
"browser_read_network",
|
|
238
|
+
"browser_get_tabs",
|
|
239
|
+
"browser_get_tab_groups",
|
|
240
|
+
"browser_execute_js",
|
|
241
|
+
// Basic file ops — restricted scope
|
|
242
|
+
"read_file",
|
|
243
|
+
"write_file",
|
|
244
|
+
"fff_grep",
|
|
245
|
+
"fff_find",
|
|
246
|
+
"search",
|
|
247
|
+
"list_tree",
|
|
248
|
+
// Web
|
|
249
|
+
"web_search",
|
|
250
|
+
"fetch_url",
|
|
251
|
+
// Communication
|
|
252
|
+
"plan",
|
|
253
|
+
"ask_followup_question",
|
|
254
|
+
"todo_write",
|
|
255
|
+
"save_memory",
|
|
256
|
+
"recall_memory",
|
|
257
|
+
"tools_registry"
|
|
258
|
+
],
|
|
259
|
+
blockedTools: [
|
|
260
|
+
"run_command",
|
|
261
|
+
"custom_command",
|
|
262
|
+
"git_push",
|
|
263
|
+
"git_reset",
|
|
264
|
+
"git_rebase",
|
|
265
|
+
"git_merge",
|
|
266
|
+
"git_cherry_pick",
|
|
267
|
+
"auto_commit",
|
|
268
|
+
"delete_path",
|
|
269
|
+
"create_directory",
|
|
270
|
+
"rename_path",
|
|
271
|
+
"copy_path",
|
|
272
|
+
"git_worktree_add",
|
|
273
|
+
"git_worktree_remove",
|
|
274
|
+
"delegate_task",
|
|
275
|
+
"delegate_parallel"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
158
278
|
// Restricted: Read-only mode
|
|
159
279
|
restricted: {
|
|
160
280
|
allowedCategories: ["read", "git_read", "meta"],
|
|
161
281
|
blockedTools: [
|
|
162
282
|
"list_tree",
|
|
163
|
-
// Even in read mode, don't expose full structure
|
|
164
283
|
"ask_followup_question"
|
|
165
|
-
// Requires interactive terminal (may be running in restricted non-interactive mode)
|
|
166
284
|
]
|
|
167
285
|
}
|
|
168
286
|
};
|
|
@@ -170,6 +288,8 @@ function getToolCategory(toolName) {
|
|
|
170
288
|
return TOOL_CATEGORIES[toolName] ?? "meta";
|
|
171
289
|
}
|
|
172
290
|
var ToolFilter = class {
|
|
291
|
+
policy;
|
|
292
|
+
context;
|
|
173
293
|
constructor(context = "cli", customPolicy) {
|
|
174
294
|
this.context = context;
|
|
175
295
|
const basePolicy = CONTEXT_POLICIES[context];
|
|
@@ -245,24 +365,35 @@ function createToolFilter(context = "cli", customPolicy) {
|
|
|
245
365
|
var RELEVANCE_CATEGORIES = {
|
|
246
366
|
// Always include
|
|
247
367
|
read_file: "always",
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
368
|
+
fff_find: "always",
|
|
369
|
+
fff_grep: "always",
|
|
370
|
+
tool_search: "always",
|
|
371
|
+
ask_followup_question: "always",
|
|
372
|
+
find_agent_skills: "always",
|
|
373
|
+
tools_registry: "always",
|
|
374
|
+
request_directory_access: "always",
|
|
251
375
|
plan: "always",
|
|
252
|
-
|
|
376
|
+
exit_plan_mode: "always",
|
|
253
377
|
todo_write: "always",
|
|
254
378
|
// Filesystem
|
|
379
|
+
find: "filesystem",
|
|
380
|
+
glob: "filesystem",
|
|
381
|
+
search: "filesystem",
|
|
382
|
+
list_tree: "filesystem",
|
|
383
|
+
file_stats: "filesystem",
|
|
384
|
+
checksum: "filesystem",
|
|
385
|
+
// Editing
|
|
386
|
+
write_file: "editing",
|
|
255
387
|
append_file: "filesystem",
|
|
256
|
-
apply_patch: "
|
|
388
|
+
apply_patch: "editing",
|
|
257
389
|
create_directory: "filesystem",
|
|
258
390
|
delete_path: "filesystem",
|
|
259
391
|
rename_path: "filesystem",
|
|
260
392
|
copy_path: "filesystem",
|
|
261
|
-
search_replace: "
|
|
262
|
-
format_file: "
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
multi_file_edit: "filesystem",
|
|
393
|
+
search_replace: "editing",
|
|
394
|
+
format_file: "editing",
|
|
395
|
+
multi_file_edit: "editing",
|
|
396
|
+
notebook_edit: "editing",
|
|
266
397
|
search_with_context: "search",
|
|
267
398
|
semantic_search: "search",
|
|
268
399
|
// Basic git
|
|
@@ -279,7 +410,7 @@ var RELEVANCE_CATEGORIES = {
|
|
|
279
410
|
git_apply_patch: "git_basic",
|
|
280
411
|
git_fetch: "git_basic",
|
|
281
412
|
git_pull: "git_basic",
|
|
282
|
-
git_push: "
|
|
413
|
+
git_push: "git_advanced",
|
|
283
414
|
git_stash: "git_basic",
|
|
284
415
|
git_stash_list: "git_basic",
|
|
285
416
|
git_stash_pop: "git_basic",
|
|
@@ -308,24 +439,52 @@ var RELEVANCE_CATEGORIES = {
|
|
|
308
439
|
// Dependencies
|
|
309
440
|
add_dependency: "dependencies",
|
|
310
441
|
remove_dependency: "dependencies",
|
|
442
|
+
package_info: "dependencies",
|
|
443
|
+
// Verification and shell
|
|
444
|
+
run_command: "verification",
|
|
445
|
+
shell: "verification",
|
|
446
|
+
// Web
|
|
447
|
+
web_search: "web",
|
|
448
|
+
fetch_url: "web",
|
|
449
|
+
web_repo: "web",
|
|
450
|
+
// Browser
|
|
451
|
+
browser_screenshot: "browser",
|
|
452
|
+
browser_click: "browser",
|
|
453
|
+
browser_type: "browser",
|
|
454
|
+
browser_navigate: "browser",
|
|
455
|
+
browser_scroll: "browser",
|
|
456
|
+
browser_find_element: "browser",
|
|
457
|
+
browser_press_key: "browser",
|
|
458
|
+
browser_get_page_context: "browser",
|
|
459
|
+
browser_get_element: "browser",
|
|
460
|
+
browser_wait_for_element: "browser",
|
|
461
|
+
browser_read_console: "browser",
|
|
462
|
+
browser_read_network: "browser",
|
|
463
|
+
browser_get_tabs: "browser",
|
|
464
|
+
browser_get_tab_groups: "browser",
|
|
465
|
+
browser_execute_js: "browser",
|
|
311
466
|
// Meta
|
|
312
|
-
tools_registry: "meta",
|
|
313
467
|
save_memory: "meta",
|
|
314
468
|
recall_memory: "meta",
|
|
315
469
|
smart_context_cropper: "meta",
|
|
316
470
|
create_meta_tool: "meta",
|
|
317
|
-
custom_command: "
|
|
471
|
+
custom_command: "verification",
|
|
318
472
|
delegate_task: "meta",
|
|
319
473
|
delegate_parallel: "meta",
|
|
320
474
|
create_team: "meta",
|
|
321
475
|
add_teammate: "meta",
|
|
322
476
|
create_task: "meta",
|
|
477
|
+
task_get: "meta",
|
|
478
|
+
task_list: "meta",
|
|
479
|
+
task_update: "meta",
|
|
480
|
+
task_stop: "meta",
|
|
481
|
+
task_output: "meta",
|
|
482
|
+
enter_worktree: "meta",
|
|
483
|
+
exit_worktree: "meta",
|
|
323
484
|
team_status: "meta",
|
|
324
485
|
send_team_message: "meta",
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
find_agent_skills: "always",
|
|
328
|
-
// Skill search should always be available so the LLM can explore community skills
|
|
486
|
+
cron_create: "meta",
|
|
487
|
+
cron_delete: "meta",
|
|
329
488
|
list_schedules: "meta",
|
|
330
489
|
cancel_schedule: "meta",
|
|
331
490
|
// Project tracking
|
|
@@ -333,11 +492,35 @@ var RELEVANCE_CATEGORIES = {
|
|
|
333
492
|
};
|
|
334
493
|
var CATEGORY_TRIGGERS = {
|
|
335
494
|
always: [],
|
|
336
|
-
filesystem: ["file", "directory", "folder", "create", "delete", "rename", "copy", "move", "format", "
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
495
|
+
filesystem: ["file", "directory", "folder", "create", "delete", "rename", "copy", "move", "format", "path", "open"],
|
|
496
|
+
editing: ["fix", "edit", "change", "modify", "patch", "write", "implement", "refactor", "update", "replace", "create", "delete", "remove", "format", "add", "build", "document", "docs", "config", "configure"],
|
|
497
|
+
git_basic: [
|
|
498
|
+
"git",
|
|
499
|
+
"commit",
|
|
500
|
+
"branch",
|
|
501
|
+
"diff",
|
|
502
|
+
"status",
|
|
503
|
+
"stash",
|
|
504
|
+
"pull",
|
|
505
|
+
"push",
|
|
506
|
+
"recent changes",
|
|
507
|
+
"recent change",
|
|
508
|
+
"what changed",
|
|
509
|
+
"changes introduced",
|
|
510
|
+
"changes were introduced",
|
|
511
|
+
"changed recently",
|
|
512
|
+
"repo recently",
|
|
513
|
+
"repository recently",
|
|
514
|
+
"uncommitted",
|
|
515
|
+
"working tree",
|
|
516
|
+
"staged"
|
|
517
|
+
],
|
|
518
|
+
git_advanced: ["merge", "rebase", "cherry-pick", "worktree", "reset", "push", "force-push"],
|
|
519
|
+
search: ["search", "find", "grep", "look for", "locate", "where is", "symbol", "definition"],
|
|
520
|
+
verification: ["test", "tests", "build", "lint", "typecheck", "verify", "run", "command", "script", "proof", "install"],
|
|
521
|
+
web: ["web", "url", "http", "https", "fetch", "search internet", "latest", "docs", "documentation", "changelog"],
|
|
522
|
+
browser: ["browser", "chrome", "page", "tab", "click", "screenshot", "console", "network"],
|
|
523
|
+
dependencies: ["dependency", "dependencies", "package", "npm", "install", "yarn", "bun add", "cargo add", "pip install"],
|
|
341
524
|
meta: [
|
|
342
525
|
"tool",
|
|
343
526
|
"delegate",
|
|
@@ -354,12 +537,78 @@ var CATEGORY_TRIGGERS = {
|
|
|
354
537
|
],
|
|
355
538
|
project_tracking: ["issue", "issues", "pr", "pull request", "assigned", "tracker", "bug", "feature request", "milestone", "review"]
|
|
356
539
|
};
|
|
540
|
+
var TOOL_SELECTION_CACHE_LIMIT = 100;
|
|
541
|
+
var toolSelectionCache = /* @__PURE__ */ new Map();
|
|
542
|
+
var CATALOG_LABELS = {
|
|
543
|
+
always: "core",
|
|
544
|
+
filesystem: "filesystem",
|
|
545
|
+
editing: "editing",
|
|
546
|
+
git_basic: "git",
|
|
547
|
+
git_advanced: "advanced git",
|
|
548
|
+
search: "search",
|
|
549
|
+
verification: "verification",
|
|
550
|
+
web: "web",
|
|
551
|
+
browser: "browser",
|
|
552
|
+
dependencies: "dependencies",
|
|
553
|
+
meta: "coordination",
|
|
554
|
+
project_tracking: "project tracking"
|
|
555
|
+
};
|
|
556
|
+
function extractRecentToolArguments(message) {
|
|
557
|
+
if (!message.tool_calls?.length) {
|
|
558
|
+
return "";
|
|
559
|
+
}
|
|
560
|
+
return message.tool_calls.map((call) => call.function.arguments).join(" ");
|
|
561
|
+
}
|
|
562
|
+
function getRecentSelectionText(messages) {
|
|
563
|
+
return messages.slice(-8).map((message) => `${message.content ?? ""} ${extractRecentToolArguments(message)}`).join(" ").toLowerCase();
|
|
564
|
+
}
|
|
565
|
+
function escapeRegExp(value) {
|
|
566
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
567
|
+
}
|
|
568
|
+
function matchesCategoryTrigger(recentText, trigger) {
|
|
569
|
+
if (!recentText || !trigger) {
|
|
570
|
+
return false;
|
|
571
|
+
}
|
|
572
|
+
if (trigger.includes(" ")) {
|
|
573
|
+
return recentText.includes(trigger);
|
|
574
|
+
}
|
|
575
|
+
return new RegExp(`\\b${escapeRegExp(trigger)}\\b`).test(recentText);
|
|
576
|
+
}
|
|
577
|
+
function stableToolCacheKey(tools, messages) {
|
|
578
|
+
const toolNames = tools.map((tool) => tool.name).sort().join(",");
|
|
579
|
+
return `${toolNames}
|
|
580
|
+
${getRecentSelectionText(messages)}`;
|
|
581
|
+
}
|
|
582
|
+
function rememberToolSelection(key, names) {
|
|
583
|
+
if (toolSelectionCache.size >= TOOL_SELECTION_CACHE_LIMIT) {
|
|
584
|
+
const oldestKey = toolSelectionCache.keys().next().value;
|
|
585
|
+
if (oldestKey) {
|
|
586
|
+
toolSelectionCache.delete(oldestKey);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
toolSelectionCache.set(key, names);
|
|
590
|
+
}
|
|
591
|
+
function restoreCachedSelection(tools, names) {
|
|
592
|
+
const byName = new Map(tools.map((tool) => [tool.name, tool]));
|
|
593
|
+
return names.map((name) => byName.get(name)).filter((tool) => Boolean(tool));
|
|
594
|
+
}
|
|
595
|
+
function matchesToolByText(tool, recentText) {
|
|
596
|
+
if (!recentText) {
|
|
597
|
+
return false;
|
|
598
|
+
}
|
|
599
|
+
const normalizedName = tool.name.toLowerCase();
|
|
600
|
+
const spacedName = normalizedName.replace(/_/g, " ");
|
|
601
|
+
if (recentText.includes(normalizedName) || recentText.includes(spacedName)) {
|
|
602
|
+
return true;
|
|
603
|
+
}
|
|
604
|
+
return tool.description.toLowerCase().split(/[^a-z0-9_/-]+/).filter((token) => token.length >= 5).some((token) => recentText.includes(token));
|
|
605
|
+
}
|
|
357
606
|
function detectRelevantCategories(messages) {
|
|
358
607
|
const categories = /* @__PURE__ */ new Set(["always"]);
|
|
359
608
|
const recentMessages = messages.slice(-8);
|
|
360
|
-
const recentText =
|
|
609
|
+
const recentText = getRecentSelectionText(messages);
|
|
361
610
|
for (const [category, triggers] of Object.entries(CATEGORY_TRIGGERS)) {
|
|
362
|
-
if (triggers.some((trigger) => recentText
|
|
611
|
+
if (triggers.some((trigger) => matchesCategoryTrigger(recentText, trigger))) {
|
|
363
612
|
categories.add(category);
|
|
364
613
|
}
|
|
365
614
|
}
|
|
@@ -381,31 +630,169 @@ function detectRelevantCategories(messages) {
|
|
|
381
630
|
}
|
|
382
631
|
return categories;
|
|
383
632
|
}
|
|
384
|
-
function filterToolsByRelevance(tools, messages) {
|
|
633
|
+
function filterToolsByRelevance(tools, messages, options = {}) {
|
|
634
|
+
const cacheEnabled = options.cache !== false;
|
|
635
|
+
const cacheKey = cacheEnabled ? stableToolCacheKey(tools, messages) : "";
|
|
636
|
+
const cachedNames = cacheEnabled ? toolSelectionCache.get(cacheKey) : void 0;
|
|
637
|
+
if (cachedNames) {
|
|
638
|
+
return restoreCachedSelection(tools, cachedNames);
|
|
639
|
+
}
|
|
385
640
|
const relevantCategories = detectRelevantCategories(messages);
|
|
386
|
-
|
|
641
|
+
const recentText = getRecentSelectionText(messages);
|
|
642
|
+
const selected = tools.filter((tool) => {
|
|
387
643
|
const category = RELEVANCE_CATEGORIES[tool.name];
|
|
388
|
-
|
|
644
|
+
if (category && relevantCategories.has(category)) {
|
|
645
|
+
return true;
|
|
646
|
+
}
|
|
647
|
+
return matchesToolByText(tool, recentText);
|
|
389
648
|
});
|
|
649
|
+
if (cacheEnabled) {
|
|
650
|
+
rememberToolSelection(cacheKey, selected.map((tool) => tool.name));
|
|
651
|
+
}
|
|
652
|
+
return selected;
|
|
653
|
+
}
|
|
654
|
+
function formatToolCapabilityCatalog(tools) {
|
|
655
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
656
|
+
for (const tool of tools) {
|
|
657
|
+
const relevance = RELEVANCE_CATEGORIES[tool.name] ?? "meta";
|
|
658
|
+
const label = CATALOG_LABELS[relevance];
|
|
659
|
+
const existing = grouped.get(label) ?? [];
|
|
660
|
+
existing.push(tool.name);
|
|
661
|
+
grouped.set(label, existing);
|
|
662
|
+
}
|
|
663
|
+
return [...grouped.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([label, names]) => `- ${label}: ${[...new Set(names)].sort().join(", ")}`).join("\n");
|
|
390
664
|
}
|
|
391
665
|
|
|
392
666
|
// src/core/toolManager.ts
|
|
667
|
+
var SEQUENTIAL_TOOL_CATEGORIES = /* @__PURE__ */ new Set([
|
|
668
|
+
"write",
|
|
669
|
+
"create",
|
|
670
|
+
"delete",
|
|
671
|
+
"git_write",
|
|
672
|
+
"shell"
|
|
673
|
+
]);
|
|
674
|
+
var GOAL_TOOL_DEFINITIONS = [
|
|
675
|
+
{
|
|
676
|
+
name: "get_goal",
|
|
677
|
+
description: "Inspect the current persistent goal, queue, status, time and token budgets, and progress metadata. Use only for explicit goal-management requests."
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
name: "create_goal",
|
|
681
|
+
description: "Create a persistent goal only when the user explicitly asks for durable goal tracking or long-running goal pursuit. Do not infer goals from ordinary tasks.",
|
|
682
|
+
parameters: {
|
|
683
|
+
type: "object",
|
|
684
|
+
properties: {
|
|
685
|
+
objective: { type: "string", description: "Explicit user-requested goal objective" },
|
|
686
|
+
token_budget: { type: "number", description: "Optional positive token budget" },
|
|
687
|
+
time_budget_seconds: { type: "number", description: "Optional positive time budget in seconds" },
|
|
688
|
+
min_tokens_before_wrap_up: { type: "number", description: "Optional minimum tokens before normal completion is allowed" },
|
|
689
|
+
min_time_seconds_before_wrap_up: { type: "number", description: "Optional minimum time in seconds before normal completion is allowed" }
|
|
690
|
+
},
|
|
691
|
+
required: ["objective"]
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
name: "create_goal_from_template",
|
|
696
|
+
description: "Resolve a reusable .pi-goals template and create the resulting persistent goal when the user explicitly requests a template/workflow goal.",
|
|
697
|
+
parameters: {
|
|
698
|
+
type: "object",
|
|
699
|
+
properties: {
|
|
700
|
+
template: { type: "string", description: "Template name or alias" },
|
|
701
|
+
flags: { type: "object", description: "Template flag values" },
|
|
702
|
+
args: { type: "string", description: "Trailing template arguments" },
|
|
703
|
+
token_budget: { type: "number", description: "Optional positive token budget" },
|
|
704
|
+
time_budget_seconds: { type: "number", description: "Optional positive time budget in seconds" },
|
|
705
|
+
min_tokens_before_wrap_up: { type: "number", description: "Optional minimum tokens before normal completion is allowed" },
|
|
706
|
+
min_time_seconds_before_wrap_up: { type: "number", description: "Optional minimum time in seconds before normal completion is allowed" }
|
|
707
|
+
},
|
|
708
|
+
required: ["template"]
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: "update_goal",
|
|
713
|
+
description: "Update the current goal when the user explicitly asks to edit, pause, resume, complete, or adjust budgets.",
|
|
714
|
+
parameters: {
|
|
715
|
+
type: "object",
|
|
716
|
+
properties: {
|
|
717
|
+
objective: { type: "string", description: "Optional replacement objective" },
|
|
718
|
+
status: { type: "string", description: "Optional status", enum: ["active", "paused", "complete", "budgetLimited"] },
|
|
719
|
+
token_budget: { type: "number", description: "Optional positive token budget; use clear_goal for removal requests" },
|
|
720
|
+
time_budget_seconds: { type: "number", description: "Optional positive time budget in seconds" },
|
|
721
|
+
min_tokens_before_wrap_up: { type: "number", description: "Optional token floor" },
|
|
722
|
+
min_time_seconds_before_wrap_up: { type: "number", description: "Optional time floor in seconds" }
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
name: "clear_goal",
|
|
728
|
+
description: "Clear the current persistent goal only when the user explicitly asks to clear, remove, delete, or dismiss it."
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
name: "list_goal_templates",
|
|
732
|
+
description: "List reusable .pi-goals templates from bounded project template directories."
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: "enqueue_goal",
|
|
736
|
+
description: "Add a persistent goal to the FIFO queue only when the user explicitly asks to queue later goal work.",
|
|
737
|
+
parameters: {
|
|
738
|
+
type: "object",
|
|
739
|
+
properties: {
|
|
740
|
+
objective: { type: "string", description: "Goal objective to queue" },
|
|
741
|
+
token_budget: { type: "number", description: "Optional positive token budget" },
|
|
742
|
+
time_budget_seconds: { type: "number", description: "Optional positive time budget in seconds" },
|
|
743
|
+
min_tokens_before_wrap_up: { type: "number", description: "Optional token floor" },
|
|
744
|
+
min_time_seconds_before_wrap_up: { type: "number", description: "Optional time floor in seconds" }
|
|
745
|
+
},
|
|
746
|
+
required: ["objective"]
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
name: "list_goal_queue",
|
|
751
|
+
description: "List queued goal objectives waiting to run after the active goal completes or clears."
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
name: "start_queued_goal",
|
|
755
|
+
description: "Start the next queued direct goal after verifying no non-terminal goal is active. The queue item is removed only after goal creation succeeds."
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
name: "dequeue_goal",
|
|
759
|
+
description: "Remove the first queued goal after it is truly satisfied or the user explicitly authorized removing it. Requires audit rationale and authority.",
|
|
760
|
+
parameters: {
|
|
761
|
+
type: "object",
|
|
762
|
+
properties: {
|
|
763
|
+
rationale: { type: "string", description: "Why this queue head is being dequeued now" },
|
|
764
|
+
authority: { type: "string", description: "User authorization or completion evidence for dequeuing" }
|
|
765
|
+
},
|
|
766
|
+
required: ["rationale", "authority"]
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
name: "remove_queued_goal",
|
|
771
|
+
description: "Remove a specific queued goal by queue ID only when the user explicitly asks.",
|
|
772
|
+
parameters: {
|
|
773
|
+
type: "object",
|
|
774
|
+
properties: {
|
|
775
|
+
queueId: { type: "string", description: "Queue ID to remove" }
|
|
776
|
+
},
|
|
777
|
+
required: ["queueId"]
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
];
|
|
393
781
|
var DEFAULT_TOOL_DEFINITIONS = [
|
|
394
782
|
{
|
|
395
783
|
name: "tools_registry",
|
|
396
784
|
description: "List all available tools (built-in and meta)"
|
|
397
785
|
},
|
|
398
786
|
{
|
|
399
|
-
name: "
|
|
400
|
-
description:
|
|
787
|
+
name: "tool_search",
|
|
788
|
+
description: "Search available tools by capability, name, or description. Use this when you need to discover the best built-in or meta tool for a task instead of guessing.",
|
|
401
789
|
parameters: {
|
|
402
790
|
type: "object",
|
|
403
791
|
properties: {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
792
|
+
query: { type: "string", description: 'Search terms for the capability or tool you need (e.g. "delegate agent", "git worktree", "browser screenshot")' },
|
|
793
|
+
limit: { type: "number", description: "Maximum matching tools to return (default: 10)" }
|
|
794
|
+
},
|
|
795
|
+
required: ["query"]
|
|
409
796
|
}
|
|
410
797
|
},
|
|
411
798
|
{
|
|
@@ -451,6 +838,22 @@ var DEFAULT_TOOL_DEFINITIONS = [
|
|
|
451
838
|
required: ["path", "contents"]
|
|
452
839
|
}
|
|
453
840
|
},
|
|
841
|
+
{
|
|
842
|
+
name: "notebook_edit",
|
|
843
|
+
description: "Edit a Jupyter notebook cell without treating the .ipynb file as plain text. Supports replace, insert, and delete by cell index or cell ID.",
|
|
844
|
+
parameters: {
|
|
845
|
+
type: "object",
|
|
846
|
+
properties: {
|
|
847
|
+
path: { type: "string", description: "Relative path to the .ipynb notebook file" },
|
|
848
|
+
cell_index: { type: "number", description: "0-based cell index to target. For insert, inserts after this index; omit to append." },
|
|
849
|
+
cell_id: { type: "string", description: "Optional cell ID to target instead of cell_index" },
|
|
850
|
+
new_source: { type: "string", description: "New source for replace or insert operations" },
|
|
851
|
+
cell_type: { type: "string", description: "Cell type for insert operations", enum: ["code", "markdown"] },
|
|
852
|
+
edit_mode: { type: "string", description: "Notebook edit mode", enum: ["replace", "insert", "delete"] }
|
|
853
|
+
},
|
|
854
|
+
required: ["path"]
|
|
855
|
+
}
|
|
856
|
+
},
|
|
454
857
|
{
|
|
455
858
|
name: "append_file",
|
|
456
859
|
description: "Append text to a file",
|
|
@@ -476,41 +879,31 @@ var DEFAULT_TOOL_DEFINITIONS = [
|
|
|
476
879
|
}
|
|
477
880
|
},
|
|
478
881
|
{
|
|
479
|
-
name: "
|
|
480
|
-
description: "
|
|
882
|
+
name: "fff_grep",
|
|
883
|
+
description: "Content search with frecency ranking and definition detection when native FFF is available, plus a ripgrep-backed fallback. Use this for content search.",
|
|
481
884
|
parameters: {
|
|
482
885
|
type: "object",
|
|
483
886
|
properties: {
|
|
484
|
-
query: { type: "string", description: "
|
|
485
|
-
path: { type: "string", description: "Optional
|
|
887
|
+
query: { type: "string", description: "Search pattern (regex auto-detected)" },
|
|
888
|
+
path: { type: "string", description: "Optional subdirectory to search in" },
|
|
889
|
+
exclude: { type: "string", description: "Exclude patterns (comma/space separated)" },
|
|
890
|
+
caseSensitive: { type: "boolean", description: "Force case-sensitive matching" },
|
|
891
|
+
beforeContext: { type: "number", description: "Lines of context before match (default: 2)" },
|
|
892
|
+
afterContext: { type: "number", description: "Lines of context after match (default: 2)" },
|
|
893
|
+
classifyDefinitions: { type: "boolean", description: "Prioritize code definitions (default: true)" },
|
|
894
|
+
limit: { type: "number", description: "Maximum results (default: 50)" }
|
|
486
895
|
},
|
|
487
896
|
required: ["query"]
|
|
488
897
|
}
|
|
489
898
|
},
|
|
490
899
|
{
|
|
491
|
-
name: "
|
|
492
|
-
description: "
|
|
900
|
+
name: "fff_find",
|
|
901
|
+
description: "Path and filename search with frecency ranking when native FFF is available, plus a ripgrep-backed fallback. Use this for file path discovery.",
|
|
493
902
|
parameters: {
|
|
494
903
|
type: "object",
|
|
495
904
|
properties: {
|
|
496
|
-
query: { type: "string", description: "
|
|
497
|
-
|
|
498
|
-
context: { type: "number", description: "Number of context lines (default 2)" },
|
|
499
|
-
limit: { type: "number", description: "Maximum results (default 10)" }
|
|
500
|
-
},
|
|
501
|
-
required: ["query"]
|
|
502
|
-
}
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
name: "semantic_search",
|
|
506
|
-
description: "Search workspace text semantically with gitignore awareness",
|
|
507
|
-
parameters: {
|
|
508
|
-
type: "object",
|
|
509
|
-
properties: {
|
|
510
|
-
query: { type: "string", description: "Text to search for" },
|
|
511
|
-
path: { type: "string", description: "Optional relative path to search in" },
|
|
512
|
-
limit: { type: "number", description: "Maximum results (default 5)" },
|
|
513
|
-
window: { type: "number", description: "Context window size (default 400)" }
|
|
905
|
+
query: { type: "string", description: "Filename or path pattern to search" },
|
|
906
|
+
limit: { type: "number", description: "Maximum results (default: 50)" }
|
|
514
907
|
},
|
|
515
908
|
required: ["query"]
|
|
516
909
|
}
|
|
@@ -576,12 +969,12 @@ var DEFAULT_TOOL_DEFINITIONS = [
|
|
|
576
969
|
},
|
|
577
970
|
{
|
|
578
971
|
name: "run_command",
|
|
579
|
-
description: "Execute shell
|
|
972
|
+
description: "Execute a shell command in the user's shell with full pipe, redirect, and environment variable support. Cross-platform (bash/zsh on macOS/Linux, cmd/PowerShell on Windows). Prefer dedicated tools for file operations (read_file, write_file, fff_grep, fff_find). For most commands, prefer the `shell` tool instead - it shows real-time output. Use this only for quick commands where you don't need progress monitoring.",
|
|
580
973
|
parameters: {
|
|
581
974
|
type: "object",
|
|
582
975
|
properties: {
|
|
583
|
-
command: { type: "string", description: "Command to execute" },
|
|
584
|
-
args: { type: "array", description: "Command arguments", items: { type: "string", description: "Single argument" } },
|
|
976
|
+
command: { type: "string", description: "Command to execute. Supports pipes (|), redirects (>), env vars ($HOME), globs (*), and chaining (&&)." },
|
|
977
|
+
args: { type: "array", description: "Command arguments. Joined with the command into a single shell string. For complex commands with pipes/redirects, put everything in the command field instead.", items: { type: "string", description: "Single argument" } },
|
|
585
978
|
directory: { type: "string", description: "Directory relative to workspace root to execute in" },
|
|
586
979
|
description: { type: "string", description: "Brief description of what this command does (shown to user)" },
|
|
587
980
|
background: { type: "boolean", description: "Run process in background (returns PID, useful for dev servers)" }
|
|
@@ -591,6 +984,23 @@ var DEFAULT_TOOL_DEFINITIONS = [
|
|
|
591
984
|
requiresApproval: true,
|
|
592
985
|
approvalMessage: "Allow the agent to run a shell command?"
|
|
593
986
|
},
|
|
987
|
+
{
|
|
988
|
+
name: "shell",
|
|
989
|
+
description: "Execute a shell command with real-time output displayed in a live, isolated box in the TUI. Use this as the DEFAULT for running shell commands - it shows stdout/stderr in real-time while keeping the CLI input responsive. Ideal for tests, builds, installs, dev servers, and any command where you want to see progress. For quick one-liners where output monitoring isn't needed, you can use run_command instead.",
|
|
990
|
+
parameters: {
|
|
991
|
+
type: "object",
|
|
992
|
+
properties: {
|
|
993
|
+
command: { type: "string", description: "Command to execute. Supports pipes (|), redirects (>), env vars ($HOME), globs (*), and chaining (&&)." },
|
|
994
|
+
args: { type: "array", description: "Command arguments. Joined with the command into a single shell string.", items: { type: "string", description: "Single argument" } },
|
|
995
|
+
directory: { type: "string", description: "Directory relative to workspace root to execute in" },
|
|
996
|
+
description: { type: "string", description: "Brief description of what this command does (shown to user)" },
|
|
997
|
+
background: { type: "boolean", description: "Run process in background (detached). Returns immediately with PID. Use for dev servers, long-running processes, or when you don't need to wait for completion." }
|
|
998
|
+
},
|
|
999
|
+
required: ["command"]
|
|
1000
|
+
},
|
|
1001
|
+
requiresApproval: true,
|
|
1002
|
+
approvalMessage: "Allow the agent to run a shell command with live output?"
|
|
1003
|
+
},
|
|
594
1004
|
{
|
|
595
1005
|
name: "add_dependency",
|
|
596
1006
|
description: "Add a package dependency (supports dev flag)",
|
|
@@ -664,13 +1074,12 @@ var DEFAULT_TOOL_DEFINITIONS = [
|
|
|
664
1074
|
},
|
|
665
1075
|
{
|
|
666
1076
|
name: "git_diff",
|
|
667
|
-
description: "Show git diff for
|
|
1077
|
+
description: "Show git diff. When path is provided, shows diff for that file only. When omitted, shows all uncommitted changes in the workspace.",
|
|
668
1078
|
parameters: {
|
|
669
1079
|
type: "object",
|
|
670
1080
|
properties: {
|
|
671
|
-
path: { type: "string", description: "Relative path to the
|
|
672
|
-
}
|
|
673
|
-
required: ["path"]
|
|
1081
|
+
path: { type: "string", description: "Relative path to a specific file (optional). Omit to diff the entire workspace." }
|
|
1082
|
+
}
|
|
674
1083
|
}
|
|
675
1084
|
},
|
|
676
1085
|
{
|
|
@@ -1072,31 +1481,6 @@ var DEFAULT_TOOL_DEFINITIONS = [
|
|
|
1072
1481
|
required: ["name", "command"]
|
|
1073
1482
|
}
|
|
1074
1483
|
},
|
|
1075
|
-
{
|
|
1076
|
-
name: "multi_file_edit",
|
|
1077
|
-
description: "Apply multiple edits to a file",
|
|
1078
|
-
parameters: {
|
|
1079
|
-
type: "object",
|
|
1080
|
-
properties: {
|
|
1081
|
-
file_path: { type: "string", description: "Relative path to the file" },
|
|
1082
|
-
edits: {
|
|
1083
|
-
type: "array",
|
|
1084
|
-
description: "Array of {old_string, new_string, replace_all?}",
|
|
1085
|
-
items: {
|
|
1086
|
-
type: "object",
|
|
1087
|
-
properties: {
|
|
1088
|
-
old_string: { type: "string", description: "Text to replace" },
|
|
1089
|
-
new_string: { type: "string", description: "Replacement text" },
|
|
1090
|
-
replace_all: { type: "boolean", description: "Replace all occurrences (default: false)" }
|
|
1091
|
-
},
|
|
1092
|
-
required: ["old_string", "new_string"]
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
},
|
|
1096
|
-
required: ["file_path", "edits"]
|
|
1097
|
-
},
|
|
1098
|
-
requiresApproval: true
|
|
1099
|
-
},
|
|
1100
1484
|
{
|
|
1101
1485
|
name: "todo_write",
|
|
1102
1486
|
description: "Persist and update the todo list. Send the COMPLETE updated todo list each time (not incremental changes).",
|
|
@@ -1167,11 +1551,211 @@ var DEFAULT_TOOL_DEFINITIONS = [
|
|
|
1167
1551
|
name: { type: "string", description: "Tool name in snake_case (e.g., analyze_imports, count_lines)" },
|
|
1168
1552
|
description: { type: "string", description: "Clear description of what the tool does" },
|
|
1169
1553
|
parameters: { type: "object", description: "JSON Schema defining tool parameters" },
|
|
1170
|
-
handler: { type: "string", description: 'Shell command template with {{param}} placeholders (e.g., "grep -E {{pattern}} {{path}}")' }
|
|
1554
|
+
handler: { type: "string", description: 'Shell command template with {{param}} placeholders (e.g., "grep -E {{pattern}} {{path}}")' },
|
|
1555
|
+
scope: { type: "string", description: 'Where to persist the tool: "user" for all workspaces or "project" for this repository only', enum: ["user", "project"] }
|
|
1171
1556
|
},
|
|
1172
1557
|
required: ["name", "description", "parameters", "handler"]
|
|
1173
1558
|
}
|
|
1174
1559
|
},
|
|
1560
|
+
{
|
|
1561
|
+
name: "delegate_task",
|
|
1562
|
+
description: "Delegate a focused task to a specialized sub-agent. Use for broader exploration, verification, or work you want to keep out of the main context.",
|
|
1563
|
+
parameters: {
|
|
1564
|
+
type: "object",
|
|
1565
|
+
properties: {
|
|
1566
|
+
agent_name: { type: "string", description: "Registered agent name to delegate to" },
|
|
1567
|
+
task: { type: "string", description: "Concrete task for the delegated agent" }
|
|
1568
|
+
},
|
|
1569
|
+
required: ["agent_name", "task"]
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
name: "delegate_parallel",
|
|
1574
|
+
description: "Delegate multiple independent tasks to specialized sub-agents in parallel.",
|
|
1575
|
+
parameters: {
|
|
1576
|
+
type: "object",
|
|
1577
|
+
properties: {
|
|
1578
|
+
tasks: {
|
|
1579
|
+
type: "array",
|
|
1580
|
+
description: "Independent agent tasks to run in parallel",
|
|
1581
|
+
items: {
|
|
1582
|
+
type: "object",
|
|
1583
|
+
properties: {
|
|
1584
|
+
agent_name: { type: "string", description: "Registered agent name to delegate to" },
|
|
1585
|
+
task: { type: "string", description: "Concrete task for that agent" }
|
|
1586
|
+
},
|
|
1587
|
+
required: ["agent_name", "task"]
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
required: ["tasks"]
|
|
1592
|
+
}
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
name: "create_team",
|
|
1596
|
+
description: "Create or reuse a teammate coordination group for multi-agent work.",
|
|
1597
|
+
parameters: {
|
|
1598
|
+
type: "object",
|
|
1599
|
+
properties: {
|
|
1600
|
+
name: { type: "string", description: "Team name" }
|
|
1601
|
+
},
|
|
1602
|
+
required: ["name"]
|
|
1603
|
+
}
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
name: "add_teammate",
|
|
1607
|
+
description: "Add a teammate process to the active team using a registered agent.",
|
|
1608
|
+
parameters: {
|
|
1609
|
+
type: "object",
|
|
1610
|
+
properties: {
|
|
1611
|
+
name: { type: "string", description: "Human-readable teammate name" },
|
|
1612
|
+
agent_name: { type: "string", description: "Registered agent name to run" },
|
|
1613
|
+
model: { type: "string", description: "Optional model override for that teammate" }
|
|
1614
|
+
},
|
|
1615
|
+
required: ["name", "agent_name"]
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
name: "create_task",
|
|
1620
|
+
description: "Create a team task that can be assigned to an idle teammate.",
|
|
1621
|
+
parameters: {
|
|
1622
|
+
type: "object",
|
|
1623
|
+
properties: {
|
|
1624
|
+
subject: { type: "string", description: "Short task title" },
|
|
1625
|
+
description: { type: "string", description: "Detailed task description" },
|
|
1626
|
+
blocked_by: {
|
|
1627
|
+
type: "array",
|
|
1628
|
+
description: "Optional prerequisite task IDs that must complete first",
|
|
1629
|
+
items: { type: "string", description: "Task ID" }
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
required: ["subject", "description"]
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
name: "task_get",
|
|
1637
|
+
description: "Get a single team task by ID from the active team task list.",
|
|
1638
|
+
parameters: {
|
|
1639
|
+
type: "object",
|
|
1640
|
+
properties: {
|
|
1641
|
+
task_id: { type: "string", description: "Task ID to retrieve" }
|
|
1642
|
+
},
|
|
1643
|
+
required: ["task_id"]
|
|
1644
|
+
}
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
name: "task_list",
|
|
1648
|
+
description: "List tasks from the active team task list, optionally filtered by status or owner.",
|
|
1649
|
+
parameters: {
|
|
1650
|
+
type: "object",
|
|
1651
|
+
properties: {
|
|
1652
|
+
status: { type: "string", description: "Optional status filter", enum: ["pending", "in_progress", "completed"] },
|
|
1653
|
+
owner: { type: "string", description: "Optional owner filter" }
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
name: "task_update",
|
|
1659
|
+
description: "Update a task in the active team task list.",
|
|
1660
|
+
parameters: {
|
|
1661
|
+
type: "object",
|
|
1662
|
+
properties: {
|
|
1663
|
+
task_id: { type: "string", description: "Task ID to update" },
|
|
1664
|
+
subject: { type: "string", description: "Updated short task title" },
|
|
1665
|
+
description: { type: "string", description: "Updated task description" },
|
|
1666
|
+
blocked_by: {
|
|
1667
|
+
type: "array",
|
|
1668
|
+
description: "Updated prerequisite task IDs",
|
|
1669
|
+
items: { type: "string", description: "Task ID" }
|
|
1670
|
+
},
|
|
1671
|
+
status: { type: "string", description: "Updated task status", enum: ["pending", "in_progress", "completed"] }
|
|
1672
|
+
},
|
|
1673
|
+
required: ["task_id"]
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
name: "task_stop",
|
|
1678
|
+
description: "Stop an active or queued team task and return it to pending state.",
|
|
1679
|
+
parameters: {
|
|
1680
|
+
type: "object",
|
|
1681
|
+
properties: {
|
|
1682
|
+
task_id: { type: "string", description: "Task ID to stop" }
|
|
1683
|
+
},
|
|
1684
|
+
required: ["task_id"]
|
|
1685
|
+
}
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
name: "task_output",
|
|
1689
|
+
description: "Store or update the latest output/progress note for a task in the active team task list.",
|
|
1690
|
+
parameters: {
|
|
1691
|
+
type: "object",
|
|
1692
|
+
properties: {
|
|
1693
|
+
task_id: { type: "string", description: "Task ID to update" },
|
|
1694
|
+
output: { type: "string", description: "Latest progress note, result, or output summary for the task" }
|
|
1695
|
+
},
|
|
1696
|
+
required: ["task_id", "output"]
|
|
1697
|
+
}
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
name: "skill",
|
|
1701
|
+
description: "List, inspect, activate, or deactivate a loaded skill. Activating a skill adds its instructions to the active session prompt.",
|
|
1702
|
+
parameters: {
|
|
1703
|
+
type: "object",
|
|
1704
|
+
properties: {
|
|
1705
|
+
command: { type: "string", description: "Skill operation to perform", enum: ["list", "info", "activate", "deactivate"] },
|
|
1706
|
+
name: { type: "string", description: "Skill name for info, activate, or deactivate" }
|
|
1707
|
+
},
|
|
1708
|
+
required: ["command"]
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
name: "sleep",
|
|
1713
|
+
description: "Pause execution for a short time when waiting for another system or process to settle. Use sparingly and prefer explicit polling when possible.",
|
|
1714
|
+
parameters: {
|
|
1715
|
+
type: "object",
|
|
1716
|
+
properties: {
|
|
1717
|
+
seconds: { type: "number", description: "Number of seconds to wait (maximum 300)" },
|
|
1718
|
+
reason: { type: "string", description: "Optional short reason for the wait" }
|
|
1719
|
+
},
|
|
1720
|
+
required: ["seconds"]
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
name: "enter_worktree",
|
|
1725
|
+
description: "Create and enter an isolated git worktree for the current session. Subsequent file, git, and command tools operate in that worktree until exit_worktree is called.",
|
|
1726
|
+
parameters: {
|
|
1727
|
+
type: "object",
|
|
1728
|
+
properties: {
|
|
1729
|
+
name: { type: "string", description: "Optional branch/worktree name to use for the new session worktree" }
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
name: "exit_worktree",
|
|
1735
|
+
description: "Exit the current session worktree and return to the original workspace. Optionally keep the worktree on disk for inspection.",
|
|
1736
|
+
parameters: {
|
|
1737
|
+
type: "object",
|
|
1738
|
+
properties: {
|
|
1739
|
+
keep: { type: "boolean", description: "When true, keep the worktree and branch instead of removing them" }
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
name: "team_status",
|
|
1745
|
+
description: "Show the active team, teammate statuses, and current task queue."
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
name: "send_team_message",
|
|
1749
|
+
description: "Send a direct message from the lead agent to a teammate.",
|
|
1750
|
+
parameters: {
|
|
1751
|
+
type: "object",
|
|
1752
|
+
properties: {
|
|
1753
|
+
to: { type: "string", description: "Teammate name" },
|
|
1754
|
+
content: { type: "string", description: "Message content" }
|
|
1755
|
+
},
|
|
1756
|
+
required: ["to", "content"]
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1175
1759
|
// Web Search Operations
|
|
1176
1760
|
{
|
|
1177
1761
|
name: "web_search",
|
|
@@ -1283,7 +1867,45 @@ Actions:
|
|
|
1283
1867
|
required: ["query"]
|
|
1284
1868
|
}
|
|
1285
1869
|
},
|
|
1870
|
+
{
|
|
1871
|
+
name: "install_agent_skill",
|
|
1872
|
+
description: "Install a community skill by exact skill id or name, then optionally activate it for the current session. Prefer asking the user before using this unless they explicitly requested installation or started with --auto-skill.",
|
|
1873
|
+
parameters: {
|
|
1874
|
+
type: "object",
|
|
1875
|
+
properties: {
|
|
1876
|
+
name: { type: "string", description: "Exact community skill id or name to install" },
|
|
1877
|
+
scope: { type: "string", description: "Install scope (default: project)", enum: ["project", "user"] },
|
|
1878
|
+
activate: { type: "boolean", description: "Activate the installed skill for the current session (default: true)" }
|
|
1879
|
+
},
|
|
1880
|
+
required: ["name"]
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1286
1883
|
// Schedule Management
|
|
1884
|
+
{
|
|
1885
|
+
name: "cron_create",
|
|
1886
|
+
description: "Create a recurring scheduled job using an explicit interval and prompt. Use this for structured schedule creation instead of natural-language slash command parsing.",
|
|
1887
|
+
parameters: {
|
|
1888
|
+
type: "object",
|
|
1889
|
+
properties: {
|
|
1890
|
+
prompt: { type: "string", description: "The prompt/instruction to run on each schedule trigger" },
|
|
1891
|
+
interval: { type: "string", description: "Repeat interval shorthand like 5m, 2h, 1d, or 30s" },
|
|
1892
|
+
max_runs: { type: "number", description: "Optional maximum number of times to trigger before auto-cancel" },
|
|
1893
|
+
expires_in: { type: "string", description: "Optional expiry duration shorthand like 7d, 2h, or 30m" }
|
|
1894
|
+
},
|
|
1895
|
+
required: ["prompt", "interval"]
|
|
1896
|
+
}
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
name: "cron_delete",
|
|
1900
|
+
description: "Cancel an active recurring scheduled job by its ID.",
|
|
1901
|
+
parameters: {
|
|
1902
|
+
type: "object",
|
|
1903
|
+
properties: {
|
|
1904
|
+
schedule_id: { type: "string", description: "The job ID to cancel" }
|
|
1905
|
+
},
|
|
1906
|
+
required: ["schedule_id"]
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1287
1909
|
{
|
|
1288
1910
|
name: "list_schedules",
|
|
1289
1911
|
description: "List all active recurring scheduled jobs. Returns job IDs, prompts, intervals, run counts, and expiry times."
|
|
@@ -1298,11 +1920,235 @@ Actions:
|
|
|
1298
1920
|
},
|
|
1299
1921
|
required: ["schedule_id"]
|
|
1300
1922
|
}
|
|
1923
|
+
},
|
|
1924
|
+
// ── Directory Access ──
|
|
1925
|
+
{
|
|
1926
|
+
name: "request_directory_access",
|
|
1927
|
+
description: "Request access to a directory outside the current workspace. Use this when the user mentions a folder or path that is not within the allowed directories. In yolo/auto-mode, access is granted automatically. In interactive mode, the user will be asked to approve. Returns the resolved path if access was granted, or an error message if denied.",
|
|
1928
|
+
parameters: {
|
|
1929
|
+
type: "object",
|
|
1930
|
+
properties: {
|
|
1931
|
+
path: { type: "string", description: "The directory path to request access to (absolute or relative to cwd)" },
|
|
1932
|
+
reason: { type: "string", description: "Optional reason why access is needed (shown to user in interactive mode)" }
|
|
1933
|
+
},
|
|
1934
|
+
required: ["path"]
|
|
1935
|
+
},
|
|
1936
|
+
requiresApproval: false
|
|
1937
|
+
// This tool handles its own approval flow
|
|
1938
|
+
},
|
|
1939
|
+
// ── Code review ──
|
|
1940
|
+
{
|
|
1941
|
+
name: "code_review",
|
|
1942
|
+
description: "Perform a staff-engineer-level code review. Analyzes code quality, architecture, security, performance, and maintainability. Returns 10 prioritized actionable findings with specific file paths, line numbers, and suggested fixes. Use when the user asks to review code, audit quality, or find improvements.",
|
|
1943
|
+
parameters: {
|
|
1944
|
+
type: "object",
|
|
1945
|
+
properties: {
|
|
1946
|
+
path: { type: "string", description: "File or directory to review. Defaults to workspace root." },
|
|
1947
|
+
scope: {
|
|
1948
|
+
type: "string",
|
|
1949
|
+
description: 'Review scope: "full" analyzes the entire path, "diff" reviews only uncommitted changes, "file" reviews a single file.',
|
|
1950
|
+
enum: ["full", "diff", "file"]
|
|
1951
|
+
},
|
|
1952
|
+
instructions: { type: "string", description: 'Additional review focus areas from the user (e.g., "focus on error handling", "check for memory leaks").' }
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
// ── Browser tools (available when Chrome extension is connected via /chrome) ──
|
|
1957
|
+
{
|
|
1958
|
+
name: "browser_screenshot",
|
|
1959
|
+
description: "Capture a screenshot of the page currently visible in the Chrome browser tab. Returns a base64 PNG image. Only available when the Chrome extension is connected.",
|
|
1960
|
+
parameters: {
|
|
1961
|
+
type: "object",
|
|
1962
|
+
properties: {
|
|
1963
|
+
format: { type: "string", description: "Image format", enum: ["png", "jpeg"] },
|
|
1964
|
+
quality: { type: "number", description: "JPEG quality 0-100 (default: 80)" }
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
name: "browser_click",
|
|
1970
|
+
description: "Click an element on the current browser page by CSS selector. Scrolls the element into view first. Only available when the Chrome extension is connected.",
|
|
1971
|
+
parameters: {
|
|
1972
|
+
type: "object",
|
|
1973
|
+
properties: {
|
|
1974
|
+
selector: { type: "string", description: "CSS selector of the element to click" }
|
|
1975
|
+
},
|
|
1976
|
+
required: ["selector"]
|
|
1977
|
+
}
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
name: "browser_type",
|
|
1981
|
+
description: "Type text into an input, textarea, or contenteditable element on the current browser page. Only available when the Chrome extension is connected.",
|
|
1982
|
+
parameters: {
|
|
1983
|
+
type: "object",
|
|
1984
|
+
properties: {
|
|
1985
|
+
selector: { type: "string", description: "CSS selector of the input element" },
|
|
1986
|
+
text: { type: "string", description: "Text to type" },
|
|
1987
|
+
clear: { type: "boolean", description: "Clear the field before typing (default: false)" }
|
|
1988
|
+
},
|
|
1989
|
+
required: ["selector", "text"]
|
|
1990
|
+
}
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
name: "browser_navigate",
|
|
1994
|
+
description: "Navigate the active Chrome browser tab to a URL. Only available when the Chrome extension is connected.",
|
|
1995
|
+
parameters: {
|
|
1996
|
+
type: "object",
|
|
1997
|
+
properties: {
|
|
1998
|
+
url: { type: "string", description: "URL to navigate to" }
|
|
1999
|
+
},
|
|
2000
|
+
required: ["url"]
|
|
2001
|
+
}
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
name: "browser_scroll",
|
|
2005
|
+
description: "Scroll the browser page in a direction, or scroll a specific element into view. Only available when the Chrome extension is connected.",
|
|
2006
|
+
parameters: {
|
|
2007
|
+
type: "object",
|
|
2008
|
+
properties: {
|
|
2009
|
+
direction: { type: "string", description: "Scroll direction", enum: ["up", "down", "left", "right"] },
|
|
2010
|
+
amount: { type: "number", description: "Pixels to scroll (default: 500)" },
|
|
2011
|
+
selector: { type: "string", description: "CSS selector to scroll into view (overrides direction)" }
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
name: "browser_find_element",
|
|
2017
|
+
description: "Find elements on the current browser page by CSS selector, visible text content, or ARIA role. Returns up to 20 matches with their selectors. Only available when the Chrome extension is connected.",
|
|
2018
|
+
parameters: {
|
|
2019
|
+
type: "object",
|
|
2020
|
+
properties: {
|
|
2021
|
+
selector: { type: "string", description: "CSS selector to match" },
|
|
2022
|
+
text: { type: "string", description: "Text content to search for" },
|
|
2023
|
+
role: { type: "string", description: "ARIA role to match" }
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
name: "browser_press_key",
|
|
2029
|
+
description: "Press a keyboard key on the current browser page. For modifier combos use ctrl/shift/alt/meta params. Only available when the Chrome extension is connected.",
|
|
2030
|
+
parameters: {
|
|
2031
|
+
type: "object",
|
|
2032
|
+
properties: {
|
|
2033
|
+
key: { type: "string", description: "Key name (e.g. Enter, Escape, Tab, a, 1)" },
|
|
2034
|
+
ctrl: { type: "string", description: "Hold Ctrl (true/false)", enum: ["true", "false"] },
|
|
2035
|
+
shift: { type: "string", description: "Hold Shift (true/false)", enum: ["true", "false"] },
|
|
2036
|
+
alt: { type: "string", description: "Hold Alt (true/false)", enum: ["true", "false"] },
|
|
2037
|
+
meta: { type: "string", description: "Hold Cmd/Meta (true/false)", enum: ["true", "false"] }
|
|
2038
|
+
},
|
|
2039
|
+
required: ["key"]
|
|
2040
|
+
}
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
name: "browser_get_page_context",
|
|
2044
|
+
description: "Extract the current browser page title, URL, headings, metadata, and body text content. Only available when the Chrome extension is connected.",
|
|
2045
|
+
parameters: {
|
|
2046
|
+
type: "object",
|
|
2047
|
+
properties: {
|
|
2048
|
+
max_chars: { type: "number", description: "Max body text characters (default: 7000, max: 12000)" }
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
name: "browser_get_element",
|
|
2054
|
+
description: "Get detailed properties of a DOM element on the current browser page: bounding rect, computed styles, attributes, value, disabled state. Only available when the Chrome extension is connected.",
|
|
2055
|
+
parameters: {
|
|
2056
|
+
type: "object",
|
|
2057
|
+
properties: {
|
|
2058
|
+
selector: { type: "string", description: "CSS selector of the element" }
|
|
2059
|
+
},
|
|
2060
|
+
required: ["selector"]
|
|
2061
|
+
}
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
name: "browser_wait_for_element",
|
|
2065
|
+
description: "Wait for an element matching a CSS selector to appear on the current browser page. Only available when the Chrome extension is connected.",
|
|
2066
|
+
parameters: {
|
|
2067
|
+
type: "object",
|
|
2068
|
+
properties: {
|
|
2069
|
+
selector: { type: "string", description: "CSS selector to wait for" },
|
|
2070
|
+
timeout: { type: "number", description: "Max wait time in ms (default: 5000)" }
|
|
2071
|
+
},
|
|
2072
|
+
required: ["selector"]
|
|
2073
|
+
}
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
name: "browser_read_network",
|
|
2077
|
+
description: "Read captured network requests from the current browser page. Shows URLs, methods, status codes, sizes. Requires debugger to be attached first. Only available when the Chrome extension is connected.",
|
|
2078
|
+
parameters: {
|
|
2079
|
+
type: "object",
|
|
2080
|
+
properties: {
|
|
2081
|
+
urlPattern: { type: "string", description: "Filter requests by URL substring" },
|
|
2082
|
+
method: { type: "string", description: "Filter by HTTP method (GET, POST, etc.)" },
|
|
2083
|
+
status: { type: "string", description: 'Filter by status code prefix (e.g. "4" for 4xx errors)' },
|
|
2084
|
+
limit: { type: "number", description: "Max requests to return (default: 50)" }
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
name: "browser_get_tabs",
|
|
2090
|
+
description: "List all open browser tabs with their titles, URLs, and tab group IDs. Only available when the Chrome extension is connected."
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
name: "browser_get_tab_groups",
|
|
2094
|
+
description: "List all tab groups with their titles, colors, and member tabs. Only available when the Chrome extension is connected."
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
name: "browser_execute_js",
|
|
2098
|
+
description: "Execute JavaScript code in the current browser page context. Use for DOM queries, data extraction, or page manipulation that other tools cannot achieve. Only available when the Chrome extension is connected.",
|
|
2099
|
+
parameters: {
|
|
2100
|
+
type: "object",
|
|
2101
|
+
properties: {
|
|
2102
|
+
code: { type: "string", description: "JavaScript code to execute in the page context. Use return statements for values." }
|
|
2103
|
+
},
|
|
2104
|
+
required: ["code"]
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
name: "browser_read_console",
|
|
2109
|
+
description: "Read captured console log messages from the current browser page. Includes errors, warnings, and info messages. Useful for debugging. Only available when the Chrome extension is connected.",
|
|
2110
|
+
parameters: {
|
|
2111
|
+
type: "object",
|
|
2112
|
+
properties: {
|
|
2113
|
+
level: { type: "string", description: "Filter by level", enum: ["error", "warn", "log", "info", "debug"] },
|
|
2114
|
+
limit: { type: "number", description: "Max messages to return (default: 50)" }
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
1301
2117
|
}
|
|
1302
2118
|
];
|
|
2119
|
+
var PLAN_TOOL_DEFINITION = {
|
|
2120
|
+
name: "plan",
|
|
2121
|
+
description: 'Create a structured implementation plan with detailed numbered steps before executing a task. Always break the task into concrete, actionable steps (e.g. "1. Read existing auth code\n2. Create JWT utility module\n3. Add login endpoint"). Each step should be a single clear action. Aim for 3-10 steps depending on complexity. You may call this tool multiple times to refine the plan. When you are satisfied with the plan, call `exit_plan_mode` to present it to the user for approval.',
|
|
2122
|
+
parameters: {
|
|
2123
|
+
type: "object",
|
|
2124
|
+
properties: {
|
|
2125
|
+
notes: {
|
|
2126
|
+
type: "string",
|
|
2127
|
+
description: 'A numbered step-by-step plan. Each step on its own line starting with "N. " (e.g. "1. Read existing code\n2. Create new module\n3. Write tests"). Be specific and actionable - avoid single vague descriptions.'
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
};
|
|
2132
|
+
var EXIT_PLAN_MODE_TOOL_DEFINITION = {
|
|
2133
|
+
name: "exit_plan_mode",
|
|
2134
|
+
description: "Present the current plan to the user for approval and exit the planning phase. Call this ONLY after you have created a plan using the `plan` tool and are ready for the user to review it. Do NOT call this tool before creating a plan.",
|
|
2135
|
+
parameters: {
|
|
2136
|
+
type: "object",
|
|
2137
|
+
properties: {
|
|
2138
|
+
summary: {
|
|
2139
|
+
type: "string",
|
|
2140
|
+
description: "A brief summary of the plan you created, highlighting the key changes and approach."
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
};
|
|
1303
2145
|
var ToolManager = class _ToolManager {
|
|
2146
|
+
definitions = /* @__PURE__ */ new Map();
|
|
2147
|
+
executor;
|
|
2148
|
+
confirmApproval;
|
|
2149
|
+
toolFilter;
|
|
2150
|
+
maxConcurrency;
|
|
1304
2151
|
constructor(options) {
|
|
1305
|
-
this.definitions = /* @__PURE__ */ new Map();
|
|
1306
2152
|
this.executor = options.executor;
|
|
1307
2153
|
this.confirmApproval = options.confirmApproval;
|
|
1308
2154
|
this.toolFilter = new ToolFilter(options.clientContext ?? "cli", options.customPolicy);
|
|
@@ -1315,13 +2161,20 @@ var ToolManager = class _ToolManager {
|
|
|
1315
2161
|
register(definition) {
|
|
1316
2162
|
this.definitions.set(definition.name, definition);
|
|
1317
2163
|
}
|
|
2164
|
+
/**
|
|
2165
|
+
* Unregister a tool definition by name.
|
|
2166
|
+
* Used to dynamically remove tools (e.g. plan tool when plan mode is disabled).
|
|
2167
|
+
*/
|
|
2168
|
+
unregister(name) {
|
|
2169
|
+
return this.definitions.delete(name);
|
|
2170
|
+
}
|
|
1318
2171
|
/**
|
|
1319
2172
|
* Register meta-tools from ToolsRegistry dynamically
|
|
1320
2173
|
* Called during session initialization to load persisted tools
|
|
1321
2174
|
*/
|
|
1322
2175
|
registerMetaTools(toolDefinitions) {
|
|
1323
2176
|
for (const def of toolDefinitions) {
|
|
1324
|
-
if (DEFAULT_TOOL_DEFINITIONS.some((d) => d.name === def.name)) {
|
|
2177
|
+
if (DEFAULT_TOOL_DEFINITIONS.some((d) => d.name === def.name) || GOAL_TOOL_DEFINITIONS.some((d) => d.name === def.name)) {
|
|
1325
2178
|
continue;
|
|
1326
2179
|
}
|
|
1327
2180
|
this.definitions.set(def.name, def);
|
|
@@ -1343,7 +2196,7 @@ var ToolManager = class _ToolManager {
|
|
|
1343
2196
|
* Check if a tool name conflicts with built-in definitions
|
|
1344
2197
|
*/
|
|
1345
2198
|
isBuiltInTool(name) {
|
|
1346
|
-
return DEFAULT_TOOL_DEFINITIONS.some((d) => d.name === name);
|
|
2199
|
+
return DEFAULT_TOOL_DEFINITIONS.some((d) => d.name === name) || GOAL_TOOL_DEFINITIONS.some((d) => d.name === name);
|
|
1347
2200
|
}
|
|
1348
2201
|
listToolNames() {
|
|
1349
2202
|
return Array.from(this.definitions.keys()).filter((name) => this.toolFilter.isAllowed(name));
|
|
@@ -1468,6 +2321,16 @@ var ToolManager = class _ToolManager {
|
|
|
1468
2321
|
continue;
|
|
1469
2322
|
}
|
|
1470
2323
|
const definition = this.definitions.get(call.tool);
|
|
2324
|
+
if (!definition) {
|
|
2325
|
+
const result = {
|
|
2326
|
+
tool: call.tool,
|
|
2327
|
+
success: false,
|
|
2328
|
+
error: `Tool '${call.tool}' is not available. Use tool_search or tools_registry to find an available tool.`
|
|
2329
|
+
};
|
|
2330
|
+
results.set(i, result);
|
|
2331
|
+
onToolComplete?.(i, result);
|
|
2332
|
+
continue;
|
|
2333
|
+
}
|
|
1471
2334
|
const requiresApproval = this.toolFilter.requiresApproval(call.tool, definition?.requiresApproval);
|
|
1472
2335
|
if (requiresApproval) {
|
|
1473
2336
|
let message = definition?.approvalMessage ?? `Allow tool ${call.tool}?`;
|
|
@@ -1478,6 +2341,14 @@ var ToolManager = class _ToolManager {
|
|
|
1478
2341
|
const fullCommand = args ? `${cmd} ${args}` : cmd;
|
|
1479
2342
|
const dir = call.args.directory ? ` (in ${call.args.directory})` : "";
|
|
1480
2343
|
message = `Run this command${dir}?
|
|
2344
|
+
$ ${fullCommand}`;
|
|
2345
|
+
permContext.command = fullCommand;
|
|
2346
|
+
} else if (call.tool === "shell" && call.args) {
|
|
2347
|
+
const cmd = String(call.args.command || "");
|
|
2348
|
+
const args = Array.isArray(call.args.args) ? call.args.args.join(" ") : "";
|
|
2349
|
+
const fullCommand = args ? `${cmd} ${args}` : cmd;
|
|
2350
|
+
const dir = call.args.directory ? ` (in ${call.args.directory})` : "";
|
|
2351
|
+
message = `Run this shell command with live output${dir}?
|
|
1481
2352
|
$ ${fullCommand}`;
|
|
1482
2353
|
permContext.command = fullCommand;
|
|
1483
2354
|
} else if (call.tool === "delete_path" && call.args?.path) {
|
|
@@ -1494,8 +2365,30 @@ var ToolManager = class _ToolManager {
|
|
|
1494
2365
|
${call.args.file_path}`;
|
|
1495
2366
|
permContext.path = String(call.args.file_path);
|
|
1496
2367
|
}
|
|
1497
|
-
const
|
|
1498
|
-
if (
|
|
2368
|
+
const decision = normalizePermissionPromptResponse(await this.confirmApproval(message, permContext));
|
|
2369
|
+
if (decision.decision === "alternative" && typeof decision.alternative === "string") {
|
|
2370
|
+
if (call.tool === "run_command" && call.args) {
|
|
2371
|
+
call.args.command = decision.alternative;
|
|
2372
|
+
call.args.args = [];
|
|
2373
|
+
} else if (call.tool === "shell" && call.args) {
|
|
2374
|
+
call.args.command = decision.alternative;
|
|
2375
|
+
call.args.args = [];
|
|
2376
|
+
} else if (call.args?.path && typeof call.args.path === "string") {
|
|
2377
|
+
call.args.path = decision.alternative;
|
|
2378
|
+
} else if (call.args?.file_path && typeof call.args.file_path === "string") {
|
|
2379
|
+
call.args.file_path = decision.alternative;
|
|
2380
|
+
} else {
|
|
2381
|
+
const result = {
|
|
2382
|
+
tool: call.tool,
|
|
2383
|
+
success: false,
|
|
2384
|
+
output: "Tool execution skipped because the alternative input could not be applied."
|
|
2385
|
+
};
|
|
2386
|
+
results.set(i, result);
|
|
2387
|
+
onToolComplete?.(i, result);
|
|
2388
|
+
continue;
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
if (!isAllowedPermissionPrompt(decision)) {
|
|
1499
2392
|
const result = {
|
|
1500
2393
|
tool: call.tool,
|
|
1501
2394
|
success: false,
|
|
@@ -1509,9 +2402,8 @@ var ToolManager = class _ToolManager {
|
|
|
1509
2402
|
readyToExecute.push({ call, index: i });
|
|
1510
2403
|
}
|
|
1511
2404
|
if (readyToExecute.length > 0) {
|
|
1512
|
-
const execResults = await this.
|
|
2405
|
+
const execResults = await this.executeScheduled(
|
|
1513
2406
|
readyToExecute,
|
|
1514
|
-
this.maxConcurrency,
|
|
1515
2407
|
onToolComplete
|
|
1516
2408
|
);
|
|
1517
2409
|
for (const [index, result] of execResults) {
|
|
@@ -1520,6 +2412,51 @@ var ToolManager = class _ToolManager {
|
|
|
1520
2412
|
}
|
|
1521
2413
|
return toolCalls.map((_, i) => results.get(i));
|
|
1522
2414
|
}
|
|
2415
|
+
/**
|
|
2416
|
+
* Execute approved calls in model order while preserving safe parallelism.
|
|
2417
|
+
*
|
|
2418
|
+
* Read-only batches can run concurrently. Mutating tools are ordering
|
|
2419
|
+
* barriers because they may affect following reads or other writes.
|
|
2420
|
+
*/
|
|
2421
|
+
async executeScheduled(tasks, onToolComplete) {
|
|
2422
|
+
const results = /* @__PURE__ */ new Map();
|
|
2423
|
+
let parallelBatch = [];
|
|
2424
|
+
const mergeResults = (batchResults) => {
|
|
2425
|
+
for (const [index, result] of batchResults) {
|
|
2426
|
+
results.set(index, result);
|
|
2427
|
+
}
|
|
2428
|
+
};
|
|
2429
|
+
const flushParallelBatch = async () => {
|
|
2430
|
+
if (parallelBatch.length === 0) {
|
|
2431
|
+
return;
|
|
2432
|
+
}
|
|
2433
|
+
const batchResults = await this.executeWithConcurrency(
|
|
2434
|
+
parallelBatch,
|
|
2435
|
+
this.maxConcurrency,
|
|
2436
|
+
onToolComplete
|
|
2437
|
+
);
|
|
2438
|
+
mergeResults(batchResults);
|
|
2439
|
+
parallelBatch = [];
|
|
2440
|
+
};
|
|
2441
|
+
for (const task of tasks) {
|
|
2442
|
+
if (!this.shouldExecuteSequentially(task.call)) {
|
|
2443
|
+
parallelBatch.push(task);
|
|
2444
|
+
continue;
|
|
2445
|
+
}
|
|
2446
|
+
await flushParallelBatch();
|
|
2447
|
+
const sequentialResult = await this.executeWithConcurrency(
|
|
2448
|
+
[task],
|
|
2449
|
+
1,
|
|
2450
|
+
onToolComplete
|
|
2451
|
+
);
|
|
2452
|
+
mergeResults(sequentialResult);
|
|
2453
|
+
}
|
|
2454
|
+
await flushParallelBatch();
|
|
2455
|
+
return results;
|
|
2456
|
+
}
|
|
2457
|
+
shouldExecuteSequentially(call) {
|
|
2458
|
+
return SEQUENTIAL_TOOL_CATEGORIES.has(getToolCategory(call.tool));
|
|
2459
|
+
}
|
|
1523
2460
|
/**
|
|
1524
2461
|
* Execute tool calls with a concurrency limit using a worker-pool pattern.
|
|
1525
2462
|
*/
|
|
@@ -1533,7 +2470,11 @@ var ToolManager = class _ToolManager {
|
|
|
1533
2470
|
let result;
|
|
1534
2471
|
try {
|
|
1535
2472
|
const action = this.toAction(call);
|
|
1536
|
-
const output = await this.executor(action, {
|
|
2473
|
+
const output = await this.executor(action, {
|
|
2474
|
+
toolCallId: call.id,
|
|
2475
|
+
tool: call.tool,
|
|
2476
|
+
approvalHandled: true
|
|
2477
|
+
});
|
|
1537
2478
|
result = { tool: call.tool, success: true, output };
|
|
1538
2479
|
} catch (error) {
|
|
1539
2480
|
result = {
|
|
@@ -1568,13 +2509,22 @@ var AgentDelegator = class {
|
|
|
1568
2509
|
constructor(llm, actionExecutor, options = {}) {
|
|
1569
2510
|
this.llm = llm;
|
|
1570
2511
|
this.actionExecutor = actionExecutor;
|
|
1571
|
-
this.subagentCounter = 0;
|
|
1572
2512
|
this.registry = AgentRegistry.getInstance();
|
|
1573
2513
|
this.clientContext = options.clientContext ?? "cli";
|
|
1574
2514
|
this.currentDepth = options.currentDepth ?? 0;
|
|
1575
2515
|
this.maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
|
|
1576
2516
|
this.onSubagentStop = options.onSubagentStop;
|
|
2517
|
+
this.featureConfig = options.featureConfig;
|
|
1577
2518
|
}
|
|
2519
|
+
llm;
|
|
2520
|
+
actionExecutor;
|
|
2521
|
+
registry;
|
|
2522
|
+
clientContext;
|
|
2523
|
+
currentDepth;
|
|
2524
|
+
maxDepth;
|
|
2525
|
+
onSubagentStop;
|
|
2526
|
+
featureConfig;
|
|
2527
|
+
subagentCounter = 0;
|
|
1578
2528
|
generateSubagentId() {
|
|
1579
2529
|
return `subagent-${Date.now()}-${++this.subagentCounter}`;
|
|
1580
2530
|
}
|
|
@@ -1590,7 +2540,8 @@ var AgentDelegator = class {
|
|
|
1590
2540
|
const subAgentOptions = {
|
|
1591
2541
|
clientContext: this.clientContext,
|
|
1592
2542
|
depth: this.currentDepth + 1,
|
|
1593
|
-
maxDepth: this.maxDepth
|
|
2543
|
+
maxDepth: this.maxDepth,
|
|
2544
|
+
featureConfig: this.featureConfig
|
|
1594
2545
|
};
|
|
1595
2546
|
const subagentId = this.generateSubagentId();
|
|
1596
2547
|
const startTime = Date.now();
|
|
@@ -1633,7 +2584,8 @@ var AgentDelegator = class {
|
|
|
1633
2584
|
const subAgentOptions = {
|
|
1634
2585
|
clientContext: this.clientContext,
|
|
1635
2586
|
depth: this.currentDepth + 1,
|
|
1636
|
-
maxDepth: this.maxDepth
|
|
2587
|
+
maxDepth: this.maxDepth,
|
|
2588
|
+
featureConfig: this.featureConfig
|
|
1637
2589
|
};
|
|
1638
2590
|
const promises = tasks.map(async ({ agent_name, task }) => {
|
|
1639
2591
|
const agentConfig = this.registry.getAgent(agent_name);
|
|
@@ -1719,12 +2671,12 @@ var SubAgent = class {
|
|
|
1719
2671
|
this.config = config;
|
|
1720
2672
|
this.llm = llm;
|
|
1721
2673
|
this.actionExecutor = actionExecutor;
|
|
1722
|
-
this.delegator = null;
|
|
1723
2674
|
this.name = config.name;
|
|
1724
2675
|
this.options = options;
|
|
1725
2676
|
const canDelegate = options.depth < options.maxDepth;
|
|
1726
2677
|
const allowedTools = new Set(config.tools);
|
|
1727
|
-
|
|
2678
|
+
const baseDefinitions = isGoalFeatureEnabled(options.featureConfig) ? [...DEFAULT_TOOL_DEFINITIONS, ...GOAL_TOOL_DEFINITIONS] : DEFAULT_TOOL_DEFINITIONS;
|
|
2679
|
+
let definitions = allowedTools.has("*") ? [...baseDefinitions] : baseDefinitions.filter((def) => allowedTools.has(def.name));
|
|
1728
2680
|
if (canDelegate) {
|
|
1729
2681
|
definitions = [...definitions, ...DELEGATION_TOOL_DEFINITIONS];
|
|
1730
2682
|
}
|
|
@@ -1734,7 +2686,8 @@ var SubAgent = class {
|
|
|
1734
2686
|
this.delegator = new AgentDelegator(llm, actionExecutor, {
|
|
1735
2687
|
clientContext: options.clientContext,
|
|
1736
2688
|
currentDepth: options.depth,
|
|
1737
|
-
maxDepth: options.maxDepth
|
|
2689
|
+
maxDepth: options.maxDepth,
|
|
2690
|
+
featureConfig: options.featureConfig
|
|
1738
2691
|
});
|
|
1739
2692
|
}
|
|
1740
2693
|
const scaledConcurrency = options.depth === 0 ? options.maxConcurrency ?? 5 : options.depth === 1 ? Math.min(3, options.maxConcurrency ?? 5) : 1;
|
|
@@ -1761,6 +2714,14 @@ var SubAgent = class {
|
|
|
1761
2714
|
this.conversation = new ConversationManager();
|
|
1762
2715
|
this.conversation.reset(enhancedSystemPrompt);
|
|
1763
2716
|
}
|
|
2717
|
+
config;
|
|
2718
|
+
llm;
|
|
2719
|
+
actionExecutor;
|
|
2720
|
+
conversation;
|
|
2721
|
+
toolManager;
|
|
2722
|
+
delegator = null;
|
|
2723
|
+
name;
|
|
2724
|
+
options;
|
|
1764
2725
|
/**
|
|
1765
2726
|
* Build system prompt with tool signatures for the LLM
|
|
1766
2727
|
*/
|
|
@@ -1806,14 +2767,16 @@ var SubAgent = class {
|
|
|
1806
2767
|
\u{1F916} Sub-agent '${this.name}' starting task... (depth ${this.options.depth}/${this.options.maxDepth})`));
|
|
1807
2768
|
this.conversation.addMessage({ role: "user", content: task });
|
|
1808
2769
|
const tools = this.toolManager.toFunctionDefinitions();
|
|
2770
|
+
const supportsNativeToolCalling = this.llm.getCapabilities?.().nativeToolCalling === true;
|
|
1809
2771
|
const maxIterations = 10;
|
|
1810
2772
|
for (let i = 0; i < maxIterations; i++) {
|
|
2773
|
+
const requestTools = supportsNativeToolCalling && tools.length > 0 ? tools : void 0;
|
|
1811
2774
|
const completion = await this.llm.complete({
|
|
1812
2775
|
messages: this.conversation.history(),
|
|
1813
2776
|
model: this.config.model,
|
|
1814
2777
|
temperature: 0.2,
|
|
1815
|
-
tools:
|
|
1816
|
-
toolChoice:
|
|
2778
|
+
tools: requestTools,
|
|
2779
|
+
toolChoice: requestTools ? "auto" : void 0
|
|
1817
2780
|
});
|
|
1818
2781
|
const payload = this.parseResponse(completion);
|
|
1819
2782
|
if (completion.toolCalls?.length) {
|
|
@@ -1923,20 +2886,29 @@ var SubAgent = class {
|
|
|
1923
2886
|
};
|
|
1924
2887
|
|
|
1925
2888
|
export {
|
|
2889
|
+
normalizePermissionPromptResponse,
|
|
2890
|
+
isAllowedPermissionPrompt,
|
|
1926
2891
|
createToolFilter,
|
|
1927
2892
|
filterToolsByRelevance,
|
|
2893
|
+
formatToolCapabilityCatalog,
|
|
2894
|
+
GOAL_TOOL_DEFINITIONS,
|
|
1928
2895
|
DEFAULT_TOOL_DEFINITIONS,
|
|
2896
|
+
PLAN_TOOL_DEFINITION,
|
|
2897
|
+
EXIT_PLAN_MODE_TOOL_DEFINITION,
|
|
1929
2898
|
ToolManager,
|
|
1930
2899
|
SubAgent,
|
|
1931
2900
|
AgentDelegator
|
|
1932
2901
|
};
|
|
2902
|
+
/**
|
|
2903
|
+
* Permission System Types
|
|
2904
|
+
* @license Apache-2.0
|
|
2905
|
+
*/
|
|
1933
2906
|
/**
|
|
1934
2907
|
* @license
|
|
1935
2908
|
* Copyright 2025 Autohand AI LLC
|
|
1936
2909
|
* SPDX-License-Identifier: Apache-2.0
|
|
1937
2910
|
*
|
|
1938
2911
|
* Tool filtering based on client context and risk categories
|
|
1939
|
-
* Inspired by Claude Code's permission model
|
|
1940
2912
|
*/
|
|
1941
2913
|
/**
|
|
1942
2914
|
* @license
|