Commit Graph

3 Commits

Author SHA1 Message Date
can1357 d1aca2a338 fix collab reconnect backpressure drain 2026-07-05 13:25:26 +02:00
metaphorics 8bfbea1e0f fix(collab): add WebSocket backpressure with ordered pending-send drain
CollabSocket.send previously called ws.send() whenever the socket was OPEN without checking bufferedAmount, allowing the WebSocket send buffer to grow unbounded under a slow relay or guest. The fix adds 64 KiB high / 32 KiB low backpressure thresholds: new frames are queued when bufferedAmount is above the high watermark, and a 25 ms drain timer retries flushing queued frames once the buffer drops below the low watermark, preserving send order via the existing #sendChain. Overflow still drops frames once #pendingSends reaches MAX_PENDING_SENDS, and the drain timer is cleared on close, reconnect, and fatal failure. Verified with `bun test packages/coding-agent/test/collab` (64 pass, 0 fail).

Closes #4248
2026-07-02 17:30:14 +09:00
can1357 3e90371f5c feat(coding-agent): added collaborative sessions with host and guest command support
- Added AES-GCM room-key crypto, relay link parsing, and invalid-link validation.
- Added `/collab`, `/join`, and `/leave` command handling for collaborative sessions.
- Added startup `join` argument wiring to execute `/join` during interactive launch.
- Added status-line, prompt, and command-routing updates for guest/host collaboration UX.
2026-06-12 10:54:28 +02:00