1pub mod bash;
4pub mod file;
5pub mod subagent;
6pub mod web_search;
7
8pub use bash::Bash;
9pub use file::{Edit, View, Write};
10use std::any::Any;
11use std::fmt::{Debug, Display};
12pub use subagent::{Subagent, ToolFactory};
13pub use web_search::WebSearch;
14
15pub trait GateableToolParams: Any + Debug + Display {}
17
18impl<T: Any + Debug + Display> GateableToolParams for T {}
19
20#[allow(async_fn_in_trait)]
22pub trait ToolGate: Debug + Send + Sync {
23 async fn permitted(&self, params: &dyn GateableToolParams) -> std::result::Result<(), String>;
27}
28
29#[derive(Debug)]
31pub struct AutoApprove;
32
33#[allow(async_fn_in_trait)]
34impl ToolGate for AutoApprove {
35 async fn permitted(&self, _params: &dyn GateableToolParams) -> std::result::Result<(), String> {
36 Ok(())
37 }
38}