Add AsyncAPI spec for websocket (#613)

* AsyncAPI for websocket docs

* Delete old docs

* Update docs/README.md to point to docs site

* Add generated API docs
This commit is contained in:
cybermaggedon 2026-01-15 11:57:16 +00:00 committed by GitHub
parent fce43ae035
commit 8a17375603
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
110 changed files with 8325 additions and 23324 deletions

View file

@ -0,0 +1,33 @@
address: /api/v1/socket
description: |
Primary WebSocket channel for all TrustGraph services.
This single channel provides multiplexed access to:
- All global services (config, flow, librarian, knowledge, collection-management)
- All flow-hosted services (agent, RAG, embeddings, queries, loading, etc.)
## Multiplexing
Multiple requests can be sent concurrently over this channel. Each request includes
a unique `id` field that is echoed back in responses for correlation.
## Message Flow
1. Client sends request with unique `id`, `service`, optional `flow`, and `request` payload
2. Server processes request asynchronously
3. Server sends response(s) with matching `id` and either `response` or `error`
4. For streaming services, multiple responses may be sent with the same `id`
## Service Routing
Messages are routed to services based on:
- `service`: Service identifier (required)
- `flow`: Flow ID (required for flow-hosted services, omitted for global services)
messages:
request:
$ref: '../components/messages/ServiceRequest.yaml'
response:
$ref: '../components/messages/ServiceResponse.yaml'
error:
$ref: '../components/messages/ServiceError.yaml'