Events#

Distinguish UI streams, extension notifications, and external replies.

Read the walkthrough before consulting individual signatures.

Public interfaces#

Interface

Purpose

AgentEventDispatcher

Dispatch streamed events to optional asynchronous callbacks.

AgentEvent

One UI-facing event emitted by Agent.stream().

AgentEventType

Events consumed by a streaming UI or application.

AgentPhase

Exclusive execution phase of one request-scoped AgentState.

AgentPhaseTransitionMixin

Own and validate every transition in the Agent request state machine.

ModelOutputTracker

Validate and publish output boundaries for one model call.

CompactionEvent

A completed context compaction.

ContentCompletedEvent

The answer-content segment of one model call ended.

ContentStartedEvent

The first non-empty answer-content delta of one model call arrived.

ExtensionEvent

Immutable notification broadcast or routed to a named extension.

InternalMessageEvent

Request that the active Agent process one internal instruction.

MessageAppendedEvent

One newly produced raw message; restoration and compaction do not emit it.

MessageTiming

Persistable timing measurements for one immutable Raw Log message.

PhaseTransitionEvent

One validated request-state transition published after the phase changes.

ReasoningCompletedEvent

The reasoning segment of one model call ended.

ReasoningStartedEvent

The first non-empty reasoning delta of one model call arrived.

RunCancelledEvent

A request entered CANCELLED; delivered after its PhaseTransitionEvent.

SteeringMessageEvent

Urgent user input replacing continuation at the next model/tool boundary.