Send the advertised route transport with the sign-in completion

The page builds heimdall.auth.complete itself rather than through the
vendored client, and its routeHint carried only sourceVersion. Ghostlight
refuses any invocation without the route transport ("invocation metadata
is incomplete"), so every completion was denied before it reached
Heimdall. The page now takes the transport the provider advertises for
ghostlight.eve.commands, as the vendored client takes it from a command
descriptor. Verified on Yggdrasil: the corrected shape reaches Heimdall's
private plane and gets Heimdall's own answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-23 21:12:14 +02:00
commit 4c83d54964

View file

@ -41,6 +41,12 @@ class GhostlightEveTransport implements EveBrowserProviderTransport {
return result;
}
private advertisedTransport(): { transport?: string } {
const commands = (this.provider as { commands?: Array<{ command?: string; transport?: string }> } | undefined)?.commands;
const transport = commands?.find(command => command.command === "ghostlight.eve.commands")?.transport;
return transport ? { transport } : {};
}
async completeAuthentication(handle: string): Promise<any> {
if (!this.provider) await this.providerAdvertisement();
return await this.submitCommand({
@ -51,7 +57,10 @@ class GhostlightEveTransport implements EveBrowserProviderTransport {
operationId: "heimdall.auth.complete",
schemaId: "heimdall.auth_complete_command.v1",
idempotencyKey: crypto.randomUUID(),
routeHint: { sourceVersion: this.sourceVersion },
// The route transport is the one the provider advertises for its
// command boundary, as the vendored client takes it from a command
// descriptor; Ghostlight refuses an invocation without it.
routeHint: { sourceVersion: this.sourceVersion, ...this.advertisedTransport() },
},
payload: { handle },
issuedAt: new Date().toISOString(),