session/update notifications into typed SessionEvents,
correlating tool calls by id and accumulating message text. One reducer per
consumer — a turn, a replay, or a session-wide events() stream; feed
updates in arrival order.
Constructor
Returns
SessionEventReducer
Properties
undefined | string
required
The full text of the most recent message with any text, if any. Messages
that carry only non-text content (citation resources, for instance) are
skipped.
string
required
The agent’s message text accumulated so far; distinct messages are separated by blank lines.
Methods
handle()
Parameters
required
Returns
SessionEvent
toolCall()
Parameters
string
required
Returns
ToolCall
