pub enum RiskSignal {
VigilFlagged(VigilRiskLevel),
PolicyDeny,
ExfiltrationRedaction,
OutOfScope,
PiiRedaction,
ToolFailure,
HighCallRate,
UnusualReadVolume,
ToolPairTransition,
}Expand description
Risk signal emitted by security subsystems and accumulated by TrajectorySentinel.
Each variant maps to a configurable weight (see spec 050 §2 for defaults).
NovelTool is deferred to Phase 2 and not present here.
§NEVER
Never expose signal values or the accumulated score to any LLM-callable surface.
Variants§
VigilFlagged(VigilRiskLevel)
VIGIL flagged a tool output with the given confidence level.
PolicyDeny
PolicyEnforcer denied a structured tool call.
ExfiltrationRedaction
ExfiltrationGuard redacted at least one outbound URL or HTML img.
OutOfScope
Tool call rejected as out-of-scope by ScopedToolExecutor.
PiiRedaction
PII filter redacted ≥ 1 span in a tool output.
ToolFailure
Tool returned a non-zero exit code or unrecoverable error.
HighCallRate
More than high_call_rate_threshold tool calls in the last 3 turns.
UnusualReadVolume
More than unusual_read_threshold distinct paths read in window_turns.
ToolPairTransition
A configured high-risk tool-pair transition occurred within K turns.
Implementations§
Source§impl RiskSignal
impl RiskSignal
Sourcepub fn default_weight(self) -> f32
pub fn default_weight(self) -> f32
Returns the default weight for this signal (configurable in Phase 2).
Weights are finite and non-negative; this upholds the NEVER-negative-score invariant.
Source§impl RiskSignal
impl RiskSignal
Sourcepub fn from_code(code: u8) -> Self
pub fn from_code(code: u8) -> Self
Convert a u8 signal code from RiskSignalSink callbacks into a RiskSignal.
Code table (mirrors the numeric constants used in zeph-tools):
1=PolicyDeny2=ExfiltrationRedaction3=OutOfScope4=PiiRedaction5=ToolFailure6=VigilFlagged(Medium)7=VigilFlagged(High)- anything else =
VigilFlagged(Low)(fallback)
Trait Implementations§
Source§impl Clone for RiskSignal
impl Clone for RiskSignal
Source§fn clone(&self) -> RiskSignal
fn clone(&self) -> RiskSignal
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 RiskSignal
impl Debug for RiskSignal
Source§impl PartialEq for RiskSignal
impl PartialEq for RiskSignal
Source§fn eq(&self, other: &RiskSignal) -> bool
fn eq(&self, other: &RiskSignal) -> bool
self and other values to be equal, and is used by ==.impl Copy for RiskSignal
impl Eq for RiskSignal
impl StructuralPartialEq for RiskSignal
Auto Trait Implementations§
impl Freeze for RiskSignal
impl RefUnwindSafe for RiskSignal
impl Send for RiskSignal
impl Sync for RiskSignal
impl Unpin for RiskSignal
impl UnsafeUnpin for RiskSignal
impl UnwindSafe for RiskSignal
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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