diff --git a/src/commands/status.gateway-probe.ts b/src/commands/status.gateway-probe.ts index 0cf25b4a0fa4..23322fcda27f 100644 --- a/src/commands/status.gateway-probe.ts +++ b/src/commands/status.gateway-probe.ts @@ -6,7 +6,6 @@ import { resolveGatewayProbeAuthSafeWithSecretInputs, resolveGatewayProbeTarget, } from "../gateway/probe-auth.js"; -export { pickGatewaySelfPresence } from "./gateway-presence.js"; /** Resolves gateway probe auth plus any non-secret warning about credential lookup. */ export async function resolveGatewayProbeAuthResolution(cfg: OpenClawConfig): Promise<{ @@ -24,11 +23,3 @@ export async function resolveGatewayProbeAuthResolution(cfg: OpenClawConfig): Pr env: process.env, }); } - -/** Resolves only gateway probe auth material for callers that do not display warnings. */ -export async function resolveGatewayProbeAuth(cfg: OpenClawConfig): Promise<{ - token?: string; - password?: string; -}> { - return (await resolveGatewayProbeAuthResolution(cfg)).auth; -} diff --git a/src/commands/status.scan.test-helpers.ts b/src/commands/status.scan.test-helpers.ts index 99e2f6f26698..c0644398ab7d 100644 --- a/src/commands/status.scan.test-helpers.ts +++ b/src/commands/status.scan.test-helpers.ts @@ -74,7 +74,6 @@ function createStatusScanDepsRuntimeModuleMock( } type StatusGatewayProbeModuleMock = { - pickGatewaySelfPresence: Mock<() => null>; resolveGatewayProbeAuthResolution: StatusScanSharedMocks["resolveGatewayProbeAuthResolution"]; }; @@ -82,7 +81,6 @@ function createStatusGatewayProbeModuleMock( mocks: Pick, ): StatusGatewayProbeModuleMock { return { - pickGatewaySelfPresence: vi.fn(() => null), resolveGatewayProbeAuthResolution: mocks.resolveGatewayProbeAuthResolution, }; } diff --git a/src/gateway/credential-precedence.parity.test.ts b/src/gateway/credential-precedence.parity.test.ts index 74b45a6f8fd1..d6c9b6c7a16a 100644 --- a/src/gateway/credential-precedence.parity.test.ts +++ b/src/gateway/credential-precedence.parity.test.ts @@ -1,7 +1,7 @@ // Credential precedence parity tests keep call, probe, status, and auth surfaces // aligned on local/remote gateway token and password resolution. import { describe, expect, it } from "vitest"; -import { resolveGatewayProbeAuth as resolveStatusGatewayProbeAuth } from "../commands/status.gateway-probe.js"; +import { resolveGatewayProbeAuthResolution } from "../commands/status.gateway-probe.js"; import type { OpenClawConfig } from "../config/config.js"; import { resolveGatewayAuth } from "./auth.js"; import { resolveGatewayCredentialsFromConfig } from "./credentials.js"; @@ -156,7 +156,9 @@ describe("gateway credential precedence coverage", () => { mode, env, }); - const status = await withGatewayAuthEnv(env, () => resolveStatusGatewayProbeAuth(cfg)); + const status = ( + await withGatewayAuthEnv(env, () => resolveGatewayProbeAuthResolution(cfg)) + ).auth; const auth = resolveGatewayAuth({ authConfig: cfg.gateway?.auth, env,