@comfyorg/comfyui-frontend-types 1.59.1 → 1.61.14

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 (3) hide show
  1. package/index.d.ts +736 -1112
  2. package/package.json +4 -7
  3. package/LICENSE +0 -674
package/index.d.ts CHANGED
@@ -1,31 +1,42 @@
1
1
  import { BillingCycle } from '@comfyorg/account-core/billing';
2
2
  import { BillingSource } from '@comfyorg/billing-contract';
3
+ import { BillingStatusResponse } from '@comfyorg/ingest-types';
3
4
  import { BillingTierKey } from '@comfyorg/account-core/billing';
4
- import { BlendFn } from '@comfyorg/layer-editor/mode';
5
- import { ClassValue } from 'cva';
5
+ import { BudgetHeldJobNotResumed } from '@comfyorg/ingest-types';
6
6
  import { ComfyDesktop2AuthBridge } from '@comfyorg/comfyui-desktop-bridge-types';
7
7
  import { ComfyDesktop2Bridge } from '@comfyorg/comfyui-desktop-bridge-types';
8
+ import { ComfyDownloadProgress } from '@comfyorg/comfyui-desktop-bridge-types';
8
9
  import { ComfyNodeDef } from '@comfyorg/object-info-parser';
10
+ import { ComfyNodeDef as ComfyNodeDef_2 } from '@comfyorg/object-info-parser/schemas/nodeDefSchemaV2';
9
11
  import { Component } from 'vue';
10
12
  import { ComponentAttrs } from 'vue-component-type-helpers';
13
+ import { CompositorLayerState } from '@comfyorg/layer-editor/persistence/compositorTypes';
14
+ import { DialogContentSize } from '@comfyorg/design-system/lib/dialog/dialog.variants';
11
15
  import { GetEmbeddingsResponse as EmbeddingsResponse } from '@comfyorg/ingest-types';
16
+ import { ExecutionError } from '@comfyorg/ingest-types';
12
17
  import { GetExtensionsResponse as ExtensionsResponse } from '@comfyorg/ingest-types';
13
18
  import { GetI18nResponse } from '@comfyorg/ingest-types';
14
19
  import { InputSpec } from '@comfyorg/object-info-parser';
20
+ import { JobCancelResponse } from '@comfyorg/ingest-types';
21
+ import { JobsCancelResponse } from '@comfyorg/ingest-types';
15
22
  import { LightInfoEntry } from '@comfyorg/viewport3d/lightInfo/types';
23
+ import { ModelDownloadData } from '@comfyorg/ingest-types';
24
+ import { ModelFile } from '@comfyorg/ingest-types';
25
+ import { ModelFolder } from '@comfyorg/ingest-types';
16
26
  import { NodeBadgeMode } from '@comfyorg/object-info-parser';
17
27
  import { PostAssetsFromWorkflowResponse } from '@comfyorg/ingest-types';
18
- import { PreviewSubscribeResponse } from '@comfyorg/ingest-types';
28
+ import { PreviewSubscribeResponse } from '@comfyorg/billing-core';
19
29
  import { PromptErrorResponse } from '@comfyorg/ingest-types';
20
30
  import { PromptInfo } from '@comfyorg/ingest-types';
31
+ import { PromptOutputsSkippedData } from '@comfyorg/ingest-types';
21
32
  import { PromptResponse as PromptResponse_2 } from '@comfyorg/ingest-types';
33
+ import { Raw } from 'vue';
22
34
  import { Ref } from 'vue';
23
35
  import { ShallowRef } from 'vue';
24
- import { SubscribeResponse } from '@comfyorg/ingest-types';
36
+ import { SubscribeResponse } from '@comfyorg/billing-core';
25
37
  import { SystemStatsResponse } from '@comfyorg/ingest-types';
26
- import { Transform } from '@comfyorg/layer-editor/node';
38
+ import { ThemePresets } from '@comfyorg/theme-core/themePresetSchema';
27
39
  import { UserDataResponseFull } from '@comfyorg/ingest-types';
28
- import { VariantProps } from 'cva';
29
40
  import { z } from 'zod';
30
41
 
