Add the /mux route: httpd performs the WebSocket upgrade (coder/websocket) and adapts the connection to terminal.wsConn via wsjson, then hands it to terminal.Manager.Serve. httpd owns only the upgrade and transport adaptation; all stream logic stays in internal/terminal. The route is mounted outside the per-request Timeout middleware (the connection is long-lived) and is omitted entirely when no manager is wired, so the daemon degrades to no terminal surface rather than failing. New/ NewRouter take the manager; main.go passes nil until commit 3 wires it. mux_test.go drives the real upgrade + wsjson + Serve + creack/pty path with a throwaway shell command, so it needs no tmux. |
||
|---|---|---|
| .. | ||
| json.go | ||
| log.go | ||
| mux.go | ||
| mux_test.go | ||
| router.go | ||
| server.go | ||
| server_test.go | ||