pub struct BrushShellTool { /* private fields */ }Expand description
The carried brush engine (agent-bridle#20 / Track 2): a bash-in-Rust
shell run in a dedicated sandboxed worker. Its CommandInterceptor provides
the worker-local L2 leash; when an effective native backend engages, the
worker and descendants inherit that L3 boundary. Opt-in via the brush
feature; a construction-time alternative to ShellTool behind the ADR
0005 D2 seam, using the temporary brush-ocap-* fork
(reubeno/brush#1184).
The carried brush engine — a Tool that runs a free-form command string
through a worker-hosted bash-in-Rust shell with a worker-local
CommandInterceptor leash and any L3 boundary engaged by the effective
caveats. Registered under "shell" (the ADR 0005 D2 seam), a peer of
ShellTool / HostShellTool.
Implementations§
Source§impl BrushShellTool
impl BrushShellTool
Sourcepub fn new() -> BrushShellTool
pub fn new() -> BrushShellTool
The engine with default output cap and the embedded schema.
Sourcepub fn with_timeout(self, timeout: Duration) -> BrushShellTool
pub fn with_timeout(self, timeout: Duration) -> BrushShellTool
Override the wall-clock ceiling (three-Cs: Configuration). A run that
exceeds timeout has its worker process group terminated on Unix (the
worker process on other targets) and is reported timed_out:true with
exit 124.
Sourcepub fn with_sandbox_policy(self, policy: Arc<SandboxPolicy>) -> BrushShellTool
pub fn with_sandbox_policy(self, policy: Arc<SandboxPolicy>) -> BrushShellTool
Select the OS-sandbox mechanism policy for the private worker.
Sourcepub fn with_output_observer(
self,
observer: Arc<dyn ShellOutputObserver>,
) -> BrushShellTool
pub fn with_output_observer( self, observer: Arc<dyn ShellOutputObserver>, ) -> BrushShellTool
Attach a presentation-only observer for bounded stdout/stderr chunks.
The observer receives only output captured by an admitted invocation and
cannot change the interceptor, authority, or final result envelope.
Delivery may finish asynchronously after the invocation returns;
on_finish marks the queue-drained boundary.
Sourcepub fn with_schema(self, schema: Value) -> BrushShellTool
pub fn with_schema(self, schema: Value) -> BrushShellTool
Override the tool’s input schema (three-Cs: Configuration).
Trait Implementations§
Source§impl Clone for BrushShellTool
impl Clone for BrushShellTool
Source§fn clone(&self) -> BrushShellTool
fn clone(&self) -> BrushShellTool
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BrushShellTool
impl Debug for BrushShellTool
Source§impl Default for BrushShellTool
impl Default for BrushShellTool
Source§fn default() -> BrushShellTool
fn default() -> BrushShellTool
Source§impl Tool for BrushShellTool
impl Tool for BrushShellTool
Source§fn name(&self) -> &str
fn name(&self) -> &str
tools/list and in
crate::Registry::dispatch).Source§fn invoke<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
cx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
BrushShellTool: 'async_trait,
fn invoke<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
cx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
BrushShellTool: 'async_trait,
cx proves the leash was passed; the tool enforces
per-operation policy by calling cx.check_exec, cx.check_path_*, etc.Auto Trait Implementations§
impl !RefUnwindSafe for BrushShellTool
impl !UnwindSafe for BrushShellTool
impl Freeze for BrushShellTool
impl Send for BrushShellTool
impl Sync for BrushShellTool
impl Unpin for BrushShellTool
impl UnsafeUnpin for BrushShellTool
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
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<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
impl<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
Source§fn convert_into(self) -> T
fn convert_into(self) -> T
Self to a value of type T.Source§impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
Source§impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
Source§type Error = <T as ConvertTryFrom<F>>::Error
type Error = <T as ConvertTryFrom<F>>::Error
Source§fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
Self to a value of type T.impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 more