pub enum Event {
Show 36 variants
SessionCreated {
profile_revision_id: ProfileRevisionId,
},
SessionForked {
parent_session_id: SessionId,
parent_seq: u64,
},
SessionDeleted {
reason: String,
},
InputQueued {
input_id: InputId,
run_id: RunId,
mode: DeliveryMode,
content: Vec<ContentBlock>,
explicit_skill: Option<String>,
},
InputClaimed {
input_id: InputId,
run_id: RunId,
},
InputCancelled {
input_id: InputId,
run_id: RunId,
error_code: String,
},
RunStarted {
run_id: RunId,
input_id: InputId,
},
RunWaiting {
run_id: RunId,
interaction_id: InteractionId,
},
RunResumed {
run_id: RunId,
interaction_id: InteractionId,
},
RunFinished {
run_id: RunId,
status: RunStatus,
error_code: Option<String>,
},
TurnStarted {
run_id: RunId,
turn: u32,
},
TurnFinished {
run_id: RunId,
turn: u32,
},
StepStarted {
run_id: RunId,
step: u32,
},
StepFinished {
run_id: RunId,
step: u32,
},
UserMessage {
run_id: RunId,
content: Vec<ContentBlock>,
},
AssistantDelta {
run_id: RunId,
step: u32,
attempt: u32,
content: String,
},
AssistantMessage {
run_id: RunId,
step: u32,
attempt: u32,
content: Vec<ContentBlock>,
},
AssistantToolCalls {
run_id: RunId,
step: u32,
content: Option<String>,
calls: Vec<RecordedToolCall>,
},
ToolCall {
run_id: RunId,
step: u32,
call_id: ToolCallId,
tool: String,
arguments: Value,
},
ToolAuthorization {
run_id: RunId,
step: u32,
call_id: ToolCallId,
status: ToolAuthorizationStatus,
reason: Option<String>,
},
ToolExecutionStarted {
run_id: RunId,
step: u32,
call_id: ToolCallId,
},
ToolResult {
run_id: RunId,
step: u32,
call_id: ToolCallId,
result: Value,
is_error: bool,
},
UsageRecorded {
run_id: RunId,
operation_id: String,
prompt_tokens: u64,
completion_tokens: u64,
cost_units: u64,
},
RetryScheduled {
run_id: RunId,
attempt: u32,
delay_ms: u64,
reason: String,
},
ModelRequestPrepared {
run_id: RunId,
step: u32,
attempt: u32,
provider_attempt_id: String,
operation_id: String,
reserved_prompt_tokens: u64,
reserved_completion_tokens: u64,
request: Value,
prompt_sections: Value,
},
ContextInjected {
run_id: RunId,
step: u32,
contribution_id: String,
source: String,
version: String,
authority: String,
form: String,
content: Vec<ContentBlock>,
},
ModelAttemptFailed {
run_id: RunId,
step: u32,
attempt: u32,
error: String,
retryable: bool,
},
CompactionStarted {
run_id: RunId,
compaction_id: String,
source_through_seq: u64,
},
ToolResultsPruned {
run_id: RunId,
call_ids: Vec<ToolCallId>,
},
SummaryReplaced {
run_id: RunId,
through_seq: u64,
summary: String,
compactor: String,
model: String,
},
CompactionFinished {
run_id: RunId,
compaction_id: String,
status: String,
error: Option<String>,
},
InteractionRequested {
run_id: RunId,
interaction_id: InteractionId,
kind: InteractionKind,
payload: Value,
},
InteractionResolved {
run_id: RunId,
interaction_id: InteractionId,
resolution: InteractionResolution,
payload: Value,
},
ChildSessionLinked {
run_id: RunId,
child_session_id: SessionId,
provider: String,
},
Extension {
run_id: RunId,
plugin_id: String,
event_type: String,
payload: Value,
},
Opaque {
format_version: u32,
event_type: String,
ignorable: bool,
payload: Value,
},
}Expand description
Every model-visible fact and lifecycle transition of a Session. The log is the source of truth; everything else is a projection.
Variants§
SessionCreated
First event of a Session, pinning its Profile revision.
Fields
profile_revision_id: ProfileRevisionIdProfile revision the Session pins for its lifetime.
SessionForked
First event of a forked Session, citing the parent position it copied through.
Fields
SessionDeleted
Tombstone: active and queued Runs are closed, listing hides the Session, history stays readable.
InputQueued
Input entered the inbox for run_id.
InputClaimed
The Run took the input out of the inbox.
InputCancelled
The input was dropped before a Run consumed it.
Fields
RunStarted
A Run began executing.
RunWaiting
The Run parked on an interaction.
RunResumed
The Run resumed after its interaction resolved.
RunFinished
The Run reached a terminal status.
Fields
TurnStarted
A Turn opened.
TurnFinished
A Turn closed.
StepStarted
A Step opened.
StepFinished
A Step closed.
UserMessage
User content entered the transcript.
AssistantDelta
Streamed assistant text fragment.
Fields
AssistantMessage
Final assistant content for a step.
Fields
content: Vec<ContentBlock>Content blocks.
AssistantToolCalls
The model requested tool calls.
Fields
calls: Vec<RecordedToolCall>Requested calls in model order.
ToolCall
One tool call was admitted with immutable arguments.
Fields
call_id: ToolCallIdCall identity.
ToolAuthorization
Authorization outcome for a tool call.
ToolExecutionStarted
Tool execution began.
ToolResult
Tool execution finished.
Fields
call_id: ToolCallIdCall identity.
UsageRecorded
Usage settled for one idempotent operation.
Fields
RetryScheduled
A model retry was scheduled.
Fields
ModelRequestPrepared
The frozen model request before it is sent; the durable attempt identity makes crashes reconcilable.
Fields
ContextInjected
Context a contributor injected into a step.
ModelAttemptFailed
A model attempt failed.
Fields
CompactionStarted
Compaction began.
Fields
ToolResultsPruned
Large tool results were truncated in the transcript.
SummaryReplaced
A summary replaced transcript through through_seq.
Fields
CompactionFinished
Compaction finished.
Fields
InteractionRequested
The Run asked the user for an approval or answer.
Fields
interaction_id: InteractionIdInteraction identity.
kind: InteractionKindApproval or question.
InteractionResolved
The user resolved an interaction.
Fields
interaction_id: InteractionIdInteraction identity.
resolution: InteractionResolutionOutcome.
ChildSessionLinked
A child Session was created for this Run.
Fields
Extension
Plugin-defined event; readers that do not know event_type treat it as data.
Fields
Opaque
An event this build cannot decode; ignorable decides whether replay may skip it.