WebSocket 双向通信处理器。
基于 :cowboy_websocket 行为,同时推送事件 + 接收控制消息。
入站消息格式(JSON)
{"action": "prompt", "text": "hello"}
{"action": "approve", "approvalId": "abc123", "autoResume": false}
{"action": "reject", "approval_id": "abc123", "auto_resume": true}
{"action": "respond", "ref": "r1", "response": "42"}出站消息格式(JSON)
与 SSE 事件格式一致:{"event": "message_delta", "data": {"delta": "hello"}}