feat(vela-gateway): add websocket session skeleton
This commit is contained in:
@@ -65,7 +65,7 @@ The current implementation is a minimal SvelteKit app with a single starter page
|
||||
- Fastify (Node)
|
||||
- WebSocket-based session layer
|
||||
|
||||
The current implementation is a minimal Fastify service with `/` and `/health` HTTP endpoints. The WebSocket session layer is a later increment.
|
||||
The current implementation is a minimal Fastify service with `/`, `/health`, and a documented `/ws` WebSocket session endpoint. The gateway keeps one ephemeral in-memory session record per live socket connection and removes it on disconnect.
|
||||
|
||||
#### Responsibilities
|
||||
|
||||
@@ -77,6 +77,14 @@ The current implementation is a minimal Fastify service with `/` and `/health` H
|
||||
- TTS orchestration
|
||||
- event streaming
|
||||
|
||||
#### Current WebSocket skeleton
|
||||
|
||||
- `GET /ws` documents the route for plain HTTP clients and returns `426 Upgrade Required`
|
||||
- WebSocket upgrades on `/ws` create an ephemeral session immediately
|
||||
- the gateway sends `session.ready` followed by `session.state` (`idle`) when the socket is established
|
||||
- valid minimal client events can move the session between `idle` and `listening`
|
||||
- invalid JSON, invalid envelopes, and malformed frames are handled defensively so the process stays up
|
||||
|
||||
## Voice Pipeline
|
||||
|
||||
```text
|
||||
|
||||
Reference in New Issue
Block a user