ChatEvent
Protocol-neutral stream events. They map 1:1 onto the AI SDK UI Message Stream chunk types, so every backend (UI Message Stream, OpenAI, Anthropic, mock) translates its wire format into the same small vocabulary.
Inheritors
Types
Link copied to clipboard
Merged into Message.metadata (AI SDK message-metadata).
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Snapshot of a delegated agent's run inside tool call id (populated by the backend).
Link copied to clipboard
data class ToolApprovalRequest(val id: String, val answers: ApprovalAnswers = dev.ai.elements.core.model.ApprovalAnswers.All) : ChatEvent
The backend is waiting for ToolApprover to approve this tool call; answers says what its protocol can carry back beyond yes / no.
Link copied to clipboard
The user approved; the tool runs (or the server continues) next.
Link copied to clipboard
The user denied the call, optionally saying why.
Link copied to clipboard
data class ToolInputAvailable(val id: String, val name: String, val input: String, val title: String? = null, val kind: ToolKind? = null, val source: String? = null, val category: ToolCategory? = null, val location: String? = null) : ChatEvent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class ToolOutput(val id: String, val output: String, val preliminary: Boolean = false) : ChatEvent
A tool result; preliminary results are replaced by later ones (AI SDK preliminary tool results).