Skip to main content

Module chat_turn_queue

Module chat_turn_queue 

Source
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ยง

ChatTurnQueue
Per-chat turn serialization queue.
PendingMessage
A message that arrived while an agent run was active for the same chat.
TurnGuard
RAII guard that releases the per-chat turn lock when dropped.