autohand-cli 0.8.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/README.md +173 -74
  2. package/dist/AgentRegistry-EGBDIUAK.cjs +10 -0
  3. package/dist/{AgentRegistry-ODDXPAFR.js → AgentRegistry-XPWSVO3Q.js} +2 -2
  4. package/dist/{AutomodeManager-EOVHGRPP.js → AutomodeManager-APLLPEYJ.js} +31 -17
  5. package/dist/{AutomodeManager-6ATBE7Q5.cjs → AutomodeManager-MPSXT2RH.cjs} +38 -24
  6. package/dist/CommunitySkillsCache-2OIUV227.cjs +8 -0
  7. package/dist/{CommunitySkillsCache-QLE57BN5.js → CommunitySkillsCache-ZEQWP6YM.js} +2 -2
  8. package/dist/GitHubRegistryFetcher-CYJLF2XL.cjs +7 -0
  9. package/dist/{GitHubRegistryFetcher-NT5GFZXS.js → GitHubRegistryFetcher-J2BWPXJF.js} +1 -1
  10. package/dist/{HookManager-B2F35M27.js → HookManager-CWLTFKWO.js} +1 -1
  11. package/dist/{HookManager-PFAFE3FK.cjs → HookManager-TMAJQU4S.cjs} +2 -2
  12. package/dist/{ImportWizard-CJRZPPHL.cjs → ImportWizard-MQXEED2U.cjs} +37 -13
  13. package/dist/{ImportWizard-OHRKBANZ.js → ImportWizard-QBKQEXDW.js} +33 -9
  14. package/dist/LearnAdvisor-46FG2XIP.js +9 -0
  15. package/dist/LearnAdvisor-XBRDNAGH.cjs +9 -0
  16. package/dist/{McpClientManager-NQ3EW2IF.cjs → McpClientManager-BNSKLHIN.cjs} +2 -2
  17. package/dist/{McpClientManager-VBIMGKXU.js → McpClientManager-SL35BR24.js} +1 -1
  18. package/dist/MemoryManager-34L4YOKA.cjs +8 -0
  19. package/dist/{MemoryManager-2LAT7IHS.js → MemoryManager-WJMLPWGU.js} +2 -2
  20. package/dist/NVIDIAProvider-2HR737UE.js +14 -0
  21. package/dist/NVIDIAProvider-MVTL62PR.cjs +14 -0
  22. package/dist/PermissionManager-5OOJ7FAT.cjs +11 -0
  23. package/dist/{PermissionManager-7NQHRCHY.js → PermissionManager-KMYILJ4Z.js} +3 -3
  24. package/dist/{ProjectProfiler-UG42W6WD.cjs → ProjectProfiler-CDAE7ECW.cjs} +1 -0
  25. package/dist/{ProjectProfiler-P4QJQWWA.js → ProjectProfiler-NZTJDRHD.js} +1 -0
  26. package/dist/ProviderFactory-C3YPXTDD.cjs +11 -0
  27. package/dist/{ProviderFactory-2IYJ5OPW.js → ProviderFactory-HFPRVQ25.js} +3 -1
  28. package/dist/{SessionManager-4U4JFQ3C.js → SessionManager-PNBTJJTQ.js} +2 -2
  29. package/dist/SessionManager-WAPTFMDO.cjs +10 -0
  30. package/dist/{SkillsRegistry-RFEINXRT.js → SkillsRegistry-4RRD5GMX.js} +2 -2
  31. package/dist/SkillsRegistry-7AJP74GJ.cjs +9 -0
  32. package/dist/SubAgent-FDIH3DXB.js +11 -0
  33. package/dist/SubAgent-HVL2ICVZ.cjs +11 -0
  34. package/dist/{SyncApiClient-B5RT2ECG.js → SyncApiClient-LRPFNCKJ.js} +1 -1
  35. package/dist/SyncApiClient-VMBOLQ6H.cjs +11 -0
  36. package/dist/about-BW3PDZUU.js +14 -0
  37. package/dist/about-FCAX37YC.cjs +14 -0
  38. package/dist/acp-EOETGAHC.cjs +1517 -0
  39. package/dist/acp-VHEL7BOW.js +1517 -0
  40. package/dist/actionExecutor-33I47NZS.js +24 -0
  41. package/dist/actionExecutor-4YBMR3YH.cjs +24 -0
  42. package/dist/add-dir-7SS6KSH5.cjs +11 -0
  43. package/dist/{add-dir-TUJM3PG5.js → add-dir-VFX7QT4E.js} +3 -2
  44. package/dist/agent-DMRUFU4M.cjs +116 -0
  45. package/dist/agent-WCJEYQJT.js +116 -0
  46. package/dist/agents/builtin/code-cleaner.md +1 -1
  47. package/dist/agents/builtin/docs-writer.md +1 -1
  48. package/dist/agents/builtin/researcher.md +2 -2
  49. package/dist/agents/builtin/reviewer.md +1 -1
  50. package/dist/agents/builtin/tester.md +1 -1
  51. package/dist/agents/builtin/todo-resolver.md +1 -1
  52. package/dist/agents-CHROO3VU.cjs +17 -0
  53. package/dist/agents-UVDUL65K.js +17 -0
  54. package/dist/agents-new-AUBWSOXP.js +17 -0
  55. package/dist/agents-new-Y562WC47.cjs +17 -0
  56. package/dist/{autoSkill-LQEVQFIH.js → autoSkill-EFMK6WU6.js} +2 -2
  57. package/dist/autoSkill-YOLLFTP2.cjs +20 -0
  58. package/dist/{automode-R6P3VHLS.js → automode-BMYSRM34.js} +2 -2
  59. package/dist/automode-DBLKTTKD.cjs +10 -0
  60. package/dist/browserToolBridge-BXRQB4B4.cjs +58 -0
  61. package/dist/browserToolBridge-F5N66PE7.js +58 -0
  62. package/dist/chrome-ATC4OO5I.cjs +20 -0
  63. package/dist/chrome-NHJ44WUN.js +50 -0
  64. package/dist/chrome-O62WXV7F.js +20 -0
  65. package/dist/chrome-XHJLCO4M.cjs +50 -0
  66. package/dist/chromeSkill-53TH55PM.js +105 -0
  67. package/dist/chromeSkill-THW7N4IY.cjs +105 -0
  68. package/dist/{chunk-EGPXJERY.cjs → chunk-2CGE7ZV3.cjs} +26 -26
  69. package/dist/chunk-2H5O745H.js +63 -0
  70. package/dist/chunk-2HOLOHVK.js +2219 -0
  71. package/dist/{chunk-3PDTTAKJ.js → chunk-2QL6MNXG.js} +15 -8
  72. package/dist/{chunk-U55TWFJI.cjs → chunk-2VHB43IX.cjs} +24 -6
  73. package/dist/{chunk-VG34MG2U.js → chunk-37M5UM6I.js} +9 -6
  74. package/dist/{chunk-KLWJIPU2.cjs → chunk-3DDL2E55.cjs} +20 -16
  75. package/dist/chunk-3EDDDZS2.cjs +5 -0
  76. package/dist/{chunk-2UC22DJU.js → chunk-3GUEUCZK.js} +28 -4
  77. package/dist/{chunk-DVUHHH3B.cjs → chunk-3KLSNNRW.cjs} +4 -4
  78. package/dist/chunk-3LJJG5YY.cjs +387 -0
  79. package/dist/chunk-3OF56EMA.cjs +197 -0
  80. package/dist/chunk-3PXKRVCW.js +108 -0
  81. package/dist/{chunk-ADUFCS4Q.cjs → chunk-3S563FNF.cjs} +160 -79
  82. package/dist/chunk-3UT7R3XV.js +663 -0
  83. package/dist/chunk-4256YRCO.cjs +80 -0
  84. package/dist/chunk-46C73ZKK.cjs +663 -0
  85. package/dist/chunk-46MTALKD.js +44 -0
  86. package/dist/{chunk-AEJH23FO.cjs → chunk-47PHDKNW.cjs} +6 -6
  87. package/dist/chunk-4LMUDS2K.js +124 -0
  88. package/dist/{chunk-HLHTG5ZU.cjs → chunk-5CMYEM3R.cjs} +14 -12
  89. package/dist/{chunk-MBBY4ZIK.js → chunk-5F6ZKSHO.js} +4 -1
  90. package/dist/chunk-5JFTY3VU.js +74 -0
  91. package/dist/chunk-5JTTM5SC.js +59 -0
  92. package/dist/{chunk-IETRBBMP.cjs → chunk-5K3CDSWZ.cjs} +108 -31
  93. package/dist/{chunk-GJH7XMSK.js → chunk-5VHP6HDQ.js} +8 -6
  94. package/dist/{chunk-6ZCULLCA.js → chunk-62RTC3XX.js} +1 -1
  95. package/dist/{chunk-64H4FRM3.cjs → chunk-6GUODJKM.cjs} +32 -34
  96. package/dist/{chunk-47CKWKEX.cjs → chunk-6HH236FV.cjs} +9 -4
  97. package/dist/{chunk-WHE2SWHU.js → chunk-6NVAK6CK.js} +2 -2
  98. package/dist/chunk-6R25D2H5.js +121 -0
  99. package/dist/{chunk-OUZQXMHL.cjs → chunk-6XVVIY54.cjs} +55 -25
  100. package/dist/{chunk-3L53OA4E.cjs → chunk-75EDROHL.cjs} +10 -10
  101. package/dist/{chunk-G4CAKI3V.js → chunk-7HPWMALN.js} +7 -2
  102. package/dist/chunk-7JLT2VNW.cjs +18963 -0
  103. package/dist/chunk-7LWQCE4Y.cjs +987 -0
  104. package/dist/{chunk-OLSBBZW6.cjs → chunk-7MU7LWF3.cjs} +5 -5
  105. package/dist/{chunk-TUD3Z3BD.js → chunk-7RFJB75Y.js} +140 -59
  106. package/dist/{chunk-X2MSVKDV.js → chunk-A7HHCIDQ.js} +2 -2
  107. package/dist/{chunk-SKYG33B2.cjs → chunk-AC7DZ6SK.cjs} +3 -3
  108. package/dist/{chunk-XX2ZO7DS.js → chunk-ACDQGA4Z.js} +90 -16
  109. package/dist/{chunk-CZXGCVTR.cjs → chunk-AOKCI722.cjs} +2 -2
  110. package/dist/chunk-ARBEHFCG.js +715 -0
  111. package/dist/{chunk-OOKY3HPZ.js → chunk-AT7OWLY5.js} +50 -9
  112. package/dist/chunk-AU6JAGZJ.cjs +231 -0
  113. package/dist/chunk-AUFNACED.js +18963 -0
  114. package/dist/{chunk-N2BLVUPM.cjs → chunk-AUYSIEVV.cjs} +3 -3
  115. package/dist/chunk-B4HSNOIH.cjs +354 -0
  116. package/dist/{chunk-EGMZDTSL.js → chunk-B5CGDNMR.js} +10 -2
  117. package/dist/{chunk-FTYY5JJD.js → chunk-BFQDQRDE.js} +2 -2
  118. package/dist/{chunk-2AA5MFES.js → chunk-BL2UC7HC.js} +8 -5
  119. package/dist/{chunk-T2M64VHA.cjs → chunk-BQ22N3TX.cjs} +56 -41
  120. package/dist/chunk-BQU3HAE7.js +21 -0
  121. package/dist/chunk-BWF4VDYE.js +3897 -0
  122. package/dist/chunk-BYE7RQFZ.cjs +121 -0
  123. package/dist/{chunk-APIXPPMT.js → chunk-CBFH2J3O.js} +855 -33
  124. package/dist/chunk-CCVMREXI.js +420 -0
  125. package/dist/chunk-CFAWTLSC.js +13 -0
  126. package/dist/{chunk-G27PQQFD.js → chunk-CFFE4VA3.js} +1 -1
  127. package/dist/{chunk-ZYQMLKOK.cjs → chunk-CH2J4PVE.cjs} +212 -70
  128. package/dist/{chunk-7BTSG4ME.cjs → chunk-CHI52KFR.cjs} +855 -33
  129. package/dist/{chunk-DJDE4DTT.cjs → chunk-CWINVFRI.cjs} +25 -19
  130. package/dist/{chunk-HXGBSJL5.cjs → chunk-D2OSPLYC.cjs} +2 -2
  131. package/dist/{chunk-GBHDROGL.js → chunk-D6GZBSOX.js} +16 -4
  132. package/dist/{chunk-CNBKZEX5.cjs → chunk-DA7NBAJK.cjs} +49 -17
  133. package/dist/chunk-DEQVRSV5.cjs +866 -0
  134. package/dist/{chunk-RGR6ME5J.cjs → chunk-DI57A4BX.cjs} +25 -28
  135. package/dist/{chunk-K2C56QGS.cjs → chunk-DIZTWFVR.cjs} +1499 -482
  136. package/dist/{chunk-YZXUDM5X.js → chunk-DLP436GI.js} +204 -62
  137. package/dist/{chunk-OHUZKDGX.js → chunk-DMRXF5DU.js} +3 -3
  138. package/dist/{chunk-U46VYPLR.cjs → chunk-DPSIGY6L.cjs} +9 -9
  139. package/dist/{chunk-SEKD5FH3.cjs → chunk-E26KKI46.cjs} +5 -2
  140. package/dist/{chunk-SJAVBCOA.js → chunk-E46DJH5S.js} +3 -3
  141. package/dist/{chunk-DV2ZHK7B.cjs → chunk-E6GFD7VR.cjs} +49 -26
  142. package/dist/chunk-ES2HJQ4N.js +37 -0
  143. package/dist/chunk-EZJHLOWP.js +80 -0
  144. package/dist/chunk-FFBDRUO5.cjs +59 -0
  145. package/dist/{chunk-SV2WA57F.js → chunk-FGT6KK6T.js} +38 -15
  146. package/dist/{chunk-SAHBLB3E.js → chunk-FP46B4X3.js} +208 -3
  147. package/dist/{chunk-QXH5RCFI.js → chunk-FQAVGSPW.js} +2 -2
  148. package/dist/chunk-FQVG6ZHF.js +197 -0
  149. package/dist/chunk-GBMDFWJX.cjs +152 -0
  150. package/dist/{chunk-NAGQ2PDC.js → chunk-GGLKUENP.js} +1453 -436
  151. package/dist/{chunk-S52YW5ZQ.js → chunk-GNBBIAMD.js} +16 -19
  152. package/dist/{chunk-MYISNQH4.js → chunk-GWO66KBI.js} +1 -1
  153. package/dist/chunk-GWY26SUD.cjs +63 -0
  154. package/dist/{chunk-YGN4CQIP.js → chunk-GZ6DV2UG.js} +1 -1
  155. package/dist/{chunk-EZMINVLU.js → chunk-H4D2Q2AL.js} +5 -2
  156. package/dist/{chunk-3WVJEL7K.cjs → chunk-HDK2EHVH.cjs} +3 -1
  157. package/dist/chunk-HJIXWGQZ.js +139 -0
  158. package/dist/{chunk-ULDM2SNB.js → chunk-HKYZSUQ5.js} +48 -47
  159. package/dist/{chunk-LQGVEP3E.js → chunk-HQUSEWT4.js} +45 -13
  160. package/dist/{chunk-HTLINWX6.cjs → chunk-HQWQZML5.cjs} +16 -13
  161. package/dist/{chunk-DVZOENQ7.cjs → chunk-HS4USDND.cjs} +9 -4
  162. package/dist/chunk-HSCUPEA4.cjs +3897 -0
  163. package/dist/{chunk-JCLYQ2JC.js → chunk-HXJEGMGB.js} +12 -6
  164. package/dist/{chunk-LJFUXC56.cjs → chunk-HXQREVTA.cjs} +9 -6
  165. package/dist/{chunk-N7LI55V4.js → chunk-I24CWKKK.js} +15 -8
  166. package/dist/chunk-IAGCRVJ3.js +355 -0
  167. package/dist/chunk-IEXKKKOF.cjs +92 -0
  168. package/dist/{chunk-5IXII4HX.cjs → chunk-IGMPWJ2I.cjs} +19 -12
  169. package/dist/chunk-IKUMVBCW.cjs +33 -0
  170. package/dist/{chunk-XTB6VJVQ.cjs → chunk-J2K57QM7.cjs} +6 -6
  171. package/dist/{chunk-56SWIDEL.cjs → chunk-J5ADZN6V.cjs} +57 -56
  172. package/dist/chunk-J5HE6CUM.cjs +124 -0
  173. package/dist/{chunk-LIEXWM2M.js → chunk-JAQO6XDB.js} +19 -1
  174. package/dist/chunk-JIMSII7R.js +987 -0
  175. package/dist/chunk-JJ4KA7HK.cjs +2219 -0
  176. package/dist/{chunk-ZLSGXMGQ.js → chunk-JMN3GZU6.js} +2 -0
  177. package/dist/{chunk-X5VSP65C.cjs → chunk-JP3YHTQ2.cjs} +4 -4
  178. package/dist/{chunk-SKV2F3NM.js → chunk-JYKPWK5O.js} +1 -1
  179. package/dist/{chunk-NNPAM4HC.cjs → chunk-KNTUI4TZ.cjs} +12 -6
  180. package/dist/{chunk-HIVRCQS2.js → chunk-L4F7SUYL.js} +56 -25
  181. package/dist/{chunk-C5IJIM2V.cjs → chunk-LDJQ5QHG.cjs} +68 -37
  182. package/dist/{chunk-ULQ6MDSJ.cjs → chunk-LFDPTJYF.cjs} +43 -35
  183. package/dist/chunk-LJD7KR3L.cjs +44 -0
  184. package/dist/chunk-LN7D3EJZ.js +387 -0
  185. package/dist/{chunk-KANW6OYC.cjs → chunk-LQBONA55.cjs} +32 -8
  186. package/dist/{chunk-NCC6ETZS.js → chunk-LUMV3DB2.js} +41 -33
  187. package/dist/chunk-M4KNC5BQ.js +78 -0
  188. package/dist/chunk-MO4KP6XS.cjs +229 -0
  189. package/dist/{chunk-BVKXEQVG.cjs → chunk-MOJ7ADW4.cjs} +22 -10
  190. package/dist/chunk-MPULXVC4.cjs +715 -0
  191. package/dist/{chunk-VEKDGU2Q.cjs → chunk-MQESBFBZ.cjs} +46 -23
  192. package/dist/chunk-MUNUUFU7.cjs +21 -0
  193. package/dist/{chunk-ZSPXQYG2.js → chunk-MX75JYIY.js} +7 -5
  194. package/dist/chunk-MXVIDIC6.cjs +139 -0
  195. package/dist/{chunk-3K2ESU53.cjs → chunk-N6O3XUZ2.cjs} +2 -2
  196. package/dist/{chunk-BYONM7UM.js → chunk-NBGOIFKP.js} +265 -18
  197. package/dist/{chunk-SLQAYV3W.js → chunk-NMQ47RCG.js} +8 -2
  198. package/dist/{chunk-JYTDYJVW.js → chunk-O64I2GYI.js} +1 -1
  199. package/dist/{chunk-IFFXSTOM.cjs → chunk-O6TQP7U7.cjs} +3 -3
  200. package/dist/{chunk-AYS2ASM7.js → chunk-OHWMWKJQ.js} +1 -1
  201. package/dist/{chunk-N23UAW4I.js → chunk-OM24WXEE.js} +7 -2
  202. package/dist/{chunk-NAJ4IZKD.cjs → chunk-OPNI6O7F.cjs} +8 -6
  203. package/dist/chunk-OR67YXQK.cjs +13 -0
  204. package/dist/{chunk-XVUHNWMX.js → chunk-OV3PVUYN.js} +17 -19
  205. package/dist/{chunk-TNZRZQ7Q.js → chunk-PB7W7R72.js} +3 -78
  206. package/dist/chunk-PCM3N3CL.cjs +37 -0
  207. package/dist/{chunk-A4IJHHV7.cjs → chunk-PDHT7LQS.cjs} +52 -11
  208. package/dist/{chunk-HPHJ73GU.cjs → chunk-PHJO5YAL.cjs} +9 -9
  209. package/dist/{chunk-KPELYZ6L.js → chunk-PQLKJCIE.js} +2 -2
  210. package/dist/chunk-PUD76XQT.cjs +78 -0
  211. package/dist/chunk-Q2IL4DDI.cjs +355 -0
  212. package/dist/{chunk-WPVWQSL7.cjs → chunk-Q6AC3PHY.cjs} +16 -13
  213. package/dist/{chunk-XRZEUWKF.js → chunk-QCHIDZBA.js} +1 -1
  214. package/dist/chunk-QKP772OZ.js +4291 -0
  215. package/dist/chunk-QQ7PANOP.js +59 -0
  216. package/dist/{chunk-YHD6TUIR.cjs → chunk-QW2RW2GY.cjs} +2 -0
  217. package/dist/chunk-RAKO7UN7.js +114 -0
  218. package/dist/chunk-RBHANOYY.js +33 -0
  219. package/dist/chunk-RBZ7AFX7.cjs +29 -0
  220. package/dist/{chunk-GCXYXLRA.cjs → chunk-REMGR23V.cjs} +46 -49
  221. package/dist/chunk-ROLA6EFO.cjs +85 -0
  222. package/dist/{chunk-RDF37HKB.cjs → chunk-SOLBYSLY.cjs} +3 -2
  223. package/dist/{chunk-KQGPTCQJ.js → chunk-SWCQM52V.js} +68 -25
  224. package/dist/{chunk-L3TWPROA.js → chunk-TBOLJDUG.js} +39 -24
  225. package/dist/chunk-TH26BQJG.js +101 -0
  226. package/dist/{chunk-245KJE5Y.cjs → chunk-TJNBASFD.cjs} +14 -6
  227. package/dist/chunk-TKKN34TV.js +229 -0
  228. package/dist/chunk-TQ33WBY5.cjs +74 -0
  229. package/dist/{chunk-EGFT4PGW.js → chunk-TWQDAUZU.js} +5 -2
  230. package/dist/{chunk-J2GSFVUV.cjs → chunk-TXPSTCG7.cjs} +74 -59
  231. package/dist/{chunk-5K6NGAVM.js → chunk-U4C3HW6P.js} +67 -52
  232. package/dist/{chunk-3WICOC33.js → chunk-UEIXJG45.js} +105 -81
  233. package/dist/{chunk-22D2CNTP.cjs → chunk-UGFVM77J.cjs} +5 -2
  234. package/dist/chunk-UOQECODR.js +34 -0
  235. package/dist/chunk-UR27UDTB.js +354 -0
  236. package/dist/chunk-UWFG2R2I.cjs +420 -0
  237. package/dist/{chunk-Y72HH2TF.cjs → chunk-UXLW45ZE.cjs} +102 -28
  238. package/dist/{chunk-FPHU2ES6.cjs → chunk-VBOFPU5M.cjs} +6 -0
  239. package/dist/{chunk-NTSDP2WB.js → chunk-VDWJMWDF.js} +54 -24
  240. package/dist/{chunk-3O3MOK5C.cjs → chunk-VGEV44V2.cjs} +944 -133
  241. package/dist/{chunk-IDFF5J2E.js → chunk-VKBIE6I6.js} +38 -7
  242. package/dist/{chunk-HBZU3RBZ.js → chunk-VRMZO6TB.js} +31 -8
  243. package/dist/chunk-VUGOOGHB.js +400 -0
  244. package/dist/chunk-WBU4Q4GS.cjs +400 -0
  245. package/dist/chunk-WGLBC5AY.cjs +59 -0
  246. package/dist/{chunk-KWXVKLQ5.cjs → chunk-WGNMOVMT.cjs} +7 -82
  247. package/dist/{chunk-RKJTGGMU.cjs → chunk-WKRDBCP2.cjs} +221 -16
  248. package/dist/chunk-WRTXCQ3V.cjs +4291 -0
  249. package/dist/chunk-WTB7AFL6.cjs +101 -0
  250. package/dist/{chunk-NDMIPTV4.js → chunk-WZV6UVPY.js} +8 -3
  251. package/dist/chunk-XF2WIKHR.cjs +34 -0
  252. package/dist/{chunk-W7RYQJLO.cjs → chunk-XGMI6IYB.cjs} +46 -15
  253. package/dist/{chunk-NA6WQDYW.js → chunk-XIVFAD2L.js} +918 -107
  254. package/dist/chunk-XV2HXRHX.js +85 -0
  255. package/dist/{chunk-3VTAFAL2.js → chunk-Y3M2DABP.js} +16 -12
  256. package/dist/{chunk-QNGEW5TC.js → chunk-YV63VW4K.js} +1 -1
  257. package/dist/{chunk-UJ2JSM6H.js → chunk-YVQI26H4.js} +2 -0
  258. package/dist/{chunk-X2YOZQIP.cjs → chunk-YWTIXHU6.cjs} +266 -19
  259. package/dist/chunk-YZWE7XSM.js +5 -0
  260. package/dist/{chunk-TUAITHWL.js → chunk-Z3XSSF7B.js} +2 -1
  261. package/dist/{chunk-6UJMCWRY.js → chunk-Z4LIPMPM.js} +6 -0
  262. package/dist/chunk-ZASDSY7P.cjs +114 -0
  263. package/dist/{chunk-R33VKSH5.cjs → chunk-ZHJ7JGME.cjs} +11 -11
  264. package/dist/chunk-ZPD2AO3U.js +866 -0
  265. package/dist/{chunk-7UOUW76C.js → chunk-ZQAT5VT5.js} +101 -24
  266. package/dist/chunk-ZR46OJNZ.js +152 -0
  267. package/dist/{chunk-7TQH3CL4.cjs → chunk-ZZ63NW7A.cjs} +78 -35
  268. package/dist/clear-33TWQ2ES.cjs +12 -0
  269. package/dist/{clear-A3N4GK2S.js → clear-OFLFQ3MR.js} +3 -3
  270. package/dist/{communityInstaller-LOP2EDH5.js → communityInstaller-COB2KTOW.js} +8 -5
  271. package/dist/communityInstaller-TWMGPSYM.cjs +22 -0
  272. package/dist/completion-IIZMHXYP.cjs +17 -0
  273. package/dist/completion-PT4VM2H2.js +17 -0
  274. package/dist/config-KL6WU7R2.cjs +20 -0
  275. package/dist/{config-HPJPKTO6.js → config-R4O7GBTY.js} +6 -4
  276. package/dist/{constants-LISJW3DD.js → constants-HVCHVQAF.js} +1 -1
  277. package/dist/constants-RLMJ5D5P.cjs +21 -0
  278. package/dist/{defaultHooks-IHSJR2AX.cjs → defaultHooks-2V2CQL63.cjs} +25 -10
  279. package/dist/{defaultHooks-KUKHK3AG.js → defaultHooks-TMHDU3FS.js} +25 -10
  280. package/dist/export-3PK3VFCE.js +15 -0
  281. package/dist/export-WLGNWEMJ.cjs +15 -0
  282. package/dist/feedback-G635NCLJ.js +18 -0
  283. package/dist/feedback-LLMK3TZH.cjs +18 -0
  284. package/dist/fffSearchProvider-2YCNKOYD.js +412 -0
  285. package/dist/fffSearchProvider-W6627E2V.cjs +412 -0
  286. package/dist/{filesystem-Z7BWAWMZ.js → filesystem-L6DQKGWK.js} +3 -2
  287. package/dist/filesystem-PGUPCMVK.cjs +11 -0
  288. package/dist/help-BAXLP2M2.cjs +12 -0
  289. package/dist/{help-GFQXNZOK.js → help-X3OAZ3CY.js} +2 -2
  290. package/dist/history-6HOJSEMT.cjs +14 -0
  291. package/dist/{history-E3N6BJP7.js → history-YKFPHBJN.js} +2 -2
  292. package/dist/hooks-7TA4PIIB.js +18 -0
  293. package/dist/hooks-XVFU67T2.cjs +18 -0
  294. package/dist/{i18n-SY7QRM22.js → i18n-2KBUU7XL.js} +1 -1
  295. package/dist/i18n-MUJMKTFM.cjs +33 -0
  296. package/dist/ide-CCQ33PGC.cjs +15 -0
  297. package/dist/ide-VLVFBZ5F.js +15 -0
  298. package/dist/immediateCommandRouter-MTEHZXQX.js +15 -0
  299. package/dist/immediateCommandRouter-ROXU3MWT.cjs +15 -0
  300. package/dist/{import-W7SVLSTC.js → import-4CHYLS4K.js} +3 -3
  301. package/dist/{import-ADI37ZUR.cjs → import-I7T4ZHYL.cjs} +3 -3
  302. package/dist/import-J46F54JY.cjs +10 -0
  303. package/dist/{import-KGKKZ3B7.js → import-JWPYKXCZ.js} +2 -2
  304. package/dist/index.cjs +744 -23015
  305. package/dist/index.d.cts +93 -0
  306. package/dist/index.d.ts +93 -0
  307. package/dist/index.js +780 -23051
  308. package/dist/{init-7MFK626E.js → init-262MWZV4.js} +2 -2
  309. package/dist/init-EE5Y7RBL.cjs +10 -0
  310. package/dist/inkMode-VUE6ZDLD.cjs +7 -0
  311. package/dist/inkMode-WBNFOSAT.js +7 -0
  312. package/dist/inputPrompt-IIFKCX5Q.cjs +90 -0
  313. package/dist/inputPrompt-YGBHDUEP.js +90 -0
  314. package/dist/language-CVLPB7OV.js +21 -0
  315. package/dist/language-ZTWFHUSV.cjs +21 -0
  316. package/dist/learn-PON7I5QS.js +23 -0
  317. package/dist/learn-XLRSVNA3.cjs +23 -0
  318. package/dist/login-223QTGBG.cjs +26 -0
  319. package/dist/login-6IKTBUBY.js +26 -0
  320. package/dist/logout-RN2AG6SI.js +23 -0
  321. package/dist/logout-U3M4FFX7.cjs +23 -0
  322. package/dist/mcp-5O6PUL4G.js +20 -0
  323. package/dist/mcp-NUQ76QQB.cjs +20 -0
  324. package/dist/{mcp-install-2FEROZTL.js → mcp-install-6XWXLFVY.js} +17 -10
  325. package/dist/{mcp-install-WM6BQRI5.cjs → mcp-install-P6DHES7V.cjs} +21 -14
  326. package/dist/memory-CYMDQ2YC.cjs +10 -0
  327. package/dist/{memory-J73WZH2I.js → memory-Q54CESNM.js} +2 -2
  328. package/dist/{model-AES267IN.js → model-6AJ77PJG.js} +2 -2
  329. package/dist/model-IDRCKDML.cjs +10 -0
  330. package/dist/new-7LEWOUF2.cjs +12 -0
  331. package/dist/{new-5CLF3MKH.js → new-ZXHEWC2S.js} +3 -3
  332. package/dist/onboarding-FXX7YHSJ.cjs +35 -0
  333. package/dist/onboarding-JYNMK6NI.js +35 -0
  334. package/dist/permissions-YBNSANIA.cjs +10 -0
  335. package/dist/permissions-YHJMVA6L.js +10 -0
  336. package/dist/plan-XEJMOT55.cjs +13 -0
  337. package/dist/{plan-65HMS5HQ.js → plan-YYUAXPTL.js} +3 -1
  338. package/dist/pr-review-CW6J7P62.cjs +9 -0
  339. package/dist/pr-review-YZSBQVT2.js +9 -0
  340. package/dist/quit-B43SJ6E4.cjs +10 -0
  341. package/dist/{quit-XDZYRSPU.js → quit-GWTNHQSP.js} +2 -2
  342. package/dist/rawMode-6W5AXAKI.cjs +7 -0
  343. package/dist/rawMode-GFNLXQPU.js +7 -0
  344. package/dist/{registry-PTHWERKC.js → registry-34GL6BNJ.js} +29 -44
  345. package/dist/{registry-IVT4G2RT.cjs → registry-V24W7YK6.cjs} +65 -80
  346. package/dist/repeat-P4FAPE3Y.cjs +17 -0
  347. package/dist/{repeat-EVCWUL6Z.js → repeat-RALE6AUO.js} +7 -3
  348. package/dist/resume-DYVOQN5L.cjs +16 -0
  349. package/dist/resume-M25UQKOX.js +16 -0
  350. package/dist/review-QHP2KP4Q.js +9 -0
  351. package/dist/review-UWHWQHCB.cjs +9 -0
  352. package/dist/ripgrep-67SCU2BA.cjs +9 -0
  353. package/dist/ripgrep-VHJQQ55W.js +9 -0
  354. package/dist/rpc-NPS3PU4O.cjs +3730 -0
  355. package/dist/rpc-S3DGW6KV.js +3730 -0
  356. package/dist/search-CPX4PWHP.js +20 -0
  357. package/dist/search-VUF3M4N3.cjs +20 -0
  358. package/dist/{sessions-6GWEBMKS.js → sessions-IYAXMK23.js} +2 -2
  359. package/dist/sessions-JODKER5D.cjs +10 -0
  360. package/dist/{settings-BXR6SBJP.js → settings-55BNW6BF.js} +11 -8
  361. package/dist/settings-BKTS7OMC.cjs +33 -0
  362. package/dist/setup-IRC5HQG2.js +29 -0
  363. package/dist/setup-MMQ7TWOP.cjs +29 -0
  364. package/dist/share-6JRQECAH.cjs +17 -0
  365. package/dist/share-YM5MJKMO.js +17 -0
  366. package/dist/{skills-PG542VEB.cjs → skills-GGMZOVIE.cjs} +13 -10
  367. package/dist/skills-LWSOKOSH.cjs +29 -0
  368. package/dist/{skills-ZZCIAS7C.js → skills-MVIZNHT4.js} +12 -9
  369. package/dist/skills-VWOMV3CR.js +29 -0
  370. package/dist/{skills-install-SRC3Z2MS.js → skills-install-QBA5RCV6.js} +21 -70
  371. package/dist/{skills-install-67DOBPJC.cjs → skills-install-VTAMCNNY.cjs} +34 -83
  372. package/dist/skills-new-GPL46YV2.js +18 -0
  373. package/dist/skills-new-L5BEZN5V.cjs +18 -0
  374. package/dist/slashCommands-FBPCIWM5.cjs +95 -0
  375. package/dist/slashCommands-FCWY5DXW.js +95 -0
  376. package/dist/status-3B5SDZPL.js +17 -0
  377. package/dist/status-TTGRF6NC.cjs +17 -0
  378. package/dist/summarizer-DGPHE5IQ.js +17 -0
  379. package/dist/summarizer-JNXLUAQG.cjs +17 -0
  380. package/dist/sync-77CXVVTK.cjs +21 -0
  381. package/dist/{sync-VU2NSJ4O.js → sync-7BILIQHP.js} +3 -3
  382. package/dist/sync-7OKF6636.js +21 -0
  383. package/dist/sync-EH4K5U3N.cjs +40 -0
  384. package/dist/{teammate-SD26GR37.js → teammate-GZQSCIMS.js} +28 -7
  385. package/dist/{teammate-SXRVXNQV.cjs → teammate-J6PHGL23.cjs} +29 -8
  386. package/dist/theme-64BYGJ57.cjs +21 -0
  387. package/dist/theme-YJE6HEON.js +21 -0
  388. package/dist/tools-3PPTTKFV.js +9 -0
  389. package/dist/tools-THIQA7WC.cjs +9 -0
  390. package/dist/ui/questionModal.cjs +8 -5
  391. package/dist/ui/questionModal.js +7 -4
  392. package/dist/undo-PRTEGL2J.cjs +10 -0
  393. package/dist/{undo-OL2EDBRY.js → undo-SZEHLX7X.js} +2 -2
  394. package/dist/web-3BA2WV37.cjs +37 -0
  395. package/dist/web-6FYGBX5K.js +37 -0
  396. package/dist/workspaceSafety-MDJGHK6D.cjs +9 -0
  397. package/dist/workspaceSafety-XOUMUBVB.js +9 -0
  398. package/dist/yolo-GF2YD7ZI.js +9 -0
  399. package/dist/yolo-OGDA7HNC.cjs +9 -0
  400. package/dist/yoloMode-3DJDA75U.cjs +17 -0
  401. package/dist/yoloMode-4JOOSU26.js +17 -0
  402. package/package.json +46 -49
  403. package/dist/AgentRegistry-HRPN6ZOF.cjs +0 -10
  404. package/dist/CommunitySkillsCache-KE435RAR.cjs +0 -8
  405. package/dist/GitHubRegistryFetcher-I45SESIL.cjs +0 -7
  406. package/dist/LearnAdvisor-FLBA6FDD.js +0 -9
  407. package/dist/LearnAdvisor-GG3CXQF3.cjs +0 -9
  408. package/dist/MemoryManager-2LQPIYVE.cjs +0 -8
  409. package/dist/PermissionManager-X57BXHJ6.cjs +0 -11
  410. package/dist/ProviderFactory-KPJOGQWF.cjs +0 -9
  411. package/dist/SessionManager-YBJAZXNO.cjs +0 -10
  412. package/dist/SkillsRegistry-7O72A6TZ.cjs +0 -9
  413. package/dist/SubAgent-JT4HZHN7.js +0 -11
  414. package/dist/SubAgent-VPNYDWAU.cjs +0 -11
  415. package/dist/SyncApiClient-HQXJL5BT.cjs +0 -11
  416. package/dist/about-4DB5KTHW.js +0 -12
  417. package/dist/about-LXAOXZFT.cjs +0 -12
  418. package/dist/actionExecutor-23JB2WUC.js +0 -19
  419. package/dist/actionExecutor-X5UEZSKH.cjs +0 -19
  420. package/dist/add-dir-YC37DMSF.cjs +0 -10
  421. package/dist/agents-YF3BSUU5.js +0 -12
  422. package/dist/agents-ZOUHPMYR.cjs +0 -12
  423. package/dist/agents-new-HSH4GQPG.js +0 -14
  424. package/dist/agents-new-VYUDOCE7.cjs +0 -14
  425. package/dist/autoSkill-X5W52WOE.cjs +0 -20
  426. package/dist/automode-SJGM7VEI.cjs +0 -10
  427. package/dist/chunk-ALYU6VTM.js +0 -105
  428. package/dist/chunk-B53A2NM2.js +0 -2030
  429. package/dist/chunk-BJXSNT46.js +0 -100
  430. package/dist/chunk-CB4E2T5N.cjs +0 -312
  431. package/dist/chunk-DNUOXBHL.js +0 -539
  432. package/dist/chunk-EFX2QSZX.cjs +0 -33
  433. package/dist/chunk-H2ZRHQQV.js +0 -33
  434. package/dist/chunk-HNRPK5MY.cjs +0 -85
  435. package/dist/chunk-HVKOZ2VP.cjs +0 -115
  436. package/dist/chunk-JJLYWH5Y.cjs +0 -100
  437. package/dist/chunk-LWUJFGOZ.js +0 -115
  438. package/dist/chunk-MERYP6AM.cjs +0 -539
  439. package/dist/chunk-MZAPWNAC.cjs +0 -207
  440. package/dist/chunk-PGESAU2W.cjs +0 -2030
  441. package/dist/chunk-SYVYLZZF.cjs +0 -24
  442. package/dist/chunk-SZOLA6FR.js +0 -111
  443. package/dist/chunk-VWDHR4HV.js +0 -168
  444. package/dist/chunk-Y45G6ZO5.cjs +0 -168
  445. package/dist/chunk-YRLYSQEQ.cjs +0 -105
  446. package/dist/chunk-ZYVS43MU.js +0 -312
  447. package/dist/clear-GK4IEUUS.cjs +0 -12
  448. package/dist/communityInstaller-XXC7RLE4.cjs +0 -19
  449. package/dist/completion-HWABSAEL.js +0 -14
  450. package/dist/completion-IUUVQG4D.cjs +0 -14
  451. package/dist/config-HF7WOLZF.cjs +0 -18
  452. package/dist/constants-PEO3P2SJ.cjs +0 -21
  453. package/dist/export-QJAV2FCZ.js +0 -12
  454. package/dist/export-XSRFXGWU.cjs +0 -12
  455. package/dist/feedback-4TCIL3ML.cjs +0 -15
  456. package/dist/feedback-SJ6VVEY3.js +0 -15
  457. package/dist/filesystem-W56QZUJF.cjs +0 -10
  458. package/dist/help-ISBVQL3S.cjs +0 -12
  459. package/dist/history-XQ4GTSFU.cjs +0 -14
  460. package/dist/hooks-CJNKJ5PF.js +0 -13
  461. package/dist/hooks-UTMBTAXT.cjs +0 -13
  462. package/dist/i18n-N7QQ7A5M.cjs +0 -33
  463. package/dist/ide-RTA4UJV4.js +0 -12
  464. package/dist/ide-VWVOLIFF.cjs +0 -12
  465. package/dist/immediateCommandRouter-BW34JNXL.js +0 -9
  466. package/dist/immediateCommandRouter-SHOVNB5X.cjs +0 -9
  467. package/dist/import-ZLJVONXH.cjs +0 -10
  468. package/dist/init-TBKAB4LZ.cjs +0 -10
  469. package/dist/language-MDSHEXHB.cjs +0 -18
  470. package/dist/language-PXTQSHIG.js +0 -18
  471. package/dist/learn-623TW5EK.cjs +0 -20
  472. package/dist/learn-BCPV7GM2.js +0 -20
  473. package/dist/localProjectPermissions-BHQXEWZJ.cjs +0 -18
  474. package/dist/localProjectPermissions-GMOUYQM6.js +0 -18
  475. package/dist/login-QMVEETWJ.js +0 -20
  476. package/dist/login-QYMXAL3K.cjs +0 -20
  477. package/dist/logout-2CMTDAOJ.js +0 -18
  478. package/dist/logout-ZOHVZAUK.cjs +0 -18
  479. package/dist/mcp-IUVKK65S.js +0 -18
  480. package/dist/mcp-TXC7PYG3.cjs +0 -18
  481. package/dist/memory-WRIHDEPK.cjs +0 -10
  482. package/dist/model-RLP75SF5.cjs +0 -10
  483. package/dist/new-HLSFL6A4.cjs +0 -12
  484. package/dist/permissions-GP6FTGZ2.js +0 -13
  485. package/dist/permissions-O6EKKPOG.cjs +0 -13
  486. package/dist/plan-MCAXDIM2.cjs +0 -11
  487. package/dist/quit-TQX6GXA5.cjs +0 -10
  488. package/dist/repeat-BSPS5TWD.cjs +0 -13
  489. package/dist/resume-2GOPDLL4.cjs +0 -13
  490. package/dist/resume-37IUVDA6.js +0 -13
  491. package/dist/search-7KUSHIBL.cjs +0 -17
  492. package/dist/search-OJGDRIMA.js +0 -17
  493. package/dist/sessions-CYYCHSQG.cjs +0 -10
  494. package/dist/settings-2D7CAO66.cjs +0 -30
  495. package/dist/share-BXQY5IQU.js +0 -14
  496. package/dist/share-OSFXZBGS.cjs +0 -14
  497. package/dist/skills-FL6O6AOM.cjs +0 -26
  498. package/dist/skills-PNKQZRNK.js +0 -26
  499. package/dist/skills-new-XFMEHHIF.cjs +0 -15
  500. package/dist/skills-new-ZNZPHUKS.js +0 -15
  501. package/dist/slashCommands-LLCNPK3X.js +0 -76
  502. package/dist/slashCommands-RXZZS6RE.cjs +0 -76
  503. package/dist/status-BCECUJXT.cjs +0 -11
  504. package/dist/status-EFO7MQU3.js +0 -11
  505. package/dist/sync-IJYJ6KKM.js +0 -18
  506. package/dist/sync-LFT6SBPF.cjs +0 -18
  507. package/dist/sync-U7SDPBNZ.cjs +0 -40
  508. package/dist/theme-AWBHSG7J.cjs +0 -18
  509. package/dist/theme-TQLBPJ2E.js +0 -18
  510. package/dist/undo-IBBGP7A2.cjs +0 -10
