Interface: ChannelErrorMessage
Defined in: packages/aiui-claude-channel/src/channel.ts:54
The generic server → client error push — the one message shape every server-side failure surfaces through, so the page can show the user what went wrong instead of failing silently (the status quo this replaces: errors that only reached the channel process's log, or per-frame ok:false acks the client dropped on the floor). Like every push it is distinguished from a per-frame ack by its kind; old clients ignore unknown kinds by design, so the message is additive and PROTOCOL_VERSION is unaffected.
Format-agnostic on purpose: intent-v1 pushes it today (transcription / correction / speech failures), but any current or future processor — or the transport itself — can reuse it via pushError. The intent client renders these as dismissible toasts, and merges its own client-detected failures (socket refused, socket dropped) into the same surface; its ErrorMessage in aiui-intent-runtime/src/protocol.ts mirrors this shape — change both together.
Properties
data?
optionaldata?:unknown
Defined in: packages/aiui-claude-channel/src/channel.ts:75
Optional structured payload — the raw upstream error (an API error body, a WebSocket close code + reason) exactly as the server saw it. The intent client renders it behind an expander so the human can read what the API actually said instead of only our gloss. JSON-serializable.
detail?
optionaldetail?:string
Defined in: packages/aiui-claude-channel/src/channel.ts:68
Optional second line: remediation hints, the upstream error body, etc.
kind
kind:
"error"
Defined in: packages/aiui-claude-channel/src/channel.ts:55
message
message:
string
Defined in: packages/aiui-claude-channel/src/channel.ts:66
One informative human-readable sentence — what failed, and what to do.
source?
optionalsource?:string
Defined in: packages/aiui-claude-channel/src/channel.ts:64
A coarse category for the failure site ("transcription", "correction", "speech", "voice", …) — the toast's badge, and part of the client's dedupe key. Free-form so new failure sites need no protocol change.
threadId?
optionalthreadId?:string
Defined in: packages/aiui-claude-channel/src/channel.ts:57
The thread the failure belongs to; omitted for connection-level faults.