diff --git a/extensions/comfy/workflow-runtime.ts b/extensions/comfy/workflow-runtime.ts index 774cb67d652..4514bd5e8a1 100644 --- a/extensions/comfy/workflow-runtime.ts +++ b/extensions/comfy/workflow-runtime.ts @@ -17,7 +17,7 @@ import { ssrfPolicyFromDangerouslyAllowPrivateNetwork, type SsrFPolicy, } from "openclaw/plugin-sdk/ssrf-runtime"; -import { resolveUserPath } from "openclaw/plugin-sdk/text-runtime"; +import { isRecord, resolveUserPath } from "openclaw/plugin-sdk/text-runtime"; const DEFAULT_COMFY_LOCAL_BASE_URL = "http://127.0.0.1:8188"; const DEFAULT_COMFY_CLOUD_BASE_URL = "https://cloud.comfy.org"; @@ -87,10 +87,6 @@ export function _setComfyFetchGuardForTesting(impl: typeof fetchWithSsrFGuard | comfyFetchGuard = impl ?? fetchWithSsrFGuard; } -function isRecord(value: unknown): value is Record { - return typeof value === "object" && value !== null && !Array.isArray(value); -} - function readConfigString(config: ComfyProviderConfig, key: string): string | undefined { const value = config[key]; if (typeof value !== "string") { diff --git a/extensions/kimi-coding/index.ts b/extensions/kimi-coding/index.ts index db504741890..cf7461f922e 100644 --- a/extensions/kimi-coding/index.ts +++ b/extensions/kimi-coding/index.ts @@ -2,6 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key"; import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared"; import type { SecretInput } from "openclaw/plugin-sdk/secret-input"; +import { isRecord } from "openclaw/plugin-sdk/text-runtime"; import { applyKimiCodeConfig, KIMI_CODING_MODEL_REF } from "./onboard.js"; import { buildKimiCodingProvider } from "./provider-catalog.js"; import { KIMI_REPLAY_POLICY } from "./replay-policy.js"; @@ -10,10 +11,6 @@ import { wrapKimiProviderStream } from "./stream.js"; const PLUGIN_ID = "kimi"; const PROVIDER_ID = "kimi"; -function isRecord(value: unknown): value is Record { - return typeof value === "object" && value !== null && !Array.isArray(value); -} - function findExplicitProviderConfig( providers: Record | undefined, providerId: string,