@@ -1,20 +1,35 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3;
2
2
 
3
- var _chunkBVKXEQVGcjs = require('./chunk-BVKXEQVG.cjs');
3
+ var _chunkDA7NBAJKcjs = require('./chunk-DA7NBAJK.cjs');
4
4
 
5
5
 
6
- var _chunkCNBKZEX5cjs = require('./chunk-CNBKZEX5.cjs');
6
+ var _chunkLFDPTJYFcjs = require('./chunk-LFDPTJYF.cjs');
7
7
 
8
8
 
9
- var _chunkULQ6MDSJcjs = require('./chunk-ULQ6MDSJ.cjs');
9
+ var _chunkMOJ7ADW4cjs = require('./chunk-MOJ7ADW4.cjs');
10
10
 
11
11
  // src/core/agents/SubAgent.ts
12
12
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
13
13
 
14
+ // src/permissions/types.ts
15
+ function normalizePermissionPromptResponse(response) {
16
+ if (typeof response === "boolean") {
17
+ return { decision: response ? "allow_once" : "deny_once" };
18
+ }
19
+ if (!response) {
20
+ return { decision: "deny_once" };
21
+ }
22
+ return response;
23
+ }
24
+ function isAllowedPermissionPrompt(result) {
25
+ return result.decision === "allow_once" || result.decision === "allow_session" || result.decision === "allow_always_project" || result.decision === "allow_always_user" || result.decision === "alternative";
26
+ }
27
+
14
28
  // src/core/toolFilter.ts
