pub struct SandboxCommand {
pub command: String,
pub cwd: PathBuf,
pub workspace_root: PathBuf,
pub env: Vec<(String, String)>,
pub timeout: Duration,
pub max_output_bytes: usize,
pub allow_network: bool,
pub deny_read: Vec<PathBuf>,
pub cancel: CancellationToken,
}Expand description
One command to run.
Fields§
§command: StringShell command line, run with sh -c.
cwd: PathBufWorking directory (absolute, inside workspace_root).
workspace_root: PathBufCanonical workspace root; sandboxes make only this writable.
env: Vec<(String, String)>The complete environment for the command (nothing else is inherited by sandboxed or local children).
timeout: Duration§max_output_bytes: usizeBytes of combined output kept (head + tail).
allow_network: boolWhether the command may use the network (sandboxes only).
deny_read: Vec<PathBuf>Host paths the command must not read, on top of the backend’s own
defaults (HOME_SECRET_PATHS for bubblewrap and seatbelt). Only
backends whose Sandbox::enforces_deny_read is true honour it;
the shell tool refuses to run a command with a deny list on any
other. Paths that do not exist are skipped. Under bubblewrap a denied directory appears empty and a
denied file reads as empty; under seatbelt reading either fails.
cancel: CancellationTokenCancelled when the run is cancelled; the command is killed.