Skip to content

Type Alias: JsonChunk

JsonChunk = { kind: "events"; } | { kind: "control"; }

Defined in: aiui-intent-runtime/src/protocol.ts:50

A streaming modality (intent-v1) tags its data frames with a chunk so the server can tell an event batch from a raw attachment. events/control carry a JSON payload; attachment carries raw bytes (PNG / a whole audio segment) and an id (shot_N / seg_N) correlating it with the shot/talk event already on the wire; audio carries one streamed PCM frame of seg_N (the realtime transcriber path), in seq order, while the segment's talk-start/talk-end events stay the boundaries. See the intent-v1 contract (the streaming-turns notes, git history). Mirrors ChunkDescriptor in the channel's frame.ts — the source of truth; change both together.