Skip to main content

BashTool

Struct BashTool 

Source
pub struct BashTool { /* private fields */ }
Expand description

Virtual bash interpreter implementing the Tool trait

Implementations§

Source§

impl BashTool

Source

pub fn builder() -> BashToolBuilder

Create a new tool builder

Trait Implementations§

Source§

impl Default for BashTool

Source§

fn default() -> BashTool

Returns the “default value” for a type. Read more
Source§

impl Tool for BashTool

Source§

fn name(&self) -> &str

Tool identifier (e.g., “bashkit”, “calculator”)
Source§

fn short_description(&self) -> &str

One-line description for tool listings
Source§

fn description(&self) -> String

Full description, may include dynamic config info
Source§

fn help(&self) -> String

Full documentation for LLMs (human readable, with examples)
Source§

fn system_prompt(&self) -> String

Condensed description for system prompts (token-efficient)
Source§

fn input_schema(&self) -> Value

JSON Schema for input validation
Source§

fn output_schema(&self) -> Value

JSON Schema for output structure
Source§

fn version(&self) -> &str

Library/tool version
Source§

fn execute<'life0, 'async_trait>( &'life0 mut self, req: ToolRequest, ) -> Pin<Box<dyn Future<Output = ToolResponse> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the tool
Source§

fn execute_with_status<'life0, 'async_trait>( &'life0 mut self, req: ToolRequest, status_callback: Box<dyn FnMut(ToolStatus) + Send>, ) -> Pin<Box<dyn Future<Output = ToolResponse> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute with status callbacks for progress tracking

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.