From 39b9d7b1a1602cde6c7f1956227b7eb13031f0e2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 10 Aug 2026 13:32:36 -0700 Subject: [PATCH] fix(ci): heal main formatting and worker-registry import cycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit approval.ts was pushed unformatted; worker-provider-registry.ts pulled the full OpenClawConfig graph back into the plugins layer — use the CloudWorkersConfig leaf instead. --- src/gateway/server-methods/approval.ts | 5 +---- src/plugins/worker-provider-registry.ts | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) 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), );