Websockets
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m58s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
Aiden
2026-05-12 15:32:01 +10:00
parent 334693f28c
commit da7e1a93f6
5 changed files with 296 additions and 2 deletions

View File

@@ -8,8 +8,8 @@ info:
The API is intended for local control tools and the bundled React UI. All mutating
endpoints return a small action result object.
WebSocket state streaming is planned for the control UI but is not currently served
by RenderCadenceCompositor. Clients should poll `/api/state` until `/ws` is implemented.
RenderCadenceCompositor serves `/api/state` for snapshots and `/ws` for local
WebSocket state updates consumed by the bundled control UI.
servers:
- url: http://127.0.0.1:8080
description: Default local control server
@@ -179,6 +179,24 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/RuntimeState"
/ws:
get:
tags: [State]
summary: Stream runtime state over WebSocket
description: |
Upgrades to a WebSocket connection. The server sends JSON runtime-state
snapshots using the same shape as `GET /api/state` whenever the serialized
state changes.
operationId: streamRuntimeState
responses:
"101":
description: WebSocket protocol upgrade accepted.
"400":
description: The request was not a valid WebSocket upgrade.
content:
text/plain:
schema:
type: string
/api/layers/add:
post:
tags: [Layers]