pub struct ShadowEvent {
pub turn: u32,
pub tools: Vec<String>,
pub max_permission_class: u8,
pub deviation_score: f32,
pub goal_summary: String,
}Expand description
A single safety-relevant observation recorded after a tool batch completes.
Events are appended to ShadowMemory in monotonic turn order. The fields capture
the most goal-relevant signals without requiring an additional LLM call.
goal_summary is truncated to GOAL_SUMMARY_MAX_CHARS on ingestion by
ShadowMemory::record, so callers do not need to truncate themselves.
Fields§
§turn: u32Monotonic turn index within the session (0-based).
tools: Vec<String>Tool names executed in this batch.
max_permission_class: u8Maximum permission class across all tools in this batch.
0 = read, 1 = write, 2 = execute, 3 = network.
deviation_score: f32Causal deviation score from TurnCausalAnalyzer.
0.0 when causal IPI is disabled or probes failed.
goal_summary: StringFirst GOAL_SUMMARY_MAX_CHARS characters of the pre-probe response.
Empty string when no pre-probe was available (causal IPI disabled).
An empty goal_summary triggers maximum Jaccard drift penalty.
Trait Implementations§
Source§impl Clone for ShadowEvent
impl Clone for ShadowEvent
Source§fn clone(&self) -> ShadowEvent
fn clone(&self) -> ShadowEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ShadowEvent
impl RefUnwindSafe for ShadowEvent
impl Send for ShadowEvent
impl Sync for ShadowEvent
impl Unpin for ShadowEvent
impl UnsafeUnpin for ShadowEvent
impl UnwindSafe for ShadowEvent
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<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