14 Commits
Author SHA1 Message Date
Jarek Krochmalski 6d0e375943 add a docker attach terminal mode 2026-09-14 05:25:04 +02:00
Jarek Krochmalski 3e45ca2610 add a docker attach terminal mode for hawser-edge environments 2026-09-13 15:31:28 +02:00
Jarek Krochmalski 0e0ec6f122 tidy terminal websocket connection handling 2026-09-13 14:50:02 +02:00
Ivan KaraandJarek Krochmalski 0ca3b86f82 Add docker attach support (#1377)
* 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>
2026-09-13 14:08:19 +02:00
jarek f8bfd756ef apply the containers:exec permission check to the websocket terminal path 2026-08-20 08:28:26 +02:00
jarek c718ac9a84 1.0.37 2026-07-11 15:31:52 +02:00
jarek efb634701c 1.0.34 2026-06-17 08:21:38 +02:00
jarek 83c3a5ea09 1.0.33 2026-06-15 14:56:51 +02:00
jarek c8b3acc07e 1.0.30 2026-05-30 08:42:21 +02:00
jarek d9054ff347 1.0.28 2026-05-09 10:13:53 +02:00
Juha Kovanen 91ef3e3c9b fix: prevent WebSocket connection drops on hawser handler errors
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.
2026-05-05 13:12:50 +02:00
jarek 0bb10cabb9 v1.0.23 2026-04-03 11:51:42 +02:00
jarek 55f3101a19 v1.0.21 2026-03-13 08:22:46 +01:00
Jarek Krochmalski 790ce092ee 1.0.20 2026-03-06 20:03:10 +01:00