pub struct ExecuteBashTool { /* private fields */ }Expand description
Tool that executes bash commands with policy-based validation.
Commands are validated against the configured policy before execution. In a real deployment, this tool should also require user confirmation via the tool confirmation mechanism.
Implementations§
Source§impl ExecuteBashTool
impl ExecuteBashTool
Sourcepub fn new(workspace: PathBuf) -> Self
pub fn new(workspace: PathBuf) -> Self
Create a new bash execution tool with the given workspace directory.
Sourcepub fn with_policy(self, policy: BashToolPolicy) -> Self
pub fn with_policy(self, policy: BashToolPolicy) -> Self
Set the command validation policy.
Sourcepub fn with_timeout(self, timeout_secs: u64) -> Self
pub fn with_timeout(self, timeout_secs: u64) -> Self
Set the execution timeout in seconds.
Trait Implementations§
Source§impl Clone for ExecuteBashTool
impl Clone for ExecuteBashTool
Source§fn clone(&self) -> ExecuteBashTool
fn clone(&self) -> ExecuteBashTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecuteBashTool
impl Debug for ExecuteBashTool
Source§impl ToolFunction for ExecuteBashTool
impl ToolFunction for ExecuteBashTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description of what this tool does.
Source§fn parameters(&self) -> Option<Value>
fn parameters(&self) -> Option<Value>
JSON Schema for the tool’s input parameters, or
None if parameterless.Auto Trait Implementations§
impl Freeze for ExecuteBashTool
impl RefUnwindSafe for ExecuteBashTool
impl Send for ExecuteBashTool
impl Sync for ExecuteBashTool
impl Unpin for ExecuteBashTool
impl UnsafeUnpin for ExecuteBashTool
impl UnwindSafe for ExecuteBashTool
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