pub struct SandboxedWorker { /* private fields */ }Expand description
Builder for a fixed Agent Bridle worker born under the ordinary confinement
funnel. Unlike ConfinedCommand, the executable is mechanism
configuration chosen by the trusted embedder and the entrypoint arguments
are fixed by TrustedWorkerKind; model-authored arguments never reach the
spawn boundary.
Implementations§
Source§impl SandboxedWorker
impl SandboxedWorker
Sourcepub fn brush() -> SandboxedWorker
pub fn brush() -> SandboxedWorker
Configure the carried Brush worker at this process’s fixed executable.
The executable is intentionally not caller-selectable: trusted-worker admission bypasses the model-facing exec check, so accepting an arbitrary path here would turn the worker API into a generic confused deputy.
Sourcepub fn sandbox_policy(self, policy: Arc<SandboxPolicy>) -> SandboxedWorker
pub fn sandbox_policy(self, policy: Arc<SandboxPolicy>) -> SandboxedWorker
Set the sandbox mechanism policy used by the shared spawn funnel.
Sourcepub fn spawn(
self,
cx: &ToolContext,
nonce: &str,
cwd: &Path,
) -> Result<SandboxedWorkerChild, ToolError>
pub fn spawn( self, cx: &ToolContext, nonce: &str, cwd: &Path, ) -> Result<SandboxedWorkerChild, ToolError>
Spawn the fixed worker with empty ambient environment, piped output, and a private authenticated-control transport in place of ordinary stdin.
nonce binds the worker request carried over stdin to this launch. The
worker is a fresh process-group leader on Unix so its supervisor can
terminate the complete process tree on timeout. Other targets retain
their native child-process behavior. The process-wide unbridled state is
derived inside core; a caller cannot opt a single worker out of
confinement.
Trait Implementations§
Source§impl Clone for SandboxedWorker
impl Clone for SandboxedWorker
Source§fn clone(&self) -> SandboxedWorker
fn clone(&self) -> SandboxedWorker
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SandboxedWorker
impl RefUnwindSafe for SandboxedWorker
impl Send for SandboxedWorker
impl Sync for SandboxedWorker
impl Unpin for SandboxedWorker
impl UnsafeUnpin for SandboxedWorker
impl UnwindSafe for SandboxedWorker
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