* Add attach mode
* Better UI
* Remove unnecessary message
* extract + test the docker stream demux; reset terminal mode per session
- Pull the Docker hijacked-stream decoder (HTTP header strip, chunked
decode, 8-byte multiplexed frame demux + raw/TTY fallback) into a pure
src/lib/server/docker-stream-core.ts with unit tests covering raw
passthrough, stdout/stderr demux, frames split across socket events,
a split header, chunked reassembly, and the raw-fallback path.
- vite.config.ts now imports the core instead of carrying its own copy.
server.js runs against ./build and can't import the TS core at runtime,
so it keeps the inline copy with a note to keep the two in sync.
- containers page: default a fresh terminal session to exec so a prior
container's Attach choice (shared terminalMode) doesn't carry over.
---------
Co-authored-by: Jarek Krochmalski <jkrochmalski@gmail.com>
Wrap globalThis.__hawserHandleMessage in try-catch to prevent unhandled
promise rejections from closing WebSocket connections abruptly.
Previously, if the async handler threw an error, the WebSocket would close
with code 1006 (abnormal closure) without proper error logging. This caused
connections to die after 1-2 seconds, triggering rapid reconnection storms
and preventing stats from being retrieved.
The inner try-catch ensures handler errors are logged but don't close the
connection, allowing the agent to recover and continue processing messages.