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.
| Family | Events | Required identity |
|---|---|---|
| Response | started, text.delta, completed, interrupted, failed, retrying | responseId |
| Tool | started, progress, completed, failed | toolId |
| Interaction | requested, resolved | interactionId |
| Approval | requested, resolved | approvalId |
| Connection | lost, restored | none |
| Citation | available | responseId |
Response replacement example
Use responseInstanceId when one logical response can be replaced. Late events from the old instance are suppressed as stale.
runtime.dispatch({
type: "response.retrying",
responseId: "report",
responseInstanceId: "attempt-1",
nextResponseInstanceId: "attempt-2",
attempt: 2,
});How this code works
- 01Keep logical identity
responseIdcontinues to identify the answer being regenerated. - 02Replace the epoch
nextResponseInstanceIdbecomes 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