pub trait SandboxProtocol: Send + Sync {
// Required methods
fn execute(
&self,
cmd: &str,
args: &[String],
) -> BoxFuture<'_, Result<ExecuteResponse, VfsError>>;
fn execute_pipeline(
&self,
stages: &[PipelineStage],
) -> BoxFuture<'_, Result<Vec<ExecuteResponse>, VfsError>>;
fn id(&self) -> &str;
}Expand description
Sandbox protocol for command execution with isolation.
Separate from Vfs to make it
explicit when an agent needs shell execution capability.
Required Methods§
Sourcefn execute(
&self,
cmd: &str,
args: &[String],
) -> BoxFuture<'_, Result<ExecuteResponse, VfsError>>
fn execute( &self, cmd: &str, args: &[String], ) -> BoxFuture<'_, Result<ExecuteResponse, VfsError>>
Execute a single command.
Sourcefn execute_pipeline(
&self,
stages: &[PipelineStage],
) -> BoxFuture<'_, Result<Vec<ExecuteResponse>, VfsError>>
fn execute_pipeline( &self, stages: &[PipelineStage], ) -> BoxFuture<'_, Result<Vec<ExecuteResponse>, VfsError>>
Execute a multi-stage pipeline (each stage’s stdout pipes into the next).