Skip to main content

EventKind

Enum EventKind 

Source
#[non_exhaustive]
pub enum EventKind {
Show 71 variants UserMessage { content: String, }, ExternalSignal { signal_type: String, data: Value, }, SessionCreated { name: String, config: Value, }, SessionResumed { from_snapshot: Option<SnapshotId>, }, SessionClosed { reason: String, }, BranchCreated { new_branch_id: BranchId, fork_point_seq: SeqNo, name: String, }, BranchMerged { source_branch_id: BranchId, merge_seq: SeqNo, }, PhaseEntered { phase: LoopPhase, }, DeliberationProposed { summary: String, proposed_tool: Option<String>, }, RunStarted { provider: String, max_iterations: u32, }, RunFinished { reason: String, total_iterations: u32, final_answer: Option<String>, usage: Option<TokenUsage>, }, RunErrored { error: String, }, StepStarted { index: u32, }, StepFinished { index: u32, stop_reason: String, directive_count: usize, }, AssistantTextDelta { delta: String, index: Option<u32>, }, AssistantMessageCommitted { role: String, content: String, model: Option<String>, token_usage: Option<TokenUsage>, }, TextDelta { delta: String, index: Option<u32>, }, Message { role: String, content: String, model: Option<String>, token_usage: Option<TokenUsage>, }, ToolCallRequested { call_id: String, tool_name: String, arguments: Value, category: Option<String>, }, ToolCallStarted { tool_run_id: ToolRunId, tool_name: String, }, ToolCallCompleted { tool_run_id: ToolRunId, call_id: Option<String>, tool_name: String, result: Value, duration_ms: u64, status: SpanStatus, }, ToolCallFailed { call_id: String, tool_name: String, error: String, }, FileWrite { path: String, blob_hash: BlobHash, size_bytes: u64, content_type: Option<String>, }, FileDelete { path: String, }, FileRename { old_path: String, new_path: String, }, FileMutated { path: String, content_hash: String, }, StatePatchCommitted { new_version: u64, patch: StatePatch, }, StatePatched { index: Option<u32>, patch: Value, revision: u64, }, ContextCompacted { dropped_count: usize, tokens_before: usize, tokens_after: usize, }, PolicyEvaluated { tool_name: String, decision: PolicyDecisionKind, rule_id: Option<String>, explanation: Option<String>, }, ApprovalRequested { approval_id: ApprovalId, call_id: String, tool_name: String, arguments: Value, risk: RiskLevel, }, ApprovalResolved { approval_id: ApprovalId, decision: ApprovalDecision, reason: Option<String>, }, SnapshotCreated { snapshot_id: SnapshotId, snapshot_type: SnapshotType, covers_through_seq: SeqNo, data_hash: BlobHash, }, SandboxCreated { sandbox_id: String, tier: String, config: Value, }, SandboxExecuted { sandbox_id: String, command: String, exit_code: i32, duration_ms: u64, }, SandboxViolation { sandbox_id: String, violation_type: String, details: String, }, SandboxDestroyed { sandbox_id: String, }, ObservationAppended { scope: MemoryScope, observation_ref: BlobHash, source_run_id: Option<String>, }, ReflectionCompacted { scope: MemoryScope, summary_ref: BlobHash, covers_through_seq: SeqNo, }, MemoryProposed { scope: MemoryScope, proposal_id: MemoryId, entries_ref: BlobHash, source_run_id: Option<String>, }, MemoryCommitted { scope: MemoryScope, memory_id: MemoryId, committed_ref: BlobHash, supersedes: Option<MemoryId>, }, MemoryTombstoned { scope: MemoryScope, memory_id: MemoryId, reason: String, }, Heartbeat { summary: String, checkpoint_id: Option<CheckpointId>, }, StateEstimated { state: AgentStateVector, mode: OperatingMode, }, BudgetUpdated { budget: BudgetState, reason: String, }, ModeChanged { from: OperatingMode, to: OperatingMode, reason: String, }, GatesUpdated { gates: Value, reason: String, }, CircuitBreakerTripped { reason: String, error_streak: u32, }, CheckpointCreated { checkpoint_id: CheckpointId, event_sequence: u64, state_hash: String, }, CheckpointRestored { checkpoint_id: CheckpointId, restored_to_seq: u64, }, VoiceSessionStarted { voice_session_id: String, adapter: String, model: String, sample_rate_hz: u32, channels: u8, }, VoiceInputChunk { voice_session_id: String, chunk_index: u64, bytes: usize, format: String, }, VoiceOutputChunk { voice_session_id: String, chunk_index: u64, bytes: usize, format: String, }, VoiceSessionStopped { voice_session_id: String, reason: String, }, VoiceAdapterError { voice_session_id: String, message: String, }, WorldModelObserved { state_ref: BlobHash, meta: Value, }, WorldModelRollout { trajectory_ref: BlobHash, score: Option<f32>, }, IntentProposed { intent_id: String, kind: String, risk: Option<RiskLevel>, }, IntentEvaluated { intent_id: String, allowed: bool, requires_approval: bool, reasons: Vec<String>, }, IntentApproved { intent_id: String, actor: Option<String>, }, IntentRejected { intent_id: String, reasons: Vec<String>, }, HiveTaskCreated { hive_task_id: HiveTaskId, objective: String, agent_count: u32, }, HiveArtifactShared { hive_task_id: HiveTaskId, source_session_id: SessionId, score: f32, mutation_summary: String, }, HiveSelectionMade { hive_task_id: HiveTaskId, winning_session_id: SessionId, winning_score: f32, generation: u32, }, HiveGenerationCompleted { hive_task_id: HiveTaskId, generation: u32, best_score: f32, agent_results: Value, }, HiveTaskCompleted { hive_task_id: HiveTaskId, total_generations: u32, total_trials: u32, final_score: f32, }, Queued { queue_id: String, mode: SteeringMode, message: String, }, Steered { queue_id: String, preempted_at: String, }, QueueDrained { queue_id: String, processed: usize, }, ErrorRaised { message: String, }, Custom { event_type: String, data: Value, },
}
Expand description

