mirror of https://github.com/garrytan/gstack.git
Bun >= 1.3 auto-echoes the first offered subprotocol in server.upgrade(), so the agent's explicit echo header produced a duplicate Sec-WebSocket-Protocol response header. Strict WebSocket clients (Chromium, python websockets) reject that handshake per RFC 6455, which left the sidebar Terminal pane permanently disconnected: /pty-session minted fine, but new WebSocket(url, ['gstack-pty.' + token]) never completed. Fix verified end-to-end on Bun 1.3.6 against a live agent: single protocol header in the 101, handshake accepted, claude PTY spawns and responds in the sidebar. Adds a raw-socket regression test that counts Sec-WebSocket-Protocol header lines in the upgrade response (Headers.get normalizes duplicates away, so fetch-level assertions can't see this class of bug). Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| test | ||
| PLAN-snapshot-dropdown-interactive.md | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||