Skip to main content

Protocol Specifications

Terminal Transport (WebSocket v3)

VibeTunnel uses a single WebSocket endpoint for terminal transport, multiplexing sessions over binary frames.

Connection Establishment

Subscriptions

  • Subscribe per session: send a v3 SUBSCRIBE frame with sessionId + flags (Stdout, Snapshots, Events).
  • Global events: use an empty sessionId and the Events flag.
Source of truth: docs/websocket.md and web/src/shared/ws-v3.ts.

Error Codes

PTY Protocol

Process Spawning

Control Sequences

Terminal Modes

Session Recording Protocol

Asciinema v2 Format

Header:
Events:
Event types:
  • o: Output from terminal
  • i: Input from user
  • r: Terminal resize

Recording Storage

HTTP Protocol

Request Headers

Response Headers

Status Codes

Terminal Transport (WebSocket v3)

VibeTunnel uses a single WebSocket endpoint for terminal transport:
  • Endpoint: GET /ws (upgrade)
  • Binary framing: "VT" magic + version + type + sessionId + payload
  • Multiplexing: one socket can carry multiple sessions
  • Subscriptions: flags for stdout, snapshots, events
Details: docs/websocket.md.

Authentication Protocol

JWT Token Structure

Token Refresh Flow

See Also