fix: require gateway client id
# Conflicts: # apps/macos/Sources/Clawdbot/GatewayChannel.swift # docs/concepts/typebox.md # docs/gateway/index.md # src/commands/onboard-non-interactive.gateway-auth.test.ts # src/commands/onboard-non-interactive.lan-auto-token.test.ts # src/gateway/call.ts # src/gateway/client.ts # src/gateway/gateway.wizard.e2e.test.ts # src/gateway/probe.ts # src/gateway/protocol/schema.ts # src/gateway/server.auth.test.ts # src/gateway/server.health.test.ts # src/gateway/server.ts # src/gateway/test-helpers.ts # src/tui/gateway-chat.ts
This commit is contained in:
@@ -1588,8 +1588,10 @@ export async function startGatewayServer(
|
||||
const authMethod = authResult.method ?? "none";
|
||||
|
||||
const shouldTrackPresence = !isGatewayCliClient(connectParams.client);
|
||||
const clientId = connectParams.client.id;
|
||||
const instanceId = connectParams.client.instanceId;
|
||||
const presenceKey = shouldTrackPresence
|
||||
? connectParams.client.instanceId || connId
|
||||
? (instanceId ?? connId)
|
||||
: undefined;
|
||||
|
||||
logWs("in", "connect", {
|
||||
@@ -1598,7 +1600,7 @@ export async function startGatewayServer(
|
||||
clientDisplayName: connectParams.client.displayName,
|
||||
version: connectParams.client.version,
|
||||
mode: connectParams.client.mode,
|
||||
instanceId: connectParams.client.instanceId,
|
||||
clientId,
|
||||
platform: connectParams.client.platform,
|
||||
auth: authMethod,
|
||||
});
|
||||
@@ -1621,7 +1623,7 @@ export async function startGatewayServer(
|
||||
deviceFamily: connectParams.client.deviceFamily,
|
||||
modelIdentifier: connectParams.client.modelIdentifier,
|
||||
mode: connectParams.client.mode,
|
||||
instanceId: connectParams.client.instanceId,
|
||||
instanceId,
|
||||
reason: "connect",
|
||||
});
|
||||
presenceVersion += 1;
|
||||
|
||||
@@ -543,6 +543,8 @@ export async function connectReq(
|
||||
version: string;
|
||||
platform: string;
|
||||
mode: string;
|
||||
deviceFamily?: string;
|
||||
modelIdentifier?: string;
|
||||
instanceId?: string;
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user