autohand-cli 0.8.2 → 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 (551) hide show
  1. package/README.md +173 -74
  2. package/dist/AgentRegistry-EGBDIUAK.cjs +10 -0
  3. package/dist/{AgentRegistry-7LDL5HJH.js → AgentRegistry-XPWSVO3Q.js} +3 -3
  4. package/dist/{AutomodeManager-MWLKGPZK.js → AutomodeManager-APLLPEYJ.js} +32 -18
  5. package/dist/{AutomodeManager-NYIZNODK.cjs → AutomodeManager-MPSXT2RH.cjs} +38 -24
  6. package/dist/CommunitySkillsCache-2OIUV227.cjs +8 -0
  7. package/dist/CommunitySkillsCache-ZEQWP6YM.js +8 -0
  8. package/dist/GitHubRegistryFetcher-CYJLF2XL.cjs +7 -0
  9. package/dist/{GitHubRegistryFetcher-6JQ5JEDZ.js → GitHubRegistryFetcher-J2BWPXJF.js} +2 -2
  10. package/dist/HookManager-CWLTFKWO.js +7 -0
  11. package/dist/HookManager-TMAJQU4S.cjs +7 -0
  12. package/dist/{ImportWizard-35YBJ4AM.cjs → ImportWizard-MQXEED2U.cjs} +41 -17
  13. package/dist/{ImportWizard-XH7CINCH.js → ImportWizard-QBKQEXDW.js} +35 -11
  14. package/dist/LearnAdvisor-46FG2XIP.js +9 -0
  15. package/dist/LearnAdvisor-XBRDNAGH.cjs +9 -0
  16. package/dist/McpClientManager-BNSKLHIN.cjs +8 -0
  17. package/dist/{McpClientManager-7RM6YT35.js → McpClientManager-SL35BR24.js} +2 -2
  18. package/dist/MemoryManager-34L4YOKA.cjs +8 -0
  19. package/dist/MemoryManager-WJMLPWGU.js +8 -0
  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-ATUV34LQ.js → PermissionManager-KMYILJ4Z.js} +4 -4
  24. package/dist/{ProjectProfiler-ZDWR2ODG.cjs → ProjectProfiler-CDAE7ECW.cjs} +2 -1
  25. package/dist/{ProjectProfiler-UMJJSOCE.js → ProjectProfiler-NZTJDRHD.js} +2 -1
  26. package/dist/ProviderFactory-C3YPXTDD.cjs +11 -0
  27. package/dist/ProviderFactory-HFPRVQ25.js +11 -0
  28. package/dist/SessionManager-PNBTJJTQ.js +10 -0
  29. package/dist/SessionManager-WAPTFMDO.cjs +10 -0
  30. package/dist/SkillsRegistry-4RRD5GMX.js +9 -0
  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-LVIO4C2S.js → SyncApiClient-LRPFNCKJ.js} +2 -2
  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-VFX7QT4E.js +11 -0
  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-6TGBTEQD.js → autoSkill-EFMK6WU6.js} +3 -3
  57. package/dist/autoSkill-YOLLFTP2.cjs +20 -0
  58. package/dist/automode-BMYSRM34.js +10 -0
  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/{cc-7LEIJ3KF.js → cc-AYEP2CA3.js} +1 -1
  63. package/dist/{cc-Q5MM4AWC.cjs → cc-S2QLQFBR.cjs} +1 -1
  64. package/dist/chrome-ATC4OO5I.cjs +20 -0
  65. package/dist/chrome-NHJ44WUN.js +50 -0
  66. package/dist/chrome-O62WXV7F.js +20 -0
  67. package/dist/chrome-XHJLCO4M.cjs +50 -0
  68. package/dist/chromeSkill-53TH55PM.js +105 -0
  69. package/dist/chromeSkill-THW7N4IY.cjs +105 -0
  70. package/dist/{chunk-HOAHWIQ5.cjs → chunk-2CGE7ZV3.cjs} +26 -26
  71. package/dist/chunk-2H5O745H.js +63 -0
  72. package/dist/chunk-2HOLOHVK.js +2219 -0
  73. package/dist/{chunk-3PDTTAKJ.js → chunk-2QL6MNXG.js} +15 -8
  74. package/dist/{chunk-PGRH5Q77.cjs → chunk-2VHB43IX.cjs} +35 -6
  75. package/dist/{chunk-VG34MG2U.js → chunk-37M5UM6I.js} +9 -6
  76. package/dist/{chunk-6HYLHBQG.cjs → chunk-3DDL2E55.cjs} +20 -16
  77. package/dist/chunk-3EDDDZS2.cjs +5 -0
  78. package/dist/{chunk-6OYHF6MF.js → chunk-3GUEUCZK.js} +28 -4
  79. package/dist/{chunk-N254NRHT.cjs → chunk-3HT76LNN.cjs} +9 -2
  80. package/dist/{chunk-DVUHHH3B.cjs → chunk-3KLSNNRW.cjs} +4 -4
  81. package/dist/chunk-3LJJG5YY.cjs +387 -0
  82. package/dist/chunk-3OF56EMA.cjs +197 -0
  83. package/dist/chunk-3PXKRVCW.js +108 -0
  84. package/dist/{chunk-IKGWDOGU.cjs → chunk-3S563FNF.cjs} +160 -79
  85. package/dist/chunk-3UT7R3XV.js +663 -0
  86. package/dist/chunk-4256YRCO.cjs +80 -0
  87. package/dist/chunk-46C73ZKK.cjs +663 -0
  88. package/dist/chunk-46MTALKD.js +44 -0
  89. package/dist/{chunk-AEJH23FO.cjs → chunk-47PHDKNW.cjs} +6 -6
  90. package/dist/chunk-4LMUDS2K.js +124 -0
  91. package/dist/{chunk-HLHTG5ZU.cjs → chunk-5CMYEM3R.cjs} +14 -12
  92. package/dist/{chunk-MBBY4ZIK.js → chunk-5F6ZKSHO.js} +4 -1
  93. package/dist/chunk-5JFTY3VU.js +74 -0
  94. package/dist/chunk-5JTTM5SC.js +59 -0
  95. package/dist/{chunk-IETRBBMP.cjs → chunk-5K3CDSWZ.cjs} +108 -31
  96. package/dist/{chunk-GJH7XMSK.js → chunk-5VHP6HDQ.js} +8 -6
  97. package/dist/{chunk-6ZCULLCA.js → chunk-62RTC3XX.js} +1 -1
  98. package/dist/{chunk-MSED7RH2.cjs → chunk-6GUODJKM.cjs} +112 -41
  99. package/dist/{chunk-47CKWKEX.cjs → chunk-6HH236FV.cjs} +9 -4
  100. package/dist/{chunk-WHE2SWHU.js → chunk-6NVAK6CK.js} +2 -2
  101. package/dist/chunk-6R25D2H5.js +121 -0
  102. package/dist/{chunk-3PCTTUNW.cjs → chunk-6XVVIY54.cjs} +55 -25
  103. package/dist/{chunk-3L53OA4E.cjs → chunk-75EDROHL.cjs} +10 -10
  104. package/dist/{chunk-G4CAKI3V.js → chunk-7HPWMALN.js} +7 -2
  105. package/dist/chunk-7JLT2VNW.cjs +18963 -0
  106. package/dist/chunk-7LWQCE4Y.cjs +987 -0
  107. package/dist/{chunk-OLSBBZW6.cjs → chunk-7MU7LWF3.cjs} +5 -5
  108. package/dist/{chunk-HLQV64Y5.js → chunk-7RFJB75Y.js} +140 -59
  109. package/dist/{chunk-X2MSVKDV.js → chunk-A7HHCIDQ.js} +2 -2
  110. package/dist/{chunk-SKYG33B2.cjs → chunk-AC7DZ6SK.cjs} +3 -3
  111. package/dist/{chunk-XX2ZO7DS.js → chunk-ACDQGA4Z.js} +90 -16
  112. package/dist/{chunk-CZXGCVTR.cjs → chunk-AOKCI722.cjs} +2 -2
  113. package/dist/chunk-ARBEHFCG.js +715 -0
  114. package/dist/{chunk-OOKY3HPZ.js → chunk-AT7OWLY5.js} +50 -9
  115. package/dist/chunk-AU6JAGZJ.cjs +231 -0
  116. package/dist/chunk-AUFNACED.js +18963 -0
  117. package/dist/{chunk-CDBPBM2K.cjs → chunk-AUYSIEVV.cjs} +3 -3
  118. package/dist/chunk-B4HSNOIH.cjs +354 -0
  119. package/dist/{chunk-EGMZDTSL.js → chunk-B5CGDNMR.js} +10 -2
  120. package/dist/{chunk-34M3HWLR.js → chunk-BFQDQRDE.js} +2 -2
  121. package/dist/{chunk-2AA5MFES.js → chunk-BL2UC7HC.js} +8 -5
  122. package/dist/{chunk-LNMYK2F5.cjs → chunk-BQ22N3TX.cjs} +56 -41
  123. package/dist/chunk-BQU3HAE7.js +21 -0
  124. package/dist/chunk-BWF4VDYE.js +3897 -0
  125. package/dist/chunk-BYE7RQFZ.cjs +121 -0
  126. package/dist/{chunk-APIXPPMT.js → chunk-CBFH2J3O.js} +855 -33
  127. package/dist/chunk-CCVMREXI.js +420 -0
  128. package/dist/chunk-CFAWTLSC.js +13 -0
  129. package/dist/{chunk-G27PQQFD.js → chunk-CFFE4VA3.js} +1 -1
  130. package/dist/{chunk-ZYQMLKOK.cjs → chunk-CH2J4PVE.cjs} +212 -70
  131. package/dist/{chunk-7BTSG4ME.cjs → chunk-CHI52KFR.cjs} +855 -33
  132. package/dist/{chunk-DJDE4DTT.cjs → chunk-CWINVFRI.cjs} +25 -19
  133. package/dist/{chunk-HXGBSJL5.cjs → chunk-D2OSPLYC.cjs} +2 -2
  134. package/dist/{chunk-GBHDROGL.js → chunk-D6GZBSOX.js} +16 -4
  135. package/dist/{chunk-CNBKZEX5.cjs → chunk-DA7NBAJK.cjs} +49 -17
  136. package/dist/chunk-DEQVRSV5.cjs +866 -0
  137. package/dist/{chunk-RGR6ME5J.cjs → chunk-DI57A4BX.cjs} +25 -28
  138. package/dist/{chunk-WM5PAOTQ.cjs → chunk-DIZTWFVR.cjs} +1649 -484
  139. package/dist/{chunk-YZXUDM5X.js → chunk-DLP436GI.js} +204 -62
  140. package/dist/{chunk-OHUZKDGX.js → chunk-DMRXF5DU.js} +3 -3
  141. package/dist/{chunk-U46VYPLR.cjs → chunk-DPSIGY6L.cjs} +9 -9
  142. package/dist/{chunk-DN573ME7.cjs → chunk-DRWDEHE5.cjs} +4 -4
  143. package/dist/{chunk-SEKD5FH3.cjs → chunk-E26KKI46.cjs} +5 -2
  144. package/dist/{chunk-J4Q7XR3G.js → chunk-E46DJH5S.js} +3 -3
  145. package/dist/{chunk-Q7XSCYND.cjs → chunk-E6GFD7VR.cjs} +49 -26
  146. package/dist/chunk-ES2HJQ4N.js +37 -0
  147. package/dist/chunk-EZJHLOWP.js +80 -0
  148. package/dist/chunk-FFBDRUO5.cjs +59 -0
  149. package/dist/{chunk-AYSFIUFW.js → chunk-FGT6KK6T.js} +38 -15
  150. package/dist/{chunk-SAHBLB3E.js → chunk-FP46B4X3.js} +208 -3
  151. package/dist/{chunk-DSPQEHDT.js → chunk-FQAVGSPW.js} +2 -2
  152. package/dist/chunk-FQVG6ZHF.js +197 -0
  153. package/dist/chunk-GBMDFWJX.cjs +152 -0
  154. package/dist/{chunk-DRE2RXBZ.js → chunk-GGLKUENP.js} +1605 -440
  155. package/dist/{chunk-S52YW5ZQ.js → chunk-GNBBIAMD.js} +16 -19
  156. package/dist/{chunk-MYISNQH4.js → chunk-GWO66KBI.js} +1 -1
  157. package/dist/chunk-GWY26SUD.cjs +63 -0
  158. package/dist/{chunk-YGN4CQIP.js → chunk-GZ6DV2UG.js} +1 -1
  159. package/dist/{chunk-EZMINVLU.js → chunk-H4D2Q2AL.js} +5 -2
  160. package/dist/chunk-HDK2EHVH.cjs +570 -0
  161. package/dist/chunk-HJIXWGQZ.js +139 -0
  162. package/dist/{chunk-6RF7UKUS.js → chunk-HKYZSUQ5.js} +48 -47
  163. package/dist/{chunk-LQGVEP3E.js → chunk-HQUSEWT4.js} +45 -13
  164. package/dist/{chunk-HTLINWX6.cjs → chunk-HQWQZML5.cjs} +16 -13
  165. package/dist/{chunk-DVZOENQ7.cjs → chunk-HS4USDND.cjs} +9 -4
  166. package/dist/chunk-HSCUPEA4.cjs +3897 -0
  167. package/dist/{chunk-JCLYQ2JC.js → chunk-HXJEGMGB.js} +12 -6
  168. package/dist/{chunk-LJFUXC56.cjs → chunk-HXQREVTA.cjs} +9 -6
  169. package/dist/{chunk-SCXX4LW5.js → chunk-I24CWKKK.js} +15 -8
  170. package/dist/chunk-IAGCRVJ3.js +355 -0
  171. package/dist/chunk-IEXKKKOF.cjs +92 -0
  172. package/dist/{chunk-5IXII4HX.cjs → chunk-IGMPWJ2I.cjs} +19 -12
  173. package/dist/chunk-IKUMVBCW.cjs +33 -0
  174. package/dist/{chunk-XTB6VJVQ.cjs → chunk-J2K57QM7.cjs} +6 -6
  175. package/dist/{chunk-O4IF4NJT.cjs → chunk-J5ADZN6V.cjs} +57 -56
  176. package/dist/chunk-J5HE6CUM.cjs +124 -0
  177. package/dist/{chunk-JS7IPR7P.js → chunk-JAQO6XDB.js} +31 -2
  178. package/dist/chunk-JIMSII7R.js +987 -0
  179. package/dist/chunk-JJ4KA7HK.cjs +2219 -0
  180. package/dist/chunk-JMN3GZU6.js +570 -0
  181. package/dist/{chunk-X5VSP65C.cjs → chunk-JP3YHTQ2.cjs} +4 -4
  182. package/dist/{chunk-SKV2F3NM.js → chunk-JYKPWK5O.js} +1 -1
  183. package/dist/{chunk-NNPAM4HC.cjs → chunk-KNTUI4TZ.cjs} +12 -6
  184. package/dist/{chunk-HIVRCQS2.js → chunk-L4F7SUYL.js} +56 -25
  185. package/dist/{chunk-C5IJIM2V.cjs → chunk-LDJQ5QHG.cjs} +68 -37
  186. package/dist/{chunk-ULQ6MDSJ.cjs → chunk-LFDPTJYF.cjs} +43 -35
  187. package/dist/chunk-LJD7KR3L.cjs +44 -0
  188. package/dist/chunk-LN7D3EJZ.js +387 -0
  189. package/dist/{chunk-643VRA5S.cjs → chunk-LQBONA55.cjs} +32 -8
  190. package/dist/{chunk-NCC6ETZS.js → chunk-LUMV3DB2.js} +41 -33
  191. package/dist/chunk-M4KNC5BQ.js +78 -0
  192. package/dist/chunk-MO4KP6XS.cjs +229 -0
  193. package/dist/{chunk-BVKXEQVG.cjs → chunk-MOJ7ADW4.cjs} +22 -10
  194. package/dist/chunk-MPULXVC4.cjs +715 -0
  195. package/dist/{chunk-X5YJ34FZ.cjs → chunk-MQESBFBZ.cjs} +46 -23
  196. package/dist/chunk-MUNUUFU7.cjs +21 -0
  197. package/dist/{chunk-X3WS5LDG.js → chunk-MX75JYIY.js} +7 -5
  198. package/dist/chunk-MXVIDIC6.cjs +139 -0
  199. package/dist/{chunk-3K2ESU53.cjs → chunk-N6O3XUZ2.cjs} +2 -2
  200. package/dist/{chunk-IVM5F2AE.js → chunk-NBGOIFKP.js} +265 -18
  201. package/dist/{chunk-SLQAYV3W.js → chunk-NMQ47RCG.js} +8 -2
  202. package/dist/{chunk-JYTDYJVW.js → chunk-O64I2GYI.js} +1 -1
  203. package/dist/{chunk-IFFXSTOM.cjs → chunk-O6TQP7U7.cjs} +3 -3
  204. package/dist/{chunk-AYS2ASM7.js → chunk-OHWMWKJQ.js} +1 -1
  205. package/dist/{chunk-N23UAW4I.js → chunk-OM24WXEE.js} +7 -2
  206. package/dist/{chunk-MAKMSQMQ.cjs → chunk-OPNI6O7F.cjs} +8 -6
  207. package/dist/chunk-OR67YXQK.cjs +13 -0
  208. package/dist/{chunk-QOXPOR5D.js → chunk-OV3PVUYN.js} +115 -44
  209. package/dist/{chunk-TNZRZQ7Q.js → chunk-PB7W7R72.js} +3 -78
  210. package/dist/chunk-PCM3N3CL.cjs +37 -0
  211. package/dist/{chunk-A4IJHHV7.cjs → chunk-PDHT7LQS.cjs} +52 -11
  212. package/dist/{chunk-LA7H35XM.cjs → chunk-PHJO5YAL.cjs} +9 -9
  213. package/dist/{chunk-KPELYZ6L.js → chunk-PQLKJCIE.js} +2 -2
  214. package/dist/chunk-PUD76XQT.cjs +78 -0
  215. package/dist/chunk-Q2IL4DDI.cjs +355 -0
  216. package/dist/{chunk-WPVWQSL7.cjs → chunk-Q6AC3PHY.cjs} +16 -13
  217. package/dist/{chunk-XRZEUWKF.js → chunk-QCHIDZBA.js} +1 -1
  218. package/dist/{chunk-IQ5RXU6O.js → chunk-QEGOB6QV.js} +1 -1
  219. package/dist/{chunk-JSBRDJBE.js → chunk-QGM4M3NI.js} +8 -1
  220. package/dist/chunk-QKP772OZ.js +4291 -0
  221. package/dist/chunk-QQ7PANOP.js +59 -0
  222. package/dist/{chunk-YHD6TUIR.cjs → chunk-QW2RW2GY.cjs} +2 -0
  223. package/dist/chunk-RAKO7UN7.js +114 -0
  224. package/dist/chunk-RBHANOYY.js +33 -0
  225. package/dist/chunk-RBZ7AFX7.cjs +29 -0
  226. package/dist/{chunk-TXSDBGKX.cjs → chunk-REMGR23V.cjs} +46 -49
  227. package/dist/chunk-ROLA6EFO.cjs +85 -0
  228. package/dist/{chunk-TBEGGJNC.cjs → chunk-SOLBYSLY.cjs} +33 -16
  229. package/dist/{chunk-FKSDEWDH.js → chunk-SWCQM52V.js} +68 -25
  230. package/dist/{chunk-H5SWOLG6.js → chunk-TBOLJDUG.js} +39 -24
  231. package/dist/chunk-TH26BQJG.js +101 -0
  232. package/dist/{chunk-245KJE5Y.cjs → chunk-TJNBASFD.cjs} +14 -6
  233. package/dist/chunk-TKKN34TV.js +229 -0
  234. package/dist/chunk-TQ33WBY5.cjs +74 -0
  235. package/dist/{chunk-EGFT4PGW.js → chunk-TWQDAUZU.js} +5 -2
  236. package/dist/{chunk-OGV4WJ5L.cjs → chunk-TXPSTCG7.cjs} +74 -59
  237. package/dist/{chunk-CAMZTXV6.js → chunk-U4C3HW6P.js} +67 -52
  238. package/dist/{chunk-5P2NXKP3.js → chunk-UEIXJG45.js} +104 -76
  239. package/dist/{chunk-22D2CNTP.cjs → chunk-UGFVM77J.cjs} +5 -2
  240. package/dist/chunk-UOQECODR.js +34 -0
  241. package/dist/chunk-UR27UDTB.js +354 -0
  242. package/dist/chunk-UWFG2R2I.cjs +420 -0
  243. package/dist/{chunk-Y72HH2TF.cjs → chunk-UXLW45ZE.cjs} +102 -28
  244. package/dist/{chunk-FPHU2ES6.cjs → chunk-VBOFPU5M.cjs} +6 -0
  245. package/dist/{chunk-JX3DFKBI.js → chunk-VDWJMWDF.js} +54 -24
  246. package/dist/{chunk-LENHP55G.cjs → chunk-VGEV44V2.cjs} +1076 -158
  247. package/dist/{chunk-33RSHBDH.js → chunk-VKBIE6I6.js} +38 -7
  248. package/dist/{chunk-CWMZKFTT.js → chunk-VRMZO6TB.js} +31 -8
  249. package/dist/chunk-VUGOOGHB.js +400 -0
  250. package/dist/chunk-WBU4Q4GS.cjs +400 -0
  251. package/dist/chunk-WGLBC5AY.cjs +59 -0
  252. package/dist/{chunk-KWXVKLQ5.cjs → chunk-WGNMOVMT.cjs} +7 -82
  253. package/dist/{chunk-RKJTGGMU.cjs → chunk-WKRDBCP2.cjs} +221 -16
  254. package/dist/chunk-WRTXCQ3V.cjs +4291 -0
  255. package/dist/chunk-WTB7AFL6.cjs +101 -0
  256. package/dist/{chunk-NDMIPTV4.js → chunk-WZV6UVPY.js} +8 -3
  257. package/dist/chunk-XF2WIKHR.cjs +34 -0
  258. package/dist/{chunk-L3WAH3EM.cjs → chunk-XGMI6IYB.cjs} +46 -15
  259. package/dist/{chunk-FW774QXH.js → chunk-XIVFAD2L.js} +1048 -130
  260. package/dist/chunk-XV2HXRHX.js +85 -0
  261. package/dist/{chunk-72FKPBT5.js → chunk-Y3M2DABP.js} +16 -12
  262. package/dist/{chunk-QNGEW5TC.js → chunk-YV63VW4K.js} +1 -1
  263. package/dist/{chunk-UJ2JSM6H.js → chunk-YVQI26H4.js} +2 -0
  264. package/dist/{chunk-RD5XAJR2.cjs → chunk-YWTIXHU6.cjs} +266 -19
  265. package/dist/chunk-YZWE7XSM.js +5 -0
  266. package/dist/{chunk-I5IW3T2Y.js → chunk-Z3XSSF7B.js} +32 -15
  267. package/dist/{chunk-6UJMCWRY.js → chunk-Z4LIPMPM.js} +6 -0
  268. package/dist/chunk-ZASDSY7P.cjs +114 -0
  269. package/dist/{chunk-R33VKSH5.cjs → chunk-ZHJ7JGME.cjs} +11 -11
  270. package/dist/chunk-ZPD2AO3U.js +866 -0
  271. package/dist/{chunk-7UOUW76C.js → chunk-ZQAT5VT5.js} +101 -24
  272. package/dist/chunk-ZR46OJNZ.js +152 -0
  273. package/dist/{chunk-G3V4SFET.cjs → chunk-ZZ63NW7A.cjs} +78 -35
  274. package/dist/clear-33TWQ2ES.cjs +12 -0
  275. package/dist/clear-OFLFQ3MR.js +12 -0
  276. package/dist/{communityInstaller-6KCFN7YZ.js → communityInstaller-COB2KTOW.js} +9 -6
  277. package/dist/communityInstaller-TWMGPSYM.cjs +22 -0
  278. package/dist/completion-IIZMHXYP.cjs +17 -0
  279. package/dist/completion-PT4VM2H2.js +17 -0
  280. package/dist/config-KL6WU7R2.cjs +20 -0
  281. package/dist/{config-ZN66VXPS.js → config-R4O7GBTY.js} +7 -5
  282. package/dist/{constants-UFM5B232.js → constants-HVCHVQAF.js} +2 -2
  283. package/dist/constants-RLMJ5D5P.cjs +21 -0
  284. package/dist/{defaultHooks-RCXPHF4M.cjs → defaultHooks-2V2CQL63.cjs} +26 -11
  285. package/dist/{defaultHooks-RDRMER3Z.js → defaultHooks-TMHDU3FS.js} +26 -11
  286. package/dist/export-3PK3VFCE.js +15 -0
  287. package/dist/export-WLGNWEMJ.cjs +15 -0
  288. package/dist/{extractSessionMemories-V7K42ZHW.js → extractSessionMemories-A2JX5WJ2.js} +1 -1
  289. package/dist/{extractSessionMemories-SDW2MVBQ.cjs → extractSessionMemories-XL3MS37F.cjs} +1 -1
  290. package/dist/feedback-G635NCLJ.js +18 -0
  291. package/dist/feedback-LLMK3TZH.cjs +18 -0
  292. package/dist/fffSearchProvider-2YCNKOYD.js +412 -0
  293. package/dist/fffSearchProvider-W6627E2V.cjs +412 -0
  294. package/dist/filesystem-L6DQKGWK.js +11 -0
  295. package/dist/filesystem-PGUPCMVK.cjs +11 -0
  296. package/dist/{formatters-6K7QVWQL.cjs → formatters-53XTCNGQ.cjs} +1 -1
  297. package/dist/{formatters-DQHO5I36.js → formatters-T6KV4BPP.js} +1 -1
  298. package/dist/help-BAXLP2M2.cjs +12 -0
  299. package/dist/{help-2BLR7L43.js → help-X3OAZ3CY.js} +3 -3
  300. package/dist/history-6HOJSEMT.cjs +14 -0
  301. package/dist/{history-5FZ3M2AK.js → history-YKFPHBJN.js} +3 -3
  302. package/dist/hooks-7TA4PIIB.js +18 -0
  303. package/dist/hooks-XVFU67T2.cjs +18 -0
  304. package/dist/{i18n-K7QOWIBH.js → i18n-2KBUU7XL.js} +2 -2
  305. package/dist/i18n-MUJMKTFM.cjs +33 -0
  306. package/dist/ide-CCQ33PGC.cjs +15 -0
  307. package/dist/ide-VLVFBZ5F.js +15 -0
  308. package/dist/immediateCommandRouter-MTEHZXQX.js +15 -0
  309. package/dist/immediateCommandRouter-ROXU3MWT.cjs +15 -0
  310. package/dist/{import-UXM3VK7B.js → import-4CHYLS4K.js} +4 -4
  311. package/dist/{import-QEME3E4T.cjs → import-I7T4ZHYL.cjs} +4 -4
  312. package/dist/import-J46F54JY.cjs +10 -0
  313. package/dist/import-JWPYKXCZ.js +10 -0
  314. package/dist/index.cjs +747 -22356
  315. package/dist/index.d.cts +93 -0
  316. package/dist/index.d.ts +93 -0
  317. package/dist/index.js +786 -22395
  318. package/dist/init-262MWZV4.js +10 -0
  319. package/dist/init-EE5Y7RBL.cjs +10 -0
  320. package/dist/inkMode-VUE6ZDLD.cjs +7 -0
  321. package/dist/inkMode-WBNFOSAT.js +7 -0
  322. package/dist/inputPrompt-IIFKCX5Q.cjs +90 -0
  323. package/dist/inputPrompt-YGBHDUEP.js +90 -0
  324. package/dist/language-CVLPB7OV.js +21 -0
  325. package/dist/language-ZTWFHUSV.cjs +21 -0
  326. package/dist/learn-PON7I5QS.js +23 -0
  327. package/dist/learn-XLRSVNA3.cjs +23 -0
  328. package/dist/{lint-D5UOJWIK.cjs → lint-4NDGCSCL.cjs} +1 -1
  329. package/dist/{lint-NJPZWVN2.js → lint-FZ7ZJUB3.js} +1 -1
  330. package/dist/login-223QTGBG.cjs +26 -0
  331. package/dist/login-6IKTBUBY.js +26 -0
  332. package/dist/logout-RN2AG6SI.js +23 -0
  333. package/dist/logout-U3M4FFX7.cjs +23 -0
  334. package/dist/mcp-5O6PUL4G.js +20 -0
  335. package/dist/mcp-NUQ76QQB.cjs +20 -0
  336. package/dist/{mcp-install-VESN42PI.js → mcp-install-6XWXLFVY.js} +18 -11
  337. package/dist/{mcp-install-G27HSS3Z.cjs → mcp-install-P6DHES7V.cjs} +22 -15
  338. package/dist/memory-CYMDQ2YC.cjs +10 -0
  339. package/dist/memory-Q54CESNM.js +10 -0
  340. package/dist/{message-ZJ5AYAMT.cjs → message-4OKO775J.cjs} +1 -1
  341. package/dist/{message-JUBOK2VU.js → message-X3LOAAM7.js} +1 -1
  342. package/dist/model-6AJ77PJG.js +10 -0
  343. package/dist/model-IDRCKDML.cjs +10 -0
  344. package/dist/new-7LEWOUF2.cjs +12 -0
  345. package/dist/new-ZXHEWC2S.js +12 -0
  346. package/dist/onboarding-FXX7YHSJ.cjs +35 -0
  347. package/dist/onboarding-JYNMK6NI.js +35 -0
  348. package/dist/{patch-MOD7QC3D.cjs → patch-DJ2GPFST.cjs} +1 -1
  349. package/dist/{patch-5F6VBIT3.js → patch-NIJWIRHS.js} +1 -1
  350. package/dist/permissions-YBNSANIA.cjs +10 -0
  351. package/dist/permissions-YHJMVA6L.js +10 -0
  352. package/dist/plan-XEJMOT55.cjs +13 -0
  353. package/dist/plan-YYUAXPTL.js +13 -0
  354. package/dist/pr-review-CW6J7P62.cjs +9 -0
  355. package/dist/pr-review-YZSBQVT2.js +9 -0
  356. package/dist/quit-B43SJ6E4.cjs +10 -0
  357. package/dist/quit-GWTNHQSP.js +10 -0
  358. package/dist/rawMode-6W5AXAKI.cjs +7 -0
  359. package/dist/rawMode-GFNLXQPU.js +7 -0
  360. package/dist/{registry-KWZGYJC2.js → registry-34GL6BNJ.js} +30 -45
  361. package/dist/{registry-YN4FQPOO.cjs → registry-V24W7YK6.cjs} +66 -81
  362. package/dist/repeat-P4FAPE3Y.cjs +17 -0
  363. package/dist/repeat-RALE6AUO.js +17 -0
  364. package/dist/resume-DYVOQN5L.cjs +16 -0
  365. package/dist/resume-M25UQKOX.js +16 -0
  366. package/dist/review-QHP2KP4Q.js +9 -0
  367. package/dist/review-UWHWQHCB.cjs +9 -0
  368. package/dist/ripgrep-67SCU2BA.cjs +9 -0
  369. package/dist/ripgrep-VHJQQ55W.js +9 -0
  370. package/dist/rpc-NPS3PU4O.cjs +3730 -0
  371. package/dist/rpc-S3DGW6KV.js +3730 -0
  372. package/dist/search-CPX4PWHP.js +20 -0
  373. package/dist/search-VUF3M4N3.cjs +20 -0
  374. package/dist/{session-BSU2L5UI.cjs → session-LXKC4X5Q.cjs} +1 -1
  375. package/dist/{session-SZMRN5KG.js → session-NMMO4QOL.js} +1 -1
  376. package/dist/sessions-IYAXMK23.js +10 -0
  377. package/dist/sessions-JODKER5D.cjs +10 -0
  378. package/dist/settings-55BNW6BF.js +33 -0
  379. package/dist/settings-BKTS7OMC.cjs +33 -0
  380. package/dist/setup-IRC5HQG2.js +29 -0
  381. package/dist/setup-MMQ7TWOP.cjs +29 -0
  382. package/dist/share-6JRQECAH.cjs +17 -0
  383. package/dist/share-YM5MJKMO.js +17 -0
  384. package/dist/{skills-FYY6F2WV.cjs → skills-GGMZOVIE.cjs} +14 -11
  385. package/dist/skills-LWSOKOSH.cjs +29 -0
  386. package/dist/{skills-6OL4OSGA.js → skills-MVIZNHT4.js} +13 -10
  387. package/dist/skills-VWOMV3CR.js +29 -0
  388. package/dist/{skills-install-6CSWC24P.js → skills-install-QBA5RCV6.js} +22 -71
  389. package/dist/{skills-install-O3LZ2ETC.cjs → skills-install-VTAMCNNY.cjs} +35 -84
  390. package/dist/skills-new-GPL46YV2.js +18 -0
  391. package/dist/skills-new-L5BEZN5V.cjs +18 -0
  392. package/dist/slashCommands-FBPCIWM5.cjs +95 -0
  393. package/dist/slashCommands-FCWY5DXW.js +95 -0
  394. package/dist/status-3B5SDZPL.js +17 -0
  395. package/dist/status-TTGRF6NC.cjs +17 -0
  396. package/dist/summarizer-DGPHE5IQ.js +17 -0
  397. package/dist/summarizer-JNXLUAQG.cjs +17 -0
  398. package/dist/sync-77CXVVTK.cjs +21 -0
  399. package/dist/{sync-KWX67OUN.js → sync-7BILIQHP.js} +4 -4
  400. package/dist/sync-7OKF6636.js +21 -0
  401. package/dist/sync-EH4K5U3N.cjs +40 -0
  402. package/dist/{tasks-5FPBIFLC.js → tasks-R5MBGAQ6.js} +1 -1
  403. package/dist/{tasks-TXGKGNH6.cjs → tasks-V4WB3MFR.cjs} +1 -1
  404. package/dist/{team-5YXP3JGR.js → team-JESCHGWB.js} +1 -1
  405. package/dist/{team-IIWEZKNR.cjs → team-VQQKWGZB.cjs} +1 -1
  406. package/dist/{teammate-L6EZQ3I2.js → teammate-GZQSCIMS.js} +29 -8
  407. package/dist/{teammate-2KMKJXAM.cjs → teammate-J6PHGL23.cjs} +30 -9
  408. package/dist/theme-64BYGJ57.cjs +21 -0
  409. package/dist/theme-YJE6HEON.js +21 -0
  410. package/dist/tools-3PPTTKFV.js +9 -0
  411. package/dist/tools-THIQA7WC.cjs +9 -0
  412. package/dist/ui/questionModal.cjs +9 -6
  413. package/dist/ui/questionModal.js +8 -5
  414. package/dist/undo-PRTEGL2J.cjs +10 -0
  415. package/dist/undo-SZEHLX7X.js +10 -0
  416. package/dist/{update-TVAJMMBC.js → update-53WMKYVS.js} +1 -1
  417. package/dist/{update-Z6BIIQDC.cjs → update-NV6QRYY7.cjs} +1 -1
  418. package/dist/web-3BA2WV37.cjs +37 -0
  419. package/dist/web-6FYGBX5K.js +37 -0
  420. package/dist/workspaceSafety-MDJGHK6D.cjs +9 -0
  421. package/dist/workspaceSafety-XOUMUBVB.js +9 -0
  422. package/dist/yolo-GF2YD7ZI.js +9 -0
  423. package/dist/yolo-OGDA7HNC.cjs +9 -0
  424. package/dist/yoloMode-3DJDA75U.cjs +17 -0
  425. package/dist/yoloMode-4JOOSU26.js +17 -0
  426. package/package.json +46 -49
  427. package/dist/AgentRegistry-NQCLWABO.cjs +0 -10
  428. package/dist/CommunitySkillsCache-6QPRMTJO.js +0 -8
  429. package/dist/CommunitySkillsCache-GTQMOCCO.cjs +0 -8
  430. package/dist/GitHubRegistryFetcher-S7QFUEKV.cjs +0 -7
  431. package/dist/HookManager-Q2KYMCP4.cjs +0 -7
  432. package/dist/HookManager-TTP4Y6DC.js +0 -7
  433. package/dist/LearnAdvisor-A4Q5PPBI.js +0 -9
  434. package/dist/LearnAdvisor-GASQD7HT.cjs +0 -9
  435. package/dist/McpClientManager-RKD7C6OY.cjs +0 -8
  436. package/dist/MemoryManager-GUNLRP5S.js +0 -8
  437. package/dist/MemoryManager-TNSGKDKX.cjs +0 -8
  438. package/dist/PermissionManager-KMN53FJP.cjs +0 -11
  439. package/dist/ProviderFactory-MR5B23QJ.js +0 -9
  440. package/dist/ProviderFactory-VFGCJJX6.cjs +0 -9
  441. package/dist/SessionManager-FEUAU3ZJ.cjs +0 -10
  442. package/dist/SessionManager-IKWAK2PI.js +0 -10
  443. package/dist/SkillsRegistry-KPQFTRIT.cjs +0 -9
  444. package/dist/SkillsRegistry-XJSKPDF2.js +0 -9
  445. package/dist/SubAgent-NYH6GWQ3.js +0 -11
  446. package/dist/SubAgent-PZKBDUBA.cjs +0 -11
  447. package/dist/SyncApiClient-ZNYMT36M.cjs +0 -11
  448. package/dist/about-HHTF2YFL.js +0 -12
  449. package/dist/about-JGRVNNQC.cjs +0 -12
  450. package/dist/actionExecutor-U6IBN2TU.cjs +0 -19
  451. package/dist/actionExecutor-XT5FW3W6.js +0 -19
  452. package/dist/add-dir-247K3XRY.js +0 -10
  453. package/dist/add-dir-GS4DXKKH.cjs +0 -10
  454. package/dist/agents-R6ZEFTVR.cjs +0 -12
  455. package/dist/agents-WJPQWQF2.js +0 -12
  456. package/dist/agents-new-HKVEIBDJ.js +0 -14
  457. package/dist/agents-new-X6GTHIO6.cjs +0 -14
  458. package/dist/autoSkill-H4T6VVDA.cjs +0 -20
  459. package/dist/automode-BC6NVECO.js +0 -10
  460. package/dist/automode-WN2RSOGW.cjs +0 -10
  461. package/dist/chunk-33A755XB.cjs +0 -168
  462. package/dist/chunk-3OTU3RS3.cjs +0 -1607
  463. package/dist/chunk-4PKF7WPD.js +0 -100
  464. package/dist/chunk-ALYU6VTM.js +0 -105
  465. package/dist/chunk-AS6RTLN7.cjs +0 -203
  466. package/dist/chunk-BWN2CLLM.cjs +0 -298
  467. package/dist/chunk-HQ7YZKXE.js +0 -168
  468. package/dist/chunk-HVKOZ2VP.cjs +0 -115
  469. package/dist/chunk-J6QET7EF.cjs +0 -454
  470. package/dist/chunk-LWUJFGOZ.js +0 -115
  471. package/dist/chunk-P47WPOXN.js +0 -298
  472. package/dist/chunk-PRRCJFU3.cjs +0 -85
  473. package/dist/chunk-RO6WYEWH.js +0 -454
  474. package/dist/chunk-SYVYLZZF.cjs +0 -24
  475. package/dist/chunk-T73IDKDF.js +0 -111
  476. package/dist/chunk-YRLYSQEQ.cjs +0 -105
  477. package/dist/chunk-ZQE72E6W.cjs +0 -100
  478. package/dist/chunk-ZVY2XD6T.js +0 -1607
  479. package/dist/clear-UO4MNWZW.cjs +0 -12
  480. package/dist/clear-ZJ5NYP6E.js +0 -12
  481. package/dist/communityInstaller-PVSOFDZD.cjs +0 -19
  482. package/dist/completion-MMF2PN2H.js +0 -14
  483. package/dist/completion-UI5WKHXI.cjs +0 -14
  484. package/dist/config-E7RINK4R.cjs +0 -18
  485. package/dist/constants-6CPCJ3DY.cjs +0 -21
  486. package/dist/export-N4XIVDSL.cjs +0 -12
  487. package/dist/export-W22L4D5C.js +0 -12
  488. package/dist/feedback-DR6ADSNE.cjs +0 -15
  489. package/dist/feedback-FEEAP4QW.js +0 -15
  490. package/dist/filesystem-3SGCW2BF.js +0 -10
  491. package/dist/filesystem-MCFXJQ6R.cjs +0 -10
  492. package/dist/help-AQHGTS7P.cjs +0 -12
  493. package/dist/history-NIUDRMKA.cjs +0 -14
  494. package/dist/hooks-2EY4IPKV.js +0 -13
  495. package/dist/hooks-LJVORRIG.cjs +0 -13
  496. package/dist/i18n-ARDG2SMC.cjs +0 -33
  497. package/dist/ide-GFW6IJHD.js +0 -12
  498. package/dist/ide-N2ZNSSB3.cjs +0 -12
  499. package/dist/import-DFVN3KNZ.js +0 -10
  500. package/dist/import-ZS6DPGU5.cjs +0 -10
  501. package/dist/init-PY75HA3S.cjs +0 -10
  502. package/dist/init-QNMWLAVY.js +0 -10
  503. package/dist/language-5UE4G2BT.cjs +0 -18
  504. package/dist/language-UXMHEZUJ.js +0 -18
  505. package/dist/learn-HJ3FLNZC.cjs +0 -20
  506. package/dist/learn-MVYS3RU5.js +0 -20
  507. package/dist/localProjectPermissions-N77HA3XK.js +0 -18
  508. package/dist/localProjectPermissions-UFSMNTBJ.cjs +0 -18
  509. package/dist/login-DSE7H63A.js +0 -20
  510. package/dist/login-V3MEWPKN.cjs +0 -20
  511. package/dist/logout-BMVCLKKW.js +0 -18
  512. package/dist/logout-XEG7FHOZ.cjs +0 -18
  513. package/dist/mcp-PYUR4PHO.js +0 -18
  514. package/dist/mcp-SG6JFLGC.cjs +0 -18
  515. package/dist/memory-4ZMMEZ2Z.js +0 -10
  516. package/dist/memory-QSGMVVGH.cjs +0 -10
  517. package/dist/model-NANLBZ4Z.cjs +0 -10
  518. package/dist/model-ZXNV4AF7.js +0 -10
  519. package/dist/new-5QJY5JP2.js +0 -12
  520. package/dist/new-PMMG55UX.cjs +0 -12
  521. package/dist/permissions-LECTCJ4H.cjs +0 -13
  522. package/dist/permissions-VP5VGIBL.js +0 -13
  523. package/dist/plan-G5CEKJI4.js +0 -11
  524. package/dist/plan-QKOHE3LH.cjs +0 -11
  525. package/dist/quit-BKOOPHU5.cjs +0 -10
  526. package/dist/quit-FVFNYACP.js +0 -10
  527. package/dist/resume-EXFQSQPH.js +0 -13
  528. package/dist/resume-PP2IQM5S.cjs +0 -13
  529. package/dist/search-C56FBN67.cjs +0 -17
  530. package/dist/search-XGZDYBF4.js +0 -17
  531. package/dist/sessions-54KI3F2Q.js +0 -10
  532. package/dist/sessions-DDTSPNVW.cjs +0 -10
  533. package/dist/settings-BDO37TTO.cjs +0 -30
  534. package/dist/settings-FHRDFPLK.js +0 -30
  535. package/dist/share-IERCTBGN.cjs +0 -14
  536. package/dist/share-TGROUE6R.js +0 -14
  537. package/dist/skills-OM4IGBAA.cjs +0 -26
  538. package/dist/skills-S3GRN323.js +0 -26
  539. package/dist/skills-new-ALD2PTHN.js +0 -15
  540. package/dist/skills-new-PWLKK7GW.cjs +0 -15
  541. package/dist/slashCommands-L4ZD33LJ.js +0 -75
  542. package/dist/slashCommands-YY2VUUDF.cjs +0 -75
  543. package/dist/status-3PC5XWSS.cjs +0 -11
  544. package/dist/status-KCLVOYPD.js +0 -11
  545. package/dist/sync-6SDWG5RK.js +0 -18
  546. package/dist/sync-7JMZVEQD.cjs +0 -40
  547. package/dist/sync-WHURZL3U.cjs +0 -18
  548. package/dist/theme-BE5A4FPN.cjs +0 -18
  549. package/dist/theme-YMFCQP7J.js +0 -18
  550. package/dist/undo-KZHUUZTD.cjs +0 -10
  551. package/dist/undo-NEIEHQVX.js +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,11 +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",
