@comfyorg/comfyui-frontend-types 1.60.0 → 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 +678 -1098
  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
@@ -1153,12 +1153,15 @@ export declare class ComfyApi extends EventTarget {
1153
1153
  Running: JobListItem[];
1154
1154
  Pending: JobListItem[];
1155
1155
  }>;
1156
+ /** Gets the jobs a hard budget cap holds; rejects when the read fails. */
1157
+ getHeldJobs(): Promise<JobListItem[]>;
1156
1158
  /**
1157
1159
  * Gets the prompt execution history
1158
1160
  * @returns Prompt history including node outputs
1159
1161
  */
1160
1162
  getHistory(max_items?: number, options?: {
1161
1163
  offset?: number;
1164
+ throwOnError?: boolean;
1162
1165
  }): Promise<JobListItem[]>;
1163
1166
  /**
1164
1167
  * Gets detailed job info including outputs and workflow
@@ -1179,23 +1182,13 @@ export declare class ComfyApi extends EventTarget {
1179
1182
  * @returns System stats such as python version, OS, per device info
1180
1183
  */
1181
1184
  getSystemStats(): Promise<SystemStats>;
1182
- /**
1183
- * Sends a POST request to the API
1184
- * @param {*} type The endpoint to post to
1185
- * @param {*} body Optional POST data
1186
- */
1187
1185
  private _postItem;
1188
- /**
1189
- * Deletes an item from the specified list
1190
- * @param {string} type The type of item to delete, queue or history
1191
- * @param {number} id The id of the item to delete
1192
- */
1193
- deleteItem(type: string, id: string): Promise<void>;
1186
+ deleteItem(type: string, id: string): Promise<boolean>;
1194
1187
  /**
1195
1188
  * Clears the specified list
1196
1189
  * @param {string} type The type of list to clear, queue or history
1197
1190
  */
1198
- clearItems(type: string): Promise<void>;
1191
+ clearItems(type: string): Promise<boolean>;
1199
1192
  /**
1200
1193
  * Interrupts the execution of the running job. If runningJobId is provided,
1201
1194
  * it is included in the payload as a helpful hint to the backend.
@@ -1208,16 +1201,23 @@ export declare class ComfyApi extends EventTarget {
1208
1201
  * runtime exposes this endpoint yet; do not merge callers before parity lands.
1209
1202
  *
1210
1203
  * @param {string} jobId The id of the job to cancel
1204
+ * @returns The validated response, or `undefined` when the body is not one
1211
1205
  */
1212
- cancelJob(jobId: string): Promise<void>;
1206
+ cancelJob(jobId: string): Promise<JobCancelResponse | undefined>;
1213
1207
  /**
1214
1208
  * Cancels multiple jobs in a single request via `POST /api/jobs/cancel` with
1215
1209
  * body `{ job_ids: [...] }`. Already-terminal jobs are no-ops. Same runtime
1216
1210
  * parity requirement as {@link cancelJob}.
1217
1211
  *
1218
1212
  * @param {string[]} jobIds The ids of the jobs to cancel
1213
+ * @returns The validated response, or `undefined` when the body is not one
1214
+ */
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
1219
  */
1220
- cancelJobs(jobIds: string[]): Promise<void>;
1220
+ resumeHeldJobs(jobIds?: string[]): Promise<HeldJobsResumeOutcome>;
1221
1221
  /**
1222
1222
  * Gets user configuration data and where data should be stored
1223
1223
  */
