state_to_events(
state: dict[str, Any] | Any,
stream: ResponseEventStream
) -> AsyncIteratorYield the Responses API events that summarise a final graph state.
Walks every message appended after the last :class:HumanMessage so
intermediate tool calls and tool results are surfaced to the client
(not just the final assistant text).
The value returned by CompiledStateGraph.ainvoke.
Expected shape is a mapping with a "messages" channel.
The :class:ResponseEventStream to emit events through.