comfyui-node 1.4.4 → 1.6.0

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.
Files changed (58) hide show
  1. package/README.md +21 -16
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/call-wrapper.d.ts +141 -124
  4. package/dist/call-wrapper.d.ts.map +1 -1
  5. package/dist/call-wrapper.js +353 -64
  6. package/dist/call-wrapper.js.map +1 -1
  7. package/dist/client.d.ts +290 -290
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +78 -19
  10. package/dist/client.js.map +1 -1
  11. package/dist/index.d.ts +3 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/pool/SmartPool.d.ts +144 -0
  16. package/dist/pool/SmartPool.d.ts.map +1 -0
  17. package/dist/pool/SmartPool.js +677 -0
  18. package/dist/pool/SmartPool.js.map +1 -0
  19. package/dist/pool/SmartPoolV2.d.ts +120 -0
  20. package/dist/pool/SmartPoolV2.d.ts.map +1 -0
  21. package/dist/pool/SmartPoolV2.js +587 -0
  22. package/dist/pool/SmartPoolV2.js.map +1 -0
  23. package/dist/pool/WorkflowPool.d.ts +32 -2
  24. package/dist/pool/WorkflowPool.d.ts.map +1 -1
  25. package/dist/pool/WorkflowPool.js +298 -66
  26. package/dist/pool/WorkflowPool.js.map +1 -1
  27. package/dist/pool/client/ClientManager.d.ts +4 -2
  28. package/dist/pool/client/ClientManager.d.ts.map +1 -1
  29. package/dist/pool/client/ClientManager.js +29 -9
  30. package/dist/pool/client/ClientManager.js.map +1 -1
  31. package/dist/pool/index.d.ts +2 -0
  32. package/dist/pool/index.d.ts.map +1 -1
  33. package/dist/pool/index.js +2 -0
  34. package/dist/pool/index.js.map +1 -1
  35. package/dist/pool/queue/QueueAdapter.d.ts +32 -30
  36. package/dist/pool/queue/QueueAdapter.d.ts.map +1 -1
  37. package/dist/pool/queue/adapters/memory.d.ts +22 -20
  38. package/dist/pool/queue/adapters/memory.d.ts.map +1 -1
  39. package/dist/pool/queue/adapters/memory.js +14 -2
  40. package/dist/pool/queue/adapters/memory.js.map +1 -1
  41. package/dist/pool/types/affinity.d.ts +6 -0
  42. package/dist/pool/types/affinity.d.ts.map +1 -0
  43. package/dist/pool/types/affinity.js +2 -0
  44. package/dist/pool/types/affinity.js.map +1 -0
  45. package/dist/pool/types/job.d.ts.map +1 -1
  46. package/dist/pool/utils/failure-analysis.d.ts +14 -0
  47. package/dist/pool/utils/failure-analysis.d.ts.map +1 -0
  48. package/dist/pool/utils/failure-analysis.js +224 -0
  49. package/dist/pool/utils/failure-analysis.js.map +1 -0
  50. package/dist/pool.d.ts +180 -180
  51. package/dist/types/error.d.ts +31 -1
  52. package/dist/types/error.d.ts.map +1 -1
  53. package/dist/types/error.js +30 -0
  54. package/dist/types/error.js.map +1 -1
  55. package/dist/workflow.d.ts.map +1 -1
  56. package/dist/workflow.js +4 -1
  57. package/dist/workflow.js.map +1 -1
  58. package/package.json +4 -3
