pub struct TrajectorySentinelConfig {
pub decay_per_turn: f32,
pub window_turns: u32,
pub elevated_at: f32,
pub high_at: f32,
pub critical_at: f32,
pub alert_threshold: f32,
pub auto_recover_after_turns: u32,
pub subagent_inheritance_factor: f32,
pub high_call_rate_threshold: u32,
pub unusual_read_threshold: u32,
}Expand description
Configuration for TrajectorySentinel, nested under [security.trajectory] in TOML.
Controls signal decay, risk level thresholds, auto-recovery, and subagent inheritance.
§Example (TOML)
[security.trajectory]
decay_per_turn = 0.85
elevated_at = 2.0
high_at = 4.0
critical_at = 8.0
alert_threshold = 4.0
auto_recover_after_turns = 16
subagent_inheritance_factor = 0.5Fields§
§decay_per_turn: f32Multiplicative decay applied to the running score at each advance_turn() call.
Must be in (0.0, 1.0]. Default 0.85 gives a half-life of ≈ 4.3 turns.
window_turns: u32Number of past turns to keep in the signal buffer.
Older signals are evicted once the buffer exceeds this size. Default 8.
elevated_at: f32Score threshold for transitioning from Calm to Elevated. Default 2.0.
high_at: f32Score threshold for transitioning from Elevated to High. Default 4.0.
critical_at: f32Score threshold for transitioning from High to Critical. Default 8.0.
alert_threshold: f32Score at which PolicyGateExecutor is notified via RiskAlert. Default 4.0.
Decoupled from elevated_at to prevent alert noise for routine minor events.
auto_recover_after_turns: u32Consecutive Critical turns before a hard auto-recover reset. Minimum 4. Default 16.
subagent_inheritance_factor: f32Fraction of parent score inherited by a subagent when parent is >= Elevated.
Default 0.5 (≈ one decay half-life). Config validator warns when this deviates
more than 0.1 from decay_per_turn ^ (ln(0.5) / ln(decay_per_turn)).
high_call_rate_threshold: u32Tool-call count per 3-turn window above which HighCallRate fires. Default 12.
unusual_read_threshold: u32Distinct paths read within window_turns above which UnusualReadVolume fires. Default 24.
Implementations§
Trait Implementations§
Source§impl Clone for TrajectorySentinelConfig
impl Clone for TrajectorySentinelConfig
Source§fn clone(&self) -> TrajectorySentinelConfig
fn clone(&self) -> TrajectorySentinelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more