Skip to main content

Crate vtcode_exec_events

Crate vtcode_exec_events 

Source
Expand description

Structured execution telemetry events shared across VT Code crates.

This crate exposes the serialized schema for thread lifecycle updates, command execution results, and other timeline artifacts emitted by the automation runtime. Downstream applications can deserialize these structures to drive dashboards, logging, or auditing pipelines without depending on the full vtcode-core crate.

§Agent Trace Support

This crate implements the Agent Trace specification for tracking AI-generated code attribution. See the trace module for details.

Re-exports§

pub use diagnostic::Diagnostic;
pub use diagnostic::DiagnosticAction;
pub use diagnostic::DiagnosticSeverity;
pub use items::AgentMessageItem;
pub use items::AppPreviewItem;
pub use items::AppUiPosture;
pub use items::CommandExecutionItem;
pub use items::CommandExecutionStatus;
pub use items::DecisionItem;
pub use items::FileChangeItem;
pub use items::FileUpdateChange;
pub use items::McpToolCallItem;
pub use items::McpToolCallStatus;
pub use items::PatchApplyStatus;
pub use items::PatchChangeKind;
pub use items::PlanItem;
pub use items::ReasoningItem;
pub use items::ThreadItem;
pub use items::ThreadItemDetails;
pub use items::ToolCallStatus;
pub use items::ToolInvocationItem;
pub use items::ToolOutcome;
pub use items::ToolOutputItem;
pub use items::WebSearchItem;
pub use items::tool_outcome_from_status;

Modules§

atif
Agent Trajectory Interchange Format (ATIF) types and builder.
diagnostic
Operational diagnostics shared by runtime events, agents, and human surfaces.
items
Timeline item payloads carried by thread item events.
matrix
Canonical durable contracts for local matrix execution.
planning
Persisted planning recovery state. Answers to recovery prompts never grant approval.
schema
trace
Agent Trace specification types for AI code attribution.

Structs§

AppSandboxDeniedEvent
ContextResetEvent
ErrorItem
ExecutionContext
Optional recorded execution ancestry. Absent fields are historical gaps.
HarnessEventItem
InterjectedEvent
ItemCompletedEvent
ItemContext
Item identity, timing, and command semantics for explanation consumers.
ItemStartedEvent
ItemUpdatedEvent
LogEmitter
Emits JSON serialized events to the log facade at the configured level.
OtelEmitter
Emits ThreadEvents as OpenTelemetry spans and span events.
PermissionRequestedEvent
PermissionResolvedEvent
PlanApprovalRequestedEvent
PlanApprovalResolvedEvent
PlanDeltaEvent
ThreadCompactBoundaryEvent
ThreadCompletedEvent
ThreadErrorEvent
ThreadStartedEvent
TokenBreakdown
Per-request token-budget breakdown for the assembled first-request prefix.
TracingEmitter
Emits structured events as tracing events at the specified level.
TurnBlockedEvent
TurnCompletedEvent
TurnFailedEvent
TurnStartedEvent
Usage
VersionedThreadEvent
Wraps a ThreadEvent with schema metadata so downstream consumers can negotiate compatibility before processing an event stream.

Enums§

CommandActivity
Recorded shell classification, supplied by the runtime’s shared classifier.
CompactionMode
CompactionTrigger
ContextResetTrigger
HarnessEventKind
InputOrigin
Origin of a turn’s input; internal turns retain their parent task.
InterjectionSource
PermissionDecision
PlanApprovalDecision
RedirectKind
ThreadCompletionSubtype
ThreadEvent
Structured events emitted during autonomous execution.

Constants§

EVENT_SCHEMA_VERSION
Semantic version of the serialized event schema exported by this crate.
MAX_IN_PROGRESS_EXEC_SESSIONS
Bound on exec session ids recorded in one turn’s turn.completed event. Mirrors SnapshotTurnDiagnostics::in_progress_exec_sessions (cap 4, newest first) so ThreadEvent and checkpoint diagnostics cannot drift.

Traits§

EventEmitter
Sink for processing ThreadEvent instances.

Functions§

deserialize_null_as_default
Serde helper that accepts explicit null as T::default() for backward-compatible checkpoint/diagnostics payloads. Pair with #[serde(default, deserialize_with = "deserialize_null_as_default")] so both missing and null fields degrade to the default instead of failing deserialization. Reused by downstream crates (e.g. vtcode-core snapshots) so the null-tolerance rule cannot drift between copies.