Discriminated union of ALL Agent OS event types.

This is the canonical taxonomy that all projects (Arcan, Lago, aiOS, Autonomic) must use. Merges ~55 variants from three separate models.

Forward-compatible: unknown "type" tags deserialize into Custom.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UserMessage

Fields

§content: String
§

ExternalSignal

Fields

§signal_type: String
§data: Value
§

SessionCreated

Fields

§name: String
§config: Value
§

SessionResumed

Fields

§from_snapshot: Option<SnapshotId>
§

SessionClosed

Fields

§reason: String
§

BranchCreated

Fields

§new_branch_id: BranchId
§fork_point_seq: SeqNo
§name: String
§

BranchMerged

Fields

§source_branch_id: BranchId
§merge_seq: SeqNo
§

PhaseEntered

Fields

§

DeliberationProposed

Fields

§summary: String
§proposed_tool: Option<String>
§

RunStarted

Fields

§provider: String
§max_iterations: u32
§

RunFinished

Fields

§reason: String
§total_iterations: u32
§final_answer: Option<String>
§

RunErrored

Fields

§error: String
§

StepStarted

Fields

§index: u32
§

StepFinished

Fields

§index: u32
§stop_reason: String
§directive_count: usize
§

AssistantTextDelta

Fields

§delta: String
§index: Option<u32>
§

AssistantMessageCommitted

Fields

§role: String
§content: String
§token_usage: Option<TokenUsage>
§

TextDelta

Fields

§delta: String
§index: Option<u32>
§

Message

Fields

§role: String
§content: String
§token_usage: Option<TokenUsage>
§

ToolCallRequested

Fields

§call_id: String
§tool_name: String
§arguments: Value
§category: Option<String>
§

ToolCallStarted

Fields

§tool_run_id: ToolRunId
§tool_name: String
§

ToolCallCompleted

Fields

§tool_run_id: ToolRunId
§call_id: Option<String>
§tool_name: String
§result: Value
§duration_ms: u64
§status: SpanStatus
§

ToolCallFailed

Fields

§call_id: String
§tool_name: String
§error: String
§

FileWrite

Fields

§path: String
§blob_hash: BlobHash
§size_bytes: u64
§content_type: Option<String>
§

FileDelete

Fields

§path: String
§

FileRename

Fields

§old_path: String
§new_path: String
§

FileMutated

Fields

§path: String
§content_hash: String
§

StatePatchCommitted

Fields

§new_version: u64
§

StatePatched

Fields

§index: Option<u32>
§patch: Value
§revision: u64
§

ContextCompacted

Fields

§dropped_count: usize
§tokens_before: usize
§tokens_after: usize
§

PolicyEvaluated

