pub struct SessionTaintTracker { /* private fields */ }Expand description
Session-sticky taint tracker (§10.1, coarse P1). Cheap to clone; clones share state.
Implementations§
Source§impl SessionTaintTracker
impl SessionTaintTracker
pub fn new(config: ContentTrustConfig) -> Self
Sourcepub fn set_outbound_taint_declarer(&self, declarer: OutboundTaintDeclarer)
pub fn set_outbound_taint_declarer(&self, declarer: OutboundTaintDeclarer)
Wire the §10.1 outbound-taint declarer (bound to the mob handle at gateway bootstrap). Shared across clones.
Sourcepub fn set_event_sink(&self, sink: Arc<dyn MemoryEventSink>)
pub fn set_event_sink(&self, sink: Arc<dyn MemoryEventSink>)
Wire the §9.3 timeline sink so taint transitions surface on the console alongside the tracing warns. Shared across clones.
Sourcepub fn observe_agent_event(&self, identity: &str, event: &AgentEvent)
pub fn observe_agent_event(&self, identity: &str, event: &AgentEvent)
Observe one agent event for identity (the observe-only agent-event
stream is per-member, so attribution is the subscription’s).
Sourcepub fn note_current_session(&self, identity: &str, session_key: &str)
pub fn note_current_session(&self, identity: &str, session_key: &str)
Authoritative current-session hint from the identity runtime’s delivery path. Keeps the tracker’s attribution ahead of the (async) observe stream on the paths MobKit controls.
Sourcepub fn clear_identity(&self, identity: &str)
pub fn clear_identity(&self, identity: &str)
Explicit clear for the reset path (reset() is the operator’s escape
hatch from a poisoned session). Rotation already clears implicitly;
this also drops any pending pre-attribution taint. The outgoing
session’s fact is deliberately retained (P2): “that session was
tainted” stays true after the identity moves on, and the comms join
and the Distiller’s evidence gate consult it for exactly such
sessions.
Sourcepub fn mark_reset_boundary(&self, session_key: &str)
pub fn mark_reset_boundary(&self, session_key: &str)
Mark a reset() boundary on the outgoing session (§8.4): every
LLM-authored write whose evidence cites this session quarantines
pending steward review, regardless of content taint. Idempotent.
Sourcepub fn evidence_quarantine_reason(&self, session_key: &str) -> Option<String>
pub fn evidence_quarantine_reason(&self, session_key: &str) -> Option<String>
§10.1/§8.4 evidence gate query: why a write citing session_key as
evidence must quarantine, if it must. Coarse by design: the tracker
holds session-sticky facts, so a tainted session taints every
evidence range within it.
Sourcepub fn session_taint(&self, session_key: &str) -> Option<TaintState>
pub fn session_taint(&self, session_key: &str) -> Option<TaintState>
Taint fact for an explicit session key.
Sourcepub fn identity_taint(&self, identity: &str) -> Option<TaintState>
pub fn identity_taint(&self, identity: &str) -> Option<TaintState>
Taint fact for the identity’s currently-attributed session (the write gate’s query: LLM-authored writes carry identity, not session).
Trait Implementations§
Source§impl Clone for SessionTaintTracker
impl Clone for SessionTaintTracker
Source§fn clone(&self) -> SessionTaintTracker
fn clone(&self) -> SessionTaintTracker
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for SessionTaintTracker
impl Default for SessionTaintTracker
Source§fn default() -> SessionTaintTracker
fn default() -> SessionTaintTracker
Source§impl MemberAgentEventSink for SessionTaintTracker
impl MemberAgentEventSink for SessionTaintTracker
fn observe(&self, identity: &str, envelope: &EventEnvelope<AgentEvent>)
Auto Trait Implementations§
impl Freeze for SessionTaintTracker
impl RefUnwindSafe for SessionTaintTracker
impl Send for SessionTaintTracker
impl Sync for SessionTaintTracker
impl Unpin for SessionTaintTracker
impl UnsafeUnpin for SessionTaintTracker
impl UnwindSafe for SessionTaintTracker
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 more