Core

GenerativeA11yEvent

Report responses, tools, interactions, approvals, connection changes, and citations with this event union.

Event families

Events describe actions and changes your app can confirm. They contain serializable data, not rendered components or private framework state.

FamilyEventsRequired identity
Responsestarted, text.delta, completed, interrupted, failed, retryingresponseId
Toolstarted, progress, completed, failedtoolId
Interactionrequested, resolvedinteractionId
Approvalrequested, resolvedapprovalId
Connectionlost, restorednone
CitationavailableresponseId

Response replacement example

Use responseInstanceId when one logical response can be replaced. Late events from the old instance are suppressed as stale.

typescript
runtime.dispatch({
  type: "response.retrying",
  responseId: "report",
  responseInstanceId: "attempt-1",
  nextResponseInstanceId: "attempt-2",
  attempt: 2,
});

How this code works

  1. 01
    Keep logical identity

    responseId continues to identify the answer being regenerated.

  2. 02
    Replace the epoch

    nextResponseInstanceId becomes the accepted attempt for later deltas and terminals.

Common fields

ID fields connect related events. Labels and messages contain translated text for users.

Options and return values

typestring literalRequired

Selects one member of the discriminated event union.

Default
n/a
eventIdstringOptional

Connects an event to your app's logs without being used as the ID for a response, tool, or interaction.

Default
undefined
localestringOptional

Carries the language for user-facing text into intents and DOM delivery.

Default
undefined
label / message / announcementstringEvent-specific

Short, translated text supplied by your app. Do not pass raw arguments, results, or backend errors.

Default
undefined