The visible messages of a conversation in a neutral shape, for protocols that must replay history:
the AG-UI MESSAGES_SNAPSHOT (a reconnect, or a compaction) and the ACP session/load.
Each message is a map with "id", "role" ("user", "assistant" or "tool") and
"text" (the joined text blocks). An assistant message may have "tool_calls" (a list of
%{"id", "name", "arguments"}), a tool message has "tool_call_id", "name" and "is_error".
Entries that are not messages (compactions, system state) are left out. A compaction summary
appears as an assistant message, because the entries that it replaces are no longer visible.
Summary
Functions
The AG-UI form of messages/1.