pub struct ShellConfig {Show 19 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,
pub risk_chain_threshold: Option<f32>,
pub risk_chain_window_turns: Option<u64>,
pub checkpoints_enabled: bool,
pub max_checkpoints: usize,
}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.
risk_chain_threshold: Option<f32>Cumulative risk score threshold for multi-step chain blocking. Default: 0.7.
When the RiskChainAccumulator (zeph-tools) exceeds this score within a single turn,
the command is blocked. Set to None to use the built-in default of 0.7.
risk_chain_window_turns: Option<u64>Number of turns a recorded tool call stays “live” for RiskChainAccumulator cross-turn
multi-step chain detection (#6603). Set to None to use the built-in default of 3
(see zeph_tools::risk_chain module docs for the rationale behind that default, and
why it is narrower than [security.trajectory] window_turns’s default of 8).
checkpoints_enabled: boolEnable session-scoped checkpoint history for /undo and /redo. Default: false.
When true, file snapshots are captured before each write command and stored
in an in-memory stack for the duration of the session. Checkpoints are lost
when the agent process exits.
max_checkpoints: usizeMaximum number of checkpoints retained in the undo stack. Default: 20.
When the stack reaches this limit, the oldest entry is evicted to make room.
Set to 0 for no limit (not recommended for long-running sessions).
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 Clone for ShellConfig
impl Clone for ShellConfig
Source§fn clone(&self) -> ShellConfig
fn clone(&self) -> ShellConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request