pub struct TurnContext(/* private fields */);Expand description
The relay and runtime share this small process-local evidence accumulator.
Implementations§
Source§impl TurnContext
impl TurnContext
Sourcepub fn mark_parent_activity(&self)
pub fn mark_parent_activity(&self)
Process-local parent clock; child traffic and inventory updates never mark it.
pub fn parent_activity(&self) -> Option<Instant>
pub fn set_decision_log(&self, log: DecisionLog)
pub fn decision_log(&self) -> Option<DecisionLog>
pub fn reset(&self, prompt: &str)
Sourcepub fn observe_relay(
&self,
observation: &RelayObservation,
prompt: Option<&str>,
)
pub fn observe_relay( &self, observation: &RelayObservation, prompt: Option<&str>, )
Record durable transcript observations through the same path during live work and replay.
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Invalidate a pending verdict at a lifecycle boundary without discarding evidence.
pub fn generation(&self) -> u64
pub fn counts(&self) -> (usize, usize)
pub fn set_counts(&self, background_commands: usize, queued_commands: usize)
pub fn set_session_id(&self, session_id: &str)
pub fn session_id(&self) -> String
Sourcepub fn set_background_inventory(
&self,
commands: Vec<BackgroundCommand>,
native_agent_ids: Vec<String>,
)
pub fn set_background_inventory( &self, commands: Vec<BackgroundCommand>, native_agent_ids: Vec<String>, )
Compare identities as well as counts; identical level reports are not activity.
pub fn observe(&self, update: &SessionUpdate)
pub fn observe_terminal(&self, record: &TerminalOutputRecord)
pub fn mark_earlier_history_omitted(&self)
pub fn clear_history(&self)
pub fn evidence( &self, harness: HarnessKind, phase: TurnPhase, facts: &ActivityFacts, now_ms: i64, ) -> TurnEvidence
Trait Implementations§
Source§impl Clone for TurnContext
impl Clone for TurnContext
Source§impl Debug for TurnContext
impl Debug for TurnContext
Auto Trait Implementations§
impl Freeze for TurnContext
impl RefUnwindSafe for TurnContext
impl Send for TurnContext
impl Sync for TurnContext
impl Unpin for TurnContext
impl UnsafeUnpin for TurnContext
impl UnwindSafe for TurnContext
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
Mutably borrows from an owned value. Read more
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.