@openclaw/comfy-provider 2026.10.5-beta.4 → 2026.10.10-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, runComfyWorkflow } from "./workflow-runtime.js";
1
+ import { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, isComfyCapabilityConfiguredAsync, runComfyWorkflow } from "./workflow-runtime.js";
2
2
  //#region extensions/comfy/image-generation-provider.ts
3
3
  function buildComfyImageGenerationProvider() {
4
4
  return {
@@ -11,6 +11,11 @@ function buildComfyImageGenerationProvider() {
11
11
  agentDir,
12
12
  capability: "image"
13
13
  }),
14
+ isConfiguredAsync: ({ cfg, agentDir }) => isComfyCapabilityConfiguredAsync({
15
+ cfg,
16
+ agentDir,
17
+ capability: "image"
18
+ }),
14
19
  capabilities: {
15
20
  generate: {
16
21
  maxCount: 1,
@@ -1,4 +1,4 @@
1
- import { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, runComfyWorkflow } from "./workflow-runtime.js";
1
+ import { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, isComfyCapabilityConfiguredAsync, runComfyWorkflow } from "./workflow-runtime.js";
2
2
  //#region extensions/comfy/music-generation-provider.ts
3
3
  const COMFY_MAX_INPUT_IMAGES = 1;
4
4
  function resolveInputImage(inputImage) {
@@ -21,6 +21,11 @@ function buildComfyMusicGenerationProvider() {
21
21
  agentDir,
22
22
  capability: "music"
23
23
  }),
24
+ isConfiguredAsync: ({ cfg, agentDir }) => isComfyCapabilityConfiguredAsync({
25
+ cfg,
26
+ agentDir,
27
+ capability: "music"
28
+ }),
24
29
  capabilities: {
25
30
  generate: {},
26
31
  edit: {
@@ -1,4 +1,4 @@
1
- import { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, runComfyWorkflow } from "./workflow-runtime.js";
1
+ import { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, isComfyCapabilityConfiguredAsync, runComfyWorkflow } from "./workflow-runtime.js";
2
2
  //#region extensions/comfy/video-generation-provider.ts
3
3
  function toComfyInputImage(inputImage) {
4
4
  if (!inputImage) return;
@@ -20,6 +20,11 @@ function buildComfyVideoGenerationProvider() {
20
20
  agentDir,
21
21
  capability: "video"
22
22
  }),
23
+ isConfiguredAsync: ({ cfg, agentDir }) => isComfyCapabilityConfiguredAsync({
24
+ cfg,
25
+ agentDir,
26
+ capability: "video"
27
+ }),
23
28
  capabilities: {
24
29
  generate: {
25
30
  maxVideos: 1,
@@ -5,7 +5,7 @@ import { bufferToBlobPart } from "openclaw/plugin-sdk/blob-runtime";
5
5
  import { resolveGeneratedMediaMaxBytes } from "openclaw/plugin-sdk/media-generation-runtime";
6
6
  import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
7
7
  import { resolvePositiveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
8
- import { isProviderApiKeyConfigured } from "openclaw/plugin-sdk/provider-auth";
8
+ import { isProviderApiKeyConfigured, isProviderApiKeyConfiguredAsync } from "openclaw/plugin-sdk/provider-auth";
9
9
  import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
10
10
  import { assertOkOrThrowHttpError, readProviderBinaryResponse, readProviderJsonResponse, redactProviderResponseErrorText, resolveProviderHttpRequestConfig } from "openclaw/plugin-sdk/provider-http";
11
11
  import { normalizeSecretInputString, resolveConfiguredSecretInputString, resolveSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
@@ -176,7 +176,7 @@ function extractHistoryEntry(history, promptId) {
176
176
  async function waitForComfyHistory(params, promptId, pollIntervalMs) {
177
177
  const { baseUrl, headers: requestHeaders, mode, ...request } = params;
178
178
  const headers = new Headers(requestHeaders);
179
- const deadline = Date.now() + params.timeoutMs;
179
+ const deadline = performance.now() + params.timeoutMs;
180
180
  const read = (path, kind, timeoutMs) => readJsonResponse({
181
181
  ...request,
182
182
  url: `${baseUrl}${path}`,
@@ -207,7 +207,7 @@ async function waitForComfyHistory(params, promptId, pollIntervalMs) {
207
207
  }
208
208
  function resolveComfyRemainingMs(deadline, timeoutMs, defaultTimeoutMs = timeoutMs) {
209
209
  const defaultMs = resolvePositiveTimerTimeoutMs(defaultTimeoutMs, 1);
210
- const remainingMs = deadline - Date.now();
210
+ const remainingMs = deadline - performance.now();
211
211
  if (remainingMs <= 0) throw new Error(`Comfy workflow did not finish within ${Math.ceil(timeoutMs / 1e3)}s`);
212
212
  return Math.max(1, Math.min(defaultMs, remainingMs));
213
213
  }
@@ -293,7 +293,7 @@ function hasUnavailableComfyHeaderSecret(value, cfg) {
293
293
  }) && Boolean(normalizeSecretInputString(process.env[envVarName])));
294
294
  });
295
295
  }
296
- function isComfyCapabilityConfigured(params) {
296
+ function resolveComfyConfigurationReadiness(params) {
297
297
  const { config } = getComfyConfig(params.cfg);
298
298
  const capabilityConfig = getComfyCapabilityConfig(config, params.capability);
299
299
  const hasWorkflow = Boolean(isRecord(capabilityConfig.workflow) || normalizeOptionalString(capabilityConfig.workflowPath));
@@ -304,7 +304,17 @@ function isComfyCapabilityConfigured(params) {
304
304
  const configuredApiKey = resolveComfyApiKey(capabilityConfig, params.cfg);
305
305
  if (configuredApiKey.status === "available") return true;
306
306
  if (configuredApiKey.status === "configured_unavailable") return false;
307
- return isProviderApiKeyConfigured({
307
+ }
308
+ /** The released resolveCapabilityModelCandidates SDK needs this hook through 2026-12-31. */
309
+ function isComfyCapabilityConfigured(params) {
310
+ return resolveComfyConfigurationReadiness(params) ?? isProviderApiKeyConfigured({
311
+ provider: "comfy",
312
+ cfg: params.cfg,
313
+ agentDir: params.agentDir
314
+ });
315
+ }
316
+ async function isComfyCapabilityConfiguredAsync(params) {
317
+ return resolveComfyConfigurationReadiness(params) ?? isProviderApiKeyConfiguredAsync({
308
318
  provider: "comfy",
309
319
  cfg: params.cfg,
310
320
  agentDir: params.agentDir
@@ -423,4 +433,4 @@ async function runComfyWorkflow(params) {
423
433
  };
424
434
  }
425
435
  //#endregion
426
- export { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, runComfyWorkflow };
436
+ export { DEFAULT_COMFY_MODEL, isComfyCapabilityConfigured, isComfyCapabilityConfiguredAsync, runComfyWorkflow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/comfy-provider",
3
- "version": "2026.10.5-beta.4",
3
+ "version": "2026.10.10-beta.2",
4
4
  "description": "OpenClaw ComfyUI provider plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.7.2"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.10.5-beta.4"
21
+ "pluginApi": ">=2026.10.10-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.10.5-beta.4",
24
+ "openclawVersion": "2026.10.10-beta.2",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -40,7 +40,7 @@
40
40
  "assets/activity.svg"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.10.5-beta.4"
43
+ "openclaw": ">=2026.10.10-beta.2"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {