pub struct BashTool { /* private fields */ }Expand description
Built-in bash tool. No internal state — a singleton Arc::new(BashTool::new())
suffices.
Implementations§
Source§impl BashTool
impl BashTool
pub fn new() -> Self
pub fn from_config(config: &BashToolConfig) -> Self
Trait Implementations§
Source§impl Tool for BashTool
impl Tool for BashTool
Source§fn schema(&self) -> &ToolSchema
fn schema(&self) -> &ToolSchema
Tool metadata. Returns a reference to avoid allocating on every call.
Source§fn safety_hint(&self, _args: &Value) -> SafetyClass
fn safety_hint(&self, _args: &Value) -> SafetyClass
Provides a safety-level hint to the sandbox policy without actually executing the
tool. Read more
Source§fn describe<'a>(
&'a self,
args: &'a Value,
_ctx: ToolContext<'a>,
) -> BoxFuture<'a, ToolCallDescription>
fn describe<'a>( &'a self, args: &'a Value, _ctx: ToolContext<'a>, ) -> BoxFuture<'a, ToolCallDescription>
Generates a “self-description” before execution, for display to the ACP client. Read more
Source§fn execute(&self, args: Value, ctx: ToolContext<'_>) -> ToolStream
fn execute(&self, args: Value, ctx: ToolContext<'_>) -> ToolStream
Initiates a tool call and returns an event stream. Read more
Auto Trait Implementations§
impl Freeze for BashTool
impl RefUnwindSafe for BashTool
impl Send for BashTool
impl Sync for BashTool
impl Unpin for BashTool
impl UnsafeUnpin for BashTool
impl UnwindSafe 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