15
29
  var TOOL_CATEGORIES = {
16
30
  // Meta tools
17
31
  tools_registry: "meta",
32
+ tool_search: "meta",
18
33
  plan: "meta",
19
34
  todo_write: "meta",
20
35
  smart_context_cropper: "meta",
@@ -26,13 +41,32 @@ var TOOL_CATEGORIES = {
26
41
  create_team: "meta",
27
42
  add_teammate: "meta",
28
43
  create_task: "meta",
44
+ task_get: "meta",
45
+ task_list: "meta",
46
+ task_update: "meta",
47
+ task_stop: "meta",
48
+ task_output: "meta",
49
+ skill: "meta",
50
+ install_agent_skill: "create",
51
+ sleep: "meta",
52
+ enter_worktree: "meta",
53
+ exit_worktree: "meta",
29
54
  team_status: "meta",
30
55
  send_team_message: "meta",
31
56
  ask_followup_question: "meta",
57
+ find_agent_skills: "meta",
58
+ request_directory_access: "meta",
59
+ exit_plan_mode: "meta",
60
+ cron_create: "meta",
61
+ cron_delete: "meta",
32
62
  list_schedules: "meta",
33
63
  cancel_schedule: "meta",
34
64
  // Read operations
35
65
  read_file: "read",
66
+ fff_find: "read",
67
+ fff_grep: "read",
68
+ find: "read",
69
+ glob: "read",
36
70
  search: "read",
37
71
  search_with_context: "read",
38
72
  semantic_search: "read",
@@ -43,6 +77,7 @@ var TOOL_CATEGORIES = {
43
77
  write_file: "write",
44
78
  append_file: "write",
45
79
  apply_patch: "write",
80
+ notebook_edit: "write",
46
81
  search_replace: "write",
47
82
  format_file: "write",
48
83
  multi_file_edit: "write",
@@ -54,6 +89,11 @@ var TOOL_CATEGORIES = {
54
89
  // Delete operations
55
90
  delete_path: "delete",
56
91
  remove_dependency: "delete",
92
+ package_info: "read",
93
+ // Web read operations
94
+ web_search: "read",
95
+ fetch_url: "read",
96
+ web_repo: "read",
57
97
  // Git read operations
58
98
  git_diff: "git_read",
59
99
  git_status: "git_read",
@@ -97,7 +137,24 @@ var TOOL_CATEGORIES = {
97
137
  git_push: "git_write",
98
138
  // Shell operations
99
139
  run_command: "shell",
100
- custom_command: "shell"
140
+ shell: "shell",
141
+ custom_command: "shell",
142
+ // Browser operations (Chrome extension bridge only)
143
+ browser_screenshot: "browser",
144
+ browser_click: "browser",
145
+ browser_type: "browser",
146
+ browser_navigate: "browser",
147
+ browser_scroll: "browser",
148
+ browser_find_element: "browser",
149
+ browser_press_key: "browser",
150
+ browser_get_page_context: "browser",
151
+ browser_get_element: "browser",
152
+ browser_wait_for_element: "browser",
153
+ browser_read_console: "browser",
154
+ browser_read_network: "browser",
155
+ browser_get_tabs: "browser",
156
+ browser_get_tab_groups: "browser",
157
+ browser_execute_js: "browser"
101
158
  };
102
159
  var CONTEXT_POLICIES = {
103
160
  // CLI: Full access to everything
@@ -111,6 +168,8 @@ var CONTEXT_POLICIES = {
111
168
  blockedTools: [
112
169
  "list_tree",
113
170
  // Don't expose directory structure
171
+ "find",
172
+ // Don't allow broad searches
114
173
  "search",
115
174
  // Don't allow broad searches
116
175
  "search_with_context",
@@ -155,14 +214,70 @@ var CONTEXT_POLICIES = {
155
214
  "git_rebase"
156
215
  ]
157
216
  },
217
+ // Chrome: Browser-first, limited file access
218
+ // Only browser_* tools + basic read/write for Downloads
219
+ chrome: {
220
+ allowedCategories: ["read", "write", "browser", "meta"],
221
+ allowedTools: [
222
+ // Browser tools — ALWAYS available, highest priority
223
+ "browser_screenshot",
224
+ "browser_click",
225
+ "browser_type",
226
+ "browser_navigate",
227
+ "browser_scroll",
228
+ "browser_find_element",
229
+ "browser_press_key",
230
+ "browser_get_page_context",
231
+ "browser_get_element",
232
+ "browser_wait_for_element",
233
+ "browser_read_console",
234
+ "browser_read_network",
235
+ "browser_get_tabs",
236
+ "browser_get_tab_groups",
237
+ "browser_execute_js",
238
+ // Basic file ops — restricted scope
239
+ "read_file",
240
+ "write_file",
241
+ "fff_grep",
242
+ "fff_find",
243
+ "search",
244
+ "list_tree",
245
+ // Web
246
+ "web_search",
247
+ "fetch_url",
248
+ // Communication
249
+ "plan",
250
+ "ask_followup_question",
251
+ "todo_write",
252
+ "save_memory",
253
+ "recall_memory",
254
+ "tools_registry"
255
+ ],
256
+ blockedTools: [
257
+ "run_command",
258
+ "custom_command",
259
+ "git_push",
260
+ "git_reset",
261
+ "git_rebase",
262
+ "git_merge",
263
+ "git_cherry_pick",
264
+ "auto_commit",
265
+ "delete_path",
266
+ "create_directory",
267
+ "rename_path",
268
+ "copy_path",
269
+ "git_worktree_add",
270
+ "git_worktree_remove",
271
+ "delegate_task",
272
+ "delegate_parallel"
273
+ ]
274
+ },
158
275
  // Restricted: Read-only mode
159
276
  restricted: {
160
277
  allowedCategories: ["read", "git_read", "meta"],
161
278
  blockedTools: [
162
279
  "list_tree",
163
- // Even in read mode, don't expose full structure
164
280
  "ask_followup_question"
165
- // Requires interactive terminal (may be running in restricted non-interactive mode)
166
281
  ]
167
282
  }
168
283
  };
@@ -170,6 +285,8 @@ function getToolCategory(toolName) {
170
285
  return _nullishCoalesce(TOOL_CATEGORIES[toolName], () => ( "meta"));
171
286
  }
172
287
  var ToolFilter = class {
288
+
289
+
173
290
  constructor(context = "cli", customPolicy) {
174
291
  this.context = context;
175
292
  const basePolicy = CONTEXT_POLICIES[context];
@@ -245,24 +362,35 @@ function createToolFilter(context = "cli", customPolicy) {
245
362
  var RELEVANCE_CATEGORIES = {
246
363
  // Always include
247
364
  read_file: "always",
248
- write_file: "always",
249
- search: "always",
250
- list_tree: "always",
365
+ fff_find: "always",
366
+ fff_grep: "always",
367
+ tool_search: "always",
368
+ ask_followup_question: "always",
369
+ find_agent_skills: "always",
370
+ tools_registry: "always",
371
+ request_directory_access: "always",
251
372
  plan: "always",
252
- run_command: "always",
373
+ exit_plan_mode: "always",
253
374
  todo_write: "always",
254
375
  // Filesystem
376
+ find: "filesystem",
377
+ glob: "filesystem",
378
+ search: "filesystem",
379
+ list_tree: "filesystem",
380
+ file_stats: "filesystem",
381
+ checksum: "filesystem",
382
+ // Editing
383
+ write_file: "editing",
255
384
  append_file: "filesystem",
256
- apply_patch: "filesystem",
385
+ apply_patch: "editing",
257
386
  create_directory: "filesystem",
258
387
  delete_path: "filesystem",
259
388
  rename_path: "filesystem",
260
389
  copy_path: "filesystem",
261
- search_replace: "filesystem",
262
- format_file: "filesystem",
263
- file_stats: "filesystem",
264
- checksum: "filesystem",
265
- multi_file_edit: "filesystem",
390
+ search_replace: "editing",
391
+ format_file: "editing",
392
+ multi_file_edit: "editing",
393
+ notebook_edit: "editing",
266
394
  search_with_context: "search",
267
395
  semantic_search: "search",
268
396
  // Basic git
@@ -279,7 +407,7 @@ var RELEVANCE_CATEGORIES = {
279
407
  git_apply_patch: "git_basic",
280
408
  git_fetch: "git_basic",
281
409
  git_pull: "git_basic",
282
- git_push: "git_basic",
410
+ git_push: "git_advanced",
283
411
  git_stash: "git_basic",
284
412
  git_stash_list: "git_basic",
285
413
  git_stash_pop: "git_basic",
@@ -308,24 +436,52 @@ var RELEVANCE_CATEGORIES = {
308
436
  // Dependencies
309
437
  add_dependency: "dependencies",
310
438
  remove_dependency: "dependencies",
439
+ package_info: "dependencies",
440
+ // Verification and shell
441
+ run_command: "verification",
442
+ shell: "verification",
443
+ // Web
444
+ web_search: "web",
445
+ fetch_url: "web",
446
+ web_repo: "web",
447
+ // Browser
448
+ browser_screenshot: "browser",
449
+ browser_click: "browser",
450
+ browser_type: "browser",
451
+ browser_navigate: "browser",
452
+ browser_scroll: "browser",
453
+ browser_find_element: "browser",
454
+ browser_press_key: "browser",
455
+ browser_get_page_context: "browser",
456
+ browser_get_element: "browser",
457
+ browser_wait_for_element: "browser",
458
+ browser_read_console: "browser",
459
+ browser_read_network: "browser",
460
+ browser_get_tabs: "browser",
461
+ browser_get_tab_groups: "browser",
462
+ browser_execute_js: "browser",
311
463
  // Meta
312
- tools_registry: "meta",
313
464
  save_memory: "meta",
314
465
  recall_memory: "meta",
315
466
  smart_context_cropper: "meta",
316
467
  create_meta_tool: "meta",
317
- custom_command: "meta",
468
+ custom_command: "verification",
318
469
  delegate_task: "meta",
319
470
  delegate_parallel: "meta",
320
471
  create_team: "meta",
321
472
  add_teammate: "meta",
322
473
  create_task: "meta",
474
+ task_get: "meta",
475
+ task_list: "meta",
476
+ task_update: "meta",
477
+ task_stop: "meta",
478
+ task_output: "meta",
479
+ enter_worktree: "meta",
480
+ exit_worktree: "meta",
323
481
  team_status: "meta",
324
482
  send_team_message: "meta",
325
- ask_followup_question: "always",
326
- // User interaction should always be available when in interactive mode
327
- find_agent_skills: "always",
328
- // Skill search should always be available so the LLM can explore community skills
483
+ cron_create: "meta",
484
+ cron_delete: "meta",
329
485
  list_schedules: "meta",
330
486
  cancel_schedule: "meta",
331
487
  // Project tracking
@@ -333,11 +489,15 @@ var RELEVANCE_CATEGORIES = {
333
489
  };
334
490
  var CATEGORY_TRIGGERS = {
335
491
  always: [],
336
- filesystem: ["file", "directory", "folder", "create", "delete", "rename", "copy", "move", "format", "edit"],
492
+ filesystem: ["file", "directory", "folder", "create", "delete", "rename", "copy", "move", "format", "path", "open"],
493
+ editing: ["fix", "edit", "change", "modify", "patch", "write", "implement", "refactor", "update", "replace", "create", "delete", "remove", "format", "add", "build", "document", "docs", "config", "configure"],
337
494
  git_basic: ["git", "commit", "branch", "diff", "status", "stash", "pull", "push"],
338
- git_advanced: ["merge", "rebase", "cherry-pick", "worktree", "reset"],
339
- search: ["search", "find", "grep", "look for", "locate", "where is"],
340
- dependencies: ["dependency", "dependencies", "package", "npm", "install", "yarn", "bun add"],
495
+ git_advanced: ["merge", "rebase", "cherry-pick", "worktree", "reset", "push", "force-push"],
496
+ search: ["search", "find", "grep", "look for", "locate", "where is", "symbol", "definition"],
497
+ verification: ["test", "tests", "build", "lint", "typecheck", "verify", "run", "command", "script", "proof", "install"],
498
+ web: ["web", "url", "http", "https", "fetch", "search internet", "latest", "docs", "documentation", "changelog"],
499
+ browser: ["browser", "chrome", "page", "tab", "click", "screenshot", "console", "network"],
500
+ dependencies: ["dependency", "dependencies", "package", "npm", "install", "yarn", "bun add", "cargo add", "pip install"],
341
501
  meta: [
342
502
  "tool",
343
503
  "delegate",
@@ -354,10 +514,64 @@ var CATEGORY_TRIGGERS = {
354
514
  ],
355
515
  project_tracking: ["issue", "issues", "pr", "pull request", "assigned", "tracker", "bug", "feature request", "milestone", "review"]
356
516
  };
517
+ var TOOL_SELECTION_CACHE_LIMIT = 100;
518
+ var toolSelectionCache = /* @__PURE__ */ new Map();
519
+ var CATALOG_LABELS = {
520
+ always: "core",
521
+ filesystem: "filesystem",
522
+ editing: "editing",
523
+ git_basic: "git",
524
+ git_advanced: "advanced git",
525
+ search: "search",
526
+ verification: "verification",
527
+ web: "web",
528
+ browser: "browser",
529
+ dependencies: "dependencies",
530
+ meta: "coordination",
531
+ project_tracking: "project tracking"
532
+ };
533
+ function extractRecentToolArguments(message) {
534
+ if (!_optionalChain([message, 'access', _14 => _14.tool_calls, 'optionalAccess', _15 => _15.length])) {
535
+ return "";
536
+ }
537
+ return message.tool_calls.map((call) => call.function.arguments).join(" ");
538
+ }
539
+ function getRecentSelectionText(messages) {
540
+ return messages.slice(-8).map((message) => `${_nullishCoalesce(message.content, () => ( ""))} ${extractRecentToolArguments(message)}`).join(" ").toLowerCase();
541
+ }
542
+ function stableToolCacheKey(tools, messages) {
543
+ const toolNames = tools.map((tool) => tool.name).sort().join(",");
544
+ return `${toolNames}
545
+ ${getRecentSelectionText(messages)}`;
546
+ }
547
+ function rememberToolSelection(key, names) {
548
+ if (toolSelectionCache.size >= TOOL_SELECTION_CACHE_LIMIT) {
549
+ const oldestKey = toolSelectionCache.keys().next().value;
550
+ if (oldestKey) {
551
+ toolSelectionCache.delete(oldestKey);
552
+ }
553
+ }
554
+ toolSelectionCache.set(key, names);
555
+ }
556
+ function restoreCachedSelection(tools, names) {
557
+ const byName = new Map(tools.map((tool) => [tool.name, tool]));
558
+ return names.map((name) => byName.get(name)).filter((tool) => Boolean(tool));
559
+ }
560
+ function matchesToolByText(tool, recentText) {
561
+ if (!recentText) {
562
+ return false;
563
+ }
564
+ const normalizedName = tool.name.toLowerCase();
565
+ const spacedName = normalizedName.replace(/_/g, " ");
566
+ if (recentText.includes(normalizedName) || recentText.includes(spacedName)) {
567
+ return true;
568
+ }
569
+ return tool.description.toLowerCase().split(/[^a-z0-9_/-]+/).filter((token) => token.length >= 5).some((token) => recentText.includes(token));
570
+ }
357
571
  function detectRelevantCategories(messages) {
358
572
  const categories = /* @__PURE__ */ new Set(["always"]);
359
573
  const recentMessages = messages.slice(-8);
360
- const recentText = recentMessages.map((m) => _nullishCoalesce(m.content, () => ( ""))).join(" ").toLowerCase();
574
+ const recentText = getRecentSelectionText(messages);
361
575
  for (const [category, triggers] of Object.entries(CATEGORY_TRIGGERS)) {
362
576
  if (triggers.some((trigger) => recentText.includes(trigger))) {
363
577
  categories.add(category);
@@ -381,31 +595,62 @@ function detectRelevantCategories(messages) {
381
595
  }
382
596
  return categories;
383
597
  }
384
- function filterToolsByRelevance(tools, messages) {
598
+ function filterToolsByRelevance(tools, messages, options = {}) {
599
+ const cacheEnabled = options.cache !== false;
600
+ const cacheKey = cacheEnabled ? stableToolCacheKey(tools, messages) : "";
601
+ const cachedNames = cacheEnabled ? toolSelectionCache.get(cacheKey) : void 0;
602
+ if (cachedNames) {
603
+ return restoreCachedSelection(tools, cachedNames);
604
+ }
385
605
  const relevantCategories = detectRelevantCategories(messages);
386
- return tools.filter((tool) => {
606
+ const recentText = getRecentSelectionText(messages);
607
+ const selected = tools.filter((tool) => {
387
608
  const category = RELEVANCE_CATEGORIES[tool.name];
388
- return !category || relevantCategories.has(category);
609
+ if (category && relevantCategories.has(category)) {
610
+ return true;
611
+ }
612
+ return matchesToolByText(tool, recentText);
389
613
  });
614
+ if (cacheEnabled) {
615
+ rememberToolSelection(cacheKey, selected.map((tool) => tool.name));
616
+ }
617
+ return selected;
618
+ }
619
+ function formatToolCapabilityCatalog(tools) {
620
+ const grouped = /* @__PURE__ */ new Map();
621
+ for (const tool of tools) {
622
+ const relevance = _nullishCoalesce(RELEVANCE_CATEGORIES[tool.name], () => ( "meta"));
623
+ const label = CATALOG_LABELS[relevance];
624
+ const existing = _nullishCoalesce(grouped.get(label), () => ( []));
625
+ existing.push(tool.name);
626
+ grouped.set(label, existing);
627
+ }
628
+ return [...grouped.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([label, names]) => `- ${label}: ${[...new Set(names)].sort().join(", ")}`).join("\n");
390
629
  }
391
630
 
392
631
  // src/core/toolManager.ts
632
+ var SEQUENTIAL_TOOL_CATEGORIES = /* @__PURE__ */ new Set([
633
+ "write",
634
+ "create",
635
+ "delete",
636
+ "git_write",
637
+ "shell"
638
+ ]);
393
639
  var DEFAULT_TOOL_DEFINITIONS = [
394
640
  {
395
641
  name: "tools_registry",
396
642
  description: "List all available tools (built-in and meta)"
397
643
  },
398
644
  {
399
- name: "plan",
400
- 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.',
645
+ name: "tool_search",
646
+ 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
647
  parameters: {
402
648
  type: "object",
403
649
  properties: {
404
- notes: {
405
- type: "string",
406
- 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.'
407
- }
408
- }
650
+ query: { type: "string", description: 'Search terms for the capability or tool you need (e.g. "delegate agent", "git worktree", "browser screenshot")' },
651
+ limit: { type: "number", description: "Maximum matching tools to return (default: 10)" }
652
+ },
653
+ required: ["query"]
409
654
  }
410
655
  },
411
656
  {
@@ -451,6 +696,22 @@ var DEFAULT_TOOL_DEFINITIONS = [
451
696
  required: ["path", "contents"]
452
697
  }
453
698
  },
699
+ {
700
+ name: "notebook_edit",
701
+ 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.",
702
+ parameters: {
703
+ type: "object",
704
+ properties: {
705
+ path: { type: "string", description: "Relative path to the .ipynb notebook file" },
706
+ cell_index: { type: "number", description: "0-based cell index to target. For insert, inserts after this index; omit to append." },
707
+ cell_id: { type: "string", description: "Optional cell ID to target instead of cell_index" },
708
+ new_source: { type: "string", description: "New source for replace or insert operations" },
709
+ cell_type: { type: "string", description: "Cell type for insert operations", enum: ["code", "markdown"] },
710
+ edit_mode: { type: "string", description: "Notebook edit mode", enum: ["replace", "insert", "delete"] }
711
+ },
712
+ required: ["path"]
713
+ }
714
+ },
454
715
  {
455
716
  name: "append_file",
456
717
  description: "Append text to a file",
@@ -476,41 +737,31 @@ var DEFAULT_TOOL_DEFINITIONS = [
476
737
  }
477
738
  },
478
739
  {
479
- name: "search",
480
- description: "Search workspace text",
481
- parameters: {
482
- type: "object",
483
- properties: {
484
- query: { type: "string", description: "Text to search for" },
485
- path: { type: "string", description: "Optional relative path to search in" }
486
- },
487
- required: ["query"]
488
- }
489
- },
490
- {
491
- name: "search_with_context",
492
- description: "Search workspace text with surrounding context",
740
+ name: "fff_grep",
741
+ description: "Content search with frecency ranking and definition detection when native FFF is available, plus a ripgrep-backed fallback. Use this for content search.",
493
742
  parameters: {
494
743
  type: "object",
495
744
  properties: {
496
- query: { type: "string", description: "Text to search for" },
497
- path: { type: "string", description: "Optional relative path to search in" },
498
- context: { type: "number", description: "Number of context lines (default 2)" },
499
- limit: { type: "number", description: "Maximum results (default 10)" }
745
+ query: { type: "string", description: "Search pattern (regex auto-detected)" },
746
+ path: { type: "string", description: "Optional subdirectory to search in" },
747
+ exclude: { type: "string", description: "Exclude patterns (comma/space separated)" },
748
+ caseSensitive: { type: "boolean", description: "Force case-sensitive matching" },
749
+ beforeContext: { type: "number", description: "Lines of context before match (default: 2)" },
750
+ afterContext: { type: "number", description: "Lines of context after match (default: 2)" },
751
+ classifyDefinitions: { type: "boolean", description: "Prioritize code definitions (default: true)" },
752
+ limit: { type: "number", description: "Maximum results (default: 50)" }
500
753
  },
501
754
  required: ["query"]
502
755
  }
503
756
  },
504
757
  {
505
- name: "semantic_search",
506
- description: "Search workspace text semantically with gitignore awareness",
758
+ name: "fff_find",
759
+ description: "Path and filename search with frecency ranking when native FFF is available, plus a ripgrep-backed fallback. Use this for file path discovery.",
507
760
  parameters: {
508
761
  type: "object",
509
762
  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)" }
763
+ query: { type: "string", description: "Filename or path pattern to search" },
764
+ limit: { type: "number", description: "Maximum results (default: 50)" }
514
765
  },
515
766
  required: ["query"]
516
767
  }
@@ -576,12 +827,12 @@ var DEFAULT_TOOL_DEFINITIONS = [
576
827
  },
577
828
  {
578
829
  name: "run_command",
579
- description: "Execute shell commands with optional directory, background mode, and description. Prefer dedicated tools: read_file over cat, search over grep, search_replace over sed.",
830
+ 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
831
  parameters: {
581
832
  type: "object",
582
833
  properties: {
583
- command: { type: "string", description: "Command to execute" },
584
- args: { type: "array", description: "Command arguments", items: { type: "string", description: "Single argument" } },
834
+ command: { type: "string", description: "Command to execute. Supports pipes (|), redirects (>), env vars ($HOME), globs (*), and chaining (&&)." },
835
+ 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
836
  directory: { type: "string", description: "Directory relative to workspace root to execute in" },
586
837
  description: { type: "string", description: "Brief description of what this command does (shown to user)" },
587
838
  background: { type: "boolean", description: "Run process in background (returns PID, useful for dev servers)" }
@@ -591,6 +842,23 @@ var DEFAULT_TOOL_DEFINITIONS = [
591
842
  requiresApproval: true,
592
843
  approvalMessage: "Allow the agent to run a shell command?"
593
844
  },
845
+ {
846
+ name: "shell",
847
+ 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.",
848
+ parameters: {
849
+ type: "object",
850
+ properties: {
851
+ command: { type: "string", description: "Command to execute. Supports pipes (|), redirects (>), env vars ($HOME), globs (*), and chaining (&&)." },
852
+ args: { type: "array", description: "Command arguments. Joined with the command into a single shell string.", items: { type: "string", description: "Single argument" } },
853
+ directory: { type: "string", description: "Directory relative to workspace root to execute in" },
854
+ description: { type: "string", description: "Brief description of what this command does (shown to user)" },
855
+ 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." }
856
+ },
857
+ required: ["command"]
858
+ },
859
+ requiresApproval: true,
860
+ approvalMessage: "Allow the agent to run a shell command with live output?"
861
+ },
594
862
  {
595
863
  name: "add_dependency",
596
864
  description: "Add a package dependency (supports dev flag)",
@@ -664,13 +932,12 @@ var DEFAULT_TOOL_DEFINITIONS = [
664
932
  },
665
933
  {
666
934
  name: "git_diff",
667
- description: "Show git diff for a file",
935
+ description: "Show git diff. When path is provided, shows diff for that file only. When omitted, shows all uncommitted changes in the workspace.",
668
936
  parameters: {
669
937
  type: "object",
670
938
  properties: {
671
- path: { type: "string", description: "Relative path to the file" }
672
- },
673
- required: ["path"]
939
+ path: { type: "string", description: "Relative path to a specific file (optional). Omit to diff the entire workspace." }
940
+ }
674
941
  }
675
942
  },
676
943
  {
@@ -1072,31 +1339,6 @@ var DEFAULT_TOOL_DEFINITIONS = [
1072
1339
  required: ["name", "command"]
1073
1340
  }
1074
1341
  },
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
1342
  {
1101
1343
  name: "todo_write",
1102
1344
  description: "Persist and update the todo list. Send the COMPLETE updated todo list each time (not incremental changes).",
@@ -1167,11 +1409,211 @@ var DEFAULT_TOOL_DEFINITIONS = [
1167
1409
  name: { type: "string", description: "Tool name in snake_case (e.g., analyze_imports, count_lines)" },
1168
1410
  description: { type: "string", description: "Clear description of what the tool does" },
1169
1411
  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}}")' }
1412
+ handler: { type: "string", description: 'Shell command template with {{param}} placeholders (e.g., "grep -E {{pattern}} {{path}}")' },
1413
+ scope: { type: "string", description: 'Where to persist the tool: "user" for all workspaces or "project" for this repository only', enum: ["user", "project"] }
1171
1414
  },
1172
1415
  required: ["name", "description", "parameters", "handler"]
1173
1416
  }
1174
1417
  },
1418
+ {
1419
+ name: "delegate_task",
1420
+ 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.",
1421
+ parameters: {
1422
+ type: "object",
1423
+ properties: {
1424
+ agent_name: { type: "string", description: "Registered agent name to delegate to" },
1425
+ task: { type: "string", description: "Concrete task for the delegated agent" }
1426
+ },
1427
+ required: ["agent_name", "task"]
1428
+ }
1429
+ },
1430
+ {
1431
+ name: "delegate_parallel",
1432
+ description: "Delegate multiple independent tasks to specialized sub-agents in parallel.",
1433
+ parameters: {
1434
+ type: "object",
1435
+ properties: {
1436
+ tasks: {
1437
+ type: "array",
1438
+ description: "Independent agent tasks to run in parallel",
1439
+ items: {
1440
+ type: "object",
1441
+ properties: {
1442
+ agent_name: { type: "string", description: "Registered agent name to delegate to" },
1443
+ task: { type: "string", description: "Concrete task for that agent" }
1444
+ },
1445
+ required: ["agent_name", "task"]
1446
+ }
1447
+ }
1448
+ },
1449
+ required: ["tasks"]
1450
+ }
1451
+ },
1452
+ {
1453
+ name: "create_team",
1454
+ description: "Create or reuse a teammate coordination group for multi-agent work.",
1455
+ parameters: {
1456
+ type: "object",
1457
+ properties: {
1458
+ name: { type: "string", description: "Team name" }
1459
+ },
1460
+ required: ["name"]
1461
+ }
1462
+ },
1463
+ {
1464
+ name: "add_teammate",
1465
+ description: "Add a teammate process to the active team using a registered agent.",
1466
+ parameters: {
1467
+ type: "object",
1468
+ properties: {
1469
+ name: { type: "string", description: "Human-readable teammate name" },
1470
+ agent_name: { type: "string", description: "Registered agent name to run" },
1471
+ model: { type: "string", description: "Optional model override for that teammate" }
1472
+ },
1473
+ required: ["name", "agent_name"]
1474
+ }
1475
+ },
1476
+ {
1477
+ name: "create_task",
1478
+ description: "Create a team task that can be assigned to an idle teammate.",
1479
+ parameters: {
1480
+ type: "object",
1481
+ properties: {
1482
+ subject: { type: "string", description: "Short task title" },
1483
+ description: { type: "string", description: "Detailed task description" },
1484
+ blocked_by: {
1485
+ type: "array",
1486
+ description: "Optional prerequisite task IDs that must complete first",
1487
+ items: { type: "string", description: "Task ID" }
1488
+ }
1489
+ },
1490
+ required: ["subject", "description"]
1491
+ }
1492
+ },
1493
+ {
1494
+ name: "task_get",
1495
+ description: "Get a single team task by ID from the active team task list.",
1496
+ parameters: {
1497
+ type: "object",
1498
+ properties: {
1499
+ task_id: { type: "string", description: "Task ID to retrieve" }
1500
+ },
1501
+ required: ["task_id"]
1502
+ }
1503
+ },
1504
+ {
1505
+ name: "task_list",
1506
+ description: "List tasks from the active team task list, optionally filtered by status or owner.",
1507
+ parameters: {
1508
+ type: "object",
1509
+ properties: {
1510
+ status: { type: "string", description: "Optional status filter", enum: ["pending", "in_progress", "completed"] },
1511
+ owner: { type: "string", description: "Optional owner filter" }
1512
+ }
1513
+ }
1514
+ },
1515
+ {
1516
+ name: "task_update",
1517
+ description: "Update a task in the active team task list.",
1518
+ parameters: {
1519
+ type: "object",
1520
+ properties: {
1521
+ task_id: { type: "string", description: "Task ID to update" },
1522
+ subject: { type: "string", description: "Updated short task title" },
1523
+ description: { type: "string", description: "Updated task description" },
1524
+ blocked_by: {
1525
+ type: "array",
1526
+ description: "Updated prerequisite task IDs",
1527
+ items: { type: "string", description: "Task ID" }
1528
+ },
1529
+ status: { type: "string", description: "Updated task status", enum: ["pending", "in_progress", "completed"] }
1530
+ },
1531
+ required: ["task_id"]
1532
+ }
1533
+ },
1534
+ {
1535
+ name: "task_stop",
1536
+ description: "Stop an active or queued team task and return it to pending state.",
1537
+ parameters: {
1538
+ type: "object",
1539
+ properties: {
1540
+ task_id: { type: "string", description: "Task ID to stop" }
1541
+ },
1542
+ required: ["task_id"]
1543
+ }
1544
+ },
1545
+ {
1546
+ name: "task_output",
1547
+ description: "Store or update the latest output/progress note for a task in the active team task list.",
1548
+ parameters: {
1549
+ type: "object",
1550
+ properties: {
1551
+ task_id: { type: "string", description: "Task ID to update" },
1552
+ output: { type: "string", description: "Latest progress note, result, or output summary for the task" }
1553
+ },
1554
+ required: ["task_id", "output"]
1555
+ }
1556
+ },
1557
+ {
1558
+ name: "skill",
1559
+ description: "List, inspect, activate, or deactivate a loaded skill. Activating a skill adds its instructions to the active session prompt.",
1560
+ parameters: {
1561
+ type: "object",
1562
+ properties: {
1563
+ command: { type: "string", description: "Skill operation to perform", enum: ["list", "info", "activate", "deactivate"] },
1564
+ name: { type: "string", description: "Skill name for info, activate, or deactivate" }
1565
+ },
1566
+ required: ["command"]
1567
+ }
1568
+ },
1569
+ {
1570
+ name: "sleep",
1571
+ description: "Pause execution for a short time when waiting for another system or process to settle. Use sparingly and prefer explicit polling when possible.",
1572
+ parameters: {
1573
+ type: "object",
1574
+ properties: {
1575
+ seconds: { type: "number", description: "Number of seconds to wait (maximum 300)" },
1576
+ reason: { type: "string", description: "Optional short reason for the wait" }
1577
+ },
1578
+ required: ["seconds"]
1579
+ }
1580
+ },
1581
+ {
1582
+ name: "enter_worktree",
1583
+ 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.",
1584
+ parameters: {
1585
+ type: "object",
1586
+ properties: {
1587
+ name: { type: "string", description: "Optional branch/worktree name to use for the new session worktree" }
1588
+ }
1589
+ }
1590
+ },
1591
+ {
1592
+ name: "exit_worktree",
1593
+ description: "Exit the current session worktree and return to the original workspace. Optionally keep the worktree on disk for inspection.",
1594
+ parameters: {
1595
+ type: "object",
1596
+ properties: {
1597
+ keep: { type: "boolean", description: "When true, keep the worktree and branch instead of removing them" }
1598
+ }
1599
+ }
1600
+ },
1601
+ {
1602
+ name: "team_status",
1603
+ description: "Show the active team, teammate statuses, and current task queue."
1604
+ },
1605
+ {
1606
+ name: "send_team_message",
1607
+ description: "Send a direct message from the lead agent to a teammate.",
1608
+ parameters: {
1609
+ type: "object",
1610
+ properties: {
1611
+ to: { type: "string", description: "Teammate name" },
1612
+ content: { type: "string", description: "Message content" }
1613
+ },
1614
+ required: ["to", "content"]
1615
+ }
1616
+ },
1175
1617
  // Web Search Operations
1176
1618
  {
1177
1619
  name: "web_search",
@@ -1283,7 +1725,45 @@ Actions:
1283
1725
  required: ["query"]
1284
1726
  }
1285
1727
  },
1728
+ {
1729
+ name: "install_agent_skill",
1730
+ 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.",
1731
+ parameters: {
1732
+ type: "object",
1733
+ properties: {
1734
+ name: { type: "string", description: "Exact community skill id or name to install" },
1735
+ scope: { type: "string", description: "Install scope (default: project)", enum: ["project", "user"] },
1736
+ activate: { type: "boolean", description: "Activate the installed skill for the current session (default: true)" }
1737
+ },
1738
+ required: ["name"]
1739
+ }
1740
+ },
1286
1741
  // Schedule Management
1742
+ {
1743
+ name: "cron_create",
1744
+ 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.",
1745
+ parameters: {
1746
+ type: "object",
1747
+ properties: {
1748
+ prompt: { type: "string", description: "The prompt/instruction to run on each schedule trigger" },
1749
+ interval: { type: "string", description: "Repeat interval shorthand like 5m, 2h, 1d, or 30s" },
1750
+ max_runs: { type: "number", description: "Optional maximum number of times to trigger before auto-cancel" },
1751
+ expires_in: { type: "string", description: "Optional expiry duration shorthand like 7d, 2h, or 30m" }
1752
+ },
1753
+ required: ["prompt", "interval"]
1754
+ }
1755
+ },
1756
+ {
1757
+ name: "cron_delete",
1758
+ description: "Cancel an active recurring scheduled job by its ID.",
1759
+ parameters: {
1760
+ type: "object",
1761
+ properties: {
1762
+ schedule_id: { type: "string", description: "The job ID to cancel" }
1763
+ },
1764
+ required: ["schedule_id"]
1765
+ }
1766
+ },
1287
1767
  {
1288
1768
  name: "list_schedules",
1289
1769
  description: "List all active recurring scheduled jobs. Returns job IDs, prompts, intervals, run counts, and expiry times."
@@ -1298,11 +1778,235 @@ Actions:
1298
1778
  },
1299
1779
  required: ["schedule_id"]
1300
1780
  }
1781
+ },
1782
+ // ── Directory Access ──
1783
+ {
1784
+ name: "request_directory_access",
1785
+ 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.",
1786
+ parameters: {
1787
+ type: "object",
1788
+ properties: {
1789
+ path: { type: "string", description: "The directory path to request access to (absolute or relative to cwd)" },
1790
+ reason: { type: "string", description: "Optional reason why access is needed (shown to user in interactive mode)" }
1791
+ },
1792
+ required: ["path"]
1793
+ },
1794
+ requiresApproval: false
1795
+ // This tool handles its own approval flow
1796
+ },
1797
+ // ── Code review ──
1798
+ {
1799
+ name: "code_review",
1800
+ 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.",
1801
+ parameters: {
1802
+ type: "object",
1803
+ properties: {
1804
+ path: { type: "string", description: "File or directory to review. Defaults to workspace root." },
1805
+ scope: {
1806
+ type: "string",
1807
+ description: 'Review scope: "full" analyzes the entire path, "diff" reviews only uncommitted changes, "file" reviews a single file.',
1808
+ enum: ["full", "diff", "file"]
1809
+ },
1810
+ instructions: { type: "string", description: 'Additional review focus areas from the user (e.g., "focus on error handling", "check for memory leaks").' }
1811
+ }
1812
+ }
1813
+ },
1814
+ // ── Browser tools (available when Chrome extension is connected via /chrome) ──
1815
+ {
1816
+ name: "browser_screenshot",
1817
+ 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.",
1818
+ parameters: {
1819
+ type: "object",
1820
+ properties: {
1821
+ format: { type: "string", description: "Image format", enum: ["png", "jpeg"] },
1822
+ quality: { type: "number", description: "JPEG quality 0-100 (default: 80)" }
1823
+ }
1824
+ }
1825
+ },
1826
+ {
1827
+ name: "browser_click",
1828
+ 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.",
1829
+ parameters: {
1830
+ type: "object",
1831
+ properties: {
1832
+ selector: { type: "string", description: "CSS selector of the element to click" }
1833
+ },
1834
+ required: ["selector"]
1835
+ }
1836
+ },
1837
+ {
1838
+ name: "browser_type",
1839
+ description: "Type text into an input, textarea, or contenteditable element on the current browser page. Only available when the Chrome extension is connected.",
1840
+ parameters: {
1841
+ type: "object",
1842
+ properties: {
1843
+ selector: { type: "string", description: "CSS selector of the input element" },
1844
+ text: { type: "string", description: "Text to type" },
1845
+ clear: { type: "boolean", description: "Clear the field before typing (default: false)" }
1846
+ },
1847
+ required: ["selector", "text"]
1848
+ }
1849
+ },
1850
+ {
1851
+ name: "browser_navigate",
1852
+ description: "Navigate the active Chrome browser tab to a URL. Only available when the Chrome extension is connected.",
1853
+ parameters: {
1854
+ type: "object",
1855
+ properties: {
1856
+ url: { type: "string", description: "URL to navigate to" }
1857
+ },
1858
+ required: ["url"]
1859
+ }
1860
+ },
1861
+ {
1862
+ name: "browser_scroll",
1863
+ description: "Scroll the browser page in a direction, or scroll a specific element into view. Only available when the Chrome extension is connected.",
1864
+ parameters: {
1865
+ type: "object",
1866
+ properties: {
1867
+ direction: { type: "string", description: "Scroll direction", enum: ["up", "down", "left", "right"] },
1868
+ amount: { type: "number", description: "Pixels to scroll (default: 500)" },
1869
+ selector: { type: "string", description: "CSS selector to scroll into view (overrides direction)" }
1870
+ }
1871
+ }
1872
+ },
1873
+ {
1874
+ name: "browser_find_element",
1875
+ 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.",
1876
+ parameters: {
1877
+ type: "object",
1878
+ properties: {
1879
+ selector: { type: "string", description: "CSS selector to match" },
1880
+ text: { type: "string", description: "Text content to search for" },
1881
+ role: { type: "string", description: "ARIA role to match" }
1882
+ }
1883
+ }
1884
+ },
1885
+ {
1886
+ name: "browser_press_key",
1887
+ 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.",
1888
+ parameters: {
1889
+ type: "object",
1890
+ properties: {
1891
+ key: { type: "string", description: "Key name (e.g. Enter, Escape, Tab, a, 1)" },
1892
+ ctrl: { type: "string", description: "Hold Ctrl (true/false)", enum: ["true", "false"] },
1893
+ shift: { type: "string", description: "Hold Shift (true/false)", enum: ["true", "false"] },
1894
+ alt: { type: "string", description: "Hold Alt (true/false)", enum: ["true", "false"] },
1895
+ meta: { type: "string", description: "Hold Cmd/Meta (true/false)", enum: ["true", "false"] }
1896
+ },
1897
+ required: ["key"]
1898
+ }
1899
+ },
1900
+ {
1901
+ name: "browser_get_page_context",
1902
+ description: "Extract the current browser page title, URL, headings, metadata, and body text content. Only available when the Chrome extension is connected.",
1903
+ parameters: {
1904
+ type: "object",
1905
+ properties: {
1906
+ max_chars: { type: "number", description: "Max body text characters (default: 7000, max: 12000)" }
1907
+ }
1908
+ }
1909
+ },
1910
+ {
1911
+ name: "browser_get_element",
1912
+ 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.",
1913
+ parameters: {
1914
+ type: "object",
1915
+ properties: {
1916
+ selector: { type: "string", description: "CSS selector of the element" }
1917
+ },
1918
+ required: ["selector"]
1919
+ }
1920
+ },
1921
+ {
1922
+ name: "browser_wait_for_element",
1923
+ description: "Wait for an element matching a CSS selector to appear on the current browser page. Only available when the Chrome extension is connected.",
1924
+ parameters: {
1925
+ type: "object",
1926
+ properties: {
1927
+ selector: { type: "string", description: "CSS selector to wait for" },
1928
+ timeout: { type: "number", description: "Max wait time in ms (default: 5000)" }
1929
+ },
1930
+ required: ["selector"]
1931
+ }
1932
+ },
1933
+ {
1934
+ name: "browser_read_network",
1935
+ 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.",
1936
+ parameters: {
1937
+ type: "object",
1938
+ properties: {
1939
+ urlPattern: { type: "string", description: "Filter requests by URL substring" },
1940
+ method: { type: "string", description: "Filter by HTTP method (GET, POST, etc.)" },
1941
+ status: { type: "string", description: 'Filter by status code prefix (e.g. "4" for 4xx errors)' },
1942
+ limit: { type: "number", description: "Max requests to return (default: 50)" }
1943
+ }
1944
+ }
1945
+ },
1946
+ {
1947
+ name: "browser_get_tabs",
1948
+ description: "List all open browser tabs with their titles, URLs, and tab group IDs. Only available when the Chrome extension is connected."
1949
+ },
1950
+ {
1951
+ name: "browser_get_tab_groups",
1952
+ description: "List all tab groups with their titles, colors, and member tabs. Only available when the Chrome extension is connected."
1953
+ },
1954
+ {
1955
+ name: "browser_execute_js",
1956
+ 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.",
1957
+ parameters: {
1958
+ type: "object",
1959
+ properties: {
1960
+ code: { type: "string", description: "JavaScript code to execute in the page context. Use return statements for values." }
1961
+ },
1962
+ required: ["code"]
1963
+ }
1964
+ },
1965
+ {
1966
+ name: "browser_read_console",
1967
+ 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.",
1968
+ parameters: {
1969
+ type: "object",
1970
+ properties: {
1971
+ level: { type: "string", description: "Filter by level", enum: ["error", "warn", "log", "info", "debug"] },
1972
+ limit: { type: "number", description: "Max messages to return (default: 50)" }
1973
+ }
1974
+ }
1301
1975
  }
1302
1976
  ];
1303
- var ToolManager = class _ToolManager {
1304
- constructor(options) {
1305
- this.definitions = /* @__PURE__ */ new Map();
1977
+ var PLAN_TOOL_DEFINITION = {
1978
+ name: "plan",
1979
+ 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.',
1980
+ parameters: {
1981
+ type: "object",
1982
+ properties: {
1983
+ notes: {
1984
+ type: "string",
1985
+ 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.'
1986
+ }
1987
+ }
1988
+ }
1989
+ };
1990
+ var EXIT_PLAN_MODE_TOOL_DEFINITION = {
1991
+ name: "exit_plan_mode",
1992
+ 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.",
1993
+ parameters: {
1994
+ type: "object",
1995
+ properties: {
1996
+ summary: {
1997
+ type: "string",
1998
+ description: "A brief summary of the plan you created, highlighting the key changes and approach."
1999
+ }
2000
+ }
2001
+ }
2002
+ };
2003
+ var ToolManager = (_class = class _ToolManager {
2004
+ __init() {this.definitions = /* @__PURE__ */ new Map()}
2005
+
2006
+
2007
+
2008
+
2009
+ constructor(options) {;_class.prototype.__init.call(this);
1306
2010
  this.executor = options.executor;
1307
2011
  this.confirmApproval = options.confirmApproval;
1308
2012
  this.toolFilter = new ToolFilter(_nullishCoalesce(options.clientContext, () => ( "cli")), options.customPolicy);
@@ -1315,6 +2019,13 @@ var ToolManager = class _ToolManager {
1315
2019
  register(definition) {
1316
2020
  this.definitions.set(definition.name, definition);
1317
2021
  }
2022
+ /**
2023
+ * Unregister a tool definition by name.
2024
+ * Used to dynamically remove tools (e.g. plan tool when plan mode is disabled).
2025
+ */
2026
+ unregister(name) {
2027
+ return this.definitions.delete(name);
2028
+ }
1318
2029
  /**
1319
2030
  * Register meta-tools from ToolsRegistry dynamically
1320
2031
  * Called during session initialization to load persisted tools
@@ -1441,7 +2152,7 @@ var ToolManager = class _ToolManager {
1441
2152
  }
1442
2153
  async execute(toolCalls, onToolComplete) {
1443
2154
  const results = /* @__PURE__ */ new Map();
1444
- const planModeManager = _chunkULQ6MDSJcjs.getPlanModeManager.call(void 0, );
2155
+ const planModeManager = _chunkLFDPTJYFcjs.getPlanModeManager.call(void 0, );
1445
2156
  const isInPlanningPhase = planModeManager.isEnabled() && planModeManager.getPhase() === "planning";
1446
2157
  const readOnlyTools = isInPlanningPhase ? new Set(planModeManager.getReadOnlyTools()) : null;
1447
2158
  const readyToExecute = [];
@@ -1454,7 +2165,7 @@ var ToolManager = class _ToolManager {
1454
2165
  error: `Tool '${call.tool}' is not available in the current context (${this.toolFilter.getContext()})`
1455
2166
  };
1456
2167
  results.set(i, result);
1457
- _optionalChain([onToolComplete, 'optionalCall', _14 => _14(i, result)]);
2168
+ _optionalChain([onToolComplete, 'optionalCall', _16 => _16(i, result)]);
1458
2169
  continue;
1459
2170
  }
1460
2171
  if (readOnlyTools && !readOnlyTools.has(call.tool)) {
@@ -1464,13 +2175,13 @@ var ToolManager = class _ToolManager {
1464
2175
  error: `Tool '${call.tool}' is not available in plan mode. Only read-only tools are allowed during planning. Use 'plan' tool to create a plan, then accept it to execute write operations.`
1465
2176
  };
1466
2177
  results.set(i, result);
1467
- _optionalChain([onToolComplete, 'optionalCall', _15 => _15(i, result)]);
2178
+ _optionalChain([onToolComplete, 'optionalCall', _17 => _17(i, result)]);
1468
2179
  continue;
1469
2180
  }
1470
2181
  const definition = this.definitions.get(call.tool);
1471
- const requiresApproval = this.toolFilter.requiresApproval(call.tool, _optionalChain([definition, 'optionalAccess', _16 => _16.requiresApproval]));
2182
+ const requiresApproval = this.toolFilter.requiresApproval(call.tool, _optionalChain([definition, 'optionalAccess', _18 => _18.requiresApproval]));
1472
2183
  if (requiresApproval) {
1473
- let message = _nullishCoalesce(_optionalChain([definition, 'optionalAccess', _17 => _17.approvalMessage]), () => ( `Allow tool ${call.tool}?`));
2184
+ let message = _nullishCoalesce(_optionalChain([definition, 'optionalAccess', _19 => _19.approvalMessage]), () => ( `Allow tool ${call.tool}?`));
1474
2185
  const permContext = { tool: call.tool };
1475
2186
  if (call.tool === "run_command" && call.args) {
1476
2187
  const cmd = String(call.args.command || "");
@@ -1480,38 +2191,67 @@ var ToolManager = class _ToolManager {
1480
2191
  message = `Run this command${dir}?
1481
2192
  $ ${fullCommand}`;
1482
2193
  permContext.command = fullCommand;
1483
- } else if (call.tool === "delete_path" && _optionalChain([call, 'access', _18 => _18.args, 'optionalAccess', _19 => _19.path])) {
2194
+ } else if (call.tool === "shell" && call.args) {
2195
+ const cmd = String(call.args.command || "");
2196
+ const args = Array.isArray(call.args.args) ? call.args.args.join(" ") : "";
2197
+ const fullCommand = args ? `${cmd} ${args}` : cmd;
2198
+ const dir = call.args.directory ? ` (in ${call.args.directory})` : "";
2199
+ message = `Run this shell command with live output${dir}?
2200
+ $ ${fullCommand}`;
2201
+ permContext.command = fullCommand;
2202
+ } else if (call.tool === "delete_path" && _optionalChain([call, 'access', _20 => _20.args, 'optionalAccess', _21 => _21.path])) {
1484
2203
  message = `Delete this path?
1485
2204
  ${call.args.path}`;
1486
2205
  permContext.path = String(call.args.path);
1487
- } else if (call.tool === "write_file" && _optionalChain([call, 'access', _20 => _20.args, 'optionalAccess', _21 => _21.path])) {
2206
+ } else if (call.tool === "write_file" && _optionalChain([call, 'access', _22 => _22.args, 'optionalAccess', _23 => _23.path])) {
1488
2207
  message = `Write to this file?
1489
2208
  ${call.args.path}`;
1490
2209
  permContext.path = String(call.args.path);
1491
- } else if (call.tool === "multi_file_edit" && _optionalChain([call, 'access', _22 => _22.args, 'optionalAccess', _23 => _23.file_path])) {
2210
+ } else if (call.tool === "multi_file_edit" && _optionalChain([call, 'access', _24 => _24.args, 'optionalAccess', _25 => _25.file_path])) {
1492
2211
  const editCount = Array.isArray(call.args.edits) ? call.args.edits.length : 0;
1493
2212
  message = `Edit this file (${editCount} change${editCount === 1 ? "" : "s"})?
1494
2213
  ${call.args.file_path}`;
1495
2214
  permContext.path = String(call.args.file_path);
1496
2215
  }
1497
- const confirmed = await this.confirmApproval(message, permContext);
1498
- if (!confirmed) {
2216
+ const decision = normalizePermissionPromptResponse(await this.confirmApproval(message, permContext));
2217
+ if (decision.decision === "alternative" && typeof decision.alternative === "string") {
2218
+ if (call.tool === "run_command" && call.args) {
2219
+ call.args.command = decision.alternative;
2220
+ call.args.args = [];
2221
+ } else if (call.tool === "shell" && call.args) {
2222
+ call.args.command = decision.alternative;
2223
+ call.args.args = [];
2224
+ } else if (_optionalChain([call, 'access', _26 => _26.args, 'optionalAccess', _27 => _27.path]) && typeof call.args.path === "string") {
2225
+ call.args.path = decision.alternative;
2226
+ } else if (_optionalChain([call, 'access', _28 => _28.args, 'optionalAccess', _29 => _29.file_path]) && typeof call.args.file_path === "string") {
2227
+ call.args.file_path = decision.alternative;
2228
+ } else {
2229
+ const result = {
2230
+ tool: call.tool,
2231
+ success: false,
2232
+ output: "Tool execution skipped because the alternative input could not be applied."
2233
+ };
2234
+ results.set(i, result);
2235
+ _optionalChain([onToolComplete, 'optionalCall', _30 => _30(i, result)]);
2236
+ continue;
2237
+ }
2238
+ }
2239
+ if (!isAllowedPermissionPrompt(decision)) {
1499
2240
  const result = {
1500
2241
  tool: call.tool,
1501
2242
  success: false,
1502
2243
  output: "Tool execution skipped by user."
1503
2244
  };
1504
2245
  results.set(i, result);
1505
- _optionalChain([onToolComplete, 'optionalCall', _24 => _24(i, result)]);
2246
+ _optionalChain([onToolComplete, 'optionalCall', _31 => _31(i, result)]);
1506
2247
  continue;
1507
2248
  }
1508
2249
  }
1509
2250
  readyToExecute.push({ call, index: i });
1510
2251
  }
1511
2252
  if (readyToExecute.length > 0) {
1512
- const execResults = await this.executeWithConcurrency(
2253
+ const execResults = await this.executeScheduled(
1513
2254
  readyToExecute,
1514
- this.maxConcurrency,
1515
2255
  onToolComplete
1516
2256
  );
1517
2257
  for (const [index, result] of execResults) {
@@ -1520,6 +2260,51 @@ var ToolManager = class _ToolManager {
1520
2260
  }
1521
2261
  return toolCalls.map((_, i) => results.get(i));
1522
2262
  }
2263
+ /**
2264
+ * Execute approved calls in model order while preserving safe parallelism.
2265
+ *
2266
+ * Read-only batches can run concurrently. Mutating tools are ordering
2267
+ * barriers because they may affect following reads or other writes.
2268
+ */
2269
+ async executeScheduled(tasks, onToolComplete) {
2270
+ const results = /* @__PURE__ */ new Map();
2271
+ let parallelBatch = [];
2272
+ const mergeResults = (batchResults) => {
2273
+ for (const [index, result] of batchResults) {
2274
+ results.set(index, result);
2275
+ }
2276
+ };
2277
+ const flushParallelBatch = async () => {
2278
+ if (parallelBatch.length === 0) {
2279
+ return;
2280
+ }
2281
+ const batchResults = await this.executeWithConcurrency(
2282
+ parallelBatch,
2283
+ this.maxConcurrency,
2284
+ onToolComplete
2285
+ );
2286
+ mergeResults(batchResults);
2287
+ parallelBatch = [];
2288
+ };
2289
+ for (const task of tasks) {
2290
+ if (!this.shouldExecuteSequentially(task.call)) {
2291
+ parallelBatch.push(task);
2292
+ continue;
2293
+ }
2294
+ await flushParallelBatch();
2295
+ const sequentialResult = await this.executeWithConcurrency(
2296
+ [task],
2297
+ 1,
2298
+ onToolComplete
2299
+ );
2300
+ mergeResults(sequentialResult);
2301
+ }
2302
+ await flushParallelBatch();
2303
+ return results;
2304
+ }
2305
+ shouldExecuteSequentially(call) {
2306
+ return SEQUENTIAL_TOOL_CATEGORIES.has(getToolCategory(call.tool));
2307
+ }
1523
2308
  /**
1524
2309
  * Execute tool calls with a concurrency limit using a worker-pool pattern.
1525
2310
  */
@@ -1533,7 +2318,11 @@ var ToolManager = class _ToolManager {
1533
2318
  let result;
1534
2319
  try {
1535
2320
  const action = this.toAction(call);
1536
- const output = await this.executor(action, { toolCallId: call.id, tool: call.tool });
2321
+ const output = await this.executor(action, {
2322
+ toolCallId: call.id,
2323
+ tool: call.tool,
2324
+ approvalHandled: true
2325
+ });
1537
2326
  result = { tool: call.tool, success: true, output };
1538
2327
  } catch (error) {
1539
2328
  result = {
@@ -1543,7 +2332,7 @@ var ToolManager = class _ToolManager {
1543
2332
  };
1544
2333
  }
1545
2334
  results.set(index, result);
1546
- _optionalChain([onToolComplete, 'optionalCall', _25 => _25(index, result)]);
2335
+ _optionalChain([onToolComplete, 'optionalCall', _32 => _32(index, result)]);
1547
2336
  }
1548
2337
  };
1549
2338
  const workers = Array.from(
@@ -1559,22 +2348,29 @@ var ToolManager = class _ToolManager {
1559
2348
  ..._nullishCoalesce(call.args, () => ( {}))
1560
2349
  };
1561
2350
  }
1562
- };
2351
+ }, _class);
1563
2352
 
1564
2353
  // src/core/agents/AgentDelegator.ts
1565
2354
 
1566
2355
  var DEFAULT_MAX_DEPTH = 3;
1567
- var AgentDelegator = class {
1568
- constructor(llm, actionExecutor, options = {}) {
2356
+ var AgentDelegator = (_class2 = class {
2357
+ constructor(llm, actionExecutor, options = {}) {;_class2.prototype.__init2.call(this);
1569
2358
  this.llm = llm;
1570
2359
  this.actionExecutor = actionExecutor;
1571
- this.subagentCounter = 0;
1572
- this.registry = _chunkBVKXEQVGcjs.AgentRegistry.getInstance();
2360
+ this.registry = _chunkMOJ7ADW4cjs.AgentRegistry.getInstance();
1573
2361
  this.clientContext = _nullishCoalesce(options.clientContext, () => ( "cli"));
1574
2362
  this.currentDepth = _nullishCoalesce(options.currentDepth, () => ( 0));
1575
2363
  this.maxDepth = _nullishCoalesce(options.maxDepth, () => ( DEFAULT_MAX_DEPTH));
1576
2364
  this.onSubagentStop = options.onSubagentStop;
1577
2365
  }
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+ __init2() {this.subagentCounter = 0}
1578
2374
  generateSubagentId() {
1579
2375
  return `subagent-${Date.now()}-${++this.subagentCounter}`;
1580
2376
  }
@@ -1686,7 +2482,7 @@ ${result}`;
1686
2482
  canDelegate() {
1687
2483
  return this.currentDepth < this.maxDepth;
1688
2484
  }
1689
- };
2485
+ }, _class2);
1690
2486
 
1691
2487
  // src/core/agents/SubAgent.ts
1692
2488
  var DELEGATION_TOOL_DEFINITIONS = [
@@ -1714,17 +2510,16 @@ var DELEGATION_TOOL_DEFINITIONS = [
1714
2510
  }
1715
2511
  }
1716
2512
  ];
1717
- var SubAgent = class {
1718
- constructor(config, llm, actionExecutor, options) {
2513
+ var SubAgent = (_class3 = class {
2514
+ constructor(config, llm, actionExecutor, options) {;_class3.prototype.__init3.call(this);
1719
2515
  this.config = config;
1720
2516
  this.llm = llm;
1721
2517
  this.actionExecutor = actionExecutor;
1722
- this.delegator = null;
1723
2518
  this.name = config.name;
1724
2519
  this.options = options;
1725
2520
  const canDelegate = options.depth < options.maxDepth;
1726
2521
  const allowedTools = new Set(config.tools);
1727
- let definitions = DEFAULT_TOOL_DEFINITIONS.filter((def) => allowedTools.has(def.name));
2522
+ let definitions = allowedTools.has("*") ? [...DEFAULT_TOOL_DEFINITIONS] : DEFAULT_TOOL_DEFINITIONS.filter((def) => allowedTools.has(def.name));
1728
2523
  if (canDelegate) {
1729
2524
  definitions = [...definitions, ...DELEGATION_TOOL_DEFINITIONS];
1730
2525
  }
@@ -1758,9 +2553,17 @@ var SubAgent = class {
1758
2553
  maxConcurrency: scaledConcurrency
1759
2554
  });
1760
2555
  const enhancedSystemPrompt = this.buildSystemPrompt(config.systemPrompt, definitions);
1761
- this.conversation = new (0, _chunkCNBKZEX5cjs.ConversationManager)();
2556
+ this.conversation = new (0, _chunkDA7NBAJKcjs.ConversationManager)();
1762
2557
  this.conversation.reset(enhancedSystemPrompt);
1763
2558
  }
2559
+
2560
+
2561
+
2562
+
2563
+
2564
+ __init3() {this.delegator = null}
2565
+
2566
+
1764
2567
  /**
1765
2568
  * Build system prompt with tool signatures for the LLM
1766
2569
  */
@@ -1795,8 +2598,8 @@ var SubAgent = class {
1795
2598
  * Format a tool definition as a signature string
1796
2599
  */
1797
2600
  formatToolSignature(def) {
1798
- const params = _optionalChain([def, 'access', _26 => _26.parameters, 'optionalAccess', _27 => _27.properties]) ? Object.entries(def.parameters.properties).map(([name, prop]) => {
1799
- const required = _optionalChain([def, 'access', _28 => _28.parameters, 'optionalAccess', _29 => _29.required, 'optionalAccess', _30 => _30.includes, 'call', _31 => _31(name)]) ? "" : "?";
2601
+ const params = _optionalChain([def, 'access', _33 => _33.parameters, 'optionalAccess', _34 => _34.properties]) ? Object.entries(def.parameters.properties).map(([name, prop]) => {
2602
+ const required = _optionalChain([def, 'access', _35 => _35.parameters, 'optionalAccess', _36 => _36.required, 'optionalAccess', _37 => _37.includes, 'call', _38 => _38(name)]) ? "" : "?";
1800
2603
  return `${name}${required}: ${prop.type}`;
1801
2604
  }).join(", ") : "";
1802
2605
  return `- ${def.name}(${params}): ${def.description}`;
@@ -1816,7 +2619,7 @@ var SubAgent = class {
1816
2619
  toolChoice: tools.length > 0 ? "auto" : void 0
1817
2620
  });
1818
2621
  const payload = this.parseResponse(completion);
1819
- if (_optionalChain([completion, 'access', _32 => _32.toolCalls, 'optionalAccess', _33 => _33.length])) {
2622
+ if (_optionalChain([completion, 'access', _39 => _39.toolCalls, 'optionalAccess', _40 => _40.length])) {
1820
2623
  this.conversation.addMessage({
1821
2624
  role: "assistant",
1822
2625
  content: completion.content || ""
@@ -1831,13 +2634,13 @@ var SubAgent = class {
1831
2634
  const results = await this.toolManager.execute(payload.toolCalls);
1832
2635
  for (let j = 0; j < results.length; j++) {
1833
2636
  const result = results[j];
1834
- const toolCall = _optionalChain([completion, 'access', _34 => _34.toolCalls, 'optionalAccess', _35 => _35[j]]);
2637
+ const toolCall = _optionalChain([completion, 'access', _41 => _41.toolCalls, 'optionalAccess', _42 => _42[j]]);
1835
2638
  const content = result.success ? _nullishCoalesce(result.output, () => ( "(no output)")) : _nullishCoalesce(result.error, () => ( "Tool failed"));
1836
2639
  this.conversation.addMessage({
1837
2640
  role: "tool",
1838
2641
  name: result.tool,
1839
2642
  content,
1840
- tool_call_id: _optionalChain([toolCall, 'optionalAccess', _36 => _36.id])
2643
+ tool_call_id: _optionalChain([toolCall, 'optionalAccess', _43 => _43.id])
1841
2644
  });
1842
2645
  if (!result.success) {
1843
2646
  console.log(_chalk2.default.red(`[${this.name}] Tool ${result.tool} failed: ${content}`));
@@ -1920,7 +2723,8 @@ var SubAgent = class {
1920
2723
  }
1921
2724
  return void 0;
1922
2725
  }
1923
- };
2726
+ }, _class3);
2727
+
1924
2728
 
1925
2729
 
1926
2730
 
@@ -1929,14 +2733,21 @@ var SubAgent = class {
1929
2733
 
1930
2734
 
1931
2735
 
1932
- exports.createToolFilter = createToolFilter; exports.filterToolsByRelevance = filterToolsByRelevance; exports.DEFAULT_TOOL_DEFINITIONS = DEFAULT_TOOL_DEFINITIONS; exports.ToolManager = ToolManager; exports.SubAgent = SubAgent; exports.AgentDelegator = AgentDelegator;
2736
+
2737
+
2738
+
2739
+
2740
+ exports.normalizePermissionPromptResponse = normalizePermissionPromptResponse; exports.isAllowedPermissionPrompt = isAllowedPermissionPrompt; exports.createToolFilter = createToolFilter; exports.filterToolsByRelevance = filterToolsByRelevance; exports.formatToolCapabilityCatalog = formatToolCapabilityCatalog; exports.DEFAULT_TOOL_DEFINITIONS = DEFAULT_TOOL_DEFINITIONS; exports.PLAN_TOOL_DEFINITION = PLAN_TOOL_DEFINITION; exports.EXIT_PLAN_MODE_TOOL_DEFINITION = EXIT_PLAN_MODE_TOOL_DEFINITION; exports.ToolManager = ToolManager; exports.SubAgent = SubAgent; exports.AgentDelegator = AgentDelegator;
2741
+ /**
2742
+ * Permission System Types
2743
+ * @license Apache-2.0
2744
+ */
1933
2745
  /**
1934
2746
  * @license
1935
2747
  * Copyright 2025 Autohand AI LLC
1936
2748
  * SPDX-License-Identifier: Apache-2.0
1937
2749
  *
1938
2750
  * Tool filtering based on client context and risk categories
1939
- * Inspired by Claude Code's permission model
1940
2751
  */
1941
2752
  /**
1942
2753
  * @license