pub struct ShellConfig {Show 15 fields
pub timeout: u64,
pub blocked_commands: Vec<String>,
pub allowed_commands: Vec<String>,
pub allowed_paths: Vec<String>,
pub allow_network: bool,
pub confirm_patterns: Vec<String>,
pub env_blocklist: Vec<String>,
pub transactional: bool,
pub transaction_scope: Vec<String>,
pub auto_rollback: bool,
pub auto_rollback_exit_codes: Vec<i32>,
pub snapshot_required: bool,
pub max_snapshot_bytes: u64,
pub max_background_runs: usize,
pub background_timeout_secs: u64,
}Expand description
Shell-specific configuration: timeout, command blocklist, and allowlist overrides.
Fields§
§timeout: u64Shell command timeout in seconds. Default: 30.
blocked_commands: Vec<String>Commands blocked from execution.
allowed_commands: Vec<String>Commands explicitly allowed (overrides blocklist).
allowed_paths: Vec<String>Filesystem paths the shell is permitted to access.
allow_network: boolAllow outbound network from shell. Default: true.
confirm_patterns: Vec<String>Patterns that trigger a confirmation prompt before execution.
env_blocklist: Vec<String>Environment variable name prefixes to strip from subprocess environment.
transactional: boolEnable transactional mode: snapshot files before write commands. Default: false.
transaction_scope: Vec<String>Glob patterns for paths eligible for snapshotting.
auto_rollback: boolAutomatically rollback when exit code >= 2. Default: false.
auto_rollback_exit_codes: Vec<i32>Exit codes that trigger auto-rollback.
snapshot_required: boolWhen true, snapshot failure aborts execution. Default: false.
max_snapshot_bytes: u64Maximum cumulative bytes for transaction snapshots. 0 = unlimited.
max_background_runs: usizeMaximum concurrent background shell runs. Default: 8.
background_timeout_secs: u64Timeout in seconds for each background shell run. Default: 1800.
Implementations§
Source§impl ShellConfig
impl ShellConfig
Sourcepub fn default_env_blocklist() -> Vec<String>
pub fn default_env_blocklist() -> Vec<String>
Default environment variable prefixes to strip from subprocess environment.
Trait Implementations§
Source§impl Debug for ShellConfig
impl Debug for ShellConfig
Source§impl Default for ShellConfig
impl Default for ShellConfig
Source§fn default() -> ShellConfig
fn default() -> ShellConfig
Source§impl<'de> Deserialize<'de> for ShellConfig
impl<'de> Deserialize<'de> for ShellConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShellConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShellConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ShellConfig
impl Serialize for ShellConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ShellConfig
impl RefUnwindSafe for ShellConfig
impl Send for ShellConfig
impl Sync for ShellConfig
impl Unpin for ShellConfig
impl UnsafeUnpin for ShellConfig
impl UnwindSafe for ShellConfig
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
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