pub enum SessionRecord {
Show 16 variants
SessionCreated {
profile_id: ProfileId,
metadata: ProtocolMetadata,
},
MessageCommitted {
message: CanonicalMessage,
},
ConfigurationChanged {
model: Option<ModelRef>,
profile_id: Option<ProfileId>,
reasoning_effort: Option<ReasoningEffort>,
},
ToolCallRequested {
tool_call_id: ToolCallId,
tool_name: String,
arguments: Value,
},
PolicyDecisionRecorded {
tool_call_id: ToolCallId,
decision: PolicyDecision,
},
ApprovalRequested {
approval_id: ApprovalId,
tool_call_id: ToolCallId,
expires_at: ProtocolTimestamp,
},
ApprovalResolved {
approval_id: ApprovalId,
decision: ApprovalDecision,
},
ToolExecutionStarted {
tool_call_id: ToolCallId,
execution_target: ExecutionTarget,
idempotency: ToolIdempotency,
},
ToolExecutionFinished {
tool_call_id: ToolCallId,
is_error: bool,
content: Vec<ContentBlock>,
error: Option<ToolFailure>,
presentation: Option<ToolPresentation>,
},
ToolExecutionInterrupted {
tool_call_id: ToolCallId,
reason: String,
},
RunInterrupted {
run_id: RunId,
turn_id: TurnId,
reason: String,
},
RunCancelled {
run_id: RunId,
},
BranchCreated {
source_branch_id: BranchId,
branch_id: BranchId,
from_record_id: RecordId,
},
ActiveBranchChanged {
branch_id: BranchId,
},
SessionCompacted {
summary: CanonicalMessage,
compacted_through_record_id: RecordId,
},
TurnCheckpointed {
run_id: RunId,
turn_id: TurnId,
next_action: NextTurnAction,
},
}Expand description
A typed durable fact used for deterministic session replay.
Variants§
SessionCreated
A session was created with its initial profile and extension metadata.
Fields
metadata: ProtocolMetadataBounded session metadata.
MessageCommitted
A canonical message was committed.
Fields
message: CanonicalMessageDurable canonical message.
ConfigurationChanged
Model or profile configuration changed.
Fields
reasoning_effort: Option<ReasoningEffort>New provider-neutral reasoning effort when changed.
ToolCallRequested
A complete tool call became durable before policy/execution.
Fields
tool_call_id: ToolCallIdCanonical tool-call identifier.
PolicyDecisionRecorded
Policy produced a durable decision for a tool call.
Fields
tool_call_id: ToolCallIdTool call evaluated by policy.
decision: PolicyDecisionStable policy outcome.
ApprovalRequested
Interactive approval became pending.
Fields
approval_id: ApprovalIdApproval request identifier.
tool_call_id: ToolCallIdTool call awaiting approval.
expires_at: ProtocolTimestampApproval expiry.
ApprovalResolved
Interactive approval reached a terminal decision.
Fields
approval_id: ApprovalIdApproval request identifier.
decision: ApprovalDecisionStable approval decision.
ToolExecutionStarted
Tool execution started before crossing an uncertain external boundary.
Fields
tool_call_id: ToolCallIdTool call being executed.
execution_target: ExecutionTargetExecutor boundary.
idempotency: ToolIdempotencyDeclared recovery/retry semantics.
ToolExecutionFinished
Tool execution reached a durable terminal result.
Fields
tool_call_id: ToolCallIdTool call that reached a terminal result.
content: Vec<ContentBlock>Canonical display/model result content.
error: Option<ToolFailure>Machine-readable failure, required exactly when is_error is true.
presentation: Option<ToolPresentation>Optional bounded UI-only presentation retained out of model context.
ToolExecutionInterrupted
Started tool execution was interrupted and its outcome is uncertain.
Fields
tool_call_id: ToolCallIdTool call with uncertain outcome.
RunInterrupted
Provider streaming stopped before a terminal message was durable.
Fields
RunCancelled
An active run was explicitly cancelled.
BranchCreated
A new branch was created without rewriting parent history.
Fields
ActiveBranchChanged
Active branch leaf changed durably.
SessionCompacted
A compaction summary was committed with source provenance.
Fields
summary: CanonicalMessageSummary message.
TurnCheckpointed
A turn reached a durable checkpoint before its next action.
Implementations§
Source§impl SessionRecord
impl SessionRecord
Sourcepub const fn record_type(&self) -> SessionRecordType
pub const fn record_type(&self) -> SessionRecordType
Returns the stable durable record discriminator.
Trait Implementations§
Source§impl Clone for SessionRecord
impl Clone for SessionRecord
Source§fn clone(&self) -> SessionRecord
fn clone(&self) -> SessionRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more