Expand description
Per-chat turn serialization and message coalescing.
ChatTurnQueue ensures at most one agent run is active per (channel, chat_id)
at any time. Messages arriving while a run is active are queued and coalesced
after the run completes.
Structsยง
- Chat
Turn Queue - Per-chat turn serialization queue.
- Pending
Message - A message that arrived while an agent run was active for the same chat.
- Turn
Guard - RAII guard that releases the per-chat turn lock when dropped.