WebSocket bridges
Implement the request/response protocol used by custom_ws.
Message contract
A custom_ws connector uses the BlenderWebSocketClient protocol. Each request includes a generated id and action, with parameters spread at the top level. Reply with the same id. Do not use user parameters named id or action because they can overwrite protocol fields.
{ "id": "req_123_abc", "action": "get_status", "verbose": true }json{ "id": "req_123_abc", "success": true, "data": { "ready": true } }json{ "id": "req_123_abc", "success": false, "error": "Unknown action" }jsonEndpoint mapping
For custom_ws, endpoints[].name becomes the action. The method/path fields belong to the shared endpoint schema but do not drive the WebSocket message. args.payload || args supplies the top-level parameters. Connection establishment times out after 3 seconds; custom action calls after 10 seconds.
{
"type": "custom_ws",
"connection": {
"protocol": "ws",
"host": "127.0.0.1",
"port": 8790,
"authType": "none"
},
"endpoints": [
{
"name": "get_status",
"description": "Read bridge status.",
"method": "GET",
"path": "/",
"parametersJsonSchema": {
"type": "object",
"properties": {}
}
}
]
}jsonTransport limitations
Install and start companion code in the target application separately. Validate incoming actions and parameters, keep responses bounded, and return structured errors with the matching request ID.
Implementation sources
Paths in your AI Plate source checkout:
core/connector-manager.ts