@@ -1232,7 +1232,7 @@ export declare class ComfyApi extends EventTarget {
1232
1232
  * Gets all setting values for the current user
1233
1233
  * @returns { Promise<string, unknown> } A dictionary of id -> value
1234
1234
  */
1235
- getSettings(): Promise<Settings>;
1235
+ getSettings(options?: Pick<FetchApiOptions, 'skipStatusRetry'>): Promise<Settings>;
1236
1236
  /**
1237
1237
  * Gets a setting for the current user
1238
1238
  * @param { string } id The id of the setting to fetch
@@ -1263,6 +1263,7 @@ export declare class ComfyApi extends EventTarget {
1263
1263
  stringify?: boolean;
1264
1264
  throwOnError?: boolean;
1265
1265
  full_info?: boolean;
1266
+ reportConflict?: boolean;
1266
1267
  }): Promise<Response>;
1267
1268
  /**
1268
1269
  * Deletes a user data file for the current user
@@ -1283,7 +1284,9 @@ export declare class ComfyApi extends EventTarget {
1283
1284
  getLogs(): Promise<string>;
1284
1285
  getRawLogs(): Promise<LogsRawResponse>;
1285
1286
  subscribeLogs(enabled: boolean): Promise<void>;
1286
- getFolderPaths(): Promise<Record<string, string[]>>;
1287
+ getFolderPaths({ signal }?: {
1288
+ signal?: AbortSignal;
1289
+ }): Promise<Record<string, string[]>>;
1287
1290
  freeMemory(options: {
1288
1291
  freeExecutionCache: boolean;
1289
1292
  }): Promise<void>;
@@ -1313,6 +1316,16 @@ export declare class ComfyApi extends EventTarget {
1313
1316
  getServerFeatures(): Record<string, unknown>;
1314
1317
  }
1315
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
+
1316
1329
  declare type ComfyApiWorkflow = z.infer<typeof zComfyApiWorkflow>;
1317
1330
 
1318
1331
  export declare interface ComfyApp {
@@ -1380,6 +1393,12 @@ export declare interface ComfyApp {
1380
1393
  }[];
1381
1394
  }): void;
1382
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>;
1383
1402
  refreshMissingModels(options?: {
1384
1403
  silent?: boolean;
1385
1404
  reloadDefs?: boolean;
@@ -1394,21 +1413,23 @@ export declare interface ComfyApp {
1394
1413
  handleFile(file: File, openSource?: WorkflowOpenSource, options?: {
1395
1414
  deferWarnings?: boolean;
1396
1415
  onNodeCreated?: (node: LGraphNode) => void;
1397
- }): Promise<void>;
1416
+ initiator?: 'user';
1417
+ }): Promise<void | false>;
1398
1418
  handleFileList(fileList: File[]): Promise<void>;
1399
1419
  handleAudioFileList(fileList: File[]): Promise<void>;
1400
1420
  handleVideoFileList(fileList: File[]): Promise<void>;
1401
1421
  positionNodes(nodes: LGraphNode[]): void;
1402
1422
  positionBatchNodes(nodes: LGraphNode[], batchNode: LGraphNode): void;
1403
1423
  isApiJson(data: unknown): data is ComfyApiWorkflow;
1404
- loadApiJson(apiData: ComfyApiWorkflow, fileName: string, options?: {
1424
+ loadApiJson(apiData: ComfyApiWorkflow, fileName?: string, options?: {
1405
1425
  deferWarnings?: boolean;
1406
- }): Promise<void>;
1426
+ initiator?: 'user';
1427
+ }): Promise<void | false>;
1407
1428
  registerExtension(extension: ComfyExtension): void;
1408
1429
  collectCanvasMenuItems(canvas: LGraphCanvas): IContextMenuValue[];
1409
1430
  collectNodeMenuItems(node: LGraphNode): IContextMenuValue[];
1410
1431
  reloadNodeDefs(defs?: Record<string, ComfyNodeDef>): Promise<boolean>;
1411
- refreshComboInNodes(): Promise<void>;
1432
+ refreshComboInNodes(): Promise<boolean>;
1412
1433
  clean(): void;
1413
1434
  clientPosToCanvasPos(pos: Vector2): Vector2;
1414
1435
  canvasPosToClientPos(pos: Vector2): Vector2;
@@ -1477,7 +1498,7 @@ declare type ComfyButtonProps = {
1477
1498
 
1478
1499
  declare interface ComfyCommand {
1479
1500
  id: string;
1480
- function: (metadata?: Record<string, unknown>) => void | Promise<void>;
1501
+ function: (metadata?: Record<string, unknown>) => unknown;
1481
1502
  label?: string | (() => string);
1482
1503
  icon?: string | (() => string);
1483
1504
  tooltip?: string | (() => string);
@@ -1507,6 +1528,8 @@ declare class ComfyDialog<T extends HTMLElement = HTMLElement> extends EventTarg
1507
1528
  show(html: string | HTMLElement | HTMLElement[]): void;
1508
1529
  }
1509
1530
 
1531
+ export { ComfyDownloadProgress }
1532
+
1510
1533
  export declare interface ComfyExtension {
1511
1534
  /**
1512
1535
  * The name of the extension
@@ -1628,14 +1651,16 @@ export declare interface ComfyExtension {
1628
1651
  * @param graphData The graph data
1629
1652
  * @param missingNodeTypes The missing node types
1630
1653
  * @param app The app instance
1654
+ * @param context The graph being configured, which may not be `app.rootGraph`
1631
1655
  */
1632
- beforeConfigureGraph?(graphData: ComfyWorkflowJSON, missingNodeTypes: MissingNodeType[], app: ComfyApp): Promise<void> | void;
1656
+ beforeConfigureGraph?(graphData: ComfyWorkflowJSON, missingNodeTypes: MissingNodeType[], app: ComfyApp, context: GraphConfigureContext): Promise<void> | void;
1633
1657
  /**
1634
1658
  * Allows the extension to run code after the graph is configured.
1635
1659
  * @param missingNodeTypes The missing node types
1636
1660
  * @param app The app instance
1661
+ * @param context The graph that was configured, which may not be `app.rootGraph`
1637
1662
  */
1638
- afterConfigureGraph?(missingNodeTypes: MissingNodeType[], app: ComfyApp): Promise<void> | void;
1663
+ afterConfigureGraph?(missingNodeTypes: MissingNodeType[], app: ComfyApp, context: GraphConfigureContext): Promise<void> | void;
1639
1664
  /**
1640
1665
  * Fired whenever authentication resolves, providing the anonymized user id..
1641
1666
  * Extensions can register at any time and will receive the latest value immediately.
@@ -1664,7 +1689,7 @@ declare class ComfyList {
1664
1689
  private _reverse;
1665
1690
  element: HTMLDivElement;
1666
1691
  button?: HTMLButtonElement;
1667
- constructor(app: LegacyUIApp, host: LegacyMenuHost, text: string, type?: string, reverse?: boolean);
1692
+ constructor(app: LegacyQueueApp, host: LegacyQueueHost, text: string, type?: string, reverse?: boolean);
1668
1693
  get visible(): boolean;
1669
1694
  load(): Promise<void>;
1670
1695
  update(): Promise<void>;
@@ -1675,8 +1700,6 @@ declare class ComfyList {
1675
1700
 
1676
1701
  export { ComfyNodeDef }
1677
1702
 
1678
- declare type ComfyNodeDef_2 = z.infer<typeof zComfyNodeDef>;
1679
-
1680
1703
  declare class ComfyPopup extends EventTarget {
1681
1704
  element: HTMLElement;
1682
1705
  open: boolean;
@@ -1793,6 +1816,7 @@ declare type ComfyWidgetConstructor = (node: LGraphNode, inputName: string, inpu
1793
1816
  };
1794
1817
 
1795
1818
  declare class ComfyWorkflow extends UserFile {
1819
+ [ownedGraph]: Raw<LGraph> | null;
1796
1820
  static readonly basePath: string;
1797
1821
  readonly tintCanvasBg?: string;
1798
1822
  /** Unique, stable identity for this workflow instance in the current session. */
@@ -1801,6 +1825,7 @@ declare class ComfyWorkflow extends UserFile {
1801
1825
  * The change tracker for the workflow. Non-reactive raw object.
1802
1826
  */
1803
1827
  changeTracker: WorkflowChangeTracker | null;
1828
+ get graph(): Raw<LGraph> | null;
1804
1829
  /**
1805
1830
  * Whether the workflow has been modified comparing to the initial state.
1806
1831
  */
@@ -1849,8 +1874,12 @@ declare class ComfyWorkflow extends UserFile {
1849
1874
  load({ force }?: {
1850
1875
  force?: boolean;
1851
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;
1852
1881
  unload(): void;
1853
- save(): Promise<UserFile>;
1882
+ save({ overwrite }?: Pick<UserFileSaveOptions, 'overwrite'>): Promise<UserFile>;
1854
1883
  /**
1855
1884
  * Save the workflow as a new file.
1856
1885
  * @param path The path to save the workflow to. Note: with 'workflows/' prefix.
@@ -1903,7 +1932,6 @@ export declare interface CommandManager {
1903
1932
  }): void;
1904
1933
  }
1905
1934
 
1906
- /** Resize handle positions (compass points) */
1907
1935
  declare type CompassCorners = 'NE' | 'SE' | 'SW' | 'NW';
1908
1936
 
1909
1937
  /** Keys (names) of API events that pass a {@link CustomEvent} `detail` object. */
@@ -2425,34 +2453,6 @@ declare interface components {
2425
2453
  pathItems: never;
2426
2454
  }
2427
2455
 
2428
- declare interface CompositorBackgroundEntry {
2429
- color: string;
2430
- opacity: number;
2431
- visible: boolean;
2432
- }
2433
-
2434
- declare interface CompositorLayerEntry {
2435
- name: string;
2436
- visible: boolean;
2437
- opacity: number;
2438
- blend: BlendFn;
2439
- transform: Transform;
2440
- flipH: boolean;
2441
- flipV: boolean;
2442
- }
2443
-
2444
- declare interface CompositorLayerState {
2445
- version?: typeof LAYER_STATE_VERSION;
2446
- canvas?: {
2447
- w: number;
2448
- h: number;
2449
- };
2450
- inputs?: string[];
2451
- background?: CompositorBackgroundEntry;
2452
- order?: number[];
2453
- layers: Array<CompositorLayerEntry | null>;
2454
- }
2455
-
2456
2456
  /**
2457
2457
  * Widget for the ImageCompositor node preview and editor launcher.
2458
2458
  * This is a widget that only has a Vue widgets implementation.
@@ -2547,6 +2547,9 @@ export declare class ContextMenu<TValue = unknown> {
2547
2547
  root: ContextMenuDivElement<TValue>;
2548
2548
  current_submenu?: ContextMenu<TValue>;
2549
2549
  lock?: boolean;
2550
+ private opensLeft;
2551
+ private submenuEntry?;
2552
+ private hoverTimer?;
2550
2553
  controller: AbortController;
2551
2554
  /**
2552
2555
  * @todo Interface for values requires functionality change - currently accepts
@@ -2661,7 +2664,7 @@ declare function createUuidv4(): UUID;
2661
2664
  declare const CURVE_INTERPOLATIONS: readonly ["monotone_cubic", "linear"];
2662
2665
 
2663
2666
  declare interface CurveData {
2664
- points: CurvePoint[];
2667
+ points: Point[];
2665
2668
  interpolation: CurveInterpolation;
2666
2669
  }
2667
2670
 
@@ -2684,8 +2687,6 @@ declare class CurveEditor {
2684
2687
 
2685
2688
  declare type CurveInterpolation = (typeof CURVE_INTERPOLATIONS)[number];
2686
2689
 
2687
- declare type CurvePoint = [x: number, y: number];
2688
-
2689
2690
  declare class CurveWidget extends BaseWidget<ICurveWidget> implements ICurveWidget {
2690
2691
  drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
2691
2692
  onClick(_options: WidgetEventOptions): void;
@@ -2778,8 +2779,32 @@ declare interface DeselectAllOptions {
2778
2779
  notify?: boolean;
2779
2780
  }
2780
2781
 
2781
- /** `switchWorkspace` is absent on Desktop builds before Comfy-Desktop #1671. */
2782
- export declare type DesktopHostAuthBridge = Omit<ComfyDesktop2AuthBridge, 'switchWorkspace'> & Partial<Pick<ComfyDesktop2AuthBridge, 'switchWorkspace'>>;
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';
2803
+ };
2804
+
2805
+ declare type DesktopHostBillingIntent = 'top-up' | 'subscription';
2806
+
2807
+ declare type DesktopHostBillingReceiver = 'billing_web' | 'platform';
2783
2808
 
2784
2809
  export declare type DeviceStats = Required<SystemStatsResponse['devices'][number]> & {
2785
2810
  index: number;
@@ -2795,6 +2820,8 @@ declare interface DialogComponentProps {
2795
2820
  * sections, so the dialog frame adds no padding around them.
2796
2821
  */
2797
2822
  flush?: boolean;
2823
+ /** Keeps the top where the dialog opened, so a taller state grows downward. */
2824
+ growsDown?: boolean;
2798
2825
  /** The component renders the whole panel: its surface, size and close button. */
2799
2826
  headless?: boolean;
2800
2827
  maximizable?: boolean;
@@ -2816,22 +2843,6 @@ declare interface DialogComponentProps {
2816
2843
  size?: DialogContentSize;
2817
2844
  }
2818
2845
 
2819
- declare type DialogContentSize = NonNullable<DialogContentVariants['size']>;
2820
-
2821
- declare type DialogContentVariants = VariantProps<typeof dialogContentVariants>;
2822
-
2823
- declare const dialogContentVariants: (props?: ({
2824
- surface?: "card" | "none" | undefined;
2825
- size?: "full" | "sm" | "md" | "lg" | "xl" | "fit" | undefined;
2826
- maximized?: boolean | undefined;
2827
- } & ({
2828
- class?: ClassValue;
2829
- className?: never;
2830
- } | {
2831
- class?: never;
2832
- className?: ClassValue;
2833
- })) | undefined) => string;
2834
-
2835
2846
  declare interface DialogInstance {
2836
2847
  key: string;
2837
2848
  visible: boolean;
@@ -2850,8 +2861,6 @@ declare type Dictionary<T> = {
2850
2861
  [key: string]: T;
2851
2862
  };
2852
2863
 
2853
- declare type Direction = 'top' | 'bottom' | 'left' | 'right';
2854
-
2855
2864
  /**
2856
2865
  * Calculates the distance between two points (2D vector)
2857
2866
  * @param a Point a as `x, y`
@@ -2874,6 +2883,7 @@ export declare interface DOMWidget<T extends HTMLElement, V extends object | str
2874
2883
  }
2875
2884
 
2876
2885
  export declare interface DOMWidgetOptions<V extends object | string> extends IWidgetOptions {
2886
+ vueNodeRenderer?: 'dom' | 'native';
2877
2887
  /**
2878
2888
  * Whether to render a placeholder rectangle when zoomed out.
2879
2889
  */
@@ -2909,8 +2919,8 @@ export declare class DragAndScale {
2909
2919
  *
2910
2920
  * Implemented as a POCO that can be proxied without side-effects.
2911
2921
  */
2912
- state: DragAndScaleState;
2913
- lastState: DragAndScaleState;
2922
+ state: PanZoom;
2923
+ lastState: PanZoom;
2914
2924
  /** Maximum scale (zoom in) */
2915
2925
  max_scale: number;
2916
2926
  /** Minimum scale (zoom out) */
@@ -2922,6 +2932,7 @@ export declare class DragAndScale {
2922
2932
  dragging?: boolean;
2923
2933
  viewport?: Rect;
2924
2934
  private viewportSize?;
2935
+ private transition?;
2925
2936
  onredraw?(das: DragAndScale): void;
2926
2937
  onChanged?(scale: number, offset: Point): void;
2927
2938
  get offset(): [number, number];
@@ -2954,23 +2965,18 @@ export declare class DragAndScale {
2954
2965
  viewport?: ReadOnlyRect;
2955
2966
  }): void;
2956
2967
  /**
2957
- * 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.
2958
2969
  * @param bounds The bounds to animate the view to, defined by a rectangle.
2959
2970
  */
2960
- 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;
2961
2977
  reset(): void;
2962
2978
  }
2963
2979
 
2964
- declare interface DragAndScaleState {
2965
- /**
2966
- * The offset from the top-left of the current canvas viewport to `[0, 0]` in graph space.
2967
- * Or said another way, the inverse offset of the viewport.
2968
- */
2969
- offset: [number, number];
2970
- /** The scale of the graph. */
2971
- scale: number;
2972
- }
2973
-
2974
2980
  declare interface DrawSlotsOptions {
2975
2981
  fromSlot?: INodeInputSlot | INodeOutputSlot;
2976
2982
  colorContext: DefaultConnectionColors;
@@ -3068,10 +3074,12 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3068
3074
  applyToGraph?(...args: Parameters<NonNullable<RegisteredLGraphNode['applyToGraph']>>): ReturnType<NonNullable<RegisteredLGraphNode['applyToGraph']>>;
3069
3075
  /** The graph that this node is a part of. */
3070
3076
  readonly graph: RegisteredLGraph | RegisteredSubgraph;
3077
+ /** Own inputs, then ones owned via the subgraph node (`ownerSlot`). */
3071
3078
  inputs: {
3072
3079
  linkId: LinkId | null;
3073
3080
  name: string;
3074
3081
  type: ISlotType;
3082
+ ownerSlot?: number;
3075
3083
  }[];
3076
3084
  /** Backing field for {@link id}. */
3077
3085
  private _id;
@@ -3102,6 +3110,9 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3102
3110
  nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
3103
3111
  /** The actual subgraph instance that contains this node, otherwise undefined. */
3104
3112
  subgraphNode?: RegisteredSubgraphNode | undefined);
3113
+ private _subgraphNodeDto;
3114
+ private _ownedInputs;
3115
+ private _hostWidgetInput;
3105
3116
  /** Returns either the DTO itself, or the DTOs of the inner nodes of the subgraph. */
3106
3117
  getInnerNodes(): ExecutableLGraphNode[];
3107
3118
  /**
@@ -3113,6 +3124,7 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3113
3124
  * @returns The node and the origin ID / slot index of the output.
3114
3125
  */
3115
3126
  resolveInput(slot: number, visited?: Set<string>, type?: ISlotType): ResolvedInput | undefined;
3127
+ private _resolveHostInput;
3116
3128
  /**
3117
3129
  * Determines whether this output is a valid endpoint for a link (non-virtual, non-bypass).
3118
3130
  * @param slot The slot index of the output.
@@ -3136,6 +3148,7 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3136
3148
  * @returns A DTO for the node, and the origin ID / slot index of the output.
3137
3149
  */
3138
3150
  private _resolveSubgraphOutput;
3151
+ private resolvePassThroughOutput;
3139
3152
  }
3140
3153
 
3141
3154
  declare interface ExecutedWsMessage extends ExecutingWsMessage {
@@ -3145,7 +3158,7 @@ declare interface ExecutedWsMessage extends ExecutingWsMessage {
3145
3158
  merge?: boolean;
3146
3159
  }
3147
3160
 
3148
- declare interface ExecutingWsMessage {
3161
+ declare interface ExecutingWsMessage extends StampedWorkflowId {
3149
3162
  node: NodeId_2 | null;
3150
3163
  display_node?: NodeId_2;
3151
3164
  prompt_id: JobId;
@@ -3165,6 +3178,7 @@ declare interface ExecutionErrorDialogInput {
3165
3178
  node_id?: string | number | null;
3166
3179
  node_type?: string | null;
3167
3180
  traceback?: string[] | null;
3181
+ node_errors?: unknown;
3168
3182
  }
3169
3183
 
3170
3184
  declare interface ExecutionErrorWsMessage extends ExecutionWsMessageBase {
@@ -3173,9 +3187,11 @@ declare interface ExecutionErrorWsMessage extends ExecutionWsMessageBase {
3173
3187
  executed: NodeId_2[];
3174
3188
  exception_message: string;
3175
3189
  exception_type: string;
3176
- traceback: string[];
3190
+ /** Cloud can send `null` (or omit it) when no traceback was captured. */
3191
+ traceback?: string[] | null;
3177
3192
  current_inputs?: unknown;
3178
3193
  current_outputs?: unknown;
3194
+ node_errors?: ExecutionError['node_errors'];
3179
3195
  }
3180
3196
 
3181
3197
  export declare type ExecutionId = string;
@@ -3194,7 +3210,7 @@ declare type ExecutionTriggerSource = (typeof executionTriggerSources)[number];
3194
3210
 
3195
3211
  declare const executionTriggerSources: readonly ["button", "keybinding", "legacy_ui", "unknown", "linear", "auto_queue"];
3196
3212
 
3197
- declare interface ExecutionWsMessageBase {
3213
+ declare interface ExecutionWsMessageBase extends StampedWorkflowId {
3198
3214
  prompt_id: JobId;
3199
3215
  timestamp: number;
3200
3216
  }
@@ -3245,11 +3261,6 @@ declare interface ExposedWidget {
3245
3261
  name: string;
3246
3262
  }
3247
3263
 
3248
- /**
3249
- * Dialog surface exposed to extensions via `app.extensionManager.dialog`.
3250
- * Feature dialogs live in their own composables; `createExtensionDialogService`
3251
- * assembles them so this module never imports the features it fronts.
3252
- */
3253
3264
  declare interface ExtensionDialogService extends CoreDialogService {
3254
3265
  showApiNodesSignInDialog(apiNodeNames: string[]): Promise<boolean>;
3255
3266
  showSignInDialog(): Promise<boolean>;
@@ -3338,6 +3349,8 @@ declare interface FetchApiOptions extends RequestInit {
3338
3349
  onAuthScheme?: (scheme: AuthScheme) => void;
3339
3350
  /** Reports the kind of credential sent, to tell a missing token from a wrong one. */
3340
3351
  onAuthCredential?: (credential: AuthCredential) => void;
3352
+ /** Send once, for callers that already retry on their own backoff. */
3353
+ skipStatusRetry?: boolean;
3341
3354
  }
3342
3355
 
3343
3356
  /**
@@ -3416,6 +3429,14 @@ declare interface FormItem {
3416
3429
  options?: Array<string | SettingOption> | ((value: unknown) => Array<string | SettingOption>);
3417
3430
  }
3418
3431
 
3432
+ declare type FreeMemoryResult = {
3433
+ ok: true;
3434
+ freedExecutionCache: boolean;
3435
+ } | {
3436
+ ok: false;
3437
+ reason: 'rejected' | 'unreachable';
3438
+ };
3439
+
3419
3440
  /** Dictionary of Frontend-generated API calls */
3420
3441
  declare interface FrontendApiCalls {
3421
3442
  graphChanged: ComfyWorkflowJSON;
@@ -3442,6 +3463,7 @@ declare interface FrontendApiCalls {
3442
3463
  graphCleared: never;
3443
3464
  reconnecting: never;
3444
3465
  reconnected: never;
3466
+ revokedSocketEnded: never;
3445
3467
  }
3446
3468
 
3447
3469
  /**
@@ -3478,6 +3500,9 @@ declare class GradientSliderWidget extends BaseWidget<IGradientSliderWidget> imp
3478
3500
  onDrag(options: WidgetEventOptions): false | undefined;
3479
3501
  }
3480
3502
 
3503
+ /** The current `version` of serialised graph and subgraph documents. */
3504
+ declare const GRAPH_SCHEMA_VERSION = 1;
3505
+
3481
3506
  /** Options for {@link LGraph.add} method. */
3482
3507
  declare interface GraphAddOptions {
3483
3508
  /** If true, skip recomputing execution order after adding the node. */
@@ -3488,6 +3513,14 @@ declare interface GraphAddOptions {
3488
3513
  dragEvent?: MouseEvent;
3489
3514
  }
3490
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
+
3491
3524
  /** Internal; simplifies type definitions. */
3492
3525
  declare type GraphOrSubgraph = LGraph | Subgraph;
3493
3526
 
@@ -3504,31 +3537,37 @@ declare interface GraphScope {
3504
3537
  readonly owningGraphId: OwningGraphId;
3505
3538
  }
3506
3539
 
3540
+ declare interface GraphSerializeOptions {
3541
+ sortNodes: boolean;
3542
+ }
3543
+
3507
3544
  declare type GroupId = number & {
3508
3545
  readonly __brand: 'GroupId';
3509
3546
  };
3510
3547
 
3511
- /**
3512
- * Any object that has a {@link boundingRect}.
3513
- */
3514
3548
  declare interface HasBoundingRect {
3515
- /**
3516
- * A rectangle that represents the outer edges of the item.
3517
- *
3518
- * Used for various calculations, such as overlap, selective rendering, and click checks.
3519
- * For most items, this is cached position & size as `x, y, width, height`.
3520
- * Some items (such as nodes and slots) may extend above and/or to the left of their {@link pos}.
3521
- * @readonly
3522
- * @see {@link move}
3523
- */
3524
3549
  readonly boundingRect: ReadOnlyRect;
3525
3550
  }
3526
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
+
3527
3566
  /**
3528
3567
  * An object that can be hovered over.
3529
3568
  */
3530
3569
  declare interface Hoverable extends HasBoundingRect {
3531
- readonly boundingRect: Rectangle;
3570
+ readonly boundingRect: RegisteredRectangle;
3532
3571
  isPointerOver: boolean;
3533
3572
  containsPoint(point: Point): boolean;
3534
3573
  onPointerMove(e: CanvasPointerEvent): void;
@@ -3656,12 +3695,7 @@ export declare interface IBaseWidget<TValue = WidgetValue, TType extends string
3656
3695
  * @param node The node this widget belongs to.
3657
3696
  * @returns The layout size of the widget.
3658
3697
  */
3659
- computeLayoutSize?(this: IBaseWidget, node: RegisteredLGraphNode): {
3660
- minHeight: number;
3661
- maxHeight?: number;
3662
- minWidth: number;
3663
- maxWidth?: number;
3664
- };
3698
+ computeLayoutSize?(this: IBaseWidget, node: RegisteredLGraphNode): WidgetLayoutSize;
3665
3699
  /**
3666
3700
  * Callback for pointerdown events, allowing custom widgets to register callbacks to occur
3667
3701
  * for all {@link CanvasPointer} events.
@@ -3675,7 +3709,7 @@ export declare interface IBaseWidget<TValue = WidgetValue, TType extends string
3675
3709
  * @returns Returning `true` from this callback forces Litegraph to ignore the event and
3676
3710
  * not process it any further.
3677
3711
  */
3678
- onPointerDown?(pointer: CanvasPointer, node: RegisteredLGraphNode, canvas: RegisteredLGraphCanvas): boolean;
3712
+ onPointerDown?(pointer: RegisteredCanvasPointer, node: RegisteredLGraphNode, canvas: RegisteredLGraphCanvas): boolean;
3679
3713
  onRemove?(): void;
3680
3714
  beforeQueued?(options?: WidgetCallbackOptions): unknown;
3681
3715
  afterQueued?(options?: WidgetCallbackOptions): unknown;
@@ -3693,13 +3727,13 @@ export declare interface IBooleanWidget extends IBaseWidget<boolean, 'toggle'> {
3693
3727
  }
3694
3728
 
3695
3729
  declare interface IBoundaryNodes {
3696
- top: RegisteredLGraphNode;
3697
- right: RegisteredLGraphNode;
3698
- bottom: RegisteredLGraphNode;
3699
- left: RegisteredLGraphNode;
3730
+ top: LGraphNode;
3731
+ right: LGraphNode;
3732
+ bottom: LGraphNode;
3733
+ left: LGraphNode;
3700
3734
  }
3701
3735
 
3702
- export declare interface IBoundingBoxesWidget extends IBaseWidget<BoundingBox[], 'boundingboxes'> {
3736
+ export declare interface IBoundingBoxesWidget extends IBaseWidget<BoundingBox[], 'boundingboxes', IWidgetBoundingBoxesOptions> {
3703
3737
  type: 'boundingboxes';
3704
3738
  value: BoundingBox[];
3705
3739
  }
@@ -4008,6 +4042,8 @@ export declare interface INodeFlags {
4008
4042
  keepAllLinksOnBypass?: boolean;
4009
4043
  /** Node is in ghost placement mode (semi-transparent, following cursor) */
4010
4044
  ghost?: boolean;
4045
+ /** Renders the node's single preview image at full resolution instead of a downscaled copy */
4046
+ fullResolutionPreview?: boolean;
4011
4047
  }
4012
4048
 
4013
4049
  export declare interface INodeInputSlot extends INodeSlot {
@@ -4158,6 +4194,19 @@ declare interface InputMapSetValue {
4158
4194
 
4159
4195
  export { InputSpec }
4160
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
+
4161
4210
  /** Any widget that uses a numeric backing */
4162
4211
  export declare interface INumericWidget extends IBaseWidget<number, 'number'> {
4163
4212
  type: 'number';
@@ -4180,14 +4229,6 @@ export declare interface IPainterWidget extends IBaseWidget<string, 'painter'> {
4180
4229
  value: string;
4181
4230
  }
4182
4231
 
4183
- /** Options for {@link LGraphCanvas.pasteFromClipboard}. */
4184
- declare interface IPasteFromClipboardOptions {
4185
- /** If `true`, always attempt to connect inputs of pasted nodes - including to nodes that were not pasted. */
4186
- connectInputs?: boolean;
4187
- /** The position to paste the items at. */
4188
- position?: Point;
4189
- }
4190
-
4191
4232
  /**
4192
4233
  * An object that can be pinned.
4193
4234
  *
@@ -4237,7 +4278,7 @@ export declare interface ISerialisedGraph extends BaseExportedGraph {
4237
4278
  last_node_id: SerializedNodeId;
4238
4279
  last_link_id: number;
4239
4280
  nodes: ISerialisedNode[];
4240
- links: RegisteredSerialisedLLinkArray[];
4281
+ links: SerialisedLLinkArray[];
4241
4282
  floatingLinks?: SerialisableLLink[];
4242
4283
  groups: ISerialisedGroup[];
4243
4284
  version: RegisteredLiteGraphGlobal['VERSION'];
@@ -4354,15 +4395,6 @@ declare interface ISubgraphInput extends INodeInputSlot {
4354
4395
  _subgraphSlot: RegisteredSubgraphInput;
4355
4396
  }
4356
4397
 
4357
- /**
4358
- * Locates graph items.
4359
- */
4360
- declare interface ItemLocator {
4361
- getNodeOnPos(x: number, y: number, nodeList?: RegisteredLGraphNode[]): RegisteredLGraphNode | null;
4362
- getRerouteOnPos(x: number, y: number): RegisteredReroute | undefined;
4363
- getIoNodeOnPos?(x: number, y: number): RegisteredSubgraphInputNode | RegisteredSubgraphOutputNode | undefined;
4364
- }
4365
-
4366
4398
  /** Textarea widget for multi-line text input */
4367
4399
  export declare interface ITextareaWidget extends IBaseWidget<string, 'textarea'> {
4368
4400
  type: 'textarea';
@@ -4375,6 +4407,11 @@ export declare interface ITreeSelectWidget extends IBaseWidget<string | string[]
4375
4407
  value: string | string[];
4376
4408
  }
4377
4409
 
4410
+ declare interface IVideoConcatWidget extends IBaseWidget<VideoConcatValue, 'videoconcat', IWidgetVideoConcatOptions> {
4411
+ type: 'videoconcat';
4412
+ value: VideoConcatValue;
4413
+ }
4414
+
4378
4415
  export declare interface IVideoEditWidget extends IBaseWidget<VideoEditValue, 'videoedit', IWidgetVideoEditOptions> {
4379
4416
  type: 'videoedit';
4380
4417
  value: VideoEditValue;
@@ -4388,12 +4425,16 @@ export declare interface IVideoEditWidget extends IBaseWidget<VideoEditValue, 'v
4388
4425
  * Recommend declaration merging any properties that use IWidget (e.g. {@link LGraphNode.widgets}) with a new type alias.
4389
4426
  * @see ICustomWidget
4390
4427
  */
4391
- 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;
4392
4429
 
4393
4430
  export declare interface IWidgetAssetOptions extends IWidgetOptions {
4394
4431
  openModal: (widget: IBaseWidget) => void;
4395
4432
  }
4396
4433
 
4434
+ declare interface IWidgetBoundingBoxesOptions extends IWidgetOptions {
4435
+ max_boxes?: number;
4436
+ }
4437
+
4397
4438
  export declare interface IWidgetGradientSliderOptions extends IWidgetOptions<number[]> {
4398
4439
  min: number;
4399
4440
  max: number;
@@ -4507,6 +4548,10 @@ declare interface IWidgetSliderOptions extends IWidgetOptions<number[]> {
4507
4548
  marker_color?: CanvasColour;
4508
4549
  }
4509
4550
 
4551
+ declare interface IWidgetVideoConcatOptions extends IWidgetOptions {
4552
+ source: string;
4553
+ }
4554
+
4510
4555
  export declare interface IWidgetVideoEditOptions extends IWidgetOptions {
4511
4556
  features?: VideoEditFeature[];
4512
4557
  }
@@ -4541,16 +4586,7 @@ declare type KeysOfType<T, Match> = Exclude<{
4541
4586
  }[keyof T], undefined>;
4542
4587
 
4543
4588
  declare class KnobWidget extends BaseWidget<IKnobWidget> implements IKnobWidget {
4544
- /**
4545
- * Compute the layout size of the widget.
4546
- * @returns The layout size of the widget.
4547
- */
4548
- computeLayoutSize(): {
4549
- minHeight: number;
4550
- maxHeight?: number;
4551
- minWidth: number;
4552
- maxWidth?: number;
4553
- };
4589
+ computeLayoutSize(): WidgetLayoutSize;
4554
4590
  get height(): number;
4555
4591
  drawWidget(ctx: CanvasRenderingContext2D, { width, showText }: DrawWidgetOptions): void;
4556
4592
  onClick(): void;
@@ -4563,11 +4599,13 @@ declare enum LabelPosition {
4563
4599
  Right = "right"
4564
4600
  }
4565
4601
 
4566
- declare const LAYER_STATE_VERSION = 1;
4602
+ declare interface LegacyAuthStore {
4603
+ getAuthHeader(): Promise<Record<string, string> | null>;
4604
+ getAuthToken(): Promise<string | undefined>;
4605
+ }
4567
4606
 
4568
- declare interface LegacyMenuHost {
4607
+ declare interface LegacyMenuHost extends LegacyQueueHost {
4569
4608
  resetView(): void;
4570
- restoreOutputs(outputs: Partial<Record<string, ExecutedWsMessage['output']>>): void;
4571
4609
  trackRunButton(intent: WorkflowQueueIntent): void;
4572
4610
  enterFocusMode(): void;
4573
4611
  }
@@ -4578,16 +4616,26 @@ declare interface LegacyMouseEvent {
4578
4616
  click_time?: number;
4579
4617
  }
4580
4618
 
4581
- /** The slice of the app the legacy menu drives. `ComfyApp` implements it. */
4582
- declare interface LegacyUIApp {
4619
+ declare interface LegacyQueueApp {
4583
4620
  readonly lastExecutionError: ExecutionErrorWsMessage | null;
4584
- 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>;
4585
4624
  queuePrompt(number: number, batchCount?: number, options?: {
4586
4625
  intent?: WorkflowQueueIntent;
4587
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 {
4588
4634
  showErrorOnFileLoad(file: File): void;
4589
- handleFile(file: File, openSource?: WorkflowOpenSource): Promise<void>;
4590
- refreshComboInNodes(): Promise<void>;
4635
+ handleFile(file: File, openSource?: WorkflowOpenSource, options?: {
4636
+ initiator?: 'user';
4637
+ }): Promise<void | false>;
4638
+ refreshComboInNodes(): Promise<boolean>;
4591
4639
  openClipspace(): void;
4592
4640
  clean(): void;
4593
4641
  }
@@ -4604,10 +4652,14 @@ declare class LegacyWidget<TWidget extends IBaseWidget = IBaseWidget> extends Ba
4604
4652
  onClick(): void;
4605
4653
  }
4606
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
+ */
4607
4661
  export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<SerialisableGraph> {
4608
- static serialisedSchemaVersion: 1;
4609
- static STATUS_STOPPED: number;
4610
- static STATUS_RUNNING: number;
4662
+ static serialisedSchemaVersion: typeof GRAPH_SCHEMA_VERSION;
4611
4663
  /* Excluded from this release type: proxyWidgetMigrationFlush */
4612
4664
  /* Excluded from this release type: autoExposePreviewNodes */
4613
4665
  /** List of LGraph properties that are manually handled by {@link LGraph.configure}. */
@@ -4638,30 +4690,15 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4638
4690
  links: Map<LinkId, LLink> & Record<LinkId, LLink>;
4639
4691
  readonly floatingLinks: ReadonlyMap<LinkId, LLink>;
4640
4692
  list_of_graphcanvas: RegisteredLGraphCanvas[] | null;
4641
- status: number;
4642
4693
  get state(): LGraphState;
4643
4694
  set state(value: LGraphState);
4644
- 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">;
4645
4696
  readonly _subgraphs: Map<SubgraphId, Subgraph>;
4646
4697
  _nodes: (LGraphNode | SubgraphNode)[];
4647
4698
  _nodes_by_id: Partial<Record<NodeId, LGraphNode>>;
4648
4699
  _nodes_in_order: LGraphNode[];
4649
- _nodes_executable: LGraphNode[] | null;
4650
4700
  _groups: LGraphGroup[];
4651
4701
  iteration: number;
4652
- globaltime: number;
4653
- /** @deprecated Unused */
4654
- runningtime: number;
4655
- fixedtime: number;
4656
- fixedtime_lapse: number;
4657
- elapsed_time: number;
4658
- last_update_time: number;
4659
- starttime: number;
4660
- catch_errors: boolean;
4661
- execution_timer_id?: ReturnType<typeof setInterval> | number | null;
4662
- errors_in_execution?: boolean;
4663
- /** @deprecated Unused */
4664
- execution_time: number;
4665
4702
  _last_trigger_time?: number;
4666
4703
  filter?: string;
4667
4704
  /** Must contain serialisable values, e.g. primitive types */
@@ -4711,7 +4748,9 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4711
4748
  /**
4712
4749
  * Removes all nodes from this graph
4713
4750
  */
4714
- clear(): void;
4751
+ clear({ preserveMountedNodeSizes }?: {
4752
+ preserveMountedNodeSizes?: boolean | undefined;
4753
+ }): void;
4715
4754
  private resetAfterClear;
4716
4755
  get subgraphs(): Map<SubgraphId, Subgraph>;
4717
4756
  get nodes(): (LGraphNode | SubgraphNode)[];
@@ -4724,24 +4763,6 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4724
4763
  * Detach Canvas from this graph
4725
4764
  */
4726
4765
  detachCanvas(canvas: RegisteredLGraphCanvas): void;
4727
- /**
4728
- * @deprecated Will be removed in 0.9
4729
- * Starts running this graph every interval milliseconds.
4730
- * @param interval amount of milliseconds between executions, if 0 then it renders to the monitor refresh rate
4731
- */
4732
- start(interval?: number): void;
4733
- /**
4734
- * @deprecated Will be removed in 0.9
4735
- * Stops the execution loop of the graph
4736
- */
4737
- stop(): void;
4738
- /**
4739
- * Run N steps (cycles) of the graph
4740
- * @param num number of steps to run, default is 1
4741
- * @param do_not_catch_errors [optional] if you want to try/catch errors
4742
- * @param limit max number of nodes to execute (used to execute from start to a node)
4743
- */
4744
- runStep(num: number, do_not_catch_errors: boolean, limit?: number): void;
4745
4766
  /**
4746
4767
  * Updates the graph execution order according to relevance of the nodes (nodes with only outputs have more relevance than
4747
4768
  * nodes with only inputs.
@@ -4752,24 +4773,6 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
4752
4773
  * Positions every node in a more readable manner
4753
4774
  */
4754
4775
  arrange(margin?: number, layout?: string): void;
4755
- /**
4756
- * Returns the amount of time the graph has been running in milliseconds
4757
- * @returns number of milliseconds the graph has been running
4758
- */
4759
- getTime(): number;
4760
- /**
4761
- * Returns the amount of time accumulated using the fixedtime_lapse var.
4762
- * This is used in context where the time increments should be constant
4763
- * @returns number of milliseconds the graph has been running
4764
- */
4765
- getFixedTime(): number;
4766
- /**
4767
- * Returns the amount of time it took to compute the latest iteration.
4768
- * Take into account that this number could be not correct
4769
- * if the nodes are using graphical actions
4770
- * @returns number of milliseconds it took the last cycle
4771
- */
4772
- getElapsedTime(): number;
4773
4776
  /**
4774
4777
  * Increments the internal version counter.
4775
4778
  */
@@ -5005,16 +5008,12 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
5005
5008
  * @deprecated Use {@link asSerialisable}, which returns the newer schema version.
5006
5009
  * @returns value of the node
5007
5010
  */
5008
- serialize(option?: {
5009
- sortNodes: boolean;
5010
- }): ISerialisedGraph;
5011
+ serialize(option?: GraphSerializeOptions): ISerialisedGraph;
5011
5012
  /**
5012
5013
  * Custom JSON serialization to prevent circular reference errors.
5013
5014
  * Called automatically by JSON.stringify().
5014
5015
  */
5015
5016
  toJSON(): ISerialisedGraph;
5016
- /** @returns The drag and scale state of the first attached canvas, otherwise `undefined`. */
5017
- private _getDragAndScale;
5018
5017
  /**
5019
5018
  * Prepares a shallow copy of this object for immediate serialisation or structuredCloning.
5020
5019
  * The return value should be discarded immediately.
@@ -5023,9 +5022,7 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
5023
5022
  * Mutating the properties of the return object may result in changes to your graph.
5024
5023
  * It is intended for use with {@link structuredClone} or {@link JSON.stringify}.
5025
5024
  */
5026
- asSerialisable(options?: {
5027
- sortNodes: boolean;
5028
- }): SerialisableGraph & Required<Pick<SerialisableGraph, 'nodes' | 'groups' | 'extra'>>;
5025
+ asSerialisable(options?: GraphSerializeOptions): SerialisedGraphDocument;
5029
5026
  protected _configureBase(data: ISerialisedGraph | SerialisableGraph): void;
5030
5027
  /**
5031
5028
  * Configure a graph from a JSON string
@@ -5033,7 +5030,9 @@ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Ser
5033
5030
  * @param keep_old If `true`, the graph will not be cleared prior to
5034
5031
  * adding the configuration.
5035
5032
  */
5036
- 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;
5037
5036
  private _canvas?;
5038
5037
  get primaryCanvas(): RegisteredLGraphCanvas | undefined;
5039
5038
  set primaryCanvas(canvas: RegisteredLGraphCanvas);
@@ -5272,7 +5271,11 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5272
5271
  /** The viewport of this canvas. Tightly coupled with {@link ds}. */
5273
5272
  readonly viewport?: Rect;
5274
5273
  autoresize: boolean;
5275
- 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);
5276
5279
  frame: number;
5277
5280
  last_draw_time: number;
5278
5281
  render_time: number;
@@ -5305,6 +5308,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5305
5308
  * performant than {@link visible_nodes} for visibility checks.
5306
5309
  */
5307
5310
  private _visible_node_ids;
5311
+ private _passLinkRenderContext;
5308
5312
  node_over?: LGraphNode;
5309
5313
  node_capturing_input?: LGraphNode | null;
5310
5314
  /** Links attached to a selected node. Derived from the selection store. */
@@ -5322,8 +5326,8 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5322
5326
  * drag move and seeded from the pointer-down event when a drag starts.
5323
5327
  */
5324
5328
  private _lastDragModifiers;
5325
- private _ghostPointerHandler;
5326
- private _ghostKeyHandler;
5329
+ private _finishGhostPlacement;
5330
+ private _ghostPlacementBlocked;
5327
5331
  dirty_canvas: boolean;
5328
5332
  dirty_bgcanvas: boolean;
5329
5333
  /** A map of nodes that require selective-redraw */
@@ -5441,7 +5445,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5441
5445
  * @param direction Direction to align the nodes
5442
5446
  * @param align_to Node to align to (if null, align to the furthest node in the given direction)
5443
5447
  */
5444
- static alignNodes(nodes: Dictionary<LGraphNode>, direction: Direction, align_to?: LGraphNode): void;
5448
+ static alignNodes(nodes: Dictionary<LGraphNode>, direction: RectSide, align_to?: LGraphNode): void;
5445
5449
  static onNodeAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: RegisteredContextMenu<string>, node: LGraphNode): void;
5446
5450
  static onGroupAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: RegisteredContextMenu<string>): void;
5447
5451
  static createDistributeMenu(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: RegisteredContextMenu<string>): void;
@@ -5472,7 +5476,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5472
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;
5473
5477
  static onMenuNodeRemove(): void;
5474
5478
  static onMenuNodeClone(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: RegisteredContextMenu, node: LGraphNode): void;
5475
- static cloneNodes(nodes: Positionable[]): ClipboardPasteResult | undefined;
5479
+ static cloneNodes(nodes: Positionable[]): InsertResult | undefined;
5476
5480
  clear(): void;
5477
5481
  private resetTransientState;
5478
5482
  /**
@@ -5567,12 +5571,6 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5567
5571
  private processSelectOnlyPrimaryButton;
5568
5572
  private setupCanvasDrag;
5569
5573
  private _setupNodeSelectionDrag;
5570
- /**
5571
- * Processes a pointerdown event inside the bounds of a node. Part of {@link processMouseDown}.
5572
- * @param e The pointerdown event
5573
- * @param ctrlOrMeta Ctrl or meta key is pressed
5574
- * @param node The node to process a click event for
5575
- */
5576
5574
  private _processNodeClick;
5577
5575
  processWidgetClick(e: CanvasPointerEvent, node: LGraphNode, widget: IBaseWidget, pointer?: CanvasPointer): void;
5578
5576
  /**
@@ -5616,10 +5614,6 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5616
5614
  * @param dragEvent Optional mouse event for positioning under cursor
5617
5615
  */
5618
5616
  startGhostPlacement(node: LGraphNode, dragEvent?: MouseEvent): void;
5619
- /**
5620
- * Finalizes ghost placement mode.
5621
- * @param cancelled If true, the node is removed; otherwise it's placed
5622
- */
5623
5617
  finalizeGhostPlacement(cancelled: boolean): void;
5624
5618
  /**
5625
5619
  * Called when a mouse up event has to be processed
@@ -5640,23 +5634,15 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5640
5634
  */
5641
5635
  processKey(e: KeyboardEvent): void;
5642
5636
  _serializeItems(items?: Iterable<Positionable>): ClipboardItems_2;
5643
- /**
5644
- * Copies canvas items to an internal, app-specific clipboard backed by local storage.
5645
- * When called without parameters, it copies {@link selectedItems}.
5646
- * @param items The items to copy. If nullish, all selected items are copied.
5647
- */
5648
5637
  copyToClipboard(items?: Iterable<Positionable>): string;
5649
5638
  emitEvent(detail: LGraphCanvasEventMap['litegraph:canvas']): void;
5650
5639
  /** @todo Refactor to where it belongs - e.g. Deleting / creating nodes is not actually canvas event. */
5651
5640
  emitBeforeChange(): void;
5652
5641
  /** @todo See {@link emitBeforeChange} */
5653
5642
  emitAfterChange(): void;
5654
- /**
5655
- * Pastes the items from the canvas "clipbaord" - a local storage variable.
5656
- */
5657
- _pasteFromClipboard(options?: IPasteFromClipboardOptions): ClipboardPasteResult | undefined;
5658
- _deserializeItems(clipboardItems: ClipboardItems_2, options: IPasteFromClipboardOptions): ClipboardPasteResult | undefined;
5659
- pasteFromClipboard(options?: IPasteFromClipboardOptions): void;
5643
+ _pasteFromClipboard(options?: InsertOptions): InsertResult | undefined;
5644
+ _deserializeItems(clipboardItems: ClipboardItems_2, options: InsertOptions): InsertResult | undefined;
5645
+ pasteFromClipboard(options?: InsertOptions): void;
5660
5646
  processNodeDblClicked(n: LGraphNode): void;
5661
5647
  /**
5662
5648
  * Normalizes a drag rectangle to have positive width and height.
@@ -5919,7 +5905,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
5919
5905
  showShowNodePanel(node: LGraphNode): void;
5920
5906
  checkPanels(): void;
5921
5907
  getCanvasMenuOptions(): (IContextMenuValue | null)[];
5922
- 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)[];
5923
5909
  /** @deprecated */
5924
5910
  getGroupMenuOptions(group: LGraphGroup): (IContextMenuValue<string | null, unknown, unknown> | IContextMenuValue<string, unknown, unknown> | null)[];
5925
5911
  processContextMenu(node: LGraphNode | undefined, event: CanvasPointerEvent): void;
@@ -6038,60 +6024,34 @@ declare interface LGraphConfig {
6038
6024
 
6039
6025
  export declare interface LGraphEventMap {
6040
6026
  configuring: {
6041
- /** The data that was used to configure the graph. */
6042
6027
  data: ISerialisedGraph | SerialisableGraph;
6043
- /** If `true`, the graph will be cleared prior to adding the configuration. */
6044
6028
  clearGraph: boolean;
6045
6029
  };
6046
6030
  configured: never;
6047
6031
  'subgraph-created': {
6048
- /** The subgraph that was created. */
6049
6032
  subgraph: RegisteredSubgraph;
6050
- /** The raw data that was used to create the subgraph. */
6051
6033
  data: ExportedSubgraph;
6052
6034
  };
6053
- /** Dispatched when a group of items are converted to a subgraph. */
6054
6035
  'convert-to-subgraph': {
6055
- /** The type of subgraph to create. */
6056
6036
  subgraph: RegisteredSubgraph;
6057
- /** The boundary around every item that was moved into the subgraph. */
6058
6037
  bounds: ReadOnlyRect;
6059
- /** The raw data that was used to create the subgraph. */
6060
6038
  exportedSubgraph: ExportedSubgraph;
6061
- /** The links that were used to create the subgraph. */
6062
6039
  boundaryLinks: RegisteredLLink[];
6063
- /** Links that go from outside the subgraph in, via an input on the subgraph node. */
6064
6040
  resolvedInputLinks: RegisteredResolvedConnection[];
6065
- /** Links that go from inside the subgraph out, via an output on the subgraph node. */
6066
6041
  resolvedOutputLinks: RegisteredResolvedConnection[];
6067
- /** The floating links that were used to create the subgraph. */
6068
6042
  boundaryFloatingLinks: RegisteredLLink[];
6069
- /** The internal links that were used to create the subgraph. */
6070
6043
  internalLinks: RegisteredLLink[];
6071
6044
  };
6072
6045
  'open-subgraph': {
6073
6046
  subgraph: RegisteredSubgraph;
6074
6047
  closingGraph: RegisteredLGraph | RegisteredSubgraph;
6075
6048
  };
6076
- /**
6077
- * Fires on the owning graph once a node is attached and registered. Prefer
6078
- * this to wrapping {@link LGraph.onNodeAdded}, which has a single slot that
6079
- * concurrent subscribers clobber on restore.
6080
- */
6081
6049
  'node:added': {
6082
6050
  node: RegisteredLGraphNode;
6083
6051
  };
6084
- /**
6085
- * Fires on the owning graph before per-node teardown begins
6086
- */
6087
6052
  'node:before-removed': {
6088
6053
  node: RegisteredLGraphNode;
6089
6054
  };
6090
- /**
6091
- * Fires on the owning graph once a node is detached. `node.graph` is already
6092
- * null; derive execution ids from the dispatching graph plus `node.id`.
6093
- * @see {@link 'node:added'} on why to prefer this to `onNodeRemoved`.
6094
- */
6095
6055
  'node:removed': {
6096
6056
  node: RegisteredLGraphNode;
6097
6057
  };
@@ -6122,7 +6082,7 @@ declare interface LGraphExtra extends Dictionary<unknown> {
6122
6082
  parentId: RerouteId | undefined;
6123
6083
  }[];
6124
6084
  linkPresentation?: Record<string, LinkPresentation>;
6125
- ds?: DragAndScaleState;
6085
+ ds?: PanZoom;
6126
6086
  workflowRendererVersion?: RendererType;
6127
6087
  }
6128
6088
 
@@ -6174,7 +6134,8 @@ export declare class LGraphGroup implements Positionable, IPinnable, IColorable
6174
6134
  set size(v: Size);
6175
6135
  syncBoundsFromStore(): void;
6176
6136
  private commitBounds;
6177
- private setBounds;
6137
+ /** Sets position and size in one layout operation. */
6138
+ setBounds(x: number, y: number, width: number, height: number): void;
6178
6139
  get boundingRect(): Rectangle;
6179
6140
  getBounding(): Rectangle;
6180
6141
  get nodes(): LGraphNode[];
@@ -6223,6 +6184,7 @@ export declare class LGraphGroup implements Positionable, IPinnable, IColorable
6223
6184
  addNodes(nodes: LGraphNode[], padding?: number): void;
6224
6185
  getMenuOptions(): (IContextMenuValue<string> | IContextMenuValue<string | null> | null)[];
6225
6186
  isPointInTitlebar(x: number, y: number): boolean;
6187
+ /** @deprecated Use `resizeCornerAt` from `canvas/cornerResize`, which covers all four corners. */
6226
6188
  isInResize(x: number, y: number): boolean;
6227
6189
  isPointInside(x: number, y: number): boolean;
6228
6190
  setDirtyCanvas: (dirty_foreground: boolean, dirty_background?: boolean) => void;
@@ -6270,6 +6232,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6270
6232
  static filter?: string;
6271
6233
  static skip_list?: boolean;
6272
6234
  static nodeData?: {
6235
+ isCoreNode?: boolean;
6273
6236
  dev_only?: boolean;
6274
6237
  deprecated?: boolean;
6275
6238
  experimental?: boolean;
@@ -6442,7 +6405,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6442
6405
  isLoading?: boolean;
6443
6406
  isUploading?: boolean;
6444
6407
  previewMediaType?: 'image' | 'video' | 'audio' | 'model';
6445
- /** If true, output images are stored but not rendered below the node */
6408
+ /** Only false enables the default executed-output preview in Vue mode. */
6446
6409
  hideOutputImages?: boolean;
6447
6410
  preview?: string[];
6448
6411
  /** Index of the currently selected image on a multi-image node such as Preview Image */
@@ -6463,10 +6426,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6463
6426
  index?: number;
6464
6427
  runningInternalNodeId?: SerializedNodeId;
6465
6428
  /** Used internally for sizing the node during creation */
6466
- _initialMinSize?: {
6467
- width: number;
6468
- height: number;
6469
- };
6429
+ _initialMinSize?: Size2D;
6470
6430
  /** Raw widget values from the last `configure`; litegraph does not read it. */
6471
6431
  widgets_values?: TWidgetValue[];
6472
6432
  isSubgraphNode(): this is RegisteredSubgraphNode;
@@ -6479,10 +6439,11 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6479
6439
  get renderArea(): ReadOnlyRect;
6480
6440
  /** @inheritdoc {@link boundingRect} */
6481
6441
  private _boundingRect;
6442
+ private _measuredPos;
6482
6443
  /**
6483
6444
  * Cached node position & area as `x, y, width, height`. Includes changes made by {@link onBounding}, if present.
6484
6445
  *
6485
- * 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.
6486
6447
  */
6487
6448
  get boundingRect(): ReadOnlyRectangle;
6488
6449
  /** The offset from {@link pos} to the top-left of {@link boundingRect}. */
@@ -6600,7 +6561,7 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
6600
6561
  /** Blocks drag if return value is truthy. @param pos Offset from {@link LGraphNode.pos}. */
6601
6562
  onMouseDown?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: RegisteredLGraphCanvas): boolean;
6602
6563
  /** @param pos Offset from {@link LGraphNode.pos}. */
6603
- onDblClick?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: RegisteredLGraphCanvas): void;
6564
+ onDblClick?(this: LGraphNode, e: CanvasMouseEvent, pos: Point, canvas: RegisteredLGraphCanvas): void;
6604
6565
  /** @param pos Offset from {@link LGraphNode.pos}. */
6605
6566
  onNodeTitleDblClick?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: RegisteredLGraphCanvas): void;
6606
6567
  onDrawTitle?(this: LGraphNode, ctx: CanvasRenderingContext2D): void;
@@ -7042,40 +7003,14 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
7042
7003
  */
7043
7004
  connectByTypeOutput(slot: number | string, source_node: LGraphNode, source_slotType: ISlotType, optsIn?: ConnectByTypeOptions): LLink | null;
7044
7005
  canConnectTo(node: NodeLike, toSlot: INodeInputSlot | SubgraphIO, fromSlot: INodeOutputSlot | SubgraphIO): boolean;
7045
- /**
7046
- * Connect an output of this node to an input of another node
7047
- * @param slot (could be the number of the slot or the string with the name of the slot)
7048
- * @param target_node the target node
7049
- * @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)
7050
- * @returns the link_info is created, otherwise null
7051
- */
7052
- connect(slot: number | string, target_node: LGraphNode | number | null, target_slot: number | string, afterRerouteId?: RerouteId): LLink | null;
7053
- /**
7054
- * Connect two slots between two nodes
7055
- * @param output The output slot to connect
7056
- * @param inputNode The node that the input slot is on
7057
- * @param input The input slot to connect
7058
- * @param afterRerouteId The reroute ID to use for the link
7059
- * @returns The link that was created, or null if the connection was blocked
7060
- */
7061
- 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;
7062
7012
  connectFloatingReroute(pos: Point, slot: INodeInputSlot | INodeOutputSlot, afterRerouteId?: RerouteId): RegisteredReroute | undefined;
7063
- /**
7064
- * disconnect one output to an specific node
7065
- * @param slot (could be the number of the slot or the string with the name of the slot)
7066
- * @param target_node the target node to which this slot is connected [Optional,
7067
- * if not target_node is specified all nodes will be disconnected]
7068
- * @returns if it was disconnected successfully
7069
- */
7070
7013
  disconnectOutput(slot: string | number, target_node?: LGraphNode): boolean;
7071
- /**
7072
- * Disconnect one input
7073
- * @param slot Input slot index, or the name of the slot
7074
- * @param keepReroutes If `true`, reroutes will not be garbage collected.
7075
- * @param keepFloatingReroute Floating link(s) parented to this reroute are left
7076
- * intact, so a chain being reconnected is not pruned before its new link exists.
7077
- * @returns true if disconnected successfully or already disconnected, otherwise false
7078
- */
7079
7014
  disconnectInput(slot: number | string, keepReroutes?: boolean, keepFloatingReroute?: RerouteId): boolean;
7080
7015
  /**
7081
7016
  * @deprecated Use {@link getInputPos} or {@link getOutputPos} instead.
@@ -7243,13 +7178,6 @@ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IC
7243
7178
  * Draws the node's input and output slots.
7244
7179
  */
7245
7180
  drawSlots(ctx: CanvasRenderingContext2D, { fromSlot, colorContext, editorAlpha, lowQuality }: DrawSlotsOptions): void;
7246
- /**
7247
- * Arranges the node's widgets vertically.
7248
- * Sets following properties on each widget:
7249
- * - {@link IBaseWidget.computedHeight}
7250
- * - {@link IBaseWidget.y}
7251
- * @param widgetStartY The y-coordinate of the first widget
7252
- */
7253
7181
  private _arrangeWidgets;
7254
7182
  /**
7255
7183
  * Arranges the layout of the node's widget input slots.
@@ -7345,6 +7273,7 @@ declare class LinkConnector {
7345
7273
  overWidget?: IBaseWidget;
7346
7274
  /** The type (returned by downstream callback) for {@link overWidget} */
7347
7275
  overWidgetType?: string;
7276
+ overInput?: INodeInputSlot;
7348
7277
  /** The reroute beneath the pointer, if it is a valid connection target. */
7349
7278
  overReroute?: RegisteredReroute;
7350
7279
  private readonly _setConnectingLinks;
@@ -7390,7 +7319,7 @@ declare class LinkConnector {
7390
7319
  * Connects the links being dropped
7391
7320
  * @param event Contains the drop location, in canvas space
7392
7321
  */
7393
- dropLinks(locator: ItemLocator, event: CanvasPointerEvent): void;
7322
+ dropLinks(graph: RegisteredLGraph, event: CanvasPointerEvent): void;
7394
7323
  dropOnIoNode(ioNode: SubgraphInputNode | SubgraphOutputNode, event: CanvasPointerEvent): void;
7395
7324
  dropOnNode(node: RegisteredLGraphNode, event: CanvasPointerEvent): void;
7396
7325
  dropOnReroute(reroute: RegisteredReroute, event: CanvasPointerEvent): void;
@@ -7532,15 +7461,11 @@ export declare enum LinkMarkerShape {
7532
7461
  Arrow = 2
7533
7462
  }
7534
7463
 
7535
- /**
7536
- * Contains a list of links, reroutes, and nodes.
7537
- */
7538
7464
  export declare interface LinkNetwork extends ReadonlyLinkNetwork {
7539
7465
  readonly links: Map<LinkId, RegisteredLLink>;
7540
7466
  readonly reroutes: Map<RerouteId, RegisteredReroute>;
7541
7467
  addFloatingLink(link: RegisteredLLink): RegisteredLLink | undefined;
7542
7468
  removeReroute(id: RerouteId): unknown;
7543
- /** Removes a reroute from the map and its stores, without chain splicing. */
7544
7469
  _removeReroute(id: RerouteId): void;
7545
7470
  removeFloatingLink(link: RegisteredLLink): void;
7546
7471
  }
@@ -7608,14 +7533,11 @@ declare interface LinkSegment {
7608
7533
  declare interface LinkTopology {
7609
7534
  readonly id: LinkId;
7610
7535
  graphId: OwningGraphId;
7611
- /** Output node; UNASSIGNED_NODE_ID when the output end is floating. */
7612
7536
  originNodeId: NodeId;
7613
7537
  originSlot: number;
7614
- /** Input node; UNASSIGNED_NODE_ID when the input end is floating. */
7615
7538
  targetNodeId: NodeId;
7616
7539
  targetSlot: number;
7617
7540
  type: ISlotType;
7618
- /** Terminal reroute of the segment chain, when the link routes through one. */
7619
7541
  parentId?: RerouteId;
7620
7542
  }
7621
7543
 
@@ -7636,6 +7558,7 @@ export declare class LiteGraphGlobal {
7636
7558
  NODE_TITLE_TEXT_Y: number;
7637
7559
  NODE_SLOT_HEIGHT: number;
7638
7560
  NODE_WIDGET_HEIGHT: number;
7561
+ NODE_WIDGET_GAP: number;
7639
7562
  NODE_WIDTH: number;
7640
7563
  NODE_MIN_WIDTH: number;
7641
7564
  NODE_COLLAPSED_RADIUS: number;
@@ -7673,7 +7596,7 @@ export declare class LiteGraphGlobal {
7673
7596
  /** default node position */
7674
7597
  DEFAULT_POSITION: number[];
7675
7598
  /** ,"circle" */
7676
- VALID_SHAPES: ("round" | "default" | "card" | "box")[];
7599
+ VALID_SHAPES: ("default" | "round" | "card" | "box")[];
7677
7600
  ROUND_RADIUS: number;
7678
7601
  BOX_SHAPE: RenderShape;
7679
7602
  ROUND_SHAPE: RenderShape;
@@ -7915,6 +7838,7 @@ export declare class LiteGraphGlobal {
7915
7838
  vueNodesMode: boolean;
7916
7839
  nodeOpacity: number;
7917
7840
  nodeLightness: number | undefined;
7841
+ linkStyle: 'solid' | 'chalk' | undefined;
7918
7842
  LGraph: typeof LGraph;
7919
7843
  LLink: typeof LLink;
7920
7844
  LGraphNode: typeof LGraphNode;
@@ -8014,7 +7938,9 @@ export declare class LiteGraphGlobal {
8014
7938
  declare class LitegraphLinkAdapter {
8015
7939
  readonly enableLayoutStoreWrites: boolean;
8016
7940
  private readonly pathRenderer;
7941
+ private readonly pathContexts;
8017
7942
  constructor(enableLayoutStoreWrites?: boolean);
7943
+ private pathRenderContextFor;
8018
7944
  /**
8019
7945
  * Convert LinkDirection enum to Direction string
8020
7946
  */
@@ -8237,9 +8163,17 @@ declare interface LoadGraphDataOptions {
8237
8163
  openSource?: WorkflowOpenSource;
8238
8164
  shareId?: string;
8239
8165
  deferWarnings?: boolean;
8166
+ opening?: WorkflowOpening;
8240
8167
  skipAssetScans?: boolean;
8241
8168
  silentAssetErrors?: boolean;
8169
+ restoreHistory?: boolean;
8242
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';
8243
8177
  }
8244
8178
 
8245
8179
  export declare interface LogEntry {
@@ -8320,30 +8254,34 @@ declare interface MissingMediaCandidate {
8320
8254
  * The same model name may appear multiple times across different nodes.
8321
8255
  */
8322
8256
  declare interface MissingModelCandidate {
8323
- /** Undefined for workflow-level models not tied to a specific node. */
8324
- nodeId?: SerializedNodeId;
8325
- /** Stored owner of nodeType/embedded url; promotedSources tracks active consumers. */
8326
- sourceExecutionId?: NodeExecutionId;
8327
- promotedSources?: PromotedWidgetExecutionSource[];
8328
- nodeType: string;
8329
- widgetName: string;
8330
8257
  isAssetSupported: boolean;
8331
- name: string;
8332
- directory?: string;
8333
- url?: string;
8334
- hash?: string;
8335
- hashType?: string;
8336
8258
  /**
8337
8259
  * - `true` — confirmed missing
8338
8260
  * - `false` — confirmed installed
8339
8261
  * - `undefined` — pending async verification
8340
8262
  */
8341
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;
8342
8278
  }
8343
8279
 
8344
8280
  declare interface MissingModelPipelineResult {
8345
8281
  missingModels: ModelFile_2[];
8346
8282
  confirmedCandidates: MissingModelCandidate[];
8283
+ /** Settles once the verified candidates reach the store, or verification stops. */
8284
+ surfaced: Promise<void>;
8347
8285
  }
8348
8286
 
8349
8287
  /**
@@ -8371,20 +8309,12 @@ declare type MissingNodeType = string | {
8371
8309
  replacement?: NodeReplacement;
8372
8310
  };
8373
8311
 
8374
- declare type ModelFile = z.infer<typeof zModelFile_2>;
8375
-
8376
8312
  declare type ModelFile_2 = z.infer<typeof zModelFile>;
8377
8313
 
8378
- declare interface ModelFolderInfo {
8379
- name: string;
8380
- folders: string[];
8381
- /**
8382
- * The folder's raw registered extension allowlist from
8383
- * `/experiment/models`. An empty array means match-all; absent on older
8384
- * backends.
8385
- */
8314
+ declare type ModelFolderInfo = ModelFolder & {
8315
+ /** Raw extension allowlist; empty matches all, absent on older backends. */
8386
8316
  extensions?: string[];
8387
- }
8317
+ };
8388
8318
 
8389
8319
  declare class MovingInputLink extends MovingLinkBase {
8390
8320
  readonly toType = "input";
@@ -8510,11 +8440,8 @@ declare type NeverNever_2<T> = {
8510
8440
  };
8511
8441
 
8512
8442
  declare interface NewNodePosition {
8513
- node: RegisteredLGraphNode;
8514
- newPos: {
8515
- x: number;
8516
- y: number;
8517
- };
8443
+ node: LGraphNode;
8444
+ newPos: Point2D;
8518
8445
  }
8519
8446
 
8520
8447
  declare interface NodeBindable {
@@ -8630,13 +8557,8 @@ export declare enum NodeSlotType {
8630
8557
  OUTPUT = 2
8631
8558
  }
8632
8559
 
8633
- /**
8634
- * The fields the renderer draws. Selection, execution, errors, geometry, widget
8635
- * values and links live elsewhere — see docs/architecture/node-data-store.md.
8636
- */
8637
8560
  declare interface NodeState {
8638
8561
  flags: INodeFlags;
8639
- /** Owning (sub)graph id — partitioning + locator ids. */
8640
8562
  graphId: UUID;
8641
8563
  readonly id: NodeId;
8642
8564
  inputs: INodeInputSlot[];
@@ -8674,7 +8596,7 @@ declare class NumberWidget extends BaseSteppedWidget<INumericWidget> implements
8674
8596
  canDecrement(): boolean;
8675
8597
  incrementValue(options: WidgetEventOptions): void;
8676
8598
  decrementValue(options: WidgetEventOptions): void;
8677
- setValue(value: number, options: WidgetEventOptions): void;
8599
+ setValue(value: number, options?: WidgetValueOptions): void;
8678
8600
  onClick({ e, node, canvas }: WidgetEventOptions): void;
8679
8601
  /**
8680
8602
  * Handles drag events for the number widget
@@ -8701,6 +8623,8 @@ declare interface OutputMap {
8701
8623
  */
8702
8624
  declare function overlapBounding(a: ReadOnlyRect, b: ReadOnlyRect): boolean;
8703
8625
 
8626
+ declare const ownedGraph: unique symbol;
8627
+
8704
8628
  declare type OwningGraphId = string & {
8705
8629
  readonly __brand: 'OwningGraphId';
8706
8630
  };
@@ -8714,110 +8638,6 @@ declare class PainterWidget extends BaseWidget<IPainterWidget> implements IPaint
8714
8638
  onClick(_options: WidgetEventOptions): void;
8715
8639
  }
8716
8640
 
8717
- declare type Palette = z.infer<typeof paletteSchema>;
8718
-
8719
- declare const paletteSchema: z.ZodObject<{
8720
- id: z.ZodString;
8721
- name: z.ZodString;
8722
- colors: z.ZodObject<{
8723
- node_slot: z.ZodObject<{
8724
- CLIP: z.ZodOptional<z.ZodString>;
8725
- CLIP_VISION: z.ZodOptional<z.ZodString>;
8726
- CLIP_VISION_OUTPUT: z.ZodOptional<z.ZodString>;
8727
- CONDITIONING: z.ZodOptional<z.ZodString>;
8728
- CONTROL_NET: z.ZodOptional<z.ZodString>;
8729
- IMAGE: z.ZodOptional<z.ZodString>;
8730
- LATENT: z.ZodOptional<z.ZodString>;
8731
- MASK: z.ZodOptional<z.ZodString>;
8732
- MODEL: z.ZodOptional<z.ZodString>;
8733
- STYLE_MODEL: z.ZodOptional<z.ZodString>;
8734
- VAE: z.ZodOptional<z.ZodString>;
8735
- NOISE: z.ZodOptional<z.ZodString>;
8736
- GUIDER: z.ZodOptional<z.ZodString>;
8737
- SAMPLER: z.ZodOptional<z.ZodString>;
8738
- SIGMAS: z.ZodOptional<z.ZodString>;
8739
- TAESD: z.ZodOptional<z.ZodString>;
8740
- }, z.core.$strip>;
8741
- litegraph_base: z.ZodObject<{
8742
- BACKGROUND_IMAGE: z.ZodOptional<z.ZodString>;
8743
- CLEAR_BACKGROUND_COLOR: z.ZodOptional<z.ZodString>;
8744
- NODE_TITLE_COLOR: z.ZodOptional<z.ZodString>;
8745
- NODE_SELECTED_TITLE_COLOR: z.ZodOptional<z.ZodString>;
8746
- NODE_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8747
- NODE_TEXT_HIGHLIGHT_COLOR: z.ZodOptional<z.ZodString>;
8748
- NODE_DEFAULT_COLOR: z.ZodOptional<z.ZodString>;
8749
- NODE_DEFAULT_BGCOLOR: z.ZodOptional<z.ZodString>;
8750
- NODE_DEFAULT_BOXCOLOR: z.ZodOptional<z.ZodString>;
8751
- NODE_DEFAULT_SHAPE: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<RenderShape.BOX>, z.ZodLiteral<RenderShape.ROUND>, z.ZodLiteral<RenderShape.CARD>, z.ZodString]>>;
8752
- NODE_BOX_OUTLINE_COLOR: z.ZodOptional<z.ZodString>;
8753
- NODE_BYPASS_BGCOLOR: z.ZodOptional<z.ZodString>;
8754
- NODE_ERROR_COLOUR: z.ZodOptional<z.ZodString>;
8755
- DEFAULT_SHADOW_COLOR: z.ZodOptional<z.ZodString>;
8756
- WIDGET_BGCOLOR: z.ZodOptional<z.ZodString>;
8757
- WIDGET_OUTLINE_COLOR: z.ZodOptional<z.ZodString>;
8758
- WIDGET_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8759
- WIDGET_SECONDARY_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8760
- WIDGET_DISABLED_TEXT_COLOR: z.ZodOptional<z.ZodString>;
8761
- LINK_COLOR: z.ZodOptional<z.ZodString>;
8762
- EVENT_LINK_COLOR: z.ZodOptional<z.ZodString>;
8763
- CONNECTING_LINK_COLOR: z.ZodOptional<z.ZodString>;
8764
- BADGE_FG_COLOR: z.ZodOptional<z.ZodString>;
8765
- BADGE_BG_COLOR: z.ZodOptional<z.ZodString>;
8766
- }, z.core.$strip>;
8767
- comfy_base: z.ZodObject<{
8768
- "fg-color": z.ZodOptional<z.ZodString>;
8769
- "bg-color": z.ZodOptional<z.ZodString>;
8770
- "bg-img": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8771
- "comfy-menu-bg": z.ZodOptional<z.ZodString>;
8772
- "comfy-menu-secondary-bg": z.ZodOptional<z.ZodString>;
8773
- "comfy-input-bg": z.ZodOptional<z.ZodString>;
8774
- "input-text": z.ZodOptional<z.ZodString>;
8775
- "descrip-text": z.ZodOptional<z.ZodString>;
8776
- "drag-text": z.ZodOptional<z.ZodString>;
8777
- "error-text": z.ZodOptional<z.ZodString>;
8778
- "border-color": z.ZodOptional<z.ZodString>;
8779
- "tr-even-bg-color": z.ZodOptional<z.ZodString>;
8780
- "tr-odd-bg-color": z.ZodOptional<z.ZodString>;
8781
- "content-bg": z.ZodOptional<z.ZodString>;
8782
- "content-fg": z.ZodOptional<z.ZodString>;
8783
- "content-hover-bg": z.ZodOptional<z.ZodString>;
8784
- "content-hover-fg": z.ZodOptional<z.ZodString>;
8785
- "bar-shadow": z.ZodOptional<z.ZodString>;
8786
- "contrast-mix-color": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8787
- "interface-stroke": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8788
- "interface-panel-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8789
- "interface-panel-box-shadow": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8790
- "interface-panel-drop-shadow": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8791
- "interface-floating-panel-shadow": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8792
- "interface-panel-hover-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8793
- "interface-panel-selected-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8794
- "interface-button-hover-surface": z.ZodOptional<z.ZodOptional<z.ZodString>>;
8795
- }, z.core.$strip>;
8796
- theme: z.ZodOptional<z.ZodObject<{
8797
- background: z.ZodOptional<z.ZodString>;
8798
- foreground: z.ZodOptional<z.ZodString>;
8799
- card: z.ZodOptional<z.ZodString>;
8800
- popover: z.ZodOptional<z.ZodString>;
8801
- primary: z.ZodOptional<z.ZodString>;
8802
- secondary: z.ZodOptional<z.ZodString>;
8803
- muted: z.ZodOptional<z.ZodString>;
8804
- "muted-foreground": z.ZodOptional<z.ZodString>;
8805
- accent: z.ZodOptional<z.ZodString>;
8806
- destructive: z.ZodOptional<z.ZodString>;
8807
- border: z.ZodOptional<z.ZodString>;
8808
- input: z.ZodOptional<z.ZodString>;
8809
- ring: z.ZodOptional<z.ZodString>;
8810
- node: z.ZodOptional<z.ZodString>;
8811
- "node-foreground": z.ZodOptional<z.ZodString>;
8812
- "node-header": z.ZodOptional<z.ZodString>;
8813
- "node-border": z.ZodOptional<z.ZodString>;
8814
- warning: z.ZodOptional<z.ZodString>;
8815
- "shadow-color": z.ZodOptional<z.ZodString>;
8816
- }, z.core.$strip>>;
8817
- }, z.core.$strip>;
8818
- light_theme: z.ZodOptional<z.ZodBoolean>;
8819
- }, z.core.$loose>;
8820
-
8821
8641
  /**
8822
8642
  * A dialog panel created by LGraphCanvas.createPanel().
8823
8643
  * Extends HTMLDivElement with additional properties and methods for panel management.
@@ -8873,6 +8693,11 @@ declare interface PanelWidgetOptions {
8873
8693
  callback?: PanelWidgetCallback;
8874
8694
  }
8875
8695
 
8696
+ declare interface PanZoom {
8697
+ offset: Point;
8698
+ scale: number;
8699
+ }
8700
+
8876
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>>;
8877
8702
 
8878
8703
  /** An object containing a set of child objects */
@@ -8923,9 +8748,13 @@ declare type PickNevers_2<T> = {
8923
8748
  [K in keyof T as T[K] extends never ? K : never]: T[K];
8924
8749
  };
8925
8750
 
8926
- /** A point represented as `[x, y]` co-ordinates */
8927
8751
  export declare type Point = [x: number, y: number];
8928
8752
 
8753
+ declare interface Point2D {
8754
+ x: number;
8755
+ y: number;
8756
+ }
8757
+
8929
8758
  /**
8930
8759
  * An object that can be positioned, selected, and moved.
8931
8760
  *
@@ -8972,7 +8801,7 @@ declare interface Positionable extends Parent<Positionable>, HasBoundingRect {
8972
8801
 
8973
8802
  declare type PreviewMethod = 'default' | 'none' | 'auto' | 'latent2rgb' | 'taesd';
8974
8803
 
8975
- declare interface ProgressStateWsMessage {
8804
+ declare interface ProgressStateWsMessage extends StampedWorkflowId {
8976
8805
  prompt_id: JobId;
8977
8806
  nodes: Record<NodeId_2, NodeProgressState>;
8978
8807
  }
@@ -8983,7 +8812,7 @@ declare interface ProgressTextWsMessage {
8983
8812
  prompt_id?: string;
8984
8813
  }
8985
8814
 
8986
- declare interface ProgressWsMessage {
8815
+ declare interface ProgressWsMessage extends StampedWorkflowId {
8987
8816
  value: number;
8988
8817
  max: number;
8989
8818
  prompt_id: JobId;
@@ -9008,6 +8837,50 @@ export declare type PromptFailureResponse = PromptErrorResponse & PromptInfo & {
9008
8837
  node_errors?: Record<string, NodeError>;
9009
8838
  };
9010
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
+
9011
8884
  export declare type PromptResponse = PromptResponse_2 & {
9012
8885
  node_errors?: Record<string, NodeError>;
9013
8886
  exec_info?: {
@@ -9015,6 +8888,9 @@ export declare type PromptResponse = PromptResponse_2 & {
9015
8888
  };
9016
8889
  };
9017
8890
 
8891
+ /** Core's `workflow_metadata`: string keys to string values. */
8892
+ declare type PromptWorkflowMetadata = StringMap<NonNullable<PromptRequest['workflow_metadata']>>;
8893
+
9018
8894
  /**
9019
8895
  * Options for queuePrompt method
9020
8896
  */
@@ -9070,15 +8946,13 @@ export declare interface ReadonlyLinkNetwork {
9070
8946
  readonly outputNode?: RegisteredSubgraphOutputNode;
9071
8947
  }
9072
8948
 
9073
- /** A rectangle starting at top-left coordinates `[x, y, width, height]` that will not be modified */
9074
- export declare type ReadOnlyRect = readonly [x: number, y: number, width: number, height: number] | ReadOnlyTypedArray<Float64Array>;
8949
+ export declare type ReadOnlyRect = Readonly<RectTuple> | ReadOnlyTypedArray<Float64Array>;
9075
8950
 
9076
8951
  declare type ReadOnlyRectangle = Omit<ReadOnlyTypedArray<Rectangle>, 'setHeightBottomAnchored' | 'setWidthRightAnchored' | 'resizeTopLeft' | 'resizeBottomLeft' | 'resizeTopRight' | 'resizeBottomRight' | 'updateTo'>;
9077
8952
 
9078
8953
  declare type ReadOnlyTypedArray<T extends Float64Array> = Omit<Readonly<T>, 'fill' | 'copyWithin' | 'reverse' | 'set' | 'sort' | 'subarray'>;
9079
8954
 
9080
- /** A rectangle starting at top-left coordinates `[x, y, width, height]` */
9081
- export declare type Rect = [x: number, y: number, width: number, height: number] | Float64Array;
8955
+ export declare type Rect = RectTuple | Float64Array;
9082
8956
 
9083
8957
  /**
9084
8958
  * A rectangle, represented as a float64 array of 4 numbers: [x, y, width, height].
@@ -9239,10 +9113,23 @@ export declare class Rectangle extends Float64Array {
9239
9113
  /* Excluded from this release type: _drawDebug */
9240
9114
  }
9241
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
+
9242
9127
  declare type RegionType = 'obj' | 'text';
9243
9128
 
9244
9129
  declare type RegisteredBaseLGraph = BaseLGraph;
9245
9130
 
9131
+ declare type RegisteredCanvasPointer = CanvasPointer;
9132
+
9246
9133
  declare type RegisteredContextMenu<TValue = unknown> = ContextMenu<TValue>;
9247
9134
 
9248
9135
  declare type RegisteredExecutableLGraphNode = ExecutableLGraphNode;
@@ -9277,14 +9164,14 @@ declare type RegisteredMovingInputLink = MovingInputLink;
9277
9164
 
9278
9165
  declare type RegisteredMovingOutputLink = MovingOutputLink;
9279
9166
 
9167
+ declare type RegisteredRectangle = Rectangle;
9168
+
9280
9169
  declare type RegisteredRenderLink = RenderLink;
9281
9170
 
9282
9171
  declare type RegisteredReroute = Reroute;
9283
9172
 
9284
9173
  declare type RegisteredResolvedConnection = ResolvedConnection;
9285
9174
 
9286
- declare type RegisteredSerialisedLLinkArray = SerialisedLLinkArray;
9287
-
9288
9175
  declare type RegisteredSubgraph = Subgraph;
9289
9176
 
9290
9177
  declare type RegisteredSubgraphId = SubgraphId;
@@ -9626,6 +9513,15 @@ declare interface ResolvedSubgraphOutput {
9626
9513
 
9627
9514
  declare type ResultItem = z.infer<typeof zResultItem>;
9628
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
+
9629
9525
  declare interface RetrySignalLifecycle {
9630
9526
  clearInitialTimeout: () => void;
9631
9527
  createSignal: () => AbortSignal | undefined;
@@ -9706,6 +9602,8 @@ export declare interface SerialisableReroute {
9706
9602
  floating?: FloatingRerouteSlot;
9707
9603
  }
9708
9604
 
9605
+ declare type SerialisedGraphDocument = SerialisableGraph & GraphDocumentParts;
9606
+
9709
9607
  declare type SerialisedLLinkArray = [
9710
9608
  id: number,
9711
9609
  origin_id: SerializedNodeId,
@@ -9715,6 +9613,8 @@ target_slot: number,
9715
9613
  type: ISlotType
9716
9614
  ];
9717
9615
 
9616
+ declare type SerialisedSubgraphDocument = ExportedSubgraph & GraphDocumentParts;
9617
+
9718
9618
  export declare type SerializedNodeId = number | string;
9719
9619
 
9720
9620
  /**
@@ -9748,20 +9648,23 @@ declare interface SettingParams<TValue = unknown> extends FormItem {
9748
9648
  }
9749
9649
 
9750
9650
  export declare type Settings = {
9751
- 'Comfy.AgentPanel.ConsentOfferDeclined': boolean;
9651
+ 'Comfy.AgentPanel.OnboardedScopes': Array<string>;
9752
9652
  'Comfy.ColorPalette': string;
9753
- 'Comfy.CustomColorPalettes': ColorPalettes;
9653
+ 'Comfy.CustomColorPalettes': ThemePresets;
9754
9654
  'Comfy.Canvas.BackgroundImage'?: string;
9755
9655
  'Comfy.ConfirmClear': boolean;
9756
9656
  'Comfy.DevMode': boolean;
9657
+ 'Comfy.Agent.CrdtDebug.Level': 'warn' | 'info' | 'debug' | 'trace';
9757
9658
  'Comfy.Appearance.DisableAnimations': boolean;
9758
9659
  'Comfy.UI.TabBarLayout': 'Default' | 'Legacy';
9759
9660
  'Comfy.Workflow.ShowMissingModelsWarning': boolean;
9760
9661
  'Comfy.ErrorSystem.ShowMissingModels': boolean;
9761
- 'Comfy.Workflow.ShowMissingNodesWarning': boolean;
9662
+ 'Comfy.ErrorSystem.ShowMissingNodes': boolean;
9762
9663
  'Comfy.Workflow.ShowMissingMediaWarning': boolean;
9763
9664
  'Comfy.Workflow.WarnBlueprintOverwrite': boolean;
9665
+ 'Comfy.Cloud.AskBeforeCompatibilityCheck': boolean;
9764
9666
  'Comfy.Desktop.CloudNotificationShown': boolean;
9667
+ 'Comfy.DeploymentSwitcher.Seen': boolean;
9765
9668
  'Comfy.DisableFloatRounding': boolean;
9766
9669
  'Comfy.DisableSliders': boolean;
9767
9670
  'Comfy.DOMClippingEnabled': boolean;
@@ -9811,6 +9714,12 @@ export declare type Settings = {
9811
9714
  'Comfy.Sidebar.UnifiedWidth': boolean;
9812
9715
  'Comfy.Sidebar.Style': 'floating' | 'connected';
9813
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;
9814
9723
  'Comfy.TextareaWidget.FontSize': number;
9815
9724
  'Comfy.TextareaWidget.Spellcheck': boolean;
9816
9725
  'Comfy.UseNewMenu': 'Disabled' | 'Top';
@@ -9836,6 +9745,8 @@ export declare type Settings = {
9836
9745
  'Comfy.Keybinding.NewBindings': Array<Keybinding>;
9837
9746
  'Comfy.Keybinding.CurrentPreset': string;
9838
9747
  'Comfy.Extension.Disabled': Array<string>;
9748
+ 'Comfy.Extension.SeenAgentExtensions': Array<string>;
9749
+ 'Comfy.Extension.DisabledPacks': Array<string>;
9839
9750
  'Comfy.LinkRenderMode': number;
9840
9751
  'Comfy.Node.AutoSnapLinkToSlot': boolean;
9841
9752
  'Comfy.Node.SnapHighlightsNode': boolean;
@@ -9858,6 +9769,7 @@ export declare type Settings = {
9858
9769
  'Comfy.OnboardingCoachmarks.Seen': Array<string>;
9859
9770
  'Comfy.InstalledVersion': string | null;
9860
9771
  'Comfy.Node.AllowImageSizeDraw': boolean;
9772
+ 'Comfy.Node.DownscaleImagePreviews': boolean;
9861
9773
  'Comfy.Minimap.Visible': boolean;
9862
9774
  'Comfy.Minimap.NodeColors': boolean;
9863
9775
  'Comfy.Minimap.ShowLinks': boolean;
@@ -9868,6 +9780,7 @@ export declare type Settings = {
9868
9780
  'Comfy.Canvas.LeftMouseClickBehavior': string;
9869
9781
  'Comfy.Canvas.MouseWheelScroll': string;
9870
9782
  'Comfy.VueNodes.Enabled': boolean;
9783
+ 'Comfy.VueNodes.HideSafeModelExtensions': boolean;
9871
9784
  'Comfy.AppBuilder.VueNodeSwitchDismissed': boolean;
9872
9785
  'Comfy.PartnerNodesEducation.Dismissed': boolean;
9873
9786
  'Comfy.ModelLibrary.UseAssetBrowser': boolean;
@@ -9899,7 +9812,8 @@ export declare type Settings = {
9899
9812
  'Comfy.Templates.SelectedModels': Array<string>;
9900
9813
  'Comfy.Templates.SelectedUseCases': Array<string>;
9901
9814
  'Comfy.Templates.SelectedRunsOn': Array<string>;
9902
- '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';
9903
9817
  'LiteGraph.Node.DefaultPadding': boolean;
9904
9818
  'LiteGraph.Pointer.TrackpadGestures': boolean;
9905
9819
  'Comfy.VersionCompatibility.DisableWarnings': boolean;
@@ -9958,9 +9872,13 @@ export declare type SidebarTabExtension = VueSidebarTabExtension | CustomSidebar
9958
9872
  /** Keys (names) of API events that _do not_ pass a {@link CustomEvent} `detail` object. */
9959
9873
  declare type SimpleApiEvents = keyof PickNevers<ApiEventTypes>;
9960
9874
 
9961
- /** A size represented as `[width, height]` */
9962
9875
  export declare type Size = [width: number, height: number];
9963
9876
 
9877
+ declare interface Size2D {
9878
+ width: number;
9879
+ height: number;
9880
+ }
9881
+
9964
9882
  declare class SliderWidget extends BaseWidget<ISliderWidget> implements ISliderWidget {
9965
9883
  marker?: number;
9966
9884
  /**
@@ -10043,6 +9961,24 @@ declare interface SlotTypeDefaultNodeOpts {
10043
9961
  json?: Parameters<LGraphNode['configure']>[0];
10044
9962
  }
10045
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
+
10046
9982
  declare interface StatusWsMessage {
10047
9983
  status?: StatusWsMessageStatus | null;
10048
9984
  sid?: string | null;
@@ -10050,9 +9986,11 @@ declare interface StatusWsMessage {
10050
9986
 
10051
9987
  declare type StatusWsMessageStatus = PromptInfo;
10052
9988
 
9989
+ declare type StringMap<T extends Record<string, string>> = T;
9990
+
10053
9991
  /** A subgraph definition. */
10054
9992
  export declare class Subgraph extends LGraph implements BaseLGraph, Serialisable<ExportedSubgraph> {
10055
- 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">;
10056
9994
  /** Limits the number of levels / depth that subgraphs may be nested. Prevents uncontrolled programmatic nesting. */
10057
9995
  static MAX_NESTED_SUBGRAPHS: number;
10058
9996
  /** The display name of the subgraph. */
@@ -10076,7 +10014,9 @@ export declare class Subgraph extends LGraph implements BaseLGraph, Serialisable
10076
10014
  clone(): Subgraph;
10077
10015
  getIoNodeOnPos(x: number, y: number): SubgraphInputNode | SubgraphOutputNode | undefined;
10078
10016
  private _configureSubgraph;
10079
- 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;
10080
10020
  attachCanvas(canvas: RegisteredLGraphCanvas): void;
10081
10021
  addInput(name: string | null, type: string | null): SubgraphInput;
10082
10022
  addOutput(name: string | null, type: string | null): SubgraphOutput;
@@ -10103,7 +10043,7 @@ export declare class Subgraph extends LGraph implements BaseLGraph, Serialisable
10103
10043
  */
10104
10044
  removeOutput(output: SubgraphOutput): void;
10105
10045
  draw(ctx: CanvasRenderingContext2D, colorContext: DefaultConnectionColors, fromSlot?: INodeInputSlot | INodeOutputSlot | SubgraphInput | SubgraphOutput, editorAlpha?: number): void;
10106
- asSerialisable(): ExportedSubgraph & Required<Pick<SerialisableGraph, 'nodes' | 'groups' | 'extra'>>;
10046
+ asSerialisable(): SerialisedSubgraphDocument;
10107
10047
  }
10108
10048
 
10109
10049
  declare interface SubgraphDefinitionBase<T extends ComfyWorkflow1BaseInput | ComfyWorkflow1BaseOutput> {
@@ -10158,6 +10098,11 @@ declare interface SubgraphEventMap extends LGraphEventMap {
10158
10098
  oldOrder: readonly string[];
10159
10099
  newOrder: readonly string[];
10160
10100
  };
10101
+ 'outputs-reordered': {
10102
+ subgraph: RegisteredSubgraph;
10103
+ oldOrder: readonly string[];
10104
+ newOrder: readonly string[];
10105
+ };
10161
10106
  'renaming-input': {
10162
10107
  input: RegisteredSubgraphInput;
10163
10108
  index: number;
@@ -10199,7 +10144,7 @@ export declare type SubgraphId = UUID;
10199
10144
  */
10200
10145
  export declare class SubgraphInput extends SubgraphSlot {
10201
10146
  parent: RegisteredSubgraphInputNode;
10202
- 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">;
10203
10148
  /** The linked widget that this slot is connected to. */
10204
10149
  private _widgetRef?;
10205
10150
  get _widget(): IBaseWidget< WidgetValue, string, IWidgetOptions<unknown>> | undefined;
@@ -10238,11 +10183,12 @@ declare interface SubgraphInputEventMap extends LGraphEventMap {
10238
10183
 
10239
10184
  declare class SubgraphInputNode extends SubgraphIONodeBase<RegisteredSubgraphInput> implements Positionable {
10240
10185
  readonly id: NodeId;
10186
+ readonly slotDirection = "output";
10241
10187
  readonly emptySlot: EmptySubgraphInput;
10242
10188
  get slots(): RegisteredSubgraphInput[];
10243
10189
  get allSlots(): RegisteredSubgraphInput[];
10244
- get slotAnchorX(): number;
10245
- onPointerDown(e: CanvasPointerEvent, pointer: CanvasPointer, linkConnector: RegisteredLinkConnector): void;
10190
+ protected fitSize(width: number, height: number): Point;
10191
+ protected dragNewLink(linkConnector: RegisteredLinkConnector, slot: RegisteredSubgraphInput): void;
10246
10192
  /** @inheritdoc */
10247
10193
  renameSlot(slot: RegisteredSubgraphInput, name: string): void;
10248
10194
  /** @inheritdoc */
@@ -10274,8 +10220,11 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10274
10220
  static margin: number;
10275
10221
  static minWidth: number;
10276
10222
  static roundedRadius: number;
10277
- private readonly _boundingRect;
10278
10223
  abstract readonly id: NodeId;
10224
+ abstract readonly slotDirection: SlotDirection;
10225
+ private fitted;
10226
+ private get measuredSize();
10227
+ private get layoutRect();
10279
10228
  get boundingRect(): Rectangle;
10280
10229
  get selected(): boolean;
10281
10230
  set selected(value: boolean);
@@ -10297,9 +10246,10 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10297
10246
  move(deltaX: number, deltaY: number): void;
10298
10247
  /** @inheritdoc */
10299
10248
  snapToGrid(snapTo: number): boolean;
10300
- 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;
10301
10251
  containsPoint(point: Point): boolean;
10302
- abstract get slotAnchorX(): number;
10252
+ get slotAnchorX(): number;
10303
10253
  onPointerMove(e: CanvasPointerEvent): CanvasItem;
10304
10254
  onPointerEnter(): void;
10305
10255
  onPointerLeave(): void;
@@ -10339,6 +10289,7 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10339
10289
  * @returns The context menu options.
10340
10290
  */
10341
10291
  private _getSlotMenuOptions;
10292
+ private _getSlotLinksToHide;
10342
10293
  /**
10343
10294
  * Handles the action for an IO slot context menu.
10344
10295
  * @param selectedItem The item that was selected from the context menu.
@@ -10352,8 +10303,8 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10352
10303
  * @param event The event that triggered the rename.
10353
10304
  */
10354
10305
  private _promptForSlotRename;
10355
- /** Arrange the slots in this node. */
10356
10306
  arrange(): void;
10307
+ protected fitSize(width: number, height: number): Point;
10357
10308
  draw(ctx: CanvasRenderingContext2D, colorContext: DefaultConnectionColors, fromSlot?: INodeInputSlot | INodeOutputSlot | RegisteredSubgraphInput | RegisteredSubgraphOutput, editorAlpha?: number): void;
10358
10309
  /* Excluded from this release type: drawProtected */
10359
10310
  /* Excluded from this release type: drawSlots */
@@ -10390,13 +10341,16 @@ export declare class SubgraphNode extends LGraphNode implements RegisteredBaseLG
10390
10341
  onTitleButtonClick(button: LGraphButton, canvas: RegisteredLGraphCanvas): void;
10391
10342
  private _projectPromotedWidget;
10392
10343
  private _addSubgraphInputListeners;
10344
+ private _demoteInputWidget;
10393
10345
  private _rebindInputSubgraphSlots;
10394
10346
  configure(info: ExportedSubgraphInstance): void;
10395
10347
  private _applyPromotedWidgetValues;
10348
+ private _serializedInputWidgets;
10396
10349
  private _readQuarantineHostValuesByName;
10397
10350
  _internalConfigureAfterSlots(): void;
10398
10351
  private _hydratePreviewExposures;
10399
10352
  rebuildInputWidgetBindings(): void;
10353
+ private _bindsRemainingLink;
10400
10354
  private _resolveInputWidget;
10401
10355
  private _resolveNestedPromotedSource;
10402
10356
  private _setWidget;
@@ -10405,6 +10359,10 @@ export declare class SubgraphNode extends LGraphNode implements RegisteredBaseLG
10405
10359
  * store-backed projection. Litegraph core stays free of Vue/Pinia/DOM.
10406
10360
  */
10407
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;
10408
10366
  /**
10409
10367
  * Runs the host widget's `onRemove` (unregistering DOM widgets) and clears it.
10410
10368
  * Unlike {@link ensureWidgetRemoved}, dispatches no demotion event, so it is
@@ -10475,11 +10433,11 @@ export declare class SubgraphOutput extends SubgraphSlot {
10475
10433
 
10476
10434
  declare class SubgraphOutputNode extends SubgraphIONodeBase<RegisteredSubgraphOutput> implements Positionable {
10477
10435
  readonly id: NodeId;
10436
+ readonly slotDirection = "input";
10478
10437
  readonly emptySlot: EmptySubgraphOutput;
10479
10438
  get slots(): RegisteredSubgraphOutput[];
10480
10439
  get allSlots(): RegisteredSubgraphOutput[];
10481
- get slotAnchorX(): number;
10482
- onPointerDown(e: CanvasPointerEvent, pointer: CanvasPointer, linkConnector: RegisteredLinkConnector): void;
10440
+ protected dragNewLink(linkConnector: RegisteredLinkConnector, slot: RegisteredSubgraphOutput): void;
10483
10441
  /** @inheritdoc */
10484
10442
  renameSlot(slot: RegisteredSubgraphOutput, name: string): void;
10485
10443
  /** @inheritdoc */
@@ -10563,6 +10521,18 @@ declare interface SubscriptionDialogOptions {
10563
10521
  planMode?: 'personal' | 'team';
10564
10522
  /** Starts checkout in workspace billing dialogs; legacy billing stays table-only. */
10565
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;
10566
10536
  }
10567
10537
 
10568
10538
  export declare type SystemStats = {
@@ -10748,6 +10718,8 @@ export declare interface ToastMessageOptions {
10748
10718
 
10749
10719
  export declare interface ToastOptions {
10750
10720
  action?: ToastAction;
10721
+ /** Additional actions rendered after the legacy single action. */
10722
+ actions?: ToastAction[];
10751
10723
  closable?: boolean;
10752
10724
  description?: string;
10753
10725
  duration?: number;
@@ -10995,13 +10967,16 @@ declare class UserFile {
10995
10967
  * Saves the file to the remote storage.
10996
10968
  * @param force Whether to force the save even if the file is not modified.
10997
10969
  */
10998
- save({ force }?: {
10999
- force?: boolean;
11000
- }): Promise<UserFile>;
10970
+ save({ force, overwrite }?: UserFileSaveOptions): Promise<UserFile>;
11001
10971
  delete(): Promise<void>;
11002
10972
  rename(newPath: string): Promise<UserFile>;
11003
10973
  }
11004
10974
 
10975
+ declare interface UserFileSaveOptions {
10976
+ force?: boolean;
10977
+ overwrite?: boolean;
10978
+ }
10979
+
11005
10980
  /**
11006
10981
  * Identifier for an authenticated user.
11007
10982
  *
@@ -11016,6 +10991,10 @@ declare type UUID = string;
11016
10991
  /** @deprecated Use {@link Point} instead. */
11017
10992
  declare type Vector2 = Point;
11018
10993
 
10994
+ declare interface VideoConcatValue {
10995
+ order?: string[];
10996
+ }
10997
+
11019
10998
  export declare type VideoEditFeature = 'trim' | 'crop';
11020
10999
 
11021
11000
  export declare interface VideoEditTrim {
@@ -11057,17 +11036,6 @@ declare type WhenNullish<T, Result> = (T & {}) | (T extends null ? Result : T ex
11057
11036
 
11058
11037
  declare const WIDGET_SURFACE_TIERS: readonly ["shown", "advanced", "never"];
11059
11038
 
11060
- /**
11061
- * Widget visibility as a data-oriented component (ADR-ECS-0008,
11062
- * ADR-ECS-WIDGETS-0023).
11063
- *
11064
- * Static, registration-time policy lives in {@link WidgetSurfaces}: one tier
11065
- * per rendering surface. Dynamic, runtime state lives in
11066
- * {@link WidgetSuppression}: orthogonal boolean reasons a widget is currently
11067
- * not rendered anywhere. Surfaces resolve visibility with
11068
- * {@link isWidgetVisibleOnSurface}; legacy `hidden` / `hideInPanel` /
11069
- * `advanced` / `canvasOnly` fields are facades over this component.
11070
- */
11071
11039
  declare const WIDGET_SURFACES: readonly ["canvas", "vueNode", "panel"];
11072
11040
 
11073
11041
  export declare interface WidgetCallbackOptions {
@@ -11089,6 +11057,14 @@ declare type WidgetId = string & {
11089
11057
  readonly __brand: 'WidgetId';
11090
11058
  };
11091
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
+
11092
11068
  declare type Widgets = Record<string, CustomComfyWidgetConstructor>;
11093
11069
 
11094
11070
  declare interface WidgetSuppression {
@@ -11139,6 +11115,9 @@ export declare type WidgetTypeMap = {
11139
11115
 
11140
11116
  declare type WidgetValue = string | number | boolean | object | undefined | null;
11141
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
+
11142
11121
  declare interface WidgetVisibilityComponent {
11143
11122
  surfaces: WidgetSurfaces;
11144
11123
  suppression: WidgetSuppression;
@@ -11156,11 +11135,14 @@ declare interface WorkflowChangeTracker {
11156
11135
  undoQueue: ComfyWorkflowJSON[];
11157
11136
  redoQueue: ComfyWorkflowJSON[];
11158
11137
  changeCount: number;
11138
+ readonly hasPreview: boolean;
11159
11139
  _restoringState: boolean;
11160
11140
  ds?: {
11161
11141
  scale: number;
11162
11142
  offset: [number, number];
11163
11143
  };
11144
+ /** Whether the graph had no nodes when the view was last stored. */
11145
+ leftEmpty: boolean;
11164
11146
  nodeOutputs?: Partial<Record<string, ExecutedWsMessage['output']>>;
11165
11147
  reset(state?: ComfyWorkflowJSON): void;
11166
11148
  store(): void;
@@ -11169,6 +11151,8 @@ declare interface WorkflowChangeTracker {
11169
11151
  restore(): void;
11170
11152
  updateModified(previousState?: ComfyWorkflowJSON): void;
11171
11153
  captureCanvasState(): void;
11154
+ markModified(): void;
11155
+ beginPreview(interrupt: () => void, rollback?: () => void): () => void;
11172
11156
  checkState(): void;
11173
11157
  updateState(source: ComfyWorkflowJSON[], target: ComfyWorkflowJSON[]): Promise<void>;
11174
11158
  undo(): Promise<void>;
@@ -11193,6 +11177,9 @@ declare interface WorkflowImportMetadata {
11193
11177
  share_id?: string;
11194
11178
  }
11195
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
+
11196
11183
  /**
11197
11184
  * Workflow open metadata
11198
11185
  */
@@ -11205,7 +11192,10 @@ declare interface WorkflowQueueIntent {
11205
11192
  trigger_source?: ExecutionTriggerSource;
11206
11193
  }
11207
11194
 
11195
+ declare type WorkflowRenameResult = boolean | 'bookmarks-not-updated';
11196
+
11208
11197
  declare interface WorkflowStore {
11198
+ provideChangeTracker: (tracker: ChangeTrackerConstructor) => void;
11209
11199
  activeWorkflow: LoadedComfyWorkflow | null;
11210
11200
  attachWorkflow: (workflow: ComfyWorkflow, openIndex?: number) => void;
11211
11201
  isActive: (workflow: ComfyWorkflow) => boolean;
@@ -11222,10 +11212,12 @@ declare interface WorkflowStore {
11222
11212
  closeWorkflow: (workflow: ComfyWorkflow) => Promise<void>;
11223
11213
  createTemporary: (path?: string, workflowData?: ComfyWorkflowJSON) => ComfyWorkflow;
11224
11214
  createNewTemporary: (path?: string, workflowData?: ComfyWorkflowJSON) => ComfyWorkflow;
11225
- renameWorkflow: (workflow: ComfyWorkflow, newPath: string) => Promise<void>;
11226
- deleteWorkflow: (workflow: ComfyWorkflow) => Promise<void>;
11215
+ renameWorkflow: (workflow: ComfyWorkflow, newPath: string) => Promise<WorkflowRenameResult>;
11216
+ deleteWorkflow: (workflow: ComfyWorkflow) => Promise<boolean>;
11227
11217
  saveAs: (existingWorkflow: ComfyWorkflow, path: string) => ComfyWorkflow;
11228
- saveWorkflow: (workflow: ComfyWorkflow) => Promise<void>;
11218
+ saveWorkflow: (workflow: ComfyWorkflow, options?: {
11219
+ overwrite?: boolean;
11220
+ }) => Promise<void>;
11229
11221
  workflows: ComfyWorkflow[];
11230
11222
  bookmarkedWorkflows: ComfyWorkflow[];
11231
11223
  persistedWorkflows: ComfyWorkflow[];
@@ -11235,6 +11227,14 @@ declare interface WorkflowStore {
11235
11227
  isSyncLoading: boolean;
11236
11228
  loadWorkflows: () => Promise<void>;
11237
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;
11238
11238
  /** `true` if any subgraph is currently being viewed. */
11239
11239
  isSubgraphActive: boolean;
11240
11240
  activeSubgraph: Subgraph | undefined;
@@ -11308,6 +11308,7 @@ declare const zComfyNode: z.ZodObject<{
11308
11308
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
11309
11309
  horizontal: z.ZodOptional<z.ZodBoolean>;
11310
11310
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11311
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
11311
11312
  }, z.core.$loose>;
11312
11313
  order: z.ZodNumber;
11313
11314
  mode: z.ZodNumber;
@@ -11341,496 +11342,6 @@ declare const zComfyNode: z.ZodObject<{
11341
11342
  bgcolor: z.ZodOptional<z.ZodString>;
11342
11343
  }, z.core.$loose>;
11343
11344
 
11344
- declare const zComfyNodeDef: z.ZodObject<{
11345
- inputs: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
11346
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11347
- display_name: z.ZodOptional<z.ZodString>;
11348
- forceInput: z.ZodOptional<z.ZodBoolean>;
11349
- tooltip: z.ZodOptional<z.ZodString>;
11350
- socketless: z.ZodOptional<z.ZodBoolean>;
11351
- hidden: z.ZodOptional<z.ZodBoolean>;
11352
- advanced: z.ZodOptional<z.ZodBoolean>;
11353
- widgetType: z.ZodOptional<z.ZodString>;
11354
- rawLink: z.ZodOptional<z.ZodBoolean>;
11355
- lazy: z.ZodOptional<z.ZodBoolean>;
11356
- min: z.ZodOptional<z.ZodNumber>;
11357
- max: z.ZodOptional<z.ZodNumber>;
11358
- step: z.ZodOptional<z.ZodNumber>;
11359
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
11360
- display: z.ZodOptional<z.ZodEnum<{
11361
- number: "number";
11362
- slider: "slider";
11363
- knob: "knob";
11364
- gradientslider: "gradientslider";
11365
- color: "color";
11366
- }>>;
11367
- control_after_generate: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
11368
- fixed: "fixed";
11369
- increment: "increment";
11370
- decrement: "decrement";
11371
- randomize: "randomize";
11372
- }>]>>;
11373
- type: z.ZodLiteral<"INT">;
11374
- name: z.ZodString;
11375
- isOptional: z.ZodOptional<z.ZodBoolean>;
11376
- }, z.core.$loose>, z.ZodObject<{
11377
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11378
- display_name: z.ZodOptional<z.ZodString>;
11379
- forceInput: z.ZodOptional<z.ZodBoolean>;
11380
- tooltip: z.ZodOptional<z.ZodString>;
11381
- socketless: z.ZodOptional<z.ZodBoolean>;
11382
- hidden: z.ZodOptional<z.ZodBoolean>;
11383
- advanced: z.ZodOptional<z.ZodBoolean>;
11384
- widgetType: z.ZodOptional<z.ZodString>;
11385
- rawLink: z.ZodOptional<z.ZodBoolean>;
11386
- lazy: z.ZodOptional<z.ZodBoolean>;
11387
- min: z.ZodOptional<z.ZodNumber>;
11388
- max: z.ZodOptional<z.ZodNumber>;
11389
- step: z.ZodOptional<z.ZodNumber>;
11390
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
11391
- display: z.ZodOptional<z.ZodEnum<{
11392
- number: "number";
11393
- slider: "slider";
11394
- knob: "knob";
11395
- gradientslider: "gradientslider";
11396
- }>>;
11397
- round: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>]>>;
11398
- gradient_stops: z.ZodOptional<z.ZodArray<z.ZodObject<{
11399
- offset: z.ZodNumber;
11400
- color: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
11401
- }, z.core.$strip>>>;
11402
- type: z.ZodLiteral<"FLOAT">;
11403
- name: z.ZodString;
11404
- isOptional: z.ZodOptional<z.ZodBoolean>;
11405
- }, z.core.$loose>, z.ZodObject<{
11406
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11407
- display_name: z.ZodOptional<z.ZodString>;
11408
- forceInput: z.ZodOptional<z.ZodBoolean>;
11409
- tooltip: z.ZodOptional<z.ZodString>;
11410
- socketless: z.ZodOptional<z.ZodBoolean>;
11411
- hidden: z.ZodOptional<z.ZodBoolean>;
11412
- advanced: z.ZodOptional<z.ZodBoolean>;
11413
- widgetType: z.ZodOptional<z.ZodString>;
11414
- rawLink: z.ZodOptional<z.ZodBoolean>;
11415
- lazy: z.ZodOptional<z.ZodBoolean>;
11416
- label_on: z.ZodOptional<z.ZodString>;
11417
- label_off: z.ZodOptional<z.ZodString>;
11418
- default: z.ZodOptional<z.ZodBoolean>;
11419
- type: z.ZodLiteral<"BOOLEAN">;
11420
- name: z.ZodString;
11421
- isOptional: z.ZodOptional<z.ZodBoolean>;
11422
- }, z.core.$loose>, z.ZodObject<{
11423
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11424
- display_name: z.ZodOptional<z.ZodString>;
11425
- forceInput: z.ZodOptional<z.ZodBoolean>;
11426
- tooltip: z.ZodOptional<z.ZodString>;
11427
- socketless: z.ZodOptional<z.ZodBoolean>;
11428
- hidden: z.ZodOptional<z.ZodBoolean>;
11429
- advanced: z.ZodOptional<z.ZodBoolean>;
11430
- widgetType: z.ZodOptional<z.ZodString>;
11431
- rawLink: z.ZodOptional<z.ZodBoolean>;
11432
- lazy: z.ZodOptional<z.ZodBoolean>;
11433
- default: z.ZodOptional<z.ZodString>;
11434
- multiline: z.ZodOptional<z.ZodBoolean>;
11435
- dynamicPrompts: z.ZodOptional<z.ZodBoolean>;
11436
- defaultVal: z.ZodOptional<z.ZodString>;
11437
- placeholder: z.ZodOptional<z.ZodString>;
11438
- type: z.ZodLiteral<"STRING">;
11439
- name: z.ZodString;
11440
- isOptional: z.ZodOptional<z.ZodBoolean>;
11441
- }, z.core.$loose>, z.ZodObject<{
11442
- default: z.ZodOptional<z.ZodAny>;
11443
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11444
- display_name: z.ZodOptional<z.ZodString>;
11445
- forceInput: z.ZodOptional<z.ZodBoolean>;
11446
- tooltip: z.ZodOptional<z.ZodString>;
11447
- socketless: z.ZodOptional<z.ZodBoolean>;
11448
- hidden: z.ZodOptional<z.ZodBoolean>;
11449
- advanced: z.ZodOptional<z.ZodBoolean>;
11450
- widgetType: z.ZodOptional<z.ZodString>;
11451
- rawLink: z.ZodOptional<z.ZodBoolean>;
11452
- lazy: z.ZodOptional<z.ZodBoolean>;
11453
- control_after_generate: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
11454
- fixed: "fixed";
11455
- increment: "increment";
11456
- decrement: "decrement";
11457
- randomize: "randomize";
11458
- }>]>>;
11459
- image_upload: z.ZodOptional<z.ZodBoolean>;
11460
- image_folder: z.ZodOptional<z.ZodEnum<{
11461
- input: "input";
11462
- output: "output";
11463
- temp: "temp";
11464
- }>>;
11465
- allow_batch: z.ZodOptional<z.ZodBoolean>;
11466
- video_upload: z.ZodOptional<z.ZodBoolean>;
11467
- audio_upload: z.ZodOptional<z.ZodBoolean>;
11468
- mesh_upload: z.ZodOptional<z.ZodBoolean>;
11469
- upload_subfolder: z.ZodOptional<z.ZodString>;
11470
- animated_image_upload: z.ZodOptional<z.ZodBoolean>;
11471
- options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
11472
- remote: z.ZodOptional<z.ZodObject<{
11473
- route: z.ZodUnion<[z.ZodString, z.ZodString]>;
11474
- refresh: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNumber]>>;
11475
- response_key: z.ZodOptional<z.ZodString>;
11476
- query_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
11477
- refresh_button: z.ZodOptional<z.ZodBoolean>;
11478
- control_after_refresh: z.ZodOptional<z.ZodEnum<{
11479
- first: "first";
11480
- last: "last";
11481
- }>>;
11482
- timeout: z.ZodOptional<z.ZodNumber>;
11483
- max_retries: z.ZodOptional<z.ZodNumber>;
11484
- }, z.core.$strip>>;
11485
- multi_select: z.ZodOptional<z.ZodObject<{
11486
- placeholder: z.ZodOptional<z.ZodString>;
11487
- chip: z.ZodOptional<z.ZodBoolean>;
11488
- }, z.core.$strip>>;
11489
- type: z.ZodLiteral<"COMBO">;
11490
- name: z.ZodString;
11491
- isOptional: z.ZodOptional<z.ZodBoolean>;
11492
- }, z.core.$loose>, z.ZodObject<{
11493
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11494
- display_name: z.ZodOptional<z.ZodString>;
11495
- forceInput: z.ZodOptional<z.ZodBoolean>;
11496
- tooltip: z.ZodOptional<z.ZodString>;
11497
- socketless: z.ZodOptional<z.ZodBoolean>;
11498
- hidden: z.ZodOptional<z.ZodBoolean>;
11499
- advanced: z.ZodOptional<z.ZodBoolean>;
11500
- widgetType: z.ZodOptional<z.ZodString>;
11501
- rawLink: z.ZodOptional<z.ZodBoolean>;
11502
- lazy: z.ZodOptional<z.ZodBoolean>;
11503
- type: z.ZodLiteral<"COLOR">;
11504
- name: z.ZodString;
11505
- isOptional: z.ZodOptional<z.ZodBoolean>;
11506
- default: z.ZodOptional<z.ZodString>;
11507
- options: z.ZodOptional<z.ZodObject<{
11508
- default: z.ZodOptional<z.ZodString>;
11509
- }, z.core.$strip>>;
11510
- }, z.core.$loose>, z.ZodObject<{
11511
- default: z.ZodOptional<z.ZodAny>;
11512
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11513
- display_name: z.ZodOptional<z.ZodString>;
11514
- forceInput: z.ZodOptional<z.ZodBoolean>;
11515
- tooltip: z.ZodOptional<z.ZodString>;
11516
- socketless: z.ZodOptional<z.ZodBoolean>;
11517
- hidden: z.ZodOptional<z.ZodBoolean>;
11518
- advanced: z.ZodOptional<z.ZodBoolean>;
11519
- widgetType: z.ZodOptional<z.ZodString>;
11520
- rawLink: z.ZodOptional<z.ZodBoolean>;
11521
- lazy: z.ZodOptional<z.ZodBoolean>;
11522
- type: z.ZodLiteral<"IMAGE">;
11523
- name: z.ZodString;
11524
- isOptional: z.ZodOptional<z.ZodBoolean>;
11525
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11526
- }, z.core.$loose>, z.ZodObject<{
11527
- default: z.ZodOptional<z.ZodAny>;
11528
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11529
- display_name: z.ZodOptional<z.ZodString>;
11530
- forceInput: z.ZodOptional<z.ZodBoolean>;
11531
- tooltip: z.ZodOptional<z.ZodString>;
11532
- socketless: z.ZodOptional<z.ZodBoolean>;
11533
- hidden: z.ZodOptional<z.ZodBoolean>;
11534
- advanced: z.ZodOptional<z.ZodBoolean>;
11535
- widgetType: z.ZodOptional<z.ZodString>;
11536
- rawLink: z.ZodOptional<z.ZodBoolean>;
11537
- lazy: z.ZodOptional<z.ZodBoolean>;
11538
- type: z.ZodLiteral<"IMAGECOMPARE">;
11539
- name: z.ZodString;
11540
- isOptional: z.ZodOptional<z.ZodBoolean>;
11541
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11542
- }, z.core.$loose>, z.ZodObject<{
11543
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11544
- display_name: z.ZodOptional<z.ZodString>;
11545
- forceInput: z.ZodOptional<z.ZodBoolean>;
11546
- tooltip: z.ZodOptional<z.ZodString>;
11547
- socketless: z.ZodOptional<z.ZodBoolean>;
11548
- hidden: z.ZodOptional<z.ZodBoolean>;
11549
- advanced: z.ZodOptional<z.ZodBoolean>;
11550
- widgetType: z.ZodOptional<z.ZodString>;
11551
- rawLink: z.ZodOptional<z.ZodBoolean>;
11552
- lazy: z.ZodOptional<z.ZodBoolean>;
11553
- type: z.ZodLiteral<"BOUNDING_BOX">;
11554
- name: z.ZodString;
11555
- isOptional: z.ZodOptional<z.ZodBoolean>;
11556
- component: z.ZodOptional<z.ZodEnum<{
11557
- ImageCrop: "ImageCrop";
11558
- }>>;
11559
- default: z.ZodOptional<z.ZodObject<{
11560
- x: z.ZodNumber;
11561
- y: z.ZodNumber;
11562
- width: z.ZodNumber;
11563
- height: z.ZodNumber;
11564
- }, z.core.$strip>>;
11565
- }, z.core.$loose>, z.ZodObject<{
11566
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11567
- display_name: z.ZodOptional<z.ZodString>;
11568
- forceInput: z.ZodOptional<z.ZodBoolean>;
11569
- tooltip: z.ZodOptional<z.ZodString>;
11570
- socketless: z.ZodOptional<z.ZodBoolean>;
11571
- hidden: z.ZodOptional<z.ZodBoolean>;
11572
- advanced: z.ZodOptional<z.ZodBoolean>;
11573
- widgetType: z.ZodOptional<z.ZodString>;
11574
- rawLink: z.ZodOptional<z.ZodBoolean>;
11575
- lazy: z.ZodOptional<z.ZodBoolean>;
11576
- type: z.ZodLiteral<"MARKDOWN">;
11577
- name: z.ZodString;
11578
- isOptional: z.ZodOptional<z.ZodBoolean>;
11579
- default: z.ZodOptional<z.ZodString>;
11580
- }, z.core.$loose>, z.ZodObject<{
11581
- default: z.ZodOptional<z.ZodAny>;
11582
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11583
- display_name: z.ZodOptional<z.ZodString>;
11584
- forceInput: z.ZodOptional<z.ZodBoolean>;
11585
- tooltip: z.ZodOptional<z.ZodString>;
11586
- socketless: z.ZodOptional<z.ZodBoolean>;
11587
- hidden: z.ZodOptional<z.ZodBoolean>;
11588
- advanced: z.ZodOptional<z.ZodBoolean>;
11589
- widgetType: z.ZodOptional<z.ZodString>;
11590
- rawLink: z.ZodOptional<z.ZodBoolean>;
11591
- lazy: z.ZodOptional<z.ZodBoolean>;
11592
- type: z.ZodLiteral<"CHART">;
11593
- name: z.ZodString;
11594
- isOptional: z.ZodOptional<z.ZodBoolean>;
11595
- chartType: z.ZodOptional<z.ZodEnum<{
11596
- line: "line";
11597
- bar: "bar";
11598
- }>>;
11599
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11600
- options: z.ZodOptional<z.ZodObject<{
11601
- type: z.ZodOptional<z.ZodEnum<{
11602
- line: "line";
11603
- bar: "bar";
11604
- }>>;
11605
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11606
- }, z.core.$strip>>;
11607
- }, z.core.$loose>, z.ZodObject<{
11608
- default: z.ZodOptional<z.ZodAny>;
11609
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11610
- display_name: z.ZodOptional<z.ZodString>;
11611
- forceInput: z.ZodOptional<z.ZodBoolean>;
11612
- tooltip: z.ZodOptional<z.ZodString>;
11613
- socketless: z.ZodOptional<z.ZodBoolean>;
11614
- hidden: z.ZodOptional<z.ZodBoolean>;
11615
- advanced: z.ZodOptional<z.ZodBoolean>;
11616
- widgetType: z.ZodOptional<z.ZodString>;
11617
- rawLink: z.ZodOptional<z.ZodBoolean>;
11618
- lazy: z.ZodOptional<z.ZodBoolean>;
11619
- type: z.ZodLiteral<"GALLERIA">;
11620
- name: z.ZodString;
11621
- isOptional: z.ZodOptional<z.ZodBoolean>;
11622
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
11623
- options: z.ZodOptional<z.ZodObject<{
11624
- images: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"COLORS">;
11638
- name: z.ZodString;
11639
- isOptional: z.ZodOptional<z.ZodBoolean>;
11640
- default: z.ZodOptional<z.ZodArray<z.ZodString>>;
11641
- }, z.core.$loose>, z.ZodObject<{
11642
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11643
- display_name: z.ZodOptional<z.ZodString>;
11644
- forceInput: z.ZodOptional<z.ZodBoolean>;
11645
- tooltip: z.ZodOptional<z.ZodString>;
11646
- socketless: z.ZodOptional<z.ZodBoolean>;
11647
- hidden: z.ZodOptional<z.ZodBoolean>;
11648
- advanced: z.ZodOptional<z.ZodBoolean>;
11649
- widgetType: z.ZodOptional<z.ZodString>;
11650
- rawLink: z.ZodOptional<z.ZodBoolean>;
11651
- lazy: z.ZodOptional<z.ZodBoolean>;
11652
- type: z.ZodLiteral<"BOUNDING_BOXES">;
11653
- name: z.ZodString;
11654
- isOptional: z.ZodOptional<z.ZodBoolean>;
11655
- default: z.ZodOptional<z.ZodArray<z.ZodObject<{
11656
- x: z.ZodNumber;
11657
- y: z.ZodNumber;
11658
- width: z.ZodNumber;
11659
- height: z.ZodNumber;
11660
- metadata: z.ZodObject<{
11661
- type: z.ZodEnum<{
11662
- obj: "obj";
11663
- text: "text";
11664
- }>;
11665
- text: z.ZodString;
11666
- desc: z.ZodString;
11667
- palette: z.ZodArray<z.ZodString>;
11668
- }, z.core.$strip>;
11669
- }, z.core.$strip>>>;
11670
- }, z.core.$loose>, z.ZodObject<{
11671
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11672
- display_name: z.ZodOptional<z.ZodString>;
11673
- forceInput: z.ZodOptional<z.ZodBoolean>;
11674
- tooltip: z.ZodOptional<z.ZodString>;
11675
- socketless: z.ZodOptional<z.ZodBoolean>;
11676
- hidden: z.ZodOptional<z.ZodBoolean>;
11677
- advanced: z.ZodOptional<z.ZodBoolean>;
11678
- widgetType: z.ZodOptional<z.ZodString>;
11679
- rawLink: z.ZodOptional<z.ZodBoolean>;
11680
- lazy: z.ZodOptional<z.ZodBoolean>;
11681
- type: z.ZodLiteral<"TEXTAREA">;
11682
- name: z.ZodString;
11683
- isOptional: z.ZodOptional<z.ZodBoolean>;
11684
- rows: z.ZodOptional<z.ZodNumber>;
11685
- cols: z.ZodOptional<z.ZodNumber>;
11686
- default: z.ZodOptional<z.ZodString>;
11687
- options: z.ZodOptional<z.ZodObject<{
11688
- rows: z.ZodOptional<z.ZodNumber>;
11689
- cols: z.ZodOptional<z.ZodNumber>;
11690
- default: z.ZodOptional<z.ZodString>;
11691
- }, z.core.$strip>>;
11692
- }, z.core.$loose>, z.ZodObject<{
11693
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11694
- display_name: z.ZodOptional<z.ZodString>;
11695
- forceInput: z.ZodOptional<z.ZodBoolean>;
11696
- tooltip: z.ZodOptional<z.ZodString>;
11697
- socketless: z.ZodOptional<z.ZodBoolean>;
11698
- hidden: z.ZodOptional<z.ZodBoolean>;
11699
- advanced: z.ZodOptional<z.ZodBoolean>;
11700
- widgetType: z.ZodOptional<z.ZodString>;
11701
- rawLink: z.ZodOptional<z.ZodBoolean>;
11702
- lazy: z.ZodOptional<z.ZodBoolean>;
11703
- type: z.ZodLiteral<"CURVE">;
11704
- name: z.ZodString;
11705
- isOptional: z.ZodOptional<z.ZodBoolean>;
11706
- default: z.ZodOptional<z.ZodObject<{
11707
- points: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
11708
- interpolation: z.ZodEnum<{
11709
- linear: "linear";
11710
- monotone_cubic: "monotone_cubic";
11711
- }>;
11712
- }, z.core.$strip>>;
11713
- }, z.core.$loose>, z.ZodObject<{
11714
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11715
- display_name: z.ZodOptional<z.ZodString>;
11716
- forceInput: z.ZodOptional<z.ZodBoolean>;
11717
- tooltip: z.ZodOptional<z.ZodString>;
11718
- socketless: z.ZodOptional<z.ZodBoolean>;
11719
- hidden: z.ZodOptional<z.ZodBoolean>;
11720
- advanced: z.ZodOptional<z.ZodBoolean>;
11721
- widgetType: z.ZodOptional<z.ZodString>;
11722
- rawLink: z.ZodOptional<z.ZodBoolean>;
11723
- lazy: z.ZodOptional<z.ZodBoolean>;
11724
- type: z.ZodLiteral<"RANGE">;
11725
- name: z.ZodString;
11726
- isOptional: z.ZodOptional<z.ZodBoolean>;
11727
- default: z.ZodOptional<z.ZodObject<{
11728
- min: z.ZodNumber;
11729
- max: z.ZodNumber;
11730
- midpoint: z.ZodOptional<z.ZodNumber>;
11731
- }, z.core.$strip>>;
11732
- display: z.ZodOptional<z.ZodEnum<{
11733
- plain: "plain";
11734
- gradient: "gradient";
11735
- histogram: "histogram";
11736
- }>>;
11737
- gradient_stops: z.ZodOptional<z.ZodArray<z.ZodObject<{
11738
- offset: z.ZodNumber;
11739
- color: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
11740
- }, z.core.$strip>>>;
11741
- show_midpoint: z.ZodOptional<z.ZodBoolean>;
11742
- midpoint_scale: z.ZodOptional<z.ZodEnum<{
11743
- linear: "linear";
11744
- gamma: "gamma";
11745
- }>>;
11746
- value_min: z.ZodOptional<z.ZodNumber>;
11747
- value_max: z.ZodOptional<z.ZodNumber>;
11748
- }, z.core.$loose>, z.ZodObject<{
11749
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11750
- display_name: z.ZodOptional<z.ZodString>;
11751
- forceInput: z.ZodOptional<z.ZodBoolean>;
11752
- tooltip: z.ZodOptional<z.ZodString>;
11753
- socketless: z.ZodOptional<z.ZodBoolean>;
11754
- hidden: z.ZodOptional<z.ZodBoolean>;
11755
- advanced: z.ZodOptional<z.ZodBoolean>;
11756
- widgetType: z.ZodOptional<z.ZodString>;
11757
- rawLink: z.ZodOptional<z.ZodBoolean>;
11758
- lazy: z.ZodOptional<z.ZodBoolean>;
11759
- type: z.ZodLiteral<"VIDEO_EDIT">;
11760
- name: z.ZodString;
11761
- isOptional: z.ZodOptional<z.ZodBoolean>;
11762
- features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
11763
- trim: "trim";
11764
- crop: "crop";
11765
- }>>>;
11766
- default: z.ZodOptional<z.ZodObject<{
11767
- trim: z.ZodOptional<z.ZodObject<{
11768
- start_time: z.ZodNumber;
11769
- duration: z.ZodNumber;
11770
- }, z.core.$strip>>;
11771
- crop: z.ZodOptional<z.ZodObject<{
11772
- x: z.ZodNumber;
11773
- y: z.ZodNumber;
11774
- width: z.ZodNumber;
11775
- height: z.ZodNumber;
11776
- }, z.core.$strip>>;
11777
- }, z.core.$strip>>;
11778
- }, z.core.$loose>, z.ZodObject<{
11779
- default: z.ZodOptional<z.ZodAny>;
11780
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11781
- display_name: z.ZodOptional<z.ZodString>;
11782
- forceInput: z.ZodOptional<z.ZodBoolean>;
11783
- tooltip: z.ZodOptional<z.ZodString>;
11784
- socketless: z.ZodOptional<z.ZodBoolean>;
11785
- hidden: z.ZodOptional<z.ZodBoolean>;
11786
- advanced: z.ZodOptional<z.ZodBoolean>;
11787
- widgetType: z.ZodOptional<z.ZodString>;
11788
- rawLink: z.ZodOptional<z.ZodBoolean>;
11789
- lazy: z.ZodOptional<z.ZodBoolean>;
11790
- type: z.ZodLiteral<"RESOLUTION_PREVIEW">;
11791
- name: z.ZodString;
11792
- isOptional: z.ZodOptional<z.ZodBoolean>;
11793
- ratio_widget: z.ZodOptional<z.ZodString>;
11794
- megapixels_widget: z.ZodOptional<z.ZodString>;
11795
- multiple_widget: z.ZodOptional<z.ZodString>;
11796
- }, z.core.$loose>, z.ZodObject<{
11797
- default: z.ZodOptional<z.ZodAny>;
11798
- defaultInput: z.ZodOptional<z.ZodBoolean>;
11799
- display_name: z.ZodOptional<z.ZodString>;
11800
- forceInput: z.ZodOptional<z.ZodBoolean>;
11801
- tooltip: z.ZodOptional<z.ZodString>;
11802
- socketless: z.ZodOptional<z.ZodBoolean>;
11803
- hidden: z.ZodOptional<z.ZodBoolean>;
11804
- advanced: z.ZodOptional<z.ZodBoolean>;
11805
- widgetType: z.ZodOptional<z.ZodString>;
11806
- rawLink: z.ZodOptional<z.ZodBoolean>;
11807
- lazy: z.ZodOptional<z.ZodBoolean>;
11808
- type: z.ZodString;
11809
- name: z.ZodString;
11810
- isOptional: z.ZodOptional<z.ZodBoolean>;
11811
- }, z.core.$loose>]>>;
11812
- outputs: z.ZodArray<z.ZodObject<{
11813
- index: z.ZodNumber;
11814
- name: z.ZodString;
11815
- type: z.ZodString;
11816
- is_list: z.ZodBoolean;
11817
- options: z.ZodOptional<z.ZodArray<z.ZodAny>>;
11818
- tooltip: z.ZodOptional<z.ZodString>;
11819
- }, z.core.$strip>>;
11820
- hidden: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11821
- name: z.ZodString;
11822
- display_name: z.ZodString;
11823
- description: z.ZodString;
11824
- help: z.ZodOptional<z.ZodString>;
11825
- category: z.ZodString;
11826
- output_node: z.ZodBoolean;
11827
- python_module: z.ZodString;
11828
- deprecated: z.ZodOptional<z.ZodBoolean>;
11829
- experimental: z.ZodOptional<z.ZodBoolean>;
11830
- dev_only: z.ZodOptional<z.ZodBoolean>;
11831
- api_node: z.ZodOptional<z.ZodBoolean>;
11832
- }, z.core.$strip>;
11833
-
11834
11345
  /** Schema version 0.4 */
11835
11346
  declare const zComfyWorkflow: z.ZodObject<{
11836
11347
  subgraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -11858,6 +11369,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11858
11369
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
11859
11370
  horizontal: z.ZodOptional<z.ZodBoolean>;
11860
11371
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11372
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
11861
11373
  }, z.core.$loose>;
11862
11374
  order: z.ZodNumber;
11863
11375
  mode: z.ZodNumber;
@@ -11910,6 +11422,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11910
11422
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
11911
11423
  horizontal: z.ZodOptional<z.ZodBoolean>;
11912
11424
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11425
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
11913
11426
  }, z.core.$loose>;
11914
11427
  order: z.ZodNumber;
11915
11428
  mode: z.ZodNumber;
@@ -12056,6 +11569,7 @@ declare const zComfyWorkflow: z.ZodObject<{
12056
11569
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12057
11570
  horizontal: z.ZodOptional<z.ZodBoolean>;
12058
11571
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11572
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12059
11573
  }, z.core.$loose>;
12060
11574
  order: z.ZodNumber;
12061
11575
  mode: z.ZodNumber;
@@ -12123,6 +11637,7 @@ declare const zComfyWorkflow: z.ZodObject<{
12123
11637
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12124
11638
  horizontal: z.ZodOptional<z.ZodBoolean>;
12125
11639
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11640
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12126
11641
  }, z.core.$loose>;
12127
11642
  order: z.ZodNumber;
12128
11643
  mode: z.ZodNumber;
@@ -12328,6 +11843,7 @@ declare const zComfyWorkflow1: z.ZodObject<{
12328
11843
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12329
11844
  horizontal: z.ZodOptional<z.ZodBoolean>;
12330
11845
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11846
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12331
11847
  }, z.core.$loose>;
12332
11848
  order: z.ZodNumber;
12333
11849
  mode: z.ZodNumber;
@@ -12397,6 +11913,7 @@ declare const zComfyWorkflow1: z.ZodObject<{
12397
11913
  allow_interaction: z.ZodOptional<z.ZodBoolean>;
12398
11914
  horizontal: z.ZodOptional<z.ZodBoolean>;
12399
11915
  skip_repeated_outputs: z.ZodOptional<z.ZodBoolean>;
11916
+ fullResolutionPreview: z.ZodOptional<z.ZodBoolean>;
12400
11917
  }, z.core.$loose>;
12401
11918
  order: z.ZodNumber;
12402
11919
  mode: z.ZodNumber;
@@ -12627,11 +12144,12 @@ declare const zGroup: z.ZodObject<{
12627
12144
  declare const zJobDetail: z.ZodObject<{
12628
12145
  id: z.ZodString;
12629
12146
  status: z.ZodEnum<{
12147
+ failed: "failed";
12630
12148
  cancelled: "cancelled";
12631
12149
  completed: "completed";
12632
- failed: "failed";
12633
12150
  pending: "pending";
12634
12151
  in_progress: "in_progress";
12152
+ held_budget: "held_budget";
12635
12153
  }>;
12636
12154
  create_time: z.ZodNumber;
12637
12155
  execution_start_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -12659,12 +12177,42 @@ declare const zJobDetail: z.ZodObject<{
12659
12177
  executed: z.ZodOptional<z.ZodArray<z.ZodString>>;
12660
12178
  exception_message: z.ZodString;
12661
12179
  exception_type: z.ZodString;
12662
- traceback: z.ZodArray<z.ZodString>;
12180
+ traceback: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
12663
12181
  current_inputs: z.ZodOptional<z.ZodUnknown>;
12664
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>>>>>;
12665
12197
  }, z.core.$loose>>>;
12666
12198
  workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12667
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>>;
12668
12216
  workflow: z.ZodOptional<z.ZodUnknown>;
12669
12217
  outputs: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodObject<{
12670
12218
  audio: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -12751,11 +12299,6 @@ declare const zModelFile: z.ZodObject<{
12751
12299
  directory: z.ZodString;
12752
12300
  }, z.core.$strip>;
12753
12301
 
12754
- declare const zModelFile_2: z.ZodObject<{
12755
- name: z.ZodString;
12756
- pathIndex: z.ZodNumber;
12757
- }, z.core.$strip>;
12758
-
12759
12302
  declare const zNodeId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
12760
12303
 
12761
12304
  declare const zOutputs: z.ZodObject<{
@@ -12805,11 +12348,12 @@ declare const zOutputs: z.ZodObject<{
12805
12348
  declare const zRawJobListItem: z.ZodObject<{
12806
12349
  id: z.ZodString;
12807
12350
  status: z.ZodEnum<{
12351
+ failed: "failed";
12808
12352
  cancelled: "cancelled";
12809
12353
  completed: "completed";
12810
- failed: "failed";
12811
12354
  pending: "pending";
12812
12355
  in_progress: "in_progress";
12356
+ held_budget: "held_budget";
12813
12357
  }>;
12814
12358
  create_time: z.ZodNumber;
12815
12359
  execution_start_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -12837,12 +12381,42 @@ declare const zRawJobListItem: z.ZodObject<{
12837
12381
  executed: z.ZodOptional<z.ZodArray<z.ZodString>>;
12838
12382
  exception_message: z.ZodString;
12839
12383
  exception_type: z.ZodString;
12840
- traceback: z.ZodArray<z.ZodString>;
12384
+ traceback: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
12841
12385
  current_inputs: z.ZodOptional<z.ZodUnknown>;
12842
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>>>>>;
12843
12401
  }, z.core.$loose>>>;
12844
12402
  workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12845
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>>;
12846
12420
  }, z.core.$loose>;
12847
12421
 
12848
12422
  declare const zReroute: z.ZodObject<{
@@ -12899,11 +12473,11 @@ declare const zTaskResponse: z.ZodObject<{
12899
12473
  task_name: z.ZodString;
12900
12474
  update_time: z.ZodISODateTime;
12901
12475
  status: z.ZodUnion<readonly [z.ZodEnum<{
12902
- created: "created";
12476
+ cancelled: "cancelled";
12903
12477
  running: "running";
12478
+ created: "created";
12904
12479
  completed: "completed";
12905
12480
  failed: "failed";
12906
- cancelled: "cancelled";
12907
12481
  }>, z.ZodLiteral<"cancelled">]>;
12908
12482
  }, z.core.$strip>;
12909
12483
 
@@ -12920,9 +12494,9 @@ export { }
12920
12494
 
12921
12495
  declare global {
12922
12496
  interface Window {
12923
- /** 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. */
12924
12498
  app?: ComfyApp;
12925
- /** 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. */
12926
12500
  graph?: unknown;
12927
12501
  LiteGraph?: LiteGraphGlobal;
12928
12502
  LGraph?: typeof LGraph;
@@ -12941,6 +12515,10 @@ declare global {
12941
12515
  __comfyDesktop2Remote?: boolean;
12942
12516
  __comfyDesktop2?: ComfyDesktop2Bridge & {
12943
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;
12944
12522
  };
12945
12523
  }
12946
12524
  }
@@ -12999,6 +12577,8 @@ declare module 'axios' {
12999
12577
  // Exempts a deliberately Firebase-authed request (acceptInvite) from the
13000
12578
  // unified re-mint.
13001
12579
  __skipUnifiedRemint?: boolean
12580
+ /** Sends once, skipping the shared 429/502/503/504 retry. */
12581
+ __skipStatusRetry?: boolean
13002
12582
  }
13003
12583
  }
13004
12584