Fields

§tool_name: String
§rule_id: Option<String>
§explanation: Option<String>
§

ApprovalRequested

Fields

§approval_id: ApprovalId
§call_id: String
§tool_name: String
§arguments: Value
§

ApprovalResolved

Fields

§approval_id: ApprovalId
§reason: Option<String>
§

SnapshotCreated

Fields

§snapshot_id: SnapshotId
§snapshot_type: SnapshotType
§covers_through_seq: SeqNo
§data_hash: BlobHash
§

SandboxCreated

Fields

§sandbox_id: String
§tier: String
§config: Value
§

SandboxExecuted

Fields

§sandbox_id: String
§command: String
§exit_code: i32
§duration_ms: u64
§

SandboxViolation

Fields

§sandbox_id: String
§violation_type: String
§details: String
§

SandboxDestroyed

Fields

§sandbox_id: String
§

ObservationAppended

Fields

§observation_ref: BlobHash
§source_run_id: Option<String>
§

ReflectionCompacted

Fields

§summary_ref: BlobHash
§covers_through_seq: SeqNo
§

MemoryProposed

Fields

§proposal_id: MemoryId
§entries_ref: BlobHash
§source_run_id: Option<String>
§

MemoryCommitted

Fields

§memory_id: MemoryId
§committed_ref: BlobHash
§supersedes: Option<MemoryId>
§

MemoryTombstoned

Fields

§memory_id: MemoryId
§reason: String
§

Heartbeat

Fields

§summary: String
§checkpoint_id: Option<CheckpointId>
§

StateEstimated

§

BudgetUpdated

Fields

§reason: String
§

ModeChanged

§

GatesUpdated

Fields

§gates: Value
§reason: String
§

CircuitBreakerTripped

Fields

§reason: String
§error_streak: u32
§

CheckpointCreated

Fields

§checkpoint_id: CheckpointId
§event_sequence: u64
§state_hash: String
§

CheckpointRestored

Fields

§checkpoint_id: CheckpointId
§restored_to_seq: u64
§

VoiceSessionStarted

Fields

§voice_session_id: String
§adapter: String
§model: String
§sample_rate_hz: u32
§channels: u8
§

VoiceInputChunk

Fields

§voice_session_id: String
§chunk_index: u64
§bytes: usize
§format: String
§

VoiceOutputChunk

Fields

§voice_session_id: String
§chunk_index: u64
§bytes: usize
§format: String
§

VoiceSessionStopped

Fields

§voice_session_id: String
§reason: String
§

VoiceAdapterError

Fields

§voice_session_id: String
§message: String
§

WorldModelObserved

Fields

§state_ref: BlobHash
§meta: Value
§

WorldModelRollout

Fields

§trajectory_ref: BlobHash
§score: Option<f32>
§

IntentProposed

Fields

§intent_id: String
§kind: String
§

IntentEvaluated

Fields

§intent_id: String
§allowed: bool
§requires_approval: bool
§reasons: Vec<String>
§

IntentApproved

Fields

§intent_id: String
§

IntentRejected

Fields

§intent_id: String
§reasons: Vec<String>
§

HiveTaskCreated

Fields

§hive_task_id: HiveTaskId
§objective: String
§agent_count: u32
§

HiveArtifactShared

Fields

§hive_task_id: HiveTaskId
§source_session_id: SessionId
§score: f32
§mutation_summary: String
§

HiveSelectionMade

Fields

§hive_task_id: HiveTaskId
§winning_session_id: SessionId
§winning_score: f32
§generation: u32
§

HiveGenerationCompleted

Fields

§hive_task_id: HiveTaskId
§generation: u32
§best_score: f32
§agent_results: Value
§

HiveTaskCompleted

Fields

§hive_task_id: HiveTaskId
§total_generations: u32
§total_trials: u32
§final_score: f32
§

Queued

Fields

§queue_id: String
§message: String
§

Steered

Fields

§queue_id: String
§preempted_at: String

Tool boundary where preemption occurred (e.g. “tool:read_file:call-3”).

§

QueueDrained

Fields

§queue_id: String
§processed: usize
§

ErrorRaised

Fields

§message: String
§

Custom

Fields

§event_type: String
§data: Value

Trait Implementations§

Source§

impl Clone for EventKind

Source§

fn clone(&self) -> EventKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EventKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EventKind

Forward-compatible deserializer: unknown variants become Custom.

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for EventKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,