Spaces:
Sleeping
Sleeping
feat: update connection handshake parameters to include protocol version, role, and client capabilities
Browse files- health-server.js +8 -0
- wa-guardian.js +9 -1
health-server.js
CHANGED
|
@@ -97,9 +97,17 @@ function createGatewayConnection() {
|
|
| 97 |
id: randomUUID(),
|
| 98 |
method: "connect",
|
| 99 |
params: {
|
|
|
|
|
|
|
| 100 |
auth: { token: GATEWAY_TOKEN },
|
| 101 |
client: { id: "health-server", platform: "linux", mode: "backend", version: "1.0.0" },
|
|
|
|
| 102 |
scopes: ["operator.read"],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
},
|
| 104 |
}));
|
| 105 |
return;
|
|
|
|
| 97 |
id: randomUUID(),
|
| 98 |
method: "connect",
|
| 99 |
params: {
|
| 100 |
+
minProtocol: 3,
|
| 101 |
+
maxProtocol: 3,
|
| 102 |
auth: { token: GATEWAY_TOKEN },
|
| 103 |
client: { id: "health-server", platform: "linux", mode: "backend", version: "1.0.0" },
|
| 104 |
+
role: "operator",
|
| 105 |
scopes: ["operator.read"],
|
| 106 |
+
caps: [],
|
| 107 |
+
commands: [],
|
| 108 |
+
permissions: {},
|
| 109 |
+
locale: "en-US",
|
| 110 |
+
userAgent: "huggingclaw-health-server/1.0.0",
|
| 111 |
},
|
| 112 |
}));
|
| 113 |
return;
|
wa-guardian.js
CHANGED
|
@@ -63,9 +63,17 @@ async function createConnection() {
|
|
| 63 |
id: randomUUID(),
|
| 64 |
method: "connect",
|
| 65 |
params: {
|
|
|
|
|
|
|
| 66 |
auth: { token: GATEWAY_TOKEN },
|
| 67 |
client: { id: "wa-guardian", platform: "linux", mode: "backend", version: "1.0.0" },
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
}
|
| 70 |
}));
|
| 71 |
return;
|
|
|
|
| 63 |
id: randomUUID(),
|
| 64 |
method: "connect",
|
| 65 |
params: {
|
| 66 |
+
minProtocol: 3,
|
| 67 |
+
maxProtocol: 3,
|
| 68 |
auth: { token: GATEWAY_TOKEN },
|
| 69 |
client: { id: "wa-guardian", platform: "linux", mode: "backend", version: "1.0.0" },
|
| 70 |
+
role: "operator",
|
| 71 |
+
scopes: ["operator.admin", "operator.pairing", "operator.read", "operator.write"],
|
| 72 |
+
caps: [],
|
| 73 |
+
commands: [],
|
| 74 |
+
permissions: {},
|
| 75 |
+
locale: "en-US",
|
| 76 |
+
userAgent: "huggingclaw-wa-guardian/1.0.0",
|
| 77 |
}
|
| 78 |
}));
|
| 79 |
return;
|