pub struct SandboxConfig {
pub enabled: bool,
pub image: Option<String>,
pub workspace: Option<String>,
pub network: NetworkConfig,
pub resources: ResourceConfig,
pub env: Vec<String>,
pub volumes: Vec<String>,
pub exclude: Vec<String>,
pub dns: Vec<String>,
}Expand description
Full sandbox configuration (parsed from workflow config or CLI flags)
Fields§
§enabled: bool§image: Option<String>Docker image to use (default: “minion-sandbox:latest”)
workspace: Option<String>Host path to mount as workspace inside container
network: NetworkConfig§resources: ResourceConfig§env: Vec<String>Host environment variables to forward into the container. Each entry is a variable name (e.g. “GH_TOKEN”); the value is read from the host environment at container-creation time.
volumes: Vec<String>Extra read-only volume mounts (host_path:container_path or host_path:container_path:mode). Tilde (~) is expanded to $HOME on the host.
exclude: Vec<String>Glob patterns of files/dirs to exclude when copying workspace into the container (e.g. “node_modules”, “target”).
dns: Vec<String>DNS servers to use inside the container (e.g. “8.8.8.8”). Ensures name resolution works even with restricted networks.
Implementations§
Source§impl SandboxConfig
impl SandboxConfig
Sourcepub const DEFAULT_IMAGE: &'static str = "minion-sandbox:latest"
pub const DEFAULT_IMAGE: &'static str = "minion-sandbox:latest"
Default image used when none is specified
Sourcepub const AUTO_ENV: &'static [&'static str]
pub const AUTO_ENV: &'static [&'static str]
Well-known env vars that are auto-forwarded when the user does NOT
specify an explicit env: list. This covers the most common
credentials needed by workflows.
Sourcepub const AUTO_EXCLUDE: &'static [&'static str]
pub const AUTO_EXCLUDE: &'static [&'static str]
Well-known directories to exclude when copying workspace into the sandbox container. These are typically large build/cache directories that would make the copy prohibitively slow and are not needed for workflow execution.
Sourcepub const AUTO_VOLUMES: &'static [&'static str]
pub const AUTO_VOLUMES: &'static [&'static str]
Well-known host directories that are auto-mounted when the
user does NOT specify an explicit volumes: list.
Note: ~/.claude needs read-write access because Claude CLI writes session data.
Note: ~/.gitconfig is NOT mounted because the host gitconfig often
contains macOS-specific paths (e.g. credential helpers pointing to
/usr/local/bin/gh) and missing safe.directory entries. The sandbox
configures its own gitconfig after workspace copy.
Sourcepub const PROXIED_SECRETS: &'static [&'static str]
pub const PROXIED_SECRETS: &'static [&'static str]
Secrets that are proxied and should NOT be passed as env vars into the container.
pub fn image(&self) -> &str
Sourcepub fn effective_env(&self) -> Vec<String>
pub fn effective_env(&self) -> Vec<String>
Return the effective env-var list: explicit config overrides auto-env.
Sourcepub fn effective_env_with_proxy(&self) -> Vec<String>
pub fn effective_env_with_proxy(&self) -> Vec<String>
Return env vars to forward when the API proxy is active. Excludes secrets that are handled by the proxy (e.g. ANTHROPIC_API_KEY).
Sourcepub fn effective_volumes(&self) -> Vec<String>
pub fn effective_volumes(&self) -> Vec<String>
Return the effective volume list: explicit config overrides auto-volumes. Tilde (~) is expanded to $HOME on the host.
Sourcepub fn effective_exclude(&self) -> Vec<String>
pub fn effective_exclude(&self) -> Vec<String>
Return the effective exclude list: explicit config overrides auto-exclude.
Sourcepub fn from_global_config(config: &HashMap<String, Value>) -> Self
pub fn from_global_config(config: &HashMap<String, Value>) -> Self
Parse SandboxConfig from a global config map (Devbox mode)
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more