pub struct ToolExecutor { /* private fields */ }Expand description
Executes built-in tools (Read, Write, Edit, Bash, Glob, Grep).
Implementations§
Source§impl ToolExecutor
impl ToolExecutor
Sourcepub fn new(cwd: PathBuf) -> Self
pub fn new(cwd: PathBuf) -> Self
Create a new executor rooted at the given working directory (no path boundary).
Sourcepub fn with_allowed_dirs(cwd: PathBuf, additional: Vec<PathBuf>) -> Self
pub fn with_allowed_dirs(cwd: PathBuf, additional: Vec<PathBuf>) -> Self
Create a new executor with a path boundary.
File-based tools will only operate within cwd and the additional directories.
Sourcepub fn with_env_blocklist(self, blocklist: Vec<String>) -> Self
pub fn with_env_blocklist(self, blocklist: Vec<String>) -> Self
Set environment variable names to strip from child processes.
Auto Trait Implementations§
impl Freeze for ToolExecutor
impl RefUnwindSafe for ToolExecutor
impl Send for ToolExecutor
impl Sync for ToolExecutor
impl Unpin for ToolExecutor
impl UnsafeUnpin for ToolExecutor
impl UnwindSafe for ToolExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more