mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
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:
parent
fce43ae035
commit
8a17375603
110 changed files with 8325 additions and 23324 deletions
33
specs/websocket/channels/socket.yaml
Normal file
33
specs/websocket/channels/socket.yaml
Normal 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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue