mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
39288a6953
Bridge workspace-proxy WebSocket upgrades inside the Bun.serve listener so the Hono path's WorkspaceRouterMiddleware → ServerProxy.websocket flow has a native equivalent. The HttpApi handler still owns HTTP; the listener now also resolves the workspace target inline (?workspace=… or session lookup), upgrades the client connection, and bridges it to a remote WebSocket with queueing, subprotocol forwarding, and close-code propagation. This unblocks flipping Server.listen() over to the new listener but does not flip it — the Hono path remains canonical. Bun-only; node:http + ws adapter is a follow-up (TODO inline).