package/dist/client.d.ts CHANGED
@@ -1,291 +1,291 @@
1
- import { BasicCredentials, BearerTokenCredentials, CustomCredentials, ModelFile, ModelFolder, ModelPreviewResponse, OSType, QueueResponse, QueueStatus } from "./types/api.js";
2
- import { TComfyAPIEventMap } from "./types/event.js";
3
- import { TypedEventTarget } from "./typed-event-target.js";
4
- import { ManagerFeature } from "./features/manager.js";
5
- import { MonitoringFeature } from "./features/monitoring.js";
6
- import { QueueFeature } from "./features/queue.js";
7
- import { HistoryFeature } from "./features/history.js";
8
- import { SystemFeature } from "./features/system.js";
9
- import { NodeFeature } from "./features/node.js";
10
- import { UserFeature } from "./features/user.js";
11
- import { FileFeature } from "./features/file.js";
12
- import { ModelFeature } from "./features/model.js";
13
- import { TerminalFeature } from "./features/terminal.js";
14
- import { MiscFeature } from "./features/misc.js";
15
- import { FeatureFlagsFeature } from "./features/feature-flags.js";
16
- import { WorkflowJob, WorkflowResult } from "./workflow.js";
17
- interface FetchOptions extends RequestInit {
18
- headers?: {
19
- [key: string]: string;
20
- };
21
- }
22
- type FeatureFlagsAnnouncement = {
23
- /** Whether client supports decoding preview frames with metadata (default: true) */
24
- supports_preview_metadata: boolean;
25
- /** Client-advertised max upload size in bytes (default: 200MB) */
26
- max_upload_size: number;
27
- };
28
- /**
29
- * Primary client for interacting with a ComfyUI server.
30
- *
31
- * Responsibilities:
32
- * - Connection lifecycle (WebSocket + polling fallback)
33
- * - Authentication header injection
34
- * - Capability probing / feature support detection
35
- * - High‑level event fan‑out (progress, status, terminal, etc.)
36
- * - Aggregation of modular feature namespaces under `ext.*`
37
- *
38
- * This class purposefully keeps business logic for specific domains inside feature modules
39
- * (see files in `src/features/`). Only generic transport & coordination logic lives here.
40
- */
41
- export declare class ComfyApi extends TypedEventTarget<TComfyAPIEventMap> {
42
- /** Base host (including protocol) e.g. http://localhost:8188 */
43
- apiHost: string;
44
- /** OS type as reported by the server (resolved during init) */
45
- osType: OSType;
46
- /** Indicates feature probing + socket establishment completed */
47
- isReady: boolean;
48
- /** Internal ready promise (resolved once). */
49
- private readyPromise;
50
- private resolveReady;
51
- /** Whether to subscribe to terminal log streaming on init */
52
- listenTerminal: boolean;
53
- /** Monotonic timestamp of last socket activity (used for timeout detection) */
54
- lastActivity: number;
55
- /** WebSocket inactivity timeout (ms) before attempting reconnection */
56
- private readonly wsTimeout;
57
- private wsTimer;
58
- private _pollingTimer;
59
- /** Host sans protocol (used to compose ws:// / wss:// URL) */
60
- private readonly apiBase;
61
- private clientId;
62
- private socket;
63
- private listeners;
64
- private readonly credentials;
65
- comfyOrgApiKey?: string;
66
- /** Debug flag to emit verbose console logs for instrumentation */
67
- private _debug;
68
- private headers;
69
- /** Feature flags we announce to the server upon socket open */
70
- private announcedFeatureFlags;
71
- /** Modular feature namespaces (tree intentionally flat & dependency‑free) */
72
- ext: {
73
- /** ComfyUI-Manager extension integration */
74
- readonly manager: ManagerFeature;
75
- /** Crystools monitor / system resource streaming */
76
- readonly monitor: MonitoringFeature;
77
- /** Prompt queue submission / control */
78
- readonly queue: QueueFeature;
79
- /** Execution history lookups */
80
- readonly history: HistoryFeature;
81
- /** System stats & memory free */
82
- readonly system: SystemFeature;
83
- /** Node defs + sampler / checkpoint / lora helpers */
84
- readonly node: NodeFeature;
85
- /** User CRUD & settings */
86
- readonly user: UserFeature;
87
- /** File uploads, image helpers & user data file operations */
88
- readonly file: FileFeature;
89
- /** Experimental model browsing / preview */
90
- readonly model: ModelFeature;
91
- /** Terminal log retrieval & streaming toggle */
92
- readonly terminal: TerminalFeature;
93
- /** Misc endpoints (extensions list, embeddings) */
94
- readonly misc: MiscFeature;
95
- /** Server advertised feature flags */
96
- readonly featureFlags: FeatureFlagsFeature;
97
- };
98
- /** Helper type guard shaping expected feature API */
99
- private asFeature;
100
- static generateId(): string;
101
- on<K extends keyof TComfyAPIEventMap>(type: K, callback: (event: TComfyAPIEventMap[K]) => void, options?: AddEventListenerOptions | boolean): () => void;
102
- off<K extends keyof TComfyAPIEventMap>(type: K, callback: (event: TComfyAPIEventMap[K]) => void, options?: EventListenerOptions | boolean): void;
103
- removeAllListeners(): void;
104
- get id(): string;
105
- /**
106
- * Retrieves the available features of the client.
107
- *
108
- * @returns An object containing the available features, where each feature is a key-value pair.
109
- */
110
- get availableFeatures(): Record<string, boolean>;
111
- constructor(host: string, clientId?: string, opts?: {
112
- /** Additional headers to include in all requests. */
113
- headers?: Record<string, string>;
114
- /** Do not fallback to HTTP if WebSocket is not available (keeps retrying WS). */
115
- forceWs?: boolean;
116
- /** Timeout for WebSocket inactivity before reconnect (default 10000ms). */
117
- wsTimeout?: number;
118
- /** Subscribe to terminal logs immediately on init (default false). */
119
- listenTerminal?: boolean;
120
- /** Authentication credentials (basic / bearer / custom headers). */
121
- credentials?: BasicCredentials | BearerTokenCredentials | CustomCredentials;
122
- /** Optional feature flags to announce on WebSocket open (merged with defaults). */
123
- announceFeatureFlags?: Partial<FeatureFlagsAnnouncement>;
124
- /** WebSocket reconnection tuning */
125
- reconnect?: {
126
- /** Max reconnection attempts before giving up (default 10). */
127
- maxAttempts?: number;
128
- /** Base delay (ms) for exponential backoff (default 1000). */
129
- baseDelayMs?: number;
130
- /** Max delay cap (ms) (default 15000). */
131
- maxDelayMs?: number;
132
- /** Backoff strategy: exponential | linear | custom (default exponential). */
133
- strategy?: "exponential" | "linear" | "custom";
134
- /** Percent jitter (0 disables). Only for linear/exponential (default 30). */
135
- jitterPercent?: number;
136
- /** Custom delay fn if strategy === 'custom'. Receives attempt (1-based). */
137
- customDelayFn?: (attempt: number, opts: {
138
- baseDelayMs: number;
139
- maxDelayMs: number;
140
- }) => number;
141
- };
142
- /** Optional Comfy-Org API key for paid API nodes. */
143
- comfyOrgApiKey?: string;
144
- /** Enable verbose debug logging to console (also emits 'log' events). */
145
- debug?: boolean;
146
- });
147
- /**
148
- * Destroys the client instance.
149
- * Ensures all connections, timers and event listeners are properly closed.
150
- */
151
- destroy(): void;
152
- private log;
153
- /**
154
- * Build full API URL (made public for feature modules)
155
- */
156
- apiURL(route: string): string;
157
- private getCredentialHeaders;
158
- private testCredentials;
159
- private testFeatures;
160
- /**
161
- * Fetches data from the API.
162
- *
163
- * @param route - The route to fetch data from.
164
- * @param options - The options for the fetch request.
165
- * @returns A promise that resolves to the response from the API.
166
- */
167
- fetchApi(route: string, options?: FetchOptions): Promise<Response>;
168
- /**
169
- * Polls the status for colab and other things that don't support websockets.
170
- * @returns {Promise<QueueStatus>} The status information.
171
- */
172
- pollStatus(timeout?: number): Promise<QueueStatus>;
173
- /**
174
- * Queues a prompt for processing.
175
- * @param {number} number The index at which to queue the prompt. using NULL will append to the end of the queue.
176
- * @param {object} workflow Additional workflow data.
177
- * @returns {Promise<QueuePromptResponse>} The response from the API.
178
- */
179
- /**
180
- * Fetch raw queue status snapshot (lightweight helper not yet moved into a feature wrapper).
181
- */
182
- getQueue(): Promise<QueueResponse>;
183
- /**
184
- * Hint the server to unload models / free memory (maps to `/free`).
185
- * Returns false if request fails (does not throw to simplify caller ergonomics).
186
- */
187
- freeMemory(unloadModels: boolean, freeMemory: boolean): Promise<boolean>;
188
- /**
189
- * Initialize: ping server with retries, probe features, establish WebSocket, optionally subscribe to terminal logs.
190
- * Resolves with the client instance when ready; throws on unrecoverable connection failure.
191
- */
192
- init(maxTries?: number, delayTime?: number): Promise<this>;
193
- private pingSuccess;
194
- /** Await until feature probing + socket creation finished. */
195
- waitForReady(): Promise<this>;
196
- /**
197
- * Sends a ping request to the server and returns a boolean indicating whether the server is reachable.
198
- * @returns A promise that resolves to `true` if the server is reachable, or `false` otherwise.
199
- */
200
- ping(): Promise<{
201
- readonly status: true;
202
- readonly time: number;
203
- } | {
204
- readonly status: false;
205
- }>;
206
- /**
207
- * Attempt WebSocket reconnection with exponential backoff + jitter.
208
- * Falls back to a bounded number of attempts then emits `reconnection_failed`.
209
- */
210
- reconnectWs(triggerEvent?: boolean): Promise<void>;
211
- /** Abort any in-flight reconnection loop (no-op if none active). */
212
- abortReconnect(): void;
213
- private resetLastActivity;
214
- /** Convenience: init + waitForReady (idempotent). */
215
- ready(): Promise<this>;
216
- /**
217
- * Decode a preview-with-metadata binary frame.
218
- * Layout after the 4-byte event type header:
219
- * [0..3] eventType (already consumed by caller)
220
- * [4..7] big-endian uint32: metadata JSON byte length (N)
221
- * [8..8+N) metadata JSON (utf-8)
222
- * [8+N..] image bytes (png/jpeg as declared in metadata.image_type)
223
- * Returns null if parsing fails.
224
- */
225
- private _decodePreviewWithMetadata;
226
- /**
227
- * High-level sugar: run a Workflow or PromptBuilder directly.
228
- * Accepts experimental Workflow abstraction or a raw PromptBuilder-like object with setInputNode/output mappings already applied.
229
- */
230
- run(wf: any, opts?: {
231
- pool?: any;
232
- autoDestroy?: boolean;
233
- includeOutputs?: string[];
234
- }): Promise<WorkflowJob<WorkflowResult>>;
235
- /** Backwards compatibility: ensure returned value has minimal WorkflowJob surface (.on/.done). */
236
- private _ensureWorkflowJob;
237
- /** Alias for clarity when passing explicit Workflow objects */
238
- runWorkflow(wf: any, opts?: {
239
- pool?: any;
240
- autoDestroy?: boolean;
241
- includeOutputs?: string[];
242
- }): Promise<WorkflowJob<WorkflowResult>>;
243
- /** Convenience helper: run + wait for completion results in one call. */
244
- runAndWait(wf: any, opts?: {
245
- pool?: any;
246
- includeOutputs?: string[];
247
- }): Promise<WorkflowResult>;
248
- /**
249
- * Establish a WebSocket connection for real‑time events; installs polling fallback on failure.
250
- * @param isReconnect internal flag indicating this creation follows a reconnect attempt
251
- */
252
- private createSocket;
253
- /**
254
- * Install a 2s interval polling loop to replicate essential status events when WebSocket is unavailable.
255
- * Stops automatically once a socket connection is restored.
256
- */
257
- private setupPollingFallback;
258
- /**
259
- * Retrieves a list of all available model folders.
260
- * @experimental API that may change in future versions
261
- * @returns A promise that resolves to an array of ModelFolder objects.
262
- */
263
- getModelFolders(): Promise<ModelFolder[]>;
264
- /**
265
- * Retrieves a list of all model files in a specific folder.
266
- * @experimental API that may change in future versions
267
- * @param folder - The name of the model folder.
268
- * @returns A promise that resolves to an array of ModelFile objects.
269
- */
270
- getModelFiles(folder: string): Promise<ModelFile[]>;
271
- /**
272
- * Retrieves a preview image for a specific model file.
273
- * @experimental API that may change in future versions
274
- * @param folder - The name of the model folder.
275
- * @param pathIndex - The index of the folder path where the file is stored.
276
- * @param filename - The name of the model file.
277
- * @returns A promise that resolves to a ModelPreviewResponse object containing the preview image data.
278
- */
279
- getModelPreview(folder: string, pathIndex: number, filename: string): Promise<ModelPreviewResponse>;
280
- /**
281
- * Creates a URL for a model preview image.
282
- * @experimental API that may change in future versions
283
- * @param folder - The name of the model folder.
284
- * @param pathIndex - The index of the folder path where the file is stored.
285
- * @param filename - The name of the model file.
286
- * @returns The URL string for the model preview.
287
- */
288
- getModelPreviewUrl(folder: string, pathIndex: number, filename: string): string;
289
- }
290
- export {};
1
+ import { BasicCredentials, BearerTokenCredentials, CustomCredentials, ModelFile, ModelFolder, ModelPreviewResponse, OSType, QueueResponse, QueueStatus } from "./types/api.js";
2
+ import { TComfyAPIEventMap } from "./types/event.js";
3
+ import { TypedEventTarget } from "./typed-event-target.js";
4
+ import { ManagerFeature } from "./features/manager.js";
5
+ import { MonitoringFeature } from "./features/monitoring.js";
6
+ import { QueueFeature } from "./features/queue.js";
7
+ import { HistoryFeature } from "./features/history.js";
8
+ import { SystemFeature } from "./features/system.js";
9
+ import { NodeFeature } from "./features/node.js";
10
+ import { UserFeature } from "./features/user.js";
11
+ import { FileFeature } from "./features/file.js";
12
+ import { ModelFeature } from "./features/model.js";
13
+ import { TerminalFeature } from "./features/terminal.js";
14
+ import { MiscFeature } from "./features/misc.js";
15
+ import { FeatureFlagsFeature } from "./features/feature-flags.js";
16
+ import { WorkflowJob, WorkflowResult } from "./workflow.js";
17
+ interface FetchOptions extends RequestInit {
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ type FeatureFlagsAnnouncement = {
23
+ /** Whether client supports decoding preview frames with metadata (default: true) */
24
+ supports_preview_metadata: boolean;
25
+ /** Client-advertised max upload size in bytes (default: 200MB) */
26
+ max_upload_size: number;
27
+ };
28
+ /**
29
+ * Primary client for interacting with a ComfyUI server.
30
+ *
31
+ * Responsibilities:
32
+ * - Connection lifecycle (WebSocket + polling fallback)
33
+ * - Authentication header injection
34
+ * - Capability probing / feature support detection
35
+ * - High‑level event fan‑out (progress, status, terminal, etc.)
36
+ * - Aggregation of modular feature namespaces under `ext.*`
37
+ *
38
+ * This class purposefully keeps business logic for specific domains inside feature modules
39
+ * (see files in `src/features/`). Only generic transport & coordination logic lives here.
40
+ */
41
+ export declare class ComfyApi extends TypedEventTarget<TComfyAPIEventMap> {
42
+ /** Base host (including protocol) e.g. http://localhost:8188 */
43
+ apiHost: string;
44
+ /** OS type as reported by the server (resolved during init) */
45
+ osType: OSType;
46
+ /** Indicates feature probing + socket establishment completed */
47
+ isReady: boolean;
48
+ /** Internal ready promise (resolved once). */
49
+ private readyPromise;
50
+ private resolveReady;
51
+ /** Whether to subscribe to terminal log streaming on init */
52
+ listenTerminal: boolean;
53
+ /** Monotonic timestamp of last socket activity (used for timeout detection) */
54
+ lastActivity: number;
55
+ /** WebSocket inactivity timeout (ms) before attempting reconnection */
56
+ private readonly wsTimeout;
57
+ private wsTimer;
58
+ private _pollingTimer;
59
+ /** Host sans protocol (used to compose ws:// / wss:// URL) */
60
+ private readonly apiBase;
61
+ private clientId;
62
+ private socket;
63
+ private listeners;
64
+ private readonly credentials;
65
+ comfyOrgApiKey?: string;
66
+ /** Debug flag to emit verbose console logs for instrumentation */
67
+ private _debug;
68
+ private headers;
69
+ /** Feature flags we announce to the server upon socket open */
70
+ private announcedFeatureFlags;
71
+ /** Modular feature namespaces (tree intentionally flat & dependency‑free) */
72
+ ext: {
73
+ /** ComfyUI-Manager extension integration */
74
+ readonly manager: ManagerFeature;
75
+ /** Crystools monitor / system resource streaming */
76
+ readonly monitor: MonitoringFeature;
77
+ /** Prompt queue submission / control */
78
+ readonly queue: QueueFeature;
79
+ /** Execution history lookups */
80
+ readonly history: HistoryFeature;
81
+ /** System stats & memory free */
82
+ readonly system: SystemFeature;
83
+ /** Node defs + sampler / checkpoint / lora helpers */
84
+ readonly node: NodeFeature;
85
+ /** User CRUD & settings */
86
+ readonly user: UserFeature;
87
+ /** File uploads, image helpers & user data file operations */
88
+ readonly file: FileFeature;
89
+ /** Experimental model browsing / preview */
90
+ readonly model: ModelFeature;
91
+ /** Terminal log retrieval & streaming toggle */
92
+ readonly terminal: TerminalFeature;
93
+ /** Misc endpoints (extensions list, embeddings) */
94
+ readonly misc: MiscFeature;
95
+ /** Server advertised feature flags */
96
+ readonly featureFlags: FeatureFlagsFeature;
97
+ };
98
+ /** Helper type guard shaping expected feature API */
99
+ private asFeature;
100
+ static generateId(): string;
101
+ on<K extends keyof TComfyAPIEventMap>(type: K, callback: (event: TComfyAPIEventMap[K]) => void, options?: AddEventListenerOptions | boolean): () => void;
102
+ off<K extends keyof TComfyAPIEventMap>(type: K, callback: (event: TComfyAPIEventMap[K]) => void, options?: EventListenerOptions | boolean): void;
103
+ removeAllListeners(): void;
104
+ get id(): string;
105
+ /**
106
+ * Retrieves the available features of the client.
107
+ *
108
+ * @returns An object containing the available features, where each feature is a key-value pair.
109
+ */
110
+ get availableFeatures(): Record<string, boolean>;
111
+ constructor(host: string, clientId?: string, opts?: {
112
+ /** Additional headers to include in all requests. */
113
+ headers?: Record<string, string>;
114
+ /** Do not fallback to HTTP if WebSocket is not available (keeps retrying WS). */
115
+ forceWs?: boolean;
116
+ /** Timeout for WebSocket inactivity before reconnect (default 10000ms). */
117
+ wsTimeout?: number;
118
+ /** Subscribe to terminal logs immediately on init (default false). */
119
+ listenTerminal?: boolean;
120
+ /** Authentication credentials (basic / bearer / custom headers). */
121
+ credentials?: BasicCredentials | BearerTokenCredentials | CustomCredentials;
122
+ /** Optional feature flags to announce on WebSocket open (merged with defaults). */
123
+ announceFeatureFlags?: Partial<FeatureFlagsAnnouncement>;
124
+ /** WebSocket reconnection tuning */
125
+ reconnect?: {
126
+ /** Max reconnection attempts before giving up (default 10). */
127
+ maxAttempts?: number;
128
+ /** Base delay (ms) for exponential backoff (default 1000). */
129
+ baseDelayMs?: number;
130
+ /** Max delay cap (ms) (default 15000). */
131
+ maxDelayMs?: number;
132
+ /** Backoff strategy: exponential | linear | custom (default exponential). */
133
+ strategy?: "exponential" | "linear" | "custom";
134
+ /** Percent jitter (0 disables). Only for linear/exponential (default 30). */
135
+ jitterPercent?: number;
136
+ /** Custom delay fn if strategy === 'custom'. Receives attempt (1-based). */
137
+ customDelayFn?: (attempt: number, opts: {
138
+ baseDelayMs: number;
139
+ maxDelayMs: number;
140
+ }) => number;
141
+ };
142
+ /** Optional Comfy-Org API key for paid API nodes. */
143
+ comfyOrgApiKey?: string;
144
+ /** Enable verbose debug logging to console (also emits 'log' events). */
145
+ debug?: boolean;
146
+ });
147
+ /**
148
+ * Destroys the client instance.
149
+ * Ensures all connections, timers and event listeners are properly closed.
150
+ */
151
+ destroy(): void;
152
+ private log;
153
+ /**
154
+ * Build full API URL (made public for feature modules)
155
+ */
156
+ apiURL(route: string): string;
157
+ private getCredentialHeaders;
158
+ private testCredentials;
159
+ private testFeatures;
160
+ /**
161
+ * Fetches data from the API.
162
+ *
163
+ * @param route - The route to fetch data from.
164
+ * @param options - The options for the fetch request.
165
+ * @returns A promise that resolves to the response from the API.
166
+ */
167
+ fetchApi(route: string, options?: FetchOptions): Promise<Response>;
168
+ /**
169
+ * Polls the status for colab and other things that don't support websockets.
170
+ * @returns {Promise<QueueStatus>} The status information.
171
+ */
172
+ pollStatus(timeout?: number): Promise<QueueStatus>;
173
+ /**
174
+ * Queues a prompt for processing.
175
+ * @param {number} number The index at which to queue the prompt. using NULL will append to the end of the queue.
176
+ * @param {object} workflow Additional workflow data.
177
+ * @returns {Promise<QueuePromptResponse>} The response from the API.
178
+ */
179
+ /**
180
+ * Fetch raw queue status snapshot (lightweight helper not yet moved into a feature wrapper).
181
+ */
182
+ getQueue(): Promise<QueueResponse>;
183
+ /**
184
+ * Hint the server to unload models / free memory (maps to `/free`).
185
+ * Returns false if request fails (does not throw to simplify caller ergonomics).
186
+ */
187
+ freeMemory(unloadModels: boolean, freeMemory: boolean): Promise<boolean>;
188
+ /**
189
+ * Initialize: ping server with retries, probe features, establish WebSocket, optionally subscribe to terminal logs.
190
+ * Resolves with the client instance when ready; throws on unrecoverable connection failure.
191
+ */
192
+ init(maxTries?: number, delayTime?: number): Promise<this>;
193
+ private pingSuccess;
194
+ /** Await until feature probing + socket creation finished. */
195
+ waitForReady(): Promise<this>;
196
+ /**
197
+ * Sends a ping request to the server and returns a boolean indicating whether the server is reachable.
198
+ * @returns A promise that resolves to `true` if the server is reachable, or `false` otherwise.
199
+ */
200
+ ping(): Promise<{
201
+ readonly status: true;
202
+ readonly time: number;
203
+ } | {
204
+ readonly status: false;
205
+ }>;
206
+ /**
207
+ * Attempt WebSocket reconnection with exponential backoff + jitter.
208
+ * Falls back to a bounded number of attempts then emits `reconnection_failed`.
209
+ */
210
+ reconnectWs(triggerEvent?: boolean): Promise<void>;
211
+ /** Abort any in-flight reconnection loop (no-op if none active). */
212
+ abortReconnect(): void;
213
+ private resetLastActivity;
214
+ /** Convenience: init + waitForReady (idempotent). */
215
+ ready(): Promise<this>;
216
+ /**
217
+ * Decode a preview-with-metadata binary frame.
218
+ * Layout after the 4-byte event type header:
219
+ * [0..3] eventType (already consumed by caller)
220
+ * [4..7] big-endian uint32: metadata JSON byte length (N)
221
+ * [8..8+N) metadata JSON (utf-8)
222
+ * [8+N..] image bytes (png/jpeg as declared in metadata.image_type)
223
+ * Returns null if parsing fails.
224
+ */
225
+ private _decodePreviewWithMetadata;
226
+ /**
227
+ * High-level sugar: run a Workflow or PromptBuilder directly.
228
+ * Accepts experimental Workflow abstraction or a raw PromptBuilder-like object with setInputNode/output mappings already applied.
229
+ */
230
+ run(wf: any, opts?: {
231
+ pool?: any;
232
+ autoDestroy?: boolean;
233
+ includeOutputs?: string[];
234
+ }): Promise<WorkflowJob<WorkflowResult>>;
235
+ /** Backwards compatibility: ensure returned value has minimal WorkflowJob surface (.on/.done). */
236
+ private _ensureWorkflowJob;
237
+ /** Alias for clarity when passing explicit Workflow objects */
238
+ runWorkflow(wf: any, opts?: {
239
+ pool?: any;
240
+ autoDestroy?: boolean;
241
+ includeOutputs?: string[];
242
+ }): Promise<WorkflowJob<WorkflowResult>>;
243
+ /** Convenience helper: run + wait for completion results in one call. */
244
+ runAndWait(wf: any, opts?: {
245
+ pool?: any;
246
+ includeOutputs?: string[];
247
+ }): Promise<WorkflowResult>;
248
+ /**
249
+ * Establish a WebSocket connection for real‑time events; installs polling fallback on failure.
250
+ * @param isReconnect internal flag indicating this creation follows a reconnect attempt
251
+ */
252
+ private createSocket;
253
+ /**
254
+ * Install a 2s interval polling loop to replicate essential status events when WebSocket is unavailable.
255
+ * Stops automatically once a socket connection is restored.
256
+ */
257
+ private setupPollingFallback;
258
+ /**
259
+ * Retrieves a list of all available model folders.
260
+ * @experimental API that may change in future versions
261
+ * @returns A promise that resolves to an array of ModelFolder objects.
262
+ */
263
+ getModelFolders(): Promise<ModelFolder[]>;
264
+ /**
265
+ * Retrieves a list of all model files in a specific folder.
266
+ * @experimental API that may change in future versions
267
+ * @param folder - The name of the model folder.
268
+ * @returns A promise that resolves to an array of ModelFile objects.
269
+ */
270
+ getModelFiles(folder: string): Promise<ModelFile[]>;
271
+ /**
272
+ * Retrieves a preview image for a specific model file.
273
+ * @experimental API that may change in future versions
274
+ * @param folder - The name of the model folder.
275
+ * @param pathIndex - The index of the folder path where the file is stored.
276
+ * @param filename - The name of the model file.
277
+ * @returns A promise that resolves to a ModelPreviewResponse object containing the preview image data.
278
+ */
279
+ getModelPreview(folder: string, pathIndex: number, filename: string): Promise<ModelPreviewResponse>;
280
+ /**
281
+ * Creates a URL for a model preview image.
282
+ * @experimental API that may change in future versions
283
+ * @param folder - The name of the model folder.
284
+ * @param pathIndex - The index of the folder path where the file is stored.
285
+ * @param filename - The name of the model file.
286
+ * @returns The URL string for the model preview.
287
+ */
288
+ getModelPreviewUrl(folder: string, pathIndex: number, filename: string): string;
289
+ }
290
+ export {};
291
291
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,MAAM,EACN,aAAa,EACb,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD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