31
42
  declare interface AboutPageBadge {
@@ -83,9 +94,9 @@ declare type AnimationOptions = {
83
94
  declare interface ApiAuthProvider {
84
95
  waitForInitialization(): Promise<void>;
85
96
  getAuthHeader(): Promise<AuthHeader | null>;
86
- getAuthToken(): Promise<string | undefined>;
97
+ getAuthToken(request?: AuthTokenRequest): Promise<string | undefined>;
87
98
  shouldRetryOn401(): Promise<boolean>;
88
- fetch(input: RequestInfo | URL, init: RequestInit, retryOn401: boolean, retrySignalLifecycle?: RetrySignalLifecycle): Promise<Response>;
99
+ fetch(input: RequestInfo | URL, init: RequestInit, retryOn401: boolean, retrySignalLifecycle?: RetrySignalLifecycle, retryPolicy?: RetryPolicy): Promise<Response>;
89
100
  }
90
101
 
91
102
  /** Dictionary of all api calls */
@@ -174,6 +185,11 @@ declare type AuthHeader = LoggedInAuthHeader | ApiKeyAuthHeader;
174
185
  */
175
186
  declare type AuthScheme = 'web-session' | 'cloud-auth-header' | 'none';
176
187
 
188
+ declare interface AuthTokenRequest {
189
+ /** Asks for a newly minted credential. `undefined` means none was minted; a provider that cannot enforce freshness may return its current one. */
190
+ forceRefresh?: boolean;
191
+ }
192
+
177
193
  declare interface AuthUserInfo {
178
194
  id: UserId;
179
195
  }
@@ -190,6 +206,7 @@ declare interface BackendApiCalls {
190
206
  execution_error: ExecutionErrorWsMessage;
191
207
  execution_interrupted: ExecutionInterruptedWsMessage;
192
208
  execution_cached: ExecutionCachedWsMessage;
209
+ prompt_outputs_skipped: PromptOutputsSkippedData;
193
210
  logs: LogsWsMessage;
194
211
  /** Binary preview/progress data */
195
212
  b_preview: Blob;
@@ -201,12 +218,15 @@ declare interface BackendApiCalls {
201
218
  displayNodeId: string;
202
219
  realNodeId: string;
203
220
  jobId: string;
221
+ workflowId?: string;
204
222
  };
205
223
  progress_text: ProgressTextWsMessage;
206
224
  progress_state: ProgressStateWsMessage;
207
225
  feature_flags: FeatureFlagsWsMessage;
208
226
  agent_status: AgentStatusWsMessage;
227
+ billing_status: BillingStatusWsMessage;
209
228
  asset_download: AssetDownloadWsMessage;
229
+ model_download: ModelDownloadData;
210
230
  asset_export: AssetExportWsMessage;
211
231
  'assets.seed.completed': AssetSeedCompletedWsMessage;
212
232
  }
@@ -346,16 +366,13 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
346
366
  static labelValueGap: number;
347
367
  computedHeight?: number;
348
368
  serialize?: boolean;
349
- computeLayoutSize?(node: RegisteredLGraphNode): {
350
- minHeight: number;
351
- maxHeight?: number;
352
- minWidth: number;
353
- maxWidth?: number;
354
- };
369
+ computeLayoutSize?(node: RegisteredLGraphNode): WidgetLayoutSize;
355
370
  private _node;
356
371
  /** The node that this widget belongs to. */
357
372
  get node(): RegisteredLGraphNode;
358
- linkedWidgets?: IBaseWidget[];
373
+ private _linkedWidgets?;
374
+ get linkedWidgets(): IBaseWidget[] | undefined;
375
+ set linkedWidgets(value: IBaseWidget[] | undefined);
359
376
  private _name;
360
377
  get name(): string;
361
378
  set name(value: string);
@@ -385,6 +402,7 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
385
402
  computedDisabled?: boolean;
386
403
  tooltip?: string;
387
404
  private _state;
405
+ private hasRefusedRegistration;
388
406
  get label(): string | undefined;
389
407
  set label(value: string | undefined);
390
408
  private _visibility;
@@ -406,13 +424,11 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
406
424
  get value(): TWidget['value'];
407
425
  set value(value: TWidget['value']);
408
426
  get widgetId(): WidgetId | undefined;
409
- /**
410
- * Associates this widget with a node ID and registers it in the WidgetValueStore.
411
- * Once set, value reads/writes will be delegated to the store.
412
- */
427
+ private boundWidgetId;
413
428
  setNodeId(nodeId: NodeId): void;
429
+ private nodeBindsStateElsewhere;
414
430
  releaseRegisteredState(): void;
415
- bindRegisteredState(nodeId: NodeId): boolean;
431
+ bindRegisteredState(nodeId: NodeId, name?: string): boolean;
416
432
  constructor(widget: TWidget & {
417
433
  node: RegisteredLGraphNode;
418
434
  });
@@ -453,8 +469,7 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
453
469
  /**
454
470
  * Draws only the widget's name for a row whose control is suppressed by an
455
471
  * upstream connection. The connected input slot dot is drawn separately by
456
- * slot rendering. Called from LGraphNode via toConcreteWidget, which fallow
457
- * cannot resolve.
472
+ * slot rendering. Called from LGraphNode via toConcreteWidget.
458
473
  */
459
474
  drawSuppressedRowLabel(ctx: CanvasRenderingContext2D, { width }: DrawWidgetOptions): void;
460
475
  /**
@@ -477,20 +492,19 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
477
492
  * @param value The value to set
478
493
  * @param options The options for setting the value
479
494
  */
480
- setValue(value: TWidget['value'], { e, node, canvas }: WidgetEventOptions): void;
481
- /**
482
- * Clones the widget.
483
- * @param node The node that will own the cloned widget.
484
- * @returns A new widget with the same properties as the original
485
- * @remarks Subclasses with custom constructors must override this method.
486
- *
487
- * Correctly and safely typing this is currently not possible (practical?) in TypeScript 5.8.
488
- */
489
- createCopyForNode(node: RegisteredLGraphNode): this;
495
+ setValue(value: TWidget['value'], { e, node, canvas }?: WidgetValueOptions): void;
490
496
  }
491
497
 
492
498
  declare type BasicReadonlyNetwork = Pick<ReadonlyLinkNetwork, 'getNodeById' | 'links' | 'getLink' | 'inputNode' | 'outputNode'>;
493
499
 
500
+ /**
501
+ * Cloud pushes this when shared or Agent-scoped funds change. It is a hint,
502
+ * not the system of record: clients reconcile by reading billing status.
503
+ */
504
+ declare interface BillingStatusWsMessage {
505
+ billing_status?: Partial<Pick<BillingStatusResponse, 'has_funds' | 'scoped_has_funds' | 'scoped_effective_has_funds'>>;
506
+ }
507
+
494
508
  declare type BookmarkCustomization = {
495
509
  icon?: string;
496
510
  color?: string;
@@ -505,15 +519,13 @@ declare class BooleanWidget extends BaseWidget<IBooleanWidget> implements IBoole
505
519
 
506
520
  export declare type BottomPanelExtension = VueBottomPanelExtension | CustomBottomPanelExtension;
507
521
 
508
- declare interface BoundingBox {
509
- x: number;
510
- y: number;
511
- width: number;
512
- height: number;
522
+ declare interface BoundingBox extends Bounds {
513
523
  metadata: BoundingBoxMetadata;
514
524
  }
515
525
 
516
526
  declare class BoundingBoxesWidget extends BaseWidget<IBoundingBoxesWidget> implements IBoundingBoxesWidget {
527
+ get value(): IBoundingBoxesWidget['value'];
528
+ set value(value: IBoundingBoxesWidget['value']);
517
529
  drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
518
530
  onClick(_options: WidgetEventOptions): void;
519
531
  }
@@ -534,11 +546,7 @@ declare class BoundingBoxWidget extends BaseWidget<IBoundingBoxWidget> implement
534
546
  onClick(_options: WidgetEventOptions): void;
535
547
  }
536
548
 
537
- declare interface Bounds {
538
- x: number;
539
- y: number;
540
- width: number;
541
- height: number;
549
+ declare interface Bounds extends Point2D, Size2D {
542
550
  }
543
551
 
544
552
  declare class ButtonWidget extends BaseWidget<IButtonWidget> implements IButtonWidget {
@@ -560,17 +568,7 @@ declare type ButtonWidgetSource = Omit<IButtonWidget, 'options'> & {
560
568
 
561
569
  export declare type CanvasColour = string | CanvasGradient | CanvasPattern;
562
570
 
563
- /**
564
- * Tells the canvas which interactions the host application allows right now.
565
- * The application implements it over its own state and hands it to
566
- * {@link LGraphCanvas} through `options.interactionMode`; litegraph never
567
- * reads application stores.
568
- */
569
571
  declare interface CanvasInteractionModeReader {
570
- /**
571
- * `true` while the canvas is a picking surface: nodes can be selected and
572
- * the view can be panned and zoomed, but nothing may change the graph.
573
- */
574
572
  isSelectOnly(): boolean;
575
573
  }
576
574
 
@@ -664,6 +662,8 @@ declare class CanvasPointer {
664
662
  eMove?: CanvasPointerEvent;
665
663
  /** The last pointerup event for the primary button */
666
664
  eUp?: CanvasPointerEvent;
665
+ /** Screen-space travel already applied by canvas panning since the last pointerdown */
666
+ panTravel: [number, number];
667
667
  /** Currently detected input device type */
668
668
  detectedDevice: 'mouse' | 'trackpad';
669
669
  /** Timestamp of last wheel event for cooldown tracking */
@@ -802,6 +802,11 @@ export declare interface CanvasPointerEvent extends PointerEvent, CanvasMouseEve
802
802
  /** All properties added when converting a pointer event to a CanvasPointerEvent (via {@link LGraphCanvas.adjustMouseEvent}). */
803
803
  declare type CanvasPointerExtensions = ICanvasPosition & IDeltaPosition & IOffsetWorkaround;
804
804
 
805
+ declare interface ChangeTrackerConstructor {
806
+ new (workflow: ComfyWorkflow, initialState: ComfyWorkflowJSON): WorkflowChangeTracker;
807
+ graphEqual(a: ComfyWorkflowJSON | null | undefined, b: ComfyWorkflowJSON | null | undefined): boolean;
808
+ }
809
+
805
810
  /**
806
811
  * Widget for displaying charts and data visualizations
807
812
  * This is a widget that only has a Vue widgets implementation
@@ -823,23 +828,6 @@ declare interface ClipboardItems_2 {
823
828
  subgraphs?: ExportedSubgraph[];
824
829
  }
825
830
 
826
- /**
827
- * The items created by a clipboard paste operation.
828
- * Includes maps of original copied IDs to newly created items.
829
- */
830
- declare interface ClipboardPasteResult {
831
- /** All successfully created items */
832
- created: Positionable[];
833
- /** Map: original node IDs to newly created nodes */
834
- nodes: Map<SerializedNodeId, LGraphNode>;
835
- /** Map: original link IDs to new link IDs */
836
- links: Map<LinkId, LLink>;
837
- /** Map: original reroute IDs to newly created reroutes */
838
- reroutes: Map<RerouteId, Reroute>;
839
- /** Map: original subgraph IDs to newly created subgraphs */
840
- subgraphs: Map<RegisteredSubgraphId, RegisteredSubgraph>;
841
- }
842
-
843
831
  declare type ColorFormat = 'hex' | 'rgb' | 'hsb';
844
832
 
845
833
  /**
@@ -852,8 +840,6 @@ export declare interface ColorOption {
852
840
  groupcolor: string;
853
841
  }
854
842
 
855
- declare type ColorPalettes = Record<string, Palette>;
856
-
857
843
  declare interface ColorStop {
858
844
  readonly offset: number;
859
845
  readonly color: readonly [r: number, g: number, b: number];
@@ -902,6 +888,7 @@ export declare interface ComfyApi extends EventTarget {
902
888
  }
903
889
 
904
890
  export declare class ComfyApi extends EventTarget {
891
+ private readonly ports;
905
892
  private _registered;
906
893
  /**
907
894
  * Maps an original event listener to its error-guarded wrapper, so that
@@ -928,6 +915,10 @@ export declare class ComfyApi extends EventTarget {
928
915
  * identity always wins and superseded attempts never open a leaked socket.
929
916
  */
930
917
  private socketGeneration;
918
+ private socketRetryDelayMs;
919
+ private consecutiveFailedConnects;
920
+ private lastServerCloseReason;
921
+ private revokedSocketEnded;
931
922
  private authProvider;
932
923
  reportedUnknownMessageTypes: Set<string>;
933
924
  /**
@@ -966,7 +957,8 @@ export declare class ComfyApi extends EventTarget {
966
957
  * The API key for the comfy org account if the user logged in via API key.
967
958
  */
968
959
  apiKey?: string;
969
- constructor();
960
+ loadedReleaseId?: string;
961
+ constructor(ports: ComfyApiPorts);
970
962
  /**
971
963
  * Snapshots the page host, base path, and stored client id. Runs on first
972
964
  * use; the bootstrap calls it before routing can change the location.
@@ -991,7 +983,18 @@ export declare class ComfyApi extends EventTarget {
991
983
  * anonymous.
992
984
  */
993
985
  setAuthProvider(provider: ApiAuthProvider): void;
986
+ private webSessionScope;
994
987
  private getWebSessionSend;
988
+ private sendOn;
989
+ private resolveCloudAuth;
990
+ /** The credential headers {@link fetchApi} attaches to a request with this method; empty off-cloud or signed out. */
991
+ getRequestAuthHeaders({ method }?: {
992
+ method?: string;
993
+ }): Promise<Record<string, string>>;
994
+ /**
995
+ * @deprecated Use {@link getRequestAuthHeaders}. Undefined off-cloud.
996
+ */
997
+ getAuthStore(): Promise<LegacyAuthStore | undefined>;
995
998
  /** Sends a same-origin request on the web session; undefined when this tab is not on it. */
996
999
  fetchOnWebSession(url: string, init: RequestInit): Promise<Response | undefined>;
997
1000
  /**
@@ -1045,10 +1048,6 @@ export declare class ComfyApi extends EventTarget {
1045
1048
  private addSocketAuth;
1046
1049
  /** The cloud socket's auth params; null when no one is signed in to open it. */
1047
1050
  socketAuthParams(): Promise<URLSearchParams | null>;
1048
- /**
1049
- * Creates and connects a WebSocket for realtime updates
1050
- * @param {boolean} isReconnect If the socket is connection is a reconnect attempt
1051
- */
1052
1051
  private createSocket;
1053
1052
  /**
1054
1053
  * Initialises sockets and realtime updates
@@ -1066,6 +1065,7 @@ export declare class ComfyApi extends EventTarget {
1066
1065
  * a new web session workspace takes effect. Does nothing before init().
1067
1066
  */
1068
1067
  reconnectSocket(): Promise<void>;
1068
+ private endRevokedSocket;
1069
1069
  private replaceSocket;
1070
1070
  /**
1071
1071
  * Gets a list of extension urls
@@ -1095,6 +1095,8 @@ export declare class ComfyApi extends EventTarget {
1095
1095
  private nodeDefsPrefetch?;
1096
1096
  /** Start fetching `/object_info` so the next `getNodeDefs()` can reuse it. */
1097
1097
  prefetchNodeDefs(): void;
1098
+ /** The `/object_info` response, the prefetched one when there is one, whatever its HTTP status. */
1099
+ fetchNodeDefs(): Promise<Response>;
1098
1100
  getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
1099
1101
  /**
1100
1102
  * Queues a prompt to be executed
@@ -1151,12 +1153,15 @@ export declare class ComfyApi extends EventTarget {
1151
1153
  Running: JobListItem[];
1152
1154
  Pending: JobListItem[];
1153
1155
  }>;
1156
+ /** Gets the jobs a hard budget cap holds; rejects when the read fails. */
1157
+ getHeldJobs(): Promise<JobListItem[]>;
1154
1158
  /**
1155
1159
  * Gets the prompt execution history
1156
1160
  * @returns Prompt history including node outputs
1157
1161
  */
1158
1162
  getHistory(max_items?: number, options?: {
1159
1163
  offset?: number;
1164
+ throwOnError?: boolean;
1160
1165
  }): Promise<JobListItem[]>;
1161
1166
  /**
1162
1167
  * Gets detailed job info including outputs and workflow
@@ -1177,23 +1182,13 @@ export declare class ComfyApi extends EventTarget {
1177
1182
  * @returns System stats such as python version, OS, per device info
1178
1183
  */
1179
1184
  getSystemStats(): Promise<SystemStats>;
1180
- /**
1181
- * Sends a POST request to the API
1182
- * @param {*} type The endpoint to post to
1183
- * @param {*} body Optional POST data
1184
- */
1185
1185
  private _postItem;
1186
- /**
1187
- * Deletes an item from the specified list
1188
- * @param {string} type The type of item to delete, queue or history
1189
- * @param {number} id The id of the item to delete
1190
- */
1191
- deleteItem(type: string, id: string): Promise<void>;
1186
+ deleteItem(type: string, id: string): Promise<boolean>;
1192
1187
  /**
1193
1188
  * Clears the specified list
1194
1189
  * @param {string} type The type of list to clear, queue or history
1195
1190
  */
1196
- clearItems(type: string): Promise<void>;
1191
+ clearItems(type: string): Promise<boolean>;
1197
1192
  /**
1198
1193
  * Interrupts the execution of the running job. If runningJobId is provided,
1199
1194
  * it is included in the payload as a helpful hint to the backend.
@@ -1206,16 +1201,23 @@ export declare class ComfyApi extends EventTarget {
1206
1201
  * runtime exposes this endpoint yet; do not merge callers before parity lands.
1207
1202
  *
1208
1203
  * @param {string} jobId The id of the job to cancel
1204
+ * @returns The validated response, or `undefined` when the body is not one
1209
1205
  */
1210
- cancelJob(jobId: string): Promise<void>;
1206
+ cancelJob(jobId: string): Promise<JobCancelResponse | undefined>;
1211
1207
  /**
1212
1208
  * Cancels multiple jobs in a single request via `POST /api/jobs/cancel` with
1213
1209
  * body `{ job_ids: [...] }`. Already-terminal jobs are no-ops. Same runtime
1214
1210
  * parity requirement as {@link cancelJob}.
1215
1211
  *
1216
1212
  * @param {string[]} jobIds The ids of the jobs to cancel
1213
+ * @returns The validated response, or `undefined` when the body is not one
1217
1214
  */
1218
- cancelJobs(jobIds: string[]): Promise<void>;
1215
+ cancelJobs(jobIds: string[]): Promise<JobsCancelResponse | undefined>;
1216
+ /**
1217
+ * Resumes budget-held jobs via `POST /api/billing/budgets/held-jobs/resume`.
1218
+ * With no ids the server picks every held job the caller may resume.
1219
+ */
1220
+ resumeHeldJobs(jobIds?: string[]): Promise<HeldJobsResumeOutcome>;
1219
1221
  /**
1220
1222
  * Gets user configuration data and where data should be stored
1221
1223
  */
@@ -1230,7 +1232,7 @@ export declare class ComfyApi extends EventTarget {
1230
1232
  * Gets all setting values for the current user
1231
1233
  * @returns { Promise<string, unknown> } A dictionary of id -> value
1232
1234
  */
1233
- getSettings(): Promise<Settings>;
1235
+ getSettings(options?: Pick<FetchApiOptions, 'skipStatusRetry'>): Promise<Settings>;
1234
1236
  /**
1235
1237
  * Gets a setting for the current user
1236
1238
  * @param { string } id The id of the setting to fetch
@@ -1261,6 +1263,7 @@ export declare class ComfyApi extends EventTarget {
1261
1263
  stringify?: boolean;
1262
1264
  throwOnError?: boolean;
1263
1265
  full_info?: boolean;
1266
+ reportConflict?: boolean;
1264
1267
  }): Promise<Response>;
1265
1268
  /**
1266
1269
  * Deletes a user data file for the current user
@@ -1281,7 +1284,9 @@ export declare class ComfyApi extends EventTarget {
1281
1284
  getLogs(): Promise<string>;
1282
1285
  getRawLogs(): Promise<LogsRawResponse>;
1283
1286
  subscribeLogs(enabled: boolean): Promise<void>;
1284
- getFolderPaths(): Promise<Record<string, string[]>>;
1287
+ getFolderPaths({ signal }?: {
1288
+ signal?: AbortSignal;
1289
+ }): Promise<Record<string, string[]>>;
1285
1290
  freeMemory(options: {
1286
1291
  freeExecutionCache: boolean;
1287
1292
  }): Promise<void>;
@@ -1311,14 +1316,18 @@ export declare class ComfyApi extends EventTarget {
1311
1316
  getServerFeatures(): Record<string, unknown>;
1312
1317
  }
1313
1318
 
1319
+ /** Host capabilities the composition root supplies to the client. */
1320
+ declare interface ComfyApiPorts {
1321
+ readonly isCloud: boolean;
1322
+ /** A session or developer override for a server feature flag; undefined when none applies. */
1323
+ readonly featureFlagOverride: <T>(featureName: string & {
1324
+ readonly valueType?: T;
1325
+ }) => T | undefined;
1326
+ readonly onFreeMemory: (result: FreeMemoryResult) => void;
1327
+ }
1328
+
1314
1329
  declare type ComfyApiWorkflow = z.infer<typeof zComfyApiWorkflow>;
1315
1330
 
1316
- /**
1317
- * The public surface of the application singleton created in
1318
- * `@/scripts/app`. Modules that the app itself imports reach the running
1319
- * instance through `useApp()` from `@/scripts/appInstance`; only the
1320
- * composition root imports the class.
1321
- */
1322
1331
  export declare interface ComfyApp {
1323
1332
  vueAppReady: boolean;
1324
1333
  readonly api: ComfyApi;
@@ -1373,6 +1382,7 @@ export declare interface ComfyApp {
1373
1382
  getRandParam(): string;
1374
1383
  setup(canvasEl: HTMLCanvasElement): Promise<void>;
1375
1384
  getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
1385
+ fetchNodeDefs(): Promise<NodeDefsFetch>;
1376
1386
  registerNodes(): Promise<void>;
1377
1387
  registerNodeDef(nodeId: string, nodeDef: ComfyNodeDef): Promise<void>;
1378
1388
  registerNodesFromDefs(defs: Record<string, ComfyNodeDef>): Promise<void>;
@@ -1383,6 +1393,12 @@ export declare interface ComfyApp {
1383
1393
  }[];
1384
1394
  }): void;
1385
1395
  loadGraphData(graphData?: ComfyWorkflowJSON, clean?: boolean, restore_view?: boolean, workflow?: string | null | ComfyWorkflow, options?: LoadGraphDataOptions): Promise<LoadedComfyWorkflow | boolean | undefined>;
1396
+ /** Create a root graph wired with the app's per-graph lifecycle hooks. */
1397
+ createRootGraph(): LGraph;
1398
+ /** Make `graph` the root graph shown on the canvas. */
1399
+ activateRootGraph(graph: LGraph): void;
1400
+ /** Run `operation` after every earlier graph load or root graph switch has settled. */
1401
+ enqueueGraphLoad<T>(operation: () => Promise<T>): Promise<T>;
1386
1402
  refreshMissingModels(options?: {
1387
1403
  silent?: boolean;
1388
1404
  reloadDefs?: boolean;
@@ -1397,21 +1413,23 @@ export declare interface ComfyApp {
1397
1413
  handleFile(file: File, openSource?: WorkflowOpenSource, options?: {
1398
1414
  deferWarnings?: boolean;
1399
1415
  onNodeCreated?: (node: LGraphNode) => void;
1400
- }): Promise<void>;
1416
+ initiator?: 'user';
1417
+ }): Promise<void | false>;
1401
1418
  handleFileList(fileList: File[]): Promise<void>;
1402
1419
  handleAudioFileList(fileList: File[]): Promise<void>;
1403
1420
  handleVideoFileList(fileList: File[]): Promise<void>;
1404
1421
  positionNodes(nodes: LGraphNode[]): void;
1405
1422
  positionBatchNodes(nodes: LGraphNode[], batchNode: LGraphNode): void;
1406
1423
  isApiJson(data: unknown): data is ComfyApiWorkflow;
1407
- loadApiJson(apiData: ComfyApiWorkflow, fileName: string, options?: {
1424
+ loadApiJson(apiData: ComfyApiWorkflow, fileName?: string, options?: {
1408
1425
  deferWarnings?: boolean;
1409
- }): Promise<void>;
1426
+ initiator?: 'user';
1427
+ }): Promise<void | false>;
1410
1428
  registerExtension(extension: ComfyExtension): void;
1411
1429
  collectCanvasMenuItems(canvas: LGraphCanvas): IContextMenuValue[];
1412
1430
  collectNodeMenuItems(node: LGraphNode): IContextMenuValue[];
1413
- reloadNodeDefs(): Promise<void>;
1414
- refreshComboInNodes(): Promise<void>;
1431
+ reloadNodeDefs(defs?: Record<string, ComfyNodeDef>): Promise<boolean>;
1432
+ refreshComboInNodes(): Promise<boolean>;
1415
1433
  clean(): void;
1416
1434
  clientPosToCanvasPos(pos: Vector2): Vector2;
1417
1435
  canvasPosToClientPos(pos: Vector2): Vector2;
@@ -1480,7 +1498,7 @@ declare type ComfyButtonProps = {
1480
1498
 
1481
1499
  declare interface ComfyCommand {
1482
1500
  id: string;
1483
- function: (metadata?: Record<string, unknown>) => void | Promise<void>;
1501
+ function: (metadata?: Record<string, unknown>) => unknown;
1484
1502
  label?: string | (() => string);
1485
1503
  icon?: string | (() => string);
1486
1504
  tooltip?: string | (() => string);
@@ -1510,11 +1528,14 @@ declare class ComfyDialog<T extends HTMLElement = HTMLElement> extends EventTarg
1510
1528
  show(html: string | HTMLElement | HTMLElement[]): void;
1511
1529
  }
1512
1530
 
1531
+ export { ComfyDownloadProgress }
1532
+
1513
1533
  export declare interface ComfyExtension {
1514
1534
  /**
1515
1535
  * The name of the extension
1516
1536
  */
1517
1537
  name: string;
1538
+ provenance?: ExtensionProvenance;
1518
1539
  /**
1519
1540
  * The commands defined by the extension
1520
1541
  */
@@ -1630,14 +1651,16 @@ export declare interface ComfyExtension {
1630
1651
  * @param graphData The graph data
1631
1652
  * @param missingNodeTypes The missing node types
1632
1653
  * @param app The app instance
1654
+ * @param context The graph being configured, which may not be `app.rootGraph`
1633
1655
  */
1634
- beforeConfigureGraph?(graphData: ComfyWorkflowJSON, missingNodeTypes: MissingNodeType[], app: ComfyApp): Promise<void> | void;
1656
+ beforeConfigureGraph?(graphData: ComfyWorkflowJSON, missingNodeTypes: MissingNodeType[], app: ComfyApp, context: GraphConfigureContext): Promise<void> | void;
1635
1657
  /**
1636
1658
  * Allows the extension to run code after the graph is configured.
1637
1659
  * @param missingNodeTypes The missing node types
1638
1660
  * @param app The app instance
1661
+ * @param context The graph that was configured, which may not be `app.rootGraph`
1639
1662
  */
1640
- afterConfigureGraph?(missingNodeTypes: MissingNodeType[], app: ComfyApp): Promise<void> | void;
1663
+ afterConfigureGraph?(missingNodeTypes: MissingNodeType[], app: ComfyApp, context: GraphConfigureContext): Promise<void> | void;
1641
1664
  /**
1642
1665
  * Fired whenever authentication resolves, providing the anonymized user id..
1643
1666
  * Extensions can register at any time and will receive the latest value immediately.
@@ -1666,7 +1689,7 @@ declare class ComfyList {
1666
1689
  private _reverse;
1667
1690
  element: HTMLDivElement;
1668
1691
  button?: HTMLButtonElement;
1669
- constructor(app: LegacyUIApp, host: LegacyMenuHost, text: string, type?: string, reverse?: boolean);
1692
+ constructor(app: LegacyQueueApp, host: LegacyQueueHost, text: string, type?: string, reverse?: boolean);
1670
1693
  get visible(): boolean;
1671
1694
  load(): Promise<void>;
1672
1695
  update(): Promise<void>;
@@ -1677,8 +1700,6 @@ declare class ComfyList {
1677
1700
 
1678
1701
  export { ComfyNodeDef }
1679
1702
 
1680
- declare type ComfyNodeDef_2 = z.infer<typeof zComfyNodeDef>;
1681
-
1682
1703
  declare class ComfyPopup extends EventTarget {
1683
1704
  element: HTMLElement;
1684
1705
  open: boolean;
@@ -1795,6 +1816,7 @@ declare type ComfyWidgetConstructor = (node: LGraphNode, inputName: string, inpu
1795
1816
  };
1796
1817
 
1797
1818
  declare class ComfyWorkflow extends UserFile {
1819
+ [ownedGraph]: Raw<LGraph> | null;
1798
1820
  static readonly basePath: string;
1799
1821
  readonly tintCanvasBg?: string;
1800
1822
  /** Unique, stable identity for this workflow instance in the current session. */
@@ -1803,6 +1825,7 @@ declare class ComfyWorkflow extends UserFile {
1803
1825
  * The change tracker for the workflow. Non-reactive raw object.
1804
1826
  */
1805
1827
  changeTracker: WorkflowChangeTracker | null;
1828
+ get graph(): Raw<LGraph> | null;
1806
1829
  /**
1807
1830
  * Whether the workflow has been modified comparing to the initial state.
1808
1831
  */
@@ -1851,8 +1874,12 @@ declare class ComfyWorkflow extends UserFile {
1851
1874
  load({ force }?: {
1852
1875
  force?: boolean;
1853
1876
  }): Promise<this & LoadedComfyWorkflow>;
1877
+ /** Take ownership of `graph`, disposing any previously owned instance. */
1878
+ adoptGraph(graph: LGraph): void;
1879
+ /** Dispose the owned graph instance and its per-root store state. */
1880
+ releaseGraph(): void;
1854
1881
  unload(): void;
1855
- save(): Promise<UserFile>;
1882
+ save({ overwrite }?: Pick<UserFileSaveOptions, 'overwrite'>): Promise<UserFile>;
1856
1883
  /**
1857
1884
  * Save the workflow as a new file.
1858
1885
  * @param path The path to save the workflow to. Note: with 'workflows/' prefix.
@@ -1905,7 +1932,6 @@ export declare interface CommandManager {
1905
1932
  }): void;
1906
1933
  }
1907
1934
 
1908
- /** Resize handle positions (compass points) */
1909
1935
  declare type CompassCorners = 'NE' | 'SE' | 'SW' | 'NW';
1910
1936
 
1911
1937
  /** Keys (names) of API events that pass a {@link CustomEvent} `detail` object. */
@@ -2427,34 +2453,6 @@ declare interface components {
2427
2453
  pathItems: never;
2428
2454
  }
2429
2455
 
2430
- declare interface CompositorBackgroundEntry {
2431
- color: string;
2432
- opacity: number;
2433
- visible: boolean;
2434
- }
2435
-
2436
- declare interface CompositorLayerEntry {
2437
- name: string;
2438
- visible: boolean;
2439
- opacity: number;
2440
- blend: BlendFn;
2441
- transform: Transform;
2442
- flipH: boolean;
2443
- flipV: boolean;
2444
- }
2445
-
2446
- declare interface CompositorLayerState {
2447
- version?: typeof LAYER_STATE_VERSION;
2448
- canvas?: {
2449
- w: number;
2450
- h: number;
2451
- };
2452
- inputs?: string[];
2453
- background?: CompositorBackgroundEntry;
2454
- order?: number[];
2455
- layers: Array<CompositorLayerEntry | null>;
2456
- }
2457
-
2458
2456
  /**
2459
2457
  * Widget for the ImageCompositor node preview and editor launcher.
2460
2458
  * This is a widget that only has a Vue widgets implementation.
@@ -2474,10 +2472,13 @@ declare type ConfirmOptions = BaseConfirmOptions & ({
2474
2472
  type: 'dirtyClose';
2475
2473
  /** Override the deny button label. Defaults to `g.no`. */
2476
2474
  denyLabel?: string;
2475
+ /** Override the save button label. Defaults to `g.save`. */
2476
+ confirmLabel?: string;
2477
2477
  } | {
2478
2478
  /** Pre-configured dialog type */
2479
2479
  type?: Exclude<ConfirmationDialogType, 'dirtyClose'>;
2480
2480
  denyLabel?: never;
2481
+ confirmLabel?: never;
2481
2482
  });
2482
2483
 
2483
2484
  declare interface ConnectByTypeOptions {
@@ -2546,6 +2547,9 @@ export declare class ContextMenu<TValue = unknown> {
2546
2547
  root: ContextMenuDivElement<TValue>;
2547
2548
  current_submenu?: ContextMenu<TValue>;
2548
2549
  lock?: boolean;
2550
+ private opensLeft;
2551
+ private submenuEntry?;
2552
+ private hoverTimer?;
2549
2553
  controller: AbortController;
2550
2554
  /**
2551
2555
  * @todo Interface for values requires functionality change - currently accepts
@@ -2660,7 +2664,7 @@ declare function createUuidv4(): UUID;
2660
2664
  declare const CURVE_INTERPOLATIONS: readonly ["monotone_cubic", "linear"];
2661
2665
 
2662
2666
  declare interface CurveData {
2663
- points: CurvePoint[];
2667
+ points: Point[];
2664
2668
  interpolation: CurveInterpolation;
2665
2669
  }
2666
2670
 
@@ -2683,8 +2687,6 @@ declare class CurveEditor {
2683
2687
 
2684
2688
  declare type CurveInterpolation = (typeof CURVE_INTERPOLATIONS)[number];
2685
2689
 
2686
- declare type CurvePoint = [x: number, y: number];
2687
-
2688
2690
  declare class CurveWidget extends BaseWidget<ICurveWidget> implements ICurveWidget {
2689
2691
  drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
2690
2692
  onClick(_options: WidgetEventOptions): void;
@@ -2772,13 +2774,37 @@ declare interface DefaultConnectionColors {
2772
2774
  getDisconnectedColor(type: ISlotType): CanvasColour;
2773
2775
  }
2774
2776
 
2775
- declare type DeselectAllOptions = {
2777
+ declare interface DeselectAllOptions {
2776
2778
  keepSelected?: Positionable;
2777
2779
  notify?: boolean;
2780
+ }
2781
+
2782
+ /**
2783
+ * `switchWorkspace` is absent on Desktop builds before Comfy-Desktop #1671,
2784
+ * `getPartnerNodeToken` on builds before Comfy-Desktop #1983.
2785
+ */
2786
+ export declare type DesktopHostAuthBridge = Omit<ComfyDesktop2AuthBridge, 'switchWorkspace'> & Partial<Pick<ComfyDesktop2AuthBridge, 'switchWorkspace'>> & {
2787
+ issueBillingHandoff?(workspaceId: string, receiver: DesktopHostBillingReceiver, intent?: DesktopHostBillingIntent, amountCents?: number): Promise<DesktopHostBillingHandoff>;
2788
+ getPartnerNodeToken?: (workspaceId: string) => Promise<string | null>;
2789
+ };
2790
+
2791
+ /** Desktop's answer to a billing handoff request; it never returns its credential. */
2792
+ declare type DesktopHostBillingHandoff = {
2793
+ status: 'issued';
2794
+ entryUrl: string;
2795
+ } | {
2796
+ status: 'sign_in_again';
2797
+ } | {
2798
+ status: 'refused';
2799
+ code?: string;
2800
+ message?: string;
2801
+ } | {
2802
+ status: 'disabled';
2778
2803
  };
2779
2804
 
2780
- /** `switchWorkspace` is absent on Desktop builds before Comfy-Desktop #1671. */
2781
- export declare type DesktopHostAuthBridge = Omit<ComfyDesktop2AuthBridge, 'switchWorkspace'> & Partial<Pick<ComfyDesktop2AuthBridge, 'switchWorkspace'>>;
2805
+ declare type DesktopHostBillingIntent = 'top-up' | 'subscription';
2806
+
2807
+ declare type DesktopHostBillingReceiver = 'billing_web' | 'platform';
2782
2808
 
2783
2809
  export declare type DeviceStats = Required<SystemStatsResponse['devices'][number]> & {
2784
2810
  index: number;
@@ -2794,6 +2820,8 @@ declare interface DialogComponentProps {
2794
2820
  * sections, so the dialog frame adds no padding around them.
2795
2821
  */
2796
2822
  flush?: boolean;
2823
+ /** Keeps the top where the dialog opened, so a taller state grows downward. */
2824
+ growsDown?: boolean;
2797
2825
  /** The component renders the whole panel: its surface, size and close button. */
2798
2826
  headless?: boolean;
2799
2827
  maximizable?: boolean;
@@ -2815,22 +2843,6 @@ declare interface DialogComponentProps {
2815
2843
  size?: DialogContentSize;
2816
2844
  }
2817
2845
 
2818
- declare type DialogContentSize = NonNullable<DialogContentVariants['size']>;
2819
-
2820
- declare type DialogContentVariants = VariantProps<typeof dialogContentVariants>;
2821
-
2822
- declare const dialogContentVariants: (props?: ({
2823
- surface?: "card" | "none" | undefined;
2824
- size?: "full" | "sm" | "md" | "lg" | "xl" | "fit" | undefined;
2825
- maximized?: boolean | undefined;
2826
- } & ({
2827
- class?: ClassValue;
2828
- className?: never;
2829
- } | {
2830
- class?: never;
2831
- className?: ClassValue;
2832
- })) | undefined) => string;
2833
-
2834
2846
  declare interface DialogInstance {
2835
2847
  key: string;
2836
2848
  visible: boolean;
@@ -2849,8 +2861,6 @@ declare type Dictionary<T> = {
2849
2861
  [key: string]: T;
2850
2862
  };
2851
2863
 
2852
- declare type Direction = 'top' | 'bottom' | 'left' | 'right';
2853
-
2854
2864
  /**
2855
2865
  * Calculates the distance between two points (2D vector)
2856
2866
  * @param a Point a as `x, y`
@@ -2873,6 +2883,7 @@ export declare interface DOMWidget<T extends HTMLElement, V extends object | str
2873
2883
  }
2874
2884
 
2875
2885
  export declare interface DOMWidgetOptions<V extends object | string> extends IWidgetOptions {
2886
+ vueNodeRenderer?: 'dom' | 'native';
2876
2887
  /**
2877
2888
  * Whether to render a placeholder rectangle when zoomed out.
2878
2889
  */
@@ -2908,8 +2919,8 @@ export declare class DragAndScale {
2908
2919
  *
2909
2920
  * Implemented as a POCO that can be proxied without side-effects.
2910
2921
  */
2911
- state: DragAndScaleState;
2912
- lastState: DragAndScaleState;
2922
+ state: PanZoom;
2923
+ lastState: PanZoom;
2913
2924
  /** Maximum scale (zoom in) */
2914
2925
  max_scale: number;
2915
2926
  /** Minimum scale (zoom out) */
@@ -2921,6 +2932,7 @@ export declare class DragAndScale {
2921
2932
  dragging?: boolean;
2922
2933
  viewport?: Rect;
2923
2934
  private viewportSize?;
2935
+ private transition?;
2924
2936
  onredraw?(das: DragAndScale): void;
2925
2937
  onChanged?(scale: number, offset: Point): void;
2926
2938
  get offset(): [number, number];
@@ -2953,23 +2965,18 @@ export declare class DragAndScale {
2953
2965
  viewport?: ReadOnlyRect;
2954
2966
  }): void;
2955
2967
  /**
2956
- * Starts an animation to fit the view around the specified selection of nodes.
2968
+ * Animates the view to fit the specified bounds, calling `setDirty` after each step. Any other camera change cancels it.
2957
2969
  * @param bounds The bounds to animate the view to, defined by a rectangle.
2958
2970
  */
2959
- animateToBounds(bounds: ReadOnlyRect, setDirty: () => void, { duration, zoom, easing, viewport }?: AnimationOptions): void;
2971
+ animateToBounds(bounds: ReadOnlyRect, setDirty: () => void, { duration, zoom, viewport }?: AnimationOptions): void;
2972
+ /** Moves a running {@link animateToBounds} to where it is at `now`; the canvas calls it once per frame before drawing. */
2973
+ advanceAnimation(now: number): void;
2974
+ /** Stops a running {@link animateToBounds}, leaving the camera where it is. */
2975
+ stopAnimation(): void;
2976
+ private framingViewport;
2960
2977
  reset(): void;
2961
2978
  }
2962
2979
 
2963
- declare interface DragAndScaleState {
2964
- /**
2965
- * The offset from the top-left of the current canvas viewport to `[0, 0]` in graph space.
2966
- * Or said another way, the inverse offset of the viewport.
2967
- */
2968
- offset: [number, number];
2969
- /** The scale of the graph. */
2970
- scale: number;
2971
- }
2972
-
2973
2980
  declare interface DrawSlotsOptions {
2974
2981
  fromSlot?: INodeInputSlot | INodeOutputSlot;
2975
2982
  colorContext: DefaultConnectionColors;
@@ -3067,10 +3074,12 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3067
3074
  applyToGraph?(...args: Parameters<NonNullable<RegisteredLGraphNode['applyToGraph']>>): ReturnType<NonNullable<RegisteredLGraphNode['applyToGraph']>>;
3068
3075
  /** The graph that this node is a part of. */
3069
3076
  readonly graph: RegisteredLGraph | RegisteredSubgraph;
3077
+ /** Own inputs, then ones owned via the subgraph node (`ownerSlot`). */
3070
3078
  inputs: {
3071
3079
  linkId: LinkId | null;
3072
3080
  name: string;
3073
3081
  type: ISlotType;
3082
+ ownerSlot?: number;
3074
3083
  }[];
3075
3084
  /** Backing field for {@link id}. */
3076
3085
  private _id;
@@ -3101,6 +3110,9 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3101
3110
  nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
3102
3111
  /** The actual subgraph instance that contains this node, otherwise undefined. */
3103
3112
  subgraphNode?: RegisteredSubgraphNode | undefined);
3113
+ private _subgraphNodeDto;
3114
+ private _ownedInputs;
3115
+ private _hostWidgetInput;
3104
3116
  /** Returns either the DTO itself, or the DTOs of the inner nodes of the subgraph. */
3105
3117
  getInnerNodes(): ExecutableLGraphNode[];
3106
3118
  /**
@@ -3112,6 +3124,7 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3112
3124
  * @returns The node and the origin ID / slot index of the output.
3113
3125
  */
3114
3126
  resolveInput(slot: number, visited?: Set<string>, type?: ISlotType): ResolvedInput | undefined;
3127
+ private _resolveHostInput;
3115
3128
  /**
3116
3129
  * Determines whether this output is a valid endpoint for a link (non-virtual, non-bypass).
3117
3130
  * @param slot The slot index of the output.
@@ -3135,6 +3148,7 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3135
3148
  * @returns A DTO for the node, and the origin ID / slot index of the output.
3136
3149
  */
3137
3150
  private _resolveSubgraphOutput;
3151
+ private resolvePassThroughOutput;
3138
3152
  }
3139
3153
 
3140
3154
  declare interface ExecutedWsMessage extends ExecutingWsMessage {
@@ -3144,7 +3158,7 @@ declare interface ExecutedWsMessage extends ExecutingWsMessage {
3144
3158
  merge?: boolean;
3145
3159
  }
3146
3160
 
3147
- declare interface ExecutingWsMessage {
3161
+ declare interface ExecutingWsMessage extends StampedWorkflowId {
3148
3162
  node: NodeId_2 | null;
3149
3163
  display_node?: NodeId_2;
3150
3164
  prompt_id: JobId;
@@ -3164,6 +3178,7 @@ declare interface ExecutionErrorDialogInput {
3164
3178
  node_id?: string | number | null;
3165
3179
  node_type?: string | null;
3166
3180
  traceback?: string[] | null;
3181
+ node_errors?: unknown;
3167
3182
  }
3168
3183
 
3169
3184
  declare interface ExecutionErrorWsMessage extends ExecutionWsMessageBase {
@@ -3172,9 +3187,11 @@ declare interface ExecutionErrorWsMessage extends ExecutionWsMessageBase {
3172
3187
  executed: NodeId_2[];
3173
3188
  exception_message: string;
3174
3189
  exception_type: string;
3175
- traceback: string[];
3190
+ /** Cloud can send `null` (or omit it) when no traceback was captured. */
3191
+ traceback?: string[] | null;
3176
3192
  current_inputs?: unknown;
3177
3193
  current_outputs?: unknown;
3194
+ node_errors?: ExecutionError['node_errors'];
3178
3195
  }
3179
3196
 
3180
3197
  export declare type ExecutionId = string;
@@ -3193,7 +3210,7 @@ declare type ExecutionTriggerSource = (typeof executionTriggerSources)[number];
3193
3210
 
3194
3211
  declare const executionTriggerSources: readonly ["button", "keybinding", "legacy_ui", "unknown", "linear", "auto_queue"];
3195
3212
 
3196
- declare interface ExecutionWsMessageBase {
3213
+ declare interface ExecutionWsMessageBase extends StampedWorkflowId {
3197
3214
  prompt_id: JobId;
3198
3215
  timestamp: number;
3199
3216
  }
@@ -3244,11 +3261,6 @@ declare interface ExposedWidget {
3244
3261
  name: string;
3245
3262
  }
3246
3263
 
3247
- /**
3248
- * Dialog surface exposed to extensions via `app.extensionManager.dialog`.
3249
- * Feature dialogs live in their own composables; `createExtensionDialogService`
3250
- * assembles them so this module never imports the features it fronts.
3251
- */
3252
3264
  declare interface ExtensionDialogService extends CoreDialogService {
3253
3265
  showApiNodesSignInDialog(apiNodeNames: string[]): Promise<boolean>;
3254
3266
  showSignInDialog(): Promise<boolean>;
@@ -3319,6 +3331,13 @@ export declare interface ExtensionManager {
3319
3331
 
3320
3332
  declare type ExtensionPayload = Record<string, unknown>;
3321
3333
 
3334
+ declare interface ExtensionProvenance {
3335
+ createdBy: 'comfy-agent';
3336
+ threadId?: string;
3337
+ createdAt?: string;
3338
+ summary?: string;
3339
+ }
3340
+
3322
3341
  export { ExtensionsResponse }
3323
3342
 
3324
3343
  declare type FeatureFlagsWsMessage = Record<string, unknown>;
@@ -3330,6 +3349,8 @@ declare interface FetchApiOptions extends RequestInit {
3330
3349
  onAuthScheme?: (scheme: AuthScheme) => void;
3331
3350
  /** Reports the kind of credential sent, to tell a missing token from a wrong one. */
3332
3351
  onAuthCredential?: (credential: AuthCredential) => void;
3352
+ /** Send once, for callers that already retry on their own backoff. */
3353
+ skipStatusRetry?: boolean;
3333
3354
  }
3334
3355
 
3335
3356
  /**
@@ -3408,6 +3429,14 @@ declare interface FormItem {
3408
3429
  options?: Array<string | SettingOption> | ((value: unknown) => Array<string | SettingOption>);
3409
3430
  }
3410
3431
 
3432
+ declare type FreeMemoryResult = {
3433
+ ok: true;
3434
+ freedExecutionCache: boolean;
3435
+ } | {
3436
+ ok: false;
3437
+ reason: 'rejected' | 'unreachable';
3438
+ };
3439
+
3411
3440
  /** Dictionary of Frontend-generated API calls */
3412
3441
  declare interface FrontendApiCalls {
3413
3442
  graphChanged: ComfyWorkflowJSON;
@@ -3434,6 +3463,7 @@ declare interface FrontendApiCalls {
3434
3463
  graphCleared: never;
3435
3464
  reconnecting: never;
3436
3465
  reconnected: never;
3466
+ revokedSocketEnded: never;
3437
3467
  }
3438
3468
 
3439
3469
  /**
@@ -3470,6 +3500,9 @@ declare class GradientSliderWidget extends BaseWidget<IGradientSliderWidget> imp
3470
3500
  onDrag(options: WidgetEventOptions): false | undefined;
3471
3501
  }
3472
3502
 
3503
+ /** The current `version` of serialised graph and subgraph documents. */
3504
+ declare const GRAPH_SCHEMA_VERSION = 1;
3505
+
3473
3506
  /** Options for {@link LGraph.add} method. */
3474
3507
  declare interface GraphAddOptions {
3475
3508
  /** If true, skip recomputing execution order after adding the node. */
@@ -3480,6 +3513,14 @@ declare interface GraphAddOptions {
3480
3513
  dragEvent?: MouseEvent;
3481
3514
  }
3482
3515
 
3516
+ /** The graph a configure hook runs for and the workflow that owns it, if any. */
3517
+ declare interface GraphConfigureContext {
3518
+ graph: LGraph;
3519
+ workflow: ComfyWorkflow | null;
3520
+ }
3521
+
3522
+ declare type GraphDocumentParts = Required<Pick<SerialisableGraph, 'nodes' | 'groups' | 'extra'>>;
3523
+
3483
3524
  /** Internal; simplifies type definitions. */
3484
3525
  declare type GraphOrSubgraph = LGraph | Subgraph;
3485
3526
 
@@ -3496,31 +3537,37 @@ declare interface GraphScope {
3496
3537
  readonly owningGraphId: OwningGraphId;
3497
3538
  }
3498
3539
 
3540
+ declare interface GraphSerializeOptions {
3541
+ sortNodes: boolean;
3542
+ }
3543
+
3499
3544
  declare type GroupId = number & {
3500
3545
  readonly __brand: 'GroupId';
3501
3546
  };
3502
3547
 
3503
- /**
3504
- * Any object that has a {@link boundingRect}.
3505
- */
3506
3548
  declare interface HasBoundingRect {
3507
- /**
3508
- * A rectangle that represents the outer edges of the item.
3509
- *
3510
- * Used for various calculations, such as overlap, selective rendering, and click checks.
3511
- * For most items, this is cached position & size as `x, y, width, height`.
3512
- * Some items (such as nodes and slots) may extend above and/or to the left of their {@link pos}.
3513
- * @readonly
3514
- * @see {@link move}
3515
- */
3516
3549
  readonly boundingRect: ReadOnlyRect;
3517
3550
  }
3518
3551
 
3552
+ declare interface HeldJobsResumed {
3553
+ resumed: string[];
3554
+ not_resumed: BudgetHeldJobNotResumed[];
3555
+ }
3556
+
3557
+ /** What one resume run moved and left held, or why the server refused it. */
3558
+ declare type HeldJobsResumeOutcome = ({
3559
+ ok: true;
3560
+ } & HeldJobsResumed) | ({
3561
+ ok: false;
3562
+ reason: 'rejected' | 'malformed' | 'unreachable';
3563
+ status: number;
3564
+ } & HeldJobsResumed);
3565
+
3519
3566
  /**
3520
3567
  * An object that can be hovered over.
3521
3568
  */
3522
3569
  declare interface Hoverable extends HasBoundingRect {
3523
- readonly boundingRect: Rectangle;
3570
+ readonly boundingRect: RegisteredRectangle;
3524
3571
  isPointerOver: boolean;
3525
3572
  containsPoint(point: Point): boolean;
3526
3573
  onPointerMove(e: CanvasPointerEvent): void;
@@ -3648,12 +3695,7 @@ export declare interface IBaseWidget<TValue = WidgetValue, TType extends string
3648
3695
  * @param node The node this widget belongs to.
3649
3696
  * @returns The layout size of the widget.
3650
3697
  */
3651
- computeLayoutSize?(this: IBaseWidget, node: RegisteredLGraphNode): {
3652
- minHeight: number;
3653
- maxHeight?: number;
3654
- minWidth: number;
3655
- maxWidth?: number;
3656
- };
3698
+ computeLayoutSize?(this: IBaseWidget, node: RegisteredLGraphNode): WidgetLayoutSize;
3657
3699
  /**
3658
3700
  * Callback for pointerdown events, allowing custom widgets to register callbacks to occur
3659
3701
  * for all {@link CanvasPointer} events.
@@ -3667,7 +3709,7 @@ export declare interface IBaseWidget<TValue = WidgetValue, TType extends string
3667
3709
  * @returns Returning `true` from this callback forces Litegraph to ignore the event and
3668
3710
  * not process it any further.
3669
3711
  */
3670
- onPointerDown?(pointer: CanvasPointer, node: RegisteredLGraphNode, canvas: RegisteredLGraphCanvas): boolean;
3712
+ onPointerDown?(pointer: RegisteredCanvasPointer, node: RegisteredLGraphNode, canvas: RegisteredLGraphCanvas): boolean;
3671
3713
  onRemove?(): void;
3672
3714
  beforeQueued?(options?: WidgetCallbackOptions): unknown;
3673
3715
  afterQueued?(options?: WidgetCallbackOptions): unknown;
@@ -3685,13 +3727,13 @@ export declare interface IBooleanWidget extends IBaseWidget<boolean, 'toggle'> {
3685
3727
  }
3686
3728
 
3687
3729
  declare interface IBoundaryNodes {
3688
- top: RegisteredLGraphNode;
3689
- right: RegisteredLGraphNode;
3690
- bottom: RegisteredLGraphNode;
3691
- left: RegisteredLGraphNode;
3730
+ top: LGraphNode;
3731
+ right: LGraphNode;
3732
+ bottom: LGraphNode;
3733
+ left: LGraphNode;
3692
3734
  }
3693
3735
 
3694
- export declare interface IBoundingBoxesWidget extends IBaseWidget<BoundingBox[], 'boundingboxes'> {
3736
+ export declare interface IBoundingBoxesWidget extends IBaseWidget<BoundingBox[], 'boundingboxes', IWidgetBoundingBoxesOptions> {
3695
3737
  type: 'boundingboxes';
3696
3738
  value: BoundingBox[];
3697
3739
  }
@@ -4000,6 +4042,8 @@ export declare interface INodeFlags {
4000
4042
  keepAllLinksOnBypass?: boolean;
4001
4043
  /** Node is in ghost placement mode (semi-transparent, following cursor) */
4002
4044
  ghost?: boolean;
4045
+ /** Renders the node's single preview image at full resolution instead of a downscaled copy */
4046
+ fullResolutionPreview?: boolean;
4003
4047
  }
4004
4048
 
4005
4049
  export declare interface INodeInputSlot extends INodeSlot {
@@ -4150,6 +4194,19 @@ declare interface InputMapSetValue {
4150
4194
 
4151
4195
  export { InputSpec }
4152
4196
 
4197
+ declare interface InsertOptions {
4198
+ connectInputs?: boolean;
4199
+ position?: Point;
4200
+ }
4201
+
4202
+ declare interface InsertResult {
4203
+ created: Positionable[];
4204
+ nodes: Map<SerializedNodeId, LGraphNode>;
4205
+ links: Map<LinkId, LLink>;
4206
+ reroutes: Map<RerouteId, Reroute>;
4207
+ subgraphs: Map<RegisteredSubgraphId, RegisteredSubgraph>;
4208
+ }
4209
+
4153
4210
  /** Any widget that uses a numeric backing */
4154
4211
  export declare interface INumericWidget extends IBaseWidget<number, 'number'> {
4155
4212
  type: 'number';
@@ -4172,14 +4229,6 @@ export declare interface IPainterWidget extends IBaseWidget<string, 'painter'> {
4172
4229
  value: string;
4173
4230
  }
4174
4231
 
4175
- /** Options for {@link LGraphCanvas.pasteFromClipboard}. */
4176
- declare interface IPasteFromClipboardOptions {
4177
- /** If `true`, always attempt to connect inputs of pasted nodes - including to nodes that were not pasted. */
4178
- connectInputs?: boolean;
4179
- /** The position to paste the items at. */
4180
- position?: Point;
4181
- }
4182
-
4183
4232
  /**
4184
4233
  * An object that can be pinned.
4185
4234
  *
@@ -4229,7 +4278,7 @@ export declare interface ISerialisedGraph extends BaseExportedGraph {
4229
4278
  last_node_id: SerializedNodeId;
4230
4279
  last_link_id: number;
4231
4280
  nodes: ISerialisedNode[];
4232
- links: RegisteredSerialisedLLinkArray[];
4281
+ links: SerialisedLLinkArray[];
4233
4282
  floatingLinks?: SerialisableLLink[];
4234
4283
  groups: ISerialisedGroup[];
4235
4284
  version: RegisteredLiteGraphGlobal['VERSION'];
@@ -4346,15 +4395,6 @@ declare interface ISubgraphInput extends INodeInputSlot {
4346
4395
  _subgraphSlot: RegisteredSubgraphInput;
4347
4396
  }
4348
4397
 
4349
- /**
4350
- * Locates graph items.
4351
- */
4352
- declare interface ItemLocator {
4353
- getNodeOnPos(x: number, y: number, nodeList?: RegisteredLGraphNode[]): RegisteredLGraphNode | null;
4354
- getRerouteOnPos(x: number, y: number): RegisteredReroute | undefined;
4355
- getIoNodeOnPos?(x: number, y: number): RegisteredSubgraphInputNode | RegisteredSubgraphOutputNode | undefined;
4356
- }
4357
-
4358
4398
  /** Textarea widget for multi-line text input */
4359
4399
  export declare interface ITextareaWidget extends IBaseWidget<string, 'textarea'> {
4360
4400
  type: 'textarea';
@@ -4367,6 +4407,11 @@ export declare interface ITreeSelectWidget extends IBaseWidget<string | string[]
4367
4407
  value: string | string[];
4368
4408
  }
4369
4409
 
4410
+ declare interface IVideoConcatWidget extends IBaseWidget<VideoConcatValue, 'videoconcat', IWidgetVideoConcatOptions> {
4411
+ type: 'videoconcat';
4412
+ value: VideoConcatValue;
4413
+ }
4414
+
4370
4415
  export declare interface IVideoEditWidget extends IBaseWidget<VideoEditValue, 'videoedit', IWidgetVideoEditOptions> {
4371
4416
  type: 'videoedit';
4372
4417
  value: VideoEditValue;
@@ -4380,12 +4425,16 @@ export declare interface IVideoEditWidget extends IBaseWidget<VideoEditValue, 'v
4380
4425
  * Recommend declaration merging any properties that use IWidget (e.g. {@link LGraphNode.widgets}) with a new type alias.
4381
4426
  * @see ICustomWidget
4382
4427
  */
4383
- export declare type IWidget = IBooleanWidget | INumericWidget | IStringWidget | IComboWidget | IStringComboWidget | ICustomWidget | ISliderWidget | IGradientSliderWidget | IButtonWidget | IKnobWidget | IFileUploadWidget | IColorWidget | IMarkdownWidget | IImageWidget | ITreeSelectWidget | IMultiSelectWidget | IChartWidget | IGalleriaWidget | IImageCompareWidget | ISelectButtonWidget | ITextareaWidget | IAssetWidget | IImageCropWidget | IBoundingBoxWidget | ICurveWidget | IPainterWidget | ICompositorWidget | IRangeWidget | IVideoEditWidget | IResolutionPreviewWidget | IBoundingBoxesWidget | ILightInfoWidget | IColorsWidget;
4428
+ export declare type IWidget = IBooleanWidget | INumericWidget | IStringWidget | IComboWidget | IStringComboWidget | ICustomWidget | ISliderWidget | IGradientSliderWidget | IButtonWidget | IKnobWidget | IFileUploadWidget | IColorWidget | IMarkdownWidget | IImageWidget | ITreeSelectWidget | IMultiSelectWidget | IChartWidget | IGalleriaWidget | IImageCompareWidget | ISelectButtonWidget | ITextareaWidget | IAssetWidget | IImageCropWidget | IBoundingBoxWidget | ICurveWidget | IPainterWidget | ICompositorWidget | IRangeWidget | IVideoEditWidget | IVideoConcatWidget | IResolutionPreviewWidget | IBoundingBoxesWidget | ILightInfoWidget | IColorsWidget;
4384
4429
 
4385
4430
  export declare interface IWidgetAssetOptions extends IWidgetOptions {
4386
4431
  openModal: (widget: IBaseWidget) => void;
4387
4432
  }
4388
4433
 
4434
+ declare interface IWidgetBoundingBoxesOptions extends IWidgetOptions {
4435
+ max_boxes?: number;
4436
+ }
4437
+
4389
4438
  export declare interface IWidgetGradientSliderOptions extends IWidgetOptions<number[]> {
4390
4439
  min: number;
4391
4440
  max: number;
@@ -4499,6 +4548,10 @@ declare interface IWidgetSliderOptions extends IWidgetOptions<number[]> {
4499
4548
  marker_color?: CanvasColour;
4500
4549
  }
4501
4550
 
4551
+ declare interface IWidgetVideoConcatOptions extends IWidgetOptions {
4552
+ source: string;
4553
+ }
4554
+
4502
4555
  export declare interface IWidgetVideoEditOptions extends IWidgetOptions {
4503
4556
  features?: VideoEditFeature[];
4504
4557
  }
@@ -4533,16 +4586,7 @@ declare type KeysOfType<T, Match> = Exclude<{
4533
4586
  }[keyof T], undefined>;
4534
4587
 
4535
4588
  declare class KnobWidget extends BaseWidget<IKnobWidget> implements IKnobWidget {
4536
- /**
4537
- * Compute the layout size of the widget.
4538
- * @returns The layout size of the widget.
4539
- */
4540
- computeLayoutSize(): {
4541
- minHeight: number;
4542
- maxHeight?: number;
4543
- minWidth: number;
4544
- maxWidth?: number;
4545
- };
4589
+ computeLayoutSize(): WidgetLayoutSize;
4546
4590
  get height(): number;
4547
4591
  drawWidget(ctx: CanvasRenderingContext2D, { width, showText }: DrawWidgetOptions): void;
4548
4592
  onClick(): void;
@@ -4555,11 +4599,13 @@ declare enum LabelPosition {
4555
4599
  Right = "right"
4556
4600
  }
4557
4601
 
4558
- declare const LAYER_STATE_VERSION = 1;
4602
+ declare interface LegacyAuthStore {
4603
+ getAuthHeader(): Promise<Record<string, string> | null>;
4604
+ getAuthToken(): Promise<string | undefined>;
4605
+ }
4559
4606
 
4560
- declare interface LegacyMenuHost {
4607
+ declare interface LegacyMenuHost extends LegacyQueueHost {
4561
4608
  resetView(): void;
4562
- restoreOutputs(outputs: Partial<Record<string, ExecutedWsMessage['output']>>): void;
4563
4609
  trackRunButton(intent: WorkflowQueueIntent): void;
4564
4610
  enterFocusMode(): void;
4565
4611
  }
@@ -4570,16 +4616,26 @@ declare interface LegacyMouseEvent {
4570
4616
  click_time?: number;
4571
4617
  }
4572
4618
 
4573
- /** The slice of the app the legacy menu drives. `ComfyApp` implements it. */
4574
- declare interface LegacyUIApp {
4619
+ declare interface LegacyQueueApp {
4575
4620
  readonly lastExecutionError: ExecutionErrorWsMessage | null;
4576
- loadGraphData(graphData?: ComfyWorkflowJSON, clean?: boolean, restore_view?: boolean): Promise<unknown>;
4621
+ loadGraphData(graphData?: ComfyWorkflowJSON, clean?: boolean, restore_view?: boolean, workflow?: string | null, options?: {
4622
+ initiator?: 'user';
4623
+ }): Promise<unknown>;
4577
4624
  queuePrompt(number: number, batchCount?: number, options?: {
4578
4625
  intent?: WorkflowQueueIntent;
4579
4626
  }): Promise<boolean>;
4627
+ }
4628
+
4629
+ declare interface LegacyQueueHost {
4630
+ restoreOutputs(outputs: Partial<Record<string, ExecutedWsMessage['output']>>): void;
4631
+ }
4632
+
4633
+ declare interface LegacyUIApp extends LegacyQueueApp {
4580
4634
  showErrorOnFileLoad(file: File): void;
4581
- handleFile(file: File, openSource?: WorkflowOpenSource): Promise<void>;
4582
- refreshComboInNodes(): Promise<void>;
4635
+ handleFile(file: File, openSource?: WorkflowOpenSource, options?: {
4636
+ initiator?: 'user';
4637
+ }): Promise<void | false>;
4638
+ refreshComboInNodes(): Promise<boolean>;
4583
4639
  openClipspace(): void;
4584
4640
  clean(): void;
4585
4641
  }
@@ -4596,10 +4652,14 @@ declare class LegacyWidget<TWidget extends IBaseWidget = IBaseWidget> extends Ba
4596
4652
  onClick(): void;
4597
4653
  }
4598
4654
 
4655
+ /**
4656
+ * LGraph is the class that contain a full graph. We instantiate one and add nodes to it, and then we can run the execution loop.
4657
+ * supported callbacks:
4658
+ * + onNodeAdded: when a new node is added to the graph
4659
+ * + onNodeRemoved: when a node inside this graph is removed
4660
+ */
4599
4661
  export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<SerialisableGraph> {
4600
- static serialisedSchemaVersion: 1;
4601
- static STATUS_STOPPED: number;
4602
- static STATUS_RUNNING: number;
4662
+ static serialisedSchemaVersion: typeof GRAPH_SCHEMA_VERSION;
4603
4663
  /* Excluded from this release type: proxyWidgetMigrationFlush */
4604
4664
  /* Excluded from this release type: autoExposePreviewNodes */
4605
4665
  /** List of LGraph properties that are manually handled by {@link LGraph.configure}. */
@@ -4630,30 +4690,15 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4630
4690
  links: Map<LinkId, LLink> & Record<LinkId, LLink>;
4631
4691
  readonly floatingLinks: ReadonlyMap<LinkId, LLink>;
4632
4692
  list_of_graphcanvas: RegisteredLGraphCanvas[] | null;
4633
- status: number;
4634
4693
  get state(): LGraphState;
4635
4694
  set state(value: LGraphState);
4636
- readonly events: CustomEventTarget<LGraphEventMap, "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "node:added" | "node:before-removed" | "node:removed" | "node:property:changed" | "node:slot-label:changed">;
4695
+ readonly events: CustomEventTarget<LGraphEventMap, "node:property:changed" | "node:slot-label:changed" | "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "node:added" | "node:before-removed" | "node:removed">;
4637
4696
  readonly _subgraphs: Map<SubgraphId, Subgraph>;
4638
4697
  _nodes: (LGraphNode | SubgraphNode)[];
4639
4698
  _nodes_by_id: Partial<Record<NodeId, LGraphNode>>;
4640
4699
  _nodes_in_order: LGraphNode[];
4641
- _nodes_executable: LGraphNode[] | null;
4642
4700
  _groups: LGraphGroup[];
4643
4701
  iteration: number;
4644
- globaltime: number;
4645
- /** @deprecated Unused */
4646
- runningtime: number;
4647
- fixedtime: number;
4648
- fixedtime_lapse: number;
4649
- elapsed_time: number;
4650
- last_update_time: number;
4651
- starttime: number;
4652
- catch_errors: boolean;
4653
- execution_timer_id?: ReturnType<typeof setInterval> | number | null;
4654
- errors_in_execution?: boolean;
4655
- /** @deprecated Unused */
4656
- execution_time: number;
4657
4702
  _last_trigger_time?: number;
4658
4703
  filter?: string;
4659
4704
  /** Must contain serialisable values, e.g. primitive types */
@@ -4703,7 +4748,9 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4703
4748
  /**
4704
4749
  * Removes all nodes from this graph
4705
4750
  */
4706
- clear(): void;
4751
+ clear({ preserveMountedNodeSizes }?: {
4752
+ preserveMountedNodeSizes?: boolean | undefined;
4753
+ }): void;
4707
4754
  private resetAfterClear;
4708
4755
  get subgraphs(): Map<SubgraphId, Subgraph>;
4709
4756
  get nodes(): (LGraphNode | SubgraphNode)[];
@@ -4716,24 +4763,6 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4716
4763
  * Detach Canvas from this graph
4717
4764
  */
4718
4765
  detachCanvas(canvas: RegisteredLGraphCanvas): void;
4719
- /**
4720
- * @deprecated Will be removed in 0.9
4721
- * Starts running this graph every interval milliseconds.
4722
- * @param interval amount of milliseconds between executions, if 0 then it renders to the monitor refresh rate
4723
- */
4724
- start(interval?: number): void;
4725
- /**
4726
- * @deprecated Will be removed in 0.9
4727
- * Stops the execution loop of the graph
4728
- */
4729
- stop(): void;
4730
- /**
4731
- * Run N steps (cycles) of the graph
4732
- * @param num number of steps to run, default is 1
4733
- * @param do_not_catch_errors [optional] if you want to try/catch errors
4734
- * @param limit max number of nodes to execute (used to execute from start to a node)
4735
- */
4736
- runStep(num: number, do_not_catch_errors: boolean, limit?: number): void;
4737
4766
  /**
4738
4767
  * Updates the graph execution order according to relevance of the nodes (nodes with only outputs have more relevance than
4739
4768
  * nodes with only inputs.
@@ -4744,24 +4773,6 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4744
4773
  * Positions every node in a more readable manner
4745
4774
  */
4746
4775
  arrange(margin?: number, layout?: string): void;
4747
- /**
4748
- * Returns the amount of time the graph has been running in milliseconds
4749
- * @returns number of milliseconds the graph has been running
4750
- */
4751
- getTime(): number;
4752
- /**
4753
- * Returns the amount of time accumulated using the fixedtime_lapse var.
4754
- * This is used in context where the time increments should be constant
4755
- * @returns number of milliseconds the graph has been running
4756
- */
4757
- getFixedTime(): number;
4758
- /**
4759
- * Returns the amount of time it took to compute the latest iteration.
4760
- * Take into account that this number could be not correct
4761
- * if the nodes are using graphical actions
4762
- * @returns number of milliseconds it took the last cycle
4763
- */
4764
- getElapsedTime(): number;
4765
4776
  /**
4766
4777
  * Increments the internal version counter.
4767
4778
  */
@@ -4997,16 +5008,12 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4997
5008
  * @deprecated Use {@link asSerialisable}, which returns the newer schema version.
4998
5009
  * @returns value of the node
4999
5010
  */
5000
- serialize(option?: {
5001
- sortNodes: boolean;
5002
- }): ISerialisedGraph;
5011
+ serialize(option?: GraphSerializeOptions): ISerialisedGraph;
5003
5012
  /**
5004
5013
  * Custom JSON serialization to prevent circular reference errors.
5005
5014
  * Called automatically by JSON.stringify().
5006
5015
  */
5007
5016
  toJSON(): ISerialisedGraph;
5008
- /** @returns The drag and scale state of the first attached canvas, otherwise `undefined`. */
5009
- private _getDragAndScale;
5010
5017
  /**
5011
5018
  * Prepares a shallow copy of this object for immediate serialisation or structuredCloning.
5012
5019
  * The return value should be discarded immediately.
@@ -5015,9 +5022,7 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
5015
5022
  * Mutating the properties of the return object may result in changes to your graph.
5016
5023
  * It is intended for use with {@link structuredClone} or {@link JSON.stringify}.
5017
5024
  */
5018
- asSerialisable(options?: {
5019
- sortNodes: boolean;
5020
- }): SerialisableGraph & Required<Pick<SerialisableGraph, 'nodes' | 'groups' | 'extra'>>;
5025
+ asSerialisable(options?: GraphSerializeOptions): SerialisedGraphDocument;
5021
5026
  protected _configureBase(data: ISerialisedGraph | SerialisableGraph): void;
5022
5027
  /**
5023
5028
  * Configure a graph from a JSON string
@@ -5025,7 +5030,9 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
5025
5030
  * @param keep_old If `true`, the graph will not be cleared prior to
5026
5031
  * adding the configuration.
5027
5032
  */
5028
- configure(data: ISerialisedGraph | SerialisableGraph | null | undefined, keep_old?: boolean): boolean | undefined;
5033
+ configure(data: ISerialisedGraph | SerialisableGraph | null | undefined, keep_old?: boolean, viewOptions?: {
5034
+ preserveMountedNodeSizes?: boolean;
5035
+ }): boolean | undefined;
5029
5036
  private _canvas?;
5030
5037
  get primaryCanvas(): RegisteredLGraphCanvas | undefined;
5031
5038
  set primaryCanvas(canvas: RegisteredLGraphCanvas);
@@ -5264,7 +5271,11 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5264
5271
  /** The viewport of this canvas. Tightly coupled with {@link ds}. */
5265
5272
  readonly viewport?: Rect;
5266
5273
  autoresize: boolean;
5267
- static active_canvas: LGraphCanvas;
5274
+ private static _activeCanvas;
5275
+ /** The most recently constructed canvas, which global menu and extension callbacks act on. */
5276
+ static get active_canvas(): LGraphCanvas;
5277
+ /** @deprecated The canvas sets this when it is constructed; assignments are ignored. */
5278
+ static set active_canvas(_canvas: LGraphCanvas);
5268
5279
  frame: number;
5269
5280
  last_draw_time: number;
5270
5281
  render_time: number;
@@ -5297,6 +5308,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5297
5308
  * performant than {@link visible_nodes} for visibility checks.
5298
5309
  */
5299
5310
  private _visible_node_ids;
5311
+ private _passLinkRenderContext;
5300
5312
  node_over?: LGraphNode;
5301
5313
  node_capturing_input?: LGraphNode | null;
5302
5314
  /** Links attached to a selected node. Derived from the selection store. */
@@ -5314,8 +5326,8 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5314
5326
  * drag move and seeded from the pointer-down event when a drag starts.
5315
5327
  */
5316
5328
  private _lastDragModifiers;
5317
- private _ghostPointerHandler;
5318
- private _ghostKeyHandler;
5329
+ private _finishGhostPlacement;
5330
+ private _ghostPlacementBlocked;
5319
5331
  dirty_canvas: boolean;
5320
5332
  dirty_bgcanvas: boolean;
5321
5333
  /** A map of nodes that require selective-redraw */
@@ -5401,6 +5413,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5401
5413
  onSelectionChange?: (selected: Dictionary<Positionable>) => void;
5402
5414
  private selectionNotificationDepth;
5403
5415
  private withSelectionNotificationsSuppressed;
5416
+ private notifySelectionChange;
5404
5417
  /** called when rendering a tooltip */
5405
5418
  onDrawLinkTooltip?: (ctx: CanvasRenderingContext2D, link: LLink | null, canvas?: LGraphCanvas) => boolean;
5406
5419
  /** to render foreground objects not affected by transform (for GUIs) */
@@ -5432,7 +5445,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5432
5445
  * @param direction Direction to align the nodes
5433
5446
  * @param align_to Node to align to (if null, align to the furthest node in the given direction)
5434
5447
  */
5435
- static alignNodes(nodes: Dictionary<LGraphNode>, direction: Direction, align_to?: LGraphNode): void;
5448
+ static alignNodes(nodes: Dictionary<LGraphNode>, direction: RectSide, align_to?: LGraphNode): void;
5436
5449
  static onNodeAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: RegisteredContextMenu<string>, node: LGraphNode): void;
5437
5450
  static onGroupAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: RegisteredContextMenu<string>): void;
5438
5451
  static createDistributeMenu(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: RegisteredContextMenu<string>): void;
@@ -5463,7 +5476,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5463
5476
  static onMenuNodeShapes(_value: IContextMenuValue<(typeof LiteGraph_2.VALID_SHAPES)[number]>, _options: IContextMenuOptions<(typeof LiteGraph_2.VALID_SHAPES)[number]>, e: MouseEvent, menu?: RegisteredContextMenu<(typeof LiteGraph_2.VALID_SHAPES)[number]>, node?: LGraphNode): boolean;
5464
5477
  static onMenuNodeRemove(): void;
5465
5478
  static onMenuNodeClone(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: RegisteredContextMenu, node: LGraphNode): void;
5466
- static cloneNodes(nodes: Positionable[]): ClipboardPasteResult | undefined;
5479
+ static cloneNodes(nodes: Positionable[]): InsertResult | undefined;
5467
5480
  clear(): void;
5468
5481
  private resetTransientState;
5469
5482
  /**
@@ -5558,12 +5571,6 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5558
5571
  private processSelectOnlyPrimaryButton;
5559
5572
  private setupCanvasDrag;
5560
5573
  private _setupNodeSelectionDrag;
5561
- /**
5562
- * Processes a pointerdown event inside the bounds of a node. Part of {@link processMouseDown}.
5563
- * @param e The pointerdown event
5564
- * @param ctrlOrMeta Ctrl or meta key is pressed
5565
- * @param node The node to process a click event for
5566
- */
5567
5574
  private _processNodeClick;
5568
5575
  processWidgetClick(e: CanvasPointerEvent, node: LGraphNode, widget: IBaseWidget, pointer?: CanvasPointer): void;
5569
5576
  /**
@@ -5607,10 +5614,6 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5607
5614
  * @param dragEvent Optional mouse event for positioning under cursor
5608
5615
  */
5609
5616
  startGhostPlacement(node: LGraphNode, dragEvent?: MouseEvent): void;
5610
- /**
5611
- * Finalizes ghost placement mode.
5612
- * @param cancelled If true, the node is removed; otherwise it's placed
5613
- */
5614
5617
  finalizeGhostPlacement(cancelled: boolean): void;
5615
5618
  /**
5616
5619
  * Called when a mouse up event has to be processed
@@ -5631,23 +5634,15 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5631
5634
  */
5632
5635
  processKey(e: KeyboardEvent): void;
5633
5636
  _serializeItems(items?: Iterable<Positionable>): ClipboardItems_2;
5634
- /**
5635
- * Copies canvas items to an internal, app-specific clipboard backed by local storage.
5636
- * When called without parameters, it copies {@link selectedItems}.
5637
- * @param items The items to copy. If nullish, all selected items are copied.
5638
- */
5639
5637
  copyToClipboard(items?: Iterable<Positionable>): string;
5640
5638
  emitEvent(detail: LGraphCanvasEventMap['litegraph:canvas']): void;
5641
5639
  /** @todo Refactor to where it belongs - e.g. Deleting / creating nodes is not actually canvas event. */
5642
5640
  emitBeforeChange(): void;
5643
5641
  /** @todo See {@link emitBeforeChange} */
5644
5642
  emitAfterChange(): void;
5645
- /**
5646
- * Pastes the items from the canvas "clipbaord" - a local storage variable.
5647
- */
5648
- _pasteFromClipboard(options?: IPasteFromClipboardOptions): ClipboardPasteResult | undefined;
5649
- _deserializeItems(clipboardItems: ClipboardItems_2, options: IPasteFromClipboardOptions): ClipboardPasteResult | undefined;
5650
- pasteFromClipboard(options?: IPasteFromClipboardOptions): void;
5643
+ _pasteFromClipboard(options?: InsertOptions): InsertResult | undefined;
5644
+ _deserializeItems(clipboardItems: ClipboardItems_2, options: InsertOptions): InsertResult | undefined;
5645
+ pasteFromClipboard(options?: InsertOptions): void;
5651
5646
  processNodeDblClicked(n: LGraphNode): void;
5652
5647
  /**
5653
5648
  * Normalizes a drag rectangle to have positive width and height.
@@ -5688,6 +5683,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5688
5683
  /**
5689
5684
  * Selects a {@link Positionable} item.
5690
5685
  * @param item The canvas item to add to the selection.
5686
+ * @param options.notify `false` skips the {@link onSelectionChange} report; selection hooks still run.
5691
5687
  */
5692
5688
  select<TPositionable extends Positionable = LGraphNode>(item: TPositionable, { notify, selectGroupChildren }?: {
5693
5689
  notify?: boolean;
@@ -5696,6 +5692,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5696
5692
  /**
5697
5693
  * Deselects a {@link Positionable} item.
5698
5694
  * @param item The canvas item to remove from the selection.
5695
+ * @param options.notify `false` skips the {@link onSelectionChange} report; selection hooks still run.
5699
5696
  */
5700
5697
  deselect<TPositionable extends Positionable = LGraphNode>(item: TPositionable, { notify }?: {
5701
5698
  notify?: boolean;
@@ -5719,7 +5716,6 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5719
5716
  selectNodes(nodes?: LGraphNode[], add_to_current_selection?: boolean): void;
5720
5717
  /** @deprecated See {@link LGraphCanvas.deselect} */
5721
5718
  deselectNode(node: LGraphNode): void;
5722
- /** Deselects all items on the canvas. */
5723
5719
  deselectAll(options?: DeselectAllOptions): void;
5724
5720
  /** @deprecated Pass `{ keepSelected }` instead. */
5725
5721
  deselectAll(keepSelected?: Positionable): void;
@@ -5909,7 +5905,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5909
5905
  showShowNodePanel(node: LGraphNode): void;
5910
5906
  checkPanels(): void;
5911
5907
  getCanvasMenuOptions(): (IContextMenuValue | null)[];
5912
- getNodeMenuOptions(node: LGraphNode): (IContextMenuValue<INodeSlotContextItem, unknown, unknown> | IContextMenuValue<string | null, unknown, unknown> | IContextMenuValue<string, unknown, unknown> | IContextMenuValue<"round" | "default" | "card" | "box", unknown, unknown> | IContextMenuValue<unknown, LGraphNode, unknown> | null)[];
5908
+ getNodeMenuOptions(node: LGraphNode): (IContextMenuValue<INodeSlotContextItem, unknown, unknown> | IContextMenuValue<string | null, unknown, unknown> | IContextMenuValue<string, unknown, unknown> | IContextMenuValue<"default" | "round" | "card" | "box", unknown, unknown> | IContextMenuValue<unknown, LGraphNode, unknown> | null)[];
5913
5909
  /** @deprecated */
5914
5910
  getGroupMenuOptions(group: LGraphGroup): (IContextMenuValue<string | null, unknown, unknown> | IContextMenuValue<string, unknown, unknown> | null)[];
5915
5911
  processContextMenu(node: LGraphNode | undefined, event: CanvasPointerEvent): void;
@@ -6028,60 +6024,34 @@ declare interface LGraphConfig {
6028
6024
 
6029
6025
  export declare interface LGraphEventMap {
6030
6026
  configuring: {
6031
- /** The data that was used to configure the graph. */
6032
6027
  data: ISerialisedGraph | SerialisableGraph;
6033
- /** If `true`, the graph will be cleared prior to adding the configuration. */
6034
6028
  clearGraph: boolean;
6035
6029
  };
6036
6030
  configured: never;
6037
6031
  'subgraph-created': {
6038
- /** The subgraph that was created. */
6039
6032
  subgraph: RegisteredSubgraph;
6040
- /** The raw data that was used to create the subgraph. */
6041
6033
  data: ExportedSubgraph;
6042
6034
  };
6043
- /** Dispatched when a group of items are converted to a subgraph. */
6044
6035
  'convert-to-subgraph': {
6045
- /** The type of subgraph to create. */
6046
6036
  subgraph: RegisteredSubgraph;
6047
- /** The boundary around every item that was moved into the subgraph. */
6048
6037
  bounds: ReadOnlyRect;
6049
- /** The raw data that was used to create the subgraph. */
6050
6038
  exportedSubgraph: ExportedSubgraph;
6051
- /** The links that were used to create the subgraph. */
6052
6039
  boundaryLinks: RegisteredLLink[];
6053
- /** Links that go from outside the subgraph in, via an input on the subgraph node. */
6054
6040
  resolvedInputLinks: RegisteredResolvedConnection[];
6055
- /** Links that go from inside the subgraph out, via an output on the subgraph node. */
6056
6041
  resolvedOutputLinks: RegisteredResolvedConnection[];
6057
- /** The floating links that were used to create the subgraph. */
6058
6042
  boundaryFloatingLinks: RegisteredLLink[];
6059
- /** The internal links that were used to create the subgraph. */
6060
6043
  internalLinks: RegisteredLLink[];
6061
6044
  };
6062
6045
  'open-subgraph': {
6063
6046
  subgraph: RegisteredSubgraph;
6064
6047
  closingGraph: RegisteredLGraph | RegisteredSubgraph;
6065
6048
  };
6066
- /**
6067
- * Fires on the owning graph once a node is attached and registered. Prefer
6068
- * this to wrapping {@link LGraph.onNodeAdded}, which has a single slot that
6069
- * concurrent subscribers clobber on restore.
6070
- */
6071
6049
  'node:added': {
6072
6050
  node: RegisteredLGraphNode;
6073
6051
  };
6074
- /**
6075
- * Fires on the owning graph before per-node teardown begins
6076
- */
6077
6052
  'node:before-removed': {
6078
6053
  node: RegisteredLGraphNode;
6079
6054
  };
6080
- /**
6081
- * Fires on the owning graph once a node is detached. `node.graph` is already
6082
- * null; derive execution ids from the dispatching graph plus `node.id`.
6083
- * @see {@link 'node:added'} on why to prefer this to `onNodeRemoved`.
6084
- */
6085
6055
  'node:removed': {
6086
6056
  node: RegisteredLGraphNode;
6087
6057
  };
@@ -6112,7 +6082,7 @@ declare interface LGraphExtra extends Dictionary<unknown> {
6112
6082
  parentId: RerouteId | undefined;
6113
6083
  }[];
6114
6084
  linkPresentation?: Record<string, LinkPresentation>;
6115
- ds?: DragAndScaleState;
6085
+ ds?: PanZoom;
6116
6086
  workflowRendererVersion?: RendererType;
6117
6087
  }
6118
6088
 
@@ -6164,7 +6134,8 @@ export declare class LGraphGroup implements Positionable, IPinnable, IColorable
6164
6134
  set size(v: Size);
6165
6135
  syncBoundsFromStore(): void;
6166
6136
  private commitBounds;
6167
- private setBounds;
6137
+ /** Sets position and size in one layout operation. */
6138
+ setBounds(x: number, y: number, width: number, height: number): void;
6168
6139
  get boundingRect(): Rectangle;
6169
6140
  getBounding(): Rectangle;
6170
6141
  get nodes(): LGraphNode[];
@@ -6213,6 +6184,7 @@ export declare class LGraphGroup implements Positionable, IPinnable, IColorable
6213
6184
  addNodes(nodes: LGraphNode[], padding?: number): void;
6214
6185
  getMenuOptions(): (IContextMenuValue<string> | IContextMenuValue<string | null> | null)[];
6215
6186
  isPointInTitlebar(x: number, y: number): boolean;
6187
+ /** @deprecated Use `resizeCornerAt` from `canvas/cornerResize`, which covers all four corners. */
6216
6188
  isInResize(x: number, y: number): boolean;
6217
6189
  isPointInside(x: number, y: number): boolean;
6218
6190
  setDirtyCanvas: (dirty_foreground: boolean, dirty_background?: boolean) => void;
@@ -6260,6 +6232,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6260
6232
  static filter?: string;
6261
6233
  static skip_list?: boolean;
6262
6234
  static nodeData?: {
6235
+ isCoreNode?: boolean;
6263
6236
  dev_only?: boolean;
6264
6237
  deprecated?: boolean;
6265
6238
  experimental?: boolean;
@@ -6432,7 +6405,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6432
6405
  isLoading?: boolean;
6433
6406
  isUploading?: boolean;
6434
6407
  previewMediaType?: 'image' | 'video' | 'audio' | 'model';
6435
- /** If true, output images are stored but not rendered below the node */
6408
+ /** Only false enables the default executed-output preview in Vue mode. */
6436
6409
  hideOutputImages?: boolean;
6437
6410
  preview?: string[];
6438
6411
  /** Index of the currently selected image on a multi-image node such as Preview Image */
@@ -6453,10 +6426,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6453
6426
  index?: number;
6454
6427
  runningInternalNodeId?: SerializedNodeId;
6455
6428
  /** Used internally for sizing the node during creation */
6456
- _initialMinSize?: {
6457
- width: number;
6458
- height: number;
6459
- };
6429
+ _initialMinSize?: Size2D;
6460
6430
  /** Raw widget values from the last `configure`; litegraph does not read it. */
6461
6431
  widgets_values?: TWidgetValue[];
6462
6432
  isSubgraphNode(): this is RegisteredSubgraphNode;
@@ -6469,10 +6439,11 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6469
6439
  get renderArea(): ReadOnlyRect;
6470
6440
  /** @inheritdoc {@link boundingRect} */
6471
6441
  private _boundingRect;
6442
+ private _measuredPos;
6472
6443
  /**
6473
6444
  * Cached node position & area as `x, y, width, height`. Includes changes made by {@link onBounding}, if present.
6474
6445
  *
6475
- * Determines the node hitbox and other rendering effects. Calculated once at the start of every frame.
6446
+ * Determines the node hitbox and other rendering effects. Measured once at the start of every frame, and moved with the node until the next measure.
6476
6447
  */
6477
6448
  get boundingRect(): ReadOnlyRectangle;
6478
6449
  /** The offset from {@link pos} to the top-left of {@link boundingRect}. */
@@ -6590,7 +6561,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6590
6561
  /** Blocks drag if return value is truthy. @param pos Offset from {@link LGraphNode.pos}. */
6591
6562
  onMouseDown?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: RegisteredLGraphCanvas): boolean;
6592
6563
  /** @param pos Offset from {@link LGraphNode.pos}. */
6593
- onDblClick?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: RegisteredLGraphCanvas): void;
6564
+ onDblClick?(this: LGraphNode, e: CanvasMouseEvent, pos: Point, canvas: RegisteredLGraphCanvas): void;
6594
6565
  /** @param pos Offset from {@link LGraphNode.pos}. */
6595
6566
  onNodeTitleDblClick?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: RegisteredLGraphCanvas): void;
6596
6567
  onDrawTitle?(this: LGraphNode, ctx: CanvasRenderingContext2D): void;
@@ -7032,40 +7003,14 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
7032
7003
  */
7033
7004
  connectByTypeOutput(slot: number | string, source_node: LGraphNode, source_slotType: ISlotType, optsIn?: ConnectByTypeOptions): LLink | null;
7034
7005
  canConnectTo(node: NodeLike, toSlot: INodeInputSlot | SubgraphIO, fromSlot: INodeOutputSlot | SubgraphIO): boolean;
7035
- /**
7036
- * Connect an output of this node to an input of another node
7037
- * @param slot (could be the number of the slot or the string with the name of the slot)
7038
- * @param target_node the target node
7039
- * @param target_slot the input slot of the target node (could be the number of the slot or the string with the name of the slot, or -1 to connect a trigger)
7040
- * @returns the link_info is created, otherwise null
7041
- */
7042
- connect(slot: number | string, target_node: LGraphNode | number | null, target_slot: number | string, afterRerouteId?: RerouteId): LLink | null;
7043
- /**
7044
- * Connect two slots between two nodes
7045
- * @param output The output slot to connect
7046
- * @param inputNode The node that the input slot is on
7047
- * @param input The input slot to connect
7048
- * @param afterRerouteId The reroute ID to use for the link
7049
- * @returns The link that was created, or null if the connection was blocked
7050
- */
7051
- connectSlots(output: INodeOutputSlot, inputNode: LGraphNode, input: INodeInputSlot, afterRerouteId: RerouteId | undefined): LLink | null | undefined;
7006
+ connect(slot: number | string, target_node: LGraphNode | number | null, target_slot: number | string, afterRerouteId?: RerouteId, options?: {
7007
+ requestedId: LinkId;
7008
+ }): LLink | null;
7009
+ connectSlots(output: INodeOutputSlot, inputNode: LGraphNode, input: INodeInputSlot, afterRerouteId: RerouteId | undefined, options?: {
7010
+ requestedId: LinkId;
7011
+ }): LLink | null | undefined;
7052
7012
  connectFloatingReroute(pos: Point, slot: INodeInputSlot | INodeOutputSlot, afterRerouteId?: RerouteId): RegisteredReroute | undefined;
7053
- /**
7054
- * disconnect one output to an specific node
7055
- * @param slot (could be the number of the slot or the string with the name of the slot)
7056
- * @param target_node the target node to which this slot is connected [Optional,
7057
- * if not target_node is specified all nodes will be disconnected]
7058
- * @returns if it was disconnected successfully
7059
- */
7060
7013
  disconnectOutput(slot: string | number, target_node?: LGraphNode): boolean;
7061
- /**
7062
- * Disconnect one input
7063
- * @param slot Input slot index, or the name of the slot
7064
- * @param keepReroutes If `true`, reroutes will not be garbage collected.
7065
- * @param keepFloatingReroute Floating link(s) parented to this reroute are left
7066
- * intact, so a chain being reconnected is not pruned before its new link exists.
7067
- * @returns true if disconnected successfully or already disconnected, otherwise false
7068
- */
7069
7014
  disconnectInput(slot: number | string, keepReroutes?: boolean, keepFloatingReroute?: RerouteId): boolean;
7070
7015
  /**
7071
7016
  * @deprecated Use {@link getInputPos} or {@link getOutputPos} instead.
@@ -7233,13 +7178,6 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
7233
7178
  * Draws the node's input and output slots.
7234
7179
  */
7235
7180
  drawSlots(ctx: CanvasRenderingContext2D, { fromSlot, colorContext, editorAlpha, lowQuality }: DrawSlotsOptions): void;
7236
- /**
7237
- * Arranges the node's widgets vertically.
7238
- * Sets following properties on each widget:
7239
- * - {@link IBaseWidget.computedHeight}
7240
- * - {@link IBaseWidget.y}
7241
- * @param widgetStartY The y-coordinate of the first widget
7242
- */
7243
7181
  private _arrangeWidgets;
7244
7182
  /**
7245
7183
  * Arranges the layout of the node's widget input slots.
@@ -7335,6 +7273,7 @@ declare class LinkConnector {
7335
7273
  overWidget?: IBaseWidget;
7336
7274
  /** The type (returned by downstream callback) for {@link overWidget} */
7337
7275
  overWidgetType?: string;
7276
+ overInput?: INodeInputSlot;
7338
7277
  /** The reroute beneath the pointer, if it is a valid connection target. */
7339
7278
  overReroute?: RegisteredReroute;
7340
7279
  private readonly _setConnectingLinks;
@@ -7380,7 +7319,7 @@ declare class LinkConnector {
7380
7319
  * Connects the links being dropped
7381
7320
  * @param event Contains the drop location, in canvas space
7382
7321
  */
7383
- dropLinks(locator: ItemLocator, event: CanvasPointerEvent): void;
7322
+ dropLinks(graph: RegisteredLGraph, event: CanvasPointerEvent): void;
7384
7323
  dropOnIoNode(ioNode: SubgraphInputNode | SubgraphOutputNode, event: CanvasPointerEvent): void;
7385
7324
  dropOnNode(node: RegisteredLGraphNode, event: CanvasPointerEvent): void;
7386
7325
  dropOnReroute(reroute: RegisteredReroute, event: CanvasPointerEvent): void;
@@ -7522,15 +7461,11 @@ export declare enum LinkMarkerShape {
7522
7461
  Arrow = 2
7523
7462
  }
7524
7463
 
7525
- /**
7526
- * Contains a list of links, reroutes, and nodes.
7527
- */
7528
7464
  export declare interface LinkNetwork extends ReadonlyLinkNetwork {
7529
7465
  readonly links: Map<LinkId, RegisteredLLink>;
7530
7466
  readonly reroutes: Map<RerouteId, RegisteredReroute>;
7531
7467
  addFloatingLink(link: RegisteredLLink): RegisteredLLink | undefined;
7532
7468
  removeReroute(id: RerouteId): unknown;
7533
- /** Removes a reroute from the map and its stores, without chain splicing. */
7534
7469
  _removeReroute(id: RerouteId): void;
7535
7470
  removeFloatingLink(link: RegisteredLLink): void;
7536
7471
  }
@@ -7598,14 +7533,11 @@ declare interface LinkSegment {
7598
7533
  declare interface LinkTopology {
7599
7534
  readonly id: LinkId;
7600
7535
  graphId: OwningGraphId;
7601
- /** Output node; UNASSIGNED_NODE_ID when the output end is floating. */
7602
7536
  originNodeId: NodeId;
7603
7537
  originSlot: number;
7604
- /** Input node; UNASSIGNED_NODE_ID when the input end is floating. */
7605
7538
  targetNodeId: NodeId;
7606
7539
  targetSlot: number;
7607
7540
  type: ISlotType;
7608
- /** Terminal reroute of the segment chain, when the link routes through one. */
7609
7541
  parentId?: RerouteId;
7610
7542
  }
7611
7543
 
@@ -7626,6 +7558,7 @@ export declare class LiteGraphGlobal {
7626
7558
  NODE_TITLE_TEXT_Y: number;
7627
7559
  NODE_SLOT_HEIGHT: number;
7628
7560
  NODE_WIDGET_HEIGHT: number;
7561
+ NODE_WIDGET_GAP: number;
7629
7562
  NODE_WIDTH: number;
7630
7563
  NODE_MIN_WIDTH: number;
7631
7564
  NODE_COLLAPSED_RADIUS: number;
@@ -7663,7 +7596,7 @@ export declare class LiteGraphGlobal {
7663
7596
  /** default node position */
7664
7597
  DEFAULT_POSITION: number[];
7665
7598
  /** ,"circle" */
7666
- VALID_SHAPES: ("round" | "default" | "card" | "box")[];
7599
+ VALID_SHAPES: ("default" | "round" | "card" | "box")[];
7667
7600
  ROUND_RADIUS: number;
7668
7601
  BOX_SHAPE: RenderShape;
7669
7602
  ROUND_SHAPE: RenderShape;
@@ -7768,28 +7701,47 @@ export declare class LiteGraphGlobal {
7768
7701
  * if dont want this, calculate once and set registered_slot_[in/out]_types and slot_types_[in/out]
7769
7702
  */
7770
7703
  auto_load_slot_types: boolean;
7704
+ private registeredSlotInTypes;
7705
+ private registeredSlotOutTypes;
7706
+ private slotTypesOut;
7707
+ private slotTypesDefaultIn;
7708
+ private slotTypesDefaultOut;
7709
+ private fillSlotTypeTables?;
7771
7710
  /** slot types for nodeclass */
7772
- registered_slot_in_types: Record<string, {
7711
+ get registered_slot_in_types(): Record<string, {
7773
7712
  nodes: string[];
7774
7713
  }>;
7714
+ set registered_slot_in_types(value: Record<string, {
7715
+ nodes: string[];
7716
+ }>);
7775
7717
  /** slot types for nodeclass */
7776
- registered_slot_out_types: Record<string, {
7718
+ get registered_slot_out_types(): Record<string, {
7777
7719
  nodes: string[];
7778
7720
  }>;
7721
+ set registered_slot_out_types(value: Record<string, {
7722
+ nodes: string[];
7723
+ }>);
7779
7724
  /** slot types IN */
7780
7725
  slot_types_in: string[];
7781
7726
  /** slot types OUT */
7782
- slot_types_out: string[];
7727
+ get slot_types_out(): string[];
7728
+ set slot_types_out(value: string[]);
7783
7729
  /**
7784
7730
  * specify for each IN slot type a(/many) default node(s), use single string, array, or object
7785
7731
  * (with node, title, parameters, ..) like for search
7786
7732
  */
7787
- slot_types_default_in: Record<string, SlotTypeDefault>;
7733
+ get slot_types_default_in(): Record<string, SlotTypeDefault>;
7734
+ set slot_types_default_in(value: Record<string, SlotTypeDefault>);
7788
7735
  /**
7789
7736
  * specify for each OUT slot type a(/many) default node(s), use single string, array, or object
7790
7737
  * (with node, title, parameters, ..) like for search
7791
7738
  */
7792
- slot_types_default_out: Record<string, SlotTypeDefault>;
7739
+ get slot_types_default_out(): Record<string, SlotTypeDefault>;
7740
+ set slot_types_default_out(value: Record<string, SlotTypeDefault>);
7741
+ /** Defers filling the slot type tables until one is read or {@link flushSlotTypeTables} runs. */
7742
+ deferSlotTypeTables(fill: () => void): void;
7743
+ /** Runs the fill passed to {@link deferSlotTypeTables}, if it has not run yet. */
7744
+ flushSlotTypeTables(): void;
7793
7745
  /** [true!] very handy, ALT click to clone and drag the new node */
7794
7746
  alt_drag_do_clone_nodes: boolean;
7795
7747
  /**
@@ -7886,6 +7838,7 @@ export declare class LiteGraphGlobal {
7886
7838
  vueNodesMode: boolean;
7887
7839
  nodeOpacity: number;
7888
7840
  nodeLightness: number | undefined;
7841
+ linkStyle: 'solid' | 'chalk' | undefined;
7889
7842
  LGraph: typeof LGraph;
7890
7843
  LLink: typeof LLink;
7891
7844
  LGraphNode: typeof LGraphNode;
@@ -7985,7 +7938,9 @@ export declare class LiteGraphGlobal {
7985
7938
  declare class LitegraphLinkAdapter {
7986
7939
  readonly enableLayoutStoreWrites: boolean;
7987
7940
  private readonly pathRenderer;
7941
+ private readonly pathContexts;
7988
7942
  constructor(enableLayoutStoreWrites?: boolean);
7943
+ private pathRenderContextFor;
7989
7944
  /**
7990
7945
  * Convert LinkDirection enum to Direction string
7991
7946
  */
@@ -8208,9 +8163,17 @@ declare interface LoadGraphDataOptions {
8208
8163
  openSource?: WorkflowOpenSource;
8209
8164
  shareId?: string;
8210
8165
  deferWarnings?: boolean;
8166
+ opening?: WorkflowOpening;
8211
8167
  skipAssetScans?: boolean;
8212
8168
  silentAssetErrors?: boolean;
8169
+ restoreHistory?: boolean;
8213
8170
  workflowNavigationId?: number;
8171
+ isCurrent?: () => boolean;
8172
+ /** Checked once when the load reaches the front of the queue; false skips it. */
8173
+ isReady?: () => boolean;
8174
+ /** Graph to load, produced at the front of the queue; undefined skips the load. */
8175
+ resolveGraphData?: () => ComfyWorkflowJSON | undefined;
8176
+ initiator?: 'user';
8214
8177
  }
8215
8178
 
8216
8179
  export declare interface LogEntry {
@@ -8291,30 +8254,34 @@ declare interface MissingMediaCandidate {
8291
8254
  * The same model name may appear multiple times across different nodes.
8292
8255
  */
8293
8256
  declare interface MissingModelCandidate {
8294
- /** Undefined for workflow-level models not tied to a specific node. */
8295
- nodeId?: SerializedNodeId;
8296
- /** Stored owner of nodeType/embedded url; promotedSources tracks active consumers. */
8297
- sourceExecutionId?: NodeExecutionId;
8298
- promotedSources?: PromotedWidgetExecutionSource[];
8299
- nodeType: string;
8300
- widgetName: string;
8301
8257
  isAssetSupported: boolean;
8302
- name: string;
8303
- directory?: string;
8304
- url?: string;
8305
- hash?: string;
8306
- hashType?: string;
8307
8258
  /**
8308
8259
  * - `true` — confirmed missing
8309
8260
  * - `false` — confirmed installed
8310
8261
  * - `undefined` — pending async verification
8311
8262
  */
8312
8263
  isMissing: boolean | undefined;
8264
+ name: string;
8265
+ nodeType: string;
8266
+ widgetName: string;
8267
+ directory?: string;
8268
+ hash?: string;
8269
+ hashType?: string;
8270
+ /** Undefined for workflow-level models not tied to a specific node. */
8271
+ nodeId?: SerializedNodeId;
8272
+ promotedSources?: PromotedWidgetExecutionSource[];
8273
+ /** Available options the missing value most likely meant, best first. */
8274
+ replacements?: string[];
8275
+ /** Stored owner of nodeType/embedded url; promotedSources tracks active consumers. */
8276
+ sourceExecutionId?: NodeExecutionId;
8277
+ url?: string;
8313
8278
  }
8314
8279
 
8315
8280
  declare interface MissingModelPipelineResult {
8316
8281
  missingModels: ModelFile_2[];
8317
8282
  confirmedCandidates: MissingModelCandidate[];
8283
+ /** Settles once the verified candidates reach the store, or verification stops. */
8284
+ surfaced: Promise<void>;
8318
8285
  }
8319
8286
 
8320
8287
  /**
@@ -8342,20 +8309,12 @@ declare type MissingNodeType = string | {
8342
8309
  replacement?: NodeReplacement;
8343
8310
  };
8344
8311
 
8345
- declare type ModelFile = z.infer<typeof zModelFile_2>;
8346
-
8347
8312
  declare type ModelFile_2 = z.infer<typeof zModelFile>;
8348
8313
 
8349
- declare interface ModelFolderInfo {
8350
- name: string;
8351
- folders: string[];
8352
- /**
8353
- * The folder's raw registered extension allowlist from
8354
- * `/experiment/models`. An empty array means match-all; absent on older
8355
- * backends.
8356
- */
8314
+ declare type ModelFolderInfo = ModelFolder & {
8315
+ /** Raw extension allowlist; empty matches all, absent on older backends. */
8357
8316
  extensions?: string[];
8358
- }
8317
+ };
8359
8318
 
8360
8319
  declare class MovingInputLink extends MovingLinkBase {
8361
8320
  readonly toType = "input";
@@ -8481,17 +8440,29 @@ declare type NeverNever_2<T> = {
8481
8440
  };
8482
8441
 
8483
8442
  declare interface NewNodePosition {
8484
- node: RegisteredLGraphNode;
8485
- newPos: {
8486
- x: number;
8487
- y: number;
8488
- };
8443
+ node: LGraphNode;
8444
+ newPos: Point2D;
8489
8445
  }
8490
8446
 
8491
8447
  declare interface NodeBindable {
8492
8448
  setNodeId(nodeId: NodeId): void;
8493
8449
  }
8494
8450
 
8451
+ /**
8452
+ * The public surface of the application singleton created in
8453
+ * `@/scripts/app`. Modules that the app itself imports reach the running
8454
+ * instance through `useApp()` from `@/scripts/appInstance`; only the
8455
+ * composition root imports the class.
8456
+ */
8457
+ /** The node definitions, or the HTTP status of the server's refusal. */
8458
+ declare type NodeDefsFetch = {
8459
+ ok: true;
8460
+ defs: Record<string, ComfyNodeDef>;
8461
+ } | {
8462
+ ok: false;
8463
+ status: number;
8464
+ };
8465
+
8495
8466
  export declare type NodeError = {
8496
8467
  errors: (PromptError & {
8497
8468
  extra_info?: {
@@ -8586,13 +8557,8 @@ export declare enum NodeSlotType {
8586
8557
  OUTPUT = 2
8587
8558
  }
8588
8559
 
8589
- /**
8590
- * The fields the renderer draws. Selection, execution, errors, geometry, widget
8591
- * values and links live elsewhere — see docs/architecture/node-data-store.md.
8592
- */
8593
8560
  declare interface NodeState {
8594
8561
  flags: INodeFlags;
8595
- /** Owning (sub)graph id — partitioning + locator ids. */
8596
8562
  graphId: UUID;
8597
8563
  readonly id: NodeId;
8598
8564
  inputs: INodeInputSlot[];
@@ -8630,7 +8596,7 @@ declare class NumberWidget extends BaseSteppedWidget<INumericWidget> implements
8630
8596
  canDecrement(): boolean;
8631
8597
  incrementValue(options: WidgetEventOptions): void;
8632
8598
  decrementValue(options: WidgetEventOptions): void;
8633
- setValue(value: number, options: WidgetEventOptions): void;
8599
+ setValue(value: number, options?: WidgetValueOptions): void;
8634
8600
  onClick({ e, node, canvas }: WidgetEventOptions): void;
8635
8601
  /**
8636
8602
  * Handles drag events for the number widget
@@ -8657,6 +8623,8 @@ declare interface OutputMap {
8657
8623
  */
8658
8624
  declare function overlapBounding(a: ReadOnlyRect, b: ReadOnlyRect): boolean;
8659
8625
 
8626
+ declare const ownedGraph: unique symbol;
8627
+
8660
8628
  declare type OwningGraphId = string & {
8661
8629
  readonly __brand: 'OwningGraphId';
8662
8630
  };
@@ -8670,110 +8638,6 @@ declare class PainterWidget extends BaseWidget<IPainterWidget> implements IPaint
8670
8638
  onClick(_options: WidgetEventOptions): void;
8671
8639
  }
8672
8640
 
8673
- declare type Palette = z.infer<typeof paletteSchema>;
8674
-
8675
- declare const paletteSchema: z.ZodObject<{
8676
- id: z.ZodString;
8677
- name: z.ZodString;
8678
- colors: z.ZodObject<{
8679
- node_slot: z.ZodObject<{
8680
- CLIP: z.ZodOptional<z.ZodString>;
8681
- CLIP_VISION: z.ZodOptional<z.ZodString>;
8682
- CLIP_VISION_OUTPUT: z.ZodOptional<z.ZodString>;
8683
- CONDITIONING: z.ZodOptional<z.ZodString>;
8684
- CONTROL_NET: z.ZodOptional<z.ZodString>;
8685
- IMAGE: z.ZodOptional<z.ZodString>;
8686
- LATENT: z.ZodOptional<z.ZodString>;
8687
- MASK: z.ZodOptional<z.ZodString>;
8688
- MODEL: z.ZodOptional<z.ZodString>;
8689
- STYLE_MODEL: z.ZodOptional<z.ZodString>;
8690
- VAE: z.ZodOptional<z.ZodString>;
8691
- NOISE: z.ZodOptional<z.ZodString>;
8692
- GUIDER: z.ZodOptional<z.ZodString>;
8693
- SAMPLER: z.ZodOptional<z.ZodString>;
8694
- SIGMAS: z.ZodOptional<z.ZodString>;
8695
- TAESD: z.ZodOptional<z.ZodString>;
8696
- }, z.core.$strip>;
8697
- litegraph_base: z.ZodObject<{
8698
- BACKGROUND_IMAGE: z.ZodOptional<z.ZodString>;
8699
- CLEAR_BACKGROUND_COLOR: z.ZodOptional<z.ZodString>;
8700
- NODE_TITLE_COLOR: z.ZodOptional<z.ZodString>;
8701
- NODE_SELECTED_TITLE_COLOR: z.ZodOptional<z.ZodString>;
8702
- NODE_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8703
- NODE_TEXT_HIGHLIGHT_COLOR: z.ZodOptional<z.ZodString>;
8704
- NODE_DEFAULT_COLOR: z.ZodOptional<z.ZodString>;
8705
- NODE_DEFAULT_BGCOLOR: z.ZodOptional<z.ZodString>;
8706
- NODE_DEFAULT_BOXCOLOR: z.ZodOptional<z.ZodString>;
8707
- NODE_DEFAULT_SHAPE: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<RenderShape.BOX>, z.ZodLiteral<RenderShape.ROUND>, z.ZodLiteral<RenderShape.CARD>, z.ZodString]>>;
8708
- NODE_BOX_OUTLINE_COLOR: z.ZodOptional<z.ZodString>;
8709
- NODE_BYPASS_BGCOLOR: z.ZodOptional<z.ZodString>;
8710
- NODE_ERROR_COLOUR: z.ZodOptional<z.ZodString>;
8711
- DEFAULT_SHADOW_COLOR: z.ZodOptional<z.ZodString>;
8712
- WIDGET_BGCOLOR: z.ZodOptional<z.ZodString>;
8713
- WIDGET_OUTLINE_COLOR: z.ZodOptional<z.ZodString>;
8714
- WIDGET_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8715
- WIDGET_SECONDARY_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8716
- WIDGET_DISABLED_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8717
- LINK_COLOR: z.ZodOptional<z.ZodString>;
8718
- EVENT_LINK_COLOR: z.ZodOptional<z.ZodString>;
8719
- CONNECTING_LINK_COLOR: z.ZodOptional<z.ZodString>;
8720
- BADGE_FG_COLOR: z.ZodOptional<z.ZodString>;
8721
- BADGE_BG_COLOR: z.ZodOptional<z.ZodString>;
8722
- }, z.core.$strip>;
8723
- comfy_base: z.ZodObject<{
8724
- "fg-color": z.ZodOptional<z.ZodString>;
8725
- "bg-color": z.ZodOptional<z.ZodString>;
8726
- "bg-img": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8727
- "comfy-menu-bg": z.ZodOptional<z.ZodString>;
8728
- "comfy-menu-secondary-bg": z.ZodOptional<z.ZodString>;
8729
- "comfy-input-bg": z.ZodOptional<z.ZodString>;
8730
- "input-text": z.ZodOptional<z.ZodString>;
8731
- "descrip-text": z.ZodOptional<z.ZodString>;
8732
- "drag-text": z.ZodOptional<z.ZodString>;
8733
- "error-text": z.ZodOptional<z.ZodString>;
8734
- "border-color": z.ZodOptional<z.ZodString>;
8735
- "tr-even-bg-color": z.ZodOptional<z.ZodString>;
8736
- "tr-odd-bg-color": z.ZodOptional<z.ZodString>;
8737
- "content-bg": z.ZodOptional<z.ZodString>;
8738
- "content-fg": z.ZodOptional<z.ZodString>;
8739
- "content-hover-bg": z.ZodOptional<z.ZodString>;
8740
- "content-hover-fg": z.ZodOptional<z.ZodString>;
8741
- "bar-shadow": z.ZodOptional<z.ZodString>;
8742
- "contrast-mix-color": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8743
- "interface-stroke": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8744
- "interface-panel-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8745
- "interface-panel-box-shadow": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8746
- "interface-panel-drop-shadow": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8747
- "interface-floating-panel-shadow": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8748
- "interface-panel-hover-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8749
- "interface-panel-selected-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8750
- "interface-button-hover-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8751
- }, z.core.$strip>;
8752
- theme: z.ZodOptional<z.ZodObject<{
8753
- background: z.ZodOptional<z.ZodString>;
8754
- foreground: z.ZodOptional<z.ZodString>;
8755
- card: z.ZodOptional<z.ZodString>;
8756
- popover: z.ZodOptional<z.ZodString>;
8757
- primary: z.ZodOptional<z.ZodString>;
8758
- secondary: z.ZodOptional<z.ZodString>;
8759
- muted: z.ZodOptional<z.ZodString>;
8760
- "muted-foreground": z.ZodOptional<z.ZodString>;
8761
- accent: z.ZodOptional<z.ZodString>;
8762
- destructive: z.ZodOptional<z.ZodString>;
8763
- border: z.ZodOptional<z.ZodString>;
8764
- input: z.ZodOptional<z.ZodString>;
8765
- ring: z.ZodOptional<z.ZodString>;
8766
- node: z.ZodOptional<z.ZodString>;
8767
- "node-foreground": z.ZodOptional<z.ZodString>;
8768
- "node-header": z.ZodOptional<z.ZodString>;
8769
- "node-border": z.ZodOptional<z.ZodString>;
8770
- warning: z.ZodOptional<z.ZodString>;
8771
- "shadow-color": z.ZodOptional<z.ZodString>;
8772
- }, z.core.$strip>>;
8773
- }, z.core.$strip>;
8774
- light_theme: z.ZodOptional<z.ZodBoolean>;
8775
- }, z.core.$loose>;
8776
-
8777
8641
  /**
8778
8642
  * A dialog panel created by LGraphCanvas.createPanel().
8779
8643
  * Extends HTMLDivElement with additional properties and methods for panel management.
@@ -8829,6 +8693,11 @@ declare interface PanelWidgetOptions {
8829
8693
  callback?: PanelWidgetCallback;
8830
8694
  }
8831
8695
 
8696
+ declare interface PanZoom {
8697
+ offset: Point;
8698
+ scale: number;
8699
+ }
8700
+
8832
8701
  declare type ParamsArray<T, K extends MethodNames<T>> = Parameters<Extract<T[K], (...args: never[]) => unknown>>[1] extends undefined ? Parameters<Extract<T[K], (...args: never[]) => unknown>> | Parameters<Extract<T[K], (...args: never[]) => unknown>>[0] : Parameters<Extract<T[K], (...args: never[]) => unknown>>;
8833
8702
 
8834
8703
  /** An object containing a set of child objects */
@@ -8879,9 +8748,13 @@ declare type PickNevers_2<T> = {
8879
8748
  [K in keyof T as T[K] extends never ? K : never]: T[K];
8880
8749
  };
8881
8750
 
8882
- /** A point represented as `[x, y]` co-ordinates */
8883
8751
  export declare type Point = [x: number, y: number];
8884
8752
 
8753
+ declare interface Point2D {
8754
+ x: number;
8755
+ y: number;
8756
+ }
8757
+
8885
8758
  /**
8886
8759
  * An object that can be positioned, selected, and moved.
8887
8760
  *
@@ -8928,7 +8801,7 @@ declare interface Positionable extends Parent<Positionable>, HasBoundingRect {
8928
8801
 
8929
8802
  declare type PreviewMethod = 'default' | 'none' | 'auto' | 'latent2rgb' | 'taesd';
8930
8803
 
8931
- declare interface ProgressStateWsMessage {
8804
+ declare interface ProgressStateWsMessage extends StampedWorkflowId {
8932
8805
  prompt_id: JobId;
8933
8806
  nodes: Record<NodeId_2, NodeProgressState>;
8934
8807
  }
@@ -8939,7 +8812,7 @@ declare interface ProgressTextWsMessage {
8939
8812
  prompt_id?: string;
8940
8813
  }
8941
8814
 
8942
- declare interface ProgressWsMessage {
8815
+ declare interface ProgressWsMessage extends StampedWorkflowId {
8943
8816
  value: number;
8944
8817
  max: number;
8945
8818
  prompt_id: JobId;
@@ -8964,6 +8837,50 @@ export declare type PromptFailureResponse = PromptErrorResponse & PromptInfo & {
8964
8837
  node_errors?: Record<string, NodeError>;
8965
8838
  };
8966
8839
 
8840
+ /**
8841
+ * Request body for submitting a ComfyUI workflow prompt for execution.
8842
+ */
8843
+ declare type PromptRequest = {
8844
+ /**
8845
+ * Extra data to be associated with the prompt
8846
+ */
8847
+ extra_data?: {
8848
+ [key: string]: unknown;
8849
+ };
8850
+ /**
8851
+ * If true, adds the prompt to the front of the queue
8852
+ */
8853
+ front?: boolean;
8854
+ /**
8855
+ * Priority number for the queue (lower numbers have higher priority)
8856
+ */
8857
+ number?: number;
8858
+ /**
8859
+ * List of node names to execute
8860
+ */
8861
+ partial_execution_targets?: Array<string>;
8862
+ /**
8863
+ * The workflow graph to execute
8864
+ */
8865
+ prompt: {
8866
+ [key: string]: unknown;
8867
+ };
8868
+ /**
8869
+ * UUID identifying the cloud workflow entity to associate with this job
8870
+ */
8871
+ workflow_id?: string;
8872
+ /**
8873
+ * Key/values echoed on the json websocket messages of this prompt that carry a `prompt_id`, so a client can tell which of its open workflows a message belongs to. Messages without a `prompt_id`, such as `status`, do not carry it, because a single socket serves every open workflow and such a message has no one owner. The server does not interpret the contents. Limited to 256 bytes serialised; a larger or non-object value is ignored. When this field is omitted, the server falls back to `{workflow_id: extra_data.extra_pnginfo.workflow.id}` if the submitted workflow carries an id, so a client that sends only the workflow gets the same messages. Note the `workflow_id` key a client typically sends here is the graph id from `extra_pnginfo.workflow.id`, which is not the same thing as the `workflow_id` field above.
8874
+ */
8875
+ workflow_metadata?: {
8876
+ [key: string]: string;
8877
+ };
8878
+ /**
8879
+ * UUID identifying the workflow version to associate with this job
8880
+ */
8881
+ workflow_version_id?: string;
8882
+ };
8883
+
8967
8884
  export declare type PromptResponse = PromptResponse_2 & {
8968
8885
  node_errors?: Record<string, NodeError>;
8969
8886
  exec_info?: {
@@ -8971,6 +8888,9 @@ export declare type PromptResponse = PromptResponse_2 & {
8971
8888
  };
8972
8889
  };
8973
8890
 
8891
+ /** Core's `workflow_metadata`: string keys to string values. */
8892
+ declare type PromptWorkflowMetadata = StringMap<NonNullable<PromptRequest['workflow_metadata']>>;
8893
+
8974
8894
  /**
8975
8895
  * Options for queuePrompt method
8976
8896
  */
@@ -9026,15 +8946,13 @@ export declare interface ReadonlyLinkNetwork {
9026
8946
  readonly outputNode?: RegisteredSubgraphOutputNode;
9027
8947
  }
9028
8948
 
9029
- /** A rectangle starting at top-left coordinates `[x, y, width, height]` that will not be modified */
9030
- export declare type ReadOnlyRect = readonly [x: number, y: number, width: number, height: number] | ReadOnlyTypedArray<Float64Array>;
8949
+ export declare type ReadOnlyRect = Readonly<RectTuple> | ReadOnlyTypedArray<Float64Array>;
9031
8950
 
9032
8951
  declare type ReadOnlyRectangle = Omit<ReadOnlyTypedArray<Rectangle>, 'setHeightBottomAnchored' | 'setWidthRightAnchored' | 'resizeTopLeft' | 'resizeBottomLeft' | 'resizeTopRight' | 'resizeBottomRight' | 'updateTo'>;
9033
8952
 
9034
8953
  declare type ReadOnlyTypedArray<T extends Float64Array> = Omit<Readonly<T>, 'fill' | 'copyWithin' | 'reverse' | 'set' | 'sort' | 'subarray'>;
9035
8954
 
9036
- /** A rectangle starting at top-left coordinates `[x, y, width, height]` */
9037
- export declare type Rect = [x: number, y: number, width: number, height: number] | Float64Array;
8955
+ export declare type Rect = RectTuple | Float64Array;
9038
8956
 
9039
8957
  /**
9040
8958
  * A rectangle, represented as a float64 array of 4 numbers: [x, y, width, height].
@@ -9195,10 +9113,23 @@ export declare class Rectangle extends Float64Array {
9195
9113
  /* Excluded from this release type: _drawDebug */
9196
9114
  }
9197
9115
 
9116
+ declare interface RectEdges {
9117
+ left: number;
9118
+ top: number;
9119
+ right: number;
9120
+ bottom: number;
9121
+ }
9122
+
9123
+ declare type RectSide = keyof RectEdges;
9124
+
9125
+ declare type RectTuple = [x: number, y: number, width: number, height: number];
9126
+
9198
9127
  declare type RegionType = 'obj' | 'text';
9199
9128
 
9200
9129
  declare type RegisteredBaseLGraph = BaseLGraph;
9201
9130
 
9131
+ declare type RegisteredCanvasPointer = CanvasPointer;
9132
+
9202
9133
  declare type RegisteredContextMenu<TValue = unknown> = ContextMenu<TValue>;
9203
9134
 
9204
9135
  declare type RegisteredExecutableLGraphNode = ExecutableLGraphNode;
@@ -9233,14 +9164,14 @@ declare type RegisteredMovingInputLink = MovingInputLink;
9233
9164
 
9234
9165
  declare type RegisteredMovingOutputLink = MovingOutputLink;
9235
9166
 
9167
+ declare type RegisteredRectangle = Rectangle;
9168
+
9236
9169
  declare type RegisteredRenderLink = RenderLink;
9237
9170
 
9238
9171
  declare type RegisteredReroute = Reroute;
9239
9172
 
9240
9173
  declare type RegisteredResolvedConnection = ResolvedConnection;
9241
9174
 
9242
- declare type RegisteredSerialisedLLinkArray = SerialisedLLinkArray;
9243
-
9244
9175
  declare type RegisteredSubgraph = Subgraph;
9245
9176
 
9246
9177
  declare type RegisteredSubgraphId = SubgraphId;
@@ -9582,6 +9513,15 @@ declare interface ResolvedSubgraphOutput {
9582
9513
 
9583
9514
  declare type ResultItem = z.infer<typeof zResultItem>;
9584
9515
 
9516
+ declare interface RetryPolicy {
9517
+ readonly maxAttempts: number;
9518
+ readonly baseDelayMs: number;
9519
+ readonly maxDelayMs: number;
9520
+ readonly retryNonIdempotent: boolean;
9521
+ /** Send a write once more after {@link isSignInCheckRefusal}; cloud only. */
9522
+ readonly retrySignInRefusal: boolean;
9523
+ }
9524
+
9585
9525
  declare interface RetrySignalLifecycle {
9586
9526
  clearInitialTimeout: () => void;
9587
9527
  createSignal: () => AbortSignal | undefined;
@@ -9662,6 +9602,8 @@ export declare interface SerialisableReroute {
9662
9602
  floating?: FloatingRerouteSlot;
9663
9603
  }
9664
9604
 
9605
+ declare type SerialisedGraphDocument = SerialisableGraph & GraphDocumentParts;
9606
+
9665
9607
  declare type SerialisedLLinkArray = [
9666
9608
  id: number,
9667
9609
  origin_id: SerializedNodeId,
@@ -9671,6 +9613,8 @@ target_slot: number,
9671
9613
  type: ISlotType
9672
9614
  ];
9673
9615
 
9616
+ declare type SerialisedSubgraphDocument = ExportedSubgraph & GraphDocumentParts;
9617
+
9674
9618
  export declare type SerializedNodeId = number | string;
9675
9619
 
9676
9620
  /**
@@ -9704,20 +9648,23 @@ declare interface SettingParams<TValue = unknown> extends FormItem {
9704
9648
  }
9705
9649
 
9706
9650
  export declare type Settings = {
9707
- 'Comfy.AgentPanel.ConsentOfferDeclined': boolean;
9651
+ 'Comfy.AgentPanel.OnboardedScopes': Array<string>;
9708
9652
  'Comfy.ColorPalette': string;
9709
- 'Comfy.CustomColorPalettes': ColorPalettes;
9653
+ 'Comfy.CustomColorPalettes': ThemePresets;
9710
9654
  'Comfy.Canvas.BackgroundImage'?: string;
9711
9655
  'Comfy.ConfirmClear': boolean;
9712
9656
  'Comfy.DevMode': boolean;
9657
+ 'Comfy.Agent.CrdtDebug.Level': 'warn' | 'info' | 'debug' | 'trace';
9713
9658
  'Comfy.Appearance.DisableAnimations': boolean;
9714
9659
  'Comfy.UI.TabBarLayout': 'Default' | 'Legacy';
9715
9660
  'Comfy.Workflow.ShowMissingModelsWarning': boolean;
9716
9661
  'Comfy.ErrorSystem.ShowMissingModels': boolean;
9717
- 'Comfy.Workflow.ShowMissingNodesWarning': boolean;
9662
+ 'Comfy.ErrorSystem.ShowMissingNodes': boolean;
9718
9663
  'Comfy.Workflow.ShowMissingMediaWarning': boolean;
9719
9664
  'Comfy.Workflow.WarnBlueprintOverwrite': boolean;
9665
+ 'Comfy.Cloud.AskBeforeCompatibilityCheck': boolean;
9720
9666
  'Comfy.Desktop.CloudNotificationShown': boolean;
9667
+ 'Comfy.DeploymentSwitcher.Seen': boolean;
9721
9668
  'Comfy.DisableFloatRounding': boolean;
9722
9669
  'Comfy.DisableSliders': boolean;
9723
9670
  'Comfy.DOMClippingEnabled': boolean;
@@ -9767,6 +9714,12 @@ export declare type Settings = {
9767
9714
  'Comfy.Sidebar.UnifiedWidth': boolean;
9768
9715
  'Comfy.Sidebar.Style': 'floating' | 'connected';
9769
9716
  'Comfy.SnapToGrid.GridSize': number;
9717
+ 'Comfy.Canvas.SmartGuides.Enabled': boolean;
9718
+ 'Comfy.Canvas.SmartGuides.SnapToEdges': boolean;
9719
+ 'Comfy.Canvas.SmartGuides.SnapToWires': boolean;
9720
+ 'Comfy.Canvas.SmartGuides.SnapToSpacing': boolean;
9721
+ 'Comfy.Canvas.SmartGuides.SnapDistance': number;
9722
+ 'Comfy.Canvas.SmartGuides.Gap': number;
9770
9723
  'Comfy.TextareaWidget.FontSize': number;
9771
9724
  'Comfy.TextareaWidget.Spellcheck': boolean;
9772
9725
  'Comfy.UseNewMenu': 'Disabled' | 'Top';
@@ -9792,6 +9745,8 @@ export declare type Settings = {
9792
9745
  'Comfy.Keybinding.NewBindings': Array<Keybinding>;
9793
9746
  'Comfy.Keybinding.CurrentPreset': string;
9794
9747
  'Comfy.Extension.Disabled': Array<string>;
9748
+ 'Comfy.Extension.SeenAgentExtensions': Array<string>;
9749
+ 'Comfy.Extension.DisabledPacks': Array<string>;
9795
9750
  'Comfy.LinkRenderMode': number;
9796
9751
  'Comfy.Node.AutoSnapLinkToSlot': boolean;
9797
9752
  'Comfy.Node.SnapHighlightsNode': boolean;
@@ -9814,6 +9769,7 @@ export declare type Settings = {
9814
9769
  'Comfy.OnboardingCoachmarks.Seen': Array<string>;
9815
9770
  'Comfy.InstalledVersion': string | null;
9816
9771
  'Comfy.Node.AllowImageSizeDraw': boolean;
9772
+ 'Comfy.Node.DownscaleImagePreviews': boolean;
9817
9773
  'Comfy.Minimap.Visible': boolean;
9818
9774
  'Comfy.Minimap.NodeColors': boolean;
9819
9775
  'Comfy.Minimap.ShowLinks': boolean;
@@ -9824,6 +9780,7 @@ export declare type Settings = {
9824
9780
  'Comfy.Canvas.LeftMouseClickBehavior': string;
9825
9781
  'Comfy.Canvas.MouseWheelScroll': string;
9826
9782
  'Comfy.VueNodes.Enabled': boolean;
9783
+ 'Comfy.VueNodes.HideSafeModelExtensions': boolean;
9827
9784
  'Comfy.AppBuilder.VueNodeSwitchDismissed': boolean;
9828
9785
  'Comfy.PartnerNodesEducation.Dismissed': boolean;
9829
9786
  'Comfy.ModelLibrary.UseAssetBrowser': boolean;
@@ -9855,7 +9812,8 @@ export declare type Settings = {
9855
9812
  'Comfy.Templates.SelectedModels': Array<string>;
9856
9813
  'Comfy.Templates.SelectedUseCases': Array<string>;
9857
9814
  'Comfy.Templates.SelectedRunsOn': Array<string>;
9858
- 'Comfy.Templates.SortBy': 'default' | 'recommended' | 'popular' | 'alphabetical' | 'newest' | 'vram-low-to-high' | 'model-size-low-to-high';
9815
+ 'Comfy.Templates.HasOpenedLibrary': boolean;
9816
+ 'Comfy.Templates.SortBy': 'recommended' | 'popular' | 'alphabetical' | 'newest' | 'vram-low-to-high' | 'model-size-low-to-high';
9859
9817
  'LiteGraph.Node.DefaultPadding': boolean;
9860
9818
  'LiteGraph.Pointer.TrackpadGestures': boolean;
9861
9819
  'Comfy.VersionCompatibility.DisableWarnings': boolean;
@@ -9914,9 +9872,13 @@ export declare type SidebarTabExtension = VueSidebarTabExtension | CustomSidebar
9914
9872
  /** Keys (names) of API events that _do not_ pass a {@link CustomEvent} `detail` object. */
9915
9873
  declare type SimpleApiEvents = keyof PickNevers<ApiEventTypes>;
9916
9874
 
9917
- /** A size represented as `[width, height]` */
9918
9875
  export declare type Size = [width: number, height: number];
9919
9876
 
9877
+ declare interface Size2D {
9878
+ width: number;
9879
+ height: number;
9880
+ }
9881
+
9920
9882
  declare class SliderWidget extends BaseWidget<ISliderWidget> implements ISliderWidget {
9921
9883
  marker?: number;
9922
9884
  /**
@@ -9999,6 +9961,24 @@ declare interface SlotTypeDefaultNodeOpts {
9999
9961
  json?: Parameters<LGraphNode['configure']>[0];
10000
9962
  }
10001
9963
 
9964
+ /**
9965
+ * Core's OpenAPI defines no websocket frame schemas. It documents that
9966
+ * `workflow_metadata` is echoed onto every JSON frame carrying a `prompt_id`,
9967
+ * so this field is the request contract read back rather than a separate one.
9968
+ *
9969
+ * What transfers from the spec is the map's VALUE type, not the map: core types
9970
+ * `workflow_metadata` as an arbitrary string map, and the frame carries that
9971
+ * map's contents merged into the frame object. So a `Pick` or `Partial` of the
9972
+ * map would describe the wrong shape here even though it would compile.
9973
+ *
9974
+ * The generated package is bundled into the published declarations by
9975
+ * `tsconfig.types.json`, so this reference is inlined rather than emitted as an
9976
+ * import of a private package that an external consumer could not resolve.
9977
+ */
9978
+ declare type StampedWorkflowId = {
9979
+ workflow_id?: PromptWorkflowMetadata[string];
9980
+ };
9981
+
10002
9982
  declare interface StatusWsMessage {
10003
9983
  status?: StatusWsMessageStatus | null;
10004
9984
  sid?: string | null;
@@ -10006,9 +9986,11 @@ declare interface StatusWsMessage {
10006
9986
 
10007
9987
  declare type StatusWsMessageStatus = PromptInfo;
10008
9988
 
9989
+ declare type StringMap<T extends Record<string, string>> = T;
9990
+
10009
9991
  /** A subgraph definition. */
10010
9992
  export declare class Subgraph extends LGraph implements BaseLGraph, Serialisable<ExportedSubgraph> {
10011
- readonly events: CustomEventTarget<SubgraphEventMap, "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "node:added" | "node:before-removed" | "node:removed" | "node:property:changed" | "node:slot-label:changed" | "adding-input" | "adding-output" | "input-added" | "output-added" | "removing-input" | "removing-output" | "inputs-reordered" | "renaming-input" | "renaming-output" | "widget-promoted" | "widget-demoted">;
9993
+ readonly events: CustomEventTarget<SubgraphEventMap, "node:property:changed" | "node:slot-label:changed" | "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "node:added" | "node:before-removed" | "node:removed" | "adding-input" | "adding-output" | "input-added" | "output-added" | "removing-input" | "removing-output" | "inputs-reordered" | "outputs-reordered" | "renaming-input" | "renaming-output" | "widget-promoted" | "widget-demoted">;
10012
9994
  /** Limits the number of levels / depth that subgraphs may be nested. Prevents uncontrolled programmatic nesting. */
10013
9995
  static MAX_NESTED_SUBGRAPHS: number;
10014
9996
  /** The display name of the subgraph. */
@@ -10032,7 +10014,9 @@ export declare class Subgraph extends LGraph implements BaseLGraph, Serialisable
10032
10014
  clone(): Subgraph;
10033
10015
  getIoNodeOnPos(x: number, y: number): SubgraphInputNode | SubgraphOutputNode | undefined;
10034
10016
  private _configureSubgraph;
10035
- configure(data: (ISerialisedGraph & ExportedSubgraph) | (SerialisableGraph & ExportedSubgraph), keep_old?: boolean): boolean | undefined;
10017
+ configure(data: (ISerialisedGraph & ExportedSubgraph) | (SerialisableGraph & ExportedSubgraph), keep_old?: boolean, viewOptions?: {
10018
+ preserveMountedNodeSizes?: boolean;
10019
+ }): boolean | undefined;
10036
10020
  attachCanvas(canvas: RegisteredLGraphCanvas): void;
10037
10021
  addInput(name: string | null, type: string | null): SubgraphInput;
10038
10022
  addOutput(name: string | null, type: string | null): SubgraphOutput;
@@ -10059,7 +10043,7 @@ export declare class Subgraph extends LGraph implements BaseLGraph, Serialisable
10059
10043
  */
10060
10044
  removeOutput(output: SubgraphOutput): void;
10061
10045
  draw(ctx: CanvasRenderingContext2D, colorContext: DefaultConnectionColors, fromSlot?: INodeInputSlot | INodeOutputSlot | SubgraphInput | SubgraphOutput, editorAlpha?: number): void;
10062
- asSerialisable(): ExportedSubgraph & Required<Pick<SerialisableGraph, 'nodes' | 'groups' | 'extra'>>;
10046
+ asSerialisable(): SerialisedSubgraphDocument;
10063
10047
  }
10064
10048
 
10065
10049
  declare interface SubgraphDefinitionBase<T extends ComfyWorkflow1BaseInput | ComfyWorkflow1BaseOutput> {
@@ -10114,6 +10098,11 @@ declare interface SubgraphEventMap extends LGraphEventMap {
10114
10098
  oldOrder: readonly string[];
10115
10099
  newOrder: readonly string[];
10116
10100
  };
10101
+ 'outputs-reordered': {
10102
+ subgraph: RegisteredSubgraph;
10103
+ oldOrder: readonly string[];
10104
+ newOrder: readonly string[];
10105
+ };
10117
10106
  'renaming-input': {
10118
10107
  input: RegisteredSubgraphInput;
10119
10108
  index: number;
@@ -10155,7 +10144,7 @@ export declare type SubgraphId = UUID;
10155
10144
  */
10156
10145
  export declare class SubgraphInput extends SubgraphSlot {
10157
10146
  parent: RegisteredSubgraphInputNode;
10158
- events: CustomEventTarget<SubgraphInputEventMap, "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "node:added" | "node:before-removed" | "node:removed" | "node:property:changed" | "node:slot-label:changed" | "input-connected" | "input-disconnected">;
10147
+ events: CustomEventTarget<SubgraphInputEventMap, "node:property:changed" | "node:slot-label:changed" | "input-connected" | "input-disconnected" | "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "node:added" | "node:before-removed" | "node:removed">;
10159
10148
  /** The linked widget that this slot is connected to. */
10160
10149
  private _widgetRef?;
10161
10150
  get _widget(): IBaseWidget< WidgetValue, string, IWidgetOptions<unknown>> | undefined;
@@ -10194,11 +10183,12 @@ declare interface SubgraphInputEventMap extends LGraphEventMap {
10194
10183
 
10195
10184
  declare class SubgraphInputNode extends SubgraphIONodeBase<RegisteredSubgraphInput> implements Positionable {
10196
10185
  readonly id: NodeId;
10186
+ readonly slotDirection = "output";
10197
10187
  readonly emptySlot: EmptySubgraphInput;
10198
10188
  get slots(): RegisteredSubgraphInput[];
10199
10189
  get allSlots(): RegisteredSubgraphInput[];
10200
- get slotAnchorX(): number;
10201
- onPointerDown(e: CanvasPointerEvent, pointer: CanvasPointer, linkConnector: RegisteredLinkConnector): void;
10190
+ protected fitSize(width: number, height: number): Point;
10191
+ protected dragNewLink(linkConnector: RegisteredLinkConnector, slot: RegisteredSubgraphInput): void;
10202
10192
  /** @inheritdoc */
10203
10193
  renameSlot(slot: RegisteredSubgraphInput, name: string): void;
10204
10194
  /** @inheritdoc */
@@ -10230,8 +10220,11 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10230
10220
  static margin: number;
10231
10221
  static minWidth: number;
10232
10222
  static roundedRadius: number;
10233
- private readonly _boundingRect;
10234
10223
  abstract readonly id: NodeId;
10224
+ abstract readonly slotDirection: SlotDirection;
10225
+ private fitted;
10226
+ private get measuredSize();
10227
+ private get layoutRect();
10235
10228
  get boundingRect(): Rectangle;
10236
10229
  get selected(): boolean;
10237
10230
  set selected(value: boolean);
@@ -10253,9 +10246,10 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10253
10246
  move(deltaX: number, deltaY: number): void;
10254
10247
  /** @inheritdoc */
10255
10248
  snapToGrid(snapTo: number): boolean;
10256
- abstract onPointerDown(e: CanvasPointerEvent, pointer: CanvasPointer, linkConnector: RegisteredLinkConnector): void;
10249
+ protected abstract dragNewLink(linkConnector: RegisteredLinkConnector, slot: TSlot): void;
10250
+ onPointerDown(e: CanvasPointerEvent, pointer: CanvasPointer, linkConnector: RegisteredLinkConnector): void;
10257
10251
  containsPoint(point: Point): boolean;
10258
- abstract get slotAnchorX(): number;
10252
+ get slotAnchorX(): number;
10259
10253
  onPointerMove(e: CanvasPointerEvent): CanvasItem;
10260
10254
  onPointerEnter(): void;
10261
10255
  onPointerLeave(): void;
@@ -10295,6 +10289,7 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10295
10289
  * @returns The context menu options.
10296
10290
  */
10297
10291
  private _getSlotMenuOptions;
10292
+ private _getSlotLinksToHide;
10298
10293
  /**
10299
10294
  * Handles the action for an IO slot context menu.
10300
10295
  * @param selectedItem The item that was selected from the context menu.
@@ -10308,8 +10303,8 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10308
10303
  * @param event The event that triggered the rename.
10309
10304
  */
10310
10305
  private _promptForSlotRename;
10311
- /** Arrange the slots in this node. */
10312
10306
  arrange(): void;
10307
+ protected fitSize(width: number, height: number): Point;
10313
10308
  draw(ctx: CanvasRenderingContext2D, colorContext: DefaultConnectionColors, fromSlot?: INodeInputSlot | INodeOutputSlot | RegisteredSubgraphInput | RegisteredSubgraphOutput, editorAlpha?: number): void;
10314
10309
  /* Excluded from this release type: drawProtected */
10315
10310
  /* Excluded from this release type: drawSlots */
@@ -10346,13 +10341,16 @@ export declare class SubgraphNode extends LGraphNode implements RegisteredBaseLG
10346
10341
  onTitleButtonClick(button: LGraphButton, canvas: RegisteredLGraphCanvas): void;
10347
10342
  private _projectPromotedWidget;
10348
10343
  private _addSubgraphInputListeners;
10344
+ private _demoteInputWidget;
10349
10345
  private _rebindInputSubgraphSlots;
10350
10346
  configure(info: ExportedSubgraphInstance): void;
10351
10347
  private _applyPromotedWidgetValues;
10348
+ private _serializedInputWidgets;
10352
10349
  private _readQuarantineHostValuesByName;
10353
10350
  _internalConfigureAfterSlots(): void;
10354
10351
  private _hydratePreviewExposures;
10355
10352
  rebuildInputWidgetBindings(): void;
10353
+ private _bindsRemainingLink;
10356
10354
  private _resolveInputWidget;
10357
10355
  private _resolveNestedPromotedSource;
10358
10356
  private _setWidget;
@@ -10361,6 +10359,10 @@ export declare class SubgraphNode extends LGraphNode implements RegisteredBaseLG
10361
10359
  * store-backed projection. Litegraph core stays free of Vue/Pinia/DOM.
10362
10360
  */
10363
10361
  protected createPromotedHostWidget(_input: INodeInputSlot, _id: WidgetId, _sourceWidget: Readonly<IBaseWidget>): IBaseWidget | undefined;
10362
+ /** Binds an input linked to an interior dynamic input group, if it is one. */
10363
+ protected bindDynamicInput(_input: INodeInputSlot, _interiorNode: LGraphNode, _interiorInput: INodeInputSlot): boolean;
10364
+ /** Releases an input bound by {@link bindDynamicInput}, if it was. */
10365
+ protected unbindDynamicInput(_input: INodeInputSlot): boolean;
10364
10366
  /**
10365
10367
  * Runs the host widget's `onRemove` (unregistering DOM widgets) and clears it.
10366
10368
  * Unlike {@link ensureWidgetRemoved}, dispatches no demotion event, so it is
@@ -10431,11 +10433,11 @@ export declare class SubgraphOutput extends SubgraphSlot {
10431
10433
 
10432
10434
  declare class SubgraphOutputNode extends SubgraphIONodeBase<RegisteredSubgraphOutput> implements Positionable {
10433
10435
  readonly id: NodeId;
10436
+ readonly slotDirection = "input";
10434
10437
  readonly emptySlot: EmptySubgraphOutput;
10435
10438
  get slots(): RegisteredSubgraphOutput[];
10436
10439
  get allSlots(): RegisteredSubgraphOutput[];
10437
- get slotAnchorX(): number;
10438
- onPointerDown(e: CanvasPointerEvent, pointer: CanvasPointer, linkConnector: RegisteredLinkConnector): void;
10440
+ protected dragNewLink(linkConnector: RegisteredLinkConnector, slot: RegisteredSubgraphOutput): void;
10439
10441
  /** @inheritdoc */
10440
10442
  renameSlot(slot: RegisteredSubgraphOutput, name: string): void;
10441
10443
  /** @inheritdoc */
@@ -10519,6 +10521,18 @@ declare interface SubscriptionDialogOptions {
10519
10521
  planMode?: 'personal' | 'team';
10520
10522
  /** Starts checkout in workspace billing dialogs; legacy billing stays table-only. */
10521
10523
  initialCheckout?: SubscriptionCheckoutSelection;
10524
+ /** The refused account holds credits, so the dialog says why they did not help. */
10525
+ creditsLocked?: boolean;
10526
+ /** Server `error.type` of the refused run, reported with the paywall opening. */
10527
+ refusalType?: string;
10528
+ /** A failed checkout is being restored: the in-app table reopens, unless the new billing UX hands every entry to the platform Plans page. */
10529
+ resumingCheckout?: boolean;
10530
+ /** A run was refused without a click, so a dialog explains why and links to the Plans page. */
10531
+ runRefused?: boolean;
10532
+ /** The refused run's free allowance was withheld because the session did not sign in with Google. */
10533
+ googleSignInRequired?: boolean;
10534
+ /** Opened on page load, so the Plans page replaces this tab. */
10535
+ sameTab?: boolean;
10522
10536
  }
10523
10537
 
10524
10538
  export declare type SystemStats = {
@@ -10704,6 +10718,8 @@ export declare interface ToastMessageOptions {
10704
10718
 
10705
10719
  export declare interface ToastOptions {
10706
10720
  action?: ToastAction;
10721
+ /** Additional actions rendered after the legacy single action. */
10722
+ actions?: ToastAction[];
10707
10723
  closable?: boolean;
10708
10724
  description?: string;
10709
10725
  duration?: number;
@@ -10951,13 +10967,16 @@ declare class UserFile {
10951
10967
  * Saves the file to the remote storage.
10952
10968
  * @param force Whether to force the save even if the file is not modified.
10953
10969
  */
10954
- save({ force }?: {
10955
- force?: boolean;
10956
- }): Promise<UserFile>;
10970
+ save({ force, overwrite }?: UserFileSaveOptions): Promise<UserFile>;
10957
10971
  delete(): Promise<void>;
10958
10972
  rename(newPath: string): Promise<UserFile>;
10959
10973
  }
10960
10974
 
10975
+ declare interface UserFileSaveOptions {
10976
+ force?: boolean;
10977
+ overwrite?: boolean;
10978
+ }
10979
+
10961
10980
  /**
10962
10981
  * Identifier for an authenticated user.
10963
10982
  *
@@ -10972,6 +10991,10 @@ declare type UUID = string;
10972
10991
  /** @deprecated Use {@link Point} instead. */
10973
10992
  declare type Vector2 = Point;
10974
10993
 
10994
+ declare interface VideoConcatValue {
10995
+ order?: string[];
10996
+ }
10997
+
10975
10998
  export declare type VideoEditFeature = 'trim' | 'crop';
10976
10999
 
10977
11000
  export declare interface VideoEditTrim {
@@ -11013,17 +11036,6 @@ declare type WhenNullish<T, Result> = (T & {}) | (T extends null ? Result : T ex
11013
11036
 
11014
11037
  declare const WIDGET_SURFACE_TIERS: readonly ["shown", "advanced", "never"];
11015
11038
 
11016
- /**
11017
- * Widget visibility as a data-oriented component (ADR-ECS-0008,
11018
- * ADR-ECS-WIDGETS-0023).
11019
- *
11020
- * Static, registration-time policy lives in {@link WidgetSurfaces}: one tier
11021
- * per rendering surface. Dynamic, runtime state lives in
11022
- * {@link WidgetSuppression}: orthogonal boolean reasons a widget is currently
11023
- * not rendered anywhere. Surfaces resolve visibility with
11024
- * {@link isWidgetVisibleOnSurface}; legacy `hidden` / `hideInPanel` /
11025
- * `advanced` / `canvasOnly` fields are facades over this component.
11026
- */
11027
11039
  declare const WIDGET_SURFACES: readonly ["canvas", "vueNode", "panel"];
11028
11040
 
11029
11041
  export declare interface WidgetCallbackOptions {
@@ -11045,6 +11057,14 @@ declare type WidgetId = string & {
11045
11057
  readonly __brand: 'WidgetId';
11046
11058
  };
11047
11059
 
11060
+ /** The space a widget asks its node for; the row it occupies never shrinks below the minimums. */
11061
+ declare interface WidgetLayoutSize {
11062
+ minHeight: number;
11063
+ maxHeight?: number;
11064
+ minWidth: number;
11065
+ maxWidth?: number;
11066
+ }
11067
+
11048
11068
  declare type Widgets = Record<string, CustomComfyWidgetConstructor>;
11049
11069
 
11050
11070
  declare interface WidgetSuppression {
@@ -11095,6 +11115,9 @@ export declare type WidgetTypeMap = {
11095
11115
 
11096
11116
  declare type WidgetValue = string | number | boolean | object | undefined | null;
11097
11117
 
11118
+ /** A value write from code rather than a pointer event may lack the event and the canvas. */
11119
+ declare type WidgetValueOptions = Pick<WidgetEventOptions, 'node'> & Partial<Pick<WidgetEventOptions, 'e' | 'canvas'>>;
11120
+
11098
11121
  declare interface WidgetVisibilityComponent {
11099
11122
  surfaces: WidgetSurfaces;
11100
11123
  suppression: WidgetSuppression;
@@ -11112,11 +11135,14 @@ declare interface WorkflowChangeTracker {
11112
11135
  undoQueue: ComfyWorkflowJSON[];
11113
11136
  redoQueue: ComfyWorkflowJSON[];
11114
11137
  changeCount: number;
11138
+ readonly hasPreview: boolean;
11115
11139
  _restoringState: boolean;
11116
11140
  ds?: {
11117
11141
  scale: number;
11118
11142
  offset: [number, number];
11119
11143
  };
11144
+ /** Whether the graph had no nodes when the view was last stored. */
11145
+ leftEmpty: boolean;
11120
11146
  nodeOutputs?: Partial<Record<string, ExecutedWsMessage['output']>>;
11121
11147
  reset(state?: ComfyWorkflowJSON): void;
11122
11148
  store(): void;
@@ -11125,6 +11151,8 @@ declare interface WorkflowChangeTracker {
11125
11151
  restore(): void;
11126
11152
  updateModified(previousState?: ComfyWorkflowJSON): void;
11127
11153
  captureCanvasState(): void;
11154
+ markModified(): void;
11155
+ beginPreview(interrupt: () => void, rollback?: () => void): () => void;
11128
11156
  checkState(): void;
11129
11157
  updateState(source: ComfyWorkflowJSON[], target: ComfyWorkflowJSON[]): Promise<void>;
11130
11158
  undo(): Promise<void>;
@@ -11149,6 +11177,9 @@ declare interface WorkflowImportMetadata {
11149
11177
  share_id?: string;
11150
11178
  }
11151
11179
 
11180
+ /** How the workflow with missing nodes came to be open: brought in by a drop, import or paste, or reopened as Comfy starts or a tab opens. */
11181
+ declare type WorkflowOpening = 'brought_in' | 'reopened';
11182
+
11152
11183
  /**
11153
11184
  * Workflow open metadata
11154
11185
  */
@@ -11161,7 +11192,10 @@ declare interface WorkflowQueueIntent {
11161
11192
  trigger_source?: ExecutionTriggerSource;
11162
11193
  }
11163
11194
 
11195
+ declare type WorkflowRenameResult = boolean | 'bookmarks-not-updated';
11196
+
11164
11197
  declare interface WorkflowStore {
11198
+ provideChangeTracker: (tracker: ChangeTrackerConstructor) => void;
11165
11199
  activeWorkflow: LoadedComfyWorkflow | null;
11166
11200
  attachWorkflow: (workflow: ComfyWorkflow, openIndex?: number) => void;
11167
11201
  isActive: (workflow: ComfyWorkflow) => boolean;
@@ -11178,10 +11212,12 @@ declare interface WorkflowStore {
11178
11212
  closeWorkflow: (workflow: ComfyWorkflow) => Promise<void>;
11179
11213
  createTemporary: (path?: string, workflowData?: ComfyWorkflowJSON) => ComfyWorkflow;
11180
11214
  createNewTemporary: (path?: string, workflowData?: ComfyWorkflowJSON) => ComfyWorkflow;
11181
- renameWorkflow: (workflow: ComfyWorkflow, newPath: string) => Promise<void>;
11182
- deleteWorkflow: (workflow: ComfyWorkflow) => Promise<void>;
11215
+ renameWorkflow: (workflow: ComfyWorkflow, newPath: string) => Promise<WorkflowRenameResult>;
11216
+ deleteWorkflow: (workflow: ComfyWorkflow) => Promise<boolean>;
11183
11217
  saveAs: (existingWorkflow: ComfyWorkflow, path: string) => ComfyWorkflow;
11184
- saveWorkflow: (workflow: ComfyWorkflow) => Promise<void>;
11218
+ saveWorkflow: (workflow: ComfyWorkflow, options?: {
11219
+ overwrite?: boolean;
11220
+ }) => Promise<void>;
11185
11221
  workflows: ComfyWorkflow[];
11186
11222
  bookmarkedWorkflows: ComfyWorkflow[];
11187
11223
  persistedWorkflows: ComfyWorkflow[];
@@ -11191,6 +11227,14 @@ declare interface WorkflowStore {
11191
11227
  isSyncLoading: boolean;
11192
11228
  loadWorkflows: () => Promise<void>;
11193
11229
  reorderWorkflows: (from: number, to: number) => void;
11230
+ /**
11231
+ * `true` once startup has finished restoring the previous session's open
11232
+ * tabs, including unsaved drafts recreated from local storage. Until then,
11233
+ * a workflow with no open tab may simply not have been restored yet.
11234
+ */
11235
+ tabsRestored: boolean;
11236
+ /** Called once startup tab restoration settles, including when startup fails first. */
11237
+ markTabsRestored: () => void;
11194
11238
  /** `true` if any subgraph is currently being viewed. */
11195
11239
  isSubgraphActive: boolean;
11196
11240
  activeSubgraph: Subgraph | undefined;
@@ -11264,6 +11308,7 @@ declare const zComfyNode: z.ZodObject<{
11264
11308
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
11265
11309
  horizontal: z.ZodOptional<z.ZodBoolean>;
11266
11310
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11311
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
11267
11312
  }, z.core.$loose>;
11268
11313
  order: z.ZodNumber;
11269
11314
  mode: z.ZodNumber;
@@ -11297,496 +11342,6 @@ declare const zComfyNode: z.ZodObject<{
11297
11342
  bgcolor: z.ZodOptional<z.ZodString>;
11298
11343
  }, z.core.$loose>;
11299
11344
 
11300
- declare const zComfyNodeDef: z.ZodObject<{
11301
- inputs: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
11302
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11303
- display_name: z.ZodOptional<z.ZodString>;
11304
- forceInput: z.ZodOptional<z.ZodBoolean>;
11305
- tooltip: z.ZodOptional<z.ZodString>;
11306
- socketless: z.ZodOptional<z.ZodBoolean>;
11307
- hidden: z.ZodOptional<z.ZodBoolean>;
11308
- advanced: z.ZodOptional<z.ZodBoolean>;
11309
- widgetType: z.ZodOptional<z.ZodString>;
11310
- rawLink: z.ZodOptional<z.ZodBoolean>;
11311
- lazy: z.ZodOptional<z.ZodBoolean>;
11312
- min: z.ZodOptional<z.ZodNumber>;
11313
- max: z.ZodOptional<z.ZodNumber>;
11314
- step: z.ZodOptional<z.ZodNumber>;
11315
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
11316
- display: z.ZodOptional<z.ZodEnum<{
11317
- number: "number";
11318
- slider: "slider";
11319
- knob: "knob";
11320
- gradientslider: "gradientslider";
11321
- color: "color";
11322
- }>>;
11323
- control_after_generate: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
11324
- fixed: "fixed";
11325
- increment: "increment";
11326
- decrement: "decrement";
11327
- randomize: "randomize";
11328
- }>]>>;
11329
- type: z.ZodLiteral<"INT">;
11330
- name: z.ZodString;
11331
- isOptional: z.ZodOptional<z.ZodBoolean>;
11332
- }, z.core.$loose>, z.ZodObject<{
11333
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11334
- display_name: z.ZodOptional<z.ZodString>;
11335
- forceInput: z.ZodOptional<z.ZodBoolean>;
11336
- tooltip: z.ZodOptional<z.ZodString>;
11337
- socketless: z.ZodOptional<z.ZodBoolean>;
11338
- hidden: z.ZodOptional<z.ZodBoolean>;
11339
- advanced: z.ZodOptional<z.ZodBoolean>;
11340
- widgetType: z.ZodOptional<z.ZodString>;
11341
- rawLink: z.ZodOptional<z.ZodBoolean>;
11342
- lazy: z.ZodOptional<z.ZodBoolean>;
11343
- min: z.ZodOptional<z.ZodNumber>;
11344
- max: z.ZodOptional<z.ZodNumber>;
11345
- step: z.ZodOptional<z.ZodNumber>;
11346
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
11347
- display: z.ZodOptional<z.ZodEnum<{
11348
- number: "number";
11349
- slider: "slider";
11350
- knob: "knob";
11351
- gradientslider: "gradientslider";
11352
- }>>;
11353
- round: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>]>>;
11354
- gradient_stops: z.ZodOptional<z.ZodArray<z.ZodObject<{
11355
- offset: z.ZodNumber;
11356
- color: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
11357
- }, z.core.$strip>>>;
11358
- type: z.ZodLiteral<"FLOAT">;
11359
- name: z.ZodString;
11360
- isOptional: z.ZodOptional<z.ZodBoolean>;
11361
- }, z.core.$loose>, z.ZodObject<{
11362
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11363
- display_name: z.ZodOptional<z.ZodString>;
11364
- forceInput: z.ZodOptional<z.ZodBoolean>;
11365
- tooltip: z.ZodOptional<z.ZodString>;
11366
- socketless: z.ZodOptional<z.ZodBoolean>;
11367
- hidden: z.ZodOptional<z.ZodBoolean>;
11368
- advanced: z.ZodOptional<z.ZodBoolean>;
11369
- widgetType: z.ZodOptional<z.ZodString>;
11370
- rawLink: z.ZodOptional<z.ZodBoolean>;
11371
- lazy: z.ZodOptional<z.ZodBoolean>;
11372
- label_on: z.ZodOptional<z.ZodString>;
11373
- label_off: z.ZodOptional<z.ZodString>;
11374
- default: z.ZodOptional<z.ZodBoolean>;
11375
- type: z.ZodLiteral<"BOOLEAN">;
11376
- name: z.ZodString;
11377
- isOptional: z.ZodOptional<z.ZodBoolean>;
11378
- }, z.core.$loose>, z.ZodObject<{
11379
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11380
- display_name: z.ZodOptional<z.ZodString>;
11381
- forceInput: z.ZodOptional<z.ZodBoolean>;
11382
- tooltip: z.ZodOptional<z.ZodString>;
11383
- socketless: z.ZodOptional<z.ZodBoolean>;
11384
- hidden: z.ZodOptional<z.ZodBoolean>;
11385
- advanced: z.ZodOptional<z.ZodBoolean>;
11386
- widgetType: z.ZodOptional<z.ZodString>;
11387
- rawLink: z.ZodOptional<z.ZodBoolean>;
11388
- lazy: z.ZodOptional<z.ZodBoolean>;
11389
- default: z.ZodOptional<z.ZodString>;
11390
- multiline: z.ZodOptional<z.ZodBoolean>;
11391
- dynamicPrompts: z.ZodOptional<z.ZodBoolean>;
11392
- defaultVal: z.ZodOptional<z.ZodString>;
11393
- placeholder: z.ZodOptional<z.ZodString>;
11394
- type: z.ZodLiteral<"STRING">;
11395
- name: z.ZodString;
11396
- isOptional: z.ZodOptional<z.ZodBoolean>;
11397
- }, z.core.$loose>, z.ZodObject<{
11398
- default: z.ZodOptional<z.ZodAny>;
11399
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11400
- display_name: z.ZodOptional<z.ZodString>;
11401
- forceInput: z.ZodOptional<z.ZodBoolean>;
11402
- tooltip: z.ZodOptional<z.ZodString>;
11403
- socketless: z.ZodOptional<z.ZodBoolean>;
11404
- hidden: z.ZodOptional<z.ZodBoolean>;
11405
- advanced: z.ZodOptional<z.ZodBoolean>;
11406
- widgetType: z.ZodOptional<z.ZodString>;
11407
- rawLink: z.ZodOptional<z.ZodBoolean>;
11408
- lazy: z.ZodOptional<z.ZodBoolean>;
11409
- control_after_generate: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
11410
- fixed: "fixed";
11411
- increment: "increment";
11412
- decrement: "decrement";
11413
- randomize: "randomize";
11414
- }>]>>;
11415
- image_upload: z.ZodOptional<z.ZodBoolean>;
11416
- image_folder: z.ZodOptional<z.ZodEnum<{
11417
- input: "input";
11418
- output: "output";
11419
- temp: "temp";
11420
- }>>;
11421
- allow_batch: z.ZodOptional<z.ZodBoolean>;
11422
- video_upload: z.ZodOptional<z.ZodBoolean>;
11423
- audio_upload: z.ZodOptional<z.ZodBoolean>;
11424
- mesh_upload: z.ZodOptional<z.ZodBoolean>;
11425
- upload_subfolder: z.ZodOptional<z.ZodString>;
11426
- animated_image_upload: z.ZodOptional<z.ZodBoolean>;
11427
- options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
11428
- remote: z.ZodOptional<z.ZodObject<{
11429
- route: z.ZodUnion<[z.ZodString, z.ZodString]>;
11430
- refresh: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNumber]>>;
11431
- response_key: z.ZodOptional<z.ZodString>;
11432
- query_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
11433
- refresh_button: z.ZodOptional<z.ZodBoolean>;
11434
- control_after_refresh: z.ZodOptional<z.ZodEnum<{
11435
- first: "first";
11436
- last: "last";
11437
- }>>;
11438
- timeout: z.ZodOptional<z.ZodNumber>;
11439
- max_retries: z.ZodOptional<z.ZodNumber>;
11440
- }, z.core.$strip>>;
11441
- multi_select: z.ZodOptional<z.ZodObject<{
11442
- placeholder: z.ZodOptional<z.ZodString>;
11443
- chip: z.ZodOptional<z.ZodBoolean>;
11444
- }, z.core.$strip>>;
11445
- type: z.ZodLiteral<"COMBO">;
11446
- name: z.ZodString;
11447
- isOptional: z.ZodOptional<z.ZodBoolean>;
11448
- }, z.core.$loose>, z.ZodObject<{
11449
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11450
- display_name: z.ZodOptional<z.ZodString>;
11451
- forceInput: z.ZodOptional<z.ZodBoolean>;
11452
- tooltip: z.ZodOptional<z.ZodString>;
11453
- socketless: z.ZodOptional<z.ZodBoolean>;
11454
- hidden: z.ZodOptional<z.ZodBoolean>;
11455
- advanced: z.ZodOptional<z.ZodBoolean>;
11456
- widgetType: z.ZodOptional<z.ZodString>;
11457
- rawLink: z.ZodOptional<z.ZodBoolean>;
11458
- lazy: z.ZodOptional<z.ZodBoolean>;
11459
- type: z.ZodLiteral<"COLOR">;
11460
- name: z.ZodString;
11461
- isOptional: z.ZodOptional<z.ZodBoolean>;
11462
- default: z.ZodOptional<z.ZodString>;
11463
- options: z.ZodOptional<z.ZodObject<{
11464
- default: z.ZodOptional<z.ZodString>;
11465
- }, z.core.$strip>>;
11466
- }, z.core.$loose>, z.ZodObject<{
11467
- default: z.ZodOptional<z.ZodAny>;
11468
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11469
- display_name: z.ZodOptional<z.ZodString>;
11470
- forceInput: z.ZodOptional<z.ZodBoolean>;
11471
- tooltip: z.ZodOptional<z.ZodString>;
11472
- socketless: z.ZodOptional<z.ZodBoolean>;
11473
- hidden: z.ZodOptional<z.ZodBoolean>;
11474
- advanced: z.ZodOptional<z.ZodBoolean>;
11475
- widgetType: z.ZodOptional<z.ZodString>;
11476
- rawLink: z.ZodOptional<z.ZodBoolean>;
11477
- lazy: z.ZodOptional<z.ZodBoolean>;
11478
- type: z.ZodLiteral<"IMAGE">;
11479
- name: z.ZodString;
11480
- isOptional: z.ZodOptional<z.ZodBoolean>;
11481
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11482
- }, z.core.$loose>, z.ZodObject<{
11483
- default: z.ZodOptional<z.ZodAny>;
11484
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11485
- display_name: z.ZodOptional<z.ZodString>;
11486
- forceInput: z.ZodOptional<z.ZodBoolean>;
11487
- tooltip: z.ZodOptional<z.ZodString>;
11488
- socketless: z.ZodOptional<z.ZodBoolean>;
11489
- hidden: z.ZodOptional<z.ZodBoolean>;
11490
- advanced: z.ZodOptional<z.ZodBoolean>;
11491
- widgetType: z.ZodOptional<z.ZodString>;
11492
- rawLink: z.ZodOptional<z.ZodBoolean>;
11493
- lazy: z.ZodOptional<z.ZodBoolean>;
11494
- type: z.ZodLiteral<"IMAGECOMPARE">;
11495
- name: z.ZodString;
11496
- isOptional: z.ZodOptional<z.ZodBoolean>;
11497
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11498
- }, z.core.$loose>, z.ZodObject<{
11499
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11500
- display_name: z.ZodOptional<z.ZodString>;
11501
- forceInput: z.ZodOptional<z.ZodBoolean>;
11502
- tooltip: z.ZodOptional<z.ZodString>;
11503
- socketless: z.ZodOptional<z.ZodBoolean>;
11504
- hidden: z.ZodOptional<z.ZodBoolean>;
11505
- advanced: z.ZodOptional<z.ZodBoolean>;
11506
- widgetType: z.ZodOptional<z.ZodString>;
11507
- rawLink: z.ZodOptional<z.ZodBoolean>;
11508
- lazy: z.ZodOptional<z.ZodBoolean>;
11509
- type: z.ZodLiteral<"BOUNDING_BOX">;
11510
- name: z.ZodString;
11511
- isOptional: z.ZodOptional<z.ZodBoolean>;
11512
- component: z.ZodOptional<z.ZodEnum<{
11513
- ImageCrop: "ImageCrop";
11514
- }>>;
11515
- default: z.ZodOptional<z.ZodObject<{
11516
- x: z.ZodNumber;
11517
- y: z.ZodNumber;
11518
- width: z.ZodNumber;
11519
- height: z.ZodNumber;
11520
- }, z.core.$strip>>;
11521
- }, z.core.$loose>, z.ZodObject<{
11522
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11523
- display_name: z.ZodOptional<z.ZodString>;
11524
- forceInput: z.ZodOptional<z.ZodBoolean>;
11525
- tooltip: z.ZodOptional<z.ZodString>;
11526
- socketless: z.ZodOptional<z.ZodBoolean>;
11527
- hidden: z.ZodOptional<z.ZodBoolean>;
11528
- advanced: z.ZodOptional<z.ZodBoolean>;
11529
- widgetType: z.ZodOptional<z.ZodString>;
11530
- rawLink: z.ZodOptional<z.ZodBoolean>;
11531
- lazy: z.ZodOptional<z.ZodBoolean>;
11532
- type: z.ZodLiteral<"MARKDOWN">;
11533
- name: z.ZodString;
11534
- isOptional: z.ZodOptional<z.ZodBoolean>;
11535
- default: z.ZodOptional<z.ZodString>;
11536
- }, z.core.$loose>, z.ZodObject<{
11537
- default: z.ZodOptional<z.ZodAny>;
11538
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11539
- display_name: z.ZodOptional<z.ZodString>;
11540
- forceInput: z.ZodOptional<z.ZodBoolean>;
11541
- tooltip: z.ZodOptional<z.ZodString>;
11542
- socketless: z.ZodOptional<z.ZodBoolean>;
11543
- hidden: z.ZodOptional<z.ZodBoolean>;
11544
- advanced: z.ZodOptional<z.ZodBoolean>;
11545
- widgetType: z.ZodOptional<z.ZodString>;
11546
- rawLink: z.ZodOptional<z.ZodBoolean>;
11547
- lazy: z.ZodOptional<z.ZodBoolean>;
11548
- type: z.ZodLiteral<"CHART">;
11549
- name: z.ZodString;
11550
- isOptional: z.ZodOptional<z.ZodBoolean>;
11551
- chartType: z.ZodOptional<z.ZodEnum<{
11552
- line: "line";
11553
- bar: "bar";
11554
- }>>;
11555
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11556
- options: z.ZodOptional<z.ZodObject<{
11557
- type: z.ZodOptional<z.ZodEnum<{
11558
- line: "line";
11559
- bar: "bar";
11560
- }>>;
11561
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11562
- }, z.core.$strip>>;
11563
- }, z.core.$loose>, z.ZodObject<{
11564
- default: z.ZodOptional<z.ZodAny>;
11565
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11566
- display_name: z.ZodOptional<z.ZodString>;
11567
- forceInput: z.ZodOptional<z.ZodBoolean>;
11568
- tooltip: z.ZodOptional<z.ZodString>;
11569
- socketless: z.ZodOptional<z.ZodBoolean>;
11570
- hidden: z.ZodOptional<z.ZodBoolean>;
11571
- advanced: z.ZodOptional<z.ZodBoolean>;
11572
- widgetType: z.ZodOptional<z.ZodString>;
11573
- rawLink: z.ZodOptional<z.ZodBoolean>;
11574
- lazy: z.ZodOptional<z.ZodBoolean>;
11575
- type: z.ZodLiteral<"GALLERIA">;
11576
- name: z.ZodString;
11577
- isOptional: z.ZodOptional<z.ZodBoolean>;
11578
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
11579
- options: z.ZodOptional<z.ZodObject<{
11580
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
11581
- }, z.core.$strip>>;
11582
- }, z.core.$loose>, z.ZodObject<{
11583
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11584
- display_name: z.ZodOptional<z.ZodString>;
11585
- forceInput: z.ZodOptional<z.ZodBoolean>;
11586
- tooltip: z.ZodOptional<z.ZodString>;
11587
- socketless: z.ZodOptional<z.ZodBoolean>;
11588
- hidden: z.ZodOptional<z.ZodBoolean>;
11589
- advanced: z.ZodOptional<z.ZodBoolean>;
11590
- widgetType: z.ZodOptional<z.ZodString>;
11591
- rawLink: z.ZodOptional<z.ZodBoolean>;
11592
- lazy: z.ZodOptional<z.ZodBoolean>;
11593
- type: z.ZodLiteral<"COLORS">;
11594
- name: z.ZodString;
11595
- isOptional: z.ZodOptional<z.ZodBoolean>;
11596
- default: z.ZodOptional<z.ZodArray<z.ZodString>>;
11597
- }, z.core.$loose>, z.ZodObject<{
11598
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11599
- display_name: z.ZodOptional<z.ZodString>;
11600
- forceInput: z.ZodOptional<z.ZodBoolean>;
11601
- tooltip: z.ZodOptional<z.ZodString>;
11602
- socketless: z.ZodOptional<z.ZodBoolean>;
11603
- hidden: z.ZodOptional<z.ZodBoolean>;
11604
- advanced: z.ZodOptional<z.ZodBoolean>;
11605
- widgetType: z.ZodOptional<z.ZodString>;
11606
- rawLink: z.ZodOptional<z.ZodBoolean>;
11607
- lazy: z.ZodOptional<z.ZodBoolean>;
11608
- type: z.ZodLiteral<"BOUNDING_BOXES">;
11609
- name: z.ZodString;
11610
- isOptional: z.ZodOptional<z.ZodBoolean>;
11611
- default: z.ZodOptional<z.ZodArray<z.ZodObject<{
11612
- x: z.ZodNumber;
11613
- y: z.ZodNumber;
11614
- width: z.ZodNumber;
11615
- height: z.ZodNumber;
11616
- metadata: z.ZodObject<{
11617
- type: z.ZodEnum<{
11618
- obj: "obj";
11619
- text: "text";
11620
- }>;
11621
- text: z.ZodString;
11622
- desc: z.ZodString;
11623
- palette: z.ZodArray<z.ZodString>;
11624
- }, z.core.$strip>;
11625
- }, z.core.$strip>>>;
11626
- }, z.core.$loose>, z.ZodObject<{
11627
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11628
- display_name: z.ZodOptional<z.ZodString>;
11629
- forceInput: z.ZodOptional<z.ZodBoolean>;
11630
- tooltip: z.ZodOptional<z.ZodString>;
11631
- socketless: z.ZodOptional<z.ZodBoolean>;
11632
- hidden: z.ZodOptional<z.ZodBoolean>;
11633
- advanced: z.ZodOptional<z.ZodBoolean>;
11634
- widgetType: z.ZodOptional<z.ZodString>;
11635
- rawLink: z.ZodOptional<z.ZodBoolean>;
11636
- lazy: z.ZodOptional<z.ZodBoolean>;
11637
- type: z.ZodLiteral<"TEXTAREA">;
11638
- name: z.ZodString;
11639
- isOptional: z.ZodOptional<z.ZodBoolean>;
11640
- rows: z.ZodOptional<z.ZodNumber>;
11641
- cols: z.ZodOptional<z.ZodNumber>;
11642
- default: z.ZodOptional<z.ZodString>;
11643
- options: z.ZodOptional<z.ZodObject<{
11644
- rows: z.ZodOptional<z.ZodNumber>;
11645
- cols: z.ZodOptional<z.ZodNumber>;
11646
- default: z.ZodOptional<z.ZodString>;
11647
- }, z.core.$strip>>;
11648
- }, z.core.$loose>, z.ZodObject<{
11649
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11650
- display_name: z.ZodOptional<z.ZodString>;
11651
- forceInput: z.ZodOptional<z.ZodBoolean>;
11652
- tooltip: z.ZodOptional<z.ZodString>;
11653
- socketless: z.ZodOptional<z.ZodBoolean>;
11654
- hidden: z.ZodOptional<z.ZodBoolean>;
11655
- advanced: z.ZodOptional<z.ZodBoolean>;
11656
- widgetType: z.ZodOptional<z.ZodString>;
11657
- rawLink: z.ZodOptional<z.ZodBoolean>;
11658
- lazy: z.ZodOptional<z.ZodBoolean>;
11659
- type: z.ZodLiteral<"CURVE">;
11660
- name: z.ZodString;
11661
- isOptional: z.ZodOptional<z.ZodBoolean>;
11662
- default: z.ZodOptional<z.ZodObject<{
11663
- points: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
11664
- interpolation: z.ZodEnum<{
11665
- linear: "linear";
11666
- monotone_cubic: "monotone_cubic";
11667
- }>;
11668
- }, z.core.$strip>>;
11669
- }, z.core.$loose>, z.ZodObject<{
11670
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11671
- display_name: z.ZodOptional<z.ZodString>;
11672
- forceInput: z.ZodOptional<z.ZodBoolean>;
11673
- tooltip: z.ZodOptional<z.ZodString>;
11674
- socketless: z.ZodOptional<z.ZodBoolean>;
11675
- hidden: z.ZodOptional<z.ZodBoolean>;
11676
- advanced: z.ZodOptional<z.ZodBoolean>;
11677
- widgetType: z.ZodOptional<z.ZodString>;
11678
- rawLink: z.ZodOptional<z.ZodBoolean>;
11679
- lazy: z.ZodOptional<z.ZodBoolean>;
11680
- type: z.ZodLiteral<"RANGE">;
11681
- name: z.ZodString;
11682
- isOptional: z.ZodOptional<z.ZodBoolean>;
11683
- default: z.ZodOptional<z.ZodObject<{
11684
- min: z.ZodNumber;
11685
- max: z.ZodNumber;
11686
- midpoint: z.ZodOptional<z.ZodNumber>;
11687
- }, z.core.$strip>>;
11688
- display: z.ZodOptional<z.ZodEnum<{
11689
- plain: "plain";
11690
- gradient: "gradient";
11691
- histogram: "histogram";
11692
- }>>;
11693
- gradient_stops: z.ZodOptional<z.ZodArray<z.ZodObject<{
11694
- offset: z.ZodNumber;
11695
- color: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
11696
- }, z.core.$strip>>>;
11697
- show_midpoint: z.ZodOptional<z.ZodBoolean>;
11698
- midpoint_scale: z.ZodOptional<z.ZodEnum<{
11699
- linear: "linear";
11700
- gamma: "gamma";
11701
- }>>;
11702
- value_min: z.ZodOptional<z.ZodNumber>;
11703
- value_max: z.ZodOptional<z.ZodNumber>;
11704
- }, z.core.$loose>, z.ZodObject<{
11705
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11706
- display_name: z.ZodOptional<z.ZodString>;
11707
- forceInput: z.ZodOptional<z.ZodBoolean>;
11708
- tooltip: z.ZodOptional<z.ZodString>;
11709
- socketless: z.ZodOptional<z.ZodBoolean>;
11710
- hidden: z.ZodOptional<z.ZodBoolean>;
11711
- advanced: z.ZodOptional<z.ZodBoolean>;
11712
- widgetType: z.ZodOptional<z.ZodString>;
11713
- rawLink: z.ZodOptional<z.ZodBoolean>;
11714
- lazy: z.ZodOptional<z.ZodBoolean>;
11715
- type: z.ZodLiteral<"VIDEO_EDIT">;
11716
- name: z.ZodString;
11717
- isOptional: z.ZodOptional<z.ZodBoolean>;
11718
- features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
11719
- trim: "trim";
11720
- crop: "crop";
11721
- }>>>;
11722
- default: z.ZodOptional<z.ZodObject<{
11723
- trim: z.ZodOptional<z.ZodObject<{
11724
- start_time: z.ZodNumber;
11725
- duration: z.ZodNumber;
11726
- }, z.core.$strip>>;
11727
- crop: z.ZodOptional<z.ZodObject<{
11728
- x: z.ZodNumber;
11729
- y: z.ZodNumber;
11730
- width: z.ZodNumber;
11731
- height: z.ZodNumber;
11732
- }, z.core.$strip>>;
11733
- }, z.core.$strip>>;
11734
- }, z.core.$loose>, z.ZodObject<{
11735
- default: z.ZodOptional<z.ZodAny>;
11736
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11737
- display_name: z.ZodOptional<z.ZodString>;
11738
- forceInput: z.ZodOptional<z.ZodBoolean>;
11739
- tooltip: z.ZodOptional<z.ZodString>;
11740
- socketless: z.ZodOptional<z.ZodBoolean>;
11741
- hidden: z.ZodOptional<z.ZodBoolean>;
11742
- advanced: z.ZodOptional<z.ZodBoolean>;
11743
- widgetType: z.ZodOptional<z.ZodString>;
11744
- rawLink: z.ZodOptional<z.ZodBoolean>;
11745
- lazy: z.ZodOptional<z.ZodBoolean>;
11746
- type: z.ZodLiteral<"RESOLUTION_PREVIEW">;
11747
- name: z.ZodString;
11748
- isOptional: z.ZodOptional<z.ZodBoolean>;
11749
- ratio_widget: z.ZodOptional<z.ZodString>;
11750
- megapixels_widget: z.ZodOptional<z.ZodString>;
11751
- multiple_widget: z.ZodOptional<z.ZodString>;
11752
- }, z.core.$loose>, z.ZodObject<{
11753
- default: z.ZodOptional<z.ZodAny>;
11754
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11755
- display_name: z.ZodOptional<z.ZodString>;
11756
- forceInput: z.ZodOptional<z.ZodBoolean>;
11757
- tooltip: z.ZodOptional<z.ZodString>;
11758
- socketless: z.ZodOptional<z.ZodBoolean>;
11759
- hidden: z.ZodOptional<z.ZodBoolean>;
11760
- advanced: z.ZodOptional<z.ZodBoolean>;
11761
- widgetType: z.ZodOptional<z.ZodString>;
11762
- rawLink: z.ZodOptional<z.ZodBoolean>;
11763
- lazy: z.ZodOptional<z.ZodBoolean>;
11764
- type: z.ZodString;
11765
- name: z.ZodString;
11766
- isOptional: z.ZodOptional<z.ZodBoolean>;
11767
- }, z.core.$loose>]>>;
11768
- outputs: z.ZodArray<z.ZodObject<{
11769
- index: z.ZodNumber;
11770
- name: z.ZodString;
11771
- type: z.ZodString;
11772
- is_list: z.ZodBoolean;
11773
- options: z.ZodOptional<z.ZodArray<z.ZodAny>>;
11774
- tooltip: z.ZodOptional<z.ZodString>;
11775
- }, z.core.$strip>>;
11776
- hidden: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11777
- name: z.ZodString;
11778
- display_name: z.ZodString;
11779
- description: z.ZodString;
11780
- help: z.ZodOptional<z.ZodString>;
11781
- category: z.ZodString;
11782
- output_node: z.ZodBoolean;
11783
- python_module: z.ZodString;
11784
- deprecated: z.ZodOptional<z.ZodBoolean>;
11785
- experimental: z.ZodOptional<z.ZodBoolean>;
11786
- dev_only: z.ZodOptional<z.ZodBoolean>;
11787
- api_node: z.ZodOptional<z.ZodBoolean>;
11788
- }, z.core.$strip>;
11789
-
11790
11345
  /** Schema version 0.4 */
11791
11346
  declare const zComfyWorkflow: z.ZodObject<{
11792
11347
  subgraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -11814,6 +11369,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11814
11369
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
11815
11370
  horizontal: z.ZodOptional<z.ZodBoolean>;
11816
11371
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11372
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
11817
11373
  }, z.core.$loose>;
11818
11374
  order: z.ZodNumber;
11819
11375
  mode: z.ZodNumber;
@@ -11866,6 +11422,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11866
11422
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
11867
11423
  horizontal: z.ZodOptional<z.ZodBoolean>;
11868
11424
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11425
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
11869
11426
  }, z.core.$loose>;
11870
11427
  order: z.ZodNumber;
11871
11428
  mode: z.ZodNumber;
@@ -12012,6 +11569,7 @@ declare const zComfyWorkflow: z.ZodObject<{
12012
11569
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12013
11570
  horizontal: z.ZodOptional<z.ZodBoolean>;
12014
11571
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11572
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12015
11573
  }, z.core.$loose>;
12016
11574
  order: z.ZodNumber;
12017
11575
  mode: z.ZodNumber;
@@ -12079,6 +11637,7 @@ declare const zComfyWorkflow: z.ZodObject<{
12079
11637
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12080
11638
  horizontal: z.ZodOptional<z.ZodBoolean>;
12081
11639
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11640
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12082
11641
  }, z.core.$loose>;
12083
11642
  order: z.ZodNumber;
12084
11643
  mode: z.ZodNumber;
@@ -12284,6 +11843,7 @@ declare const zComfyWorkflow1: z.ZodObject<{
12284
11843
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12285
11844
  horizontal: z.ZodOptional<z.ZodBoolean>;
12286
11845
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11846
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12287
11847
  }, z.core.$loose>;
12288
11848
  order: z.ZodNumber;
12289
11849
  mode: z.ZodNumber;
@@ -12353,6 +11913,7 @@ declare const zComfyWorkflow1: z.ZodObject<{
12353
11913
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12354
11914
  horizontal: z.ZodOptional<z.ZodBoolean>;
12355
11915
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11916
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12356
11917
  }, z.core.$loose>;
12357
11918
  order: z.ZodNumber;
12358
11919
  mode: z.ZodNumber;
@@ -12583,11 +12144,12 @@ declare const zGroup: z.ZodObject<{
12583
12144
  declare const zJobDetail: z.ZodObject<{
12584
12145
  id: z.ZodString;
12585
12146
  status: z.ZodEnum<{
12147
+ failed: "failed";
12586
12148
  cancelled: "cancelled";
12587
12149
  completed: "completed";
12588
- failed: "failed";
12589
12150
  pending: "pending";
12590
12151
  in_progress: "in_progress";
12152
+ held_budget: "held_budget";
12591
12153
  }>;
12592
12154
  create_time: z.ZodNumber;
12593
12155
  execution_start_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -12615,12 +12177,42 @@ declare const zJobDetail: z.ZodObject<{
12615
12177
  executed: z.ZodOptional<z.ZodArray<z.ZodString>>;
12616
12178
  exception_message: z.ZodString;
12617
12179
  exception_type: z.ZodString;
12618
- traceback: z.ZodArray<z.ZodString>;
12180
+ traceback: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
12619
12181
  current_inputs: z.ZodOptional<z.ZodUnknown>;
12620
12182
  current_outputs: z.ZodOptional<z.ZodUnknown>;
12183
+ node_errors: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodObject<{
12184
+ class_type: z.ZodCatch<z.ZodString>;
12185
+ dependent_outputs: z.ZodCatch<z.ZodArray<z.ZodString>>;
12186
+ errors: z.ZodPipe<z.ZodCatch<z.ZodArray<z.ZodUnknown>>, z.ZodTransform<(string | {
12187
+ details?: string | undefined;
12188
+ extra_info?: {
12189
+ input_name?: string | number | boolean | undefined;
12190
+ received_type?: string | number | boolean | undefined;
12191
+ received_value?: string | number | boolean | undefined;
12192
+ } | undefined;
12193
+ message?: string | undefined;
12194
+ type?: string | undefined;
12195
+ })[], unknown[]>>;
12196
+ }, z.core.$strip>>>>>;
12621
12197
  }, z.core.$loose>>>;
12622
12198
  workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12623
12199
  priority: z.ZodOptional<z.ZodNumber>;
12200
+ budget_hold: z.ZodOptional<z.ZodObject<{
12201
+ budget: z.ZodOptional<z.ZodObject<{
12202
+ id: z.ZodOptional<z.ZodString>;
12203
+ limit_credits: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12204
+ limit_micro_usd: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12205
+ mode: z.ZodOptional<z.ZodString>;
12206
+ resets_at: z.ZodISODateTime;
12207
+ scope_id: z.ZodOptional<z.ZodString>;
12208
+ scope_kind: z.ZodString;
12209
+ set_by: z.ZodString;
12210
+ spent_credits: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12211
+ spent_micro_usd: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12212
+ }, z.core.$strip>>;
12213
+ can_resume: z.ZodBoolean;
12214
+ reason: z.ZodString;
12215
+ }, z.core.$strip>>;
12624
12216
  workflow: z.ZodOptional<z.ZodUnknown>;
12625
12217
  outputs: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodObject<{
12626
12218
  audio: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -12707,11 +12299,6 @@ declare const zModelFile: z.ZodObject<{
12707
12299
  directory: z.ZodString;
12708
12300
  }, z.core.$strip>;
12709
12301
 
12710
- declare const zModelFile_2: z.ZodObject<{
12711
- name: z.ZodString;
12712
- pathIndex: z.ZodNumber;
12713
- }, z.core.$strip>;
12714
-
12715
12302
  declare const zNodeId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
12716
12303
 
12717
12304
  declare const zOutputs: z.ZodObject<{
@@ -12761,11 +12348,12 @@ declare const zOutputs: z.ZodObject<{
12761
12348
  declare const zRawJobListItem: z.ZodObject<{
12762
12349
  id: z.ZodString;
12763
12350
  status: z.ZodEnum<{
12351
+ failed: "failed";
12764
12352
  cancelled: "cancelled";
12765
12353
  completed: "completed";
12766
- failed: "failed";
12767
12354
  pending: "pending";
12768
12355
  in_progress: "in_progress";
12356
+ held_budget: "held_budget";
12769
12357
  }>;
12770
12358
  create_time: z.ZodNumber;
12771
12359
  execution_start_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -12793,12 +12381,42 @@ declare const zRawJobListItem: z.ZodObject<{
12793
12381
  executed: z.ZodOptional<z.ZodArray<z.ZodString>>;
12794
12382
  exception_message: z.ZodString;
12795
12383
  exception_type: z.ZodString;
12796
- traceback: z.ZodArray<z.ZodString>;
12384
+ traceback: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
12797
12385
  current_inputs: z.ZodOptional<z.ZodUnknown>;
12798
12386
  current_outputs: z.ZodOptional<z.ZodUnknown>;
12387
+ node_errors: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodObject<{
12388
+ class_type: z.ZodCatch<z.ZodString>;
12389
+ dependent_outputs: z.ZodCatch<z.ZodArray<z.ZodString>>;
12390
+ errors: z.ZodPipe<z.ZodCatch<z.ZodArray<z.ZodUnknown>>, z.ZodTransform<(string | {
12391
+ details?: string | undefined;
12392
+ extra_info?: {
12393
+ input_name?: string | number | boolean | undefined;
12394
+ received_type?: string | number | boolean | undefined;
12395
+ received_value?: string | number | boolean | undefined;
12396
+ } | undefined;
12397
+ message?: string | undefined;
12398
+ type?: string | undefined;
12399
+ })[], unknown[]>>;
12400
+ }, z.core.$strip>>>>>;
12799
12401
  }, z.core.$loose>>>;
12800
12402
  workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12801
12403
  priority: z.ZodOptional<z.ZodNumber>;
12404
+ budget_hold: z.ZodOptional<z.ZodObject<{
12405
+ budget: z.ZodOptional<z.ZodObject<{
12406
+ id: z.ZodOptional<z.ZodString>;
12407
+ limit_credits: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12408
+ limit_micro_usd: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12409
+ mode: z.ZodOptional<z.ZodString>;
12410
+ resets_at: z.ZodISODateTime;
12411
+ scope_id: z.ZodOptional<z.ZodString>;
12412
+ scope_kind: z.ZodString;
12413
+ set_by: z.ZodString;
12414
+ spent_credits: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12415
+ spent_micro_usd: z.ZodOptional<z.ZodCoercedBigInt<unknown>>;
12416
+ }, z.core.$strip>>;
12417
+ can_resume: z.ZodBoolean;
12418
+ reason: z.ZodString;
12419
+ }, z.core.$strip>>;
12802
12420
  }, z.core.$loose>;
12803
12421
 
12804
12422
  declare const zReroute: z.ZodObject<{
@@ -12855,11 +12473,11 @@ declare const zTaskResponse: z.ZodObject<{
12855
12473
  task_name: z.ZodString;
12856
12474
  update_time: z.ZodISODateTime;
12857
12475
  status: z.ZodUnion<readonly [z.ZodEnum<{
12858
- created: "created";
12476
+ cancelled: "cancelled";
12859
12477
  running: "running";
12478
+ created: "created";
12860
12479
  completed: "completed";
12861
12480
  failed: "failed";
12862
- cancelled: "cancelled";
12863
12481
  }>, z.ZodLiteral<"cancelled">]>;
12864
12482
  }, z.core.$strip>;
12865
12483
 
@@ -12876,9 +12494,9 @@ export { }
12876
12494
 
12877
12495
  declare global {
12878
12496
  interface Window {
12879
- /** For use by extensions and in the browser console. Where possible, import `app` from '@/scripts/app' instead. */
12497
+ /** For use by extensions and in the browser console. First-party code calls `useApp()` from '@/scripts/appInstance' instead. */
12880
12498
  app?: ComfyApp;
12881
- /** For use by extensions and in the browser console. Where possible, import `app` and access via `app.graph` instead. */
12499
+ /** For use by extensions and in the browser console. First-party code reads `useApp().rootGraph` instead. */
12882
12500
  graph?: unknown;
12883
12501
  LiteGraph?: LiteGraphGlobal;
12884
12502
  LGraph?: typeof LGraph;
@@ -12897,6 +12515,10 @@ declare global {
12897
12515
  __comfyDesktop2Remote?: boolean;
12898
12516
  __comfyDesktop2?: ComfyDesktop2Bridge & {
12899
12517
  Auth?: DesktopHostAuthBridge;
12518
+ getInstallId?: () => string;
12519
+ listModelDownloads?: () => Promise<ComfyDownloadProgress[]>;
12520
+ /** Desktop flashes the taskbar or bounces the dock while this is `true` and its window is unfocused. Absent on Desktop builds predating it. */
12521
+ setAttentionNeeded?: (needed: boolean) => void;
12900
12522
  };
12901
12523
  }
12902
12524
  }
@@ -12955,6 +12577,8 @@ declare module 'axios' {
12955
12577
  // Exempts a deliberately Firebase-authed request (acceptInvite) from the
12956
12578
  // unified re-mint.
12957
12579
  __skipUnifiedRemint?: boolean
12580
+ /** Sends once, skipping the shared 429/502/503/504 retry. */
12581
+ __skipStatusRetry?: boolean
12958
12582
  }
12959
12583
  }
12960
12584