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 more