pub struct ShadowSentinelConfig {
pub enabled: bool,
pub probe_provider: ProviderName,
pub max_context_events: usize,
pub probe_timeout_ms: u64,
pub max_probes_per_turn: usize,
pub probe_patterns: Vec<String>,
pub deny_on_timeout: bool,
}Expand description
Configuration for the ShadowSentinel subsystem, nested under [security.shadow_sentinel].
ShadowSentinel is a defence-in-depth layer (Phase 2 of spec 050) that persists safety
events across sessions and runs an LLM probe before high-risk tool execution. It is NOT
the primary security gate — PolicyGateExecutor and TrajectorySentinel remain the
primary enforcement mechanisms and are unaffected by probe timeouts.
§Example (TOML)
[security.shadow_sentinel]
enabled = true
probe_provider = "fast"
probe_timeout_ms = 2000Fields§
§enabled: boolWhether the feature is enabled. Default: false (opt-in).
probe_provider: ProviderNameProvider name (from [[llm.providers]]) used for the safety probe LLM call.
Empty string means use the main/default provider. A fast, cheap provider
(e.g. gpt-4o-mini) is strongly recommended to minimise turn latency.
max_context_events: usizeMaximum number of trajectory events to include in the probe context. Default: 50.
probe_timeout_ms: u64Timeout for the probe LLM call in milliseconds. Default: 2000.
max_probes_per_turn: usizeMaximum probe calls per turn to cap LLM costs. Default: 3.
probe_patterns: Vec<String>Glob patterns over fully-qualified tool ids that trigger the safety probe.
Default covers shell execution, file writes, and MCP file/exec tools.
deny_on_timeout: boolWhen true, a probe timeout or LLM error causes the tool call to be denied.
When false (default), a probe failure causes the call to be allowed (fail-open).
Fail-open is the correct default because:
ShadowSentinelis defence-in-depth, not the primary gate.- Failing closed on probe timeout would allow a
DoS(slow context → disabled tools). PolicyGateExecutor+TrajectorySentinelcontinue to enforce policy regardless.
Trait Implementations§
Source§impl Clone for ShadowSentinelConfig
impl Clone for ShadowSentinelConfig
Source§fn clone(&self) -> ShadowSentinelConfig
fn clone(&self) -> ShadowSentinelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more