Use WebSockets for terminal streams
Replace SSE/EventSource and POST-based input/resize with WebSocket
connections. Send resize messages as JSON and forward keystrokes over
the
ws. Include token as a ws query param and improve close/error handling
and cleanup.