@@ -237,18 +237,23 @@ automatic scrolling to ensure the full message is visible.
237237
238238### TextMessageChunk
239239
240- A self-contained text message event that combines start, content, and end .
240+ Convenience event that expands to Start → Content → End automatically .
241241
242- The ` TextMessageChunk ` event provides a convenient way to send complete text messages
243- in a single event instead of the three-event sequence (start, content, end). This is
244- particularly useful for simple messages or when the entire content is available at once.
245- The event includes both the message metadata and content, making it more efficient for
246- non-streaming scenarios.
242+ The ` TextMessageChunk ` event lets you omit explicit ` TextMessageStart ` and
243+ ` TextMessageEnd ` events. The client stream transformer expands chunks into the
244+ standard triad:
245+
246+ - First chunk for a message must include ` messageId ` and will emit
247+ ` TextMessageStart ` (role defaults to ` assistant ` when not provided).
248+ - Each chunk with a ` delta ` emits a ` TextMessageContent ` for the current
249+ ` messageId ` .
250+ - ` TextMessageEnd ` is emitted automatically when the stream switches to a new
251+ message ID or when the stream completes.
247252
248253| Property | Description |
249254| ----------- | ------------------------------------------------------------------------------------- |
250- | ` messageId ` | Optional unique identifier for the message |
251- | ` role ` | Optional role of the sender ("developer", "system", "assistant", "user", "tool") |
255+ | ` messageId ` | Optional unique identifier for the message; required on the first chunk of a message |
256+ | ` role ` | Optional role of the sender ("developer", "system", "assistant", "user") |
252257| ` delta ` | Optional text content of the message |
253258
254259## Tool Call Events
@@ -359,6 +364,28 @@ the tool's output.
359364| ` content ` | The actual result/output content from the tool execution |
360365| ` role ` | Optional role identifier, typically "tool" for tool results |
361366
367+ ### ToolCallChunk
368+
369+ Convenience event that expands to Start → Args → End automatically.
370+
371+ The ` ToolCallChunk ` event lets you omit explicit ` ToolCallStart ` and
372+ ` ToolCallEnd ` events. The client stream transformer expands chunks into the
373+ standard tool-call triad:
374+
375+ - First chunk for a tool call must include ` toolCallId ` and ` toolCallName ` and
376+ will emit ` ToolCallStart ` (propagating any ` parentMessageId ` ).
377+ - Each chunk with a ` delta ` emits a ` ToolCallArgs ` for the current
378+ ` toolCallId ` .
379+ - ` ToolCallEnd ` is emitted automatically when the stream switches to a new
380+ ` toolCallId ` or when the stream completes.
381+
382+ | Property | Description |
383+ | ----------------- | --------------------------------------------------------------------------- |
384+ | ` toolCallId ` | Optional on later chunks; required on the first chunk of a tool call |
385+ | ` toolCallName ` | Optional on later chunks; required on the first chunk of a tool call |
386+ | ` parentMessageId ` | Optional ID of the parent message |
387+ | ` delta ` | Optional argument data chunk (often a JSON fragment) |
388+
362389## State Management Events
363390
364391These events are used to manage and synchronize the agent's state with the
0 commit comments