agent-orchestrator/backend/internal/httpd
Pritom14 edcc631037 feat(httpd): mount terminal-streaming WebSocket at /mux
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.
2026-05-31 19:23:35 +05:30
..
json.go feat(backend): HTTP daemon skeleton (Phase 1a) — #10 (#14) 2026-05-29 10:02:53 +05:30
log.go feat(backend): HTTP daemon skeleton (Phase 1a) — #10 (#14) 2026-05-29 10:02:53 +05:30
mux.go feat(httpd): mount terminal-streaming WebSocket at /mux 2026-05-31 19:23:35 +05:30
mux_test.go feat(httpd): mount terminal-streaming WebSocket at /mux 2026-05-31 19:23:35 +05:30
router.go feat(httpd): mount terminal-streaming WebSocket at /mux 2026-05-31 19:23:35 +05:30
server.go feat(httpd): mount terminal-streaming WebSocket at /mux 2026-05-31 19:23:35 +05:30
server_test.go feat(httpd): mount terminal-streaming WebSocket at /mux 2026-05-31 19:23:35 +05:30