pub struct TurnTrace {
pub session_id: Option<SessionId>,
pub turn_id: Option<TurnId>,
pub run_ids: Vec<RunId>,
pub attempt_ids: Vec<AttemptId>,
pub message_ids: Vec<MessageId>,
pub context_projection_ids: Vec<ContextProjectionId>,
pub effect_ids: Vec<EffectId>,
pub tool_call_ids: Vec<ToolCallId>,
pub event_indexes: Vec<EventIndexProjection>,
pub records: Vec<JournalRecord>,
}Expand description
Derived evidence for one turn. Build this from journal records when a host needs to inspect the actions causally associated with a user message.
Fields§
§session_id: Option<SessionId>Optional host-provided session identifier for grouping related turns.
turn_id: Option<TurnId>Turn identifier for one loop turn within a run.
run_ids: Vec<RunId>Run identifiers causally associated with this trace.
attempt_ids: Vec<AttemptId>Attempt identifiers observed in this trace.
message_ids: Vec<MessageId>Message identifiers observed in this trace.
context_projection_ids: Vec<ContextProjectionId>Context projection identifiers observed in this trace.
effect_ids: Vec<EffectId>Effect identifiers observed in this trace.
tool_call_ids: Vec<ToolCallId>Tool call identifiers observed in this trace.
event_indexes: Vec<EventIndexProjection>Event-index projections stored alongside matching journal records.
records: Vec<JournalRecord>Matching durable journal records in journal order.
Implementations§
Source§impl TurnTrace
impl TurnTrace
Sourcepub fn from_records<'a>(
turn_id: &TurnId,
records: impl IntoIterator<Item = &'a JournalRecord>,
) -> Self
pub fn from_records<'a>( turn_id: &TurnId, records: impl IntoIterator<Item = &'a JournalRecord>, ) -> Self
Builds a trace for one turn id from durable journal records. Matching is envelope based and does not inspect raw content.