fix: use 'connect' method with auth.token for gateway handshake

Gateway uses JSON-RPC method 'connect' (not 'hello') with auth
object containing token field.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
operator
2026-04-19 05:40:41 +00:00
parent a7d541dcc0
commit a6f63e15f4

View File

@@ -220,13 +220,14 @@ export default {
}; };
client.onopen = () => { client.onopen = () => {
// Gateway uses "connect" method with auth in params
client.send(JSON.stringify({ client.send(JSON.stringify({
jsonrpc: '2.0', jsonrpc: '2.0',
method: 'hello', method: 'connect',
params: { params: {
clientName: 'harbor-forge-calendar', clientName: 'harbor-forge-calendar',
mode: 'backend', mode: 'backend',
...(gwToken ? { token: gwToken } : {}), ...(gwToken ? { auth: { token: gwToken } } : {}),
}, },
id: 1, id: 1,
})); }));