feat(gateway): add node capability negotiation foundation

This commit is contained in:
William Valentin
2026-02-16 12:14:25 -08:00
parent de0c1f41b3
commit d9f7807ab2
17 changed files with 675 additions and 7 deletions
+45
View File
@@ -21,6 +21,7 @@ The gateway provides:
- **JSON-RPC 2.0**: Structured request/response protocol
- **Streaming Events**: Real-time updates during agent processing
- **HTTP Server**: Serves static dashboard and handles webhook endpoints
- **Node Capability Negotiation**: Optional companion-node role/capability registration
### Execution Model (Sessions + Per-Session Queue)
@@ -563,6 +564,50 @@ When queue policy rejects/supersedes a request before execution, the server emit
Cancel the current agent operation.
### Node Methods
#### `node.register`
Register node role/capabilities for the current WebSocket connection.
**Request:**
```json
{
"id": 9,
"method": "node.register",
"params": {
"nodeId": "companion-desktop",
"role": "companion",
"protocolVersion": 1,
"capabilities": ["ui.canvas", "notifications"]
}
}
```
**Response:**
```json
{
"id": 9,
"result": {
"registered": true,
"node": { "id": "companion-desktop", "role": "companion" },
"protocol": { "serverVersion": 1, "clientVersion": 1, "negotiatedVersion": 1 },
"capabilities": {
"declared": ["ui.canvas", "notifications"],
"enabled": ["ui.canvas", "notifications"]
}
}
}
```
#### `node.capabilities.get`
Return negotiated capabilities for the currently registered node connection.
#### `system.capabilities`
Return gateway protocol version, node policy status, and feature-gate snapshot.
**Request:**
```json
{