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
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.
The agent’s message text accumulated so far; distinct messages are separated by blank lines.
Type:
ToolCallMerged tool-call snapshots seen so far, in first-seen order.Methods
handle()
Parameters
Returns
SessionEvent
toolCall()
Parameters
Returns
ToolCall
