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.
Sourcepub fn mark_parent_activity_at(&self, at: Instant)
pub fn mark_parent_activity_at(&self, at: Instant)
Record the monotonic time at which parent activity was observed.
pub fn parent_activity(&self) -> Option<Instant>
pub fn set_decision_log(&self, log: DecisionLog)
pub fn decision_log(&self) -> Option<DecisionLog>
Sourcepub fn reset(&self, command_id: Option<&str>, prompt: &str)
pub fn reset(&self, command_id: Option<&str>, prompt: &str)
Start a turn. user_prompt_tail carries the prompt only when the
person wrote it: a prompt Mjolnir submitted (a mailbox wake, a child
report, a continuation, a parent’s message to a child) is not the
person’s latest request, and Jev scored those turns better without it
(.agents/docs/jev-still-open-20261106.md).
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
Publish the relay owner’s durable user-instruction history to the ACP classifier. A change invalidates any request built from older context.
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.