- connection.ts: Only subscribe to client.terminal.onEvent when
applyTerminalEvent handler is provided. No production caller passes
this handler, so the subscription was a no-op wasting WebSocket traffic.
- terminalSessionState.ts: Reset buffer atoms to EMPTY_TERMINAL_BUFFER_STATE
when metadata snapshot pruning removes terminals no longer reported by
the server. Releases up to 512KB of retained string data per pruned
terminal session on long-running clients.