62
+ list_schedules: "meta",
63
+ cancel_schedule: "meta",
32
64
  // Read operations
33
65
  read_file: "read",
66
+ fff_find: "read",
67
+ fff_grep: "read",
68
+ find: "read",
69
+ glob: "read",
34
70
  search: "read",
35
71
  search_with_context: "read",
36
72
  semantic_search: "read",
@@ -41,6 +77,7 @@ var TOOL_CATEGORIES = {
41
77
  write_file: "write",
42
78
  append_file: "write",
43
79
  apply_patch: "write",
80
+ notebook_edit: "write",
44
81
  search_replace: "write",
45
82
  format_file: "write",
46
83
  multi_file_edit: "write",
@@ -52,6 +89,11 @@ var TOOL_CATEGORIES = {
52
89
  // Delete operations
53
90
  delete_path: "delete",
54
91
  remove_dependency: "delete",
92
+ package_info: "read",
93
+ // Web read operations
94
+ web_search: "read",
95
+ fetch_url: "read",
96
+ web_repo: "read",
55
97
  // Git read operations
56
98
  git_diff: "git_read",
57
99
  git_status: "git_read",
@@ -62,6 +104,7 @@ var TOOL_CATEGORIES = {
62
104
  git_log: "git_read",
63
105
  git_worktree_list: "git_read",
64
106
  git_worktree_status_all: "git_read",
107
+ project_tracker: "git_read",
65
108
  // Git write operations
66
109
  git_checkout: "git_write",
67
110
  git_apply_patch: "git_write",
@@ -94,7 +137,24 @@ var TOOL_CATEGORIES = {
94
137
  git_push: "git_write",
95
138
  // Shell operations
96
139
  run_command: "shell",
97
- 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"
98
158
  };
99
159
  var CONTEXT_POLICIES = {
100
160
  // CLI: Full access to everything
@@ -108,6 +168,8 @@ var CONTEXT_POLICIES = {
108
168
  blockedTools: [
109
169
  "list_tree",
110
170
  // Don't expose directory structure
171
+ "find",
172
+ // Don't allow broad searches
111
173
  "search",
112
174
  // Don't allow broad searches
113
175
  "search_with_context",
@@ -122,8 +184,10 @@ var CONTEXT_POLICIES = {
122
184
  // Don't expose file metadata
123
185
  "checksum",
124
186
  // Don't expose file checksums
125
- "ask_followup_question"
187
+ "ask_followup_question",
126
188
  // Requires interactive terminal
189
+ "project_tracker"
190
+ // Requires gh CLI binary
127
191
  ]
128
192
  },
129
193
  // API: Programmatic access with sensible defaults
@@ -150,14 +214,70 @@ var CONTEXT_POLICIES = {
150
214
  "git_rebase"
151
215
  ]
152
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
+ },
153
275
  // Restricted: Read-only mode
154
276
  restricted: {
155
277
  allowedCategories: ["read", "git_read", "meta"],
156
278
  blockedTools: [
157
279
  "list_tree",
158
- // Even in read mode, don't expose full structure
159
280
  "ask_followup_question"
160
- // Requires interactive terminal (may be running in restricted non-interactive mode)
161
281
  ]
162
282
  }
163
283
  };
@@ -165,21 +285,23 @@ function getToolCategory(toolName) {
165
285
  return _nullishCoalesce(TOOL_CATEGORIES[toolName], () => ( "meta"));
166
286
  }
167
287
  var ToolFilter = class {
288
+
289
+
168
290
  constructor(context = "cli", customPolicy) {
169
291
  this.context = context;
170
292
  const basePolicy = CONTEXT_POLICIES[context];
171
293
  this.policy = {
172
294
  ...basePolicy,
173
295
  ...customPolicy,
174
- allowedCategories: _nullishCoalesce(_optionalChain([customPolicy, 'optionalAccess', _ => _.allowedCategories]), () => ( basePolicy.allowedCategories)),
296
+ allowedCategories: _nullishCoalesce(_optionalChain([customPolicy, 'optionalAccess', _2 => _2.allowedCategories]), () => ( basePolicy.allowedCategories)),
175
297
  blockedTools: [
176
298
  ..._nullishCoalesce(basePolicy.blockedTools, () => ( [])),
177
- ..._nullishCoalesce(_optionalChain([customPolicy, 'optionalAccess', _2 => _2.blockedTools]), () => ( []))
299
+ ..._nullishCoalesce(_optionalChain([customPolicy, 'optionalAccess', _3 => _3.blockedTools]), () => ( []))
178
300
  ],
179
- allowedTools: _optionalChain([customPolicy, 'optionalAccess', _3 => _3.allowedTools]),
301
+ allowedTools: _optionalChain([customPolicy, 'optionalAccess', _4 => _4.allowedTools]),
180
302
  requireApprovalFor: [
181
303
  ..._nullishCoalesce(basePolicy.requireApprovalFor, () => ( [])),
182
- ..._nullishCoalesce(_optionalChain([customPolicy, 'optionalAccess', _4 => _4.requireApprovalFor]), () => ( []))
304
+ ..._nullishCoalesce(_optionalChain([customPolicy, 'optionalAccess', _5 => _5.requireApprovalFor]), () => ( []))
183
305
  ]
184
306
  };
185
307
  }
@@ -190,7 +312,7 @@ var ToolFilter = class {
190
312
  if (this.policy.allowedTools && this.policy.allowedTools.length > 0) {
191
313
  return this.policy.allowedTools.includes(toolName);
192
314
  }
193
- if (_optionalChain([this, 'access', _5 => _5.policy, 'access', _6 => _6.blockedTools, 'optionalAccess', _7 => _7.includes, 'call', _8 => _8(toolName)])) {
315
+ if (_optionalChain([this, 'access', _6 => _6.policy, 'access', _7 => _7.blockedTools, 'optionalAccess', _8 => _8.includes, 'call', _9 => _9(toolName)])) {
194
316
  return false;
195
317
  }
196
318
  const category = getToolCategory(toolName);
@@ -200,7 +322,7 @@ var ToolFilter = class {
200
322
  * Check if a tool requires approval (beyond its default setting)
201
323
  */
202
324
  requiresApproval(toolName, defaultRequiresApproval) {
203
- if (_optionalChain([this, 'access', _9 => _9.policy, 'access', _10 => _10.requireApprovalFor, 'optionalAccess', _11 => _11.includes, 'call', _12 => _12(toolName)])) {
325
+ if (_optionalChain([this, 'access', _10 => _10.policy, 'access', _11 => _11.requireApprovalFor, 'optionalAccess', _12 => _12.includes, 'call', _13 => _13(toolName)])) {
204
326
  return true;
205
327
  }
206
328
  return _nullishCoalesce(defaultRequiresApproval, () => ( false));
@@ -234,27 +356,41 @@ var ToolFilter = class {
234
356
  };
235
357
  }
236
358
  };
359
+ function createToolFilter(context = "cli", customPolicy) {
360
+ return new ToolFilter(context, customPolicy);
361
+ }
237
362
  var RELEVANCE_CATEGORIES = {
238
363
  // Always include
239
364
  read_file: "always",
240
- write_file: "always",
241
- search: "always",
242
- 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",
243
372
  plan: "always",
244
- run_command: "always",
373
+ exit_plan_mode: "always",
245
374
  todo_write: "always",
246
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",
247
384
  append_file: "filesystem",
248
- apply_patch: "filesystem",
385
+ apply_patch: "editing",
249
386
  create_directory: "filesystem",
250
387
  delete_path: "filesystem",
251
388
  rename_path: "filesystem",
252
389
  copy_path: "filesystem",
253
- search_replace: "filesystem",
254
- format_file: "filesystem",
255
- file_stats: "filesystem",
256
- checksum: "filesystem",
257
- multi_file_edit: "filesystem",
390
+ search_replace: "editing",
391
+ format_file: "editing",
392
+ multi_file_edit: "editing",
393
+ notebook_edit: "editing",
258
394
  search_with_context: "search",
259
395
  semantic_search: "search",
260
396
  // Basic git
@@ -271,7 +407,7 @@ var RELEVANCE_CATEGORIES = {
271
407
  git_apply_patch: "git_basic",
272
408
  git_fetch: "git_basic",
273
409
  git_pull: "git_basic",
274
- git_push: "git_basic",
410
+ git_push: "git_advanced",
275
411
  git_stash: "git_basic",
276
412
  git_stash_list: "git_basic",
277
413
  git_stash_pop: "git_basic",
@@ -300,32 +436,68 @@ var RELEVANCE_CATEGORIES = {
300
436
  // Dependencies
301
437
  add_dependency: "dependencies",
302
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",
303
463
  // Meta
304
- tools_registry: "meta",
305
464
  save_memory: "meta",
306
465
  recall_memory: "meta",
307
466
  smart_context_cropper: "meta",
308
467
  create_meta_tool: "meta",
309
- custom_command: "meta",
468
+ custom_command: "verification",
310
469
  delegate_task: "meta",
311
470
  delegate_parallel: "meta",
312
471
  create_team: "meta",
313
472
  add_teammate: "meta",
314
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",
315
481
  team_status: "meta",
316
482
  send_team_message: "meta",
317
- ask_followup_question: "always",
318
- // User interaction should always be available when in interactive mode
319
- find_agent_skills: "always"
320
- // Skill search should always be available so the LLM can explore community skills
483
+ cron_create: "meta",
484
+ cron_delete: "meta",
485
+ list_schedules: "meta",
486
+ cancel_schedule: "meta",
487
+ // Project tracking
488
+ project_tracker: "project_tracking"
321
489
  };
322
490
  var CATEGORY_TRIGGERS = {
323
491
  always: [],
324
- 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"],
325
494
  git_basic: ["git", "commit", "branch", "diff", "status", "stash", "pull", "push"],
326
- git_advanced: ["merge", "rebase", "cherry-pick", "worktree", "reset"],
327
- search: ["search", "find", "grep", "look for", "locate", "where is"],
328
- 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"],
329
501
  meta: [
330
502
  "tool",
331
503
  "delegate",
@@ -339,12 +511,67 @@ var CATEGORY_TRIGGERS = {
339
511
  "engineers",
340
512
  "crew",
341
513
  "collaborate"
342
- ]
514
+ ],
515
+ project_tracking: ["issue", "issues", "pr", "pull request", "assigned", "tracker", "bug", "feature request", "milestone", "review"]
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"
343
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
+ }
344
571
  function detectRelevantCategories(messages) {
345
572
  const categories = /* @__PURE__ */ new Set(["always"]);
346
573
  const recentMessages = messages.slice(-8);
347
- const recentText = recentMessages.map((m) => _nullishCoalesce(m.content, () => ( ""))).join(" ").toLowerCase();
574
+ const recentText = getRecentSelectionText(messages);
348
575
  for (const [category, triggers] of Object.entries(CATEGORY_TRIGGERS)) {
349
576
  if (triggers.some((trigger) => recentText.includes(trigger))) {
350
577
  categories.add(category);
@@ -368,31 +595,62 @@ function detectRelevantCategories(messages) {
368
595
  }
369
596
  return categories;
370
597
  }
371
- 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
+ }
372
605
  const relevantCategories = detectRelevantCategories(messages);
373
- return tools.filter((tool) => {
606
+ const recentText = getRecentSelectionText(messages);
607
+ const selected = tools.filter((tool) => {
374
608
  const category = RELEVANCE_CATEGORIES[tool.name];
375
- return !category || relevantCategories.has(category);
609
+ if (category && relevantCategories.has(category)) {
610
+ return true;
611
+ }
612
+ return matchesToolByText(tool, recentText);
376
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");
377
629
  }
378
630
 
379
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
+ ]);
380
639
  var DEFAULT_TOOL_DEFINITIONS = [
381
640
  {
382
641
  name: "tools_registry",
383
642
  description: "List all available tools (built-in and meta)"
384
643
  },
385
644
  {
386
- name: "plan",
387
- 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.",
388
647
  parameters: {
389
648
  type: "object",
390
649
  properties: {
391
- notes: {
392
- type: "string",
393
- 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.'
394
- }
395
- }
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"]
396
654
  }
397
655
  },
398
656
  {
@@ -438,6 +696,22 @@ var DEFAULT_TOOL_DEFINITIONS = [
438
696
  required: ["path", "contents"]
439
697
  }
440
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
+ },
441
715
  {
442
716
  name: "append_file",
443
717
  description: "Append text to a file",
@@ -463,41 +737,31 @@ var DEFAULT_TOOL_DEFINITIONS = [
463
737
  }
464
738
  },
465
739
  {
466
- name: "search",
467
- description: "Search workspace text",
468
- parameters: {
469
- type: "object",
470
- properties: {
471
- query: { type: "string", description: "Text to search for" },
472
- path: { type: "string", description: "Optional relative path to search in" }
473
- },
474
- required: ["query"]
475
- }
476
- },
477
- {
478
- name: "search_with_context",
479
- 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.",
480
742
  parameters: {
481
743
  type: "object",
482
744
  properties: {
483
- query: { type: "string", description: "Text to search for" },
484
- path: { type: "string", description: "Optional relative path to search in" },
485
- context: { type: "number", description: "Number of context lines (default 2)" },
486
- 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)" }
487
753
  },
488
754
  required: ["query"]
489
755
  }
490
756
  },
491
757
  {
492
- name: "semantic_search",
493
- 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.",
494
760
  parameters: {
495
761
  type: "object",
496
762
  properties: {
497
- query: { type: "string", description: "Text to search for" },
498
- path: { type: "string", description: "Optional relative path to search in" },
499
- limit: { type: "number", description: "Maximum results (default 5)" },
500
- 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)" }
501
765
  },
502
766
  required: ["query"]
503
767
  }
@@ -563,12 +827,12 @@ var DEFAULT_TOOL_DEFINITIONS = [
563
827
  },
564
828
  {
565
829
  name: "run_command",
566
- 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.",
567
831
  parameters: {
568
832
  type: "object",
569
833
  properties: {
570
- command: { type: "string", description: "Command to execute" },
571
- 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" } },
572
836
  directory: { type: "string", description: "Directory relative to workspace root to execute in" },
573
837
  description: { type: "string", description: "Brief description of what this command does (shown to user)" },
574
838
  background: { type: "boolean", description: "Run process in background (returns PID, useful for dev servers)" }
@@ -578,6 +842,23 @@ var DEFAULT_TOOL_DEFINITIONS = [
578
842
  requiresApproval: true,
579
843
  approvalMessage: "Allow the agent to run a shell command?"
580
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
+ },
581
862
  {
582
863
  name: "add_dependency",
583
864
  description: "Add a package dependency (supports dev flag)",
@@ -651,13 +932,12 @@ var DEFAULT_TOOL_DEFINITIONS = [
651
932
  },
652
933
  {
653
934
  name: "git_diff",
654
- 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.",
655
936
  parameters: {
656
937
  type: "object",
657
938
  properties: {
658
- path: { type: "string", description: "Relative path to the file" }
659
- },
660
- required: ["path"]
939
+ path: { type: "string", description: "Relative path to a specific file (optional). Omit to diff the entire workspace." }
940
+ }
661
941
  }
662
942
  },
663
943
  {
@@ -1059,31 +1339,6 @@ var DEFAULT_TOOL_DEFINITIONS = [
1059
1339
  required: ["name", "command"]
1060
1340
  }
1061
1341
  },
1062
- {
1063
- name: "multi_file_edit",
1064
- description: "Apply multiple edits to a file",
1065
- parameters: {
1066
- type: "object",
1067
- properties: {
1068
- file_path: { type: "string", description: "Relative path to the file" },
1069
- edits: {
1070
- type: "array",
1071
- description: "Array of {old_string, new_string, replace_all?}",
1072
- items: {
1073
- type: "object",
1074
- properties: {
1075
- old_string: { type: "string", description: "Text to replace" },
1076
- new_string: { type: "string", description: "Replacement text" },
1077
- replace_all: { type: "boolean", description: "Replace all occurrences (default: false)" }
1078
- },
1079
- required: ["old_string", "new_string"]
1080
- }
1081
- }
1082
- },
1083
- required: ["file_path", "edits"]
1084
- },
1085
- requiresApproval: true
1086
- },
1087
1342
  {
1088
1343
  name: "todo_write",
1089
1344
  description: "Persist and update the todo list. Send the COMPLETE updated todo list each time (not incremental changes).",
@@ -1154,11 +1409,211 @@ var DEFAULT_TOOL_DEFINITIONS = [
1154
1409
  name: { type: "string", description: "Tool name in snake_case (e.g., analyze_imports, count_lines)" },
1155
1410
  description: { type: "string", description: "Clear description of what the tool does" },
1156
1411
  parameters: { type: "object", description: "JSON Schema defining tool parameters" },
1157
- 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"] }
1158
1414
  },
1159
1415
  required: ["name", "description", "parameters", "handler"]
1160
1416
  }
1161
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
+ },
1162
1617
  // Web Search Operations
1163
1618
  {
1164
1619
  name: "web_search",
@@ -1223,6 +1678,39 @@ Examples:
1223
1678
  required: ["repo", "operation"]
1224
1679
  }
1225
1680
  },
1681
+ // Project Tracker
1682
+ {
1683
+ name: "project_tracker",
1684
+ description: `Query issues and pull requests for the current project via gh CLI.
1685
+ Requires gh CLI installed and authenticated (https://cli.github.com).
1686
+ If a GitHub MCP server is connected with equivalent tools, prefer those instead.
1687
+
1688
+ Actions:
1689
+ - list_issues: List issues (filter by state, assignee, labels)
1690
+ - get_issue: Get full issue details with comments
1691
+ - list_prs: List pull requests (filter by state, author, base branch)
1692
+ - get_pr: Get full PR details with checks and review status
1693
+ - get_user: Get the authenticated GitHub username`,
1694
+ parameters: {
1695
+ type: "object",
1696
+ properties: {
1697
+ action: {
1698
+ type: "string",
1699
+ description: "The operation to perform",
1700
+ enum: ["list_issues", "get_issue", "list_prs", "get_pr", "get_user"]
1701
+ },
1702
+ number: { type: "number", description: "Issue or PR number (required for get_issue, get_pr). Must be a positive integer." },
1703
+ state: { type: "string", description: 'Filter by state (default: open). "merged" is only valid for list_prs.', enum: ["open", "closed", "merged", "all"] },
1704
+ assignee: { type: "string", description: "Filter issues by assignee username. Use @me for the authenticated user." },
1705
+ author: { type: "string", description: "Filter PRs by author username" },
1706
+ labels: { type: "string", description: "Comma-separated label names to filter by" },
1707
+ base: { type: "string", description: "Filter PRs by base branch" },
1708
+ limit: { type: "number", description: "Max results to return (default: 20)" },
1709
+ repo: { type: "string", description: "owner/repo override (default: detected from git remote)" }
1710
+ },
1711
+ required: ["action"]
1712
+ }
1713
+ },
1226
1714
  // Skills Discovery
1227
1715
  {
1228
1716
  name: "find_agent_skills",
@@ -1236,14 +1724,293 @@ Examples:
1236
1724
  },
1237
1725
  required: ["query"]
1238
1726
  }
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
+ },
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
+ },
1767
+ {
1768
+ name: "list_schedules",
1769
+ description: "List all active recurring scheduled jobs. Returns job IDs, prompts, intervals, run counts, and expiry times."
1770
+ },
1771
+ {
1772
+ name: "cancel_schedule",
1773
+ description: "Cancel an active recurring scheduled job by its ID. When reporting the result to the user, tell them they can also cancel jobs with the slash command: /repeat cancel <job-id>",
1774
+ parameters: {
1775
+ type: "object",
1776
+ properties: {
1777
+ schedule_id: { type: "string", description: "The job ID to cancel (from list_schedules)" }
1778
+ },
1779
+ required: ["schedule_id"]
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
+ }
1239
1975
  }
1240
1976
  ];
1241
- var ToolManager = class _ToolManager {
1242
- constructor(options) {
1243
- 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);
1244
2010
  this.executor = options.executor;
1245
2011
  this.confirmApproval = options.confirmApproval;
1246
2012
  this.toolFilter = new ToolFilter(_nullishCoalesce(options.clientContext, () => ( "cli")), options.customPolicy);
2013
+ this.maxConcurrency = _nullishCoalesce(options.maxConcurrency, () => ( 5));
1247
2014
  const defs = _nullishCoalesce(options.definitions, () => ( DEFAULT_TOOL_DEFINITIONS));
1248
2015
  for (const def of defs) {
1249
2016
  this.register(def);
@@ -1252,6 +2019,13 @@ var ToolManager = class _ToolManager {
1252
2019
  register(definition) {
1253
2020
  this.definitions.set(definition.name, definition);
1254
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
+ }
1255
2029
  /**
1256
2030
  * Register meta-tools from ToolsRegistry dynamically
1257
2031
  * Called during session initialization to load persisted tools
@@ -1376,32 +2150,38 @@ var ToolManager = class _ToolManager {
1376
2150
  ])
1377
2151
  );
1378
2152
  }
1379
- async execute(toolCalls) {
1380
- const results = [];
1381
- const planModeManager = _chunkULQ6MDSJcjs.getPlanModeManager.call(void 0, );
2153
+ async execute(toolCalls, onToolComplete) {
2154
+ const results = /* @__PURE__ */ new Map();
2155
+ const planModeManager = _chunkLFDPTJYFcjs.getPlanModeManager.call(void 0, );
1382
2156
  const isInPlanningPhase = planModeManager.isEnabled() && planModeManager.getPhase() === "planning";
1383
2157
  const readOnlyTools = isInPlanningPhase ? new Set(planModeManager.getReadOnlyTools()) : null;
1384
- for (const call of toolCalls) {
2158
+ const readyToExecute = [];
2159
+ for (let i = 0; i < toolCalls.length; i++) {
2160
+ const call = toolCalls[i];
1385
2161
  if (!this.toolFilter.isAllowed(call.tool)) {
1386
- results.push({
2162
+ const result = {
1387
2163
  tool: call.tool,
1388
2164
  success: false,
1389
2165
  error: `Tool '${call.tool}' is not available in the current context (${this.toolFilter.getContext()})`
1390
- });
2166
+ };
2167
+ results.set(i, result);
2168
+ _optionalChain([onToolComplete, 'optionalCall', _16 => _16(i, result)]);
1391
2169
  continue;
1392
2170
  }
1393
2171
  if (readOnlyTools && !readOnlyTools.has(call.tool)) {
1394
- results.push({
2172
+ const result = {
1395
2173
  tool: call.tool,
1396
2174
  success: false,
1397
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.`
1398
- });
2176
+ };
2177
+ results.set(i, result);
2178
+ _optionalChain([onToolComplete, 'optionalCall', _17 => _17(i, result)]);
1399
2179
  continue;
1400
2180
  }
1401
2181
  const definition = this.definitions.get(call.tool);
1402
- const requiresApproval = this.toolFilter.requiresApproval(call.tool, _optionalChain([definition, 'optionalAccess', _13 => _13.requiresApproval]));
2182
+ const requiresApproval = this.toolFilter.requiresApproval(call.tool, _optionalChain([definition, 'optionalAccess', _18 => _18.requiresApproval]));
1403
2183
  if (requiresApproval) {
1404
- let message = _nullishCoalesce(_optionalChain([definition, 'optionalAccess', _14 => _14.approvalMessage]), () => ( `Allow tool ${call.tool}?`));
2184
+ let message = _nullishCoalesce(_optionalChain([definition, 'optionalAccess', _19 => _19.approvalMessage]), () => ( `Allow tool ${call.tool}?`));
1405
2185
  const permContext = { tool: call.tool };
1406
2186
  if (call.tool === "run_command" && call.args) {
1407
2187
  const cmd = String(call.args.command || "");
@@ -1411,46 +2191,155 @@ var ToolManager = class _ToolManager {
1411
2191
  message = `Run this command${dir}?
1412
2192
  $ ${fullCommand}`;
1413
2193
  permContext.command = fullCommand;
1414
- } else if (call.tool === "delete_path" && _optionalChain([call, 'access', _15 => _15.args, 'optionalAccess', _16 => _16.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])) {
1415
2203
  message = `Delete this path?
1416
2204
  ${call.args.path}`;
1417
2205
  permContext.path = String(call.args.path);
1418
- } else if (call.tool === "write_file" && _optionalChain([call, 'access', _17 => _17.args, 'optionalAccess', _18 => _18.path])) {
2206
+ } else if (call.tool === "write_file" && _optionalChain([call, 'access', _22 => _22.args, 'optionalAccess', _23 => _23.path])) {
1419
2207
  message = `Write to this file?
1420
2208
  ${call.args.path}`;
1421
2209
  permContext.path = String(call.args.path);
1422
- } else if (call.tool === "multi_file_edit" && _optionalChain([call, 'access', _19 => _19.args, 'optionalAccess', _20 => _20.file_path])) {
2210
+ } else if (call.tool === "multi_file_edit" && _optionalChain([call, 'access', _24 => _24.args, 'optionalAccess', _25 => _25.file_path])) {
1423
2211
  const editCount = Array.isArray(call.args.edits) ? call.args.edits.length : 0;
1424
2212
  message = `Edit this file (${editCount} change${editCount === 1 ? "" : "s"})?
1425
2213
  ${call.args.file_path}`;
1426
2214
  permContext.path = String(call.args.file_path);
1427
2215
  }
1428
- const confirmed = await this.confirmApproval(message, permContext);
1429
- if (!confirmed) {
1430
- results.push({
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)) {
2240
+ const result = {
1431
2241
  tool: call.tool,
1432
2242
  success: false,
1433
2243
  output: "Tool execution skipped by user."
1434
- });
2244
+ };
2245
+ results.set(i, result);
2246
+ _optionalChain([onToolComplete, 'optionalCall', _31 => _31(i, result)]);
1435
2247
  continue;
1436
2248
  }
1437
2249
  }
1438
- try {
1439
- const action = this.toAction(call);
1440
- const output = await this.executor(action, { toolCallId: call.id, tool: call.tool });
1441
- results.push({
1442
- tool: call.tool,
1443
- success: true,
1444
- output
1445
- });
1446
- } catch (error) {
1447
- results.push({
1448
- tool: call.tool,
1449
- success: false,
1450
- error: error instanceof Error ? error.message : String(error)
1451
- });
2250
+ readyToExecute.push({ call, index: i });
2251
+ }
2252
+ if (readyToExecute.length > 0) {
2253
+ const execResults = await this.executeScheduled(
2254
+ readyToExecute,
2255
+ onToolComplete
2256
+ );
2257
+ for (const [index, result] of execResults) {
2258
+ results.set(index, result);
1452
2259
  }
1453
2260
  }
2261
+ return toolCalls.map((_, i) => results.get(i));
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
+ }
2308
+ /**
2309
+ * Execute tool calls with a concurrency limit using a worker-pool pattern.
2310
+ */
2311
+ async executeWithConcurrency(tasks, maxConcurrency, onToolComplete) {
2312
+ const results = /* @__PURE__ */ new Map();
2313
+ let cursor = 0;
2314
+ const runNext = async () => {
2315
+ while (cursor < tasks.length) {
2316
+ const taskIndex = cursor++;
2317
+ const { call, index } = tasks[taskIndex];
2318
+ let result;
2319
+ try {
2320
+ const action = this.toAction(call);
2321
+ const output = await this.executor(action, {
2322
+ toolCallId: call.id,
2323
+ tool: call.tool,
2324
+ approvalHandled: true
2325
+ });
2326
+ result = { tool: call.tool, success: true, output };
2327
+ } catch (error) {
2328
+ result = {
2329
+ tool: call.tool,
2330
+ success: false,
2331
+ error: error instanceof Error ? error.message : String(error)
2332
+ };
2333
+ }
2334
+ results.set(index, result);
2335
+ _optionalChain([onToolComplete, 'optionalCall', _32 => _32(index, result)]);
2336
+ }
2337
+ };
2338
+ const workers = Array.from(
2339
+ { length: Math.min(maxConcurrency, tasks.length) },
2340
+ () => runNext()
2341
+ );
2342
+ await Promise.all(workers);
1454
2343
  return results;
1455
2344
  }
1456
2345
  toAction(call) {
@@ -1459,22 +2348,29 @@ var ToolManager = class _ToolManager {
1459
2348
  ..._nullishCoalesce(call.args, () => ( {}))
1460
2349
  };
1461
2350
  }
1462
- };
2351
+ }, _class);
1463
2352
 
1464
2353
  // src/core/agents/AgentDelegator.ts
1465
2354
 
1466
2355
  var DEFAULT_MAX_DEPTH = 3;
1467
- var AgentDelegator = class {
1468
- constructor(llm, actionExecutor, options = {}) {
2356
+ var AgentDelegator = (_class2 = class {
2357
+ constructor(llm, actionExecutor, options = {}) {;_class2.prototype.__init2.call(this);
1469
2358
  this.llm = llm;
1470
2359
  this.actionExecutor = actionExecutor;
1471
- this.subagentCounter = 0;
1472
- this.registry = _chunkBVKXEQVGcjs.AgentRegistry.getInstance();
2360
+ this.registry = _chunkMOJ7ADW4cjs.AgentRegistry.getInstance();
1473
2361
  this.clientContext = _nullishCoalesce(options.clientContext, () => ( "cli"));
1474
2362
  this.currentDepth = _nullishCoalesce(options.currentDepth, () => ( 0));
1475
2363
  this.maxDepth = _nullishCoalesce(options.maxDepth, () => ( DEFAULT_MAX_DEPTH));
1476
2364
  this.onSubagentStop = options.onSubagentStop;
1477
2365
  }
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+ __init2() {this.subagentCounter = 0}
1478
2374
  generateSubagentId() {
1479
2375
  return `subagent-${Date.now()}-${++this.subagentCounter}`;
1480
2376
  }
@@ -1586,7 +2482,7 @@ ${result}`;
1586
2482
  canDelegate() {
1587
2483
  return this.currentDepth < this.maxDepth;
1588
2484
  }
1589
- };
2485
+ }, _class2);
1590
2486
 
1591
2487
  // src/core/agents/SubAgent.ts
1592
2488
  var DELEGATION_TOOL_DEFINITIONS = [
@@ -1614,17 +2510,16 @@ var DELEGATION_TOOL_DEFINITIONS = [
1614
2510
  }
1615
2511
  }
1616
2512
  ];
1617
- var SubAgent = class {
1618
- constructor(config, llm, actionExecutor, options) {
2513
+ var SubAgent = (_class3 = class {
2514
+ constructor(config, llm, actionExecutor, options) {;_class3.prototype.__init3.call(this);
1619
2515
  this.config = config;
1620
2516
  this.llm = llm;
1621
2517
  this.actionExecutor = actionExecutor;
1622
- this.delegator = null;
1623
2518
  this.name = config.name;
1624
2519
  this.options = options;
1625
2520
  const canDelegate = options.depth < options.maxDepth;
1626
2521
  const allowedTools = new Set(config.tools);
1627
- 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));
1628
2523
  if (canDelegate) {
1629
2524
  definitions = [...definitions, ...DELEGATION_TOOL_DEFINITIONS];
1630
2525
  }
@@ -1637,6 +2532,7 @@ var SubAgent = class {
1637
2532
  maxDepth: options.maxDepth
1638
2533
  });
1639
2534
  }
2535
+ const scaledConcurrency = options.depth === 0 ? _nullishCoalesce(options.maxConcurrency, () => ( 5)) : options.depth === 1 ? Math.min(3, _nullishCoalesce(options.maxConcurrency, () => ( 5))) : 1;
1640
2536
  this.toolManager = new ToolManager({
1641
2537
  executor: async (action, context) => {
1642
2538
  if (action.type === "delegate_task" && this.delegator) {
@@ -1653,12 +2549,21 @@ var SubAgent = class {
1653
2549
  confirmApproval: async () => true,
1654
2550
  // Sub-agents auto-approve (inherit from main agent in future)
1655
2551
  definitions,
1656
- clientContext: options.clientContext
2552
+ clientContext: options.clientContext,
2553
+ maxConcurrency: scaledConcurrency
1657
2554
  });
1658
2555
  const enhancedSystemPrompt = this.buildSystemPrompt(config.systemPrompt, definitions);
1659
- this.conversation = new (0, _chunkCNBKZEX5cjs.ConversationManager)();
2556
+ this.conversation = new (0, _chunkDA7NBAJKcjs.ConversationManager)();
1660
2557
  this.conversation.reset(enhancedSystemPrompt);
1661
2558
  }
2559
+
2560
+
2561
+
2562
+
2563
+
2564
+ __init3() {this.delegator = null}
2565
+
2566
+
1662
2567
  /**
1663
2568
  * Build system prompt with tool signatures for the LLM
1664
2569
  */
@@ -1672,6 +2577,10 @@ var SubAgent = class {
1672
2577
  "",
1673
2578
  toolSignatures,
1674
2579
  "",
2580
+ "### Parallel Tool Calling",
2581
+ "When performing multiple independent operations, include all tool calls in a single toolCalls array.",
2582
+ "They will execute in parallel for faster results.",
2583
+ "",
1675
2584
  "## Response Format",
1676
2585
  "Always respond with structured JSON:",
1677
2586
  "```json",
@@ -1689,8 +2598,8 @@ var SubAgent = class {
1689
2598
  * Format a tool definition as a signature string
1690
2599
  */
1691
2600
  formatToolSignature(def) {
1692
- const params = _optionalChain([def, 'access', _21 => _21.parameters, 'optionalAccess', _22 => _22.properties]) ? Object.entries(def.parameters.properties).map(([name, prop]) => {
1693
- const required = _optionalChain([def, 'access', _23 => _23.parameters, 'optionalAccess', _24 => _24.required, 'optionalAccess', _25 => _25.includes, 'call', _26 => _26(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)]) ? "" : "?";
1694
2603
  return `${name}${required}: ${prop.type}`;
1695
2604
  }).join(", ") : "";
1696
2605
  return `- ${def.name}(${params}): ${def.description}`;
@@ -1710,7 +2619,7 @@ var SubAgent = class {
1710
2619
  toolChoice: tools.length > 0 ? "auto" : void 0
1711
2620
  });
1712
2621
  const payload = this.parseResponse(completion);
1713
- if (_optionalChain([completion, 'access', _27 => _27.toolCalls, 'optionalAccess', _28 => _28.length])) {
2622
+ if (_optionalChain([completion, 'access', _39 => _39.toolCalls, 'optionalAccess', _40 => _40.length])) {
1714
2623
  this.conversation.addMessage({
1715
2624
  role: "assistant",
1716
2625
  content: completion.content || ""
@@ -1725,13 +2634,13 @@ var SubAgent = class {
1725
2634
  const results = await this.toolManager.execute(payload.toolCalls);
1726
2635
  for (let j = 0; j < results.length; j++) {
1727
2636
  const result = results[j];
1728
- const toolCall = _optionalChain([completion, 'access', _29 => _29.toolCalls, 'optionalAccess', _30 => _30[j]]);
2637
+ const toolCall = _optionalChain([completion, 'access', _41 => _41.toolCalls, 'optionalAccess', _42 => _42[j]]);
1729
2638
  const content = result.success ? _nullishCoalesce(result.output, () => ( "(no output)")) : _nullishCoalesce(result.error, () => ( "Tool failed"));
1730
2639
  this.conversation.addMessage({
1731
2640
  role: "tool",
1732
2641
  name: result.tool,
1733
2642
  content,
1734
- tool_call_id: _optionalChain([toolCall, 'optionalAccess', _31 => _31.id])
2643
+ tool_call_id: _optionalChain([toolCall, 'optionalAccess', _43 => _43.id])
1735
2644
  });
1736
2645
  if (!result.success) {
1737
2646
  console.log(_chalk2.default.red(`[${this.name}] Tool ${result.tool} failed: ${content}`));
@@ -1814,7 +2723,9 @@ var SubAgent = class {
1814
2723
  }
1815
2724
  return void 0;
1816
2725
  }
1817
- };
2726
+ }, _class3);
2727
+
2728
+
1818
2729
 
1819
2730
 
1820
2731
 
@@ -1822,14 +2733,21 @@ var SubAgent = class {
1822
2733
 
1823
2734
 
1824
2735
 
1825
- 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
+ */
1826
2745
  /**
1827
2746
  * @license
1828
2747
  * Copyright 2025 Autohand AI LLC
1829
2748
  * SPDX-License-Identifier: Apache-2.0
1830
2749
  *
1831
2750
  * Tool filtering based on client context and risk categories
1832
- * Inspired by Claude Code's permission model
1833
2751
  */
1834
2752
  /**
1835
2753
  * @license