The current system broadcasts WebSocket messages directly, leading to dropped messages if clients disconnect, no message recovery upon reconnection, and inconsistent frontend state. This feature requests the addition of an `@agentxjs/queue` package to implement a queuing mechanism for reliable event delivery and message recovery.
## Background / Problem Currently, WebSocket messages are broadcast directly without any queuing mechanism: ```typescript // createLocalAgentX.ts:88-104 runtime.onAny((event) => { wsServer.broadcast(JSON.stringify(event)); // Direct broadcast, no buffering }); ``` Problems: - If the client disconnects, messages are silently dropped - No mechanism for message recovery after reconnection - Frontend state becomes inconsistent when messages are lost ## Architecture Analysis Current package structure: ``` ┌─────────────────────────────────────────────────────┐ │ runtime │ ← Business domain │ (Agent, Session, Container, Image) │ └─────────────────────────────────────────────────────┘ │ ┌──────────────┴──────────────┐ ▼ ▼ ┌──────────────┐ ┌──────────────┐ │ persistence │ │ network │ ← Technical infrastructure