Skip to main content

Module protocol

Module protocol 

Source
Expand description

The small event protocol shared by agent frontends.

Structs§

ApprovalCall
AssistantContentDeltaEvent
AssistantMessageEvent
ErrorEvent
Event
An event emitted to a frontend.
ExecApprovalRequestEvent
FrontendAction
One labeled, icon-forward action attached to a list item.
FrontendActionListItem
One compact status row with optional trailing actions.
FrontendBlock
Capability-rendered transcript content with frontend-neutral formatting and tone.
FrontendCommand
A frontend command declared by a capability.
FrontendContribution
UI metadata exported by one capability.
FrontendPickerOption
One selectable action supplied by a capability.
FrontendPreviewEvent
One timestamped semantic event shown inside a capability preview.
FrontendProgress
Determinate progress rendered by a frontend widget.
FrontendReference
One chat reference supplied by a capability.
FrontendSetting
One schema-advertised setting rendered by a thin frontend.
FrontendSettingOption
One exact value in a schema-advertised select control.
FrontendWidget
One capability-rendered view mounted into a standard frontend slot.
MessageEvent
One accepted conversation message.
MessageSubmission
One provider-neutral conversation message submitted to an agent.
MessageTarget
Exact durable transcript prefix selected by a message action.
MiddlewareFeature
One middleware entry and its frontend-neutral configuration controls.
ModelChangedEvent
ModelChoice
One selectable runtime model route.
ModelInfo
Human-readable model settings exposed to frontends.
ModelStepCompletedEvent
The terminal record for one provider request.
ModelStepContent
One complete normalized text item produced by a model step.
ModelStepDiagnostics
Provider-owned cost and prompt-cache observations for one completed request.
ModelStepStartedEvent
One provider request becoming active within a turn.
PromptCacheDiagnostics
Prompt-cache behavior observed for one completed request.
RenderedBlock
A block together with its explicit semantic owner.
SessionConfiguredEvent
Immutable session data emitted once when an agent starts or resumes.
SessionContext
Frontend-visible context for the session owner, workspace, and origin.
SessionFileLimits
Session-file policy advertised to frontends by the owning runtime.
SessionFileRecord
One stored session file together with its producer.
SessionFileReference
One immutable, session-bound file addressed by an opaque reference.
SessionHistoryEvent
A restored transcript kept distinct from live turn lifecycle events.
SessionResumeRequestedEvent
Submission
A command submitted by a frontend.
SubmissionRejectedEvent
A submission the agent rejected without changing durable turn state.
TokenCountEvent
TokenUsage
TokenUsageInfo
ToolCallBeginEvent
ToolCallEndEvent
ToolLoadEvent
Deferred tool schemas materialized at one model-context position.
TurnAbortedEvent
TurnCompleteEvent
TurnStartedEvent
WarningEvent
WebSearchBeginEvent
WebSearchEndEvent

Enums§

ActiveMessageDelivery
Requested delivery for a message submitted while a turn is active.
ErrorKind
Stable frontend classification for framework failures.
EventMsg
Events supported by the minimal frontend contract.
FrontendBlockFormat
Frontend-neutral structure carried by a transcript block.
FrontendBlockRole
Semantic category used for grouping, summaries, filtering, and icons.
FrontendBlockState
Lifecycle state of one rendered transcript block.
FrontendBlockUpdate
How a block changes the matching capability-scoped ID.
FrontendEvent
Generic capability UI updates understood by every frontend.
FrontendListItemState
Semantic state for one compact list row.
FrontendPreviewUpdate
How one preview page changes the matching frontend preview.
FrontendSettingKind
Generic control metadata for a schema-advertised setting.
FrontendSettingValue
Scalar value accepted by the generic setting controls.
FrontendSlot
Stable locations a thin frontend shell makes available to capabilities.
FrontendSymbol
A presentation hint rather than a name from any one icon set, the same way FrontendTone names a role instead of a color.
FrontendTone
A presentation hint rather than a terminal-specific color.
FrontendWidgetContent
Capability-owned content shown when a frontend widget is opened.
MessageAuthor
Who submitted one conversation message.
MessageDelivery
How one accepted message actually entered the conversation.
ModelEvent
Provider-neutral streaming output before submission correlation is attached.
ModelStepAnnotation
A provider-neutral annotation attached to one complete text part.
ModelStepContentPhase
Semantic role of text preserved in a completed model step.
ModelStepOutcome
Provider-neutral outcome of a completed model step.
Op
Commands supported by the agent.
PromptCacheMode
Provider-advertised prompt-cache behavior.
PromptCacheOutcome
Cache result inferred from provider usage and local rewrite metadata.
ReviewDecision
A user’s decision for a paused tool batch.
SessionFileOrigin
Which side of a session produced one stored file.
ToolDiscoveryMode
How a model route makes newly discovered tool schemas available.
WebSearchAction
Provider-neutral action reported by hosted web search.

Constants§

MAX_CAPABILITY_INPUT_BYTES
Maximum UTF-8 bytes accepted in capability command input or a queued message edit.
MAX_MESSAGE_BYTES
Maximum total UTF-8 bytes accepted in one user-input submission.

Functions§

replay_events
Reconstructs frontend-neutral events from positioned durable transcript items.