pub struct BashTool { /* private fields */ }Expand description
Agent tool that runs bash commands in a working directory.
Implementations§
Source§impl BashTool
impl BashTool
Sourcepub fn with_options(options: BashToolOptions) -> Self
pub fn with_options(options: BashToolOptions) -> Self
Creates a bash tool from explicit options.
Sourcepub fn parameters_schema() -> Value
pub fn parameters_schema() -> Value
Returns the JSON Schema for bash arguments (normalized TypeBox shape).
Sourcepub fn parse_input(
args: &Map<String, Value>,
) -> Result<BashToolInput, ToolError>
pub fn parse_input( args: &Map<String, Value>, ) -> Result<BashToolInput, ToolError>
Validates raw tool arguments into BashToolInput.
§Errors
Returns ToolError when required fields are missing or mistyped, or
when timeout fails TypeScript resolveTimeoutMs checks.
Trait Implementations§
Source§impl AgentTool for BashTool
impl AgentTool for BashTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable tool description.
Source§fn parameters(&self) -> &Value
fn parameters(&self) -> &Value
JSON Schema for tool arguments.
Source§fn validate_arguments(
&self,
args: &Map<String, Value>,
) -> Result<Map<String, Value>, ToolError>
fn validate_arguments( &self, args: &Map<String, Value>, ) -> Result<Map<String, Value>, ToolError>
Validates prepared arguments for this tool. Read more
Source§fn execute(
&self,
_tool_call_id: &str,
args: Map<String, Value>,
cancel: CancellationToken,
updates: ToolUpdates,
) -> BoxFuture<'static, Result<AgentToolResult, ToolError>>
fn execute( &self, _tool_call_id: &str, args: Map<String, Value>, cancel: CancellationToken, updates: ToolUpdates, ) -> BoxFuture<'static, Result<AgentToolResult, ToolError>>
Executes the tool call. Read more
Source§fn execution_mode(&self) -> Option<ToolExecutionMode>
fn execution_mode(&self) -> Option<ToolExecutionMode>
Optional per-tool execution mode override. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for BashTool
impl !UnwindSafe for BashTool
impl Freeze for BashTool
impl Send for BashTool
impl Sync for BashTool
impl Unpin for BashTool
impl UnsafeUnpin for BashTool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreCreates a shared type from an unshared type.