pub struct Shell { /* private fields */ }Expand description
Runs commands, confined by whatever Sandbox it was built with.
The policy lives on the tool rather than in ToolCtx because it decides
the tool’s capabilities, and capabilities() has no context to consult.
The workspace still comes from the context at call time, so per-run jails —
an eval case’s private copy of a fixture — are confined to that copy.
Implementations§
Trait Implementations§
Source§impl Tool for Shell
impl Tool for Shell
fn name(&self) -> &str
fn description(&self) -> &str
fn input_schema(&self) -> Value
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Declared risk surface. The default is the conservative one for a tool
nobody has classified: assume it does nothing special.
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Value,
ctx: &'life1 ToolCtx,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn read_only(&self) -> bool
fn read_only(&self) -> bool
Read-only tools skip the approval gate and are safe to run in parallel.
Source§fn carried_state(&self) -> Option<CarriedState>
fn carried_state(&self) -> Option<CarriedState>
State this tool holds that a compaction must not lose. Read more
fn spec(&self) -> ToolSpec
Auto Trait Implementations§
impl Freeze for Shell
impl RefUnwindSafe for Shell
impl Send for Shell
impl Sync for Shell
impl Unpin for Shell
impl UnsafeUnpin for Shell
impl UnwindSafe for Shell
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