diff --git a/src/gateway/server-methods/approval.ts b/src/gateway/server-methods/approval.ts index 9c493393aab8..74b49c7078c1 100644 --- a/src/gateway/server-methods/approval.ts +++ b/src/gateway/server-methods/approval.ts @@ -401,10 +401,7 @@ export function createApprovalHandlers( : record.kind === "plugin" ? params.pluginApprovalManager.getLiveSnapshot(record.id) : undefined; - if ( - resolveParams?.reviewer && - (!custody || !liveRecord || !custody.authorizes(liveRecord)) - ) { + if (resolveParams?.reviewer && (!custody || !liveRecord || !custody.authorizes(liveRecord))) { respondApprovalNotFound(respond); return; } diff --git a/src/plugins/worker-provider-registry.ts b/src/plugins/worker-provider-registry.ts index d1d6e2bc31bb..c2a77f584f9b 100644 --- a/src/plugins/worker-provider-registry.ts +++ b/src/plugins/worker-provider-registry.ts @@ -1,5 +1,5 @@ /** Deterministic lookup helpers for plugin-registered cloud-worker providers. */ -import type { OpenClawConfig } from "../config/types.openclaw.js"; +import type { CloudWorkersConfig } from "../config/types.cloud-workers.js"; import type { PluginManifestRecord, PluginManifestRegistry } from "./manifest-registry.js"; import { normalizeCapabilityProviderId } from "./provider-registry-shared.js"; import type { PluginRegistry } from "./registry-types.js"; @@ -17,7 +17,9 @@ export function normalizeWorkerProviderIds(providerIds: readonly string[]): stri return [...new Set(normalized)].toSorted(compareText); } -export function collectConfiguredWorkerProviderIds(config: OpenClawConfig): string[] { +export function collectConfiguredWorkerProviderIds(config: { + cloudWorkers?: CloudWorkersConfig; +}): string[] { return normalizeWorkerProviderIds( Object.values(config.cloudWorkers?.profiles ?? {}).map((profile) => profile.provider), );